[frog] 01/03: Imported Upstream version 0.13.4

Maarten van Gompel proycon-guest at moszumanska.debian.org
Tue Aug 2 12:03:23 UTC 2016


This is an automated email from the git hooks/post-receive script.

proycon-guest pushed a commit to branch master
in repository frog.

commit 5fac19e323c98291d9a05e135800cc2164b02c40
Author: proycon <proycon at anaproy.nl>
Date:   Tue Aug 2 13:52:19 2016 +0200

    Imported Upstream version 0.13.4
---
 AUTHORS                              |    5 +-
 COPYING                              |    0
 ChangeLog                            | 4819 +++++++++++++++++++----------
 Makefile.am                          |    7 +-
 Makefile.in                          |   82 +-
 NEWS                                 |   61 +-
 README                               |  107 +-
 TODO                                 |    1 -
 aclocal.m4                           |  302 +-
 bootstrap.sh                         |    6 +-
 compile                              |    2 +-
 config.guess                         |  233 +-
 config.h.in                          |   15 +-
 config.sub                           |   60 +-
 configure                            | 5070 +++++++++++++++----------------
 configure.ac                         |  109 +-
 depcomp                              |    2 +-
 docs/Makefile.am                     |    4 +-
 docs/Makefile.in                     |   54 +-
 docs/frog.1                          |   98 +-
 docs/mblem.1                         |   18 +-
 docs/mbma.1                          |   18 +-
 include/Makefile.am                  |    4 +-
 include/Makefile.in                  |   54 +-
 include/frog/Frog.h                  |   48 +-
 include/frog/FrogAPI.h               |  140 +
 include/frog/Makefile.am             |    7 +-
 include/frog/Makefile.in             |   59 +-
 include/frog/Parser.h                |   92 +-
 include/frog/cgn_tagger_mod.h        |   43 +-
 include/frog/ckyparser.h             |  132 +
 include/frog/clex.h                  |   51 +
 include/frog/csidp.h                 |   27 +
 include/frog/iob_tagger_mod.h        |   29 +-
 include/frog/mblem_mod.h             |   40 +-
 include/frog/mbma_brackets.h         |  149 +
 include/frog/mbma_mod.h              |  239 +-
 include/frog/mbma_rule.h             |   92 +
 include/frog/mwu_chunker_mod.h       |   47 +-
 include/frog/ner_tagger_mod.h        |   35 +-
 include/frog/pos_tagger_mod.h        |   61 +
 include/frog/ucto_tokenizer_mod.h    |   50 +-
 install-sh                           |  373 ++-
 ltmain.sh                            | 5533 +++++++++++++++++++++-------------
 m4/Makefile.am                       |    6 +-
 m4/Makefile.in                       |   56 +-
 m4/ac_python_devel.m4                |  320 --
 m4/ax_lib_readline.m4                |    4 +-
 m4/libtool.m4                        | 2801 ++++++++++-------
 m4/ltoptions.m4                      |  140 +-
 m4/ltversion.m4                      |   12 +-
 m4/openmp.m4                         |   97 -
 m4/pkg.m4                            |   55 +
 missing                              |    2 +-
 py-compile                           |  170 --
 scripts/Makefile.am                  |    9 -
 scripts/Makefile.in                  |  568 ----
 scripts/cky.py                       |  171 --
 scripts/cmdline.py                   |  110 -
 scripts/common.py                    |   27 -
 scripts/csidp.py                     |  303 --
 scripts/csiparse2.py                 |  192 --
 scripts/deptree.py                   |  124 -
 scripts/dir.py                       |   57 -
 scripts/pairs.py                     |  171 --
 scripts/rels.py                      |   70 -
 scripts/sentences.py                 |   64 -
 src/Frog-util.cxx                    |   59 +-
 src/Frog.cxx                         | 1530 ++--------
 src/FrogAPI.cxx                      | 1336 ++++++++
 src/Makefile.am                      |   14 +-
 src/Makefile.in                      |   96 +-
 src/Parser.cxx                       | 1444 ++++-----
 src/cgn_tagger_mod.cxx               |  257 +-
 src/ckyparser.cxx                    |  303 ++
 src/clex.cxx                         |  221 ++
 src/csidp.cxx                        |  158 +
 src/iob_tagger_mod.cxx               |  125 +-
 src/mblem_mod.cxx                    |  296 +-
 src/mblem_prog.cxx                   |  187 +-
 src/mbma_brackets.cxx                | 1077 +++++++
 src/mbma_mod.cxx                     | 2074 +++----------
 src/mbma_prog.cxx                    |  222 +-
 src/mbma_rule.cxx                    |  563 ++++
 src/mwu_chunker_mod.cxx              |  162 +-
 src/{mblem_prog.cxx => ner_prog.cxx} |  167 +-
 src/ner_tagger_mod.cxx               |  334 +-
 src/pos_tagger_mod.cxx               |  277 ++
 src/ucto_tokenizer_mod.cxx           |  111 +-
 test-driver                          |   15 +-
 tests/Makefile.am                    |    4 +-
 tests/Makefile.in                    |   54 +-
 92 files changed, 19255 insertions(+), 15738 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 2cd033a..4ce5490 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -16,7 +16,7 @@ Sander Canisius (CSI-DP)
 Jakub Zavrel (MBT)
 
 Supporters:
-People who contributed to Frog by suggesting improvements, 
+People who contributed to Frog by suggesting improvements,
 filing bug reports, asking the right questions etc.:
 
 Walter Daelemans
@@ -24,8 +24,7 @@ Micha Hulsbosch
 Emmanuel Keuleers
 Martin Reynaart
 Erik Tjong Kim Sang
+Manos Tsagkias
 Frederik Vaassen
 
 and many others.
-
-
diff --git a/COPYING b/COPYING
old mode 100755
new mode 100644
diff --git a/ChangeLog b/ChangeLog
index 06a7687..b40276a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,2665 +1,4258 @@
-2014-06-04 08:46  sloot
+2016-07-11  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17286] src/mbma_mod.cxx: small fix for 'ge' prefix
+	* NEWS: Announce the progress :)
 
-2014-06-02 14:56  sloot
+2016-06-30  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17273] src/mbma_mod.cxx: no debug lines please
+	* include/frog/FrogAPI.h, src/Frog.cxx, src/FrogAPI.cxx: added a
+	--language option. Default = 'nl'. Configuration is read from a
+	subdit with this name.
 
-2014-06-02 14:53  sloot
+2016-06-30  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17272] src/mbma_mod.cxx: bug fix
+	* include/frog/Frog.h, include/frog/FrogAPI.h, src/FrogAPI.cxx: 
+	fixed timing. tolkenizing is timed too (finally!)
 
-2014-06-02 09:38  sloot
+2016-06-29  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17271] configure.ac, src/Frog.cxx: added readline support
+	* src/FrogAPI.cxx: fix when clex tag is missing
 
-2014-06-02 08:48  sloot
+2016-06-29  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17270] src/mbma_mod.cxx: avoit creation of empty nodes when
-	  --daring
-	  still very ugly code
+	* include/frog/FrogAPI.h, src/Frog.cxx, src/FrogAPI.cxx,
+	src/pos_tagger_mod.cxx: refactoring to get less dependencies
 
-2014-05-28 12:00  sloot
+2016-06-29  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17269] include/frog/mbma_mod.h, src/mbma_mod.cxx: added more
-	  heuristic hackery to improve bracketing.
-	  Als fixed a bug that made mbma loop on some words
+	* include/frog/FrogAPI.h, src/FrogAPI.cxx: interactive mode now
+	detects running from a pipe/redrection
 
-2014-05-27 15:21  sloot
+2016-06-29  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17267] src/mbma_mod.cxx: fix for nonDaring
+	* src/mbma_mod.cxx: cleanup Logging a bit
 
-2014-05-27 15:17  sloot
+2016-06-29  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17266] include/frog/mbma_mod.h, src/mbma_mod.cxx: when daring,
-	  reduce the failing morphemes
+	* src/Frog.cxx: give a better warning when threads are not used
+	because of misssing OpenMP
 
-2014-05-26 11:56  sloot
+2016-06-22  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17252] src/Frog.cxx: oesp
+	* src/FrogAPI.cxx, src/mbma_mod.cxx: adjusted test. ADJ may appear
+	at BW position.  typo fixed
 
-2014-05-08 11:02  sloot
+2016-06-20  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17220] src/Frog.cxx: removed debug line
+	* src/Frog.cxx: --help also works now
 
-2014-05-08 10:57  sloot
+2016-06-13  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17219] src/Frog.cxx: fix
+	* include/frog/FrogAPI.h, src/FrogAPI.cxx: enhanced
+	get_full_morph_analysis() function
 
-2014-05-01 15:44  sloot
+2016-06-13  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17195] src/Frog.cxx, src/mbma_mod.cxx: failed nodes are labeled
-	  as such in Morphemes
+	* include/frog/mbma_brackets.h, include/frog/mbma_rule.h,
+	src/mbma_brackets.cxx, src/mbma_rule.cxx: placed Compound info in
+	its own namespace. Avoid clashes in the future
 
-2014-05-01 12:12  sloot
+2016-06-09  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17191] src/Frog.cxx: Frog can now run interactive too!
+	* src/FrogAPI.cxx: add extra Compound column when doing --deep-morph
 
-2014-05-01 10:40  sloot
+2016-06-09  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17190] src/Frog.cxx: -o option now also works for multiple
-	  files
-	  -t may be left out, allowing multiple inputfiles
+	* include/frog/FrogAPI.h, src/FrogAPI.cxx: added 2 functions to the
+	API to simplifu retreiving of morphme and compund info.  Added (yet
+	disabled) possibility for an an extra column with compound info.
 
-2014-05-01 09:14  sloot
+2016-06-09  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17189] src/Frog.cxx: attempt to clean up the logic a bit
+	* src/FrogAPI.cxx, src/mbma_mod.cxx: simplified the code. added some
+	debug lines
 
-2014-04-30 16:11  sloot
+2016-06-08  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17187] src/Frog.cxx: start using CL_Options from libticcutils
+	* src/Parser.cxx: small refactoring
 
-2014-04-30 12:40  sloot
+2016-06-08  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17179] src/tst.sh: prop set
+	* : commit eb643897bc8eb1465774725fc20e9f5e1c3cff2c Author: Ko van
+	der Sloot <K.vanderSloot at let.ru.nl> Date:   Wed Jun 8 14:34:12 2016
+	+0200
 
-2014-04-30 12:37  sloot
+2016-06-02  Maarten van Gompel <proycon at anaproy.nl>
 
-	* [r17178] src/tst.sh: numb change
+	* : added frog manual PDF, first draft version, copied from overleaf
+	(sources remain there for now)
 
-2014-04-30 12:29  sloot
+2016-05-30  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17176] src/Makefile.am, src/tst.sh: fixed 'make check'
+	* src/mblem_mod.cxx: removed unused function
 
-2014-04-30 10:20  sloot
+2016-05-30  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17167] tests/tst.ok: modified testresult
+	* src/Parser.cxx: typo
 
-2014-04-30 10:17  sloot
+2016-05-26  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17166] Makefile.am: fixed 'make dist'
+	* src/ucto_tokenizer_mod.cxx: added possibility to use a ucto config
+	file from the /etc/frog directory
 
-2014-04-15 07:03  sloot
+2016-05-24  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17124] src/mbma_mod.cxx: fixed bracketed morphmes (missing
-	  description)
+	* src/mbma_rule.cxx: numb refactoring
 
-2014-03-18 15:41  sloot
+2016-05-24  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17046] Makefile.am, configure.ac, frog.pc.in, src/mbma_mod.cxx:
-	  better sanity check.
-	  create a frog.pc
+	* include/frog/Parser.h, include/frog/mwu_chunker_mod.h,
+	src/Parser.cxx, src/mwu_chunker_mod.cxx: now the MWU unit and the
+	parser also use char_filter
 
-2014-03-18 11:05  sloot
+2016-05-24  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17043] include/frog/mbma_mod.h, src/mbma_mod.cxx,
-	  src/mbma_prog.cxx: added --daring mode to the mbma program too
+	* include/frog/iob_tagger_mod.h, include/frog/ner_tagger_mod.h,
+	src/iob_tagger_mod.cxx, src/ner_tagger_mod.cxx: both the iob tagger
+	and the ner tagger now use the char_filter file.
 
-2014-03-17 16:30  sloot
+2016-04-13  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17037] src/Frog.cxx, src/mbma_mod.cxx: when doDaring, the Frog
-	  output shows NESTED brackets now.
+	* : commit e8d52c3d9824ed348f56acd46e468586ac20f022 Author: Ko van
+	der Sloot <K.vanderSloot at let.ru.nl> Date:   Wed Apr 13 13:34:36 2016
+	+0200
 
-2014-03-17 14:54  sloot
+2016-04-12  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17036] src/mbma_mod.cxx: oesp. Debugging off please!
+	* docs/frog.1: updated doc
 
-2014-03-17 14:53  sloot
+2016-04-12  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17035] include/frog/mbma_mod.h, src/mbma_mod.cxx: modified
-	  morpheme output in Daring mode
+	* src/Frog.cxx: Added --deep-morph to usage()
 
-2014-03-13 17:14  sloot
+2016-04-12  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17033] include/frog/mbma_mod.h, src/mbma_mod.cxx: a lot of
-	  refactoring to avoid memory leaks
+	* src/Frog.cxx: --threads= option must be discarded when running a
+	server.  typo
 
-2014-03-13 14:12  sloot
+2016-04-08  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17032] include/frog/mbma_mod.h, src/mbma_mod.cxx: CLEX tag is
-	  own Folia tagset
+	* src/Frog-util.cxx: fix prefix() function. (needed after a "fix" in
+	ticcutils)
 
-2014-03-13 13:31  sloot
+2016-04-07  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17031] configure.ac: we need most recent libfolia!
+	* src/mbma_rule.cxx: hmm. reversed search without seeing a
+	difference. spooky
 
-2014-03-13 13:28  sloot
+2016-04-04  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17029] include/frog/mbma_mod.h, src/Frog.cxx, src/mbma_mod.cxx:
-	  added a --daring mode to frog
-	  this enables nested morphological analysis
+	* src/mbma_rule.cxx: silence please
 
-2014-03-12 15:18  sloot
+2016-04-04  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17026] include/frog/mbma_mod.h, src/mbma_mod.cxx: more
-	  refactoring
+	* .gitignore: added README to ignore
 
-2014-03-12 14:49  sloot
+2016-04-04  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17023] include/frog/mbma_mod.h, src/mbma_mod.cxx: al lot of
-	  refactoring concering bracketing
+	* src/mbma_brackets.cxx: better determination of the final tag of a
+	sequence
 
-2014-03-12 09:03  sloot
+2016-04-04  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17022] src/mbma_mod.cxx: ok, nice cleanup
+	* src/mbma_rule.cxx: a bit clearer code
 
-2014-03-11 17:38  sloot
+2016-04-01  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17021] src/mbma_mod.cxx: save state.
+	* src/mbma_rule.cxx: added an exception for inserting particles
 
-2014-03-11 16:59  sloot
+2016-03-31  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17020] src/mbma_mod.cxx: removed some slack
+	* src/mbma_brackets.cxx: again a compound fix
 
-2014-03-11 16:49  sloot
+2016-03-31  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17019] src/mbma_mod.cxx: save current state of the art
+	* src/mbma_rule.cxx: avoid crash when signaling a problem
 
-2014-03-11 15:22  sloot
+2016-03-31  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17018] src/mbma_mod.cxx: save current state of work on
-	  Bracketing
+	* src/mbma_brackets.cxx: fix in compounds
 
-2014-03-04 15:44  sloot
+2016-03-30  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r17001] src/mbma_mod.cxx: save current work on brackets (not
-	  called)
+	* include/frog/Frog.h, src/Frog-util.cxx, src/Frog.cxx: some code
+	cleanup
 
-2014-02-27 17:43  sloot
+2016-03-30  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16990] src/mbma_mod.cxx: save experimental and buggy work on
-	  mbma barcketing. (not called)
+	* src/mbma_brackets.cxx: restict to less B* compounds
 
-2014-02-05 16:15  sloot
+2016-03-30  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16927] include/frog/mbma_mod.h, src/mbma_mod.cxx: save new
-	  Bracketing stuff (disabled yet)
+	* src/mbma_mod.cxx: renamed a variable, to be more expressive
 
-2014-02-05 11:26  sloot
+2016-03-30  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16924] src/mbma_mod.cxx: save current status.
+	* src/mbma_mod.cxx: also allow matches between Tagger:ADJ and Mbma:V
+	tags (somewhat experimental)
 
-2014-02-03 10:22  sloot
+2016-03-30  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16910] include/frog/mbma_mod.h, src/mbma_mod.cxx: save current
-	  status
+	* src/Frog.cxx: make sure that outputfile is realy created
 
-2014-01-28 13:52  sloot
+2016-03-29  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16884] src/Frog.cxx: use new TimblServer stuff
+	* src/Frog.cxx: releaxed handling of --xmldir. Solves isssue #4
 
-2014-01-27 10:46  sloot
+2016-03-29  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16877] include/frog/mbma_mod.h, src/mbma_mod.cxx: more cleanup
-	  and comment added
+	* src/Frog.cxx: --outputdir now also works for a single file.  fixes
+	part of issue #4
 
-2014-01-23 16:04  sloot
+2016-03-24  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16875] include/frog/mbma_mod.h, src/mbma_mod.cxx: more cleanup
+	* include/frog/mblem_mod.h, src/mblem_mod.cxx: added a 'keep_case'
+	option for mblem
 
-2014-01-23 15:43  sloot
+2016-03-24  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16874] include/frog/mbma_mod.h, src/mbma_mod.cxx: cleanup and
-	  refactoring
+	* src/mblem_mod.cxx: avoid unitialized variables
 
-2014-01-23 14:19  sloot
+2016-03-24  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16872] include/frog/mbma_mod.h, src/mbma_mod.cxx: save current
-	  state. Still messy and t bug-to-bug compatible
+	* include/frog/mbma_brackets.h, include/frog/mbma_mod.h,
+	src/FrogAPI.cxx, src/mbma_brackets.cxx, src/mbma_mod.cxx: some
+	refactoring. make 'constants' static
 
-2014-01-21 17:22  sloot
+2016-03-24  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16867] include/frog/mbma_mod.h, src/mbma_mod.cxx: cleanup
+	* include/frog/mbma_rule.h, src/mbma_mod.cxx, src/mbma_rule.cxx: 
+	implemented a primitive confidence mechanism for MBMA can be
+	extented probably
 
-2014-01-21 17:04  sloot
+2016-03-23  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16866] include/frog/mbma_mod.h, src/mbma_mod.cxx: save current
-	  work
+	* include/frog/mbma_rule.h, src/mbma_mod.cxx, src/mbma_rule.cxx: 
+	removed experimental code.  gave a variable a more expressive name
 
-2014-01-21 14:24  sloot
+2016-03-23  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16865] include/frog/mbma_mod.h, src/mbma_mod.cxx: save current
-	  state. getting closer...
+	* src/mbma_brackets.cxx, src/mbma_rule.cxx: better interpretation of
+	PE inflection rules. (Were ignored totally) prefer "real" tags over
+	P tags in inflection and assigning result-tag
 
-2014-01-21 11:51  sloot
+2016-03-22  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16861] include/frog/mbma_mod.h, src/Frog.cxx, src/mbma_mod.cxx:
-	  save intermediate result
-	  this seesm to work
+	* include/frog/mbma_brackets.h, src/mbma_brackets.cxx: cleaner code.
+	but still messy :{
 
-2014-01-16 16:45  sloot
+2016-03-22  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16860] include/frog/mbma_mod.h, src/mbma_mod.cxx: save work on
-	  new implementation
+	* src/mbma_brackets.cxx: added more compound rules
 
-2014-01-16 14:07  sloot
+2016-03-22  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16859] include/frog/mbma_mod.h, src/mbma_mod.cxx: more
-	  refactoring
+	* include/frog/mbma_brackets.h, src/mbma_brackets.cxx: more
+	compounds
 
-2014-01-16 12:32  sloot
+2016-03-21  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16858] include/frog/mbma_mod.h, src/mbma_mod.cxx: again some
-	  refactoring in the process of getiing it alright
+	* include/frog/mbma_brackets.h, src/mbma_brackets.cxx,
+	src/mbma_rule.cxx: compound refinements
 
-2014-01-06 10:00  sloot
+2016-03-17  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16815] include/frog/Frog.h, include/frog/Parser.h,
-	  include/frog/cgn_tagger_mod.h, include/frog/iob_tagger_mod.h,
-	  include/frog/mblem_mod.h, include/frog/mbma_mod.h,
-	  include/frog/mwu_chunker_mod.h, include/frog/ner_tagger_mod.h,
-	  include/frog/ucto_tokenizer_mod.h, src/Frog-util.cxx,
-	  src/Frog.cxx, src/Parser.cxx, src/cgn_tagger_mod.cxx,
-	  src/iob_tagger_mod.cxx, src/mblem_mod.cxx, src/mblem_prog.cxx,
-	  src/mbma_mod.cxx, src/mbma_prog.cxx, src/mwu_chunker_mod.cxx,
-	  src/ner_tagger_mod.cxx, src/ucto_tokenizer_mod.cxx: Happy
-	  Newyear!
+	* include/frog/mbma_brackets.h, src/mbma_brackets.cxx,
+	src/mbma_mod.cxx, src/mbma_rule.cxx: fixed a problem with empty
+	morphemes in --deep-morph just to be sure: added a throw if they
+	still occur
 
-2013-12-11 09:31  sloot
+2016-03-16  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16760] src/mbma_mod.cxx: changed warning in something less
-	  disturbing.
+	* include/frog/mbma_brackets.h, src/mbma_brackets.cxx: still working
+	on compounds
 
-2013-12-11 08:48  sloot
+2016-03-16  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16759] include/frog/mbma_mod.h, src/mbma_mod.cxx: small
-	  refactoring, in the process of better understanding
+	* src/mbma_brackets.cxx: oesp, too much debug info
 
-2013-10-24 10:53  sloot
+2016-03-16  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16645] src/mbma_mod.cxx, src/ucto_tokenizer_mod.cxx: make
-	  '-pedantic' happy
+	* include/frog/mbma_brackets.h, include/frog/mbma_rule.h,
+	src/mbma_brackets.cxx, src/mbma_rule.cxx: improved compound stuff
+	and debugging code
 
-2013-10-24 10:38  sloot
+2016-03-15  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16643] include/frog/Parser.h: disabled the last Py_XDECREF()
-	  call in the program.
-	  In some cases is crashes. Don't know why, Don't now when.
-	  It shouldn't matter a lot, because we already terminate Frog.
+	* include/frog/mbma_brackets.h, src/mbma_brackets.cxx: more work on
+	compounds might overgeneralize. testing testing testing...
 
-2013-10-17 12:42  sloot
+2016-03-15  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16619] bootstrap, bootstrap.sh, configure.ac: modernized
+	* include/frog/mbma_brackets.h, src/mbma_brackets.cxx,
+	src/mbma_rule.cxx: remove some more empty values from rules to avoid
+	problems when doing --deep-morph improving on compound assignement
 
-2013-10-02 09:03  mvgompel
+2016-03-10  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16551] src/Frog.cxx: be more verbose in exception
+	* src/Frog.cxx: typo
 
-2013-08-22 12:57  sloot
+2016-03-10  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16483] src/mbma_mod.cxx: numb refeactoring
+	* docs/frog.1, include/frog/FrogAPI.h, include/frog/mbma_mod.h,
+	src/Frog.cxx, src/FrogAPI.cxx, src/mbma_mod.cxx, src/mbma_prog.cxx,
+	src/mbma_rule.cxx: use the option --deep-morph instead of the scary
+	--daring.
 
-2013-08-20 12:42  sloot
+2016-03-10  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16481] src/mbma_mod.cxx: readded hack
+	* src/mblem_mod.cxx, src/mbma_mod.cxx: MBLEM and MBMA don't realy
+	handle abreviations.  So skip those if the Tokenizer labels them as
+	such.
 
-2013-08-15 10:25  sloot
+2016-03-10  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16439] src/Frog.cxx: some emptyness removed :)
+	* NEWS: news
 
-2013-08-15 10:19  sloot
+2016-03-10  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16438] AUTHORS: credits added
+	* configure.ac: bump version after release
 
-2013-08-15 10:17  sloot
+2016-03-10  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16437] src/Frog.cxx: be more picky on commandline errors
+	* NEWS: news
 
-2013-08-15 09:49  sloot
+2016-03-09  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16436] src/Frog.cxx: typo
+	* : commit f0a11a4b6f6c8babce551ee2935161ca594e6ea7 Author: Ko van
+	der Sloot <K.vanderSloot at let.ru.nl> Date:   Tue Mar 8 16:43:27 2016
+	+0100
 
-2013-08-08 16:06  sloot
+2016-03-08  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16422] src/mbma_mod.cxx: disable the gross hach for now
+	* configure.ac: signal need of recent libfolia and ucto
 
-2013-08-08 07:53  sloot
+2016-03-04  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16421] include/frog/mbma_mod.h, src/mbma_mod.cxx: fix Unicode
-	  problem.
-	  improved debug logging
-	  added a gross hack while inserting/deleting. It works sort off
+	* src/Frog.cxx: disable --KANON for now
 
-2013-08-08 07:51  sloot
+2016-03-04  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16420] src/mbma_prog.cxx: fix
+	* src/FrogAPI.cxx, src/Parser.cxx: class name change
 
-2013-08-08 07:51  sloot
+2016-02-23  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16419] src/ucto_tokenizer_mod.cxx: make sure to make a fresh
-	  start for every 'line'
+	* include/frog/ucto_tokenizer_mod.h, src/Frog.cxx: don't delete
+	twice. Also fixed a leak.
 
-2013-07-31 07:43  sloot
+2016-02-22  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16403] src/mbma_mod.cxx: probably we want PN == N...
+	* src/Makefile.am: removed 2 unused lines
 
-2013-07-30 09:24  sloot
+2016-02-18  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16399] src/Frog.cxx: small improvement in debugging
+	* : commit 3219c73f2a0360b16599577b1aa2683c8d873622 Author: Ko van
+	der Sloot <K.vanderSloot at let.ru.nl> Date:   Thu Feb 18 17:00:20 2016
+	+0100
 
-2013-06-12 14:55  sloot
+2016-02-17  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16232] src/mblem_mod.cxx: only strip suffixes from
-	  SPEC(deeleigen). Not from SPEC(vreemd) etc.
+	* : commit bb041fd5c196b0cd54d862943610b6ae6bbecf01 Merge: 700f344
+	61f7aed Author: Ko van der Sloot <K.vanderSloot at let.ru.nl> Date:
+	Wed Feb 17 18:04:36 2016 +0100
 
-2013-06-12 14:16  sloot
+2016-02-17  Maarten van Gompel <proycon at anaproy.nl>
 
-	* [r16228] src/mblem_mod.cxx: removed debug line
+	* README, README.md, bootstrap.sh: Converted README to markdown,
+	added badges
 
-2013-06-12 14:15  sloot
+2016-02-16  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16227] src/mblem_mod.cxx: Fix suffixes for SPEC(deeleigen) tags
+	* src/Parser.cxx, src/ner_prog.cxx, src/ner_tagger_mod.cxx: the
+	refactoring continues
 
-2013-06-10 13:36  sloot
+2016-02-16  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16221] src/mblem_mod.cxx: small fix
+	* src/FrogAPI.cxx, src/iob_tagger_mod.cxx, src/mbma_mod.cxx,
+	src/mbma_prog.cxx, src/mbma_rule.cxx, src/mwu_chunker_mod.cxx: more
+	refactoring, and avoid problems using back() on vectors
 
-2013-06-10 12:31  sloot
+2016-02-16  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16220] src/mbma_mod.cxx: some refactoring.
-	  Als fixing a bug in code that is not used atm :)
+	* src/mblem_mod.cxx, src/mblem_prog.cxx, src/mbma_brackets.cxx: 
+	refactoring continues
 
-2013-06-10 09:55  sloot
+2016-02-16  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16217] src/mblem_mod.cxx: improved debugging (avoid output
-	  mangling)
+	* src/iob_tagger_mod.cxx: added braces to if/then/else
 
-2013-06-10 09:34  sloot
+2016-02-16  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16216] src/mbma_mod.cxx, src/mbma_prog.cxx: be a bit more picky
-	  about lowercasing all words.
+	* src/Frog.cxx, src/ckyparser.cxx, src/iob_tagger_mod.cxx: advanced
+	refactoring
 
-2013-06-04 08:37  sloot
+2016-02-16  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16170] src/mblem_mod.cxx, src/mbma_mod.cxx: better debug info
+	* src/FrogAPI.cxx: continue refactoring
 
-2013-06-03 12:33  sloot
+2016-02-16  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r16164] include/frog/Frog.h, include/frog/cgn_tagger_mod.h,
-	  include/frog/mblem_mod.h, include/frog/mbma_mod.h,
-	  src/Frog-util.cxx, src/cgn_tagger_mod.cxx, src/mblem_mod.cxx,
-	  src/mbma_mod.cxx: added configurable character filters to CGN
-	  tagger, MBLEM annd MBMA
+	* src/FrogAPI.cxx: refactoring in progress
 
-2013-04-09 15:42  sloot
+2016-02-16  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15973] configure.ac, src/Frog.cxx: added support for BZ2 and GZ
-	  files (XML input and output only)
+	* src/cgn_tagger_mod.cxx: small refactoring
 
-2013-04-04 15:33  sloot
+2016-02-03  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15948] configure.ac: Bump version after release
+	* src/cgn_tagger_mod.cxx, src/mblem_mod.cxx, src/mbma_brackets.cxx,
+	src/mbma_mod.cxx, src/pos_tagger_mod.cxx: be more strict on FoLiA
+	syntax: use 'class' attribute, not 'cls'
 
-2013-04-04 12:22  sloot
+2016-02-02  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15946] docs/Makefile.am: oesp!
+	* include/frog/Frog.h, src/mblem_prog.cxx, src/mbma_brackets.cxx,
+	src/mbma_prog.cxx, src/mbma_rule.cxx, src/ner_prog.cxx: ok. we need
+	a 'generic' branch to test te 'generic' libfolia branch
 
-2013-04-03 16:00  sloot
+2016-02-01  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15926] src/Makefile.am: increment library version
+	* .travis.yml: test only the master
 
-2013-04-03 14:04  sloot
+2016-02-01  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15912] include/frog/Frog.h, include/frog/ucto_tokenizer_mod.h,
-	  src/Frog.cxx, src/Parser.cxx, src/cgn_tagger_mod.cxx,
-	  src/iob_tagger_mod.cxx, src/mblem_mod.cxx, src/mblem_prog.cxx,
-	  src/mbma_mod.cxx, src/mbma_prog.cxx, src/mwu_chunker_mod.cxx,
-	  src/ner_tagger_mod.cxx: changed folia include path!
+	* .travis.yml: test only the master
 
-2013-04-03 13:15  sloot
+2016-02-01  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15906] NEWS, configure.ac: NEWS
+	* include/frog/Frog.h, src/mblem_prog.cxx, src/mbma_brackets.cxx,
+	src/mbma_prog.cxx, src/ner_prog.cxx: works with the generic branches
 
-2013-04-02 16:10  sloot
+2016-01-26  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15886] configure.ac: we need the most recent ticcutils
+	* src/Frog.cxx: better error message
 
-2013-04-02 15:57  sloot
+2016-01-18  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15877] include/frog/Frog.h, include/frog/mwu_chunker_mod.h,
-	  include/frog/ucto_tokenizer_mod.h, src/Frog.cxx, src/Parser.cxx,
-	  src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx,
-	  src/mblem_mod.cxx, src/mblem_prog.cxx, src/mbma_mod.cxx,
-	  src/mbma_prog.cxx, src/mwu_chunker_mod.cxx,
-	  src/ner_tagger_mod.cxx: adapted to changed folia include path
+	* configure.ac: Bumped version after Release
 
-2013-04-02 09:49  sloot
+2016-01-14  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15857] include/frog/Frog.h, src/Frog.cxx, src/Parser.cxx: Timer
-	  class was moved to ticcutils
+	* .gitignore, Makefile.am, NEWS: we hav news finished transition to
+	Git
 
-2013-03-28 17:44  sloot
+2016-01-04  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15847] src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx,
-	  src/ner_tagger_mod.cxx: some stuff is moved from libfolia to
-	  ticcutils
+	* README, configure.ac: updated mail address
 
-2013-03-28 12:10  sloot
+2015-12-23  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15833] src/Frog.cxx, src/Parser.cxx, src/mblem_mod.cxx,
-	  src/mblem_prog.cxx, src/mbma_mod.cxx, src/mbma_prog.cxx,
-	  src/mwu_chunker_mod.cxx, src/ucto_tokenizer_mod.cxx: adapted to
-	  changed ticcutils
+	* include/frog/Frog.h, include/frog/mblem_mod.h,
+	include/frog/mbma_mod.h, include/frog/mwu_chunker_mod.h,
+	src/Frog-util.cxx, src/Frog.cxx, src/mblem_mod.cxx,
+	src/mbma_mod.cxx, src/mwu_chunker_mod.cxx: mode change
 
-2013-03-28 10:25  sloot
+2015-12-23  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15826] docs/frog.1, src/Frog.cxx: added a --threads option, so
-	  we can limit the number of theads now.
+	* include/frog/Frog.h, include/frog/Parser.h,
+	include/frog/cgn_tagger_mod.h, include/frog/clex.h,
+	include/frog/iob_tagger_mod.h, include/frog/mblem_mod.h,
+	include/frog/mbma_brackets.h, include/frog/mbma_mod.h,
+	include/frog/mbma_rule.h, include/frog/mwu_chunker_mod.h,
+	include/frog/ner_tagger_mod.h, include/frog/pos_tagger_mod.h,
+	src/Frog-util.cxx, src/Frog.cxx, src/FrogAPI.cxx, src/Parser.cxx,
+	src/cgn_tagger_mod.cxx, src/ckyparser.cxx, src/clex.cxx,
+	src/csidp.cxx, src/iob_tagger_mod.cxx, src/mblem_mod.cxx,
+	src/mblem_prog.cxx, src/mbma_brackets.cxx, src/mbma_mod.cxx,
+	src/mbma_prog.cxx, src/mbma_rule.cxx, src/mwu_chunker_mod.cxx,
+	src/ner_prog.cxx, src/ner_tagger_mod.cxx, src/pos_tagger_mod.cxx,
+	src/ucto_tokenizer_mod.cxx: Updated copyright message
 
-2013-03-25 16:35  sloot
+2015-12-23  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15812] src/cgn_tagger_mod.cxx: replace SPEC() tags by LET()
-	  when the tokenizer thinks that its PUNCTUAION
+	* include/frog/FrogAPI.h, include/frog/ucto_tokenizer_mod.h,
+	src/FrogAPI.cxx, src/ucto_tokenizer_mod.cxx: missing [[ ]] sections
+	in the config file no longer lead to a failure The missing module is
+	skipped.  This enables running with a minimal configuration.
 
-2013-03-06 13:09  sloot
+2015-12-22  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15770] src/Frog.cxx: fixed program logic
+	* include/frog/FrogAPI.h, include/frog/cgn_tagger_mod.h,
+	include/frog/iob_tagger_mod.h, include/frog/ner_tagger_mod.h,
+	include/frog/pos_tagger_mod.h, src/FrogAPI.cxx,
+	src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx, src/mblem_prog.cxx,
+	src/mbma_prog.cxx, src/ner_prog.cxx, src/ner_tagger_mod.cxx,
+	src/pos_tagger_mod.cxx: quick adaptation to more strickt namespace
+	usage in the Tagger
 
-2013-03-06 11:23  sloot
+2015-12-03  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15767] docs/frog.1, include/frog/ucto_tokenizer_mod.h,
-	  src/Frog.cxx, src/ucto_tokenizer_mod.cxx: added a textclass
-	  option for the tokenizer
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: make the cgn to celex
+	translations configurable
 
-2013-02-21 14:57  sloot
+2015-12-02  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15694] NEWS, configure.ac, src/ucto_tokenizer_mod.cxx: it seems
-	  passthru was not hounourd. Sometimes
+	* .gitignore: added .gitignore
 
-2013-02-07 16:13  sloot
+2015-12-02  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15650] include/frog/mblem_mod.h, src/mblem_mod.cxx: no longer
-	  assign identical lemma's
+	* src/FrogAPI.cxx: small change, makes program logic a bit clearer
 
-2013-01-07 14:59  sloot
+2015-11-30  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15572] include/frog/Frog.h, include/frog/Parser.h,
-	  include/frog/cgn_tagger_mod.h, include/frog/iob_tagger_mod.h,
-	  include/frog/mblem_mod.h, include/frog/mbma_mod.h,
-	  include/frog/mwu_chunker_mod.h, include/frog/ner_tagger_mod.h,
-	  include/frog/ucto_tokenizer_mod.h, src/Frog-util.cxx,
-	  src/Frog.cxx, src/Parser.cxx, src/cgn_tagger_mod.cxx,
-	  src/iob_tagger_mod.cxx, src/mblem_mod.cxx, src/mblem_prog.cxx,
-	  src/mbma_mod.cxx, src/mbma_prog.cxx, src/mwu_chunker_mod.cxx,
-	  src/ner_tagger_mod.cxx, src/ucto_tokenizer_mod.cxx: Bunp year
+	* include/frog/Frog.h, src/mblem_prog.cxx, src/mbma_brackets.cxx,
+	src/mbma_prog.cxx, src/mbma_rule.cxx, src/ner_prog.cxx: fix includes
 
-2013-01-07 12:54  sloot
+2015-11-30  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15562] docs/frog.1: adapted man page
+	* src/ner_tagger_mod.cxx: fixed yet another problem with NER lookup
+	:{
 
-2012-12-19 13:12  sloot
+2015-11-30  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15546] include/frog/Frog.h, src/Frog-util.cxx, src/Frog.cxx:
-	  when handling xml input from a directory, only '.xml' files are
-	  handled
+	* configure.ac, include/frog/iob_tagger_mod.h,
+	include/frog/ner_tagger_mod.h, include/frog/pos_tagger_mod.h,
+	src/FrogAPI.cxx, src/iob_tagger_mod.cxx, src/ner_tagger_mod.cxx,
+	src/pos_tagger_mod.cxx: make sure all taggers use the same EOS
+	marker needs mbt 3.2.14 or higher
 
-2012-12-19 11:46  sloot
+2015-11-29  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15544] docs/frog.1, src/Frog.cxx: added more options to --skip:
-	  a for MBMA and l for MBLEM
+	* src/ner_tagger_mod.cxx: one-off error
 
-2012-12-11 15:37  sloot
+2015-11-29  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15535] src/Frog.cxx, src/cgn_tagger_mod.cxx: improved handling
-	  of some exceptions.
+	* : commit de0cd6826f5f290f471d72434321705379d66518 Author: Ko van
+	der Sloot <K.vanderSloot at let.ru.nl> Date:   Sun Nov 29 18:21:21 2015
+	+0100
 
-2012-12-11 14:27  sloot
+2015-11-25  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15534] include/frog/Parser.h, include/frog/mblem_mod.h,
-	  include/frog/mbma_mod.h, src/Frog.cxx, src/Parser.cxx,
-	  src/mblem_mod.cxx, src/mbma_mod.cxx, src/mwu_chunker_mod.cxx:
-	  attempt to be more robus when multiple POS annotations are
-	  available. MWU is unclear
+	* src/Frog.cxx: shorter grace period
 
-2012-12-05 17:06  sloot
+2015-11-25  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15523] src/cgn_tagger_mod.cxx: added debug line
+	* src/Frog.cxx: added a sigint for correctly shutting the server.
 
-2012-12-05 16:11  sloot
+2015-11-25  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15521] include/frog/Frog.h, src/Frog-util.cxx,
-	  src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx,
-	  src/mblem_mod.cxx, src/mbma_mod.cxx, src/mwu_chunker_mod.cxx,
-	  src/ner_tagger_mod.cxx: add datetime attribute to annotation
-	  definitions
+	* src/mbma_mod.cxx: removed debug lines
 
-2012-11-26 14:58  sloot
+2015-11-25  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15470] src/Frog.cxx, src/mblem_prog.cxx, src/mbma_prog.cxx: the
-	  configuration.set() function is renamed to setatt()
+	* src/FrogAPI.cxx, src/Parser.cxx: plugged 2 small memory leaks
 
-2012-11-21 16:33  sloot
+2015-11-24  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15454] include/frog/Configuration.h, include/frog/Frog.h,
-	  include/frog/Makefile.am, include/frog/Parser.h,
-	  include/frog/cgn_tagger_mod.h, include/frog/iob_tagger_mod.h,
-	  include/frog/mblem_mod.h, include/frog/mbma_mod.h,
-	  include/frog/mwu_chunker_mod.h, include/frog/ner_tagger_mod.h,
-	  include/frog/ucto_tokenizer_mod.h, src/Configuration.cxx,
-	  src/Frog.cxx, src/Makefile.am, src/Parser.cxx, src/mblem_mod.cxx,
-	  src/mblem_prog.cxx, src/mbma_mod.cxx, src/mbma_prog.cxx,
-	  src/ucto_tokenizer_mod.cxx: use Configuration stuff provided by
-	  ticcutils
+	* fink/frog.info: removed old stuff
 
-2012-11-13 11:45  sloot
+2015-11-24  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15422] src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx,
-	  src/ner_tagger_mod.cxx: better handle init errors
+	* README: added links and e-mail
 
-2012-11-12 11:19  sloot
+2015-11-24  Ko van der Sloot <K.vanderSloot at let.ru.nl>
 
-	* [r15415] configure.ac: ARGHG!!!!
+	* README: text update
 
-2012-11-01 16:07  sloot
+2015-11-24  Maarten van Gompel <proycon at anaproy.nl>
 
-	* [r15400] src/cgn_tagger_mod.cxx: REVERSE-SMILEY is a symbol too
+	* README: explicit compile instructions in README
 
-2012-10-31 15:55  sloot
+2015-11-24  Maarten van Gompel <proycon at anaproy.nl>
 
-	* [r15381] src/mbma_mod.cxx: small change in adding Alternative:
-	  now NO id is generated. why should we.
+	* README: added frogdata
 
-2012-10-30 12:37  mvgompel
+2015-11-24  Maarten van Gompel <proycon at anaproy.nl>
 
-	* [r15362] bootstrap: bootstrap fix (matched failed on automake
-	  1.11.6 with Ubuntu 12.10)
+	* COPYING, README: README update
 
-2012-10-29 13:44  sloot
+2015-11-19  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r15345] include/frog/mbma_mod.h, src/mbma_mod.cxx: multiple
-	  morphs must be placed in alternatives
+	* include/frog/mbma_rule.h, src/mbma_mod.cxx, src/mbma_rule.cxx: 
+	added code to experiment with different filters.  default: NOT
+	enabled add POStag information to unanalyzed words in daring mode git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18856
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-10-02 11:56  sloot
+2015-11-18  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r15242] src/Frog.cxx, src/Parser.cxx: adapted to most recent
-	  FoLiA idea's
+	* src/mbma_brackets.cxx: clearer (I hope) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18851
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-09-13 08:19  sloot
+2015-11-18  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r15182] docs/frog.1: added missing info
+	* include/frog/mbma_brackets.h, include/frog/mbma_mod.h,
+	src/mbma_brackets.cxx, src/mbma_mod.cxx: don't add confusing
+	offset's to the morpheme <t> nodes.  This simplifies the code too :) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18850
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-09-12 12:00  sloot
+2015-11-18  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r15176] docs/frog-dp-update.1: not needed anymore
+	* src/mbma_mod.cxx: use the lookup table from the config git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18848
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-09-12 11:03  sloot
+2015-11-18  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r15175] NEWS: news
+	* src/clex.cxx: small edits in names git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18846
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-09-12 11:03  sloot
+2015-11-17  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r15174] src/Frog.cxx: honour the -n option for servermode
-	  (non-XML) too
-	  requires EOT marker at the end of transmission.
+	* include/frog/clex.h, include/frog/mbma_rule.h, src/clex.cxx,
+	src/mbma_rule.cxx: removed the strange (unspecified, and unused)
+	CELEX Y tag, and added code to interpret C tags at position > 1 as a
+	C inflection.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18842
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-08-09 13:16  sloot
+2015-11-16  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r15093] src/Configuration.cxx, src/Frog.cxx, src/Parser.cxx,
-	  src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx,
-	  src/mbma_prog.cxx, src/ner_tagger_mod.cxx: more TiCC utils
+	* src/clex.cxx, src/mbma_brackets.cxx, src/mbma_mod.cxx,
+	src/mbma_rule.cxx: First attempt to replace X noded bu the POS
+	tagger results git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18840
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-08-08 09:22  sloot
+2015-11-16  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r15064] include/frog/Frog.h, include/frog/Parser.h,
-	  include/frog/mblem_mod.h, include/frog/mbma_mod.h,
-	  include/frog/mwu_chunker_mod.h,
-	  include/frog/ucto_tokenizer_mod.h, src/Parser.cxx,
-	  src/mblem_mod.cxx, src/mbma_mod.cxx, src/mwu_chunker_mod.cxx,
-	  src/ucto_tokenizer_mod.cxx: LogStream in TiCC namespace
+	* include/frog/clex.h, src/Frog.cxx, src/clex.cxx,
+	src/mbma_brackets.cxx, src/mbma_mod.cxx, src/mbma_rule.cxx: some
+	cleanup, avoiding code duplication daring output is a movinf target
+	still git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18839
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-08-07 15:58  sloot
+2015-11-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r15055] src/ucto_tokenizer_mod.cxx: smaal edit
+	* src/mbma_brackets.cxx, src/mbma_mod.cxx: implemented more
+	expressive MBMA output in daring mode git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18837
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-08-07 15:48  sloot
+2015-11-11  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r15054] configure.ac, include/frog/Frog.h, src/Frog.cxx,
-	  src/mblem_prog.cxx, src/mbma_prog.cxx: fix
+	* configure.ac: we ned a very recent config! git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18836
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-07-31 12:33  sloot
+2015-11-11  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r15017] include/frog/ucto_tokenizer_mod.h, src/Frog.cxx,
-	  src/ucto_tokenizer_mod.cxx: added a --uttmarker option.
+	* src/mbma_mod.cxx: less verbose, and more usefull, debug git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18835
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-07-23 10:57  sloot
+2015-11-11  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r15002] src/mblem_mod.cxx: removed unneeded dependency
+	* src/mbma_rule.cxx: removed condition. it doesn't seem to matter.
+	FLW git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18834
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-07-12 15:04  sloot
+2015-11-11  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14981] src/Frog.cxx: finshed merging new 'quote' scenario.
+	* src/mblem_mod.cxx: signal unneeded transFile git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18833
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-07-12 15:00  sloot
+2015-11-09  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14980] configure.ac, src/Frog.cxx, src/iob_tagger_mod.cxx,
-	  src/mblem_mod.cxx, src/mbma_mod.cxx: start merging 'quote' branch
+	* include/frog/mbma_mod.h, src/mbma_brackets.cxx, src/mbma_mod.cxx,
+	src/mbma_prog.cxx: add some tag info to daring output.  Still
+	unclear what is desirable git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18821
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-07-09 14:51  sloot
+2015-10-28  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14969] include/frog/mblem_mod.h, include/frog/mbma_mod.h,
-	  src/Frog.cxx, src/Parser.cxx, src/mblem_mod.cxx,
-	  src/mbma_mod.cxx, src/mwu_chunker_mod.cxx: some small refactoring
-	  to get things more in line
+	* .travis.yml: Python was banned :P git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18779
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-07-04 15:02  sloot
+2015-10-27  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14957] include/frog/Parser.h, include/frog/mwu_chunker_mod.h,
-	  src/Frog.cxx, src/Parser.cxx, src/mwu_chunker_mod.cxx: finished
-	  refactoring for now
+	* src/mbma_rule.cxx: removed the special "eer" exception too git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18775
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-07-04 14:38  sloot
+2015-10-23  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14956] include/frog/cgn_tagger_mod.h,
-	  include/frog/iob_tagger_mod.h, include/frog/ner_tagger_mod.h,
-	  src/Frog.cxx, src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx,
-	  src/ner_tagger_mod.cxx: refactoring (not doem yet)
-	  let all modules work on Word * sequences. So abstract form
-	  Sentences a bit.
+	* configure.ac, src/mbma_rule.cxx: removed the "ere" exception,
+	needs FrogData >- 0.8! the "eer" exception is still needed git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18773
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-07-04 13:47  sloot
+2015-10-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14954] src/Frog.cxx: oesp
+	* include/frog/mbma_mod.h: made execute() public git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18769
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-07-04 13:15  sloot
+2015-10-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14952] src/Frog.cxx: oesp. display warning only when need to
+	* include/frog/mbma_brackets.h, include/frog/mbma_mod.h: added
+	namespaced forward declarations.  This allows for including
+	 mbma_mod.h without including other includes (unless stuff is really
+	used of course) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18767
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-07-04 13:08  sloot
+2015-10-20  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14951] src/Frog.cxx: small refactoring. for better
-	  understanding
+	* src/mbma_rule.cxx: another uninitialized value found git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18765
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-07-02 12:21  joostvb
+2015-10-20  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14942] README: ma 02 14:10 < Kobus> less flux tegenwoordig
-	  ma 02 14:10 < Kobus> pre-beta wel
-	  ma 02 14:10 < Kobus> beta
-	  ma 02 14:13 < Kobus> alles wat we wilden zit er nu in, en is
-	  getest
-	  ma 02 14:20 < Kobus> Named Entity Recognition ook
-	  ma 02 14:20 < Kobus> en Chunking
-	  ma 02 14:20 < Kobus> maar prima hoor
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: refactored, to cerate a
+	convenient matchRule function git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18764
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-07-02 12:18  joostvb
+2015-10-20  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14941] README: update blurb on status of this software
+	* include/frog/clex.h, src/clex.cxx: small change git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18763
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-07-02 12:16  joostvb
+2015-10-20  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14940] README: layout, s/de/the/
+	* src/mbma_rule.cxx: avoid unitialized value git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18762
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-06-27 10:24  sloot
+2015-10-19  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14932] docs/Makefile.am, docs/mblem.1, docs/mbma.1: add simple
-	  man pages for mbma and mblem
+	* include/frog/mbma_brackets.h, src/mbma_brackets.cxx: numb change git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18758
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-06-27 10:10  sloot
+2015-10-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14931] src/mbma_mod.cxx: some cleanup, and comment added.
+	* src/mbma_rule.cxx: small update git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18754
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-06-26 15:30  sloot
+2015-10-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14930] src/mbma_mod.cxx: better debug lines
-	  choke on a "PE" tag. Let's see if it ever happens.
+	* src/mbma_rule.cxx: code cleanup git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18753
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-06-26 14:35  sloot
+2015-10-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14929] src/mbma_mod.cxx: better debug info
+	* src/mbma_mod.cxx: some more refactoring git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18752
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-06-26 12:50  sloot
+2015-10-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14928] src/mbma_mod.cxx: clearer code
+	* src/mbma_mod.cxx: some refactoring. use vector::reserve() when
+	possible. Avoid copies.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18751
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-06-26 10:54  sloot
+2015-10-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14927] src/mbma_mod.cxx: reduced debugging lines
+	* .travis.yml: timblserver no longer needed git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18750
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-06-26 09:30  sloot
+2015-10-14  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14925] include/frog/mbma_mod.h, src/mbma_mod.cxx,
-	  src/mbma_prog.cxx: and more refactoring. Things get sorted out a
-	  bit now
+	* configure.ac: cleaned up git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18747
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-06-25 16:26  sloot
+2015-10-14  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14924] include/frog/mbma_mod.h, src/mbma_mod.cxx: more
-	  refactoring
+	* configure.ac, include/frog/FrogAPI.h, src/Frog.cxx: inherit server
+	stuff from ticcutils now git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18744
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-06-25 14:22  sloot
+2015-10-07  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14923] include/frog/mbma_mod.h, src/mbma_mod.cxx: refactoring.
-	  mainly in an attempt to understand what is happening
+	* include/frog/mblem_mod.h, src/mblem_mod.cxx: removed code that
+	didn't do anything usefull git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18720
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-06-21 15:53  sloot
+2015-10-07  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14906] include/frog/mbma_mod.h, src/mbma_mod.cxx: more
-	  refactoring
-	  still convoluted
+	* src/mblem_mod.cxx: typo git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18717
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-06-21 15:22  sloot
+2015-10-07  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14905] src/mbma_mod.cxx: odd
+	* src/mbma_mod.cxx: stable sort git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18716
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-06-21 15:04  sloot
+2015-10-07  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14904] include/frog/mbma_mod.h, src/Frog.cxx,
-	  src/mblem_mod.cxx, src/mbma_mod.cxx, src/mbma_prog.cxx: more
-	  refactoring
+	* src/mbma_rule.cxx: made longer sortkey. sorting is more stable now git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18715
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-06-21 14:26  sloot
+2015-10-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14903] include/frog/mblem_mod.h, src/mblem_mod.cxx,
-	  src/mblem_prog.cxx: oppoetsen
+	* docs/mbma.1: documentation git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18700
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-06-21 13:12  sloot
+2015-10-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14901] include/frog/mblem_mod.h, src/Makefile.am,
-	  src/mblem_mod.cxx, src/mblem_prog.cxx, src/mbma_mod.cxx: added a
-	  mblem main program. Some refactoring done in mblem.
-	  More to do.
+	* src/mbma_prog.cxx: mbma also honours --notagger and --notokenizer git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18699
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-06-21 09:52  sloot
+2015-10-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14900] src/mbma_mod.cxx: fix uninstatiated var
+	* docs/mblem.1, src/mblem_prog.cxx: improved the mblem program. The
+	tokenizer and tagger can be switched off.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18698
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-06-18 14:46  sloot
+2015-10-05  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14883] src/mbma_mod.cxx: removed some code that seems to be
-	  unneeded
+	* src/mblem_prog.cxx: the mblem prog can now run without a tagger
+	(so no tag filterig is possible) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18697
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-06-18 14:28  sloot
+2015-10-05  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14882] include/frog/mbma_mod.h, src/mbma_mod.cxx,
-	  src/mbma_prog.cxx: attempt to clean up further. not so much suc6
-	  as hoped for.
+	* src/mbma_mod.cxx: oesp. a leak git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18695
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-06-18 12:04  sloot
+2015-10-05  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14881] include/frog/mbma_mod.h, src/mbma_mod.cxx: avoid code
-	  duplication
+	* src/pos_tagger_mod.cxx: avoid uninitialized value git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18694
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-06-18 09:27  sloot
+2015-10-05  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14880] src/mbma_prog.cxx: don't spoil outputfile
+	* src/mbma_mod.cxx: hmm. introduced a leak...  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18693
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-06-18 08:38  sloot
+2015-10-05  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14878] src/mbma_mod.cxx: accept fix as correct
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx, src/mbma_prog.cxx: some
+	refactoring git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18692
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-06-14 14:41  sloot
+2015-10-01  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14872] src/Frog.cxx: added --KANON option to geberate canonical
-	  XML output
+	* configure.ac, m4/openmp.m4: uses beter OpenMP check. Might fix
+	problems on travis with clang git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18684
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-05-30 15:05  sloot
+2015-09-30  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14822] configure.ac, src/Makefile.am: another one bites the
-	  dust
+	* include/frog/ckyparser.h, src/ckyparser.cxx, src/csidp.cxx: light
+	refactoring git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18675
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-05-30 14:51  sloot
+2015-09-30  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14821] configure.ac, src/Makefile.am: removed the infamous
-	  AC_DEFINE_DIR macro
+	* include/frog/Parser.h, src/Parser.cxx: some refactoring git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18674
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-05-30 13:35  sloot
+2015-09-30  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14818] include/frog/cgn_tagger_mod.h,
-	  include/frog/ucto_tokenizer_mod.h, src/cgn_tagger_mod.cxx,
-	  src/mbma_prog.cxx, src/ucto_tokenizer_mod.cxx: mbma_prog now used
-	  Ucto and Mbt to analyze the input.
+	* src/csidp.cxx: even more const correctness git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18673
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-05-23 15:54  sloot
+2015-09-30  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14794] src/mbma_prog.cxx: -d works now
+	* src/ckyparser.cxx: small speedups.  using MOVE semantic! git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18672
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-05-23 15:41  sloot
+2015-09-30  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14793] src/Makefile.am, src/mbma_prog.cxx: added a simple mbma
-	  main program.
-	  it just gives al Morphological variants. No POS tags involved!
+	* include/frog/ckyparser.h, src/ckyparser.cxx: const correctness git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18671
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-05-23 12:13  sloot
+2015-09-30  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14792] include/frog/mbma_mod.h, src/mbma_mod.cxx: added a
-	  transliterator which filters all diacritics.
-	  Default is is OFF
-	  use the 'filter_diacritics="yes"' option in de [mbma] section of
-	  frog.cfg to enable this.
+	* src/csidp.cxx: plugged a leak git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18670
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-05-22 14:42  sloot
+2015-09-30  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14782] include/frog/ucto_tokenizer_mod.h, src/Frog.cxx,
-	  src/ucto_tokenizer_mod.cxx: implemented the -Q option (which was
-	  advertized)
+	* include/frog/ckyparser.h, src/ckyparser.cxx, src/csidp.cxx: 
+	simplified git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18669
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-05-22 09:30  sloot
+2015-09-30  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14764] src/mbma_mod.cxx: cleaner debug info
+	* .travis.yml: attempt to fix test git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18668
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-05-21 15:42  sloot
+2015-09-28  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14760] bootstrap, include/frog/mbma_mod.h, src/Makefile.am,
-	  src/mbma_mod.cxx: some rework on mbma_mod. should make fixing a
-	  bit more simple in the future
+	* include/frog/Parser.h, include/frog/csidp.h, src/Parser.cxx,
+	src/csidp.cxx: stripping to yhe bone git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18667
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-05-15 14:21  sloot
+2015-09-28  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14747] src/mbma_mod.cxx: small (tentative) fix
+	* src/Parser.cxx: removed unused function git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18666
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-05-15 08:01  sloot
+2015-09-28  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14746] configure.ac, src/Frog.cxx: Frog now also builds (and
-	  works) without OpenMp support (like in clang)
+	* include/frog/Parser.h, src/FrogAPI.cxx, src/Parser.cxx: more
+	cleanup git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18665
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-05-14 10:59  sloot
+2015-09-28  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14743] include/frog/mbma_mod.h, src/Makefile.am,
-	  src/mbma_mod.cxx: made a start with creating a libfrog. We will
-	  need it to be able to make some useful
-	  functions available to the outer world. (mblem and mbma
-	  functionality, for instance)
-	  Not finished.
+	* src/Frog.cxx: removed git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18664
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-05-08 14:24  sloot
+2015-09-28  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14726] include/frog/mbma_mod.h, src/mbma_mod.cxx: restrict
-	  special handling of 'be' and 'ge' to participles only
+	* src/Frog.cxx: tell the user about removed option git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18662
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-05-08 14:23  sloot
+2015-09-28  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14725] src/mblem_mod.cxx: added heuristic: Don't edit words
-	  when the result is only one character long
+	* include/frog/FrogAPI.h, include/frog/Parser.h,
+	include/frog/csidp.h, src/Frog.cxx, src/FrogAPI.cxx,
+	src/Parser.cxx, src/csidp.cxx: cleanup git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18661
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-04-23 08:08  sloot
+2015-09-28  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14678] src/mblem_mod.cxx: Rvereted change because Maarten
-	  reverted his thoughts
+	* Makefile.am, NEWS, TODO, configure.ac, include/frog/Parser.h,
+	m4/Makefile.am, m4/ac_python_devel.m4, scripts/Makefile.am,
+	scripts/cky.py, scripts/cmdline.py, scripts/common.py,
+	scripts/csidp.py, scripts/csiparse2.py, scripts/deptree.py,
+	scripts/sentences.py, src/Frog.cxx, src/FrogAPI.cxx,
+	src/Makefile.am, src/Parser.cxx: First release in the Frog 0.13
+	series.  Removed all Pythonic stuff git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18660
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-04-21 19:42  antalb
+2015-09-24  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14676] AUTHORS: credit where credit is due
+	* scripts/cky.py, src/ckyparser.cxx: added some debug lines, and
+	commented them out :) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18656
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-04-20 12:13  sloot
+2015-09-24  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14672] src/mblem_mod.cxx: Alternatives need an id
+	* .travis.yml: test fix git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18655
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-04-12 15:20  sloot
+2015-09-24  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14631] src/mblem_mod.cxx: refactoring and cleanup
+	* .travis.yml: frogdata git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18654
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-04-12 14:28  sloot
+2015-09-24  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14630] src/mblem_mod.cxx: added comment
+	* .travis.yml: timblserver git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18653
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-29 09:26  sloot
+2015-09-24  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14590] configure.ac: bump version after release
+	* .travis.yml: oops git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18652
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-29 09:13  sloot
+2015-09-24  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14588] NEWS: updated NEWS for release
+	* src/Parser.cxx: oesp git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18651
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-28 15:03  sloot
+2015-09-24  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14580] NEWS, configure.ac: depend on newer ucto (mostly because
-	  of its config)
+	* .travis.yml: added timbl and mbt dependencies git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18650
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-28 13:38  sloot
+2015-09-24  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14574] src/Frog.cxx, src/tst.sh: adapted to other way of
-	  configuration handling
+	* .travis.yml: added Travis-CI git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18649
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-28 12:26  sloot
+2015-09-24  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14571] DPconfig: remove these too
+	* : props git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18648
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-28 12:25  sloot
+2015-09-24  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14570] Makefile.am, NEWS, config, configure.ac: remove the
-	  config files.
-	  they are to be found in separate frogdata tree
+	* include/frog/Parser.h, include/frog/csidp.h, src/Parser.cxx,
+	src/csidp.cxx: save state.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18646
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-27 09:07  sloot
+2015-09-23  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14525] config/mblem.tree, src/mblem_mod.cxx: enable <alt>
-	  lemmas in mblem
-	  small fix in mblem tree
+	* src/Parser.cxx: next optimalization git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18645
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-22 15:33  sloot
+2015-09-22  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14505] include/frog/mblem_mod.h, src/mblem_mod.cxx: added
-	  possibility to insert alternative lemma's in FoLiA.
-	  disabled atm
+	* include/frog/csidp.h, src/Parser.cxx, src/csidp.cxx: first
+	improvement git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18644
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-22 13:00  sloot
+2015-09-22  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14501] src/mblem_mod.cxx, src/mbma_mod.cxx: added shortcuts for
-	  LET (a la SPEC)
+	* src/csidp.cxx: first small cleanup git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18643
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-22 11:37  sloot
+2015-09-22  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14489] include/frog/cgn_tagger_mod.h, src/cgn_tagger_mod.cxx:
-	  detect more URL-isch stuff. not just URL-WWW
+	* include/frog/FrogAPI.h, include/frog/Parser.h, scripts/cky.py,
+	scripts/csiparse2.py, src/Frog.cxx, src/FrogAPI.cxx,
+	src/Parser.cxx, src/csidp.cxx: first working version of the C++
+	implementation of the parser.  mymics the Python versions and is as
+	slow :) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18642
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-22 09:37  sloot
+2015-09-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14487] config/mblem.transtable, config/mblem.tree,
-	  config/mblem.tree.wgt: updated mblem data. contained a strange
-	  bug
+	* include/frog/ckyparser.h: ai. needed git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18641
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-21 13:41  sloot
+2015-09-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14483] src/mbma_mod.cxx: ok, for now, i stop my attempts to
-	  understand this code
+	* src/ckyparser.cxx, src/csidp.cxx: save current state git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18640
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-21 12:57  sloot
+2015-09-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14482] src/mbma_mod.cxx: modernize
+	* include/frog/ckyparser.h, scripts/cky.py, src/ckyparser.cxx: 
+	updated git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18639
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-21 11:26  sloot
+2015-09-16  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14481] src/Parser.cxx, src/cgn_tagger_mod.cxx,
-	  src/iob_tagger_mod.cxx, src/mblem_mod.cxx, src/mbma_mod.cxx,
-	  src/ner_tagger_mod.cxx: - attempt to avoid irregular crashes,
-	  probably because of MT problems
-	  - cleanup mbma code
+	* src/ckyparser.cxx: and this git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18625
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-21 09:00  sloot
+2015-09-16  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14480] src/mblem_mod.cxx: some clarification
+	* include/frog/Makefile.am, include/frog/ckyparser.h,
+	include/frog/csidp.h: need this too git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18624
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-20 17:01  sloot
+2015-09-16  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14479] src/mblem_mod.cxx: code reshuffling. a bit cleared (to
-	  me) and faster!
+	* scripts/cky.py, scripts/csidp.py, scripts/csiparse2.py,
+	scripts/deptree.py: added and then out-commented debugging lines git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18623
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-19 16:10  sloot
+2015-09-16  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14478] include/frog/cgn_tagger_mod.h,
-	  include/frog/iob_tagger_mod.h, include/frog/mblem_mod.h,
-	  include/frog/mbma_mod.h, include/frog/mwu_chunker_mod.h,
-	  src/Frog.cxx, src/Parser.cxx, src/cgn_tagger_mod.cxx,
-	  src/iob_tagger_mod.cxx, src/mblem_mod.cxx, src/mbma_mod.cxx,
-	  src/mwu_chunker_mod.cxx: cleaned up LibFolia stuff (less generic
-	  pointers, more specific)
+	* src/Makefile.am, src/csidp.cxx: save current work on parser git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18622
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-19 13:25  sloot
+2015-09-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14475] configure.ac: we prefer recent libfolia
+	* src/csidp.cxx: save current work git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18619
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-19 09:28  sloot
+2015-09-14  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14470] DPconfig/frog.cfg, config/small-frog.cfg,
-	  include/frog/mwu_chunker_mod.h, src/mwu_chunker_mod.cxx: removed
-	  unused configuration item
+	* include/frog/Makefile.am, include/frog/csidp.h, scripts/csidp.py,
+	src/Makefile.am, src/Parser.cxx, src/csidp.cxx: added
+	(out-commented) stub for a new CSI parser git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18618
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-13 10:12  sloot
+2015-09-14  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14454] DPconfig/frog.cfg, config/small-frog.cfg: updated config
+	* scripts/csiparse2.py: no debug lines git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18617
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-12 16:41  sloot
+2015-09-14  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14448] src/iob_tagger_mod.cxx: small name change
+	* scripts/csidp.py, scripts/csiparse2.py, scripts/deptree.py,
+	scripts/sentences.py: removed slack (still a lot left) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18616
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-12 16:34  sloot
+2015-09-10  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14447] include/frog/Parser.h, include/frog/cgn_tagger_mod.h,
-	  include/frog/iob_tagger_mod.h, include/frog/mblem_mod.h,
-	  include/frog/mbma_mod.h, include/frog/mwu_chunker_mod.h,
-	  include/frog/ner_tagger_mod.h, src/Frog.cxx, src/Parser.cxx,
-	  src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx,
-	  src/mblem_mod.cxx, src/mbma_mod.cxx, src/mwu_chunker_mod.cxx,
-	  src/ner_tagger_mod.cxx: refactoring: make the tagset names
-	  configurable, and don't let them appear
-	  at manifold places in the code.
+	* src/ner_tagger_mod.cxx: changed the way confidence is calculated
+	for multiword NER's git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18613
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-12 12:02  sloot
+2015-09-10  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14445] NEWS, config/Makefile.am, config/ner.data.settings,
-	  config/small-frog.cfg, tests/tst.ok, tests/tst.txt: fixed config
-	  and install
-	  changed 'make check' test
+	* include/frog/mblem_mod.h, src/mblem_mod.cxx: refactored isSimilar
+	to use a settings file.  doesn't seem to do a lot git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18612
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-08 22:36  antalb
+2015-09-10  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14431] config/ner.data.10paxes,
-	  config/ner.data.known.ddwdwfWawaa,
-	  config/ner.data.known.ddwdwfWawawaa,
-	  config/ner.data.known.ddwdwfWawawaa.wgt, config/ner.data.lex,
-	  config/ner.data.lex.ambi.05, config/ner.data.settings,
-	  config/ner.data.top1000, config/ner.data.top500,
-	  config/ner.data.unknown.chnppddwdwFawawaasss,
-	  config/ner.data.unknown.chnppddwdwFawawasss: updating the
-	  replacement of the NER config files
+	* src/ner_tagger_mod.cxx: extra debug line git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18610
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-08 22:18  antalb
+2015-09-09  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14430] config/ner.data.10paxes, config/ner.data.5paxes,
-	  config/ner.data.known.dddwfWawa,
-	  config/ner.data.known.dddwfWawa.wgt,
-	  config/ner.data.known.ddwdwfWawaa, config/ner.data.lex,
-	  config/ner.data.lex.ambi.05, config/ner.data.settings,
-	  config/ner.data.top1000, config/ner.data.top500,
-	  config/ner.data.unknown.chnppddwFawsss,
-	  config/ner.data.unknown.chnppddwdwFawawasss: replaced first NER
-	  with optimizer (more accurate, slower) NER
+	* src/ner_tagger_mod.cxx: avoid signed vs. unsigned problem git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18608
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-08 14:43  sloot
+2015-09-09  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14426] src/Frog.cxx: small edit
+	* include/frog/ner_tagger_mod.h, src/ner_tagger_mod.cxx: added
+	experimental code to include known NER's git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18607
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-08 10:59  sloot
+2015-09-08  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14422] config/ner.data.known.dddwfWawa,
-	  config/ner.data.known.dddwfWawa.wgt,
-	  config/ner.data.unknown.chnppddwFawsss: retrained with -eEL
+	* include/frog/mblem_mod.h, src/mblem_mod.cxx: Made mblem more
+	generic, using configurable options (a bit clumsy maybe) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18605
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-06 10:49  sloot
+2015-09-08  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14381] NEWS, configure.ac, include/frog/cgn_tagger_mod.h,
-	  include/frog/iob_tagger_mod.h, include/frog/ner_tagger_mod.h,
-	  src/Frog.cxx, src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx,
-	  src/ner_tagger_mod.cxx: using a new MBT API function, code has
-	  become simpler, faster, better!
+	* src/mwu_chunker_mod.cxx: changed comment git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18603
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-01 13:20  sloot
+2015-09-08  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14367] NEWS, src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx,
-	  src/ner_tagger_mod.cxx: fix problem with trailing / in input.
-	  Mbt should provide a better API!
+	* include/frog/mwu_chunker_mod.h, src/mwu_chunker_mod.cxx: now the
+	tag for automagicly building MWU's is configurable git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18602
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-03-01 11:12  sloot
+2015-09-07  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14365] configure.ac: bump version
+	* configure.ac, include/frog/FrogAPI.h, include/frog/Makefile.am,
+	include/frog/cgn_tagger_mod.h, include/frog/pos_tagger_mod.h,
+	src/Makefile.am, src/cgn_tagger_mod.cxx, src/pos_tagger_mod.cxx: 
+	tagger is 2-step now.  a generic POS tagger, followed by a CGN
+	specific PostProcessor needs extra datafile from frogdata >= 0.7! git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18599
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-29 17:02  sloot
+2015-09-03  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14361] NEWS, src/Frog.cxx, tests/tst.ok: argl!
+	* scripts/Makefile.am, scripts/dir.py, scripts/pairs.py,
+	scripts/rels.py: removed unneeded files.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18596
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-29 14:39  sloot
+2015-09-02  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14360] configure.ac: bump version after release
+	* include/frog/mblem_mod.h, src/mblem_mod.cxx: finished first
+	renaming step git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18595
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-29 14:38  sloot
+2015-09-02  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14358] src/tst.sh: oesp. belongs to 0.12.12
+	* include/frog/mwu_chunker_mod.h, src/mwu_chunker_mod.cxx: also
+	clearer name git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18594
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-29 10:07  sloot
+2015-09-02  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14351] src/iob_tagger_mod.cxx, src/mwu_chunker_mod.cxx,
-	  src/ner_tagger_mod.cxx: more OMP attempts
+	* include/frog/Parser.h, src/Parser.cxx: clearer names git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18593
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-29 09:25  sloot
+2015-07-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14350] src/Frog.cxx, src/cgn_tagger_mod.cxx,
-	  src/iob_tagger_mod.cxx, src/mbma_mod.cxx,
-	  src/mwu_chunker_mod.cxx, src/ner_tagger_mod.cxx: rechecked some
-	  OPM stuff. Mayby fixex threading problems now?
+	* src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx,
+	src/ner_tagger_mod.cxx: more MT fixes git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18539
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-28 10:13  sloot
+2015-07-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14346] config/small-frog.cfg: oesp
+	* src/Parser.cxx, src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx,
+	src/mblem_mod.cxx, src/mbma_mod.cxx, src/mwu_chunker_mod.cxx,
+	src/ner_tagger_mod.cxx: added more MT safeguards git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18537
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-27 16:40  sloot
+2015-07-02  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14344] include/frog/Configuration.h, include/frog/Frog.h,
-	  include/frog/Parser.h, src/Configuration.cxx, src/Frog-util.cxx,
-	  src/Frog.cxx, src/Parser.cxx: some cleanup in global variables
+	* include/frog/mbma_brackets.h, src/mbma_rule.cxx: fixed debug
+	output git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18532
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-27 16:02  sloot
+2015-07-02  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14343] NEWS: news
+	* include/frog/mbma_rule.h, src/mbma_rule.cxx: fixed memory leak git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18529
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-27 13:50  mvgompel
+2015-07-02  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14339] src/Frog.cxx: updated -h
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx, src/mbma_rule.cxx: next
+	refactoring step.  Removed one layer of obfuscation datastuctures git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18528
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-23 16:56  sloot
+2015-07-02  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14331] include/frog/ner_tagger_mod.h, src/Frog.cxx,
-	  src/ner_tagger_mod.cxx: some refactoring
+	* src/Frog.cxx, src/FrogAPI.cxx, src/ner_tagger_mod.cxx: added
+	correct exception handling: OpenMP disaproves throwing out of a
+	parallel section git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18527
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-23 16:40  sloot
+2015-07-01  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14330] include/frog/mwu_chunker_mod.h, src/Frog.cxx,
-	  src/Parser.cxx, src/iob_tagger_mod.cxx, src/mwu_chunker_mod.cxx,
-	  src/ner_tagger_mod.cxx: adapted to much stricter libfolia
+	* src/ner_tagger_mod.cxx: spit more info on problems git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18525
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-22 14:53  sloot
+2015-07-01  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14306] DPconfig/frog.cfg, src/Frog.cxx, src/Parser.cxx,
-	  src/cgn_tagger_mod.cxx, src/frog-dp-update,
-	  src/iob_tagger_mod.cxx, src/mblem_mod.cxx, src/mbma_mod.cxx,
-	  src/ner_tagger_mod.cxx: cleaning up in FoLiA stuff
+	* include/frog/mbma_mod.h, include/frog/mbma_rule.h,
+	src/mbma_brackets.cxx, src/mbma_mod.cxx, src/mbma_rule.cxx: getting
+	closer git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18518
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-21 15:48  sloot
+2015-06-29  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14301] config/small-frog.cfg, include/frog/Configuration.h,
-	  src/Configuration.cxx, src/Frog.cxx: We signal sooner if some
-	  config is missing.
+	* include/frog/FrogAPI.h, include/frog/clex.h,
+	include/frog/mbma_mod.h, include/frog/mbma_rule.h, src/clex.cxx,
+	src/mbma_mod.cxx, src/mbma_rule.cxx: ok, some nice stept forward git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18517
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-21 09:37  sloot
+2015-06-29  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14283] src/cgn_tagger_mod.cxx: oesp
+	* include/frog/mbma_mod.h, include/frog/mbma_rule.h,
+	src/mbma_brackets.cxx, src/mbma_mod.cxx: started a new round of
+	refactoring.  we have 3 (or4?) datastructures and are copying too
+	and froo.  let's clear that out git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18516
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-21 08:32  sloot
+2015-06-09  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14282] src/cgn_tagger_mod.cxx: oesp. thread safety first
+	* src/mbma_brackets.cxx: modernized git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18495
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-15 17:49  sloot
+2015-06-08  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14273] src/Frog.cxx: IOB tags were lost.
-	  fixed
+	* src/Frog.cxx, src/cgn_tagger_mod.cxx, src/mblem_mod.cxx: more
+	refactoring git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18494
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-15 17:40  sloot
+2015-05-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14272] configure.ac, src/Frog.cxx: NER now seems to work
+	* src/mbma_brackets.cxx: adapted to new libfolia text() handling git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18433
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-15 13:05  sloot
+2015-04-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14267] config/Frog.mbt.1.0.1paxes,
-	  config/Frog.mbt.1.0.known.dddwfWawa,
-	  config/Frog.mbt.1.0.known.dddwfWawa.wgt, config/Frog.mbt.1.0.lex,
-	  config/Frog.mbt.1.0.lex.ambi.05, config/Frog.mbt.1.0.settings,
-	  config/Frog.mbt.1.0.top500,
-	  config/Frog.mbt.1.0.unknown.chnppdddwFawasss,
-	  config/Frog.mwu.1.0, config/Makefile.am, config/cgntags.main,
-	  config/cgntags.sub, config/chunker.train.10paxes,
-	  config/chunker.train.known.dddwfWawa,
-	  config/chunker.train.known.dddwfWawa.wgt,
-	  config/chunker.train.lex, config/chunker.train.lex.ambi.05,
-	  config/chunker.train.settings, config/chunker.train.top1000,
-	  config/chunker.train.unknown.chnppddwFawsss, config/frog-de.cfg,
-	  config/frog-en.cfg, config/frog-fr.cfg, config/frog-it.cfg,
-	  config/mblem.transtable, config/mblem.tree,
-	  config/mblem.tree.wgt, config/mbma.igtree,
-	  config/mbma.igtree.wgt, config/ner.data.5paxes,
-	  config/ner.data.known.dddwfWawa,
-	  config/ner.data.known.dddwfWawa.wgt, config/ner.data.lex,
-	  config/ner.data.lex.ambi.05, config/ner.data.settings,
-	  config/ner.data.top1000, config/ner.data.unknown.chnppddwFawsss,
-	  config/small-frog.cfg, include/frog/Frog.h,
-	  include/frog/Makefile.am, include/frog/cgn_tagger_mod.h,
-	  include/frog/iob_tagger_mod.h, include/frog/ner_tagger_mod.h,
-	  include/frog/ucto_tokenizer_mod.h, src/Frog.cxx, src/Makefile.am,
-	  src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx,
-	  src/mwu_chunker_mod.cxx, src/ner_tagger_mod.cxx,
-	  src/ucto_tokenizer_mod.cxx: added experimental NER code
+	* configure.ac: oesp git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18337
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-15 10:22  sloot
+2015-04-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14265] src/Frog.cxx: typo
+	* configure.ac: modernized git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18336
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-15 10:14  sloot
+2015-03-23  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14264] src/Frog.cxx: Added a --max-parser-tokens option
+	* src/Makefile.am: fall back to c++0x git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18268
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-13 14:21  sloot
+2015-03-16  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14261] config/Frog.mwu.1.0, configure.ac: dependency changed
-	  modified mwu list
+	* src/mbma_mod.cxx: changed names/labels of tags/inflections. avoid
+	spaces.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18203
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-10 23:49  antalb
+2015-03-16  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14250] config/Frog.mwu.1.0: more cleaning
+	* src/FrogAPI.cxx: fix in daring output git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18201
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-10 23:06  antalb
+2015-03-16  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14249] config/Frog.mwu.1.0: more cleaning!
+	* include/frog/clex.h, src/clex.cxx, src/mbma_brackets.cxx,
+	src/mbma_mod.cxx: re-refactored, because refactoring broke it, as
+	usual git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18200
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-10 22:48  antalb
+2015-03-16  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14248] config/Frog.mwu.1.0: and more cleaning
+	* include/frog/clex.h, include/frog/mbma_mod.h, src/clex.cxx,
+	src/mbma_brackets.cxx, src/mbma_mod.cxx: some refactoring.
+	inflection features are now added to morphems, not pos.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18199
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-10 22:42  antalb
+2015-03-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14247] config/Frog.mwu.1.0: more cleaning
+	* src/mbma_brackets.cxx, src/mbma_mod.cxx: added a very frist
+	primitive compound detection schema.  Higly experimental git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18174
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-10 22:39  antalb
+2015-03-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14246] config/Frog.mwu.1.0: cleansed the Frog.mwu.1.0 config
-	  file
+	* src/FrogAPI.cxx, src/mbma_mod.cxx: improved 'daring'
+	representation in FoLiA, using <feat> nodes.  Not quite ready yet git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18171
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-09 16:23  sloot
+2015-03-10  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14241] configure.ac: bump version after release
+	* src/ner_tagger_mod.cxx: don't add unneeded empty entities nodes git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18163
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-09 15:54  sloot
+2015-03-05  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14239] NEWS, docs/Makefile.am, docs/frog-dp-update.1: added a
-	  manpage
+	* src/mbma_brackets.cxx: removed unclear code. The 'daring' results
+	are hardly worse now.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18146
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-09 15:38  sloot
+2015-03-05  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14238] src/frog-dp-update: OMG
-	  Why!
+	* include/frog/mbma_brackets.h, src/mbma_brackets.cxx,
+	src/mbma_mod.cxx: small refeactoring git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18145
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-09 14:45  sloot
+2015-03-03  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14236] configure.ac: bumped version after release
+	* include/frog/clex.h, include/frog/mbma_brackets.h,
+	src/mbma_brackets.cxx, src/mbma_mod.cxx: added rudimentary Compound
+	Detection to 'daring' mode.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18129
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-09 14:35  sloot
+2015-03-02  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14233] NEWS, src/Makefile.am: last small edits before release
+	* include/frog/clex.h, include/frog/mbma_brackets.h,
+	include/frog/mbma_rule.h, src/clex.cxx, src/mbma_brackets.cxx,
+	src/mbma_rule.cxx, src/ner_prog.cxx: props git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18128
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-09 14:18  sloot
+2015-03-02  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14232] src/Makefile.am, src/frog-dp-update,
-	  src/frog-dp-update.sh: make debianista's happy
+	* include/frog/Makefile.am, include/frog/mbma_brackets.h,
+	include/frog/mbma_mod.h, include/frog/mbma_rule.h, src/Makefile.am,
+	src/mbma_brackets.cxx, src/mbma_mod.cxx, src/mbma_rule.cxx: split
+	mbma in smaller parts for future maintainability git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18127
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-09 13:33  sloot
+2015-02-18  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14231] NEWS, src/iob_tagger_mod.cxx, tests/tst.ok,
-	  tests/tst.txt: fixed ION chunker
+	* src/Frog.cxx, src/FrogAPI.cxx, src/Makefile.am, src/Parser.cxx,
+	src/mblem_mod.cxx, src/mblem_prog.cxx, src/mbma_mod.cxx,
+	src/mbma_prog.cxx, src/mwu_chunker_mod.cxx, src/ner_prog.cxx: 
+	modernizing git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18070
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-08 17:04  sloot
+2015-02-02  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14220] src/iob_tagger_mod.cxx: Ok, fixed some problems.
-	  Code is still ugly
+	* include/frog/ucto_tokenizer_mod.h, src/ner_prog.cxx,
+	src/ucto_tokenizer_mod.cxx: use smarter tokenizeSentenceStream()
+	function now.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18018
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-07 17:10  sloot
+2015-01-29  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14217] src/iob_tagger_mod.cxx: some cleanup. still a bit messy
+	* configure.ac: we depend on the most fancy ucto! git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18016
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-07 16:45  sloot
+2015-01-29  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14216] src/iob_tagger_mod.cxx: added confidence to the IOB
-	  chunks
+	* include/frog/ucto_tokenizer_mod.h, src/ner_prog.cxx,
+	src/ucto_tokenizer_mod.cxx: improved ner program. Now we preocess
+	sentences as expected.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18015
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-07 15:24  sloot
+2015-01-29  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14215] config/chunker.train.known.dddwfWawa,
-	  config/chunker.train.known.dddwfWawa.wgt,
-	  config/chunker.train.unknown.chnppddwFawsss: desperately needed
-	  files
+	* include/frog/ner_tagger_mod.h, src/Makefile.am, src/ner_prog.cxx,
+	src/ner_tagger_mod.cxx: added a simple 'ner' command line tool to
+	tag NER's on files.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18013
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-07 15:18  sloot
+2015-01-29  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14214] config/chunker.train.settings: added +D to enable
-	  confidence calculations
+	* configure.ac: bump git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18011
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-07 14:24  sloot
+2015-01-29  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14213] config/chunker.train.settings, src/cgn_tagger_mod.cxx,
-	  src/iob_tagger_mod.cxx: make the taggers use the debug settings
-	  somewhat better
+	* NEWS, configure.ac: release git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18010
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-07 13:28  sloot
+2015-01-29  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14211] src/Makefile.am: argl
+	* AUTHORS: credits git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18008
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-07 13:24  sloot
+2015-01-29  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14210] NEWS, config/Makefile.am, config/chunker.train.5paxes,
-	  config/chunker.train.known.dddfWaa,
-	  config/chunker.train.known.dddfWaa.wgt, config/chunker.train.lex,
-	  config/chunker.train.lex.ambi.05, config/chunker.train.settings,
-	  config/chunker.train.unknown.chnppddwFasss, src/Frog.cxx: Updated
-	  chunker files
+	* src/FrogAPI.cxx: fixed terrible bug. MWU was not initialized in
+	server mode when mbma was skipped/ git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@18007
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-07 13:04  sloot
+2015-01-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14209] AUTHORS: updated
+	* include/frog/Frog.h, include/frog/FrogAPI.h,
+	include/frog/Parser.h, include/frog/cgn_tagger_mod.h,
+	include/frog/iob_tagger_mod.h, include/frog/mblem_mod.h,
+	include/frog/mbma_mod.h, include/frog/mwu_chunker_mod.h,
+	include/frog/ner_tagger_mod.h, include/frog/ucto_tokenizer_mod.h,
+	src/Frog-util.cxx, src/Frog.cxx, src/FrogAPI.cxx, src/Parser.cxx,
+	src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx, src/mblem_mod.cxx,
+	src/mblem_prog.cxx, src/mbma_mod.cxx, src/mbma_prog.cxx,
+	src/mwu_chunker_mod.cxx, src/ner_tagger_mod.cxx,
+	src/ucto_tokenizer_mod.cxx: 2015 git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17992
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-07 12:43  sloot
+2014-12-02  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14208] src/Makefile.am, src/frog-dp-update.sh,
-	  src/frog-update.sh: renamed the script
+	* src/Frog.cxx: typo git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17899
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-07 11:27  sloot
+2014-12-02  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14207] src/frog-update.sh: small improvement
+	* docs/frog.1: fixed hyphens according to
+	/usr/share/doc/groff-base/README.Debian git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17898
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-07 10:56  sloot
+2014-11-28  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14206] src/Makefile.am, src/frog-update.sh: added a frog-update
-	  script that downloads and install the dependency parser files.
-	  Bit experimental still
+	* configure.ac: Changing behaviour of --with-python, point to the
+	executable directly rather than the directory containing a python
+	executable (python may be called python2 on some systems) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17877
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-07 09:22  sloot
+2014-11-27  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14205] DPconfig/README, src/Frog.cxx, src/iob_tagger_mod.cxx:
-	  make frog tell it's config dir.
-	  adapted README
+	* configure.ac: reverted good ICU checking to bad checking because
+	there are too many old distributions around. And OSX screws up
+	anyway.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17875
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-06 21:14  antalb
+2014-11-18  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14204] DPconfig/README: edited the README
+	* src/Frog.cxx: removed debug line git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17829
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-06 15:51  sloot
+2014-11-18  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14203] configure.ac: bumped version after release
+	* src/Frog.cxx: fixed a bug and an oops git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17828
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-06 15:50  sloot
+2014-11-13  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14200] NEWS, src/tst.sh: ouch. forgotten to check in
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: simplified (using
+	smarter addMorphologLayer()) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17822
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-06 14:55  sloot
+2014-11-11  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14198] config/Makefile.am, config/frog.cfg,
-	  config/small-frog.cfg, src/Frog.cxx: attempt to make it smart.
-	  frog installs together with small-frog.cfg.
-	  Whenever a frog.cfg is installed, or otherwise added, that will
-	  take precedence.
+	* configure.ac, include/frog/mblem_mod.h, src/mblem_mod.cxx: use
+	smarter addPosAnnotation git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17809
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-06 14:38  sloot
+2014-10-20  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14197] src/Frog.cxx: fix
+	* src/Frog.cxx: oeps2 git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17750
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-06 14:37  sloot
+2014-10-20  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14196] DPconfig/README: better
+	* src/FrogAPI.cxx: oesp git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17749
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-06 13:15  sloot
+2014-10-20  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14194] DPconfig/Frog.mbdp.1.0.dir.ibase,
-	  DPconfig/Frog.mbdp.1.0.dir.ibase.wgt,
-	  DPconfig/Frog.mbdp.1.0.pairs.sampled.ibase,
-	  DPconfig/Frog.mbdp.1.0.pairs.sampled.ibase.wgt,
-	  DPconfig/Frog.mbdp.1.0.rels.ibase,
-	  DPconfig/Frog.mbdp.1.0.rels.ibase.wgt, DPconfig/README,
-	  DPconfig/frog.cfg: added a README
-	  set keywords
+	* configure.ac: macro fix git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17747
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-06 11:46  sloot
+2014-10-19  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14193] DPconfig/frog.cfg: added a frog.cfg which includes the
-	  parser
+	* configure.ac: added compiler fallback git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17738
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-06 11:03  sloot
+2014-09-25  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14192] DPconfig, DPconfig/Frog.mbdp.1.0.dir.ibase,
-	  DPconfig/Frog.mbdp.1.0.dir.ibase.wgt,
-	  DPconfig/Frog.mbdp.1.0.pairs.sampled.ibase,
-	  DPconfig/Frog.mbdp.1.0.pairs.sampled.ibase.wgt,
-	  DPconfig/Frog.mbdp.1.0.rels.ibase,
-	  DPconfig/Frog.mbdp.1.0.rels.ibase.wgt,
-	  config/Frog.mbdp.1.0.dir.ibase,
-	  config/Frog.mbdp.1.0.dir.ibase.wgt,
-	  config/Frog.mbdp.1.0.pairs.sampled.ibase,
-	  config/Frog.mbdp.1.0.pairs.sampled.ibase.wgt,
-	  config/Frog.mbdp.1.0.rels.ibase,
-	  config/Frog.mbdp.1.0.rels.ibase.wgt, config/Makefile.am,
-	  config/frog.cfg: moved DP files to own dir.
-	  No longer install or package those files.
+	* src/FrogAPI.cxx: aiaiaiaiaia git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17715
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-06 11:02  sloot
+2014-09-25  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14191] src/Configuration.cxx, src/Frog.cxx: Frog now checks if
-	  the Dependency Parser is installed. If not:
-	  require --skip=p.
+	* include/frog/Parser.h, src/FrogAPI.cxx, src/Parser.cxx,
+	src/iob_tagger_mod.cxx: fixed FoLiA input for IOB and Parser too git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17714
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-02 16:26  sloot
+2014-09-25  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14179] src/Frog.cxx: renamed variables to make things more
-	  clear
+	* include/frog/mblem_mod.h, include/frog/mbma_mod.h,
+	src/FrogAPI.cxx, src/mbma_mod.cxx: mblem en mbla now also work on
+	FoLiA with existing lemma's and morphemes (in a different set, of
+	course) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17713
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-02 16:01  sloot
+2014-09-25  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14178] src/Frog.cxx: beetje beter
+	* src/mblem_mod.cxx: catch trouble early git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17712
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-02 15:44  sloot
+2014-09-23  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14177] src/Frog.cxx: More refactoring get rid of some of the
-	  zillion Test*() functions
+	* src/FrogAPI.cxx, src/mblem_mod.cxx, src/mbma_mod.cxx: last minute
+	fix and layout improvements git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17708
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-02 14:50  sloot
+2014-09-23  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14176] src/Frog.cxx: more cleanup
+	* NEWS, configure.ac: bumping git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17705
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-02 14:26  sloot
+2014-09-18  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14175] include/frog/Frog.h, src/Frog.cxx: some code cleanup
+	* src/FrogAPI.cxx: signal problems with num_threads git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17683
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-02 11:35  sloot
+2014-09-16  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14173] tests/tst.ok: now make distcheck works again
+	* NEWS: updated NEWS git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17673
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-01 10:35  sloot
+2014-09-16  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14170] config/chunker.train.settings: made the iob chunker a
-	  bit less verbose
+	* include/frog/Frog.h, include/frog/FrogAPI.h, src/Frog.cxx,
+	src/FrogAPI.cxx: moved the default configfile name to the API git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17672
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-01 10:28  sloot
+2014-09-16  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14169] src/Frog.cxx: cleaner layout of timing info
+	* include/frog/FrogAPI.h, src/Frog.cxx, src/FrogAPI.cxx: refactoring
+	and renaming! git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17671
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-02-01 09:46  sloot
+2014-09-16  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14167] src/Frog.cxx: the server now can handle FoLia in AND out
-	  (using -x -X)
-	  documents must be separated by an empty line.
-	  two empty lines will stop the thread.
-	  Code is a bit messy still (cough)
+	* include/frog/FrogAPI.h, src/FrogAPI.cxx: refactoring the API. step
+	2 git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17670
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-31 16:15  sloot
+2014-09-16  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14165] src/Frog.cxx: added mbma declaration
+	* src/FrogAPI.cxx: small refactoring. more to come...  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17668
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-31 15:47  sloot
+2014-09-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14163] docs/frog.1, src/Frog.cxx: fixed man page
-	  fixed proycons fix so that FoLiA handling is correct more often
+	* include/frog/FrogAPI.h, src/FrogAPI.cxx, src/mblem_prog.cxx,
+	src/mbma_prog.cxx: svn tags git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17665
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-31 15:21  mvgompel
+2014-09-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14160] src/Frog.cxx, src/cgn_tagger_mod.cxx, src/mblem_mod.cxx:
-	  Added FoLiA declaration stuff with references to set URLs that
-	  can be filled later.
+	* src/FrogAPI.cxx: Copyright text added git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17664
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-31 14:27  mvgompel
+2014-09-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14158] include/frog/ucto_tokenizer_mod.h: oops
+	* include/frog/FrogAPI.h, src/FrogAPI.cxx: attempt to help Maarten git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17663
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-31 14:20  mvgompel
+2014-09-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14157] src/Frog.cxx, src/ucto_tokenizer_mod.cxx: added support
-	  for FoLiA document IDs using id==
+	* include/frog/ucto_tokenizer_mod.h, src/FrogAPI.cxx,
+	src/ucto_tokenizer_mod.cxx: cleaner? git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17661
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-31 13:29  sloot
+2014-09-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14156] configure.ac: attempt to fix --prefix stuff
+	* src/FrogAPI.cxx: leak git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17660
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-31 11:48  sloot
+2014-09-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14155] NEWS: updated the NEWS
+	* include/frog/FrogAPI.h, src/FrogAPI.cxx: hacking along git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17659
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-31 11:12  sloot
+2014-09-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14150] src/Frog.cxx, src/cgn_tagger_mod.cxx: fixed problem with
-	  tags containing //
-	  updated usage()
+	* src/Frog-util.cxx, src/mblem_prog.cxx, src/mbma_mod.cxx,
+	src/mbma_prog.cxx: refactoring and cleaning up git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17658
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-31 11:11  sloot
+2014-09-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14149] docs/frog.1: updated man page
+	* include/frog/Frog.h: comment changed git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17657
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-30 14:18  sloot
+2014-09-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14143] src/Frog.cxx: added IOB tags to 'tabbed' output.
-	  complaints welcome
+	* src/mblem_prog.cxx: modernized git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17656
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-30 11:41  sloot
+2014-09-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14133] include/frog/cgn_tagger_mod.h, src/cgn_tagger_mod.cxx:
-	  get debug handling in line with other modules
+	* include/frog/FrogAPI.h, include/frog/ucto_tokenizer_mod.h,
+	src/Frog.cxx, src/FrogAPI.cxx, src/mblem_prog.cxx,
+	src/mbma_prog.cxx, src/ucto_tokenizer_mod.cxx: - refactoring the API.  - ucto_tokenizer has the same init() as all other modules now.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17655
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-30 10:55  sloot
+2014-09-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14131] config/frog.cfg, include/frog/iob_tagger_mod.h,
-	  src/iob_tagger_mod.cxx: fixed I wtthout B problem.
+	* src/Frog.cxx, src/FrogAPI.cxx: better git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17653
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-30 09:35  sloot
+2014-09-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14129] src/Frog.cxx: IOB tagging is enabled per default now.
-	  disable with --skip=i
+	* include/frog/FrogAPI.h, src/Frog.cxx, src/FrogAPI.cxx: refactoring
+	the API. Not done yet git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17652
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-30 09:30  sloot
+2014-09-13  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14128] config/Makefile.am: new config
+	* src/FrogAPI.cxx, src/cgn_tagger_mod.cxx, src/ner_tagger_mod.cxx: 
+	debug value wasn't always initialised to 0 prior to processing
+	config git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17650
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-30 09:25  sloot
+2014-09-13  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14127] config/chunker.train.5paxes,
-	  config/chunker.train.known.dddfWaa,
-	  config/chunker.train.known.dddfWaa.wgt,
-	  config/chunker.train.known.dwdwdwfWawaw,
-	  config/chunker.train.settings,
-	  config/chunker.train.unknown.chnppddwFasss,
-	  config/chunker.train.unknown.dwdwdwppsssFawaw: smaller and faster
-	  chunker files
+	* include/frog/FrogAPI.h, src/FrogAPI.cxx: moved "frogging in total
+	took" inside !hidetimer block..  (for some mysterious reason
+	something stumbles over it).. Also renamed string Test to
+	Testtostring() git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17649
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-26 15:52  sloot
+2014-09-13  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14121] src/Frog.cxx, src/iob_tagger_mod.cxx: IOB only when
-	  --skip=i (sic!)
-	  removed debug lines
+	* include/frog/FrogAPI.h, include/frog/ucto_tokenizer_mod.h,
+	src/FrogAPI.cxx, src/ucto_tokenizer_mod.cxx: updates needed for
+	python-frog binding git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17647
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-26 15:22  sloot
+2014-09-12  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14120] config/Makefile.am, config/chunker.train.10paxes,
-	  config/chunker.train.known.dwdwdwfWawaw,
-	  config/chunker.train.lex, config/chunker.train.lex.ambi.05,
-	  config/chunker.train.settings, config/chunker.train.top1000,
-	  config/chunker.train.unknown.dwdwdwppsssFawaw, config/frog.cfg,
-	  include/frog/Frog.h, include/frog/iob_tagger_mod.h, src/Frog.cxx,
-	  src/iob_tagger_mod.cxx: added IOB chunker (experimental)
+	* src/ucto_tokenizer_mod.cxx: typo git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17646
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-26 13:24  sloot
+2014-09-09  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14117] src/Frog.cxx: fix. folia::Document doesn't have a
-	  working copy/assignment operator
+	* src/Frog.cxx: modernized commandline handling git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17634
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-26 13:04  sloot
+2014-09-09  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14115] src/Frog.cxx: -x options works for server too
+	* src/FrogAPI.cxx: added line that was lost somewhere in Maartens
+	refactoring process git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17633
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-26 11:00  sloot
+2014-09-09  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14114] src/Frog.cxx, src/ucto_tokenizer_mod.cxx: refactored
-	  commandline options stuff a bit. It is way too complicated now.
-	  please rethink!
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: fixed a memory leak.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17630
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-25 17:12  sloot
+2014-09-08  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14111] include/frog/ucto_tokenizer_mod.h, src/Frog.cxx,
-	  src/ucto_tokenizer_mod.cxx: added a '-x' option to parse Folia
-	  input
+	* include/frog/FrogAPI.h, src/Frog.cxx, src/FrogAPI.cxx,
+	src/mblem_mod.cxx: more cleanup, refactoring and a potential memory
+	leak git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17627
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-25 15:38  sloot
+2014-09-08  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14110] include/frog/Makefile.am, include/frog/iob_tagger_mod.h,
-	  src/Frog.cxx, src/Makefile.am, src/iob_tagger_mod.cxx: added iob
-	  stuff, and removed ner garbage
+	* include/frog/FrogAPI.h, src/Frog.cxx, src/FrogAPI.cxx: some
+	refactoring: avoid copies of configuration, pass more consts (and
+	references) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17626
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-25 15:11  sloot
+2014-09-08  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14108] include/frog/ucto_tokenizer_mod.h, src/Frog.cxx,
-	  src/mblem_mod.cxx, src/ucto_tokenizer_mod.cxx: small improvements
+	* include/frog/FrogAPI.h, src/FrogAPI.cxx: moved 'real' code from .h
+	to .cxx file git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17625
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-25 13:31  sloot
+2014-09-08  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14107] config/frog.cfg, include/frog/Frog.h,
-	  include/frog/Makefile.am, include/frog/cgn_tagger_mod.h,
-	  include/frog/mblem_mod.h, include/frog/mbma_mod.h,
-	  include/frog/mwu_chunker_mod.h,
-	  include/frog/ucto_tokenizer_mod.h, src/Frog.cxx, src/Makefile.am,
-	  src/cgn_tagger_mod.cxx, src/mblem_mod.cxx, src/mbma_mod.cxx,
-	  src/mwu_chunker_mod.cxx, src/ucto_tokenizer_mod.cxx: finally!
-	  sorted out most of the logging hassle.
-	  every module has it own Logstream with own id
-	  No more mixup when running in parallel. (ahum: one problem left)
+	* include/frog/FrogAPI.h, src/FrogAPI.cxx: Added a Test() variant
+	that returns a string (to be used for the python binding) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17623
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-24 09:27  sloot
+2014-09-08  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14105] include/frog/ucto_tokenizer_mod.h,
-	  src/ucto_tokenizer_mod.cxx: get more in line with other modules
+	* include/frog/ucto_tokenizer_mod.h, src/ucto_tokenizer_mod.cxx: 
+	added tokenizestring() method git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17619
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-24 08:58  sloot
+2014-09-07  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14104] include/frog/Makefile.am, include/frog/cgn_tagger_mod.h,
-	  include/frog/mbma_mod.h, include/frog/ucto_tokenizer_mod.h,
-	  src/Frog.cxx, src/Makefile.am, src/cgn_tagger_mod.cxx,
-	  src/ucto_tokenizer_mod.cxx: moved most tokenizer stuff to one
-	  "module". Bit more cleansing to do
-	  renamed MBTagger class to CGNTagger class
+	* include/frog/Frog.h, include/frog/FrogAPI.h,
+	include/frog/Makefile.am, include/frog/Parser.h,
+	include/frog/cgn_tagger_mod.h, include/frog/iob_tagger_mod.h,
+	include/frog/mblem_mod.h, include/frog/mbma_mod.h,
+	include/frog/mwu_chunker_mod.h, include/frog/ner_tagger_mod.h,
+	include/frog/ucto_tokenizer_mod.h, src/Frog-util.cxx, src/Frog.cxx,
+	src/FrogAPI.cxx, src/Makefile.am, src/Parser.cxx,
+	src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx, src/mblem_mod.cxx,
+	src/mblem_prog.cxx, src/mbma_mod.cxx, src/mbma_prog.cxx,
+	src/mwu_chunker_mod.cxx, src/ner_tagger_mod.cxx,
+	src/ucto_tokenizer_mod.cxx: Major Frog refactoring: Added FrogAPI,
+	exposing a Frog API for public use. Frog.cxx is sized down and uses
+	FrogAPI. Also weeded out most of the global variables (=evil) and
+	increased modularity. Everything seems to work, but more extensive
+	testing is recommended.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17616
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-23 10:15  sloot
+2014-09-07  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14093] configure.ac, m4/ax_icu_check.m4: rather desperate
-	  attempt to make configure work on Mac
+	* include/frog/Frog.h, src/Frog.cxx: fix git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17614
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-19 11:59  sloot
+2014-09-07  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14092] NEWS, src/Frog.cxx: removed useless (I hope...) loop
+	* include/frog/Frog.h, src/Frog.cxx: Refactoring Frog interface so I
+	can use it as an external library later: added declarations to
+	Frog.h, introduced FrogOptions class to hold the various options
+	(rather than global variables) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17613
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-19 10:31  sloot
+2014-08-25  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r14091] NEWS, src/Frog.cxx: argh!!!!
+	* configure.ac, src/Frog.cxx: use ticcutils 0,6 git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17552
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-12 16:47  sloot
+2014-08-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13990] frog.spec: was moved to Timbl-dev
+	* src/Frog.cxx: mark options with optional arguments.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17545
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-12 15:09  sloot
+2014-08-18  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13986] src/Frog.cxx: small improvement
+	* src/Frog.cxx: Include Python.h first! see:
+	https://docs.python.org/2/c-api/intro.html#includes "Note Since Python may define some pre-processor definitions which affect
+	the standard headers on some systems, you must include Python.h
+	before any standard headers are included" git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17527
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-12 14:57  sloot
+2014-08-14  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13985] configure.ac: bumped version after Release
+	* src/Frog.cxx: next attempt :{ git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17519
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-12 14:57  sloot
+2014-08-14  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13983] src/Frog.cxx: last minute fix
+	* src/Frog.cxx: attempt to handle missing readline() stuff better.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17518
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-12 13:51  sloot
+2014-08-07  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13981] NEWS: typo
+	* src/Parser.cxx: fixed xml:id for dependencies git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17489
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-11 14:55  sloot
+2014-08-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13963] NEWS: updated
+	* src/iob_tagger_mod.cxx: added xml:id to Chunks too git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17487
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-11 14:49  sloot
+2014-08-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13962] src/Frog.cxx: split a long function into two
+	* src/mwu_chunker_mod.cxx, src/ner_tagger_mod.cxx: added xml:id to
+	Enteties and Entity git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17486
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-11 14:36  mvgompel
+2014-08-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13961] src/Frog.cxx: moved omp_set_threads to main
+	* src/cgn_tagger_mod.cxx: map EMOTICONS ro SPEC(symb) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17485
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-11 14:23  mvgompel
+2014-08-05  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13959] src/Frog.cxx: No parallelisation in server mode (would
-	  fork on each snippet, too expensive)
+	* configure.ac: make sure libxml2 is there git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17474
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-11 14:03  mvgompel
+2014-07-16  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13957] src/Frog.cxx: different timer behaviour in server mode
+	* src/mbma_mod.cxx: added debug lines to examine "eer" and "ere"
+	exceptions git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17460
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-11 10:44  sloot
+2014-07-16  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13948] include/frog/mbma_mod.h, src/Frog.cxx,
-	  src/mblem_mod.cxx, src/mbma_mod.cxx: added more openMp directives
-	  to avoid race problems
+	* src/Frog.cxx: better handling of -d and --debug= remove last \n on
+	interactive use git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17459
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-10 17:43  sloot
+2014-07-10  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13946] configure.ac, src/Frog.cxx: cleaned up configure.
-	  Detected a small problem in the fly...
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: don't apply rules that
+	don't apply :) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17440
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-10 15:32  sloot
+2014-07-09  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13938] configure.ac: Bumped version after Release
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: some more refactoring git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17439
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-10 12:03  sloot
+2014-07-09  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13924] configure.ac: forgotten to Bump :{
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: made debugging easier git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17438
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-10 11:51  sloot
+2014-07-09  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13923] NEWS: updated NEWS
+	* src/Frog.cxx: added an commandline option to switch debugging per
+	module on/off git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17437
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-09 11:41  sloot
+2014-07-09  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13913] NEWS, src/Frog-util.cxx: bug fix
+	* include/frog/Frog.h, src/Makefile.am, src/cgn_tagger_mod.cxx,
+	src/iob_tagger_mod.cxx, src/mblem_mod.cxx, src/mblem_prog.cxx,
+	src/mbma_mod.cxx, src/mbma_prog.cxx, src/mwu_chunker_mod.cxx,
+	src/ner_tagger_mod.cxx, src/ucto_tokenizer_mod.cxx: some refactoring
+	to get rid of some global symbols.  debug level set using the
+	configurartin file now.  compile with -std=c++0x. Supports 'long
+	long'.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17436
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-06 16:03  mvgompel
+2014-07-07  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13898] src/cgn_tagger_mod.cxx: typo: refl1 -> refl
+	* src/mbma_mod.cxx: fixed 2 more daring problems git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17425
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-05 11:16  sloot
+2014-07-07  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13879] NEWS, src/Parser.cxx: added pid to intermediate files
+	* src/mbma_mod.cxx: fixed problem with daring bracketing. still
+	shaky git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17424
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-02 13:47  sloot
+2014-07-03  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13840] README, include/frog/Configuration.h,
-	  include/frog/Frog.h, include/frog/Parser.h,
-	  include/frog/cgn_tagger_mod.h, include/frog/mblem_mod.h,
-	  include/frog/mbma_mod.h, include/frog/mwu_chunker_mod.h,
-	  src/Configuration.cxx, src/Frog-util.cxx, src/Frog.cxx,
-	  src/Parser.cxx, src/cgn_tagger_mod.cxx, src/mblem_mod.cxx,
-	  src/mbma_mod.cxx, src/mwu_chunker_mod.cxx: It is 2012!
+	* src/mbma_mod.cxx: oeps. debugging was on git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17421
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2012-01-02 13:31  sloot
+2014-07-03  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13839] NEWS, src/Frog.cxx: small fix for GNU/Hurd
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: avoid empty brackets
+	(as creacted by 'pseudo-regiseur') git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17420
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-12-22 11:30  sloot
+2014-07-03  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13782] src/Frog-util.cxx: fixed small memoryleak
+	* src/Frog.cxx: pass debug option to the gobal config git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17419
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-12-22 10:51  sloot
+2014-06-24  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13780] docs/frog.1: updated man page
+	* src/Frog.cxx, src/mblem_mod.cxx: fixed LIBREADLINE include
+	problem.  Python.h sets HAVE_LIBREADLINE unconditionally git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17379
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-12-22 10:42  sloot
+2014-06-19  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13779] src/Frog.cxx: added a --xmldir option. Modified -o and
-	  -X options.
-	  Now you can frog a whole dir (--testdir option) and save
-	  the output in one dir (--outputdir option) and the FoLiA
-	  XML in another dir (--xmldir option)
+	* src/mbma_mod.cxx: small hack to satisfy the compiler git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17366
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-12-21 14:50  mvgompel
+2014-06-17  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13769] src/Frog.cxx: die on failure to bind to port
+	* src/Frog.cxx, src/iob_tagger_mod.cxx: produce XML even on empty
+	file git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17358
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-12-21 14:31  sloot
+2014-06-11  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13768] configure.ac: bump version after release
+	* src/tst.sh: re-re-refiexed make distcheck git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17334
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-12-21 14:12  sloot
+2014-06-11  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13766] configure.ac: grmbl
+	* NEWS, src/Frog.cxx: fixed interactive mode NEWS! git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17333
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-12-21 13:52  sloot
+2014-06-04  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13765] src/Frog.cxx, src/Parser.cxx, tests/tst.ok: small
-	  cleanup
-	  fixed 'make check'
+	* src/mbma_mod.cxx: small fix for 'ge' prefix git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17286
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-12-21 12:07  sloot
+2014-06-02  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13763] src/Parser.cxx, src/mblem_mod.cxx, src/mbma_mod.cxx,
-	  src/mwu_chunker_mod.cxx: cleaned up some namespace mess
+	* src/mbma_mod.cxx: no debug lines please git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17273
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-12-15 16:49  sloot
+2014-06-02  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13710] src/Parser.cxx: ok. last desparate attempt.
-	  It seems to work now
+	* src/mbma_mod.cxx: bug fix git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17272
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-12-15 15:29  sloot
+2014-06-02  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13709] src/Parser.cxx: use an other way off setting the import
-	  path.
-	  Now frog can also find .py files in the
-	  /usr/lib/pymodules/python2.x
-	  directory that the debian installer uses
+	* configure.ac, src/Frog.cxx: added readline support git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17271
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-12-13 14:39  sloot
+2014-06-02  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13685] include/frog/mwu_chunker_mod.h, src/mwu_chunker_mod.cxx:
-	  fixed a leak
+	* src/mbma_mod.cxx: avoit creation of empty nodes when --daring
+	still very ugly code git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17270
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-12-13 13:15  sloot
+2014-05-28  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13683] include/frog/mwu_chunker_mod.h, src/Frog.cxx,
-	  src/mwu_chunker_mod.cxx: mwu cleanup
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: added more heuristic
+	hackery to improve bracketing.  Als fixed a bug that made mbma loop
+	on some words git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17269
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-12-13 10:33  sloot
+2014-05-27  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13679] src/Frog.cxx, src/Parser.cxx, src/cgn_tagger_mod.cxx,
-	  src/mblem_mod.cxx, src/mbma_mod.cxx, src/mwu_chunker_mod.cxx:
-	  reshuffled again to use POS tags with head attribute
+	* src/mbma_mod.cxx: fix for nonDaring git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17267
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-12-12 16:07  sloot
+2014-05-27  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13672] src/Frog.cxx, src/Parser.cxx, src/mbma_mod.cxx: attempt
-	  to make multithreading a bit more reliable
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: when daring, reduce the
+	failing morphemes git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17266
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-12-08 10:52  sloot
+2014-05-26  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13661] src/Frog.cxx, src/Parser.cxx, src/mblem_mod.cxx,
-	  src/mbma_mod.cxx, src/mwu_chunker_mod.cxx: adapted to changing
-	  libfolia API
+	* src/Frog.cxx: oesp git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17252
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-12-06 16:44  sloot
+2014-05-08  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13653] src/Frog.cxx, src/Parser.cxx, src/cgn_tagger_mod.cxx,
-	  src/mwu_chunker_mod.cxx: libfolia API change!
+	* src/Frog.cxx: removed debug line git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17220
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-12-06 15:14  sloot
+2014-05-08  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13649] configure.ac, include/frog/Parser.h,
-	  include/frog/cgn_tagger_mod.h, include/frog/mblem_mod.h,
-	  include/frog/mbma_mod.h, include/frog/mwu_chunker_mod.h,
-	  src/Frog.cxx, src/Parser.cxx, src/cgn_tagger_mod.cxx,
-	  src/mblem_mod.cxx, src/mbma_mod.cxx, src/mwu_chunker_mod.cxx:
-	  adapted to change in libfolia: AbstractElement ==> FoliaElement
+	* src/Frog.cxx: fix git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17219
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-12-06 14:24  sloot
+2014-05-01  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13642] src/cgn_tagger_mod.cxx: cgn tag ==> subset translations
-	  in a tabel now.
-	  Should be a configuration file of course
+	* src/Frog.cxx, src/mbma_mod.cxx: failed nodes are labeled as such
+	in Morphemes git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17195
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-12-06 11:24  sloot
+2014-05-01  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13641] src/mbma_mod.cxx: more cleanup
+	* src/Frog.cxx: Frog can now run interactive too! git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17191
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-12-06 11:08  sloot
+2014-05-01  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13640] include/frog/mbma_mod.h, src/mbma_mod.cxx: more cleanup
+	* src/Frog.cxx: -o option now also works for multiple files -t may
+	be left out, allowing multiple inputfiles git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17190
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-12-06 10:07  sloot
+2014-05-01  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13635] include/frog/cgn_tagger_mod.h,
-	  include/frog/mwu_chunker_mod.h, src/Frog.cxx,
-	  src/cgn_tagger_mod.cxx, src/mwu_chunker_mod.cxx: more
-	  folianizing.
-	  folia classes E-MAIL and WWW-URL ==> SPEC(symb)
+	* src/Frog.cxx: attempt to clean up the logic a bit git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17189
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-12-06 08:53  sloot
+2014-04-30  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13634] include/frog/mblem_mod.h, src/Frog.cxx,
-	  src/mblem_mod.cxx: more cleanup, more folia
+	* src/Frog.cxx: start using CL_Options from libticcutils git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17187
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-12-06 08:13  sloot
+2014-04-30  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13633] src/Frog.cxx: added -X option to save results in FoLiA
-	  XML format.
+	* src/tst.sh: prop set git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17179
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-12-05 16:43  sloot
+2014-04-30  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13631] src/cgn_tagger_mod.cxx, src/mblem_mod.cxx: use ucto tags
-	  SMILEY and KNOWN-ABBREVIATION to modify the POS tags to SPEC()
+	* src/tst.sh: numb change git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17178
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-12-05 15:40  sloot
+2014-04-30  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13629] include/frog/mbma_mod.h, src/Frog.cxx, src/Parser.cxx,
-	  src/cgn_tagger_mod.cxx, src/mbma_mod.cxx: Tagger result is now
-	  split into separate <feat> nodes
-	  SPEC() always gets confidence 1.0
+	* src/Makefile.am, src/tst.sh: fixed 'make check' git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17176
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-11-29 10:03  sloot
+2014-04-30  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13617] src/mblem_mod.cxx: small cleanup
+	* tests/tst.ok: modified testresult git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17167
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-11-28 15:41  sloot
+2014-04-30  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13614] include/frog/Makefile.am, include/frog/cgn_tagger_mod.h,
-	  include/frog/tagger_mod.h, src/Frog.cxx, src/Makefile.am,
-	  src/cgn_tagger_mod.cxx, src/tagger_mod.cxx: renamed tagger+mod to
-	  cgn_tagger_mod
+	* Makefile.am: fixed 'make dist' git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17166
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-11-24 16:44  sloot
+2014-04-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13578] include/frog/mwu_chunker_mod.h, src/mwu_chunker_mod.cxx:
-	  more cleaning done
+	* src/mbma_mod.cxx: fixed bracketed morphmes (missing description) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17124
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-11-24 16:25  sloot
+2014-03-18  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13577] include/frog/mwu_chunker_mod.h, src/mwu_chunker_mod.cxx:
-	  ok, new cleaning attempt
+	* Makefile.am, configure.ac, frog.pc.in, src/mbma_mod.cxx: better
+	sanity check.  create a frog.pc git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17046
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-11-24 15:53  sloot
+2014-03-18  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13576] include/frog/tagger_mod.h, src/Frog.cxx,
-	  src/tagger_mod.cxx: move a lot code from main progrtam to tagger
-	  module
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx, src/mbma_prog.cxx: 
+	added --daring mode to the mbma program too git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17043
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-11-24 15:31  sloot
+2014-03-17  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13575] include/frog/mblem_mod.h, include/frog/mbma_mod.h,
-	  include/frog/mwu_chunker_mod.h, src/Frog.cxx, src/mblem_mod.cxx,
-	  src/mbma_mod.cxx, src/mwu_chunker_mod.cxx: more cleanup
+	* src/Frog.cxx, src/mbma_mod.cxx: when doDaring, the Frog output
+	shows NESTED brackets now.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17037
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-11-24 14:13  sloot
+2014-03-17  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13573] include/frog/mwu_chunker_mod.h, src/mwu_chunker_mod.cxx:
-	  reverted to old mwu module.
-	  something was broken. rethinking later…
+	* src/mbma_mod.cxx: oesp. Debugging off please! git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17036
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-11-24 13:22  sloot
+2014-03-17  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13572] include/frog/tagger_mod.h, src/tagger_mod.cxx: we need
-	  thes too, then
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: modified morpheme
+	output in Daring mode git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17035
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-11-24 13:21  sloot
+2014-03-13  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13571] include/frog/Makefile.am, src/Frog.cxx, src/Makefile.am:
-	  started to implement a tagger module.
-	  should make adding another one more easy
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: a lot of refactoring to
+	avoid memory leaks git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17033
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-11-24 10:03  sloot
+2014-03-13  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13570] include/frog/mwu_chunker_mod.h, src/mwu_chunker_mod.cxx:
-	  this realy cleans up
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: CLEX tag is own  Folia
+	tagset git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17032
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-11-23 11:46  sloot
+2014-03-13  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13563] include/frog/mwu_chunker_mod.h, src/mwu_chunker_mod.cxx:
-	  cleanup
+	* configure.ac: we need most recent libfolia! git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17031
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-11-23 11:26  sloot
+2014-03-13  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13562] include/frog/Parser.h, include/frog/mwu_chunker_mod.h,
-	  src/Parser.cxx, src/mwu_chunker_mod.cxx: cleanup continues
+	* include/frog/mbma_mod.h, src/Frog.cxx, src/mbma_mod.cxx: added a
+	--daring mode to frog this enables nested morphological analysis git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17029
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-11-22 16:37  sloot
+2014-03-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13561] include/frog/mwu_chunker_mod.h, src/Frog.cxx,
-	  src/mwu_chunker_mod.cxx: next cleanup step
-	  lot to do still!
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: more refactoring git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17026
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-11-22 13:51  sloot
+2014-03-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13560] include/frog/FrogData.h, include/frog/Makefile.am,
-	  include/frog/Parser.h, src/Frog.cxx, src/FrogData.cxx,
-	  src/Makefile.am, src/Parser.cxx: first cleanup step
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: al lot of refactoring
+	concering bracketing git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17023
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-11-22 13:38  sloot
+2014-03-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13559] include/frog/Parser.h, src/Frog.cxx, src/Parser.cxx: now
-	  we are able to handle all based on a FoLiA document.
-	  Next step: a lot of cleaning
+	* src/mbma_mod.cxx: ok, nice cleanup git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17022
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-11-17 16:36  sloot
+2014-03-11  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13557] src/Parser.cxx: The parser now sort-of adds dependencies
-	  to the FoLia doc.
-	  MWU' will fail
+	* src/mbma_mod.cxx: save state.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17021
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-11-15 16:28  sloot
+2014-03-11  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13549] include/frog/Parser.h, src/Frog.cxx, src/FrogData.cxx,
-	  src/Parser.cxx: started to modify the parser wrapper for FoLiA
-	  usage.
-	  Almost works, but needs libfolia extensions that Maarten forgot
+	* src/mbma_mod.cxx: removed some slack git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17020
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-11-14 16:26  sloot
+2014-03-11  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13547] include/frog/mwu_chunker_mod.h, src/Frog.cxx,
-	  src/mblem_mod.cxx, src/mbma_mod.cxx, src/mwu_chunker_mod.cxx:
-	  alles tot de parser werkt nu "folia-based".
-	  Parser nog niet!!!!
-	  Alles is nog wel wat houterig.
+	* src/mbma_mod.cxx: save current state of the art git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17019
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-11-10 14:36  sloot
+2014-03-11  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13537] include/frog/Frog.h, include/frog/mblem_mod.h,
-	  include/frog/mbma_mod.h, src, src/Frog-util.cxx, src/Frog.cxx,
-	  src/mblem_mod.cxx, src/mbma_mod.cxx, src/tst.sh, tests,
-	  tests/Makefile.am, tests/test.txt, tests/tst.ok, tests/tst.txt:
-	  this version builds a FoLiA tree in parallel with the normal
-	  processing.
-	  This is not finished yet, and slows down processing too.
-	  The output is still "old style" and seems to be OK still.
-	  The produced FoLiA doc is dumped at the end for informational
-	  purposes.
-	  
-	  Do not upgrade to this version please!
+	* src/mbma_mod.cxx: save current state of work on Bracketing git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17018
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-11-03 15:57  sloot
+2014-03-04  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13516] Makefile.am, configure.ac, src/Frog.cxx,
-	  src/Makefile.am, src/tst.sh, test.txt, tests, tests/Makefile.am,
-	  tests/test.txt, tests/tst.ok: added a 'make check' / 'make
-	  distcheck' target
-	  Frog now works with both Mbt 3.2.6 and higer versions
+	* src/mbma_mod.cxx: save current work on brackets (not called) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@17001
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-11-03 09:33  sloot
+2014-02-27  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13513] NEWS, configure.ac, include/frog/Frog.h, src/Frog.cxx,
-	  src/mblem_mod.cxx, src/mbma_mod.cxx: merged with the foliabased
-	  branch. folia rulezzzz
+	* src/mbma_mod.cxx: save experimental and buggy work on mbma
+	barcketing. (not called) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16990
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-10-25 13:06  sloot
+2014-02-05  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13460] NEWS: NEWS was not updated for a while. what's new?
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: save new Bracketing
+	stuff (disabled yet) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16927
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-10-24 14:23  sloot
+2014-02-05  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13450] configure.ac: seems to work well with older Mbt too
+	* src/mbma_mod.cxx: save current status.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16924
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-08-31 15:13  sloot
+2014-02-03  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13056] config/Frog.mbt.1.0.settings, configure.ac,
-	  src/Frog.cxx: fixed a problem in the settings.
-	  Depends on new Mbt because we us +vcf to call the tagger
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: save current status git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16910
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-08-31 09:36  sloot
+2014-01-28  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13045] docs/frog.1, src/Frog.cxx: made -V (and --version)
-	  consistent
+	* src/Frog.cxx: use new TimblServer stuff git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16884
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-08-31 08:17  sloot
+2014-01-27  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r13038] configure.ac: Bumped version after release
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: more cleanup and
+	comment added git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16877
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-08-23 13:22  sloot
+2014-01-23  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r12954] include/frog/Frog.h, src/Frog.cxx: numb change
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: more cleanup git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16875
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-08-23 12:36  sloot
+2014-01-23  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r12952] configure.ac: bumped version after release
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: cleanup and refactoring git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16874
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-08-23 12:33  sloot
+2014-01-23  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r12951] NEWS: release!
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: save current state.
+	Still messy and t bug-to-bug compatible git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16872
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-08-23 12:13  sloot
+2014-01-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r12948] config/.cvsignore, include/.cvsignore,
-	  include/frog/.cvsignore, src/.cvsignore: soem remains form the
-	  past removed
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: cleanup git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16867
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-08-23 10:29  sloot
+2014-01-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r12944] NEWS, docs/frog.1: NEWS
-	  man page update
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: save current work git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16866
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-08-23 10:25  sloot
+2014-01-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r12943] src/Frog.cxx: reversed -Q behaviour
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: save current state.
+	getting closer...  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16865
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-08-22 14:08  sloot
+2014-01-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r12933] configure.ac: lower version of ucto works too
+	* include/frog/mbma_mod.h, src/Frog.cxx, src/mbma_mod.cxx: save
+	intermediate result this seesm to work git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16861
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-08-22 13:30  sloot
+2014-01-16  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r12929] configure.ac, src/Frog.cxx: adapted to changed ucto API.
-	  Now the correct ucto config is used (I hope)
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: save work on new
+	implementation git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16860
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-06-08 14:25  sloot
+2014-01-16  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r10463] src/Frog.cxx: oesp
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: more refactoring git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16859
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-06-08 14:19  sloot
+2014-01-16  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r10462] src/Frog.cxx: Use the same Tagger commandline arguments
-	  both for Server and Normal mode!
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: again some refactoring
+	in the process of getiing it alright git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16858
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-06-08 13:57  mvgompel
+2014-01-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r10460] src/Frog.cxx: added option to disable quote detection in
-	  tokeniser
+	* include/frog/Frog.h, include/frog/Parser.h,
+	include/frog/cgn_tagger_mod.h, include/frog/iob_tagger_mod.h,
+	include/frog/mblem_mod.h, include/frog/mbma_mod.h,
+	include/frog/mwu_chunker_mod.h, include/frog/ner_tagger_mod.h,
+	include/frog/ucto_tokenizer_mod.h, src/Frog-util.cxx, src/Frog.cxx,
+	src/Parser.cxx, src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx,
+	src/mblem_mod.cxx, src/mblem_prog.cxx, src/mbma_mod.cxx,
+	src/mbma_prog.cxx, src/mwu_chunker_mod.cxx, src/ner_tagger_mod.cxx,
+	src/ucto_tokenizer_mod.cxx: Happy Newyear! git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16815
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-05-23 10:50  sloot
+2013-12-11  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r10161] src/Frog.cxx: zo beter Maarten?
+	* src/mbma_mod.cxx: changed warning in something less disturbing.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16760
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-05-12 13:26  sloot
+2013-12-11  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r9905] NEWS: news
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: small refactoring, in
+	the process of better understanding git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16759
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-05-12 13:23  sloot
+2013-10-24  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r9904] src/mwu_chunker_mod.cxx: avoid scientific notation
+	* src/mbma_mod.cxx, src/ucto_tokenizer_mod.cxx: make '-pedantic'
+	happy git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16645
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-05-12 12:50  sloot
+2013-10-24  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r9902] config/Frog.mbt.1.0.settings, configure.ac,
-	  include/frog/mwu_chunker_mod.h, src/Frog.cxx,
-	  src/mwu_chunker_mod.cxx: added a confidence column. Needs the
-	  latest and greatest Timbl and Mbt.
+	* include/frog/Parser.h: disabled the last Py_XDECREF() call in the
+	program.  In some cases is crashes. Don't know why, Don't now when.
+	It shouldn't matter a lot, because we already terminate Frog.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16643
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-05-12 10:16  antalb
+2013-10-17  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r9882] config/Frog.mbt.1.0.known.dddwfWawa,
-	  config/Frog.mbt.1.0.settings: updated the Frog MBT known ibase
-	  with class distributions (+D)
+	* bootstrap, bootstrap.sh, configure.ac: modernized git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16619
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-05-11 14:32  sloot
+2013-10-02  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r9865] src/Frog.cxx: even for PassThru we want tokenizer config
-	  to be present. We are going to use ucto anyway.
-	  Als make sure to set the tokenizer debug level.
+	* src/Frog.cxx: be more verbose in exception git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16551
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-05-11 13:22  sloot
+2013-08-22  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r9864] config/Makefile.am, config/tokconfig-de,
-	  config/tokconfig-en, config/tokconfig-fr, config/tokconfig-it,
-	  config/tokconfig-nl: No longer install and maintain ucto files
-	  here!
-	  Don't install non-dutch stuff. It is incomplete.
+	* src/mbma_mod.cxx: numb refeactoring git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16483
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-04-27 16:49  mvgompel
+2013-08-20  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r9731] configure.ac: version bump after release
+	* src/mbma_mod.cxx: readded hack git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16481
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-04-27 16:37  mvgompel
+2013-08-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r9728] NEWS, configure.ac, src/Frog.cxx: moved nasty sentence
-	  per line patch away, support now in ucto itself
+	* src/Frog.cxx: some emptyness removed :) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16439
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-04-19 14:53  mvgompel
+2013-08-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r9588] configure.ac: version update for next round
+	* AUTHORS: credits added git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16438
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-04-19 14:52  mvgompel
+2013-08-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r9587] NEWS: news update
+	* src/Frog.cxx: be more picky on commandline errors git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16437
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-04-19 14:38  mvgompel
+2013-08-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r9585] src/Frog.cxx: Fixed max buffer size problem (a bit
-	  patchy, but ok)
+	* src/Frog.cxx: typo git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16436
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-04-18 14:19  sloot
+2013-08-08  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r9558] configure.ac: bumped version after release
+	* src/mbma_mod.cxx: disable the gross hach for now git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16422
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-04-18 13:41  sloot
+2013-08-08  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r9556] configure.ac, src/Frog.cxx: ok. for now we do not want to
-	  introduce dependencies on very recent packages.
-	  removed some code and lowered our expectations
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: fix Unicode problem.
+	improved debug logging added a gross hack while inserting/deleting.
+	It works sort off git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16421
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-04-18 13:05  sloot
+2013-08-08  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r9554] NEWS, include/frog/mblem_mod.h, include/frog/mbma_mod.h,
-	  include/frog/mwu_chunker_mod.h, src/Frog.cxx, src/mblem_mod.cxx,
-	  src/mbma_mod.cxx, src/mwu_chunker_mod.cxx: check the init()
-	  functions for failures and stop execution on errors.
+	* src/mbma_prog.cxx: fix git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16420
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-04-07 13:07  sloot
+2013-08-08  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r9331] src/Frog.cxx: Use TimblServer as include
+	* src/ucto_tokenizer_mod.cxx: make sure to make a fresh start for
+	every 'line' git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16419
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-04-07 10:23  sloot
+2013-07-31  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r9319] configure.ac, src/Frog.cxx: now we announe are partners.
-	  Needs the most recent versions of ucto, timbl, timblserver and
-	  mbt
+	* src/mbma_mod.cxx: probably we want PN == N...  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16403
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-31 12:35  sloot
+2013-07-30  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r9241] leapfrogged
+	* src/Frog.cxx: small improvement in debugging git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16399
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-31 12:30  sloot
+2013-06-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r9237] changed debugging a bit
+	* src/mblem_mod.cxx: only strip suffixes from SPEC(deeleigen). Not
+	from SPEC(vreemd) etc.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16232
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-29 14:52  sloot
+2013-06-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r9217] default is NO debug.
+	* src/mblem_mod.cxx: removed debug line git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16228
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-29 12:40  sloot
+2013-06-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r9216] when the [mblem] transFile option is empty (or missing),
-	  mblem no longer translates the tags.
-	  Only useful when mble is als trained without translations.
+	* src/mblem_mod.cxx: Fix suffixes for SPEC(deeleigen) tags git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16227
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-29 12:29  sloot
+2013-06-10  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r9214] Bumped version after release
-	  props set
+	* src/mblem_mod.cxx: small fix git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16221
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-24 10:51  sloot
+2013-06-10  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r9114] reverted to previous version
+	* src/mbma_mod.cxx: some refactoring.  Als fixing a bug in code that
+	is not used atm :) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16220
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-24 10:44  sloot
+2013-06-10  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r9113] reverted to old version
+	* src/mblem_mod.cxx: improved debugging (avoid output mangling) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16217
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-23 10:58  sloot
+2013-06-10  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r9085] this one too
+	* src/mbma_mod.cxx, src/mbma_prog.cxx: be a bit more picky about
+	lowercasing all words.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16216
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-23 10:57  sloot
+2013-06-04  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r9084] more decapping
+	* src/mblem_mod.cxx, src/mbma_mod.cxx: better debug info git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16170
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-22 16:35  antalb
+2013-06-03  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r9054] new mbma data
+	* include/frog/Frog.h, include/frog/cgn_tagger_mod.h,
+	include/frog/mblem_mod.h, include/frog/mbma_mod.h,
+	src/Frog-util.cxx, src/cgn_tagger_mod.cxx, src/mblem_mod.cxx,
+	src/mbma_mod.cxx: added configurable character filters to CGN
+	tagger, MBLEM annd MBMA git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@16164
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-22 13:28  sloot
+2013-04-09  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r9038] make sure pthreads are used
+	* configure.ac, src/Frog.cxx: added support for BZ2 and GZ files
+	(XML input and output only) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15973
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-21 16:06  sloot
+2013-04-04  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r9002] arghhh
+	* configure.ac: Bump version after release git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15948
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-21 13:09  sloot
+2013-04-04  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8998] decapped
+	* docs/Makefile.am: oesp! git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15946
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-20 14:38  joostvb
+2013-04-03  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8983] typo
+	* src/Makefile.am: increment library version git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15926
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-20 14:37  joostvb
+2013-04-03  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8982] new upstream, new homepage, versioned build-depends
+	* include/frog/Frog.h, include/frog/ucto_tokenizer_mod.h,
+	src/Frog.cxx, src/Parser.cxx, src/cgn_tagger_mod.cxx,
+	src/iob_tagger_mod.cxx, src/mblem_mod.cxx, src/mblem_prog.cxx,
+	src/mbma_mod.cxx, src/mbma_prog.cxx, src/mwu_chunker_mod.cxx,
+	src/ner_tagger_mod.cxx: changed folia include path! git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15912
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-20 10:44  joostvb
+2013-04-03  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8979] ship better 0.11.1
+	* NEWS, configure.ac: NEWS git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15906
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-20 10:42  joostvb
+2013-04-02  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8978] add Frog.1 .so link: consistent with name of binary
+	* configure.ac: we need the most recent ticcutils git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15886
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-20 10:13  joostvb
+2013-04-02  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8977] record changes
+	* include/frog/Frog.h, include/frog/mwu_chunker_mod.h,
+	include/frog/ucto_tokenizer_mod.h, src/Frog.cxx, src/Parser.cxx,
+	src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx, src/mblem_mod.cxx,
+	src/mblem_prog.cxx, src/mbma_mod.cxx, src/mbma_prog.cxx,
+	src/mwu_chunker_mod.cxx, src/ner_tagger_mod.cxx: adapted to changed
+	folia include path git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15877
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-17 09:32  sloot
+2013-04-02  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8897] bumped version
-	  depends on newer ucto (i think)
+	* include/frog/Frog.h, src/Frog.cxx, src/Parser.cxx: Timer class was
+	moved to ticcutils git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15857
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-16 16:00  sloot
+2013-03-28  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8890] cleaned up Parser Python meuck
+	* src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx,
+	src/ner_tagger_mod.cxx: some stuff is moved from libfolia to
+	ticcutils git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15847
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-16 15:37  sloot
+2013-03-28  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8881] For now python stuff is fixed
-	  we can do better I think
+	* src/Frog.cxx, src/Parser.cxx, src/mblem_mod.cxx,
+	src/mblem_prog.cxx, src/mbma_mod.cxx, src/mbma_prog.cxx,
+	src/mwu_chunker_mod.cxx, src/ucto_tokenizer_mod.cxx: adapted to
+	changed ticcutils git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15833
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-16 13:47  sloot
+2013-03-28  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8878] almost -pedantic proof.
-	  Python stuff complains about "warning: ISO C++ 1998 does not
-	  support ‘long long’"
+	* docs/frog.1, src/Frog.cxx: added a --threads option, so we can
+	limit the number of theads now.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15826
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-16 13:08  sloot
+2013-03-25  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8873] updated the NEWS
+	* src/cgn_tagger_mod.cxx: replace SPEC() tags by LET() when the
+	tokenizer thinks that its PUNCTUAION git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15812
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-16 13:03  sloot
+2013-03-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8872] make some compilers happy
+	* src/Frog.cxx: fixed program logic git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15770
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-15 16:35  sloot
+2013-03-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8870] geen debug=10 in SVN svp
+	* docs/frog.1, include/frog/ucto_tokenizer_mod.h, src/Frog.cxx,
+	src/ucto_tokenizer_mod.cxx: added a textclass option for the
+	tokenizer git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15767
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-15 16:33  sloot
+2013-02-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8869] propset
-	  use ICU toLower instead of homegrown decap
+	* NEWS, configure.ac, src/ucto_tokenizer_mod.cxx: it seems passthru
+	was not hounourd. Sometimes git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15694
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-15 15:52  sloot
+2013-02-07  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8866] decap all words, independent from tag
-	  when tag==SPEC() ignore mblem and mbma results
+	* include/frog/mblem_mod.h, src/mblem_mod.cxx: no longer assign
+	identical lemma's git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15650
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-15 14:50  antalb
+2013-01-07  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8865] perhaps, maybe, hopefully fixed the "weesten" issue
+	* include/frog/Frog.h, include/frog/Parser.h,
+	include/frog/cgn_tagger_mod.h, include/frog/iob_tagger_mod.h,
+	include/frog/mblem_mod.h, include/frog/mbma_mod.h,
+	include/frog/mwu_chunker_mod.h, include/frog/ner_tagger_mod.h,
+	include/frog/ucto_tokenizer_mod.h, src/Frog-util.cxx, src/Frog.cxx,
+	src/Parser.cxx, src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx,
+	src/mblem_mod.cxx, src/mblem_prog.cxx, src/mbma_mod.cxx,
+	src/mbma_prog.cxx, src/mwu_chunker_mod.cxx, src/ner_tagger_mod.cxx,
+	src/ucto_tokenizer_mod.cxx: Bunp year git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15572
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-14 17:49  antalb
+2013-01-07  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8857] let's hope this tree file reverts to the correct encoding
-	  situation
+	* docs/frog.1: adapted man page git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15562
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-14 15:38  antalb
+2012-12-19  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8856] fixed "emmen" and "vrienden" errors
+	* include/frog/Frog.h, src/Frog-util.cxx, src/Frog.cxx: when
+	handling xml input from a directory, only '.xml' files are handled git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15546
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-14 11:26  sloot
+2012-12-19  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8845] satisfy the compiler
+	* docs/frog.1, src/Frog.cxx: added more options to --skip: a for
+	MBMA and l for MBLEM git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15544
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-14 08:57  sloot
+2012-12-11  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8835] smaal edit
+	* src/Frog.cxx, src/cgn_tagger_mod.cxx: improved handling of some
+	exceptions.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15535
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-12 20:09  joostvb
+2012-12-11  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8820] new upstream, new homepage
+	* include/frog/Parser.h, include/frog/mblem_mod.h,
+	include/frog/mbma_mod.h, src/Frog.cxx, src/Parser.cxx,
+	src/mblem_mod.cxx, src/mbma_mod.cxx, src/mwu_chunker_mod.cxx: 
+	attempt to be more robus when multiple POS annotations are
+	available. MWU is unclear git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15534
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-09 16:02  sloot
+2012-12-05  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8760] removed unwanted options
+	* src/cgn_tagger_mod.cxx: added debug line git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15523
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-09 15:48  sloot
+2012-12-05  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8759] more detagging )
+	* include/frog/Frog.h, src/Frog-util.cxx, src/cgn_tagger_mod.cxx,
+	src/iob_tagger_mod.cxx, src/mblem_mod.cxx, src/mbma_mod.cxx,
+	src/mwu_chunker_mod.cxx, src/ner_tagger_mod.cxx: add datetime
+	attribute to annotation definitions git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15521
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-09 14:37  sloot
+2012-11-26  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8758] start to 'untag' mblem
+	* src/Frog.cxx, src/mblem_prog.cxx, src/mbma_prog.cxx: the
+	configuration.set() function is renamed to setatt() git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15470
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-09 14:22  sloot
+2012-11-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8757] made mbma classify independant from tagger result.
-	  pre and postprocessing still needs that
+	* include/frog/Configuration.h, include/frog/Frog.h,
+	include/frog/Makefile.am, include/frog/Parser.h,
+	include/frog/cgn_tagger_mod.h, include/frog/iob_tagger_mod.h,
+	include/frog/mblem_mod.h, include/frog/mbma_mod.h,
+	include/frog/mwu_chunker_mod.h, include/frog/ner_tagger_mod.h,
+	include/frog/ucto_tokenizer_mod.h, src/Configuration.cxx,
+	src/Frog.cxx, src/Makefile.am, src/Parser.cxx, src/mblem_mod.cxx,
+	src/mblem_prog.cxx, src/mbma_mod.cxx, src/mbma_prog.cxx,
+	src/ucto_tokenizer_mod.cxx: use Configuration stuff provided by
+	ticcutils git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15454
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-09 13:56  sloot
+2012-11-13  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8756] more cleanup
+	* src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx,
+	src/ner_tagger_mod.cxx: better handle init errors git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15422
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-09 13:40  sloot
+2012-11-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8755] cleanup.
-	  removed inconvenient options like --vtok --stok.
-	  disables paragraph detection, because it lead to strange results
-	  in tokenizer.getSentenceString()
+	* configure.ac: ARGHG!!!! git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15415
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-08 10:53  sloot
+2012-11-01  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8743] added a man page
+	* src/cgn_tagger_mod.cxx: REVERSE-SMILEY is a symbol too git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15400
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-04 13:08  mvgompel
+2012-10-31  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8686] added logo
+	* src/mbma_mod.cxx: small change in adding Alternative: now NO id is
+	generated. why should we.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15381
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-01 14:00  sloot
+2012-10-30  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8638] bumped version. seemed a nice moment for 0.11
+	* bootstrap: bootstrap fix (matched failed on automake 1.11.6 with
+	Ubuntu 12.10) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15362
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-03-01 13:39  sloot
+2012-10-29  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8635] We need the most recent ucto!
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: multiple morphs must be
+	placed in alternatives git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15345
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-28 17:25  mvgompel
+2012-10-02  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8630] when using testdir, ignore hidden files (dotfiles)
+	* src/Frog.cxx, src/Parser.cxx: adapted to most recent FoLiA idea's git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15242
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-28 16:13  mvgompel
+2012-09-13  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8626] sentence per line on input side
+	* docs/frog.1: added missing info git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15182
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-28 15:54  mvgompel
+2012-09-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8625] fix
+	* docs/frog-dp-update.1: not needed anymore git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15176
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-28 15:53  mvgompel
+2012-09-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8624] prettier help output
+	* NEWS: news git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15175
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-28 15:49  mvgompel
+2012-09-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8623] newline
+	* src/Frog.cxx: honour the -n option for servermode (non-XML) too
+	requires EOT marker at the end of transmission.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15174
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-28 15:47  sloot
+2012-08-09  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8621] now bootstrap works
+	* src/Configuration.cxx, src/Frog.cxx, src/Parser.cxx,
+	src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx, src/mbma_prog.cxx,
+	src/ner_tagger_mod.cxx: more TiCC utils git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15093
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-27 17:08  joostvb
+2012-08-08  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8598] ship it
+	* include/frog/Frog.h, include/frog/Parser.h,
+	include/frog/mblem_mod.h, include/frog/mbma_mod.h,
+	include/frog/mwu_chunker_mod.h, include/frog/ucto_tokenizer_mod.h,
+	src/Parser.cxx, src/mblem_mod.cxx, src/mbma_mod.cxx,
+	src/mwu_chunker_mod.cxx, src/ucto_tokenizer_mod.cxx: LogStream in
+	TiCC namespace git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15064
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-27 16:53  joostvb
+2012-08-07  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8597] files
+	* src/ucto_tokenizer_mod.cxx: smaal edit git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15055
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-27 16:02  joostvb
+2012-08-07  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8596] it just might compile
+	* configure.ac, include/frog/Frog.h, src/Frog.cxx,
+	src/mblem_prog.cxx, src/mbma_prog.cxx: fix git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15054
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-27 15:58  joostvb
+2012-07-31  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8595] initial shot at frog rpm
+	* include/frog/ucto_tokenizer_mod.h, src/Frog.cxx,
+	src/ucto_tokenizer_mod.cxx: added a --uttmarker option.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15017
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-27 12:26  joostvb
+2012-07-23  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8589] make sure tmp installpath not encoded in .pyc files
+	* src/mblem_mod.cxx: removed unneeded dependency git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@15002
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-27 12:07  joostvb
+2012-07-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8588] restart 0.10.4
+	* src/Frog.cxx: finshed merging new 'quote' scenario.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14981
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-27 12:06  joostvb
+2012-07-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8587] upstream rerelease
+	* configure.ac, src/Frog.cxx, src/iob_tagger_mod.cxx,
+	src/mblem_mod.cxx, src/mbma_mod.cxx: start merging 'quote' branch git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14980
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-27 12:01  joostvb
+2012-07-09  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8586] ship a better 0.10.3
+	* include/frog/mblem_mod.h, include/frog/mbma_mod.h, src/Frog.cxx,
+	src/Parser.cxx, src/mblem_mod.cxx, src/mbma_mod.cxx,
+	src/mwu_chunker_mod.cxx: some small refactoring to get things more
+	in line git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14969
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-27 11:59  joostvb
+2012-07-04  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8585] install scripts, data and util pythoncode in separate
-	  dirs.
+	* include/frog/Parser.h, include/frog/mwu_chunker_mod.h,
+	src/Frog.cxx, src/Parser.cxx, src/mwu_chunker_mod.cxx: finished
+	refactoring for now git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14957
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-27 11:40  joostvb
+2012-07-04  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8584]
+	* include/frog/cgn_tagger_mod.h, include/frog/iob_tagger_mod.h,
+	include/frog/ner_tagger_mod.h, src/Frog.cxx,
+	src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx,
+	src/ner_tagger_mod.cxx: refactoring (not doem yet) let all modules
+	work on Word * sequences. So abstract form Sentences a bit.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14956
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-27 11:38  joostvb
+2012-07-04  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8583] new upstream
+	* src/Frog.cxx: oesp git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14954
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-27 11:38  joostvb
+2012-07-04  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8582] start 0.10.4, tags
+	* src/Frog.cxx: oesp. display warning only when need to git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14952
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-27 11:28  joostvb
+2012-07-04  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8581] ship it: 0.10.3
+	* src/Frog.cxx: small refactoring. for better understanding git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14951
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-27 11:24  joostvb
+2012-07-02  joostvb <joostvb at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8580] tags
+	* README: ma 02 14:10 < Kobus> less flux tegenwoordig ma 02 14:10 <
+	Kobus> pre-beta wel ma 02 14:10 < Kobus> beta ma 02 14:13 < Kobus>
+	alles wat we wilden zit er nu in, en is getest ma 02 14:20 < Kobus>
+	Named Entity Recognition ook ma 02 14:20 < Kobus> en Chunking ma 02
+	14:20 < Kobus> maar prima hoor git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14942
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-27 11:23  joostvb
+2012-07-02  joostvb <joostvb at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8579] do not set pythondir to $(PYTHONDIR): it is unneeded for
-	  installation, and breaks "make install prefix=/foo" (used by fink
-	  on Mac OS X, e.g.)
+	* README: update blurb on status of this software git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14941
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-27 10:41  joostvb
+2012-07-02  joostvb <joostvb at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8577] build-depend upon new split ucto. add python to
-	  build-depends
+	* README: layout, s/de/the/ git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14940
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-27 10:26  joostvb
+2012-06-27  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8575] first shot at from fink package
+	* docs/Makefile.am, docs/mblem.1, docs/mbma.1: add simple man pages
+	for mbma and mblem git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14932
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-14 13:49  sloot
+2012-06-27  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8319] added a '-n' option to do 'one sentence per line'
-	  tokenizing.
+	* src/mbma_mod.cxx: some cleanup, and comment added.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14931
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-13 07:36  joostvb
+2012-06-26  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8307] start 0.10.3
+	* src/mbma_mod.cxx: better debug lines choke on a "PE" tag. Let's
+	see if it ever happens.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14930
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-13 07:26  joostvb
+2012-06-26  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8306] ship it: 0.10.2
+	* src/mbma_mod.cxx: better debug info git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14929
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-13 07:11  joostvb
+2012-06-26  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8305] do not install ChangeLog. packagers take care of that
+	* src/mbma_mod.cxx: clearer code git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14928
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-13 06:56  joostvb
+2012-06-26  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8304] use sysconfdir variable, not hardcoded etc/
+	* src/mbma_mod.cxx: reduced debugging lines git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14927
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-12 18:49  joostvb
+2012-06-26  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8303] 0.10.1 is released. start 0.10.2
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx, src/mbma_prog.cxx: and
+	more refactoring. Things get sorted out a bit now git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14925
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-12 18:33  joostvb
+2012-06-25  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8302] ship it. version nr in sync with the one found in
-	  configure.ac
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: more refactoring git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14924
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-12 18:27  joostvb
+2012-06-25  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8301] changelog is autogenerate, removed from svn
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: refactoring. mainly in
+	an attempt to understand what is happening git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14923
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-12 18:27  joostvb
+2012-06-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8300] record changes
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: more refactoring still
+	convoluted git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14906
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-12 17:35  joostvb
+2012-06-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8295] lets call this "frog", not "Frog": sane tarbaball name
+	* src/mbma_mod.cxx: odd git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14905
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-12 17:31  joostvb
+2012-06-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8294] merge frog-ng patch to deal with unavailable icu 4.6
+	* include/frog/mbma_mod.h, src/Frog.cxx, src/mblem_mod.cxx,
+	src/mbma_mod.cxx, src/mbma_prog.cxx: more refactoring git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14904
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-10 16:05  sloot
+2012-06-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8287] we need ucto >= 0.3.6
+	* include/frog/mblem_mod.h, src/mblem_mod.cxx, src/mblem_prog.cxx: 
+	oppoetsen git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14903
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-10 15:52  sloot
+2012-06-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8285] added -e option to set the encoding
+	* include/frog/mblem_mod.h, src/Makefile.am, src/mblem_mod.cxx,
+	src/mblem_prog.cxx, src/mbma_mod.cxx: added a mblem main program.
+	Some refactoring done in mblem.  More to do.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14901
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-09 10:15  sloot
+2012-06-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8268] changed displaying of MWU's.
-	  Added (fatal) error when an entry in the MWU file is invalid
+	* src/mbma_mod.cxx: fix uninstatiated var git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14900
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-09 09:04  sloot
+2012-06-18  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8266] Removed invalid (non MWU) entry
+	* src/mbma_mod.cxx: removed some code that seems to be unneeded git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14883
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-08 11:05  antalb
+2012-06-18  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8252] moved to a more comprehensive MWU file based on the Lassy
-	  + Alpino treebanks
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx, src/mbma_prog.cxx: 
+	attempt to clean up further. not so much suc6 as hoped for.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14882
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-07 20:32  antalb
+2012-06-18  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8248] another fix
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: avoid code duplication git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14881
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-07 20:29  antalb
+2012-06-18  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8247] little fix
+	* src/mbma_prog.cxx: don't spoil outputfile git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14880
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-07 18:38  antalb
+2012-06-18  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8244] replaced old & small parser files by Frog.mbdp.1.0 parser
-	  files
+	* src/mbma_mod.cxx: accept fix as correct git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14878
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-07 15:23  sloot
+2012-06-14  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8240] renamed groupSize
-	  bumped version
-	  fixed install for new tagger files
+	* src/Frog.cxx: added --KANON option to geberate canonical XML
+	output git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14872
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-07 15:00  antalb
+2012-05-30  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8239] removed older cgn-wotan-dcoi.mbt tagger files
+	* configure.ac, src/Makefile.am: another one bites the dust git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14822
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-07 14:56  antalb
+2012-05-30  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8238] adding new Frog.mbt.1.0 tagger files, also updated
-	  frog.cfg
+	* configure.ac, src/Makefile.am: removed the infamous AC_DEFINE_DIR
+	macro git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14821
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-02 14:18  sloot
+2012-05-30  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8187] tags and props
+	* include/frog/cgn_tagger_mod.h, include/frog/ucto_tokenizer_mod.h,
+	src/cgn_tagger_mod.cxx, src/mbma_prog.cxx,
+	src/ucto_tokenizer_mod.cxx: mbma_prog now used Ucto and Mbt to
+	analyze the input.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14818
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-02 13:36  sloot
+2012-05-23  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8175] it's another year
+	* src/mbma_prog.cxx: -d works now git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14794
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-02 12:00  sloot
+2012-05-23  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8173] not needed anymore
+	* src/Makefile.am, src/mbma_prog.cxx: added a simple mbma main
+	program.  it just gives al Morphological variants. No POS tags
+	involved! git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14793
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-02 11:58  sloot
+2012-05-23  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8172] don't use private unicode_utils. ucto provides what we
-	  need
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: added a transliterator
+	which filters all diacritics.  Default is is OFF use the
+	'filter_diacritics="yes"' option in de [mbma] section of frog.cfg to
+	enable this.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14792
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-02-01 15:10  sloot
+2012-05-22  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8150] fixed include
+	* include/frog/ucto_tokenizer_mod.h, src/Frog.cxx,
+	src/ucto_tokenizer_mod.cxx: implemented the -Q option (which was
+	advertized) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14782
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-01-31 15:58  sloot
+2012-05-22  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8124] Removed redundant -s from tagger command
-	  disabled -s from usage. Tt is not used.
+	* src/mbma_mod.cxx: cleaner debug info git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14764
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-01-31 13:39  sloot
+2012-05-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8115] bumped version
-	  now uses ucto-icu.pc
+	* bootstrap, include/frog/mbma_mod.h, src/Makefile.am,
+	src/mbma_mod.cxx: some rework on mbma_mod. should make fixing a bit
+	more simple in the future git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14760
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-01-27 11:14  sloot
+2012-05-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8031] bumped version after release
+	* src/mbma_mod.cxx: small (tentative) fix git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14747
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-01-27 09:24  sloot
+2012-05-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8026] props set
+	* configure.ac, src/Frog.cxx: Frog now also builds (and works)
+	without OpenMp support (like in clang) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14746
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-01-27 09:23  sloot
+2012-05-14  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r8025] made it work with recent ucto
-	  addes some TODO
+	* include/frog/mbma_mod.h, src/Makefile.am, src/mbma_mod.cxx: made a
+	start with creating a libfrog. We will need it to be able to make
+	some useful functions available to the outer world. (mblem and mbma
+	functionality, for instance) Not finished.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14743
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-01-13 13:40  sloot
+2012-05-08  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r7812] explicitly set theErrLog
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: restrict special
+	handling of 'be' and 'ge' to participles only git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14726
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-01-11 14:41  mvgompel
+2012-05-08  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r7782] same fixes as in ucto
+	* src/mblem_mod.cxx: added heuristic: Don't edit words when the
+	result is only one character long git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14725
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-01-10 15:46  mvgompel
+2012-04-23  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r7766] Re-added support for pre-tokenised data, bypassing most
-	  of ucto
+	* src/mblem_mod.cxx: Rvereted change because Maarten reverted his
+	thoughts git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14678
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-01-10 15:14  mvgompel
+2012-04-21  antalb <antalb at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r7764] re-enabled --tok , but it's a bit of a secret function
-	  now, best use ucto directly for only tokenisation.
+	* AUTHORS: credit where credit is due git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14676
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-01-10 15:01  mvgompel
+2012-04-20  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r7763] Refactored main Test function, containing main
-	  tokenisation loop, now much cleaner and compliant with new API
+	* src/mblem_mod.cxx: Alternatives need an id git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14672
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-01-05 16:16  sloot
+2012-04-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r7721] simple identification of ourself
+	* src/mblem_mod.cxx: refactoring and cleanup git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14631
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-01-05 15:54  mvgompel
+2012-04-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r7718] small version bump
+	* src/mblem_mod.cxx: added comment git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14630
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-01-05 15:52  sloot
+2012-03-29  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r7717] not needed in SVN
-	  is auto installed
+	* configure.ac: bump version after release git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14590
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2011-01-05 15:33  mvgompel
+2012-03-29  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r7715] adapted to new ucto API
+	* NEWS: updated NEWS for release git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14588
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2010-12-16 10:24  sloot
+2012-03-28  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r7444] changed illegal '=='
+	* NEWS, configure.ac: depend on newer ucto (mostly because of its
+	config) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14580
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2010-12-15 11:49  sloot
+2012-03-28  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r7407] use ucto to also get ICU ok (experimental)
+	* src/Frog.cxx, src/tst.sh: adapted to other way of configuration
+	handling git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14574
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2010-12-14 16:58  sloot
+2012-03-28  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r7397] Always ICU please!
+	* DPconfig/Frog.mbdp.1.0.dir.ibase,
+	DPconfig/Frog.mbdp.1.0.dir.ibase.wgt,
+	DPconfig/Frog.mbdp.1.0.pairs.sampled.ibase,
+	DPconfig/Frog.mbdp.1.0.pairs.sampled.ibase.wgt,
+	DPconfig/Frog.mbdp.1.0.rels.ibase,
+	DPconfig/Frog.mbdp.1.0.rels.ibase.wgt, DPconfig/README,
+	DPconfig/frog.cfg: remove these too git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14571
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2010-12-14 16:57  sloot
+2012-03-28  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r7396] We don't support Frog without ICU
+	* Makefile.am, NEWS, config/Frog.mbt.1.0.1paxes,
+	config/Frog.mbt.1.0.known.dddwfWawa,
+	config/Frog.mbt.1.0.known.dddwfWawa.wgt, config/Frog.mbt.1.0.lex,
+	config/Frog.mbt.1.0.lex.ambi.05, config/Frog.mbt.1.0.settings,
+	config/Frog.mbt.1.0.top500,
+	config/Frog.mbt.1.0.unknown.chnppdddwFawasss, config/Frog.mwu.1.0,
+	config/Makefile.am, config/cgntags.main, config/cgntags.sub,
+	config/chunker.train.10paxes, config/chunker.train.known.dddwfWawa,
+	config/chunker.train.known.dddwfWawa.wgt, config/chunker.train.lex,
+	config/chunker.train.lex.ambi.05, config/chunker.train.settings,
+	config/chunker.train.top1000,
+	config/chunker.train.unknown.chnppddwFawsss, config/frog-de.cfg,
+	config/frog-en.cfg, config/frog-fr.cfg, config/frog-it.cfg,
+	config/mblem.transtable, config/mblem.tree, config/mblem.tree.wgt,
+	config/mbma.igtree, config/mbma.igtree.wgt,
+	config/ner.data.10paxes, config/ner.data.known.ddwdwfWawawaa,
+	config/ner.data.known.ddwdwfWawawaa.wgt, config/ner.data.lex,
+	config/ner.data.lex.ambi.05, config/ner.data.settings,
+	config/ner.data.top1000,
+	config/ner.data.unknown.chnppddwdwFawawaasss,
+	config/small-frog.cfg, configure.ac: remove the config files.  they
+	are to be found in separate frogdata tree git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14570
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2010-12-13 15:53  sloot
+2012-03-27  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r7368] small ucto tokenizer interface change
+	* config/mblem.tree, src/mblem_mod.cxx: enable <alt> lemmas in mblem
+	small fix in mblem tree git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14525
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2010-12-13 15:13  sloot
+2012-03-22  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r7365] knip/plak foutje
+	* include/frog/mblem_mod.h, src/mblem_mod.cxx: added possibility to
+	insert alternative lemma's in FoLiA.  disabled atm git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14505
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2010-12-13 14:54  sloot
+2012-03-22  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r7362] propset
+	* src/mblem_mod.cxx, src/mbma_mod.cxx: added shortcuts for LET (a la
+	SPEC) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14501
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2010-12-13 14:51  sloot
+2012-03-22  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r7361] use ucto lib!
+	* include/frog/cgn_tagger_mod.h, src/cgn_tagger_mod.cxx: detect more
+	URL-isch stuff. not just URL-WWW git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14489
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2010-12-13 14:51  sloot
+2012-03-22  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r7360] no longer needed. We use ucto
+	* config/mblem.transtable, config/mblem.tree, config/mblem.tree.wgt: 
+	updated mblem data. contained a strange bug git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14487
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2010-12-13 14:42  sloot
+2012-03-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r7359] removed from trunk. see FrogNG branch
+	* src/mbma_mod.cxx: ok, for now, i stop my attempts to understand
+	this code git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14483
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2010-12-07 09:59  sloot
+2012-03-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r7165] added standard © info
+	* src/mbma_mod.cxx: modernize git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14482
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2010-12-07 09:59  sloot
+2012-03-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r7164] unused file
+	* src/Parser.cxx, src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx,
+	src/mblem_mod.cxx, src/mbma_mod.cxx, src/ner_tagger_mod.cxx: - attempt to avoid irregular crashes, probably because of MT
+	problems - cleanup mbma code git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14481
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2010-12-06 16:20  sloot
+2012-03-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r7157] make compiler happy
+	* src/mblem_mod.cxx: some clarification git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14480
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2010-12-01 16:27  sloot
+2012-03-20  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r7088] small edits to make the compiler happy
+	* src/mblem_mod.cxx: code reshuffling. a bit cleared (to me) and
+	faster! git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14479
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2010-10-26 14:35  mvgompel
+2012-03-19  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r6675] last move
+	* include/frog/cgn_tagger_mod.h, include/frog/iob_tagger_mod.h,
+	include/frog/mblem_mod.h, include/frog/mbma_mod.h,
+	include/frog/mwu_chunker_mod.h, src/Frog.cxx, src/Parser.cxx,
+	src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx, src/mblem_mod.cxx,
+	src/mbma_mod.cxx, src/mwu_chunker_mod.cxx: cleaned up LibFolia stuff
+	(less generic pointers, more specific) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14478
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2010-10-26 14:33  mvgompel
+2012-03-19  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r6674] moving Frog stuff to trunk
+	* configure.ac: we prefer recent libfolia git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14475
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2010-10-26 14:29  mvgompel
+2012-03-19  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r6673] moving stuff to new trunk, first test
+	* DPconfig/frog.cfg, config/small-frog.cfg,
+	include/frog/mwu_chunker_mod.h, src/mwu_chunker_mod.cxx: removed
+	unused configuration item git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14470
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
-2010-10-26 10:29  mvgompel
+2012-03-13  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
 
-	* [r6657] added trunk
+	* DPconfig/frog.cfg, config/small-frog.cfg: updated config git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14454
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-03-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/iob_tagger_mod.cxx: small name change git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14448
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-03-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/Parser.h, include/frog/cgn_tagger_mod.h,
+	include/frog/iob_tagger_mod.h, include/frog/mblem_mod.h,
+	include/frog/mbma_mod.h, include/frog/mwu_chunker_mod.h,
+	include/frog/ner_tagger_mod.h, src/Frog.cxx, src/Parser.cxx,
+	src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx, src/mblem_mod.cxx,
+	src/mbma_mod.cxx, src/mwu_chunker_mod.cxx, src/ner_tagger_mod.cxx: 
+	refactoring: make the tagset names configurable, and don't let them
+	appear at manifold places in the code.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14447
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-03-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* NEWS, config/Makefile.am, config/ner.data.settings,
+	config/small-frog.cfg, tests/tst.ok, tests/tst.txt: fixed config and
+	install changed 'make check' test git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14445
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-03-08  antalb <antalb at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* config/ner.data.known.ddwdwfWawaa,
+	config/ner.data.known.ddwdwfWawawaa,
+	config/ner.data.known.ddwdwfWawawaa.wgt, config/ner.data.settings,
+	config/ner.data.top1000, config/ner.data.top500,
+	config/ner.data.unknown.chnppddwdwFawawaasss,
+	config/ner.data.unknown.chnppddwdwFawawasss: updating the
+	replacement of the NER config files git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14431
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-03-08  antalb <antalb at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* config/ner.data.10paxes, config/ner.data.5paxes,
+	config/ner.data.known.dddwfWawa,
+	config/ner.data.known.dddwfWawa.wgt,
+	config/ner.data.known.ddwdwfWawaa, config/ner.data.settings,
+	config/ner.data.top1000, config/ner.data.top500,
+	config/ner.data.unknown.chnppddwFawsss,
+	config/ner.data.unknown.chnppddwdwFawawasss: replaced first NER with
+	optimizer (more accurate, slower) NER git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14430
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-03-08  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: small edit git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14426
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-03-08  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* config/ner.data.known.dddwfWawa,
+	config/ner.data.known.dddwfWawa.wgt,
+	config/ner.data.unknown.chnppddwFawsss: retrained with -eEL git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14422
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-03-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* NEWS, configure.ac, include/frog/cgn_tagger_mod.h,
+	include/frog/iob_tagger_mod.h, include/frog/ner_tagger_mod.h,
+	src/Frog.cxx, src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx,
+	src/ner_tagger_mod.cxx: using a new MBT API function, code has
+	become simpler, faster, better! git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14381
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-03-01  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* NEWS, src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx,
+	src/ner_tagger_mod.cxx: fix problem with trailing / in input.  Mbt
+	should provide a better API! git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14367
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-03-01  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* configure.ac: bump version git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14365
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-29  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* NEWS, src/Frog.cxx, tests/tst.ok: argl! git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14361
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-29  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* configure.ac: bump version after release git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14360
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-29  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/tst.sh: oesp. belongs to 0.12.12 git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14358
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-29  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/iob_tagger_mod.cxx, src/mwu_chunker_mod.cxx,
+	src/ner_tagger_mod.cxx: more OMP attempts git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14351
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-29  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx, src/cgn_tagger_mod.cxx, src/iob_tagger_mod.cxx,
+	src/mbma_mod.cxx, src/mwu_chunker_mod.cxx, src/ner_tagger_mod.cxx: 
+	rechecked some OPM stuff. Mayby fixex threading problems now? git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14350
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-28  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* config/small-frog.cfg: oesp git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14346
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-27  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/Configuration.h, include/frog/Frog.h,
+	include/frog/Parser.h, src/Configuration.cxx, src/Frog-util.cxx,
+	src/Frog.cxx, src/Parser.cxx: some cleanup in global variables git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14344
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-27  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* NEWS: news git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14343
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-27  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: updated -h git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14339
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-23  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/ner_tagger_mod.h, src/Frog.cxx,
+	src/ner_tagger_mod.cxx: some refactoring git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14331
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-23  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/mwu_chunker_mod.h, src/Frog.cxx, src/Parser.cxx,
+	src/iob_tagger_mod.cxx, src/mwu_chunker_mod.cxx,
+	src/ner_tagger_mod.cxx: adapted to much stricter libfolia git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14330
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-22  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* DPconfig/frog.cfg, src/Frog.cxx, src/Parser.cxx,
+	src/cgn_tagger_mod.cxx, src/frog-dp-update, src/iob_tagger_mod.cxx,
+	src/mblem_mod.cxx, src/mbma_mod.cxx, src/ner_tagger_mod.cxx: 
+	cleaning up in FoLiA stuff git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14306
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* config/small-frog.cfg, include/frog/Configuration.h,
+	src/Configuration.cxx, src/Frog.cxx: We signal sooner if some config
+	is missing.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14301
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/cgn_tagger_mod.cxx: oesp git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14283
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/cgn_tagger_mod.cxx: oesp. thread safety first git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14282
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: IOB tags were lost.  fixed git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14273
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* configure.ac, src/Frog.cxx: NER now seems to work git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14272
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* config/Makefile.am, config/ner.data.5paxes,
+	config/ner.data.known.dddwfWawa,
+	config/ner.data.known.dddwfWawa.wgt, config/ner.data.lex,
+	config/ner.data.lex.ambi.05, config/ner.data.settings,
+	config/ner.data.top1000, config/ner.data.unknown.chnppddwFawsss,
+	include/frog/Frog.h, include/frog/Makefile.am,
+	include/frog/cgn_tagger_mod.h, include/frog/iob_tagger_mod.h,
+	include/frog/ner_tagger_mod.h, include/frog/ucto_tokenizer_mod.h,
+	src/Frog.cxx, src/Makefile.am, src/cgn_tagger_mod.cxx,
+	src/iob_tagger_mod.cxx, src/mwu_chunker_mod.cxx,
+	src/ner_tagger_mod.cxx, src/ucto_tokenizer_mod.cxx: added
+	experimental NER code git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14267
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: typo git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14265
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: Added a --max-parser-tokens option git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14264
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-13  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* config/Frog.mwu.1.0, configure.ac: dependency changed modified mwu
+	list git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14261
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-10  antalb <antalb at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* config/Frog.mwu.1.0: more cleaning git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14250
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-10  antalb <antalb at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* config/Frog.mwu.1.0: more cleaning! git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14249
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-10  antalb <antalb at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* config/Frog.mwu.1.0: and more cleaning git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14248
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-10  antalb <antalb at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* config/Frog.mwu.1.0: more cleaning git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14247
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-10  antalb <antalb at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* config/Frog.mwu.1.0: cleansed the Frog.mwu.1.0 config file git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14246
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-09  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* configure.ac: bump version after release git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14241
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-09  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* NEWS, docs/Makefile.am, docs/frog-dp-update.1: added a manpage git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14239
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-09  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/frog-dp-update: OMG Why! git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14238
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-09  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* configure.ac: bumped version after release git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14236
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-09  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* NEWS, src/Makefile.am: last small edits before release git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14233
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-09  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Makefile.am, src/frog-dp-update, src/frog-dp-update.sh: make
+	debianista's happy git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14232
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-09  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* NEWS, src/iob_tagger_mod.cxx, tests/tst.ok, tests/tst.txt: fixed
+	ION chunker git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14231
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-08  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/iob_tagger_mod.cxx: Ok, fixed some problems.  Code is still
+	ugly git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14220
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-07  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/iob_tagger_mod.cxx: some cleanup. still a bit messy git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14217
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-07  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/iob_tagger_mod.cxx: added confidence to the IOB chunks git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14216
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-07  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* config/chunker.train.known.dddwfWawa,
+	config/chunker.train.known.dddwfWawa.wgt,
+	config/chunker.train.unknown.chnppddwFawsss: desperately needed
+	files git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14215
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-07  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* config/chunker.train.settings: added +D to enable confidence
+	calculations git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14214
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-07  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* config/chunker.train.settings, src/cgn_tagger_mod.cxx,
+	src/iob_tagger_mod.cxx: make the taggers use the debug settings
+	somewhat better git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14213
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-07  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Makefile.am: argl git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14211
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-07  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* NEWS, config/Makefile.am, config/chunker.train.5paxes,
+	config/chunker.train.known.dddfWaa,
+	config/chunker.train.known.dddfWaa.wgt, config/chunker.train.lex,
+	config/chunker.train.lex.ambi.05, config/chunker.train.settings,
+	config/chunker.train.unknown.chnppddwFasss, src/Frog.cxx: Updated
+	chunker files git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14210
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-07  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* AUTHORS: updated git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14209
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-07  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Makefile.am, src/frog-dp-update.sh, src/frog-update.sh: 
+	renamed the script git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14208
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-07  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/frog-update.sh: small improvement git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14207
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-07  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Makefile.am, src/frog-update.sh: added a frog-update script
+	that downloads and install the dependency parser files.  Bit
+	experimental still git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14206
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-07  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* DPconfig/README, src/Frog.cxx, src/iob_tagger_mod.cxx: make frog
+	tell it's config dir.  adapted README git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14205
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-06  antalb <antalb at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* DPconfig/README: edited the README git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14204
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* configure.ac: bumped version after release git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14203
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* NEWS, src/tst.sh: ouch. forgotten to check in git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14200
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* config/Makefile.am, config/frog.cfg, config/small-frog.cfg,
+	src/Frog.cxx: attempt to make it smart.  frog installs together with
+	small-frog.cfg.  Whenever a frog.cfg is installed, or otherwise
+	added, that will take precedence.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14198
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: fix git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14197
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* DPconfig/README: better git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14196
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* DPconfig/README: added a README set keywords git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14194
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* DPconfig/frog.cfg: added a frog.cfg which includes the parser git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14193
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* DPconfig/Frog.mbdp.1.0.dir.ibase,
+	DPconfig/Frog.mbdp.1.0.dir.ibase.wgt,
+	DPconfig/Frog.mbdp.1.0.pairs.sampled.ibase,
+	DPconfig/Frog.mbdp.1.0.pairs.sampled.ibase.wgt,
+	DPconfig/Frog.mbdp.1.0.rels.ibase,
+	DPconfig/Frog.mbdp.1.0.rels.ibase.wgt,
+	config/Frog.mbdp.1.0.dir.ibase, config/Frog.mbdp.1.0.dir.ibase.wgt,
+	config/Frog.mbdp.1.0.pairs.sampled.ibase,
+	config/Frog.mbdp.1.0.pairs.sampled.ibase.wgt,
+	config/Frog.mbdp.1.0.rels.ibase,
+	config/Frog.mbdp.1.0.rels.ibase.wgt, config/Makefile.am,
+	config/frog.cfg: moved DP files to own dir.  No longer install or
+	package those files.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14192
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Configuration.cxx, src/Frog.cxx: Frog now checks if the
+	Dependency Parser is installed. If not: require --skip=p.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14191
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-02  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: renamed variables to make things more clear git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14179
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-02  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: beetje beter git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14178
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-02  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: More refactoring get rid of some of the zillion
+	Test*() functions git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14177
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-02  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: more cleanup git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14176
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-02  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/Frog.h, src/Frog.cxx: some code cleanup git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14175
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-02  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* tests/tst.ok: now make distcheck works again git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14173
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-01  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* config/chunker.train.settings: made the iob chunker a bit less
+	verbose git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14170
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-01  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: cleaner layout of timing info git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14169
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-02-01  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: the server now can handle FoLia in AND out (using -x
+	-X) documents must be separated by an empty line.  two empty lines
+	will stop the thread.  Code is a bit messy still (cough) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14167
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-31  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: added mbma declaration git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14165
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-31  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* docs/frog.1, src/Frog.cxx: fixed man page fixed proycons fix so
+	that FoLiA handling is correct more often git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14163
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-31  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx, src/cgn_tagger_mod.cxx, src/mblem_mod.cxx: Added
+	FoLiA declaration stuff with references to set URLs that can be
+	filled later.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14160
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-31  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/ucto_tokenizer_mod.h: oops git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14158
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-31  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx, src/ucto_tokenizer_mod.cxx: added support for FoLiA
+	document IDs using id== git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14157
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-31  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* configure.ac: attempt to fix --prefix stuff git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14156
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-31  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* NEWS: updated the NEWS git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14155
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-31  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx, src/cgn_tagger_mod.cxx: fixed problem with tags
+	containing // updated usage() git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14150
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-31  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* docs/frog.1: updated man page git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14149
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-30  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: added IOB tags to 'tabbed' output.  complaints
+	welcome git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14143
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-30  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/cgn_tagger_mod.h, src/cgn_tagger_mod.cxx: get debug
+	handling in line with other modules git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14133
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-30  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* config/frog.cfg, include/frog/iob_tagger_mod.h,
+	src/iob_tagger_mod.cxx: fixed I wtthout B problem.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14131
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-30  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: IOB tagging is enabled per default now. disable with
+	--skip=i git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14129
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-30  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* config/Makefile.am: new config git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14128
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-30  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* config/chunker.train.5paxes, config/chunker.train.known.dddfWaa,
+	config/chunker.train.known.dddfWaa.wgt,
+	config/chunker.train.known.dwdwdwfWawaw,
+	config/chunker.train.settings,
+	config/chunker.train.unknown.chnppddwFasss,
+	config/chunker.train.unknown.dwdwdwppsssFawaw: smaller and faster
+	chunker files git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14127
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-26  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx, src/iob_tagger_mod.cxx: IOB only when --skip=i
+	(sic!) removed debug lines git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14121
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-26  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* config/Makefile.am, config/chunker.train.10paxes,
+	config/chunker.train.known.dwdwdwfWawaw, config/chunker.train.lex,
+	config/chunker.train.lex.ambi.05, config/chunker.train.settings,
+	config/chunker.train.top1000,
+	config/chunker.train.unknown.dwdwdwppsssFawaw, config/frog.cfg,
+	include/frog/Frog.h, include/frog/iob_tagger_mod.h, src/Frog.cxx,
+	src/iob_tagger_mod.cxx: added IOB chunker (experimental) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14120
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-26  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: fix. folia::Document doesn't have a working
+	copy/assignment operator git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14117
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-26  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: -x options works for server too git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14115
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-26  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx, src/ucto_tokenizer_mod.cxx: refactored commandline
+	options stuff a bit. It is way too complicated now.  please rethink! git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14114
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-25  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/ucto_tokenizer_mod.h, src/Frog.cxx,
+	src/ucto_tokenizer_mod.cxx: added a '-x' option to parse Folia input git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14111
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-25  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/Makefile.am, include/frog/iob_tagger_mod.h,
+	src/Frog.cxx, src/Makefile.am, src/iob_tagger_mod.cxx: added iob
+	stuff, and removed ner garbage git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14110
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-25  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/ucto_tokenizer_mod.h, src/Frog.cxx,
+	src/mblem_mod.cxx, src/ucto_tokenizer_mod.cxx: small improvements git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14108
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-25  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* config/frog.cfg, include/frog/Frog.h, include/frog/Makefile.am,
+	include/frog/cgn_tagger_mod.h, include/frog/mblem_mod.h,
+	include/frog/mbma_mod.h, include/frog/mwu_chunker_mod.h,
+	include/frog/ucto_tokenizer_mod.h, src/Frog.cxx, src/Makefile.am,
+	src/cgn_tagger_mod.cxx, src/mblem_mod.cxx, src/mbma_mod.cxx,
+	src/mwu_chunker_mod.cxx, src/ucto_tokenizer_mod.cxx: finally! sorted
+	out most of the logging hassle.  every module has it own Logstream
+	with own id No more mixup when running in parallel. (ahum: one
+	problem left) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14107
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-24  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/ucto_tokenizer_mod.h, src/ucto_tokenizer_mod.cxx: get
+	more in line with other modules git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14105
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-24  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/Makefile.am, include/frog/cgn_tagger_mod.h,
+	include/frog/mbma_mod.h, include/frog/ucto_tokenizer_mod.h,
+	src/Frog.cxx, src/Makefile.am, src/cgn_tagger_mod.cxx,
+	src/ucto_tokenizer_mod.cxx: moved most tokenizer stuff to one
+	"module". Bit more cleansing to do renamed MBTagger class to
+	CGNTagger class git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14104
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-23  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* configure.ac, m4/ax_icu_check.m4: rather desperate attempt to make
+	configure work on Mac git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14093
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-19  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* NEWS, src/Frog.cxx: removed useless (I hope...) loop git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14092
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-19  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* NEWS, src/Frog.cxx: argh!!!! git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@14091
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* frog.spec: was moved to Timbl-dev git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13990
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: small improvement git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13986
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* configure.ac: bumped version after Release git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13985
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: last minute fix git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13983
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* NEWS: typo git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13981
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-11  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* NEWS: updated git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13963
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-11  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: split a long function into two git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13962
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-11  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: moved omp_set_threads to main git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13961
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-11  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: No parallelisation in server mode (would fork on
+	each snippet, too expensive) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13959
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-11  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: different timer behaviour in server mode git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13957
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-11  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/mbma_mod.h, src/Frog.cxx, src/mblem_mod.cxx,
+	src/mbma_mod.cxx: added more openMp directives to avoid race
+	problems git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13948
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-10  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* configure.ac, src/Frog.cxx: cleaned up configure.  Detected a
+	small problem in the fly...  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13946
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-10  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* configure.ac: Bumped version after Release git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13938
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-10  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* configure.ac: forgotten to Bump :{ git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13924
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-10  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* NEWS: updated NEWS git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13923
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-09  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* NEWS, src/Frog-util.cxx: bug fix git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13913
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-06  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/cgn_tagger_mod.cxx: typo: refl1 -> refl git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13898
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-05  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* NEWS, src/Parser.cxx: added pid to intermediate files git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13879
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-02  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* README, include/frog/Configuration.h, include/frog/Frog.h,
+	include/frog/Parser.h, include/frog/cgn_tagger_mod.h,
+	include/frog/mblem_mod.h, include/frog/mbma_mod.h,
+	include/frog/mwu_chunker_mod.h, src/Configuration.cxx,
+	src/Frog-util.cxx, src/Frog.cxx, src/Parser.cxx,
+	src/cgn_tagger_mod.cxx, src/mblem_mod.cxx, src/mbma_mod.cxx,
+	src/mwu_chunker_mod.cxx: It is 2012! git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13840
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2012-01-02  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* NEWS, src/Frog.cxx: small fix for GNU/Hurd git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13839
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-12-22  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog-util.cxx: fixed small memoryleak git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13782
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-12-22  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* docs/frog.1: updated man page git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13780
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-12-22  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: added a --xmldir option. Modified -o and -X options.
+	Now you can frog a whole dir (--testdir option) and save the output
+	in one dir (--outputdir option) and the FoLiA XML in another dir
+	(--xmldir option) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13779
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-12-21  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: die on failure to bind to port git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13769
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-12-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* configure.ac: bump version after release git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13768
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-12-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* configure.ac: grmbl git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13766
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-12-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx, src/Parser.cxx, tests/tst.ok: small cleanup fixed
+	'make check' git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13765
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-12-21  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Parser.cxx, src/mblem_mod.cxx, src/mbma_mod.cxx,
+	src/mwu_chunker_mod.cxx: cleaned up some namespace mess git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13763
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-12-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Parser.cxx: ok. last desparate attempt.  It seems to work now git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13710
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-12-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Parser.cxx: use an other way off setting the import path.  Now
+	frog can also find .py files in the /usr/lib/pymodules/python2.x
+	directory that the debian installer uses git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13709
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-12-13  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/mwu_chunker_mod.h, src/mwu_chunker_mod.cxx: fixed a
+	leak git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13685
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-12-13  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/mwu_chunker_mod.h, src/Frog.cxx,
+	src/mwu_chunker_mod.cxx: mwu cleanup git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13683
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-12-13  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx, src/Parser.cxx, src/cgn_tagger_mod.cxx,
+	src/mblem_mod.cxx, src/mbma_mod.cxx, src/mwu_chunker_mod.cxx: 
+	reshuffled again to use POS tags with head attribute git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13679
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-12-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx, src/Parser.cxx, src/mbma_mod.cxx: attempt to make
+	multithreading a bit more reliable git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13672
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-12-08  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx, src/Parser.cxx, src/mblem_mod.cxx,
+	src/mbma_mod.cxx, src/mwu_chunker_mod.cxx: adapted to changing
+	libfolia API git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13661
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-12-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx, src/Parser.cxx, src/cgn_tagger_mod.cxx,
+	src/mwu_chunker_mod.cxx: libfolia API change! git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13653
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-12-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* configure.ac, include/frog/Parser.h,
+	include/frog/cgn_tagger_mod.h, include/frog/mblem_mod.h,
+	include/frog/mbma_mod.h, include/frog/mwu_chunker_mod.h,
+	src/Frog.cxx, src/Parser.cxx, src/cgn_tagger_mod.cxx,
+	src/mblem_mod.cxx, src/mbma_mod.cxx, src/mwu_chunker_mod.cxx: 
+	adapted to change in libfolia: AbstractElement ==> FoliaElement git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13649
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-12-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/cgn_tagger_mod.cxx: cgn tag ==> subset translations in a tabel
+	now.  Should be a configuration file of course git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13642
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-12-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/mbma_mod.cxx: more cleanup git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13641
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-12-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/mbma_mod.h, src/mbma_mod.cxx: more cleanup git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13640
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-12-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/cgn_tagger_mod.h, include/frog/mwu_chunker_mod.h,
+	src/Frog.cxx, src/cgn_tagger_mod.cxx, src/mwu_chunker_mod.cxx: more
+	folianizing.  folia classes E-MAIL and WWW-URL ==> SPEC(symb) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13635
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-12-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/mblem_mod.h, src/Frog.cxx, src/mblem_mod.cxx: more
+	cleanup, more folia git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13634
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-12-06  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: added -X option to save results in FoLiA XML format.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13633
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-12-05  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/cgn_tagger_mod.cxx, src/mblem_mod.cxx: use ucto tags SMILEY
+	and KNOWN-ABBREVIATION to modify the POS tags to SPEC() git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13631
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-12-05  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/mbma_mod.h, src/Frog.cxx, src/Parser.cxx,
+	src/cgn_tagger_mod.cxx, src/mbma_mod.cxx: Tagger result is now split
+	into separate <feat> nodes SPEC() always gets confidence 1.0 git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13629
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-11-29  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/mblem_mod.cxx: small cleanup git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13617
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-11-28  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/Makefile.am, include/frog/cgn_tagger_mod.h,
+	include/frog/tagger_mod.h, src/Frog.cxx, src/Makefile.am,
+	src/cgn_tagger_mod.cxx, src/tagger_mod.cxx: renamed tagger+mod to
+	cgn_tagger_mod git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13614
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-11-24  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/mwu_chunker_mod.h, src/mwu_chunker_mod.cxx: more
+	cleaning done git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13578
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-11-24  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/mwu_chunker_mod.h, src/mwu_chunker_mod.cxx: ok, new
+	cleaning attempt git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13577
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-11-24  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/tagger_mod.h, src/Frog.cxx, src/tagger_mod.cxx: move
+	a lot code from main progrtam to tagger module git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13576
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-11-24  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/mblem_mod.h, include/frog/mbma_mod.h,
+	include/frog/mwu_chunker_mod.h, src/Frog.cxx, src/mblem_mod.cxx,
+	src/mbma_mod.cxx, src/mwu_chunker_mod.cxx: more cleanup git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13575
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-11-24  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/mwu_chunker_mod.h, src/mwu_chunker_mod.cxx: reverted
+	to old mwu module.  something was broken. rethinking later… git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13573
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-11-24  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/tagger_mod.h, src/tagger_mod.cxx: we need thes too,
+	then git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13572
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-11-24  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/Makefile.am, src/Frog.cxx, src/Makefile.am: started
+	to implement a tagger module.  should make adding another one more
+	easy git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13571
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-11-24  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/mwu_chunker_mod.h, src/mwu_chunker_mod.cxx: this
+	realy cleans up git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13570
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-11-23  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/mwu_chunker_mod.h, src/mwu_chunker_mod.cxx: cleanup git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13563
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-11-23  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/Parser.h, include/frog/mwu_chunker_mod.h,
+	src/Parser.cxx, src/mwu_chunker_mod.cxx: cleanup continues git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13562
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-11-22  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/mwu_chunker_mod.h, src/Frog.cxx,
+	src/mwu_chunker_mod.cxx: next cleanup step lot to do still! git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13561
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-11-22  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/FrogData.h, include/frog/Makefile.am,
+	include/frog/Parser.h, src/Frog.cxx, src/FrogData.cxx,
+	src/Makefile.am, src/Parser.cxx: first cleanup step git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13560
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-11-22  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/Parser.h, src/Frog.cxx, src/Parser.cxx: now we are
+	able to handle all based on a FoLiA document.  Next step: a lot of
+	cleaning git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13559
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-11-17  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Parser.cxx: The parser now sort-of adds dependencies to the
+	FoLia doc.  MWU' will fail git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13557
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-11-15  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/Parser.h, src/Frog.cxx, src/FrogData.cxx,
+	src/Parser.cxx: started to modify the parser wrapper for FoLiA
+	usage.  Almost works, but needs libfolia extensions that Maarten
+	forgot git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13549
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-11-14  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/mwu_chunker_mod.h, src/Frog.cxx, src/mblem_mod.cxx,
+	src/mbma_mod.cxx, src/mwu_chunker_mod.cxx: alles tot de parser werkt
+	nu "folia-based".  Parser nog niet!!!! Alles is nog wel wat
+	houterig.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13547
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-11-10  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/Frog.h, include/frog/mblem_mod.h,
+	include/frog/mbma_mod.h, src/Frog-util.cxx, src/Frog.cxx,
+	src/mblem_mod.cxx, src/mbma_mod.cxx, tests/Makefile.am,
+	tests/tst.txt: this version builds a FoLiA tree in parallel with the
+	normal processing.  This is not finished yet, and slows down
+	processing too.  The output is still "old style" and seems to be OK
+	still.  The produced FoLiA doc is dumped at the end for
+	informational purposes.  Do not upgrade to this version please! git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13537
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-11-03  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* Makefile.am, configure.ac, src/Frog.cxx, src/Makefile.am,
+	src/tst.sh, test.txt, tests/Makefile.am, tests/test.txt,
+	tests/tst.ok: added a 'make check' / 'make distcheck' target Frog
+	now works with both Mbt 3.2.6 and higer versions git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13516
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-11-03  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* NEWS, configure.ac, include/frog/Frog.h, src/Frog.cxx,
+	src/mblem_mod.cxx, src/mbma_mod.cxx: merged with the foliabased
+	branch. folia rulezzzz git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13513
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-10-25  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* NEWS: NEWS was not updated for a while. what's new? git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13460
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-10-24  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* configure.ac: seems to work well with older Mbt too git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13450
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-08-31  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* config/Frog.mbt.1.0.settings, configure.ac, src/Frog.cxx: fixed a
+	problem in the settings.  Depends on new Mbt because we us +vcf to
+	call the tagger git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13056
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-08-31  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* docs/frog.1, src/Frog.cxx: made -V (and --version) consistent git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13045
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-08-31  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* configure.ac: Bumped version after release git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@13038
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-08-23  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* include/frog/Frog.h, src/Frog.cxx: numb change git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@12954
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-08-23  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* configure.ac: bumped version after release git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@12952
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-08-23  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* NEWS: release! git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@12951
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-08-23  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* config/.cvsignore, include/.cvsignore, include/frog/.cvsignore,
+	src/.cvsignore: soem remains form the past removed git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@12948
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-08-23  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* NEWS, docs/frog.1: NEWS man page update git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@12944
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-08-23  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: reversed -Q behaviour git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@12943
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-08-22  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* configure.ac: lower version of ucto works too git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@12933
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-08-22  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* configure.ac, src/Frog.cxx: adapted to changed ucto API. Now the
+	correct ucto config is used (I hope) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@12929
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-06-08  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: oesp git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@10463
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-06-08  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: Use the same Tagger commandline arguments both for
+	Server and Normal mode! git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@10462
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-06-08  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: added option to disable quote detection in tokeniser git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@10460
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-05-23  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: zo beter Maarten? git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@10161
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-05-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* NEWS: news git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@9905
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-05-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/mwu_chunker_mod.cxx: avoid scientific notation git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@9904
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-05-12  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* config/Frog.mbt.1.0.settings, configure.ac,
+	include/frog/mwu_chunker_mod.h, src/Frog.cxx,
+	src/mwu_chunker_mod.cxx: added a confidence column. Needs the latest
+	and greatest Timbl and Mbt.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@9902
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-05-12  antalb <antalb at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* config/Frog.mbt.1.0.known.dddwfWawa, config/Frog.mbt.1.0.settings: 
+	updated the Frog MBT known ibase with class distributions (+D) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@9882
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-05-11  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: even for PassThru we want tokenizer config to be
+	present. We are going to use ucto anyway.  Als make sure to set the
+	tokenizer debug level.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@9865
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-05-11  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* config/Makefile.am, config/tokconfig-de, config/tokconfig-en,
+	config/tokconfig-fr, config/tokconfig-it, config/tokconfig-nl: No
+	longer install and maintain ucto files here! Don't install non-dutch
+	stuff. It is incomplete.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@9864
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-04-27  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* configure.ac: version bump after release git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@9731
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-04-27  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* NEWS, configure.ac, src/Frog.cxx: moved nasty sentence per line
+	patch away, support now in ucto itself git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@9728
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-04-19  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* configure.ac: version update for next round git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@9588
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-04-19  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* NEWS: news update git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@9587
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-04-19  mvgompel <mvgompel at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: Fixed max buffer size problem (a bit patchy, but ok) git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@9585
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-04-18  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* configure.ac: bumped version after release git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@9558
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-04-18  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* configure.ac, src/Frog.cxx: ok. for now we do not want to
+	introduce dependencies on very recent packages.  removed some code
+	and lowered our expectations git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@9556
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-04-18  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* NEWS, include/frog/mblem_mod.h, include/frog/mbma_mod.h,
+	include/frog/mwu_chunker_mod.h, src/Frog.cxx, src/mblem_mod.cxx,
+	src/mbma_mod.cxx, src/mwu_chunker_mod.cxx: check the init()
+	functions for failures and stop execution on errors.  git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@9554
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-04-07  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* src/Frog.cxx: Use TimblServer as include git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@9331
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-04-07  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* configure.ac, src/Frog.cxx: now we announe are partners. Needs the
+	most recent versions of ucto, timbl, timblserver and mbt git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@9319
+	12f355fe-0486-481a-ad91-c297ab22b4e3
+
+2011-03-31  sloot <sloot at 12f355fe-0486-481a-ad91-c297ab22b4e3>
+
+	* leapfrogged git-svn-id: https://ilk.uvt.nl/svn/sources/Frog/trunk@9241
+	12f355fe-0486-481a-ad91-c297ab22b4e3
 
diff --git a/Makefile.am b/Makefile.am
index d23b652..8b0c808 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,9 +1,6 @@
-# $Id: Makefile.am 17166 2014-04-30 10:17:38Z sloot $
-# $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/Makefile.am $
-
 ACLOCAL_AMFLAGS = -I m4 --install
 
-SUBDIRS = src include scripts m4 docs tests
+SUBDIRS = src include m4 docs tests
 
 EXTRA_DIST = bootstrap.sh AUTHORS TODO NEWS
 
@@ -11,4 +8,4 @@ pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = frog.pc
 
 ChangeLog: $(top_srcdir)/NEWS
-	svn update; svn2cl --include-rev
+	git pull; git2cl > ChangeLog
diff --git a/Makefile.in b/Makefile.in
index 6f9c16e..3c70329 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,11 +14,18 @@
 
 @SET_MAKE@
 
-# $Id: Makefile.am 17166 2014-04-30 10:17:38Z sloot $
-# $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/Makefile.am $
-
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -82,23 +89,17 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = .
-DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
-	$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/configure $(am__configure_deps) \
-	$(srcdir)/config.h.in $(srcdir)/frog.pc.in COPYING TODO \
-	compile config.guess config.sub depcomp install-sh missing \
-	py-compile ltmain.sh
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ac_python_devel.m4 \
-	$(top_srcdir)/m4/ax_icu_check.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_icu_check.m4 \
 	$(top_srcdir)/m4/ax_lib_readline.m4 \
 	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-	$(top_srcdir)/m4/openmp.m4 $(top_srcdir)/m4/pkg.m4 \
-	$(top_srcdir)/configure.ac
+	$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+	$(am__configure_deps) $(am__DIST_COMMON)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno config.status.lineno
 mkinstalldirs = $(install_sh) -d
@@ -191,6 +192,10 @@ ETAGS = etags
 CTAGS = ctags
 CSCOPE = cscope
 DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
+	$(srcdir)/frog.pc.in AUTHORS COPYING ChangeLog INSTALL NEWS \
+	README TODO compile config.guess config.sub depcomp install-sh \
+	ltmain.sh missing
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
@@ -284,6 +289,7 @@ LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -291,6 +297,7 @@ NM = @NM@
 NMEDIT = @NMEDIT@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@
 OTOOL = @OTOOL@
 OTOOL64 = @OTOOL64@
 PACKAGE = @PACKAGE@
@@ -307,17 +314,6 @@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
-PYTHON = @PYTHON@
-PYTHONDIR = @PYTHONDIR@
-PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
-PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
-PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@
-PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
-PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
-PYTHON_PLATFORM = @PYTHON_PLATFORM@
-PYTHON_PREFIX = @PYTHON_PREFIX@
-PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
-PYTHON_VERSION = @PYTHON_VERSION@
 RANLIB = @RANLIB@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
@@ -355,6 +351,8 @@ dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 folia_CFLAGS = @folia_CFLAGS@
 folia_LIBS = @folia_LIBS@
+frogdata_CFLAGS = @frogdata_CFLAGS@
+frogdata_LIBS = @frogdata_LIBS@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
@@ -375,13 +373,10 @@ mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
 pkgconfigpath = @pkgconfigpath@
-pkgpyexecdir = @pkgpyexecdir@
-pkgpythondir = @pkgpythondir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
-pyexecdir = @pyexecdir@
-pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -391,15 +386,13 @@ ticcutils_CFLAGS = @ticcutils_CFLAGS@
 ticcutils_LIBS = @ticcutils_LIBS@
 timbl_CFLAGS = @timbl_CFLAGS@
 timbl_LIBS = @timbl_LIBS@
-timblserver_CFLAGS = @timblserver_CFLAGS@
-timblserver_LIBS = @timblserver_LIBS@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 ucto_CFLAGS = @ucto_CFLAGS@
 ucto_LIBS = @ucto_LIBS@
 ACLOCAL_AMFLAGS = -I m4 --install
-SUBDIRS = src include scripts m4 docs tests
+SUBDIRS = src include m4 docs tests
 EXTRA_DIST = bootstrap.sh AUTHORS TODO NEWS
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = frog.pc
@@ -422,7 +415,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -676,15 +668,15 @@ dist-xz: distdir
 	$(am__post_remove_distdir)
 
 dist-tarZ: distdir
-	@echo WARNING: "Support for shar distribution archives is" \
-	               "deprecated." >&2
+	@echo WARNING: "Support for distribution archives compressed with" \
+		       "legacy program 'compress' is deprecated." >&2
 	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
 	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
 	$(am__post_remove_distdir)
 
 dist-shar: distdir
-	@echo WARNING: "Support for distribution archives compressed with" \
-		       "legacy program 'compress' is deprecated." >&2
+	@echo WARNING: "Support for shar distribution archives is" \
+	               "deprecated." >&2
 	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
 	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
 	$(am__post_remove_distdir)
@@ -720,17 +712,17 @@ distcheck: dist
 	esac
 	chmod -R a-w $(distdir)
 	chmod u+w $(distdir)
-	mkdir $(distdir)/_build $(distdir)/_inst
+	mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
 	chmod a-w $(distdir)
 	test -d $(distdir)/_build || exit 0; \
 	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
 	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
 	  && am__cwd=`pwd` \
-	  && $(am__cd) $(distdir)/_build \
-	  && ../configure \
+	  && $(am__cd) $(distdir)/_build/sub \
+	  && ../../configure \
 	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
 	    $(DISTCHECK_CONFIGURE_FLAGS) \
-	    --srcdir=.. --prefix="$$dc_install_base" \
+	    --srcdir=../.. --prefix="$$dc_install_base" \
 	  && $(MAKE) $(AM_MAKEFLAGS) \
 	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
 	  && $(MAKE) $(AM_MAKEFLAGS) check \
@@ -910,9 +902,11 @@ uninstall-am: uninstall-pkgconfigDATA
 	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
 	uninstall-am uninstall-pkgconfigDATA
 
+.PRECIOUS: Makefile
+
 
 ChangeLog: $(top_srcdir)/NEWS
-	svn update; svn2cl --include-rev
+	git pull; git2cl > ChangeLog
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/NEWS b/NEWS
index 2eefe8d..62548d6 100644
--- a/NEWS
+++ b/NEWS
@@ -1,13 +1,70 @@
-0.12.18 - 2014-06
+0.13.4 - 2016-07-11
+[Ko van der Sloot]
+- added long options --help and --version
+- interactive use is limited to TTY's only, so pipes from std in work
+- added a --language='name' option. it tries to read the configuration from
+  a subdirectory with 'name' in the configdir
+  The default is 'nl'
+- tokenizer timing is fixed at last
+- be robust agains a missing clex tag
+- better warning when OpenMP is not present
+- adaptation in mbma
+- added 2 convenience functions to FragAPI:
+    get_full_morph_analysis() and
+    get_compound_analysis()
+- CompoundType is now in it;s own namespace
+- some code refactoring, as usual
+
+0.13.3 - 2016-03-10
+[Ko van der Sloot]
+* Now based on libfolia 1.0
+* lot of code refactoring
+* minor bug fixes
+
+0.13.0 - 2015-09-28
+[Ko van der Sloot]
+* moved repository to GitHub
+* added Travis support
+* First version without Python dependencies!
+  The CSI parser is implemented in C++
+* use more stuff from >ticcutils (BasicServer)
+* frog now runs on a minimal configurations too
+* a lot more stuff is configurable (te become more language independent)
+* added NER lookup from a file
+* mbma is improved.
+   Doesn't have the "eer" and "ere" hacks anymore
+   does hande C tags/inflections better
+   better 'daring' mode
+   adds some comopund info
+* fixed the mbma_prog and mblem_prog to run without a tagger or tokenizer
+* added a 'ner' commandline tool
+* a lot of smaller bug fixes and code refactoring
+
+0.12.20 - 2015-01-29
+[Ko van der Sloot]
+ * release
+ * fixed terrible bug in FrogServer (unitialized MWU could happen)
+
+0.12.19 - 2014-12-01
+[Ko van der Sloot]
+ * release
+ * some bug fixes for FoliA support
+
+0.12.18 - 2014-09-16
+ * A true FrogAPI is added
+ * depends on ticcutils 0.6 or above (for CommandLine mostly)
  * a lot of changes in the MBMA module. It now can produce nested morphemes
      using the --daring option of frog. Still experimental!
  * Frog can now run interactive with readline support too.
  * -t option is optional, multiple inputfiles are supported
  * -o works for multiple files
+ * -d works better now (--debug even better)
+ * added xml:id to Entities and Chunks
+ * a lot off small bug fixes
 
 0.12.17 - 2013-04-03
  * the servermode now kan handle multiline input (non XML only).
-   Can be switched of with the -n option.
+   Can be switched off with the -n option.
  * A lot of refactoring regarding FoLiA stuff
  * start using ticcutils
  * the -Q option now works
diff --git a/README b/README
old mode 100755
new mode 100644
index 6c3455f..6ad2495
--- a/README
+++ b/README
@@ -1,51 +1,102 @@
-frog - A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for Dutch
+[![Build Status](https://travis-ci.org/LanguageMachines/frog.svg?branch=master)](https://travis-ci.org/LanguageMachines/frog) [![Language Machines Badge](http://applejack.science.ru.nl/lamabadge.php/frog)](http://applejack.science.ru.nl/languagemachines/) 
 
-http://ilk.uvt.nl/frog
- 
-Copyright 2006, 2012 Bertjan Busser, Antal van den Bosch, and Ko van der Sloot
+==============================================================================
+Frog - A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for Dutch
+==============================================================================
 
-ILK Research Group, Faculty of Humanities, Tilburg University http://ilk.uvt.nl
+    Copyright 2006-2016
+    Bertjan Busser, Antal van den Bosch,  Ko van der Sloot, Maarten van Gompel
 
-frog is free software; you can redistribute it and/or modify it under the terms
+    Centre for Language and Speech Technology, Radboud University Nijmegen
+    Induction of Linguistic Knowledge Research Group, Tilburg University
+
+**Website:** https://languagemachines.github.io/frog
+
+Frog is an integration of memory-based natural language processing (NLP)
+modules developed for Dutch. All NLP modules are based on Timbl, the Tilburg
+memory-based learning software package. Most modules were created in the 1990s
+at the ILK Research Group (Tilburg University, the Netherlands) and the CLiPS
+Research Centre (University of Antwerp, Belgium). Over the years they have been
+integrated into a single text processing tool, which is currently maintained
+and developed by the Language Machines Research Group and the Centre for
+Language and Speech Technology at Radboud University Nijmegen. A dependency
+parser, a base phrase chunker, and a named-entity recognizer module were added
+more recently. Where possible, Frog makes use of multi-processor support to run
+subtasks in parallel.
+
+Various (re)programming rounds have been made possible through funding by NWO,
+the Netherlands Organisation for Scientific Research, particularly under the
+CGN project, the IMIX programme, the Implicit Linguistics project, the
+CLARIN-NL programme and the CLARIAH programme.
+
+-----------------------------------------------------------------------------
+
+Frog 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.
+either version 3 of the License, or (at your option) any later version (see the file COPYING)
 
 frog 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/>.
+Comments and bug-reports are welcome at our issue tracker at
+https://github.com/LanguageMachines/frog/issues or by mailing
+lamasoftware (at) science.ru.nl.
+Updates and more info may be found on
+https://languagemachines.github.io/frog .
 
-For questions and suggestions, see:
-      http://ilk.uvt.nl/software.html
-or send mail to:
-      timbl at uvt.nl
 
--------------------------------------------------------------------------------
-Preliminary note
+----------------------------------------------------------------------------
 
-Frog can be considered beta software, and, as of 2012-06, is being stabilized.
-All planned functionality (including a dependency parser, the multi-word
-chunker, Named Entity Recognition, Chunking and error handling and reporting)
-has been implemented and tested.
+This software has been tested on:
+- Intel platforms running several versions of Linux, including Ubuntu, Debian,
+  Arch Linux, Fedora (both 32 and 64 bits)
+- Apple platform running Mac OS X 10.10
 
--------------------------------------------------------------------------------
-Installation and Quick Start
+Contents of this distribution:
+- Sources
+- Licensing information ( COPYING )
+- Installation instructions ( INSTALL )
+- Build system based on GNU Autotools
+- Example data files ( in the demos directory )
+- Documentation ( in the docs directory )
+
+To install Frog, first consult whether your distribution's package manager has
+an up-to-date package.  If not, for easy installation of Frog and its many
+dependencies, it is included as part of our software distribution
+**LaMachine**: https://proycon.github.io/LaMachine . 
+
+To be able to succesfully build Frog from source instead, you need the following dependencies:
+- A sane C++ build enviroment with autoconf, automake, autoconf-archive, pkg-config, gcc or clang,  libtool
+- libxml2-dev
+- libicu-dev
+- [ticcutils](https://github.com/LanguageMachines/ticcutils)
+- [libfolia](https://github.com/LanguageMachines/libfolia)
+- [ucto](https://github.com/LanguageMachines/ucto)
+- [timbl](https://github.com/LanguageMachines/timbl)
+- [mbt](https://github.com/LanguageMachines/mbt)
+
+The data for Frog is packaged seperately and needs to be installed prior to installing frog:
+- [frogdata](https://github.com/LanguageMachines/frogdata)
+
+To compile and install manually from source instead, provided you have all the dependencies installed:
+
+    $ bash bootstrap.sh
+    $ ./configure
+    $ make
+    $ make install
+
+and optionally:
+    $ make check
 
-TODO
 
 -------------------------------------------------------------------------------
 Credits
+-------------------------------------------------------------------------------
 
 Many thanks go out to the people who made the developments of the Frog
 components possible: Walter Daelemans, Jakub Zavrel, Ko van der Sloot, Sabine
-Buchholz, Sander Canisius, Gert Durieux, and Peter Berck. 
+Buchholz, Sander Canisius, Gert Durieux, Peter Berck and Maarten van Gompel.
 
 Thanks to Erik Tjong Kim Sang and Lieve Macken for stress-testing the first
 versions of Tadpole, the predecessor of Frog
-
--------------------------------------------------------------------------------
-References
-
-TODO
diff --git a/TODO b/TODO
index 0d6c5f4..b3a3d06 100644
--- a/TODO
+++ b/TODO
@@ -4,7 +4,6 @@
   dir: Frog all files in dir
   port: run as a server
 * rethink/arrange common datastructures
-* replace slow Python parser by C++ thing?
 * Make server also support daemonizing stuff and --pid and --log
   (server now logs to terminal)
 * Server logs incorrect timing (seems to count from the moment the client is accepted)
diff --git a/aclocal.m4 b/aclocal.m4
index f3d389a..86e8443 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.15 -*- Autoconf -*-
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -20,7 +20,7 @@ You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
 
-# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
 # generated from the m4 files accompanying Automake X.Y.
 # (This private macro should not be called outside this file.)
 AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.14'
+[am__api_version='1.15'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.14.1], [],
+m4_if([$1], [1.15], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.14.1])dnl
+[AM_AUTOMAKE_VERSION([1.15])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -103,15 +103,14 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 # configured tree to be moved without reconfiguration.
 
 AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
 ])
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -142,7 +141,7 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -333,7 +332,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -409,7 +408,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -499,8 +498,8 @@ AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
+# We need awk for the "check" target (and possibly the TAP driver).  The
+# system "awk" is bad on some platforms.
 AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
@@ -573,7 +572,11 @@ to "yes", and re-run configure.
 END
     AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
   fi
-fi])
+fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
+])
 
 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
@@ -602,7 +605,7 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -613,7 +616,7 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co
 # Define $install_sh.
 AC_DEFUN([AM_PROG_INSTALL_SH],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
   case $am_aux_dir in
   *\ * | *\	*)
     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -623,7 +626,7 @@ if test x"${install_sh}" != xset; then
 fi
 AC_SUBST([install_sh])])
 
-# Copyright (C) 2003-2013 Free Software Foundation, Inc.
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -644,7 +647,7 @@ AC_SUBST([am__leading_dot])])
 
 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -694,7 +697,7 @@ rm -f confinc confmf
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -733,7 +736,7 @@ fi
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -762,7 +765,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -809,242 +812,7 @@ AC_LANG_POP([C])])
 # For backward compatibility.
 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-
-# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-# ---------------------------------------------------------------------------
-# Adds support for distributing Python modules and packages.  To
-# install modules, copy them to $(pythondir), using the python_PYTHON
-# automake variable.  To install a package with the same name as the
-# automake package, install to $(pkgpythondir), or use the
-# pkgpython_PYTHON automake variable.
-#
-# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
-# locations to install python extension modules (shared libraries).
-# Another macro is required to find the appropriate flags to compile
-# extension modules.
-#
-# If your package is configured with a different prefix to python,
-# users will have to add the install directory to the PYTHONPATH
-# environment variable, or create a .pth file (see the python
-# documentation for details).
-#
-# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
-# cause an error if the version of python installed on the system
-# doesn't meet the requirement.  MINIMUM-VERSION should consist of
-# numbers and dots only.
-AC_DEFUN([AM_PATH_PYTHON],
- [
-  dnl Find a Python interpreter.  Python versions prior to 2.0 are not
-  dnl supported. (2.0 was released on October 16, 2000).
-  m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
-[python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl
- python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
-
-  AC_ARG_VAR([PYTHON], [the Python interpreter])
-
-  m4_if([$1],[],[
-    dnl No version check is needed.
-    # Find any Python interpreter.
-    if test -z "$PYTHON"; then
-      AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
-    fi
-    am_display_PYTHON=python
-  ], [
-    dnl A version check is needed.
-    if test -n "$PYTHON"; then
-      # If the user set $PYTHON, use it and don't search something else.
-      AC_MSG_CHECKING([whether $PYTHON version is >= $1])
-      AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
-			      [AC_MSG_RESULT([yes])],
-			      [AC_MSG_RESULT([no])
-			       AC_MSG_ERROR([Python interpreter is too old])])
-      am_display_PYTHON=$PYTHON
-    else
-      # Otherwise, try each interpreter until we find one that satisfies
-      # VERSION.
-      AC_CACHE_CHECK([for a Python interpreter with version >= $1],
-	[am_cv_pathless_PYTHON],[
-	for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
-	  test "$am_cv_pathless_PYTHON" = none && break
-	  AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
-	done])
-      # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
-      if test "$am_cv_pathless_PYTHON" = none; then
-	PYTHON=:
-      else
-        AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
-      fi
-      am_display_PYTHON=$am_cv_pathless_PYTHON
-    fi
-  ])
-
-  if test "$PYTHON" = :; then
-  dnl Run any user-specified action, or abort.
-    m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
-  else
-
-  dnl Query Python for its version number.  Getting [:3] seems to be
-  dnl the best way to do this; it's what "site.py" does in the standard
-  dnl library.
-
-  AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
-    [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
-  AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
-
-  dnl Use the values of $prefix and $exec_prefix for the corresponding
-  dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX.  These are made
-  dnl distinct variables so they can be overridden if need be.  However,
-  dnl general consensus is that you shouldn't need this ability.
-
-  AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
-  AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
-
-  dnl At times (like when building shared libraries) you may want
-  dnl to know which OS platform Python thinks this is.
-
-  AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
-    [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
-  AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
-
-  # Just factor out some code duplication.
-  am_python_setup_sysconfig="\
-import sys
-# Prefer sysconfig over distutils.sysconfig, for better compatibility
-# with python 3.x.  See automake bug#10227.
-try:
-    import sysconfig
-except ImportError:
-    can_use_sysconfig = 0
-else:
-    can_use_sysconfig = 1
-# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
-# <https://github.com/pypa/virtualenv/issues/118>
-try:
-    from platform import python_implementation
-    if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7':
-        can_use_sysconfig = 0
-except ImportError:
-    pass"
-
-  dnl Set up 4 directories:
-
-  dnl pythondir -- where to install python scripts.  This is the
-  dnl   site-packages directory, not the python standard library
-  dnl   directory like in previous automake betas.  This behavior
-  dnl   is more consistent with lispdir.m4 for example.
-  dnl Query distutils for this directory.
-  AC_CACHE_CHECK([for $am_display_PYTHON script directory],
-    [am_cv_python_pythondir],
-    [if test "x$prefix" = xNONE
-     then
-       am_py_prefix=$ac_default_prefix
-     else
-       am_py_prefix=$prefix
-     fi
-     am_cv_python_pythondir=`$PYTHON -c "
-$am_python_setup_sysconfig
-if can_use_sysconfig:
-    sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
-else:
-    from distutils import sysconfig
-    sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
-sys.stdout.write(sitedir)"`
-     case $am_cv_python_pythondir in
-     $am_py_prefix*)
-       am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
-       am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
-       ;;
-     *)
-       case $am_py_prefix in
-         /usr|/System*) ;;
-         *)
-	  am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
-	  ;;
-       esac
-       ;;
-     esac
-    ])
-  AC_SUBST([pythondir], [$am_cv_python_pythondir])
-
-  dnl pkgpythondir -- $PACKAGE directory under pythondir.  Was
-  dnl   PYTHON_SITE_PACKAGE in previous betas, but this naming is
-  dnl   more consistent with the rest of automake.
-
-  AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
-
-  dnl pyexecdir -- directory for installing python extension modules
-  dnl   (shared libraries)
-  dnl Query distutils for this directory.
-  AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
-    [am_cv_python_pyexecdir],
-    [if test "x$exec_prefix" = xNONE
-     then
-       am_py_exec_prefix=$am_py_prefix
-     else
-       am_py_exec_prefix=$exec_prefix
-     fi
-     am_cv_python_pyexecdir=`$PYTHON -c "
-$am_python_setup_sysconfig
-if can_use_sysconfig:
-    sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'})
-else:
-    from distutils import sysconfig
-    sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix')
-sys.stdout.write(sitedir)"`
-     case $am_cv_python_pyexecdir in
-     $am_py_exec_prefix*)
-       am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
-       am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
-       ;;
-     *)
-       case $am_py_exec_prefix in
-         /usr|/System*) ;;
-         *)
-	   am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
-	   ;;
-       esac
-       ;;
-     esac
-    ])
-  AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
-
-  dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
-
-  AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
-
-  dnl Run any user-specified action.
-  $2
-  fi
-
-])
-
-
-# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
-# ---------------------------------------------------------------------------
-# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
-# Run ACTION-IF-FALSE otherwise.
-# This test uses sys.hexversion instead of the string equivalent (first
-# word of sys.version), in order to cope with versions such as 2.2c1.
-# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
-AC_DEFUN([AM_PYTHON_CHECK_VERSION],
- [prog="import sys
-# split strings by '.' and convert to numeric.  Append some zeros
-# because we need at least 4 digits for the hex conversion.
-# map returns an iterator in Python 3.0 and a list in 2.x
-minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
-minverhex = 0
-# xrange is not present in Python 3.0 and range returns an iterator
-for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
-sys.exit(sys.hexversion < minverhex)"
-  AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
-
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1063,7 +831,7 @@ AC_DEFUN([AM_RUN_LOG],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1144,7 +912,7 @@ AC_CONFIG_COMMANDS_PRE(
 rm -f conftest.file
 ])
 
-# Copyright (C) 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1204,7 +972,7 @@ AC_SUBST([AM_BACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 ])
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1232,7 +1000,7 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006-2013 Free Software Foundation, Inc.
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1251,7 +1019,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004-2013 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1382,7 +1150,6 @@ AC_SUBST([am__tar])
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
 
-m4_include([m4/ac_python_devel.m4])
 m4_include([m4/ax_icu_check.m4])
 m4_include([m4/ax_lib_readline.m4])
 m4_include([m4/ax_pthread.m4])
@@ -1391,5 +1158,4 @@ m4_include([m4/ltoptions.m4])
 m4_include([m4/ltsugar.m4])
 m4_include([m4/ltversion.m4])
 m4_include([m4/lt~obsolete.m4])
-m4_include([m4/openmp.m4])
 m4_include([m4/pkg.m4])
diff --git a/bootstrap.sh b/bootstrap.sh
index a6d82b7..ed99b2f 100644
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -1,5 +1,5 @@
-# $Id: bootstrap.sh 16619 2013-10-17 12:42:02Z sloot $
-# $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/bootstrap.sh $
+# $Id$
+# $URL$
 
 # bootstrap - script to bootstrap the distribution rolling engine
 
@@ -21,6 +21,8 @@
 automake=automake
 aclocal=aclocal
 
+ln -s README.md README
+
 # if you want to autogenerate a ChangeLog form svn:
 #
 #  svn2cl, a python script, as used in the GNU Enterprise project.
diff --git a/compile b/compile
index 531136b..a85b723 100755
--- a/compile
+++ b/compile
@@ -3,7 +3,7 @@
 
 scriptversion=2012-10-14.11; # UTC
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey at cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
diff --git a/config.guess b/config.guess
index b79252d..1659250 100755
--- a/config.guess
+++ b/config.guess
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2013 Free Software Foundation, Inc.
+#   Copyright 1992-2015 Free Software Foundation, Inc.
 
-timestamp='2013-06-10'
+timestamp='2015-08-20'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -24,12 +24,12 @@ timestamp='2013-06-10'
 # program.  This Exception is an additional permission under section 7
 # of the GNU General Public License, version 3 ("GPLv3").
 #
-# Originally written by Per Bothner.
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
 #
 # You can get the latest version of this script from:
 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 #
-# Please send patches with a ChangeLog entry to config-patches at gnu.org.
+# Please send patches to <config-patches at gnu.org>.
 
 
 me=`echo "$0" | sed -e 's,.*/,,'`
@@ -50,7 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2013 Free Software Foundation, Inc.
+Copyright 1992-2015 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."
@@ -149,7 +149,7 @@ Linux|GNU|GNU/*)
 	LIBC=gnu
 	#endif
 	EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
 	;;
 esac
 
@@ -168,20 +168,27 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	# Note: NetBSD doesn't particularly care about the vendor
 	# portion of the name.  We always set it to "unknown".
 	sysctl="sysctl -n hw.machine_arch"
-	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
-	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+	    /sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || \
+	    echo unknown)`
 	case "${UNAME_MACHINE_ARCH}" in
 	    armeb) machine=armeb-unknown ;;
 	    arm*) machine=arm-unknown ;;
 	    sh3el) machine=shl-unknown ;;
 	    sh3eb) machine=sh-unknown ;;
 	    sh5el) machine=sh5le-unknown ;;
+	    earmv*)
+		arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+		endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
+		machine=${arch}${endian}-unknown
+		;;
 	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
 	esac
 	# The Operating System including object format, if it has switched
 	# to ELF recently, or will in the future.
 	case "${UNAME_MACHINE_ARCH}" in
-	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+	    arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
 		eval $set_cc_for_build
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
 			| grep -q __ELF__
@@ -197,6 +204,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		os=netbsd
 		;;
 	esac
+	# Determine ABI tags.
+	case "${UNAME_MACHINE_ARCH}" in
+	    earm*)
+		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+		abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
+		;;
+	esac
 	# The OS release
 	# Debian GNU/NetBSD machines have a different userland, and
 	# thus, need a distinct triplet. However, they do not need
@@ -207,13 +221,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		release='-gnu'
 		;;
 	    *)
-		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
 		;;
 	esac
 	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
 	# contains redundant information, the shorter form:
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-	echo "${machine}-${os}${release}"
+	echo "${machine}-${os}${release}${abi}"
 	exit ;;
     *:Bitrig:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
@@ -235,6 +249,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     *:MirBSD:*:*)
 	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
 	exit ;;
+    *:Sortix:*:*)
+	echo ${UNAME_MACHINE}-unknown-sortix
+	exit ;;
     alpha:OSF1:*:*)
 	case $UNAME_RELEASE in
 	*4.0)
@@ -579,8 +596,9 @@ EOF
 	else
 		IBM_ARCH=powerpc
 	fi
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
+	if [ -x /usr/bin/lslpp ] ; then
+		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
 	else
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 	fi
@@ -826,7 +844,7 @@ EOF
     *:MINGW*:*)
 	echo ${UNAME_MACHINE}-pc-mingw32
 	exit ;;
-    i*:MSYS*:*)
+    *:MSYS*:*)
 	echo ${UNAME_MACHINE}-pc-msys
 	exit ;;
     i*:windows32*:*)
@@ -932,6 +950,9 @@ EOF
     crisv32:Linux:*:*)
 	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
 	exit ;;
+    e2k:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
     frv:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
@@ -969,10 +990,10 @@ EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
 	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
 	;;
-    or1k:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+    openrisc*:Linux:*:*)
+	echo or1k-unknown-linux-${LIBC}
 	exit ;;
-    or32:Linux:*:*)
+    or32:Linux:*:* | or1k*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     padre:Linux:*:*)
@@ -1020,7 +1041,7 @@ EOF
 	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
 	exit ;;
     x86_64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
 	exit ;;
     xtensa*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
@@ -1260,16 +1281,26 @@ EOF
 	if test "$UNAME_PROCESSOR" = unknown ; then
 	    UNAME_PROCESSOR=powerpc
 	fi
-	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-	    if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-		grep IS_64BIT_ARCH >/dev/null
-	    then
-		case $UNAME_PROCESSOR in
-		    i386) UNAME_PROCESSOR=x86_64 ;;
-		    powerpc) UNAME_PROCESSOR=powerpc64 ;;
-		esac
+	if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+	    if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		    (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		    grep IS_64BIT_ARCH >/dev/null
+		then
+		    case $UNAME_PROCESSOR in
+			i386) UNAME_PROCESSOR=x86_64 ;;
+			powerpc) UNAME_PROCESSOR=powerpc64 ;;
+		    esac
+		fi
 	    fi
+	elif test "$UNAME_PROCESSOR" = i386 ; then
+	    # Avoid executing cc on OS X 10.9, as it ships with a stub
+	    # that puts up a graphical alert prompting to install
+	    # developer tools.  Any system running Mac OS X 10.7 or
+	    # later (Darwin 11 and later) is required to have a 64-bit
+	    # processor. This is not true of the ARM version of Darwin
+	    # that Apple uses in portable devices.
+	    UNAME_PROCESSOR=x86_64
 	fi
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
 	exit ;;
@@ -1361,154 +1392,6 @@ EOF
 	exit ;;
 esac
 
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-	"4"
-#else
-	""
-#endif
-	); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-	printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-	printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-#  include <sys/param.h>
-#  if defined (BSD)
-#   if BSD == 43
-      printf ("vax-dec-bsd4.3\n"); exit (0);
-#   else
-#    if BSD == 199006
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#    else
-      printf ("vax-dec-bsd\n"); exit (0);
-#    endif
-#   endif
-#  else
-    printf ("vax-dec-bsd\n"); exit (0);
-#  endif
-# else
-    printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
-	{ echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-	echo c1-convex-bsd
-	exit ;;
-    c2*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-	exit ;;
-    c34*)
-	echo c34-convex-bsd
-	exit ;;
-    c38*)
-	echo c38-convex-bsd
-	exit ;;
-    c4*)
-	echo c4-convex-bsd
-	exit ;;
-    esac
-fi
-
 cat >&2 <<EOF
 $0: unable to guess system type
 
diff --git a/config.h.in b/config.h.in
index a10231f..eddcd69 100644
--- a/config.h.in
+++ b/config.h.in
@@ -40,12 +40,6 @@
 /* Have PTHREAD_PRIO_INHERIT. */
 #undef HAVE_PTHREAD_PRIO_INHERIT
 
-/* If available, contains the Python version number currently in use. */
-#undef HAVE_PYTHON
-
-/* Define to 1 if you have the <Python.h> header file. */
-#undef HAVE_PYTHON_H
-
 /* Define to 1 if you have the <readline.h> header file. */
 #undef HAVE_READLINE_H
 
@@ -105,8 +99,7 @@
 /* Define to 1 if the system has the type `_Bool'. */
 #undef HAVE__BOOL
 
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
-   */
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
 #undef LT_OBJDIR
 
 /* Name of package */
@@ -140,6 +133,12 @@
 /* Version number of package */
 #undef VERSION
 
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+#undef inline
+#endif
+
 /* Define to `int' if <sys/types.h> does not define. */
 #undef pid_t
 
diff --git a/config.sub b/config.sub
index 9633db7..1acc966 100755
--- a/config.sub
+++ b/config.sub
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright 1992-2013 Free Software Foundation, Inc.
+#   Copyright 1992-2015 Free Software Foundation, Inc.
 
-timestamp='2013-08-10'
+timestamp='2015-08-20'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ timestamp='2013-08-10'
 # of the GNU General Public License, version 3 ("GPLv3").
 
 
-# Please send patches with a ChangeLog entry to config-patches at gnu.org.
+# Please send patches to <config-patches at gnu.org>.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
@@ -68,7 +68,7 @@ Report bugs and patches to <config-patches at gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright 1992-2013 Free Software Foundation, Inc.
+Copyright 1992-2015 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."
@@ -117,7 +117,7 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
   linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
-  knetbsd*-gnu* | netbsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
   kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
@@ -255,16 +255,18 @@ case $basic_machine in
 	| arc | arceb \
 	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
 	| avr | avr32 \
+	| ba \
 	| be32 | be64 \
 	| bfin \
 	| c4x | c8051 | clipper \
 	| d10v | d30v | dlx | dsp16xx \
-	| epiphany \
-	| fido | fr30 | frv \
+	| e2k | epiphany \
+	| fido | fr30 | frv | ft32 \
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
 	| hexagon \
 	| i370 | i860 | i960 | ia64 \
 	| ip2k | iq2000 \
+	| k1om \
 	| le32 | le64 \
 	| lm32 \
 	| m32c | m32r | m32rle | m68000 | m68k | m88k \
@@ -282,8 +284,10 @@ case $basic_machine in
 	| mips64vr5900 | mips64vr5900el \
 	| mipsisa32 | mipsisa32el \
 	| mipsisa32r2 | mipsisa32r2el \
+	| mipsisa32r6 | mipsisa32r6el \
 	| mipsisa64 | mipsisa64el \
 	| mipsisa64r2 | mipsisa64r2el \
+	| mipsisa64r6 | mipsisa64r6el \
 	| mipsisa64sb1 | mipsisa64sb1el \
 	| mipsisa64sr71k | mipsisa64sr71kel \
 	| mipsr5900 | mipsr5900el \
@@ -295,14 +299,14 @@ case $basic_machine in
 	| nds32 | nds32le | nds32be \
 	| nios | nios2 | nios2eb | nios2el \
 	| ns16k | ns32k \
-	| open8 \
-	| or1k | or32 \
+	| open8 | or1k | or1knd | or32 \
 	| pdp10 | pdp11 | pj | pjl \
 	| powerpc | powerpc64 | powerpc64le | powerpcle \
 	| pyramid \
+	| riscv32 | riscv64 \
 	| rl78 | rx \
 	| score \
-	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
 	| sh64 | sh64le \
 	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
 	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
@@ -310,6 +314,7 @@ case $basic_machine in
 	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
 	| ubicom32 \
 	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+	| visium \
 	| we32k \
 	| x86 | xc16x | xstormy16 | xtensa \
 	| z8k | z80)
@@ -324,7 +329,10 @@ case $basic_machine in
 	c6x)
 		basic_machine=tic6x-unknown
 		;;
-	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+	leon|leon[3-9])
+		basic_machine=sparc-$basic_machine
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
 		basic_machine=$basic_machine-unknown
 		os=-none
 		;;
@@ -369,18 +377,20 @@ case $basic_machine in
 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
 	| avr-* | avr32-* \
+	| ba-* \
 	| be32-* | be64-* \
 	| bfin-* | bs2000-* \
 	| c[123]* | c30-* | [cjt]90-* | c4x-* \
 	| c8051-* | clipper-* | craynv-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
-	| elxsi-* \
+	| e2k-* | elxsi-* \
 	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
 	| h8300-* | h8500-* \
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
 	| hexagon-* \
 	| i*86-* | i860-* | i960-* | ia64-* \
 	| ip2k-* | iq2000-* \
+	| k1om-* \
 	| le32-* | le64-* \
 	| lm32-* \
 	| m32c-* | m32r-* | m32rle-* \
@@ -400,8 +410,10 @@ case $basic_machine in
 	| mips64vr5900-* | mips64vr5900el-* \
 	| mipsisa32-* | mipsisa32el-* \
 	| mipsisa32r2-* | mipsisa32r2el-* \
+	| mipsisa32r6-* | mipsisa32r6el-* \
 	| mipsisa64-* | mipsisa64el-* \
 	| mipsisa64r2-* | mipsisa64r2el-* \
+	| mipsisa64r6-* | mipsisa64r6el-* \
 	| mipsisa64sb1-* | mipsisa64sb1el-* \
 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
 	| mipsr5900-* | mipsr5900el-* \
@@ -413,16 +425,18 @@ case $basic_machine in
 	| nios-* | nios2-* | nios2eb-* | nios2el-* \
 	| none-* | np1-* | ns16k-* | ns32k-* \
 	| open8-* \
+	| or1k*-* \
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
 	| pyramid-* \
+	| riscv32-* | riscv64-* \
 	| rl78-* | romp-* | rs6000-* | rx-* \
 	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
 	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
 	| tahoe-* \
 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
 	| tile*-* \
@@ -430,6 +444,7 @@ case $basic_machine in
 	| ubicom32-* \
 	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
 	| vax-* \
+	| visium-* \
 	| we32k-* \
 	| x86-* | x86_64-* | xc16x-* | xps100-* \
 	| xstormy16-* | xtensa*-* \
@@ -506,6 +521,9 @@ case $basic_machine in
 		basic_machine=i386-pc
 		os=-aros
 		;;
+        asmjs)
+		basic_machine=asmjs-unknown
+		;;
 	aux)
 		basic_machine=m68k-apple
 		os=-aux
@@ -767,6 +785,9 @@ case $basic_machine in
 		basic_machine=m68k-isi
 		os=-sysv
 		;;
+	leon-*|leon[3-9]-*)
+		basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
+		;;
 	m68knommu)
 		basic_machine=m68k-unknown
 		os=-linux
@@ -822,6 +843,10 @@ case $basic_machine in
 		basic_machine=powerpc-unknown
 		os=-morphos
 		;;
+	moxiebox)
+		basic_machine=moxie-unknown
+		os=-moxiebox
+		;;
 	msdos)
 		basic_machine=i386-pc
 		os=-msdos
@@ -1354,7 +1379,7 @@ case $os in
 	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
 	      | -sym* | -kopensolaris* | -plan9* \
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* | -aros* \
+	      | -aos* | -aros* | -cloudabi* | -sortix* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
 	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
@@ -1367,14 +1392,14 @@ case $os in
 	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
 	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
 	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
-	      | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
 	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
 	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
@@ -1592,9 +1617,6 @@ case $basic_machine in
 	mips*-*)
 		os=-elf
 		;;
-	or1k-*)
-		os=-elf
-		;;
 	or32-*)
 		os=-coff
 		;;
diff --git a/configure b/configure
index 63591cd..c7be1d1 100755
--- a/configure
+++ b/configure
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for frog 0.12.18.
+# Generated by GNU Autoconf 2.69 for frog 0.13.4.
 #
-# Report bugs to <timbl at uvt.nl>.
+# Report bugs to <lamasoftware at science.ru.nl>.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -274,10 +274,11 @@ fi
     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
   else
-    $as_echo "$0: Please tell bug-autoconf at gnu.org and timbl at uvt.nl about
-$0: your system, including any error possibly output before
-$0: this message. Then install a modern shell, or manually
-$0: run the script under such a shell if you do have one."
+    $as_echo "$0: Please tell bug-autoconf at gnu.org and
+$0: lamasoftware at science.ru.nl about your system, including
+$0: any error possibly output before this message. Then
+$0: install a modern shell, or manually run the script
+$0: under such a shell if you do have one."
   fi
   exit 1
 fi
@@ -589,9 +590,9 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='frog'
 PACKAGE_TARNAME='frog'
-PACKAGE_VERSION='0.12.18'
-PACKAGE_STRING='frog 0.12.18'
-PACKAGE_BUGREPORT='timbl at uvt.nl'
+PACKAGE_VERSION='0.13.4'
+PACKAGE_STRING='frog 0.13.4'
+PACKAGE_BUGREPORT='lamasoftware at science.ru.nl'
 PACKAGE_URL=''
 
 ac_unique_file="configure.ac"
@@ -635,33 +636,18 @@ ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
-PYTHON_EXTRA_LDFLAGS
-PYTHON_EXTRA_LIBS
-PYTHON_SITE_PKG
-PYTHON_LDFLAGS
-PYTHON_CPPFLAGS
-PYTHONDIR
-pkgpyexecdir
-pyexecdir
-pkgpythondir
-pythondir
-PYTHON_PLATFORM
-PYTHON_EXEC_PREFIX
-PYTHON_PREFIX
-PYTHON_VERSION
-PYTHON
+frogdata_LIBS
+frogdata_CFLAGS
 ucto_LIBS
 ucto_CFLAGS
 folia_LIBS
 folia_CFLAGS
 mbt_LIBS
 mbt_CFLAGS
-timblserver_LIBS
-timblserver_CFLAGS
-ticcutils_LIBS
-ticcutils_CFLAGS
 timbl_LIBS
 timbl_CFLAGS
+ticcutils_LIBS
+ticcutils_CFLAGS
 ICU_IOLIBS
 ICU_LIBS
 ICU_LIBPATH
@@ -676,6 +662,7 @@ pkgconfigpath
 PKG_CONFIG_LIBDIR
 PKG_CONFIG_PATH
 PKG_CONFIG
+OPENMP_CXXFLAGS
 PTHREAD_CFLAGS
 PTHREAD_LIBS
 PTHREAD_CC
@@ -683,6 +670,7 @@ ax_pthread_config
 SYSCONFDIR
 CXXCPP
 CPP
+LT_SYS_LIBRARY_PATH
 OTOOL64
 OTOOL
 LIPO
@@ -781,6 +769,7 @@ infodir
 docdir
 oldincludedir
 includedir
+runstatedir
 localstatedir
 sharedstatedir
 sysconfdir
@@ -809,17 +798,17 @@ enable_shared
 enable_static
 with_pic
 enable_fast_install
+with_aix_soname
 with_gnu_ld
 with_sysroot
 enable_libtool_lock
+enable_openmp
 with_icu
-with_timbl
 with_ticcutils
-with_timblserver
+with_timbl
 with_mbt
 with_folia
 with_ucto
-with_python
 '
       ac_precious_vars='build_alias
 host_alias
@@ -832,6 +821,7 @@ CPPFLAGS
 CCC
 CC
 CFLAGS
+LT_SYS_LIBRARY_PATH
 CPP
 CXXCPP
 PKG_CONFIG
@@ -839,20 +829,18 @@ PKG_CONFIG_PATH
 PKG_CONFIG_LIBDIR
 XML2_CFLAGS
 XML2_LIBS
-timbl_CFLAGS
-timbl_LIBS
 ticcutils_CFLAGS
 ticcutils_LIBS
-timblserver_CFLAGS
-timblserver_LIBS
+timbl_CFLAGS
+timbl_LIBS
 mbt_CFLAGS
 mbt_LIBS
 folia_CFLAGS
 folia_LIBS
 ucto_CFLAGS
 ucto_LIBS
-PYTHON
-PYTHON_VERSION'
+frogdata_CFLAGS
+frogdata_LIBS'
 
 
 # Initialize some variables set by options.
@@ -891,6 +879,7 @@ datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1143,6 +1132,15 @@ do
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
 
+  -runstatedir | --runstatedir | --runstatedi | --runstated \
+  | --runstate | --runstat | --runsta | --runst | --runs \
+  | --run | --ru | --r)
+    ac_prev=runstatedir ;;
+  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+  | --run=* | --ru=* | --r=*)
+    runstatedir=$ac_optarg ;;
+
   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1280,7 +1278,7 @@ fi
 for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
 		datadir sysconfdir sharedstatedir localstatedir includedir \
 		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-		libdir localedir mandir
+		libdir localedir mandir runstatedir
 do
   eval ac_val=\$$ac_var
   # Remove trailing slashes.
@@ -1393,7 +1391,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures frog 0.12.18 to adapt to many kinds of systems.
+\`configure' configures frog 0.13.4 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1433,6 +1431,7 @@ Fine tuning of the installation directories:
   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
   --libdir=DIR            object code libraries [EPREFIX/lib]
   --includedir=DIR        C header files [PREFIX/include]
   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
@@ -1463,7 +1462,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of frog 0.12.18:";;
+     short | recursive ) echo "Configuration of frog 0.13.4:";;
    esac
   cat <<\_ACEOF
 
@@ -1482,23 +1481,25 @@ Optional Features:
   --enable-fast-install[=PKGS]
                           optimize for fast installation [default=yes]
   --disable-libtool-lock  avoid locking (might break parallel builds)
+  --disable-openmp        do not use OpenMP
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-pic              try to use only PIC/non-PIC objects [default=use
+  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
                           both]
+  --with-aix-soname=aix|svr4|both
+                          shared library versioning (aka "SONAME") variant to
+                          provide on AIX, [default=aix].
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
-  --with-sysroot=DIR Search for dependent libraries within DIR
-                        (or the compiler's sysroot if not specified).
-  --with-icu=DIR       use ICU installed in <DIR>
-  --with-timbl=DIR       use timbl installed in <DIR>
+  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
+                          compiler's sysroot if not specified).
+ --with-icu=DIR use ICU installed in <DIR>
   --with-ticcutils=DIR       use ticcutils installed in <DIR>
-  --with-timblserver=DIR     use timblserver installed in <DIR>
+  --with-timbl=DIR       use timbl installed in <DIR>
   --with-mbt=DIR       use mbt installed in <DIR>
   --with-folia=DIR       use libfolia installed in <DIR>
   --with-ucto=DIR       use ucto installed in <DIR>
-  --with-python=DIR       use python executable installed in <DIR>
 
 Some influential environment variables:
   CXX         C++ compiler command
@@ -1510,6 +1511,8 @@ Some influential environment variables:
               you have headers in a nonstandard directory <include dir>
   CC          C compiler command
   CFLAGS      C compiler flags
+  LT_SYS_LIBRARY_PATH
+              User-defined run-time library search path.
   CPP         C preprocessor
   CXXCPP      C++ preprocessor
   PKG_CONFIG  path to pkg-config utility
@@ -1519,17 +1522,13 @@ Some influential environment variables:
               path overriding pkg-config's built-in search path
   XML2_CFLAGS C compiler flags for XML2, overriding pkg-config
   XML2_LIBS   linker flags for XML2, overriding pkg-config
-  timbl_CFLAGS
-              C compiler flags for timbl, overriding pkg-config
-  timbl_LIBS  linker flags for timbl, overriding pkg-config
   ticcutils_CFLAGS
               C compiler flags for ticcutils, overriding pkg-config
   ticcutils_LIBS
               linker flags for ticcutils, overriding pkg-config
-  timblserver_CFLAGS
-              C compiler flags for timblserver, overriding pkg-config
-  timblserver_LIBS
-              linker flags for timblserver, overriding pkg-config
+  timbl_CFLAGS
+              C compiler flags for timbl, overriding pkg-config
+  timbl_LIBS  linker flags for timbl, overriding pkg-config
   mbt_CFLAGS  C compiler flags for mbt, overriding pkg-config
   mbt_LIBS    linker flags for mbt, overriding pkg-config
   folia_CFLAGS
@@ -1537,16 +1536,15 @@ Some influential environment variables:
   folia_LIBS  linker flags for folia, overriding pkg-config
   ucto_CFLAGS C compiler flags for ucto, overriding pkg-config
   ucto_LIBS   linker flags for ucto, overriding pkg-config
-  PYTHON      the Python interpreter
-  PYTHON_VERSION
-              The installed Python version to use, for example '2.3'. This
-              string will be appended to the Python interpreter canonical
-              name.
+  frogdata_CFLAGS
+              C compiler flags for frogdata, overriding pkg-config
+  frogdata_LIBS
+              linker flags for frogdata, overriding pkg-config
 
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
 
-Report bugs to <timbl at uvt.nl>.
+Report bugs to <lamasoftware at science.ru.nl>.
 _ACEOF
 ac_status=$?
 fi
@@ -1609,7 +1607,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-frog configure 0.12.18
+frog configure 0.13.4
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2129,9 +2127,9 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## --------------------------- ##
-## Report this to timbl at uvt.nl ##
-## --------------------------- ##"
+( $as_echo "## ----------------------------------------- ##
+## Report this to lamasoftware at science.ru.nl ##
+## ----------------------------------------- ##"
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
@@ -2262,7 +2260,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by frog $as_me 0.12.18, which was
+It was created by frog $as_me 0.13.4, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2610,7 +2608,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-am__api_version='1.14'
+am__api_version='1.15'
 
 ac_aux_dir=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
@@ -2811,8 +2809,8 @@ test "$program_suffix" != NONE &&
 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
 
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
 
 if test x"${MISSING+set}" != xset; then
   case $am_aux_dir in
@@ -2831,7 +2829,7 @@ else
 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
 fi
 
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
   case $am_aux_dir in
   *\ * | *\	*)
     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -3125,7 +3123,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='frog'
- VERSION='0.12.18'
+ VERSION='0.13.4'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3159,8 +3157,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 mkdir_p='$(MKDIR_P)'
 
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
+# We need awk for the "check" target (and possibly the TAP driver).  The
+# system "awk" is bad on some platforms.
 # Always define AMTAR for backward compatibility.  Yes, it's still used
 # in the wild :-(  We should find a proper way to deprecate it ...
 AMTAR='$${TAR-tar}'
@@ -3219,6 +3217,7 @@ END
 fi
 
 
+
 ac_config_headers="$ac_config_headers config.h"
 
 
@@ -3240,7 +3239,7 @@ if test -z "$CXX"; then
     CXX=$CCC
   else
     if test -n "$ac_tool_prefix"; then
-  for ac_prog in g++
+  for ac_prog in g++ c++
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
@@ -3284,7 +3283,7 @@ fi
 fi
 if test -z "$CXX"; then
   ac_ct_CXX=$CXX
-  for ac_prog in g++
+  for ac_prog in g++ c++
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -3942,8 +3941,8 @@ esac
 
 
 
-macro_version='2.4.2'
-macro_revision='1.3337'
+macro_version='2.4.6'
+macro_revision='2.4.6'
 
 
 
@@ -3957,7 +3956,7 @@ macro_revision='1.3337'
 
 
 
-ltmain="$ac_aux_dir/ltmain.sh"
+ltmain=$ac_aux_dir/ltmain.sh
 
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
@@ -4077,7 +4076,7 @@ func_echo_all ()
     $ECHO ""
 }
 
-case "$ECHO" in
+case $ECHO in
   printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
 $as_echo "printf" >&6; } ;;
   print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
@@ -5126,19 +5125,19 @@ test -z "$GREP" && GREP=grep
 
 # Check whether --with-gnu-ld was given.
 if test "${with_gnu_ld+set}" = set; then :
-  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
 else
   with_gnu_ld=no
 fi
 
 ac_prog=ld
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   # Check if gcc -print-prog-name=ld gives a path.
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
 $as_echo_n "checking for ld used by $CC... " >&6; }
   case $host in
   *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
+    # gcc leaves a trailing carriage return, which upsets mingw
     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
   *)
     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
@@ -5152,7 +5151,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
 	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
       done
-      test -z "$LD" && LD="$ac_prog"
+      test -z "$LD" && LD=$ac_prog
       ;;
   "")
     # If it fails, then pretend we aren't using GCC.
@@ -5163,7 +5162,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
     with_gnu_ld=unknown
     ;;
   esac
-elif test "$with_gnu_ld" = yes; then
+elif test yes = "$with_gnu_ld"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
 $as_echo_n "checking for GNU ld... " >&6; }
 else
@@ -5174,32 +5173,32 @@ if ${lt_cv_path_LD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
   for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
     test -z "$ac_dir" && ac_dir=.
     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
+      lt_cv_path_LD=$ac_dir/$ac_prog
       # Check to see if the program is GNU ld.  I'd rather use --version,
       # but apparently some variants of GNU ld only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
       *GNU* | *'with BFD'*)
-	test "$with_gnu_ld" != no && break
+	test no != "$with_gnu_ld" && break
 	;;
       *)
-	test "$with_gnu_ld" != yes && break
+	test yes != "$with_gnu_ld" && break
 	;;
       esac
     fi
   done
-  IFS="$lt_save_ifs"
+  IFS=$lt_save_ifs
 else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+  lt_cv_path_LD=$LD # Let the user override the test with a path.
 fi
 fi
 
-LD="$lt_cv_path_LD"
+LD=$lt_cv_path_LD
 if test -n "$LD"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
 $as_echo "$LD" >&6; }
@@ -5242,33 +5241,38 @@ if ${lt_cv_path_NM+:} false; then :
 else
   if test -n "$NM"; then
   # Let the user override the test.
-  lt_cv_path_NM="$NM"
+  lt_cv_path_NM=$NM
 else
-  lt_nm_to_check="${ac_tool_prefix}nm"
+  lt_nm_to_check=${ac_tool_prefix}nm
   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
     lt_nm_to_check="$lt_nm_to_check nm"
   fi
   for lt_tmp_nm in $lt_nm_to_check; do
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       test -z "$ac_dir" && ac_dir=.
-      tmp_nm="$ac_dir/$lt_tmp_nm"
-      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+      tmp_nm=$ac_dir/$lt_tmp_nm
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
 	# Check to see if the nm accepts a BSD-compat flag.
-	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
+	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
 	#   nm: unknown option "B" ignored
 	# Tru64's nm complains that /dev/null is an invalid object file
-	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
-	*/dev/null* | *'Invalid file or object type'*)
+	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
+	case $build_os in
+	mingw*) lt_bad_file=conftest.nm/nofile ;;
+	*) lt_bad_file=/dev/null ;;
+	esac
+	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+	*$lt_bad_file* | *'Invalid file or object type'*)
 	  lt_cv_path_NM="$tmp_nm -B"
-	  break
+	  break 2
 	  ;;
 	*)
 	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
 	  */dev/null*)
 	    lt_cv_path_NM="$tmp_nm -p"
-	    break
+	    break 2
 	    ;;
 	  *)
 	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
@@ -5279,15 +5283,15 @@ else
 	esac
       fi
     done
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
   done
   : ${lt_cv_path_NM=no}
 fi
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
 $as_echo "$lt_cv_path_NM" >&6; }
-if test "$lt_cv_path_NM" != "no"; then
-  NM="$lt_cv_path_NM"
+if test no != "$lt_cv_path_NM"; then
+  NM=$lt_cv_path_NM
 else
   # Didn't find any BSD compatible name lister, look for dumpbin.
   if test -n "$DUMPBIN"; then :
@@ -5393,9 +5397,9 @@ esac
   fi
 fi
 
-    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
     *COFF*)
-      DUMPBIN="$DUMPBIN -symbols"
+      DUMPBIN="$DUMPBIN -symbols -headers"
       ;;
     *)
       DUMPBIN=:
@@ -5403,8 +5407,8 @@ fi
     esac
   fi
 
-  if test "$DUMPBIN" != ":"; then
-    NM="$DUMPBIN"
+  if test : != "$DUMPBIN"; then
+    NM=$DUMPBIN
   fi
 fi
 test -z "$NM" && NM=nm
@@ -5455,7 +5459,7 @@ if ${lt_cv_sys_max_cmd_len+:} false; then :
   $as_echo_n "(cached) " >&6
 else
     i=0
-  teststring="ABCD"
+  teststring=ABCD
 
   case $build_os in
   msdosdjgpp*)
@@ -5495,7 +5499,7 @@ else
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
-  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
     # This has been around since 386BSD, at least.  Likely further.
     if test -x /sbin/sysctl; then
       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -5514,6 +5518,11 @@ else
     lt_cv_sys_max_cmd_len=196608
     ;;
 
+  os2*)
+    # The test takes a long time on OS/2.
+    lt_cv_sys_max_cmd_len=8192
+    ;;
+
   osf*)
     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
@@ -5540,22 +5549,23 @@ else
     ;;
   *)
     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
-    if test -n "$lt_cv_sys_max_cmd_len"; then
+    if test -n "$lt_cv_sys_max_cmd_len" && \
+       test undefined != "$lt_cv_sys_max_cmd_len"; then
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
     else
       # Make teststring a little bigger before we do anything with it.
       # a 1K string should be a reasonable start.
-      for i in 1 2 3 4 5 6 7 8 ; do
+      for i in 1 2 3 4 5 6 7 8; do
         teststring=$teststring$teststring
       done
       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
       # If test is not a shell built-in, we'll probably end up computing a
       # maximum length that is only half of the actual maximum length, but
       # we can't tell.
-      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
+      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
 	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
-	      test $i != 17 # 1/2 MB should be enough
+	      test 17 != "$i" # 1/2 MB should be enough
       do
         i=`expr $i + 1`
         teststring=$teststring$teststring
@@ -5573,7 +5583,7 @@ else
 
 fi
 
-if test -n $lt_cv_sys_max_cmd_len ; then
+if test -n "$lt_cv_sys_max_cmd_len"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
 else
@@ -5591,30 +5601,6 @@ max_cmd_len=$lt_cv_sys_max_cmd_len
 : ${MV="mv -f"}
 : ${RM="rm -f"}
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
-$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
-  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
-      = c,a/b,b/c, \
-    && eval 'test $(( 1 + 1 )) -eq 2 \
-    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
-  && xsi_shell=yes
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
-$as_echo "$xsi_shell" >&6; }
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
-$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
-    >/dev/null 2>&1 \
-  && lt_shell_append=yes
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
-$as_echo "$lt_shell_append" >&6; }
-
-
 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
   lt_unset=unset
 else
@@ -5737,13 +5723,13 @@ esac
 reload_cmds='$LD$reload_flag -o $output$reload_objs'
 case $host_os in
   cygwin* | mingw* | pw32* | cegcc*)
-    if test "$GCC" != yes; then
+    if test yes != "$GCC"; then
       reload_cmds=false
     fi
     ;;
   darwin*)
-    if test "$GCC" = yes; then
-      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    if test yes = "$GCC"; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
     else
       reload_cmds='$LD$reload_flag -o $output$reload_objs'
     fi
@@ -5871,13 +5857,13 @@ lt_cv_deplibs_check_method='unknown'
 # Need to set the preceding variable on all platforms that support
 # interlibrary dependencies.
 # 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
+# 'unknown' -- same as none, but documents that we really don't know.
 # 'pass_all' -- all dependencies passed with no checks.
 # 'test_compile' -- check by making test program.
 # 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
+# that responds to the $file_magic_cmd with a given extended regex.
+# If you have 'file' or equivalent on your system and you're not sure
+# whether 'pass_all' will *always* work, you probably want this one.
 
 case $host_os in
 aix[4-9]*)
@@ -5904,8 +5890,7 @@ mingw* | pw32*)
   # Base MSYS/MinGW do not provide the 'file' command needed by
   # func_win32_libid shell function, so use a weaker test based on 'objdump',
   # unless we find 'file', for example because we are cross-compiling.
-  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
-  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
+  if ( file / ) >/dev/null 2>&1; then
     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
     lt_cv_file_magic_cmd='func_win32_libid'
   else
@@ -5941,10 +5926,6 @@ freebsd* | dragonfly*)
   fi
   ;;
 
-gnu*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
 haiku*)
   lt_cv_deplibs_check_method=pass_all
   ;;
@@ -5982,8 +5963,8 @@ irix5* | irix6* | nonstopux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -6005,8 +5986,8 @@ newos6*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-openbsd*)
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+openbsd* | bitrig*)
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
   else
     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
@@ -6059,6 +6040,9 @@ sysv4 | sysv4.3*)
 tpf*)
   lt_cv_deplibs_check_method=pass_all
   ;;
+os2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 esac
 
 fi
@@ -6216,8 +6200,8 @@ else
 
 case $host_os in
 cygwin* | mingw* | pw32* | cegcc*)
-  # two different shell functions defined in ltmain.sh
-  # decide which to use based on capabilities of $DLLTOOL
+  # two different shell functions defined in ltmain.sh;
+  # decide which one to use based on capabilities of $DLLTOOL
   case `$DLLTOOL --help 2>&1` in
   *--identify-strict*)
     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
@@ -6229,7 +6213,7 @@ cygwin* | mingw* | pw32* | cegcc*)
   ;;
 *)
   # fallback: assume linklib IS sharedlib
-  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+  lt_cv_sharedlib_from_linklib_cmd=$ECHO
   ;;
 esac
 
@@ -6384,7 +6368,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
-      if test "$ac_status" -eq 0; then
+      if test 0 -eq "$ac_status"; then
 	# Ensure the archiver fails upon bogus file names.
 	rm -f conftest.$ac_objext libconftest.a
 	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
@@ -6392,7 +6376,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
-	if test "$ac_status" -ne 0; then
+	if test 0 -ne "$ac_status"; then
           lt_cv_ar_at_file=@
         fi
       fi
@@ -6405,7 +6389,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
 $as_echo "$lt_cv_ar_at_file" >&6; }
 
-if test "x$lt_cv_ar_at_file" = xno; then
+if test no = "$lt_cv_ar_at_file"; then
   archiver_list_spec=
 else
   archiver_list_spec=$lt_cv_ar_at_file
@@ -6622,14 +6606,14 @@ old_postuninstall_cmds=
 
 if test -n "$RANLIB"; then
   case $host_os in
-  openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+  bitrig* | openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
     ;;
   *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
     ;;
   esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
 fi
 
 case $host_os in
@@ -6712,7 +6696,7 @@ cygwin* | mingw* | pw32* | cegcc*)
   symcode='[ABCDGISTW]'
   ;;
 hpux*)
-  if test "$host_cpu" = ia64; then
+  if test ia64 = "$host_cpu"; then
     symcode='[ABCDEGRST]'
   fi
   ;;
@@ -6745,14 +6729,44 @@ case `$NM -V 2>&1` in
   symcode='[ABCDGIRSTW]' ;;
 esac
 
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+  # Gets list of data symbols to import.
+  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+  # Adjust the below global symbol transforms to fixup imported variables.
+  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
+  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
+  lt_c_name_lib_hook="\
+  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
+  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
+else
+  # Disable hooks by default.
+  lt_cv_sys_global_symbol_to_import=
+  lt_cdecl_hook=
+  lt_c_name_hook=
+  lt_c_name_lib_hook=
+fi
+
 # Transform an extracted symbol line into a proper C declaration.
 # Some systems (esp. on ia64) link data and code symbols differently,
 # so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+$lt_cdecl_hook\
+" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
 
 # Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+$lt_c_name_hook\
+" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
+
+# Transform an extracted symbol line into symbol name with lib prefix and
+# symbol address.
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+$lt_c_name_lib_hook\
+" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
 
 # Handle CRLF in mingw tool chain
 opt_cr=
@@ -6770,20 +6784,24 @@ for ac_symprfx in "" "_"; do
 
   # Write the raw and C identifiers.
   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
-    # Fake it for dumpbin and say T for any non-static function
-    # and D for any global variable.
+    # Fake it for dumpbin and say T for any non-static function,
+    # D for any global variable and I for any imported variable.
     # Also find C++ and __fastcall symbols from MSVC++,
     # which start with @ or ?.
     lt_cv_sys_global_symbol_pipe="$AWK '"\
 "     {last_section=section; section=\$ 3};"\
+"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
+"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
+"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
 "     \$ 0!~/External *\|/{next};"\
 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
 "     {if(hide[section]) next};"\
-"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
-"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
+"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
+"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
+"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
 "     ' prfx=^$ac_symprfx"
   else
     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
@@ -6831,11 +6849,11 @@ _LT_EOF
 	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
 	  cat <<_LT_EOF > conftest.$ac_ext
 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
-/* DATA imports from DLLs on WIN32 con't be const, because runtime
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
    relocations are performed -- see ld's documentation on pseudo-relocs.  */
 # define LT_DLSYM_CONST
-#elif defined(__osf__)
+#elif defined __osf__
 /* This system does not cope well with relocations in const data.  */
 # define LT_DLSYM_CONST
 #else
@@ -6861,7 +6879,7 @@ lt__PROGRAM__LTX_preloaded_symbols[] =
 {
   { "@PROGRAM@", (void *) 0 },
 _LT_EOF
-	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
 	  cat <<\_LT_EOF >> conftest.$ac_ext
   {0, (void *) 0}
 };
@@ -6881,13 +6899,13 @@ _LT_EOF
 	  mv conftest.$ac_objext conftstm.$ac_objext
 	  lt_globsym_save_LIBS=$LIBS
 	  lt_globsym_save_CFLAGS=$CFLAGS
-	  LIBS="conftstm.$ac_objext"
+	  LIBS=conftstm.$ac_objext
 	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
 	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
   (eval $ac_link) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest${ac_exeext}; then
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
 	    pipe_works=yes
 	  fi
 	  LIBS=$lt_globsym_save_LIBS
@@ -6908,7 +6926,7 @@ _LT_EOF
   rm -rf conftest* conftst*
 
   # Do not use the global_symbol_pipe unless it works.
-  if test "$pipe_works" = yes; then
+  if test yes = "$pipe_works"; then
     break
   else
     lt_cv_sys_global_symbol_pipe=
@@ -6961,6 +6979,16 @@ fi
 
 
 
+
+
+
+
+
+
+
+
+
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
 $as_echo_n "checking for sysroot... " >&6; }
 
@@ -6973,9 +7001,9 @@ fi
 
 
 lt_sysroot=
-case ${with_sysroot} in #(
+case $with_sysroot in #(
  yes)
-   if test "$GCC" = yes; then
+   if test yes = "$GCC"; then
      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
    fi
    ;; #(
@@ -6985,8 +7013,8 @@ case ${with_sysroot} in #(
  no|'')
    ;; #(
  *)
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
-$as_echo "${with_sysroot}" >&6; }
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
+$as_echo "$with_sysroot" >&6; }
    as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
    ;;
 esac
@@ -6998,18 +7026,99 @@ $as_echo "${lt_sysroot:-no}" >&6; }
 
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
+$as_echo_n "checking for a working dd... " >&6; }
+if ${ac_cv_path_lt_DD+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+: ${lt_DD:=$DD}
+if test -z "$lt_DD"; then
+  ac_path_lt_DD_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in dd; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_lt_DD" || continue
+if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+  cmp -s conftest.i conftest.out \
+  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
+fi
+      $ac_path_lt_DD_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_lt_DD"; then
+    :
+  fi
+else
+  ac_cv_path_lt_DD=$lt_DD
+fi
+
+rm -f conftest.i conftest2.i conftest.out
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
+$as_echo "$ac_cv_path_lt_DD" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
+$as_echo_n "checking how to truncate binary pipes... " >&6; }
+if ${lt_cv_truncate_bin+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+lt_cv_truncate_bin=
+if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+  cmp -s conftest.i conftest.out \
+  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
+fi
+rm -f conftest.i conftest2.i conftest.out
+test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
+$as_echo "$lt_cv_truncate_bin" >&6; }
+
+
+
+
+
+
+
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+    for cc_temp in $*""; do
+      case $cc_temp in
+        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+        \-*) ;;
+        *) break;;
+      esac
+    done
+    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+
 # Check whether --enable-libtool-lock was given.
 if test "${enable_libtool_lock+set}" = set; then :
   enableval=$enable_libtool_lock;
 fi
 
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+test no = "$enable_libtool_lock" || enable_libtool_lock=yes
 
 # Some flags need to be propagated to the compiler or linker for good
 # libtool support.
 case $host in
 ia64-*-hpux*)
-  # Find out which ABI we are using.
+  # Find out what ABI is being produced by ac_compile, and set mode
+  # options accordingly.
   echo 'int i;' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
@@ -7018,24 +7127,25 @@ ia64-*-hpux*)
   test $ac_status = 0; }; then
     case `/usr/bin/file conftest.$ac_objext` in
       *ELF-32*)
-	HPUX_IA64_MODE="32"
+	HPUX_IA64_MODE=32
 	;;
       *ELF-64*)
-	HPUX_IA64_MODE="64"
+	HPUX_IA64_MODE=64
 	;;
     esac
   fi
   rm -rf conftest*
   ;;
 *-*-irix6*)
-  # Find out which ABI we are using.
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.
   echo '#line '$LINENO' "configure"' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-    if test "$lt_cv_prog_gnu_ld" = yes; then
+    if test yes = "$lt_cv_prog_gnu_ld"; then
       case `/usr/bin/file conftest.$ac_objext` in
 	*32-bit*)
 	  LD="${LD-ld} -melf32bsmip"
@@ -7064,9 +7174,50 @@ ia64-*-hpux*)
   rm -rf conftest*
   ;;
 
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+mips64*-*linux*)
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.
+  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    emul=elf
+    case `/usr/bin/file conftest.$ac_objext` in
+      *32-bit*)
+	emul="${emul}32"
+	;;
+      *64-bit*)
+	emul="${emul}64"
+	;;
+    esac
+    case `/usr/bin/file conftest.$ac_objext` in
+      *MSB*)
+	emul="${emul}btsmip"
+	;;
+      *LSB*)
+	emul="${emul}ltsmip"
+	;;
+    esac
+    case `/usr/bin/file conftest.$ac_objext` in
+      *N32*)
+	emul="${emul}n32"
+	;;
+    esac
+    LD="${LD-ld} -m $emul"
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
-  # Find out which ABI we are using.
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.  Note that the listed cases only cover the
+  # situations where additional linker options are needed (such as when
+  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
+  # vice versa); the common cases where no linker options are needed do
+  # not appear in the list.
   echo 'int i;' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
@@ -7080,9 +7231,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 	    LD="${LD-ld} -m elf_i386_fbsd"
 	    ;;
 	  x86_64-*linux*)
-	    LD="${LD-ld} -m elf_i386"
+	    case `/usr/bin/file conftest.o` in
+	      *x86-64*)
+		LD="${LD-ld} -m elf32_x86_64"
+		;;
+	      *)
+		LD="${LD-ld} -m elf_i386"
+		;;
+	    esac
+	    ;;
+	  powerpc64le-*linux*)
+	    LD="${LD-ld} -m elf32lppclinux"
 	    ;;
-	  ppc64-*linux*|powerpc64-*linux*)
+	  powerpc64-*linux*)
 	    LD="${LD-ld} -m elf32ppclinux"
 	    ;;
 	  s390x-*linux*)
@@ -7101,7 +7262,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 	  x86_64-*linux*)
 	    LD="${LD-ld} -m elf_x86_64"
 	    ;;
-	  ppc*-*linux*|powerpc*-*linux*)
+	  powerpcle-*linux*)
+	    LD="${LD-ld} -m elf64lppc"
+	    ;;
+	  powerpc-*linux*)
 	    LD="${LD-ld} -m elf64ppc"
 	    ;;
 	  s390*-*linux*|s390*-*tpf*)
@@ -7119,7 +7283,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 
 *-*-sco3.2v5*)
   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  SAVE_CFLAGS="$CFLAGS"
+  SAVE_CFLAGS=$CFLAGS
   CFLAGS="$CFLAGS -belf"
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
@@ -7159,13 +7323,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
 $as_echo "$lt_cv_cc_needs_belf" >&6; }
-  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+  if test yes != "$lt_cv_cc_needs_belf"; then
     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS="$SAVE_CFLAGS"
+    CFLAGS=$SAVE_CFLAGS
   fi
   ;;
-sparc*-*solaris*)
-  # Find out which ABI we are using.
+*-*solaris*)
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.
   echo 'int i;' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
@@ -7175,7 +7340,20 @@ sparc*-*solaris*)
     case `/usr/bin/file conftest.o` in
     *64-bit*)
       case $lt_cv_prog_gnu_ld in
-      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      yes*)
+        case $host in
+        i?86-*-solaris*|x86_64-*-solaris*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        sparc*-*-solaris*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+        esac
+        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
+        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+          LD=${LD-ld}_sol2
+        fi
+        ;;
       *)
 	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
 	  LD="${LD-ld} -64"
@@ -7189,7 +7367,7 @@ sparc*-*solaris*)
   ;;
 esac
 
-need_locks="$enable_libtool_lock"
+need_locks=$enable_libtool_lock
 
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
@@ -7300,7 +7478,7 @@ else
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
-if test "x$lt_cv_path_mainfest_tool" != xyes; then
+if test yes != "$lt_cv_path_mainfest_tool"; then
   MANIFEST_TOOL=:
 fi
 
@@ -7803,7 +7981,7 @@ if ${lt_cv_apple_cc_single_mod+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_apple_cc_single_mod=no
-      if test -z "${LT_MULTI_MODULE}"; then
+      if test -z "$LT_MULTI_MODULE"; then
 	# By default we will add the -single_module flag. You can override
 	# by either setting the environment variable LT_MULTI_MODULE
 	# non-empty at configure time, or by adding -multi_module to the
@@ -7815,7 +7993,13 @@ else
 	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
 	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
         _lt_result=$?
-	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+	# If there is a non-empty error log, and "single_module"
+	# appears in it, assume the flag caused a linker warning
+        if test -s conftest.err && $GREP single_module conftest.err; then
+	  cat conftest.err >&5
+	# Otherwise, if the output was created with a 0 exit code from
+	# the compiler, it worked.
+	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
 	  lt_cv_apple_cc_single_mod=yes
 	else
 	  cat conftest.err >&5
@@ -7826,6 +8010,7 @@ else
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
 if ${lt_cv_ld_exported_symbols_list+:} false; then :
@@ -7853,11 +8038,12 @@ else
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-	LDFLAGS="$save_LDFLAGS"
+	LDFLAGS=$save_LDFLAGS
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
 $as_echo_n "checking for -force_load linker flag... " >&6; }
 if ${lt_cv_ld_force_load+:} false; then :
@@ -7879,7 +8065,9 @@ _LT_EOF
       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
       _lt_result=$?
-      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
+      if test -s conftest.err && $GREP force_load conftest.err; then
+	cat conftest.err >&5
+      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
 	lt_cv_ld_force_load=yes
       else
 	cat conftest.err >&5
@@ -7892,32 +8080,32 @@ fi
 $as_echo "$lt_cv_ld_force_load" >&6; }
     case $host_os in
     rhapsody* | darwin1.[012])
-      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
     darwin1.*)
-      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
     darwin*) # darwin 5.x on
       # if running on 10.5 or later, the deployment target defaults
       # to the OS version, if on x86, and 10.4, the deployment
       # target defaults to 10.4. Don't you love it?
       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
 	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-	10.[012]*)
-	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+	10.[012][,.]*)
+	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
 	10.*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
       esac
     ;;
   esac
-    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+    if test yes = "$lt_cv_apple_cc_single_mod"; then
       _lt_dar_single_mod='$single_module'
     fi
-    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
-      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+    if test yes = "$lt_cv_ld_exported_symbols_list"; then
+      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
     else
-      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
     fi
-    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
+    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
       _lt_dsymutil='~$DSYMUTIL $lib || :'
     else
       _lt_dsymutil=
@@ -7925,6 +8113,41 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
     ;;
   esac
 
+# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+#       string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+#       string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+#       "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+#       VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+    case x$2 in
+    x)
+        ;;
+    *:)
+        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
+        ;;
+    x:*)
+        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
+        ;;
+    *::*)
+        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
+        ;;
+    *)
+        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
+        ;;
+    esac
+}
+
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -8210,9 +8433,9 @@ done
 
 func_stripname_cnf ()
 {
-  case ${2} in
-  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
-  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+  case $2 in
+  .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;;
+  *)  func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;;
   esac
 } # func_stripname_cnf
 
@@ -8239,14 +8462,14 @@ if test "${enable_shared+set}" = set; then :
     *)
       enable_shared=no
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
       for pkg in $enableval; do
-	IFS="$lt_save_ifs"
+	IFS=$lt_save_ifs
 	if test "X$pkg" = "X$p"; then
 	  enable_shared=yes
 	fi
       done
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       ;;
     esac
 else
@@ -8270,14 +8493,14 @@ if test "${enable_static+set}" = set; then :
     *)
      enable_static=no
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
       for pkg in $enableval; do
-	IFS="$lt_save_ifs"
+	IFS=$lt_save_ifs
 	if test "X$pkg" = "X$p"; then
 	  enable_static=yes
 	fi
       done
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       ;;
     esac
 else
@@ -8295,14 +8518,27 @@ fi
 
 # Check whether --with-pic was given.
 if test "${with_pic+set}" = set; then :
-  withval=$with_pic; pic_mode="$withval"
+  withval=$with_pic; lt_p=${PACKAGE-default}
+    case $withval in
+    yes|no) pic_mode=$withval ;;
+    *)
+      pic_mode=default
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+      for lt_pkg in $withval; do
+	IFS=$lt_save_ifs
+	if test "X$lt_pkg" = "X$lt_p"; then
+	  pic_mode=yes
+	fi
+      done
+      IFS=$lt_save_ifs
+      ;;
+    esac
 else
   pic_mode=default
 fi
 
 
-test -z "$pic_mode" && pic_mode=default
-
 
 
 
@@ -8318,14 +8554,14 @@ if test "${enable_fast_install+set}" = set; then :
     *)
       enable_fast_install=no
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
       for pkg in $enableval; do
-	IFS="$lt_save_ifs"
+	IFS=$lt_save_ifs
 	if test "X$pkg" = "X$p"; then
 	  enable_fast_install=yes
 	fi
       done
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       ;;
     esac
 else
@@ -8339,11 +8575,63 @@ fi
 
 
 
+  shared_archive_member_spec=
+case $host,$enable_shared in
+power*-*-aix[5-9]*,yes)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
+$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
+
+# Check whether --with-aix-soname was given.
+if test "${with_aix_soname+set}" = set; then :
+  withval=$with_aix_soname; case $withval in
+    aix|svr4|both)
+      ;;
+    *)
+      as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
+      ;;
+    esac
+    lt_cv_with_aix_soname=$with_aix_soname
+else
+  if ${lt_cv_with_aix_soname+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_with_aix_soname=aix
+fi
+
+    with_aix_soname=$lt_cv_with_aix_soname
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
+$as_echo "$with_aix_soname" >&6; }
+  if test aix != "$with_aix_soname"; then
+    # For the AIX way of multilib, we name the shared archive member
+    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
+    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
+    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
+    # the AIX toolchain works better with OBJECT_MODE set (default 32).
+    if test 64 = "${OBJECT_MODE-32}"; then
+      shared_archive_member_spec=shr_64
+    else
+      shared_archive_member_spec=shr
+    fi
+  fi
+  ;;
+*)
+  with_aix_soname=aix
+  ;;
+esac
+
+
+
+
+
+
+
 
 
 
 # This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
+LIBTOOL_DEPS=$ltmain
 
 # Always use our own libtool.
 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
@@ -8373,6 +8661,10 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
 
 
+
+
+
+
 test -z "$LN_S" && LN_S="ln -s"
 
 
@@ -8388,7 +8680,7 @@ test -z "$LN_S" && LN_S="ln -s"
 
 
 
-if test -n "${ZSH_VERSION+set}" ; then
+if test -n "${ZSH_VERSION+set}"; then
    setopt NO_GLOB_SUBST
 fi
 
@@ -8427,7 +8719,7 @@ aix3*)
   # AIX sometimes has problems with the GCC collect2 program.  For some
   # reason, if we set the COLLECT_NAMES environment variable, the problems
   # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
+  if test set != "${COLLECT_NAMES+set}"; then
     COLLECT_NAMES=
     export COLLECT_NAMES
   fi
@@ -8438,14 +8730,14 @@ esac
 ofile=libtool
 can_build_shared=yes
 
-# All known linkers require a `.a' archive for static linking (except MSVC,
+# All known linkers require a '.a' archive for static linking (except MSVC,
 # which needs '.lib').
 libext=a
 
-with_gnu_ld="$lt_cv_prog_gnu_ld"
+with_gnu_ld=$lt_cv_prog_gnu_ld
 
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
+old_CC=$CC
+old_CFLAGS=$CFLAGS
 
 # Set sane defaults for various variables
 test -z "$CC" && CC=cc
@@ -8454,15 +8746,8 @@ test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
 test -z "$LD" && LD=ld
 test -z "$ac_objext" && ac_objext=o
 
-for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+func_cc_basename $compiler
+cc_basename=$func_cc_basename_result
 
 
 # Only perform the check for file, if the check method requires it
@@ -8477,22 +8762,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then :
 else
   case $MAGIC_CMD in
 [\\/*] |  ?:[\\/]*)
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
   ;;
 *)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  lt_save_MAGIC_CMD=$MAGIC_CMD
+  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
   for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
     test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/${ac_tool_prefix}file; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+    if test -f "$ac_dir/${ac_tool_prefix}file"; then
+      lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
       if test -n "$file_magic_test_file"; then
 	case $deplibs_check_method in
 	"file_magic "*)
 	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
 	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 	    $EGREP "$file_magic_regex" > /dev/null; then
 	    :
@@ -8515,13 +8800,13 @@ _LT_EOF
       break
     fi
   done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  IFS=$lt_save_ifs
+  MAGIC_CMD=$lt_save_MAGIC_CMD
   ;;
 esac
 fi
 
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
 if test -n "$MAGIC_CMD"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
 $as_echo "$MAGIC_CMD" >&6; }
@@ -8543,22 +8828,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then :
 else
   case $MAGIC_CMD in
 [\\/*] |  ?:[\\/]*)
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
   ;;
 *)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  lt_save_MAGIC_CMD=$MAGIC_CMD
+  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
   for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
     test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/file; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/file"
+    if test -f "$ac_dir/file"; then
+      lt_cv_path_MAGIC_CMD=$ac_dir/"file"
       if test -n "$file_magic_test_file"; then
 	case $deplibs_check_method in
 	"file_magic "*)
 	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
 	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 	    $EGREP "$file_magic_regex" > /dev/null; then
 	    :
@@ -8581,13 +8866,13 @@ _LT_EOF
       break
     fi
   done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  IFS=$lt_save_ifs
+  MAGIC_CMD=$lt_save_MAGIC_CMD
   ;;
 esac
 fi
 
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
 if test -n "$MAGIC_CMD"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
 $as_echo "$MAGIC_CMD" >&6; }
@@ -8608,7 +8893,7 @@ esac
 
 # Use C for the default configuration in the libtool script
 
-lt_save_CC="$CC"
+lt_save_CC=$CC
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -8670,7 +8955,7 @@ if test -n "$compiler"; then
 
 lt_prog_compiler_no_builtin_flag=
 
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   case $cc_basename in
   nvcc*)
     lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
@@ -8686,7 +8971,7 @@ else
   lt_cv_prog_compiler_rtti_exceptions=no
    ac_outfile=conftest.$ac_objext
    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="-fno-rtti -fno-exceptions"
+   lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
    # Insert the option either (1) after the last *FLAGS variable, or
    # (2) before a word containing "conftest.", or (3) at the end.
    # Note that $ac_compile itself does not contain backslashes and begins
@@ -8716,7 +9001,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
 
-if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
 else
     :
@@ -8734,17 +9019,18 @@ lt_prog_compiler_pic=
 lt_prog_compiler_static=
 
 
-  if test "$GCC" = yes; then
+  if test yes = "$GCC"; then
     lt_prog_compiler_wl='-Wl,'
     lt_prog_compiler_static='-static'
 
     case $host_os in
       aix*)
       # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
 	# AIX 5 now supports IA64 processor
 	lt_prog_compiler_static='-Bstatic'
       fi
+      lt_prog_compiler_pic='-fPIC'
       ;;
 
     amigaos*)
@@ -8755,8 +9041,8 @@ lt_prog_compiler_static=
         ;;
       m68k)
             # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
+            # adding the '-m68020' flag to GCC prevents building anything better,
+            # like '-m68040'.
             lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
         ;;
       esac
@@ -8772,6 +9058,11 @@ lt_prog_compiler_static=
       # Although the cygwin gcc ignores -fPIC, still need this for old-style
       # (--disable-auto-import) libraries
       lt_prog_compiler_pic='-DDLL_EXPORT'
+      case $host_os in
+      os2*)
+	lt_prog_compiler_static='$wl-static'
+	;;
+      esac
       ;;
 
     darwin* | rhapsody*)
@@ -8832,7 +9123,9 @@ lt_prog_compiler_static=
     case $cc_basename in
     nvcc*) # Cuda Compiler Driver 2.2
       lt_prog_compiler_wl='-Xlinker '
-      lt_prog_compiler_pic='-Xcompiler -fPIC'
+      if test -n "$lt_prog_compiler_pic"; then
+        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
+      fi
       ;;
     esac
   else
@@ -8840,7 +9133,7 @@ lt_prog_compiler_static=
     case $host_os in
     aix*)
       lt_prog_compiler_wl='-Wl,'
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
 	# AIX 5 now supports IA64 processor
 	lt_prog_compiler_static='-Bstatic'
       else
@@ -8848,10 +9141,29 @@ lt_prog_compiler_static=
       fi
       ;;
 
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic='-fno-common'
+      case $cc_basename in
+      nagfor*)
+        # NAG Fortran compiler
+        lt_prog_compiler_wl='-Wl,-Wl,,'
+        lt_prog_compiler_pic='-PIC'
+        lt_prog_compiler_static='-Bstatic'
+        ;;
+      esac
+      ;;
+
     mingw* | cygwin* | pw32* | os2* | cegcc*)
       # This hack is so that the source file can tell whether it is being
       # built for inclusion in a dll (and should export symbols for example).
       lt_prog_compiler_pic='-DDLL_EXPORT'
+      case $host_os in
+      os2*)
+	lt_prog_compiler_static='$wl-static'
+	;;
+      esac
       ;;
 
     hpux9* | hpux10* | hpux11*)
@@ -8867,7 +9179,7 @@ lt_prog_compiler_static=
 	;;
       esac
       # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      lt_prog_compiler_static='${wl}-a ${wl}archive'
+      lt_prog_compiler_static='$wl-a ${wl}archive'
       ;;
 
     irix5* | irix6* | nonstopux*)
@@ -8876,9 +9188,9 @@ lt_prog_compiler_static=
       lt_prog_compiler_static='-non_shared'
       ;;
 
-    linux* | k*bsd*-gnu | kopensolaris*-gnu)
+    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
       case $cc_basename in
-      # old Intel for x86_64 which still supported -KPIC.
+      # old Intel for x86_64, which still supported -KPIC.
       ecc*)
 	lt_prog_compiler_wl='-Wl,'
 	lt_prog_compiler_pic='-KPIC'
@@ -8903,6 +9215,12 @@ lt_prog_compiler_static=
 	lt_prog_compiler_pic='-PIC'
 	lt_prog_compiler_static='-Bstatic'
 	;;
+      tcc*)
+	# Fabrice Bellard et al's Tiny C Compiler
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-fPIC'
+	lt_prog_compiler_static='-static'
+	;;
       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
         # Portland Group compilers (*not* the Pentium gcc compiler,
 	# which looks to be a dead project)
@@ -8923,18 +9241,33 @@ lt_prog_compiler_static=
 	;;
       *)
 	case `$CC -V 2>&1 | sed 5q` in
-	*Sun\ F* | *Sun*Fortran*)
+	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
 	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
 	  lt_prog_compiler_pic='-KPIC'
 	  lt_prog_compiler_static='-Bstatic'
 	  lt_prog_compiler_wl=''
 	  ;;
+	*Sun\ F* | *Sun*Fortran*)
+	  lt_prog_compiler_pic='-KPIC'
+	  lt_prog_compiler_static='-Bstatic'
+	  lt_prog_compiler_wl='-Qoption ld '
+	  ;;
 	*Sun\ C*)
 	  # Sun C 5.9
 	  lt_prog_compiler_pic='-KPIC'
 	  lt_prog_compiler_static='-Bstatic'
 	  lt_prog_compiler_wl='-Wl,'
 	  ;;
+        *Intel*\ [CF]*Compiler*)
+	  lt_prog_compiler_wl='-Wl,'
+	  lt_prog_compiler_pic='-fPIC'
+	  lt_prog_compiler_static='-static'
+	  ;;
+	*Portland\ Group*)
+	  lt_prog_compiler_wl='-Wl,'
+	  lt_prog_compiler_pic='-fpic'
+	  lt_prog_compiler_static='-Bstatic'
+	  ;;
 	esac
 	;;
       esac
@@ -8985,7 +9318,7 @@ lt_prog_compiler_static=
       ;;
 
     sysv4*MP*)
-      if test -d /usr/nec ;then
+      if test -d /usr/nec; then
 	lt_prog_compiler_pic='-Kconform_pic'
 	lt_prog_compiler_static='-Bstatic'
       fi
@@ -9014,7 +9347,7 @@ lt_prog_compiler_static=
   fi
 
 case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
+  # For platforms that do not support PIC, -DPIC is meaningless:
   *djgpp*)
     lt_prog_compiler_pic=
     ;;
@@ -9046,7 +9379,7 @@ else
   lt_cv_prog_compiler_pic_works=no
    ac_outfile=conftest.$ac_objext
    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
    # Insert the option either (1) after the last *FLAGS variable, or
    # (2) before a word containing "conftest.", or (3) at the end.
    # Note that $ac_compile itself does not contain backslashes and begins
@@ -9076,7 +9409,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
 
-if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+if test yes = "$lt_cv_prog_compiler_pic_works"; then
     case $lt_prog_compiler_pic in
      "" | " "*) ;;
      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
@@ -9108,7 +9441,7 @@ if ${lt_cv_prog_compiler_static_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_static_works=no
-   save_LDFLAGS="$LDFLAGS"
+   save_LDFLAGS=$LDFLAGS
    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
    echo "$lt_simple_link_test_code" > conftest.$ac_ext
    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -9127,13 +9460,13 @@ else
      fi
    fi
    $RM -r conftest*
-   LDFLAGS="$save_LDFLAGS"
+   LDFLAGS=$save_LDFLAGS
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
 
-if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+if test yes = "$lt_cv_prog_compiler_static_works"; then
     :
 else
     lt_prog_compiler_static=
@@ -9253,8 +9586,8 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
 
 
 
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+hard_links=nottested
+if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
   # do not overwrite the value of need_locks provided by the user
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
 $as_echo_n "checking if we can lock with hard links... " >&6; }
@@ -9266,9 +9599,9 @@ $as_echo_n "checking if we can lock with hard links... " >&6; }
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
 $as_echo "$hard_links" >&6; }
-  if test "$hard_links" = no; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+  if test no = "$hard_links"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
     need_locks=warn
   fi
 else
@@ -9296,7 +9629,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
   hardcode_direct=no
   hardcode_direct_absolute=no
   hardcode_libdir_flag_spec=
-  hardcode_libdir_flag_spec_ld=
   hardcode_libdir_separator=
   hardcode_minus_L=no
   hardcode_shlibpath_var=unsupported
@@ -9312,9 +9644,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
   # included in the symbol list
   include_expsyms=
   # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
+  # it will be wrapped by ' (' and ')$', so one must not match beginning or
+  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
+  # as well as any symbol that contains 'd'.
   exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
   # platforms (ab)use it in PIC code, but their linkers get confused if
@@ -9329,7 +9661,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     # FIXME: the MSVC++ port hasn't been tested in a loooong time
     # When not using gcc, we currently assume that we are using
     # Microsoft Visual C++.
-    if test "$GCC" != yes; then
+    if test yes != "$GCC"; then
       with_gnu_ld=no
     fi
     ;;
@@ -9337,7 +9669,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     # we just hope/assume this is gcc and not c89 (= MSVC++)
     with_gnu_ld=yes
     ;;
-  openbsd*)
+  openbsd* | bitrig*)
     with_gnu_ld=no
     ;;
   linux* | k*bsd*-gnu | gnu*)
@@ -9350,7 +9682,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
   # On some targets, GNU ld is compatible enough with the native linker
   # that we're better off using the native interface for both.
   lt_use_gnu_ld_interface=no
-  if test "$with_gnu_ld" = yes; then
+  if test yes = "$with_gnu_ld"; then
     case $host_os in
       aix*)
 	# The AIX port of GNU ld has always aspired to compatibility
@@ -9372,24 +9704,24 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     esac
   fi
 
-  if test "$lt_use_gnu_ld_interface" = yes; then
+  if test yes = "$lt_use_gnu_ld_interface"; then
     # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
+    wlarc='$wl'
 
     # Set some defaults for GNU ld with shared library support. These
     # are reset later if shared libraries are not supported. Putting them
     # here allows them to be overridden if necessary.
     runpath_var=LD_RUN_PATH
-    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-    export_dynamic_flag_spec='${wl}--export-dynamic'
+    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+    export_dynamic_flag_spec='$wl--export-dynamic'
     # ancient GNU ld didn't support --whole-archive et. al.
     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
-      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
     else
       whole_archive_flag_spec=
     fi
     supports_anon_versioning=no
-    case `$LD -v 2>&1` in
+    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
       *GNU\ gold*) supports_anon_versioning=yes ;;
       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
@@ -9402,7 +9734,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     case $host_os in
     aix[3-9]*)
       # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
+      if test ia64 != "$host_cpu"; then
 	ld_shlibs=no
 	cat <<_LT_EOF 1>&2
 
@@ -9421,7 +9753,7 @@ _LT_EOF
       case $host_cpu in
       powerpc)
             # see comment about AmigaOS4 .so support
-            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
             archive_expsym_cmds=''
         ;;
       m68k)
@@ -9437,7 +9769,7 @@ _LT_EOF
 	allow_undefined_flag=unsupported
 	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
 	# support --undefined.  This deserves some investigation.  FIXME
-	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
       else
 	ld_shlibs=no
       fi
@@ -9447,7 +9779,7 @@ _LT_EOF
       # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
       # as there is no search path for DLLs.
       hardcode_libdir_flag_spec='-L$libdir'
-      export_dynamic_flag_spec='${wl}--export-all-symbols'
+      export_dynamic_flag_spec='$wl--export-all-symbols'
       allow_undefined_flag=unsupported
       always_export_symbols=no
       enable_shared_with_static_runtimes=yes
@@ -9455,61 +9787,89 @@ _LT_EOF
       exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
 
       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-	# If the export-symbols file already is a .def file (1st line
-	# is EXPORTS), use it as is; otherwise, prepend...
-	archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	  cp $export_symbols $output_objdir/$soname.def;
-	else
-	  echo EXPORTS > $output_objdir/$soname.def;
-	  cat $export_symbols >> $output_objdir/$soname.def;
-	fi~
-	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file, use it as
+	# is; otherwise, prepend EXPORTS...
+	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
+          cp $export_symbols $output_objdir/$soname.def;
+        else
+          echo EXPORTS > $output_objdir/$soname.def;
+          cat $export_symbols >> $output_objdir/$soname.def;
+        fi~
+        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
       else
 	ld_shlibs=no
       fi
       ;;
 
     haiku*)
-      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
       link_all_deplibs=yes
       ;;
 
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      allow_undefined_flag=unsupported
+      shrext_cmds=.dll
+      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	$ECHO EXPORTS >> $output_objdir/$libname.def~
+	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	emximp -o $lib $output_objdir/$libname.def'
+      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	$ECHO EXPORTS >> $output_objdir/$libname.def~
+	prefix_cmds="$SED"~
+	if test EXPORTS = "`$SED 1q $export_symbols`"; then
+	  prefix_cmds="$prefix_cmds -e 1d";
+	fi~
+	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	emximp -o $lib $output_objdir/$libname.def'
+      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+      enable_shared_with_static_runtimes=yes
+      ;;
+
     interix[3-9]*)
       hardcode_direct=no
       hardcode_shlibpath_var=no
-      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-      export_dynamic_flag_spec='${wl}-E'
+      hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+      export_dynamic_flag_spec='$wl-E'
       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
       # Instead, shared libraries are loaded at an image base (0x10000000 by
       # default) and relocated if they conflict, which is a slow very memory
       # consuming and fragmenting process.  To avoid this, we pick a random,
       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
       ;;
 
     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
       tmp_diet=no
-      if test "$host_os" = linux-dietlibc; then
+      if test linux-dietlibc = "$host_os"; then
 	case $cc_basename in
 	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
 	esac
       fi
       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
-	 && test "$tmp_diet" = no
+	 && test no = "$tmp_diet"
       then
 	tmp_addflag=' $pic_flag'
 	tmp_sharedflag='-shared'
 	case $cc_basename,$host_cpu in
         pgcc*)				# Portland Group C compiler
-	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	  whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
 	  tmp_addflag=' $pic_flag'
 	  ;;
 	pgf77* | pgf90* | pgf95* | pgfortran*)
 					# Portland Group f77 and f90 compilers
-	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	  whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
 	  tmp_addflag=' $pic_flag -Mnomain' ;;
 	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
 	  tmp_addflag=' -i_dynamic' ;;
@@ -9520,43 +9880,47 @@ _LT_EOF
 	lf95*)				# Lahey Fortran 8.1
 	  whole_archive_flag_spec=
 	  tmp_sharedflag='--shared' ;;
+        nagfor*)                        # NAGFOR 5.3
+          tmp_sharedflag='-Wl,-shared' ;;
 	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
 	  tmp_sharedflag='-qmkshrobj'
 	  tmp_addflag= ;;
 	nvcc*)	# Cuda Compiler Driver 2.2
-	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	  whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
 	  compiler_needs_object=yes
 	  ;;
 	esac
 	case `$CC -V 2>&1 | sed 5q` in
 	*Sun\ C*)			# Sun C 5.9
-	  whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	  whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
 	  compiler_needs_object=yes
 	  tmp_sharedflag='-G' ;;
 	*Sun\ F*)			# Sun Fortran 8.3
 	  tmp_sharedflag='-G' ;;
 	esac
-	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
 
-        if test "x$supports_anon_versioning" = xyes; then
+        if test yes = "$supports_anon_versioning"; then
           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
-	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-	    echo "local: *; };" >> $output_objdir/$libname.ver~
-	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+            echo "local: *; };" >> $output_objdir/$libname.ver~
+            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
         fi
 
 	case $cc_basename in
+	tcc*)
+	  export_dynamic_flag_spec='-rdynamic'
+	  ;;
 	xlf* | bgf* | bgxlf* | mpixlf*)
 	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
 	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
-	  hardcode_libdir_flag_spec=
-	  hardcode_libdir_flag_spec_ld='-rpath $libdir'
+	  hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
 	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
-	  if test "x$supports_anon_versioning" = xyes; then
+	  if test yes = "$supports_anon_versioning"; then
 	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
-	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-	      echo "local: *; };" >> $output_objdir/$libname.ver~
-	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+              echo "local: *; };" >> $output_objdir/$libname.ver~
+              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
 	  fi
 	  ;;
 	esac
@@ -9570,8 +9934,8 @@ _LT_EOF
 	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 	wlarc=
       else
-	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       fi
       ;;
 
@@ -9589,8 +9953,8 @@ _LT_EOF
 
 _LT_EOF
       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       else
 	ld_shlibs=no
       fi
@@ -9602,7 +9966,7 @@ _LT_EOF
 	ld_shlibs=no
 	cat <<_LT_EOF 1>&2
 
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
 *** reliably create shared libraries on SCO systems.  Therefore, libtool
 *** is disabling shared libraries support.  We urge you to upgrade GNU
 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
@@ -9617,9 +9981,9 @@ _LT_EOF
 	  # DT_RUNPATH tag from executables and libraries.  But doing so
 	  # requires that you compile everything twice, which is a pain.
 	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 	  else
 	    ld_shlibs=no
 	  fi
@@ -9636,15 +10000,15 @@ _LT_EOF
 
     *)
       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       else
 	ld_shlibs=no
       fi
       ;;
     esac
 
-    if test "$ld_shlibs" = no; then
+    if test no = "$ld_shlibs"; then
       runpath_var=
       hardcode_libdir_flag_spec=
       export_dynamic_flag_spec=
@@ -9660,7 +10024,7 @@ _LT_EOF
       # Note: this linker hardcodes the directories in LIBPATH if there
       # are no directories specified by -L.
       hardcode_minus_L=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
 	# Neither direct hardcoding nor static linking is supported with a
 	# broken collect2.
 	hardcode_direct=unsupported
@@ -9668,34 +10032,57 @@ _LT_EOF
       ;;
 
     aix[4-9]*)
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
 	# On IA64, the linker does run time linking by default, so we don't
 	# have to do anything special.
 	aix_use_runtimelinking=no
 	exp_sym_flag='-Bexport'
-	no_entry_flag=""
+	no_entry_flag=
       else
 	# If we're using GNU nm, then we don't want the "-C" option.
-	# -C means demangle to AIX nm, but means don't demangle with GNU nm
-	# Also, AIX nm treats weak defined symbols like other global
-	# defined symbols, whereas GNU nm marks them as "W".
+	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
+	# Without the "-l" option, or with the "-B" option, AIX nm treats
+	# weak defined symbols like other global defined symbols, whereas
+	# GNU nm marks them as "W".
+	# While the 'weak' keyword is ignored in the Export File, we need
+	# it in the Import File for the 'aix-soname' feature, so we have
+	# to replace the "-B" option with "-P" for AIX nm.
 	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
 	else
-	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	  export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
 	fi
 	aix_use_runtimelinking=no
 
 	# Test if we are trying to use run time linking or normal
 	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
-	# need to do runtime linking.
+	# have runtime linking enabled, and use it for executables.
+	# For shared libraries, we enable/disable runtime linking
+	# depending on the kind of the shared library created -
+	# when "with_aix_soname,aix_use_runtimelinking" is:
+	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
+	# "aix,yes"  lib.so          shared, rtl:yes, for executables
+	#            lib.a           static archive
+	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
+	#            lib.a(lib.so.V) shared, rtl:no,  for executables
+	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+	#            lib.a(lib.so.V) shared, rtl:no
+	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
+	#            lib.a           static archive
 	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
 	  for ld_flag in $LDFLAGS; do
-	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
 	    aix_use_runtimelinking=yes
 	    break
 	  fi
 	  done
+	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
+	    # so we don't have lib.a shared libs to link our executables.
+	    # We have to force runtime linking in this case.
+	    aix_use_runtimelinking=yes
+	    LDFLAGS="$LDFLAGS -Wl,-brtl"
+	  fi
 	  ;;
 	esac
 
@@ -9714,13 +10101,21 @@ _LT_EOF
       hardcode_direct_absolute=yes
       hardcode_libdir_separator=':'
       link_all_deplibs=yes
-      file_list_spec='${wl}-f,'
+      file_list_spec='$wl-f,'
+      case $with_aix_soname,$aix_use_runtimelinking in
+      aix,*) ;; # traditional, no import file
+      svr4,* | *,yes) # use import file
+	# The Import File defines what to hardcode.
+	hardcode_direct=no
+	hardcode_direct_absolute=no
+	;;
+      esac
 
-      if test "$GCC" = yes; then
+      if test yes = "$GCC"; then
 	case $host_os in aix4.[012]|aix4.[012].*)
 	# We only want to do this on AIX 4.2 and lower, the check
 	# below for broken collect2 doesn't work under 4.3+
-	  collect2name=`${CC} -print-prog-name=collect2`
+	  collect2name=`$CC -print-prog-name=collect2`
 	  if test -f "$collect2name" &&
 	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
 	  then
@@ -9739,36 +10134,42 @@ _LT_EOF
 	  ;;
 	esac
 	shared_flag='-shared'
-	if test "$aix_use_runtimelinking" = yes; then
-	  shared_flag="$shared_flag "'${wl}-G'
+	if test yes = "$aix_use_runtimelinking"; then
+	  shared_flag="$shared_flag "'$wl-G'
 	fi
-	link_all_deplibs=no
+	# Need to ensure runtime linking is disabled for the traditional
+	# shared library, or the linker may eventually find shared libraries
+	# /with/ Import File - we do not want to mix them.
+	shared_flag_aix='-shared'
+	shared_flag_svr4='-shared $wl-G'
       else
 	# not using gcc
-	if test "$host_cpu" = ia64; then
+	if test ia64 = "$host_cpu"; then
 	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 	# chokes on -Wl,-G. The following line is correct:
 	  shared_flag='-G'
 	else
-	  if test "$aix_use_runtimelinking" = yes; then
-	    shared_flag='${wl}-G'
+	  if test yes = "$aix_use_runtimelinking"; then
+	    shared_flag='$wl-G'
 	  else
-	    shared_flag='${wl}-bM:SRE'
+	    shared_flag='$wl-bM:SRE'
 	  fi
+	  shared_flag_aix='$wl-bM:SRE'
+	  shared_flag_svr4='$wl-G'
 	fi
       fi
 
-      export_dynamic_flag_spec='${wl}-bexpall'
+      export_dynamic_flag_spec='$wl-bexpall'
       # It seems that -bexpall does not export symbols beginning with
       # underscore (_), so it is better to generate a list of symbols to export.
       always_export_symbols=yes
-      if test "$aix_use_runtimelinking" = yes; then
+      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
 	# Warning - without using the other runtime loading flags (-brtl),
 	# -berok will link without error, but may produce a broken library.
 	allow_undefined_flag='-berok'
         # Determine the default libpath from the value encoded in an
         # empty executable.
-        if test "${lt_cv_aix_libpath+set}" = set; then
+        if test set = "${lt_cv_aix_libpath+set}"; then
   aix_libpath=$lt_cv_aix_libpath
 else
   if ${lt_cv_aix_libpath_+:} false; then :
@@ -9803,7 +10204,7 @@ fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
   if test -z "$lt_cv_aix_libpath_"; then
-    lt_cv_aix_libpath_="/usr/lib:/lib"
+    lt_cv_aix_libpath_=/usr/lib:/lib
   fi
 
 fi
@@ -9811,17 +10212,17 @@ fi
   aix_libpath=$lt_cv_aix_libpath_
 fi
 
-        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
+        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
       else
-	if test "$host_cpu" = ia64; then
-	  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+	if test ia64 = "$host_cpu"; then
+	  hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
 	  allow_undefined_flag="-z nodefs"
-	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
 	else
 	 # Determine the default libpath from the value encoded in an
 	 # empty executable.
-	 if test "${lt_cv_aix_libpath+set}" = set; then
+	 if test set = "${lt_cv_aix_libpath+set}"; then
   aix_libpath=$lt_cv_aix_libpath
 else
   if ${lt_cv_aix_libpath_+:} false; then :
@@ -9856,7 +10257,7 @@ fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
   if test -z "$lt_cv_aix_libpath_"; then
-    lt_cv_aix_libpath_="/usr/lib:/lib"
+    lt_cv_aix_libpath_=/usr/lib:/lib
   fi
 
 fi
@@ -9864,21 +10265,33 @@ fi
   aix_libpath=$lt_cv_aix_libpath_
 fi
 
-	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+	 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
 	  # Warning - without using the other run time loading flags,
 	  # -berok will link without error, but may produce a broken library.
-	  no_undefined_flag=' ${wl}-bernotok'
-	  allow_undefined_flag=' ${wl}-berok'
-	  if test "$with_gnu_ld" = yes; then
+	  no_undefined_flag=' $wl-bernotok'
+	  allow_undefined_flag=' $wl-berok'
+	  if test yes = "$with_gnu_ld"; then
 	    # We only use this code for GNU lds that support --whole-archive.
-	    whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	    whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
 	  else
 	    # Exported symbols can be pulled into shared objects from archives
 	    whole_archive_flag_spec='$convenience'
 	  fi
 	  archive_cmds_need_lc=yes
-	  # This is similar to how AIX traditionally builds its shared libraries.
-	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	  archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+	  # -brtl affects multiple linker settings, -berok does not and is overridden later
+	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
+	  if test svr4 != "$with_aix_soname"; then
+	    # This is similar to how AIX traditionally builds its shared libraries.
+	    archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+	  fi
+	  if test aix != "$with_aix_soname"; then
+	    archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) >  [...]
+	  else
+	    # used by -dlpreopen to get the symbols
+	    archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
+	  fi
+	  archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
 	fi
       fi
       ;;
@@ -9887,7 +10300,7 @@ fi
       case $host_cpu in
       powerpc)
             # see comment about AmigaOS4 .so support
-            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
             archive_expsym_cmds=''
         ;;
       m68k)
@@ -9917,35 +10330,37 @@ fi
 	# Tell ltmain to make .lib files, not .a files.
 	libext=lib
 	# Tell ltmain to make .dll files, not .so files.
-	shrext_cmds=".dll"
+	shrext_cmds=.dll
 	# FIXME: Setting linknames here is a bad hack.
-	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
-	archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
-	  else
-	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
-	  fi~
-	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
-	  linknames='
+	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
+            cp "$export_symbols" "$output_objdir/$soname.def";
+            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+          else
+            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+          fi~
+          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+          linknames='
 	# The linker will not automatically build a static lib if we build a DLL.
 	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
 	enable_shared_with_static_runtimes=yes
+	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
 	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
 	# Don't use ranlib
 	old_postinstall_cmds='chmod 644 $oldlib'
 	postlink_cmds='lt_outputfile="@OUTPUT@"~
-	  lt_tool_outputfile="@TOOL_OUTPUT@"~
-	  case $lt_outputfile in
-	    *.exe|*.EXE) ;;
-	    *)
-	      lt_outputfile="$lt_outputfile.exe"
-	      lt_tool_outputfile="$lt_tool_outputfile.exe"
-	      ;;
-	  esac~
-	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
-	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
-	    $RM "$lt_outputfile.manifest";
-	  fi'
+          lt_tool_outputfile="@TOOL_OUTPUT@"~
+          case $lt_outputfile in
+            *.exe|*.EXE) ;;
+            *)
+              lt_outputfile=$lt_outputfile.exe
+              lt_tool_outputfile=$lt_tool_outputfile.exe
+              ;;
+          esac~
+          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+            $RM "$lt_outputfile.manifest";
+          fi'
 	;;
       *)
 	# Assume MSVC wrapper
@@ -9954,7 +10369,7 @@ fi
 	# Tell ltmain to make .lib files, not .a files.
 	libext=lib
 	# Tell ltmain to make .dll files, not .so files.
-	shrext_cmds=".dll"
+	shrext_cmds=.dll
 	# FIXME: Setting linknames here is a bad hack.
 	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
 	# The linker will automatically build a .lib file if we build a DLL.
@@ -9973,23 +10388,24 @@ fi
   hardcode_direct=no
   hardcode_automatic=yes
   hardcode_shlibpath_var=unsupported
-  if test "$lt_cv_ld_force_load" = "yes"; then
-    whole_archive_flag_spec='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+  if test yes = "$lt_cv_ld_force_load"; then
+    whole_archive_flag_spec='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+
   else
     whole_archive_flag_spec=''
   fi
   link_all_deplibs=yes
-  allow_undefined_flag="$_lt_dar_allow_undefined"
+  allow_undefined_flag=$_lt_dar_allow_undefined
   case $cc_basename in
-     ifort*) _lt_dar_can_shared=yes ;;
+     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
      *) _lt_dar_can_shared=$GCC ;;
   esac
-  if test "$_lt_dar_can_shared" = "yes"; then
+  if test yes = "$_lt_dar_can_shared"; then
     output_verbose_link_cmd=func_echo_all
-    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
-    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
-    module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+    archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+    module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
 
   else
   ld_shlibs=no
@@ -10003,10 +10419,6 @@ fi
       hardcode_shlibpath_var=no
       ;;
 
-    freebsd1*)
-      ld_shlibs=no
-      ;;
-
     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
     # support.  Future versions do this automatically, but an explicit c++rt0.o
     # does not break anything, and helps significantly (at the cost of a little
@@ -10019,7 +10431,7 @@ fi
       ;;
 
     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
+    freebsd2.*)
       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
       hardcode_direct=yes
       hardcode_minus_L=yes
@@ -10035,34 +10447,33 @@ fi
       ;;
 
     hpux9*)
-      if test "$GCC" = yes; then
-	archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      if test yes = "$GCC"; then
+	archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
       else
-	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
       fi
-      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_flag_spec='$wl+b $wl$libdir'
       hardcode_libdir_separator=:
       hardcode_direct=yes
 
       # hardcode_minus_L: Not really in the search PATH,
       # but as the default location of the library.
       hardcode_minus_L=yes
-      export_dynamic_flag_spec='${wl}-E'
+      export_dynamic_flag_spec='$wl-E'
       ;;
 
     hpux10*)
-      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
-	archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes,no = "$GCC,$with_gnu_ld"; then
+	archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
       else
 	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
       fi
-      if test "$with_gnu_ld" = no; then
-	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-	hardcode_libdir_flag_spec_ld='+b $libdir'
+      if test no = "$with_gnu_ld"; then
+	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
 	hardcode_libdir_separator=:
 	hardcode_direct=yes
 	hardcode_direct_absolute=yes
-	export_dynamic_flag_spec='${wl}-E'
+	export_dynamic_flag_spec='$wl-E'
 	# hardcode_minus_L: Not really in the search PATH,
 	# but as the default location of the library.
 	hardcode_minus_L=yes
@@ -10070,25 +10481,25 @@ fi
       ;;
 
     hpux11*)
-      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+      if test yes,no = "$GCC,$with_gnu_ld"; then
 	case $host_cpu in
 	hppa*64*)
-	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	ia64*)
-	  archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	esac
       else
 	case $host_cpu in
 	hppa*64*)
-	  archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	ia64*)
-	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
 
@@ -10100,7 +10511,7 @@ if ${lt_cv_prog_compiler__b+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler__b=no
-   save_LDFLAGS="$LDFLAGS"
+   save_LDFLAGS=$LDFLAGS
    LDFLAGS="$LDFLAGS -b"
    echo "$lt_simple_link_test_code" > conftest.$ac_ext
    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -10119,14 +10530,14 @@ else
      fi
    fi
    $RM -r conftest*
-   LDFLAGS="$save_LDFLAGS"
+   LDFLAGS=$save_LDFLAGS
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
 $as_echo "$lt_cv_prog_compiler__b" >&6; }
 
-if test x"$lt_cv_prog_compiler__b" = xyes; then
-    archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+if test yes = "$lt_cv_prog_compiler__b"; then
+    archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 else
     archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
 fi
@@ -10134,8 +10545,8 @@ fi
 	  ;;
 	esac
       fi
-      if test "$with_gnu_ld" = no; then
-	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      if test no = "$with_gnu_ld"; then
+	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
 	hardcode_libdir_separator=:
 
 	case $host_cpu in
@@ -10146,7 +10557,7 @@ fi
 	*)
 	  hardcode_direct=yes
 	  hardcode_direct_absolute=yes
-	  export_dynamic_flag_spec='${wl}-E'
+	  export_dynamic_flag_spec='$wl-E'
 
 	  # hardcode_minus_L: Not really in the search PATH,
 	  # but as the default location of the library.
@@ -10157,8 +10568,8 @@ fi
       ;;
 
     irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      if test yes = "$GCC"; then
+	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
 	# Try to use the -exported_symbol ld option, if it does not
 	# work, assume that -exports_file does not work either and
 	# implicitly export all symbols.
@@ -10168,8 +10579,8 @@ $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >
 if ${lt_cv_irix_exported_symbol+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  save_LDFLAGS="$LDFLAGS"
-	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+  save_LDFLAGS=$LDFLAGS
+	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
 	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 int foo (void) { return 0; }
@@ -10181,24 +10592,35 @@ else
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-           LDFLAGS="$save_LDFLAGS"
+           LDFLAGS=$save_LDFLAGS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
-	if test "$lt_cv_irix_exported_symbol" = yes; then
-          archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+	if test yes = "$lt_cv_irix_exported_symbol"; then
+          archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
 	fi
+	link_all_deplibs=no
       else
-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
-	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
       fi
       archive_cmds_need_lc='no'
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
       hardcode_libdir_separator=:
       inherit_rpath=yes
       link_all_deplibs=yes
       ;;
 
+    linux*)
+      case $cc_basename in
+      tcc*)
+	# Fabrice Bellard et al's Tiny C Compiler
+	ld_shlibs=yes
+	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+      esac
+      ;;
+
     netbsd* | netbsdelf*-gnu)
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
@@ -10213,7 +10635,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
     newsos6)
       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
       hardcode_direct=yes
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
       hardcode_libdir_separator=:
       hardcode_shlibpath_var=no
       ;;
@@ -10221,27 +10643,19 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
     *nto* | *qnx*)
       ;;
 
-    openbsd*)
+    openbsd* | bitrig*)
       if test -f /usr/libexec/ld.so; then
 	hardcode_direct=yes
 	hardcode_shlibpath_var=no
 	hardcode_direct_absolute=yes
-	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
 	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-	  hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-	  export_dynamic_flag_spec='${wl}-E'
+	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
+	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+	  export_dynamic_flag_spec='$wl-E'
 	else
-	  case $host_os in
-	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-	     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-	     hardcode_libdir_flag_spec='-R$libdir'
-	     ;;
-	   *)
-	     archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	     hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-	     ;;
-	  esac
+	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
 	fi
       else
 	ld_shlibs=no
@@ -10252,33 +10666,53 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
       hardcode_libdir_flag_spec='-L$libdir'
       hardcode_minus_L=yes
       allow_undefined_flag=unsupported
-      archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-      old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      shrext_cmds=.dll
+      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	$ECHO EXPORTS >> $output_objdir/$libname.def~
+	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	emximp -o $lib $output_objdir/$libname.def'
+      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	$ECHO EXPORTS >> $output_objdir/$libname.def~
+	prefix_cmds="$SED"~
+	if test EXPORTS = "`$SED 1q $export_symbols`"; then
+	  prefix_cmds="$prefix_cmds -e 1d";
+	fi~
+	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	emximp -o $lib $output_objdir/$libname.def'
+      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+      enable_shared_with_static_runtimes=yes
       ;;
 
     osf3*)
-      if test "$GCC" = yes; then
-	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      if test yes = "$GCC"; then
+	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
+	archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
       else
 	allow_undefined_flag=' -expect_unresolved \*'
-	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
       fi
       archive_cmds_need_lc='no'
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
       hardcode_libdir_separator=:
       ;;
 
     osf4* | osf5*)	# as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      if test yes = "$GCC"; then
+	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
+	archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+	hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
       else
 	allow_undefined_flag=' -expect_unresolved \*'
-	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
 	archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
-	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+          $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
 
 	# Both c and cxx compiler support -rpath directly
 	hardcode_libdir_flag_spec='-rpath $libdir'
@@ -10289,24 +10723,24 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
 
     solaris*)
       no_undefined_flag=' -z defs'
-      if test "$GCC" = yes; then
-	wlarc='${wl}'
-	archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+	wlarc='$wl'
+	archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
 	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+          $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
       else
 	case `$CC -V 2>&1` in
 	*"Compilers 5.0"*)
 	  wlarc=''
-	  archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
 	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
 	  ;;
 	*)
-	  wlarc='${wl}'
-	  archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	  wlarc='$wl'
+	  archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
 	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
 	  ;;
 	esac
       fi
@@ -10316,11 +10750,11 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
       solaris2.[0-5] | solaris2.[0-5].*) ;;
       *)
 	# The compiler driver will combine and reorder linker options,
-	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but understands '-z linker_flag'.  GCC discards it without '$wl',
 	# but is careful enough not to reorder.
 	# Supported since Solaris 2.6 (maybe 2.5.1?)
-	if test "$GCC" = yes; then
-	  whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	if test yes = "$GCC"; then
+	  whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
 	else
 	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
 	fi
@@ -10330,10 +10764,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
       ;;
 
     sunos4*)
-      if test "x$host_vendor" = xsequent; then
+      if test sequent = "$host_vendor"; then
 	# Use $CC to link under sequent, because it throws in some extra .o
 	# files that make .init and .fini sections work.
-	archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
       else
 	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
       fi
@@ -10382,43 +10816,43 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
       ;;
 
     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
-      no_undefined_flag='${wl}-z,text'
+      no_undefined_flag='$wl-z,text'
       archive_cmds_need_lc=no
       hardcode_shlibpath_var=no
       runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       fi
       ;;
 
     sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
+      # Note: We CANNOT use -z defs as we might desire, because we do not
       # link with -lc, and that would cause any symbols used from libc to
       # always be unresolved, which means just about no library would
       # ever link correctly.  If we're not using GNU ld we use -z text
       # though, which does catch some bad symbols but isn't as heavy-handed
       # as -z defs.
-      no_undefined_flag='${wl}-z,text'
-      allow_undefined_flag='${wl}-z,nodefs'
+      no_undefined_flag='$wl-z,text'
+      allow_undefined_flag='$wl-z,nodefs'
       archive_cmds_need_lc=no
       hardcode_shlibpath_var=no
-      hardcode_libdir_flag_spec='${wl}-R,$libdir'
+      hardcode_libdir_flag_spec='$wl-R,$libdir'
       hardcode_libdir_separator=':'
       link_all_deplibs=yes
-      export_dynamic_flag_spec='${wl}-Bexport'
+      export_dynamic_flag_spec='$wl-Bexport'
       runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       fi
       ;;
 
@@ -10433,10 +10867,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
       ;;
     esac
 
-    if test x$host_vendor = xsni; then
+    if test sni = "$host_vendor"; then
       case $host in
       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-	export_dynamic_flag_spec='${wl}-Blargedynsym'
+	export_dynamic_flag_spec='$wl-Blargedynsym'
 	;;
       esac
     fi
@@ -10444,7 +10878,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
 $as_echo "$ld_shlibs" >&6; }
-test "$ld_shlibs" = no && can_build_shared=no
+test no = "$ld_shlibs" && can_build_shared=no
 
 with_gnu_ld=$with_gnu_ld
 
@@ -10470,7 +10904,7 @@ x|xyes)
   # Assume -lc should be added
   archive_cmds_need_lc=yes
 
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
+  if test yes,yes = "$GCC,$enable_shared"; then
     case $archive_cmds in
     *'~'*)
       # FIXME: we may have to deal with multi-command sequences.
@@ -10682,22 +11116,17 @@ esac
 
 
 
-
-
-
-
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
 $as_echo_n "checking dynamic linker characteristics... " >&6; }
 
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   case $host_os in
-    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
-    *) lt_awk_arg="/^libraries:/" ;;
+    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
+    *) lt_awk_arg='/^libraries:/' ;;
   esac
   case $host_os in
-    mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
-    *) lt_sed_strip_eq="s,=/,/,g" ;;
+    mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
+    *) lt_sed_strip_eq='s|=/|/|g' ;;
   esac
   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
   case $lt_search_path_spec in
@@ -10713,28 +11142,35 @@ if test "$GCC" = yes; then
     ;;
   esac
   # Ok, now we have the path, separated by spaces, we can step through it
-  # and add multilib dir if necessary.
+  # and add multilib dir if necessary...
   lt_tmp_lt_search_path_spec=
-  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
-  for lt_sys_path in $lt_search_path_spec; do
-    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
-      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
-    else
+  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  # ...but if some path component already ends with the multilib dir we assume
+  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
+  case "$lt_multi_os_dir; $lt_search_path_spec " in
+  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
+    lt_multi_os_dir=
+    ;;
+  esac
+  for lt_sys_path in $lt_search_path_spec; do
+    if test -d "$lt_sys_path$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
+    elif test -n "$lt_multi_os_dir"; then
       test -d "$lt_sys_path" && \
 	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
     fi
   done
   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
-BEGIN {RS=" "; FS="/|\n";} {
-  lt_foo="";
-  lt_count=0;
+BEGIN {RS = " "; FS = "/|\n";} {
+  lt_foo = "";
+  lt_count = 0;
   for (lt_i = NF; lt_i > 0; lt_i--) {
     if ($lt_i != "" && $lt_i != ".") {
       if ($lt_i == "..") {
         lt_count++;
       } else {
         if (lt_count == 0) {
-          lt_foo="/" $lt_i lt_foo;
+          lt_foo = "/" $lt_i lt_foo;
         } else {
           lt_count--;
         }
@@ -10748,7 +11184,7 @@ BEGIN {RS=" "; FS="/|\n";} {
   # for these hosts.
   case $host_os in
     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
-      $SED 's,/\([A-Za-z]:\),\1,g'` ;;
+      $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
   esac
   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
 else
@@ -10757,7 +11193,7 @@ fi
 library_names_spec=
 libname_spec='lib$name'
 soname_spec=
-shrext_cmds=".so"
+shrext_cmds=.so
 postinstall_cmds=
 postuninstall_cmds=
 finish_cmds=
@@ -10774,56 +11210,108 @@ hardcode_into_libs=no
 # flags to be left without arguments
 need_version=unknown
 
+
+
 case $host_os in
 aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
   # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
+  soname_spec='$libname$release$shared_ext$major'
   ;;
 
 aix[4-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
+  if test ia64 = "$host_cpu"; then
     # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
     shlibpath_var=LD_LIBRARY_PATH
   else
     # With GCC up to 2.95.x, collect2 would create an import file
     # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
+    # the line '#! .'.  This would cause the generated library to
+    # depend on '.', always an invalid library.  This was fixed in
     # development snapshots of GCC prior to 3.0.
     case $host_os in
       aix4 | aix4.[01] | aix4.[01].*)
       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 	   echo ' yes '
-	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
 	:
       else
 	can_build_shared=no
       fi
       ;;
     esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # Using Import Files as archive members, it is possible to support
+    # filename-based versioning of shared library archives on AIX. While
+    # this would work for both with and without runtime linking, it will
+    # prevent static linking of such archives. So we do filename-based
+    # shared library versioning with .so extension only, which is used
+    # when both runtime linking and shared linking is enabled.
+    # Unfortunately, runtime linking may impact performance, so we do
+    # not want this to be the default eventually. Also, we use the
+    # versioned .so libs for executables only if there is the -brtl
+    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+    # To allow for filename-based versioning support, we need to create
+    # libNAME.so.V as an archive file, containing:
+    # *) an Import File, referring to the versioned filename of the
+    #    archive as well as the shared archive member, telling the
+    #    bitwidth (32 or 64) of that shared object, and providing the
+    #    list of exported symbols of that shared object, eventually
+    #    decorated with the 'weak' keyword
+    # *) the shared object with the F_LOADONLY flag set, to really avoid
+    #    it being seen by the linker.
+    # At run time we better use the real file rather than another symlink,
+    # but for link time we create the symlink libNAME.so -> libNAME.so.V
+
+    case $with_aix_soname,$aix_use_runtimelinking in
+    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
     # soname into executable. Probably we can add versioning support to
     # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
+    aix,yes) # traditional libtool
+      dynamic_linker='AIX unversionable lib.so'
       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
       # instead of lib<name>.a to let people know that these are not
       # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+      ;;
+    aix,no) # traditional AIX only
+      dynamic_linker='AIX lib.a(lib.so.V)'
       # We preserve .a as extension for shared libraries through AIX4.2
       # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
+      library_names_spec='$libname$release.a $libname.a'
+      soname_spec='$libname$release$shared_ext$major'
+      ;;
+    svr4,*) # full svr4 only
+      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
+      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+      # We do not specify a path in Import Files, so LIBPATH fires.
+      shlibpath_overrides_runpath=yes
+      ;;
+    *,yes) # both, prefer svr4
+      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
+      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+      # unpreferred sharedlib libNAME.a needs extra handling
+      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
+      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
+      # We do not specify a path in Import Files, so LIBPATH fires.
+      shlibpath_overrides_runpath=yes
+      ;;
+    *,no) # both, prefer aix
+      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
+      library_names_spec='$libname$release.a $libname.a'
+      soname_spec='$libname$release$shared_ext$major'
+      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
+      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
+      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
+      ;;
+    esac
     shlibpath_var=LIBPATH
   fi
   ;;
@@ -10833,27 +11321,27 @@ amigaos*)
   powerpc)
     # Since July 2007 AmigaOS4 officially supports .so libraries.
     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
     ;;
   m68k)
     library_names_spec='$libname.ixlibrary $libname.a'
     # Create ${libname}_ixlibrary.a entries in /sys/libs.
-    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
     ;;
   esac
   ;;
 
 beos*)
-  library_names_spec='${libname}${shared_ext}'
+  library_names_spec='$libname$shared_ext'
   dynamic_linker="$host_os ld.so"
   shlibpath_var=LIBRARY_PATH
   ;;
 
 bsdi[45]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@@ -10865,7 +11353,7 @@ bsdi[45]*)
 
 cygwin* | mingw* | pw32* | cegcc*)
   version_type=windows
-  shrext_cmds=".dll"
+  shrext_cmds=.dll
   need_version=no
   need_lib_prefix=no
 
@@ -10874,8 +11362,8 @@ cygwin* | mingw* | pw32* | cegcc*)
     # gcc
     library_names_spec='$libname.dll.a'
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+    postinstall_cmds='base_file=`basename \$file`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
       $install_prog $dir/$dlname \$dldir/$dlname~
@@ -10891,17 +11379,17 @@ cygwin* | mingw* | pw32* | cegcc*)
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
 
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
     mingw* | cegcc*)
       # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
       ;;
     pw32*)
       # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
       ;;
     esac
     dynamic_linker='Win32 ld.exe'
@@ -10910,8 +11398,8 @@ cygwin* | mingw* | pw32* | cegcc*)
   *,cl*)
     # Native MSVC
     libname_spec='$name'
-    soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-    library_names_spec='${libname}.dll.lib'
+    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+    library_names_spec='$libname.dll.lib'
 
     case $build_os in
     mingw*)
@@ -10938,7 +11426,7 @@ cygwin* | mingw* | pw32* | cegcc*)
       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
       ;;
     *)
-      sys_lib_search_path_spec="$LIB"
+      sys_lib_search_path_spec=$LIB
       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
         # It is most probably a Windows format PATH.
         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
@@ -10951,8 +11439,8 @@ cygwin* | mingw* | pw32* | cegcc*)
     esac
 
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+    postinstall_cmds='base_file=`basename \$file`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
       $install_prog $dir/$dlname \$dldir/$dlname'
@@ -10965,7 +11453,7 @@ cygwin* | mingw* | pw32* | cegcc*)
 
   *)
     # Assume MSVC wrapper
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
     dynamic_linker='Win32 ld.exe'
     ;;
   esac
@@ -10978,8 +11466,8 @@ darwin* | rhapsody*)
   version_type=darwin
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
+  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+  soname_spec='$libname$release$major$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
@@ -10989,18 +11477,14 @@ darwin* | rhapsody*)
   ;;
 
 dgux*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
 freebsd* | dragonfly*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
@@ -11008,25 +11492,26 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[123]*) objformat=aout ;;
+    freebsd[23].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
   version_type=freebsd-$objformat
   case $version_type in
     freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+      soname_spec='$libname$release$shared_ext$major'
       need_version=no
       need_lib_prefix=no
       ;;
     freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
       need_version=yes
       ;;
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[01]* | freebsdelf3.[01]*)
@@ -11045,26 +11530,15 @@ freebsd* | dragonfly*)
   esac
   ;;
 
-gnu*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
 haiku*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   dynamic_linker="$host_os runtime_loader"
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
+  shlibpath_overrides_runpath=no
   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
   hardcode_into_libs=yes
   ;;
@@ -11082,14 +11556,15 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.so"
     shlibpath_var=LD_LIBRARY_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
+    if test 32 = "$HPUX_IA64_MODE"; then
       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
     else
       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
     fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
   hppa*64*)
     shrext_cmds='.sl'
@@ -11097,8 +11572,8 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
@@ -11107,8 +11582,8 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=SHLIB_PATH
     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     ;;
   esac
   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
@@ -11118,11 +11593,11 @@ hpux9* | hpux10* | hpux11*)
   ;;
 
 interix[3-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
@@ -11133,16 +11608,16 @@ irix5* | irix6* | nonstopux*)
   case $host_os in
     nonstopux*) version_type=nonstopux ;;
     *)
-	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux
+	if test yes = "$lt_cv_prog_gnu_ld"; then
+		version_type=linux # correct to gnu/linux during the next big refactor
 	else
 		version_type=irix
 	fi ;;
   esac
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
   case $host_os in
   irix5* | nonstopux*)
     libsuff= shlibsuff=
@@ -11161,8 +11636,8 @@ irix5* | irix6* | nonstopux*)
   esac
   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
   shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
   hardcode_into_libs=yes
   ;;
 
@@ -11171,13 +11646,33 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
-  version_type=linux
+linux*android*)
+  version_type=none # Android doesn't support versioned libraries.
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext'
+  soname_spec='$libname$release$shared_ext'
+  finish_cmds=
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  dynamic_linker='Android linker'
+  # Don't embed -rpath directories since the linker doesn't support them.
+  hardcode_libdir_flag_spec='-L$libdir'
+  ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+  version_type=linux # correct to gnu/linux during the next big refactor
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
@@ -11221,7 +11716,12 @@ fi
   # before this can be enabled.
   hardcode_into_libs=yes
 
-  # Append ld.so.conf contents to the search path
+  # Ideally, we could use ldconfig to report *all* directores which are
+  # searched for libraries, however this is still not possible.  Aside from not
+  # being certain /sbin/ldconfig is available, command
+  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
+  # even though it is searched at run-time.  Try to do the best guess by
+  # appending ld.so.conf contents (and includes) to the search path.
   if test -f /etc/ld.so.conf; then
     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
@@ -11253,12 +11753,12 @@ netbsd*)
   need_lib_prefix=no
   need_version=no
   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
     dynamic_linker='NetBSD (a.out) ld.so'
   else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     dynamic_linker='NetBSD ld.elf_so'
   fi
   shlibpath_var=LD_LIBRARY_PATH
@@ -11267,8 +11767,8 @@ netbsd*)
   ;;
 
 newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   ;;
@@ -11277,58 +11777,68 @@ newsos6)
   version_type=qnx
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
   dynamic_linker='ldqnx.so'
   ;;
 
-openbsd*)
+openbsd* | bitrig*)
   version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
+  sys_lib_dlsearch_path_spec=/usr/lib
   need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
-    *)				need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[89] | openbsd2.[89].*)
-	shlibpath_overrides_runpath=no
-	;;
-      *)
-	shlibpath_overrides_runpath=yes
-	;;
-      esac
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+    need_version=no
   else
-    shlibpath_overrides_runpath=yes
+    need_version=yes
   fi
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
   ;;
 
 os2*)
   libname_spec='$name'
-  shrext_cmds=".dll"
+  version_type=windows
+  shrext_cmds=.dll
+  need_version=no
   need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
+  # OS/2 can only load a DLL with a base name of 8 characters or less.
+  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+    v=$($ECHO $release$versuffix | tr -d .-);
+    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+    $ECHO $n$v`$shared_ext'
+  library_names_spec='${libname}_dll.$libext'
   dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
+  shlibpath_var=BEGINLIBPATH
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+  postinstall_cmds='base_file=`basename \$file`~
+    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
+    dldir=$destdir/`dirname \$dlpath`~
+    test -d \$dldir || mkdir -p \$dldir~
+    $install_prog $dir/$dlname \$dldir/$dlname~
+    chmod a+x \$dldir/$dlname~
+    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+    fi'
+  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
+    dlpath=$dir/\$dldll~
+    $RM \$dlpath'
   ;;
 
 osf3* | osf4* | osf5*)
   version_type=osf
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
   ;;
 
 rdos*)
@@ -11336,11 +11846,11 @@ rdos*)
   ;;
 
 solaris*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
@@ -11350,20 +11860,20 @@ solaris*)
 
 sunos4*)
   version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
+  if test yes = "$with_gnu_ld"; then
     need_lib_prefix=no
   fi
   need_version=yes
   ;;
 
 sysv4 | sysv4.3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   case $host_vendor in
     sni)
@@ -11384,24 +11894,24 @@ sysv4 | sysv4.3*)
   ;;
 
 sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
+  if test -d /usr/nec; then
+    version_type=linux # correct to gnu/linux during the next big refactor
+    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+    soname_spec='$libname$shared_ext.$major'
     shlibpath_var=LD_LIBRARY_PATH
   fi
   ;;
 
 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
+  version_type=sco
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
+  if test yes = "$with_gnu_ld"; then
     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
   else
     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
@@ -11416,19 +11926,19 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
 tpf*)
   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
   ;;
 
 uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -11438,20 +11948,35 @@ uts4*)
 esac
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
 $as_echo "$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
+test no = "$dynamic_linker" && can_build_shared=no
 
 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 fi
 
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
-  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
 fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
-  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
 fi
 
+# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
+configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
+
+# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
+configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
+
+
+
+
+
+
 
 
 
@@ -11548,15 +12073,15 @@ $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
 hardcode_action=
 if test -n "$hardcode_libdir_flag_spec" ||
    test -n "$runpath_var" ||
-   test "X$hardcode_automatic" = "Xyes" ; then
+   test yes = "$hardcode_automatic"; then
 
   # We can hardcode non-existent directories.
-  if test "$hardcode_direct" != no &&
+  if test no != "$hardcode_direct" &&
      # If the only mechanism to avoid hardcoding is shlibpath_var, we
      # have to relink, otherwise we might link with an installed library
      # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
-     test "$hardcode_minus_L" != no; then
+     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
+     test no != "$hardcode_minus_L"; then
     # Linking always hardcodes the temporary library directory.
     hardcode_action=relink
   else
@@ -11571,12 +12096,12 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
 $as_echo "$hardcode_action" >&6; }
 
-if test "$hardcode_action" = relink ||
-   test "$inherit_rpath" = yes; then
+if test relink = "$hardcode_action" ||
+   test yes = "$inherit_rpath"; then
   # Fast installation is not supported
   enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
+elif test yes = "$shlibpath_overrides_runpath" ||
+     test no = "$enable_shared"; then
   # Fast installation is not necessary
   enable_fast_install=needless
 fi
@@ -11586,7 +12111,7 @@ fi
 
 
 
-  if test "x$enable_dlopen" != xyes; then
+  if test yes != "$enable_dlopen"; then
   enable_dlopen=unknown
   enable_dlopen_self=unknown
   enable_dlopen_self_static=unknown
@@ -11596,23 +12121,23 @@ else
 
   case $host_os in
   beos*)
-    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen=load_add_on
     lt_cv_dlopen_libs=
     lt_cv_dlopen_self=yes
     ;;
 
   mingw* | pw32* | cegcc*)
-    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen=LoadLibrary
     lt_cv_dlopen_libs=
     ;;
 
   cygwin*)
-    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen=dlopen
     lt_cv_dlopen_libs=
     ;;
 
   darwin*)
-  # if libdl is installed we need to link against it
+    # if libdl is installed we need to link against it
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
 $as_echo_n "checking for dlopen in -ldl... " >&6; }
 if ${ac_cv_lib_dl_dlopen+:} false; then :
@@ -11650,10 +12175,10 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
 else
 
-    lt_cv_dlopen="dyld"
+    lt_cv_dlopen=dyld
     lt_cv_dlopen_libs=
     lt_cv_dlopen_self=yes
 
@@ -11661,10 +12186,18 @@ fi
 
     ;;
 
+  tpf*)
+    # Don't try to run any link tests for TPF.  We know it's impossible
+    # because TPF is a cross-compiler, and we know how we open DSOs.
+    lt_cv_dlopen=dlopen
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=no
+    ;;
+
   *)
     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
 if test "x$ac_cv_func_shl_load" = xyes; then :
-  lt_cv_dlopen="shl_load"
+  lt_cv_dlopen=shl_load
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
 $as_echo_n "checking for shl_load in -ldld... " >&6; }
@@ -11703,11 +12236,11 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
-  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
 else
   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
 if test "x$ac_cv_func_dlopen" = xyes; then :
-  lt_cv_dlopen="dlopen"
+  lt_cv_dlopen=dlopen
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
 $as_echo_n "checking for dlopen in -ldl... " >&6; }
@@ -11746,7 +12279,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
@@ -11785,7 +12318,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
 $as_echo_n "checking for dld_link in -ldld... " >&6; }
@@ -11824,7 +12357,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
-  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
 fi
 
 
@@ -11845,21 +12378,21 @@ fi
     ;;
   esac
 
-  if test "x$lt_cv_dlopen" != xno; then
-    enable_dlopen=yes
-  else
+  if test no = "$lt_cv_dlopen"; then
     enable_dlopen=no
+  else
+    enable_dlopen=yes
   fi
 
   case $lt_cv_dlopen in
   dlopen)
-    save_CPPFLAGS="$CPPFLAGS"
-    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+    save_CPPFLAGS=$CPPFLAGS
+    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
-    save_LDFLAGS="$LDFLAGS"
+    save_LDFLAGS=$LDFLAGS
     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
-    save_LIBS="$LIBS"
+    save_LIBS=$LIBS
     LIBS="$lt_cv_dlopen_libs $LIBS"
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
@@ -11867,7 +12400,7 @@ $as_echo_n "checking whether a program can dlopen itself... " >&6; }
 if ${lt_cv_dlopen_self+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  	  if test "$cross_compiling" = yes; then :
+  	  if test yes = "$cross_compiling"; then :
   lt_cv_dlopen_self=cross
 else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
@@ -11914,9 +12447,9 @@ else
 #  endif
 #endif
 
-/* When -fvisbility=hidden is used, assume the code has been annotated
+/* When -fvisibility=hidden is used, assume the code has been annotated
    correspondingly for the symbols needed.  */
-#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
 int fnord () __attribute__((visibility("default")));
 #endif
 
@@ -11946,7 +12479,7 @@ _LT_EOF
   (eval $ac_link) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
     (./conftest; exit; ) >&5 2>/dev/null
     lt_status=$?
     case x$lt_status in
@@ -11966,14 +12499,14 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
 $as_echo "$lt_cv_dlopen_self" >&6; }
 
-    if test "x$lt_cv_dlopen_self" = xyes; then
+    if test yes = "$lt_cv_dlopen_self"; then
       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
 if ${lt_cv_dlopen_self_static+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  	  if test "$cross_compiling" = yes; then :
+  	  if test yes = "$cross_compiling"; then :
   lt_cv_dlopen_self_static=cross
 else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
@@ -12020,9 +12553,9 @@ else
 #  endif
 #endif
 
-/* When -fvisbility=hidden is used, assume the code has been annotated
+/* When -fvisibility=hidden is used, assume the code has been annotated
    correspondingly for the symbols needed.  */
-#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
 int fnord () __attribute__((visibility("default")));
 #endif
 
@@ -12052,7 +12585,7 @@ _LT_EOF
   (eval $ac_link) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
     (./conftest; exit; ) >&5 2>/dev/null
     lt_status=$?
     case x$lt_status in
@@ -12073,9 +12606,9 @@ fi
 $as_echo "$lt_cv_dlopen_self_static" >&6; }
     fi
 
-    CPPFLAGS="$save_CPPFLAGS"
-    LDFLAGS="$save_LDFLAGS"
-    LIBS="$save_LIBS"
+    CPPFLAGS=$save_CPPFLAGS
+    LDFLAGS=$save_LDFLAGS
+    LIBS=$save_LIBS
     ;;
   esac
 
@@ -12119,7 +12652,7 @@ else
 # FIXME - insert some real tests, host_os isn't really good enough
   case $host_os in
   darwin*)
-    if test -n "$STRIP" ; then
+    if test -n "$STRIP"; then
       striplib="$STRIP -x"
       old_striplib="$STRIP -S"
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -12147,7 +12680,7 @@ fi
 
 
 
-  # Report which library types will actually be built
+  # Report what library types will actually be built
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
@@ -12155,13 +12688,13 @@ $as_echo "$can_build_shared" >&6; }
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
 $as_echo_n "checking whether to build shared libraries... " >&6; }
-  test "$can_build_shared" = "no" && enable_shared=no
+  test no = "$can_build_shared" && enable_shared=no
 
   # On AIX, shared libraries and static libraries use the same namespace, and
   # are all built from PIC.
   case $host_os in
   aix3*)
-    test "$enable_shared" = yes && enable_static=no
+    test yes = "$enable_shared" && enable_static=no
     if test -n "$RANLIB"; then
       archive_cmds="$archive_cmds~\$RANLIB \$lib"
       postinstall_cmds='$RANLIB $lib'
@@ -12169,8 +12702,12 @@ $as_echo_n "checking whether to build shared libraries... " >&6; }
     ;;
 
   aix[4-9]*)
-    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-      test "$enable_shared" = yes && enable_static=no
+    if test ia64 != "$host_cpu"; then
+      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+      yes,aix,yes) ;;			# shared object as lib.so file only
+      yes,svr4,*) ;;			# shared object as lib.so archive member only
+      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
+      esac
     fi
     ;;
   esac
@@ -12180,7 +12717,7 @@ $as_echo "$enable_shared" >&6; }
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
 $as_echo_n "checking whether to build static libraries... " >&6; }
   # Make sure either enable_shared or enable_static is yes.
-  test "$enable_shared" = yes || enable_static=yes
+  test yes = "$enable_shared" || enable_static=yes
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
 $as_echo "$enable_static" >&6; }
 
@@ -12194,11 +12731,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-CC="$lt_save_CC"
+CC=$lt_save_CC
 
-      if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-    (test "X$CXX" != "Xg++"))) ; then
+      if test -n "$CXX" && ( test no != "$CXX" &&
+    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
+    (test g++ != "$CXX"))); then
   ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -12351,7 +12888,6 @@ export_dynamic_flag_spec_CXX=
 hardcode_direct_CXX=no
 hardcode_direct_absolute_CXX=no
 hardcode_libdir_flag_spec_CXX=
-hardcode_libdir_flag_spec_ld_CXX=
 hardcode_libdir_separator_CXX=
 hardcode_minus_L_CXX=no
 hardcode_shlibpath_var_CXX=unsupported
@@ -12378,7 +12914,7 @@ objext_CXX=$objext
 # the CXX compiler isn't working.  Some variables (like enable_shared)
 # are currently assumed to apply to all compilers on this platform,
 # and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_caught_CXX_error" != yes; then
+if test yes != "$_lt_caught_CXX_error"; then
   # Code to be used in simple compile tests
   lt_simple_compile_test_code="int some_variable = 0;"
 
@@ -12439,46 +12975,39 @@ $RM -r conftest*
   CFLAGS=$CXXFLAGS
   compiler=$CC
   compiler_CXX=$CC
-  for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+  func_cc_basename $compiler
+cc_basename=$func_cc_basename_result
 
 
   if test -n "$compiler"; then
     # We don't want -fno-exception when compiling C++ code, so set the
     # no_builtin_flag separately
-    if test "$GXX" = yes; then
+    if test yes = "$GXX"; then
       lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
     else
       lt_prog_compiler_no_builtin_flag_CXX=
     fi
 
-    if test "$GXX" = yes; then
+    if test yes = "$GXX"; then
       # Set up default GNU C++ configuration
 
 
 
 # Check whether --with-gnu-ld was given.
 if test "${with_gnu_ld+set}" = set; then :
-  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
 else
   with_gnu_ld=no
 fi
 
 ac_prog=ld
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   # Check if gcc -print-prog-name=ld gives a path.
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
 $as_echo_n "checking for ld used by $CC... " >&6; }
   case $host in
   *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
+    # gcc leaves a trailing carriage return, which upsets mingw
     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
   *)
     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
@@ -12492,7 +13021,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
 	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
       done
-      test -z "$LD" && LD="$ac_prog"
+      test -z "$LD" && LD=$ac_prog
       ;;
   "")
     # If it fails, then pretend we aren't using GCC.
@@ -12503,7 +13032,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
     with_gnu_ld=unknown
     ;;
   esac
-elif test "$with_gnu_ld" = yes; then
+elif test yes = "$with_gnu_ld"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
 $as_echo_n "checking for GNU ld... " >&6; }
 else
@@ -12514,32 +13043,32 @@ if ${lt_cv_path_LD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
   for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
     test -z "$ac_dir" && ac_dir=.
     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
+      lt_cv_path_LD=$ac_dir/$ac_prog
       # Check to see if the program is GNU ld.  I'd rather use --version,
       # but apparently some variants of GNU ld only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
       *GNU* | *'with BFD'*)
-	test "$with_gnu_ld" != no && break
+	test no != "$with_gnu_ld" && break
 	;;
       *)
-	test "$with_gnu_ld" != yes && break
+	test yes != "$with_gnu_ld" && break
 	;;
       esac
     fi
   done
-  IFS="$lt_save_ifs"
+  IFS=$lt_save_ifs
 else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+  lt_cv_path_LD=$LD # Let the user override the test with a path.
 fi
 fi
 
-LD="$lt_cv_path_LD"
+LD=$lt_cv_path_LD
 if test -n "$LD"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
 $as_echo "$LD" >&6; }
@@ -12575,22 +13104,22 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
 
       # Check if GNU C++ uses GNU ld as the underlying linker, since the
       # archiving commands below assume that GNU ld is being used.
-      if test "$with_gnu_ld" = yes; then
-        archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-        archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      if test yes = "$with_gnu_ld"; then
+        archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+        archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 
-        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-        export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+        hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
+        export_dynamic_flag_spec_CXX='$wl--export-dynamic'
 
         # If archive_cmds runs LD, not CC, wlarc should be empty
         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
         #     investigate it a little bit more. (MM)
-        wlarc='${wl}'
+        wlarc='$wl'
 
         # ancient GNU ld didn't support --whole-archive et. al.
         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
 	  $GREP 'no-whole-archive' > /dev/null; then
-          whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+          whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
         else
           whole_archive_flag_spec_CXX=
         fi
@@ -12627,18 +13156,30 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
         ld_shlibs_CXX=no
         ;;
       aix[4-9]*)
-        if test "$host_cpu" = ia64; then
+        if test ia64 = "$host_cpu"; then
           # On IA64, the linker does run time linking by default, so we don't
           # have to do anything special.
           aix_use_runtimelinking=no
           exp_sym_flag='-Bexport'
-          no_entry_flag=""
+          no_entry_flag=
         else
           aix_use_runtimelinking=no
 
           # Test if we are trying to use run time linking or normal
           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-          # need to do runtime linking.
+          # have runtime linking enabled, and use it for executables.
+          # For shared libraries, we enable/disable runtime linking
+          # depending on the kind of the shared library created -
+          # when "with_aix_soname,aix_use_runtimelinking" is:
+          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
+          # "aix,yes"  lib.so          shared, rtl:yes, for executables
+          #            lib.a           static archive
+          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
+          #            lib.a(lib.so.V) shared, rtl:no,  for executables
+          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+          #            lib.a(lib.so.V) shared, rtl:no
+          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
+          #            lib.a           static archive
           case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
 	    for ld_flag in $LDFLAGS; do
 	      case $ld_flag in
@@ -12648,6 +13189,13 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
 	        ;;
 	      esac
 	    done
+	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
+	      # so we don't have lib.a shared libs to link our executables.
+	      # We have to force runtime linking in this case.
+	      aix_use_runtimelinking=yes
+	      LDFLAGS="$LDFLAGS -Wl,-brtl"
+	    fi
 	    ;;
           esac
 
@@ -12666,13 +13214,21 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
         hardcode_direct_absolute_CXX=yes
         hardcode_libdir_separator_CXX=':'
         link_all_deplibs_CXX=yes
-        file_list_spec_CXX='${wl}-f,'
+        file_list_spec_CXX='$wl-f,'
+        case $with_aix_soname,$aix_use_runtimelinking in
+        aix,*) ;;	# no import file
+        svr4,* | *,yes) # use import file
+          # The Import File defines what to hardcode.
+          hardcode_direct_CXX=no
+          hardcode_direct_absolute_CXX=no
+          ;;
+        esac
 
-        if test "$GXX" = yes; then
+        if test yes = "$GXX"; then
           case $host_os in aix4.[012]|aix4.[012].*)
           # We only want to do this on AIX 4.2 and lower, the check
           # below for broken collect2 doesn't work under 4.3+
-	  collect2name=`${CC} -print-prog-name=collect2`
+	  collect2name=`$CC -print-prog-name=collect2`
 	  if test -f "$collect2name" &&
 	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
 	  then
@@ -12690,36 +13246,44 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
 	  fi
           esac
           shared_flag='-shared'
-	  if test "$aix_use_runtimelinking" = yes; then
-	    shared_flag="$shared_flag "'${wl}-G'
+	  if test yes = "$aix_use_runtimelinking"; then
+	    shared_flag=$shared_flag' $wl-G'
 	  fi
+	  # Need to ensure runtime linking is disabled for the traditional
+	  # shared library, or the linker may eventually find shared libraries
+	  # /with/ Import File - we do not want to mix them.
+	  shared_flag_aix='-shared'
+	  shared_flag_svr4='-shared $wl-G'
         else
           # not using gcc
-          if test "$host_cpu" = ia64; then
+          if test ia64 = "$host_cpu"; then
 	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 	  # chokes on -Wl,-G. The following line is correct:
 	  shared_flag='-G'
           else
-	    if test "$aix_use_runtimelinking" = yes; then
-	      shared_flag='${wl}-G'
+	    if test yes = "$aix_use_runtimelinking"; then
+	      shared_flag='$wl-G'
 	    else
-	      shared_flag='${wl}-bM:SRE'
+	      shared_flag='$wl-bM:SRE'
 	    fi
+	    shared_flag_aix='$wl-bM:SRE'
+	    shared_flag_svr4='$wl-G'
           fi
         fi
 
-        export_dynamic_flag_spec_CXX='${wl}-bexpall'
+        export_dynamic_flag_spec_CXX='$wl-bexpall'
         # It seems that -bexpall does not export symbols beginning with
         # underscore (_), so it is better to generate a list of symbols to
 	# export.
         always_export_symbols_CXX=yes
-        if test "$aix_use_runtimelinking" = yes; then
+	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
           # Warning - without using the other runtime loading flags (-brtl),
           # -berok will link without error, but may produce a broken library.
-          allow_undefined_flag_CXX='-berok'
+          # The "-G" linker flag allows undefined symbols.
+          no_undefined_flag_CXX='-bernotok'
           # Determine the default libpath from the value encoded in an empty
           # executable.
-          if test "${lt_cv_aix_libpath+set}" = set; then
+          if test set = "${lt_cv_aix_libpath+set}"; then
   aix_libpath=$lt_cv_aix_libpath
 else
   if ${lt_cv_aix_libpath__CXX+:} false; then :
@@ -12754,7 +13318,7 @@ fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
   if test -z "$lt_cv_aix_libpath__CXX"; then
-    lt_cv_aix_libpath__CXX="/usr/lib:/lib"
+    lt_cv_aix_libpath__CXX=/usr/lib:/lib
   fi
 
 fi
@@ -12762,18 +13326,18 @@ fi
   aix_libpath=$lt_cv_aix_libpath__CXX
 fi
 
-          hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+          hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
 
-          archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+          archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
         else
-          if test "$host_cpu" = ia64; then
-	    hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
+          if test ia64 = "$host_cpu"; then
+	    hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib'
 	    allow_undefined_flag_CXX="-z nodefs"
-	    archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	    archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
           else
 	    # Determine the default libpath from the value encoded in an
 	    # empty executable.
-	    if test "${lt_cv_aix_libpath+set}" = set; then
+	    if test set = "${lt_cv_aix_libpath+set}"; then
   aix_libpath=$lt_cv_aix_libpath
 else
   if ${lt_cv_aix_libpath__CXX+:} false; then :
@@ -12808,7 +13372,7 @@ fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
   if test -z "$lt_cv_aix_libpath__CXX"; then
-    lt_cv_aix_libpath__CXX="/usr/lib:/lib"
+    lt_cv_aix_libpath__CXX=/usr/lib:/lib
   fi
 
 fi
@@ -12816,22 +13380,34 @@ fi
   aix_libpath=$lt_cv_aix_libpath__CXX
 fi
 
-	    hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+	    hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
 	    # Warning - without using the other run time loading flags,
 	    # -berok will link without error, but may produce a broken library.
-	    no_undefined_flag_CXX=' ${wl}-bernotok'
-	    allow_undefined_flag_CXX=' ${wl}-berok'
-	    if test "$with_gnu_ld" = yes; then
+	    no_undefined_flag_CXX=' $wl-bernotok'
+	    allow_undefined_flag_CXX=' $wl-berok'
+	    if test yes = "$with_gnu_ld"; then
 	      # We only use this code for GNU lds that support --whole-archive.
-	      whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	      whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
 	    else
 	      # Exported symbols can be pulled into shared objects from archives
 	      whole_archive_flag_spec_CXX='$convenience'
 	    fi
 	    archive_cmds_need_lc_CXX=yes
-	    # This is similar to how AIX traditionally builds its shared
-	    # libraries.
-	    archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	    archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+	    # -brtl affects multiple linker settings, -berok does not and is overridden later
+	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
+	    if test svr4 != "$with_aix_soname"; then
+	      # This is similar to how AIX traditionally builds its shared
+	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
+	      archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+	    fi
+	    if test aix != "$with_aix_soname"; then
+	      archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_sy [...]
+	    else
+	      # used by -dlpreopen to get the symbols
+	      archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
+	    fi
+	    archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d'
           fi
         fi
         ;;
@@ -12841,7 +13417,7 @@ fi
 	  allow_undefined_flag_CXX=unsupported
 	  # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
 	  # support --undefined.  This deserves some investigation.  FIXME
-	  archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	  archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
 	else
 	  ld_shlibs_CXX=no
 	fi
@@ -12869,57 +13445,58 @@ fi
 	  # Tell ltmain to make .lib files, not .a files.
 	  libext=lib
 	  # Tell ltmain to make .dll files, not .so files.
-	  shrext_cmds=".dll"
+	  shrext_cmds=.dll
 	  # FIXME: Setting linknames here is a bad hack.
-	  archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
-	  archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
-	    else
-	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
-	    fi~
-	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
-	    linknames='
+	  archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+	  archive_expsym_cmds_CXX='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
+              cp "$export_symbols" "$output_objdir/$soname.def";
+              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+            else
+              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+            fi~
+            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+            linknames='
 	  # The linker will not automatically build a static lib if we build a DLL.
 	  # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
 	  enable_shared_with_static_runtimes_CXX=yes
 	  # Don't use ranlib
 	  old_postinstall_cmds_CXX='chmod 644 $oldlib'
 	  postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
-	    lt_tool_outputfile="@TOOL_OUTPUT@"~
-	    case $lt_outputfile in
-	      *.exe|*.EXE) ;;
-	      *)
-		lt_outputfile="$lt_outputfile.exe"
-		lt_tool_outputfile="$lt_tool_outputfile.exe"
-		;;
-	    esac~
-	    func_to_tool_file "$lt_outputfile"~
-	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
-	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
-	      $RM "$lt_outputfile.manifest";
-	    fi'
+            lt_tool_outputfile="@TOOL_OUTPUT@"~
+            case $lt_outputfile in
+              *.exe|*.EXE) ;;
+              *)
+                lt_outputfile=$lt_outputfile.exe
+                lt_tool_outputfile=$lt_tool_outputfile.exe
+                ;;
+            esac~
+            func_to_tool_file "$lt_outputfile"~
+            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+              $RM "$lt_outputfile.manifest";
+            fi'
 	  ;;
 	*)
 	  # g++
 	  # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
 	  # as there is no search path for DLLs.
 	  hardcode_libdir_flag_spec_CXX='-L$libdir'
-	  export_dynamic_flag_spec_CXX='${wl}--export-all-symbols'
+	  export_dynamic_flag_spec_CXX='$wl--export-all-symbols'
 	  allow_undefined_flag_CXX=unsupported
 	  always_export_symbols_CXX=no
 	  enable_shared_with_static_runtimes_CXX=yes
 
 	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-	    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-	    # If the export-symbols file already is a .def file (1st line
-	    # is EXPORTS), use it as is; otherwise, prepend...
-	    archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	      cp $export_symbols $output_objdir/$soname.def;
-	    else
-	      echo EXPORTS > $output_objdir/$soname.def;
-	      cat $export_symbols >> $output_objdir/$soname.def;
-	    fi~
-	    $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	    # If the export-symbols file already is a .def file, use it as
+	    # is; otherwise, prepend EXPORTS...
+	    archive_expsym_cmds_CXX='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
+              cp $export_symbols $output_objdir/$soname.def;
+            else
+              echo EXPORTS > $output_objdir/$soname.def;
+              cat $export_symbols >> $output_objdir/$soname.def;
+            fi~
+            $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
 	  else
 	    ld_shlibs_CXX=no
 	  fi
@@ -12933,26 +13510,27 @@ fi
   hardcode_direct_CXX=no
   hardcode_automatic_CXX=yes
   hardcode_shlibpath_var_CXX=unsupported
-  if test "$lt_cv_ld_force_load" = "yes"; then
-    whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+  if test yes = "$lt_cv_ld_force_load"; then
+    whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+
   else
     whole_archive_flag_spec_CXX=''
   fi
   link_all_deplibs_CXX=yes
-  allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
+  allow_undefined_flag_CXX=$_lt_dar_allow_undefined
   case $cc_basename in
-     ifort*) _lt_dar_can_shared=yes ;;
+     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
      *) _lt_dar_can_shared=$GCC ;;
   esac
-  if test "$_lt_dar_can_shared" = "yes"; then
+  if test yes = "$_lt_dar_can_shared"; then
     output_verbose_link_cmd=func_echo_all
-    archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
-    module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
-    module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
-       if test "$lt_cv_apple_cc_single_mod" != "yes"; then
-      archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
-      archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+    archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+    module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+    archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+    module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+       if test yes != "$lt_cv_apple_cc_single_mod"; then
+      archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
+      archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
     fi
 
   else
@@ -12961,6 +13539,34 @@ fi
 
 	;;
 
+      os2*)
+	hardcode_libdir_flag_spec_CXX='-L$libdir'
+	hardcode_minus_L_CXX=yes
+	allow_undefined_flag_CXX=unsupported
+	shrext_cmds=.dll
+	archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	  $ECHO EXPORTS >> $output_objdir/$libname.def~
+	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	  emximp -o $lib $output_objdir/$libname.def'
+	archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	  $ECHO EXPORTS >> $output_objdir/$libname.def~
+	  prefix_cmds="$SED"~
+	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
+	    prefix_cmds="$prefix_cmds -e 1d";
+	  fi~
+	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	  emximp -o $lib $output_objdir/$libname.def'
+	old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+	enable_shared_with_static_runtimes_CXX=yes
+	;;
+
       dgux*)
         case $cc_basename in
           ec++*)
@@ -12979,7 +13585,7 @@ fi
         esac
         ;;
 
-      freebsd[12]*)
+      freebsd2.*)
         # C++ shared libraries reported to be fairly broken before
 	# switch to ELF
         ld_shlibs_CXX=no
@@ -12995,18 +13601,15 @@ fi
         ld_shlibs_CXX=yes
         ;;
 
-      gnu*)
-        ;;
-
       haiku*)
-        archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
         link_all_deplibs_CXX=yes
         ;;
 
       hpux9*)
-        hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+        hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
         hardcode_libdir_separator_CXX=:
-        export_dynamic_flag_spec_CXX='${wl}-E'
+        export_dynamic_flag_spec_CXX='$wl-E'
         hardcode_direct_CXX=yes
         hardcode_minus_L_CXX=yes # Not in the search PATH,
 				             # but as the default
@@ -13018,7 +13621,7 @@ fi
             ld_shlibs_CXX=no
             ;;
           aCC*)
-            archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
             # Commands to make compiler produce verbose output that lists
             # what "hidden" libraries, object files and flags are used when
             # linking a shared library.
@@ -13027,11 +13630,11 @@ fi
             # explicitly linking system object files so we need to strip them
             # from the output so that they don't get included in the library
             # dependencies.
-            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
             ;;
           *)
-            if test "$GXX" = yes; then
-              archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            if test yes = "$GXX"; then
+              archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
             else
               # FIXME: insert proper C++ library support
               ld_shlibs_CXX=no
@@ -13041,15 +13644,15 @@ fi
         ;;
 
       hpux10*|hpux11*)
-        if test $with_gnu_ld = no; then
-	  hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+        if test no = "$with_gnu_ld"; then
+	  hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
 	  hardcode_libdir_separator_CXX=:
 
           case $host_cpu in
             hppa*64*|ia64*)
               ;;
             *)
-	      export_dynamic_flag_spec_CXX='${wl}-E'
+	      export_dynamic_flag_spec_CXX='$wl-E'
               ;;
           esac
         fi
@@ -13075,13 +13678,13 @@ fi
           aCC*)
 	    case $host_cpu in
 	      hppa*64*)
-	        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	        ;;
 	      ia64*)
-	        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	        ;;
 	      *)
-	        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	        ;;
 	    esac
 	    # Commands to make compiler produce verbose output that lists
@@ -13092,20 +13695,20 @@ fi
 	    # explicitly linking system object files so we need to strip them
 	    # from the output so that they don't get included in the library
 	    # dependencies.
-	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
 	    ;;
           *)
-	    if test "$GXX" = yes; then
-	      if test $with_gnu_ld = no; then
+	    if test yes = "$GXX"; then
+	      if test no = "$with_gnu_ld"; then
 	        case $host_cpu in
 	          hppa*64*)
-	            archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	            ;;
 	          ia64*)
-	            archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	            ;;
 	          *)
-	            archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	            ;;
 	        esac
 	      fi
@@ -13120,22 +13723,22 @@ fi
       interix[3-9]*)
 	hardcode_direct_CXX=no
 	hardcode_shlibpath_var_CXX=no
-	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-	export_dynamic_flag_spec_CXX='${wl}-E'
+	hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
+	export_dynamic_flag_spec_CXX='$wl-E'
 	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
 	# Instead, shared libraries are loaded at an image base (0x10000000 by
 	# default) and relocated if they conflict, which is a slow very memory
 	# consuming and fragmenting process.  To avoid this, we pick a random,
 	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
 	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-	archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-	archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
 	;;
       irix5* | irix6*)
         case $cc_basename in
           CC*)
 	    # SGI C++
-	    archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	    archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
 
 	    # Archives containing C++ object files must be created using
 	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
@@ -13144,22 +13747,22 @@ fi
 	    old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
 	    ;;
           *)
-	    if test "$GXX" = yes; then
-	      if test "$with_gnu_ld" = no; then
-	        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	    if test yes = "$GXX"; then
+	      if test no = "$with_gnu_ld"; then
+	        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
 	      else
-	        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
+	        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
 	      fi
 	    fi
 	    link_all_deplibs_CXX=yes
 	    ;;
         esac
-        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+        hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
         hardcode_libdir_separator_CXX=:
         inherit_rpath_CXX=yes
         ;;
 
-      linux* | k*bsd*-gnu | kopensolaris*-gnu)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
         case $cc_basename in
           KCC*)
 	    # Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -13167,8 +13770,8 @@ fi
 	    # KCC will only create a shared library if the output file
 	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
 	    # to its proper name (with version) after linking.
-	    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-	    archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	    archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
 	    # Commands to make compiler produce verbose output that lists
 	    # what "hidden" libraries, object files and flags are used when
 	    # linking a shared library.
@@ -13177,10 +13780,10 @@ fi
 	    # explicitly linking system object files so we need to strip them
 	    # from the output so that they don't get included in the library
 	    # dependencies.
-	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
 
-	    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	    hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
+	    export_dynamic_flag_spec_CXX='$wl--export-dynamic'
 
 	    # Archives containing C++ object files must be created using
 	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
@@ -13194,59 +13797,59 @@ fi
 	    # earlier do not add the objects themselves.
 	    case `$CC -V 2>&1` in
 	      *"Version 7."*)
-	        archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-		archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	        archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+		archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 		;;
 	      *)  # Version 8.0 or newer
 	        tmp_idyn=
 	        case $host_cpu in
 		  ia64*) tmp_idyn=' -i_dynamic';;
 		esac
-	        archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-		archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	        archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+		archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 		;;
 	    esac
 	    archive_cmds_need_lc_CXX=no
-	    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-	    whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	    hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
+	    export_dynamic_flag_spec_CXX='$wl--export-dynamic'
+	    whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
 	    ;;
           pgCC* | pgcpp*)
             # Portland Group C++ compiler
 	    case `$CC -V` in
 	    *pgCC\ [1-5].* | *pgcpp\ [1-5].*)
 	      prelink_cmds_CXX='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
-		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
+               rm -rf $tpldir~
+               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
 	      old_archive_cmds_CXX='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
-		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
-		$RANLIB $oldlib'
+                rm -rf $tpldir~
+                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+                $RANLIB $oldlib'
 	      archive_cmds_CXX='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+                rm -rf $tpldir~
+                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
 	      archive_expsym_cmds_CXX='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+                rm -rf $tpldir~
+                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 	      ;;
 	    *) # Version 6 and above use weak symbols
-	      archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-	      archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	      archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+	      archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 	      ;;
 	    esac
 
-	    hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
-	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-	    whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	    hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir'
+	    export_dynamic_flag_spec_CXX='$wl--export-dynamic'
+	    whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
             ;;
 	  cxx*)
 	    # Compaq C++
-	    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	    archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+	    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+	    archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname  -o $lib $wl-retain-symbols-file $wl$export_symbols'
 
 	    runpath_var=LD_RUN_PATH
 	    hardcode_libdir_flag_spec_CXX='-rpath $libdir'
@@ -13260,18 +13863,18 @@ fi
 	    # explicitly linking system object files so we need to strip them
 	    # from the output so that they don't get included in the library
 	    # dependencies.
-	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
 	    ;;
 	  xl* | mpixl* | bgxl*)
 	    # IBM XL 8.0 on PPC, with GNU ld
-	    hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-	    archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	    if test "x$supports_anon_versioning" = xyes; then
+	    hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
+	    export_dynamic_flag_spec_CXX='$wl--export-dynamic'
+	    archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	    if test yes = "$supports_anon_versioning"; then
 	      archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
-		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-		echo "local: *; };" >> $output_objdir/$libname.ver~
-		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+                echo "local: *; };" >> $output_objdir/$libname.ver~
+                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
 	    fi
 	    ;;
 	  *)
@@ -13279,10 +13882,10 @@ fi
 	    *Sun\ C*)
 	      # Sun C++ 5.9
 	      no_undefined_flag_CXX=' -zdefs'
-	      archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	      archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+	      archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
 	      hardcode_libdir_flag_spec_CXX='-R$libdir'
-	      whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	      whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
 	      compiler_needs_object_CXX=yes
 
 	      # Not sure whether something based on
@@ -13340,22 +13943,17 @@ fi
         ld_shlibs_CXX=yes
 	;;
 
-      openbsd2*)
-        # C++ shared libraries are fairly broken
-	ld_shlibs_CXX=no
-	;;
-
-      openbsd*)
+      openbsd* | bitrig*)
 	if test -f /usr/libexec/ld.so; then
 	  hardcode_direct_CXX=yes
 	  hardcode_shlibpath_var_CXX=no
 	  hardcode_direct_absolute_CXX=yes
 	  archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-	  hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-	    archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
-	    export_dynamic_flag_spec_CXX='${wl}-E'
-	    whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+	  hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
+	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
+	    archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
+	    export_dynamic_flag_spec_CXX='$wl-E'
+	    whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
 	  fi
 	  output_verbose_link_cmd=func_echo_all
 	else
@@ -13371,9 +13969,9 @@ fi
 	    # KCC will only create a shared library if the output file
 	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
 	    # to its proper name (with version) after linking.
-	    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
-	    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	    hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
 	    hardcode_libdir_separator_CXX=:
 
 	    # Archives containing C++ object files must be created using
@@ -13391,17 +13989,17 @@ fi
           cxx*)
 	    case $host in
 	      osf3*)
-	        allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
-	        archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
-	        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	        allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
+	        archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+	        hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
 		;;
 	      *)
 	        allow_undefined_flag_CXX=' -expect_unresolved \*'
-	        archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	        archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
 	        archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
-	          echo "-hidden">> $lib.exp~
-	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
-	          $RM $lib.exp'
+                  echo "-hidden">> $lib.exp~
+                  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
+                  $RM $lib.exp'
 	        hardcode_libdir_flag_spec_CXX='-rpath $libdir'
 		;;
 	    esac
@@ -13416,21 +14014,21 @@ fi
 	    # explicitly linking system object files so we need to strip them
 	    # from the output so that they don't get included in the library
 	    # dependencies.
-	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
 	    ;;
 	  *)
-	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-	      allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	    if test yes,no = "$GXX,$with_gnu_ld"; then
+	      allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
 	      case $host in
 	        osf3*)
-	          archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	          archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
 		  ;;
 	        *)
-	          archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	          archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
 		  ;;
 	      esac
 
-	      hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	      hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
 	      hardcode_libdir_separator_CXX=:
 
 	      # Commands to make compiler produce verbose output that lists
@@ -13476,9 +14074,9 @@ fi
 	    # Sun C++ 4.2, 5.x and Centerline C++
             archive_cmds_need_lc_CXX=yes
 	    no_undefined_flag_CXX=' -zdefs'
-	    archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	    archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	    archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+              $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
 	    hardcode_libdir_flag_spec_CXX='-R$libdir'
 	    hardcode_shlibpath_var_CXX=no
@@ -13486,7 +14084,7 @@ fi
 	      solaris2.[0-5] | solaris2.[0-5].*) ;;
 	      *)
 		# The compiler driver will combine and reorder linker options,
-		# but understands `-z linker_flag'.
+		# but understands '-z linker_flag'.
 	        # Supported since Solaris 2.6 (maybe 2.5.1?)
 		whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
 	        ;;
@@ -13503,30 +14101,30 @@ fi
 	    ;;
           gcx*)
 	    # Green Hills C++ Compiler
-	    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
 
 	    # The C++ compiler must be used to create the archive.
 	    old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
 	    ;;
           *)
 	    # GNU C++ compiler with Solaris linker
-	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-	      no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
+	    if test yes,no = "$GXX,$with_gnu_ld"; then
+	      no_undefined_flag_CXX=' $wl-z ${wl}defs'
 	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
-	        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
 	        archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+                  $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
 	        # Commands to make compiler produce verbose output that lists
 	        # what "hidden" libraries, object files and flags are used when
 	        # linking a shared library.
 	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 	      else
-	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
+	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
 	        # platform.
-	        archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
 	        archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+                  $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
 	        # Commands to make compiler produce verbose output that lists
 	        # what "hidden" libraries, object files and flags are used when
@@ -13534,11 +14132,11 @@ fi
 	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 	      fi
 
-	      hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+	      hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir'
 	      case $host_os in
 		solaris2.[0-5] | solaris2.[0-5].*) ;;
 		*)
-		  whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+		  whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
 		  ;;
 	      esac
 	    fi
@@ -13547,52 +14145,52 @@ fi
         ;;
 
     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
-      no_undefined_flag_CXX='${wl}-z,text'
+      no_undefined_flag_CXX='$wl-z,text'
       archive_cmds_need_lc_CXX=no
       hardcode_shlibpath_var_CXX=no
       runpath_var='LD_RUN_PATH'
 
       case $cc_basename in
         CC*)
-	  archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
       esac
       ;;
 
       sysv5* | sco3.2v5* | sco5v6*)
-	# Note: We can NOT use -z defs as we might desire, because we do not
+	# Note: We CANNOT use -z defs as we might desire, because we do not
 	# link with -lc, and that would cause any symbols used from libc to
 	# always be unresolved, which means just about no library would
 	# ever link correctly.  If we're not using GNU ld we use -z text
 	# though, which does catch some bad symbols but isn't as heavy-handed
 	# as -z defs.
-	no_undefined_flag_CXX='${wl}-z,text'
-	allow_undefined_flag_CXX='${wl}-z,nodefs'
+	no_undefined_flag_CXX='$wl-z,text'
+	allow_undefined_flag_CXX='$wl-z,nodefs'
 	archive_cmds_need_lc_CXX=no
 	hardcode_shlibpath_var_CXX=no
-	hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
+	hardcode_libdir_flag_spec_CXX='$wl-R,$libdir'
 	hardcode_libdir_separator_CXX=':'
 	link_all_deplibs_CXX=yes
-	export_dynamic_flag_spec_CXX='${wl}-Bexport'
+	export_dynamic_flag_spec_CXX='$wl-Bexport'
 	runpath_var='LD_RUN_PATH'
 
 	case $cc_basename in
           CC*)
-	    archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	    archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 	    old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
-	      '"$old_archive_cmds_CXX"
+              '"$old_archive_cmds_CXX"
 	    reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
-	      '"$reload_cmds_CXX"
+              '"$reload_cmds_CXX"
 	    ;;
 	  *)
-	    archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	    archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 	    ;;
 	esac
       ;;
@@ -13624,10 +14222,10 @@ fi
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
 $as_echo "$ld_shlibs_CXX" >&6; }
-    test "$ld_shlibs_CXX" = no && can_build_shared=no
+    test no = "$ld_shlibs_CXX" && can_build_shared=no
 
-    GCC_CXX="$GXX"
-    LD_CXX="$LD"
+    GCC_CXX=$GXX
+    LD_CXX=$LD
 
     ## CAVEAT EMPTOR:
     ## There is no encapsulation within the following macros, do not change
@@ -13655,6 +14253,7 @@ _lt_libdeps_save_CFLAGS=$CFLAGS
 case "$CC $CFLAGS " in #(
 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
 esac
 
 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
@@ -13670,13 +14269,13 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   pre_test_object_deps_done=no
 
   for p in `eval "$output_verbose_link_cmd"`; do
-    case ${prev}${p} in
+    case $prev$p in
 
     -L* | -R* | -l*)
        # Some compilers place space between "-{L,R}" and the path.
        # Remove the space.
-       if test $p = "-L" ||
-          test $p = "-R"; then
+       if test x-L = "$p" ||
+          test x-R = "$p"; then
 	 prev=$p
 	 continue
        fi
@@ -13692,16 +14291,16 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
        case $p in
        =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
        esac
-       if test "$pre_test_object_deps_done" = no; then
-	 case ${prev} in
+       if test no = "$pre_test_object_deps_done"; then
+	 case $prev in
 	 -L | -R)
 	   # Internal compiler library paths should come after those
 	   # provided the user.  The postdeps already come after the
 	   # user supplied libs so there is no need to process them.
 	   if test -z "$compiler_lib_search_path_CXX"; then
-	     compiler_lib_search_path_CXX="${prev}${p}"
+	     compiler_lib_search_path_CXX=$prev$p
 	   else
-	     compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
+	     compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p"
 	   fi
 	   ;;
 	 # The "-l" case would never come before the object being
@@ -13709,9 +14308,9 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
 	 esac
        else
 	 if test -z "$postdeps_CXX"; then
-	   postdeps_CXX="${prev}${p}"
+	   postdeps_CXX=$prev$p
 	 else
-	   postdeps_CXX="${postdeps_CXX} ${prev}${p}"
+	   postdeps_CXX="${postdeps_CXX} $prev$p"
 	 fi
        fi
        prev=
@@ -13726,15 +14325,15 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
 	 continue
        fi
 
-       if test "$pre_test_object_deps_done" = no; then
+       if test no = "$pre_test_object_deps_done"; then
 	 if test -z "$predep_objects_CXX"; then
-	   predep_objects_CXX="$p"
+	   predep_objects_CXX=$p
 	 else
 	   predep_objects_CXX="$predep_objects_CXX $p"
 	 fi
        else
 	 if test -z "$postdep_objects_CXX"; then
-	   postdep_objects_CXX="$p"
+	   postdep_objects_CXX=$p
 	 else
 	   postdep_objects_CXX="$postdep_objects_CXX $p"
 	 fi
@@ -13764,51 +14363,6 @@ interix[3-9]*)
   postdep_objects_CXX=
   postdeps_CXX=
   ;;
-
-linux*)
-  case `$CC -V 2>&1 | sed 5q` in
-  *Sun\ C*)
-    # Sun C++ 5.9
-
-    # The more standards-conforming stlport4 library is
-    # incompatible with the Cstd library. Avoid specifying
-    # it if it's in CXXFLAGS. Ignore libCrun as
-    # -library=stlport4 depends on it.
-    case " $CXX $CXXFLAGS " in
-    *" -library=stlport4 "*)
-      solaris_use_stlport4=yes
-      ;;
-    esac
-
-    if test "$solaris_use_stlport4" != yes; then
-      postdeps_CXX='-library=Cstd -library=Crun'
-    fi
-    ;;
-  esac
-  ;;
-
-solaris*)
-  case $cc_basename in
-  CC* | sunCC*)
-    # The more standards-conforming stlport4 library is
-    # incompatible with the Cstd library. Avoid specifying
-    # it if it's in CXXFLAGS. Ignore libCrun as
-    # -library=stlport4 depends on it.
-    case " $CXX $CXXFLAGS " in
-    *" -library=stlport4 "*)
-      solaris_use_stlport4=yes
-      ;;
-    esac
-
-    # Adding this requires a known-good setup of shared libraries for
-    # Sun compiler versions before 5.6, else PIC objects from an old
-    # archive will be linked into the output, leading to subtle bugs.
-    if test "$solaris_use_stlport4" != yes; then
-      postdeps_CXX='-library=Cstd -library=Crun'
-    fi
-    ;;
-  esac
-  ;;
 esac
 
 
@@ -13817,7 +14371,7 @@ case " $postdeps_CXX " in
 esac
  compiler_lib_search_dirs_CXX=
 if test -n "${compiler_lib_search_path_CXX}"; then
- compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+ compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'`
 fi
 
 
@@ -13856,17 +14410,18 @@ lt_prog_compiler_static_CXX=
 
 
   # C++ specific cases for pic, static, wl, etc.
-  if test "$GXX" = yes; then
+  if test yes = "$GXX"; then
     lt_prog_compiler_wl_CXX='-Wl,'
     lt_prog_compiler_static_CXX='-static'
 
     case $host_os in
     aix*)
       # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
 	# AIX 5 now supports IA64 processor
 	lt_prog_compiler_static_CXX='-Bstatic'
       fi
+      lt_prog_compiler_pic_CXX='-fPIC'
       ;;
 
     amigaos*)
@@ -13877,8 +14432,8 @@ lt_prog_compiler_static_CXX=
         ;;
       m68k)
             # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
+            # adding the '-m68020' flag to GCC prevents building anything better,
+            # like '-m68040'.
             lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
         ;;
       esac
@@ -13893,6 +14448,11 @@ lt_prog_compiler_static_CXX=
       # Although the cygwin gcc ignores -fPIC, still need this for old-style
       # (--disable-auto-import) libraries
       lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+      case $host_os in
+      os2*)
+	lt_prog_compiler_static_CXX='$wl-static'
+	;;
+      esac
       ;;
     darwin* | rhapsody*)
       # PIC is the default on this platform
@@ -13942,7 +14502,7 @@ lt_prog_compiler_static_CXX=
     case $host_os in
       aix[4-9]*)
 	# All AIX code is PIC.
-	if test "$host_cpu" = ia64; then
+	if test ia64 = "$host_cpu"; then
 	  # AIX 5 now supports IA64 processor
 	  lt_prog_compiler_static_CXX='-Bstatic'
 	else
@@ -13982,14 +14542,14 @@ lt_prog_compiler_static_CXX=
 	case $cc_basename in
 	  CC*)
 	    lt_prog_compiler_wl_CXX='-Wl,'
-	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
-	    if test "$host_cpu" != ia64; then
+	    lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
+	    if test ia64 != "$host_cpu"; then
 	      lt_prog_compiler_pic_CXX='+Z'
 	    fi
 	    ;;
 	  aCC*)
 	    lt_prog_compiler_wl_CXX='-Wl,'
-	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+	    lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
 	    case $host_cpu in
 	    hppa*64*|ia64*)
 	      # +Z the default
@@ -14018,7 +14578,7 @@ lt_prog_compiler_static_CXX=
 	    ;;
 	esac
 	;;
-      linux* | k*bsd*-gnu | kopensolaris*-gnu)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
 	case $cc_basename in
 	  KCC*)
 	    # KAI C++ Compiler
@@ -14026,7 +14586,7 @@ lt_prog_compiler_static_CXX=
 	    lt_prog_compiler_pic_CXX='-fPIC'
 	    ;;
 	  ecpc* )
-	    # old Intel C++ for x86_64 which still supported -KPIC.
+	    # old Intel C++ for x86_64, which still supported -KPIC.
 	    lt_prog_compiler_wl_CXX='-Wl,'
 	    lt_prog_compiler_pic_CXX='-KPIC'
 	    lt_prog_compiler_static_CXX='-static'
@@ -14171,7 +14731,7 @@ lt_prog_compiler_static_CXX=
   fi
 
 case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
+  # For platforms that do not support PIC, -DPIC is meaningless:
   *djgpp*)
     lt_prog_compiler_pic_CXX=
     ;;
@@ -14203,7 +14763,7 @@ else
   lt_cv_prog_compiler_pic_works_CXX=no
    ac_outfile=conftest.$ac_objext
    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
+   lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"  ## exclude from sc_useless_quotes_in_assignment
    # Insert the option either (1) after the last *FLAGS variable, or
    # (2) before a word containing "conftest.", or (3) at the end.
    # Note that $ac_compile itself does not contain backslashes and begins
@@ -14233,7 +14793,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
 
-if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
+if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then
     case $lt_prog_compiler_pic_CXX in
      "" | " "*) ;;
      *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
@@ -14259,7 +14819,7 @@ if ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_static_works_CXX=no
-   save_LDFLAGS="$LDFLAGS"
+   save_LDFLAGS=$LDFLAGS
    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
    echo "$lt_simple_link_test_code" > conftest.$ac_ext
    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -14278,13 +14838,13 @@ else
      fi
    fi
    $RM -r conftest*
-   LDFLAGS="$save_LDFLAGS"
+   LDFLAGS=$save_LDFLAGS
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
 
-if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
+if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then
     :
 else
     lt_prog_compiler_static_CXX=
@@ -14398,8 +14958,8 @@ $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
 
 
 
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
+hard_links=nottested
+if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then
   # do not overwrite the value of need_locks provided by the user
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
 $as_echo_n "checking if we can lock with hard links... " >&6; }
@@ -14411,9 +14971,9 @@ $as_echo_n "checking if we can lock with hard links... " >&6; }
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
 $as_echo "$hard_links" >&6; }
-  if test "$hard_links" = no; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+  if test no = "$hard_links"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
     need_locks=warn
   fi
 else
@@ -14430,21 +14990,27 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
   case $host_os in
   aix[4-9]*)
     # If we're using GNU nm, then we don't want the "-C" option.
-    # -C means demangle to AIX nm, but means don't demangle with GNU nm
-    # Also, AIX nm treats weak defined symbols like other global defined
-    # symbols, whereas GNU nm marks them as "W".
+    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
+    # Without the "-l" option, or with the "-B" option, AIX nm treats
+    # weak defined symbols like other global defined symbols, whereas
+    # GNU nm marks them as "W".
+    # While the 'weak' keyword is ignored in the Export File, we need
+    # it in the Import File for the 'aix-soname' feature, so we have
+    # to replace the "-B" option with "-P" for AIX nm.
     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
     else
-      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+      export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
     fi
     ;;
   pw32*)
-    export_symbols_cmds_CXX="$ltdll_cmds"
+    export_symbols_cmds_CXX=$ltdll_cmds
     ;;
   cygwin* | mingw* | cegcc*)
     case $cc_basename in
-    cl*) ;;
+    cl*)
+      exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+      ;;
     *)
       export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
       exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
@@ -14461,7 +15027,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
 $as_echo "$ld_shlibs_CXX" >&6; }
-test "$ld_shlibs_CXX" = no && can_build_shared=no
+test no = "$ld_shlibs_CXX" && can_build_shared=no
 
 with_gnu_ld_CXX=$with_gnu_ld
 
@@ -14478,7 +15044,7 @@ x|xyes)
   # Assume -lc should be added
   archive_cmds_need_lc_CXX=yes
 
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
+  if test yes,yes = "$GCC,$enable_shared"; then
     case $archive_cmds_CXX in
     *'~'*)
       # FIXME: we may have to deal with multi-command sequences.
@@ -14600,15 +15166,13 @@ esac
 
 
 
-
-
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
 $as_echo_n "checking dynamic linker characteristics... " >&6; }
 
 library_names_spec=
 libname_spec='lib$name'
 soname_spec=
-shrext_cmds=".so"
+shrext_cmds=.so
 postinstall_cmds=
 postuninstall_cmds=
 finish_cmds=
@@ -14625,56 +15189,108 @@ hardcode_into_libs=no
 # flags to be left without arguments
 need_version=unknown
 
+
+
 case $host_os in
 aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
   # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
+  soname_spec='$libname$release$shared_ext$major'
   ;;
 
 aix[4-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
+  if test ia64 = "$host_cpu"; then
     # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
     shlibpath_var=LD_LIBRARY_PATH
   else
     # With GCC up to 2.95.x, collect2 would create an import file
     # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
+    # the line '#! .'.  This would cause the generated library to
+    # depend on '.', always an invalid library.  This was fixed in
     # development snapshots of GCC prior to 3.0.
     case $host_os in
       aix4 | aix4.[01] | aix4.[01].*)
       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 	   echo ' yes '
-	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
 	:
       else
 	can_build_shared=no
       fi
       ;;
     esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # Using Import Files as archive members, it is possible to support
+    # filename-based versioning of shared library archives on AIX. While
+    # this would work for both with and without runtime linking, it will
+    # prevent static linking of such archives. So we do filename-based
+    # shared library versioning with .so extension only, which is used
+    # when both runtime linking and shared linking is enabled.
+    # Unfortunately, runtime linking may impact performance, so we do
+    # not want this to be the default eventually. Also, we use the
+    # versioned .so libs for executables only if there is the -brtl
+    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+    # To allow for filename-based versioning support, we need to create
+    # libNAME.so.V as an archive file, containing:
+    # *) an Import File, referring to the versioned filename of the
+    #    archive as well as the shared archive member, telling the
+    #    bitwidth (32 or 64) of that shared object, and providing the
+    #    list of exported symbols of that shared object, eventually
+    #    decorated with the 'weak' keyword
+    # *) the shared object with the F_LOADONLY flag set, to really avoid
+    #    it being seen by the linker.
+    # At run time we better use the real file rather than another symlink,
+    # but for link time we create the symlink libNAME.so -> libNAME.so.V
+
+    case $with_aix_soname,$aix_use_runtimelinking in
+    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
     # soname into executable. Probably we can add versioning support to
     # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
+    aix,yes) # traditional libtool
+      dynamic_linker='AIX unversionable lib.so'
       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
       # instead of lib<name>.a to let people know that these are not
       # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+      ;;
+    aix,no) # traditional AIX only
+      dynamic_linker='AIX lib.a(lib.so.V)'
       # We preserve .a as extension for shared libraries through AIX4.2
       # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
+      library_names_spec='$libname$release.a $libname.a'
+      soname_spec='$libname$release$shared_ext$major'
+      ;;
+    svr4,*) # full svr4 only
+      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
+      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+      # We do not specify a path in Import Files, so LIBPATH fires.
+      shlibpath_overrides_runpath=yes
+      ;;
+    *,yes) # both, prefer svr4
+      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
+      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+      # unpreferred sharedlib libNAME.a needs extra handling
+      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
+      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
+      # We do not specify a path in Import Files, so LIBPATH fires.
+      shlibpath_overrides_runpath=yes
+      ;;
+    *,no) # both, prefer aix
+      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
+      library_names_spec='$libname$release.a $libname.a'
+      soname_spec='$libname$release$shared_ext$major'
+      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
+      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
+      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
+      ;;
+    esac
     shlibpath_var=LIBPATH
   fi
   ;;
@@ -14684,27 +15300,27 @@ amigaos*)
   powerpc)
     # Since July 2007 AmigaOS4 officially supports .so libraries.
     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
     ;;
   m68k)
     library_names_spec='$libname.ixlibrary $libname.a'
     # Create ${libname}_ixlibrary.a entries in /sys/libs.
-    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
     ;;
   esac
   ;;
 
 beos*)
-  library_names_spec='${libname}${shared_ext}'
+  library_names_spec='$libname$shared_ext'
   dynamic_linker="$host_os ld.so"
   shlibpath_var=LIBRARY_PATH
   ;;
 
 bsdi[45]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@@ -14716,7 +15332,7 @@ bsdi[45]*)
 
 cygwin* | mingw* | pw32* | cegcc*)
   version_type=windows
-  shrext_cmds=".dll"
+  shrext_cmds=.dll
   need_version=no
   need_lib_prefix=no
 
@@ -14725,8 +15341,8 @@ cygwin* | mingw* | pw32* | cegcc*)
     # gcc
     library_names_spec='$libname.dll.a'
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+    postinstall_cmds='base_file=`basename \$file`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
       $install_prog $dir/$dlname \$dldir/$dlname~
@@ -14742,16 +15358,16 @@ cygwin* | mingw* | pw32* | cegcc*)
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
 
       ;;
     mingw* | cegcc*)
       # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
       ;;
     pw32*)
       # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
       ;;
     esac
     dynamic_linker='Win32 ld.exe'
@@ -14760,8 +15376,8 @@ cygwin* | mingw* | pw32* | cegcc*)
   *,cl*)
     # Native MSVC
     libname_spec='$name'
-    soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-    library_names_spec='${libname}.dll.lib'
+    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+    library_names_spec='$libname.dll.lib'
 
     case $build_os in
     mingw*)
@@ -14788,7 +15404,7 @@ cygwin* | mingw* | pw32* | cegcc*)
       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
       ;;
     *)
-      sys_lib_search_path_spec="$LIB"
+      sys_lib_search_path_spec=$LIB
       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
         # It is most probably a Windows format PATH.
         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
@@ -14801,8 +15417,8 @@ cygwin* | mingw* | pw32* | cegcc*)
     esac
 
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+    postinstall_cmds='base_file=`basename \$file`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
       $install_prog $dir/$dlname \$dldir/$dlname'
@@ -14815,7 +15431,7 @@ cygwin* | mingw* | pw32* | cegcc*)
 
   *)
     # Assume MSVC wrapper
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
     dynamic_linker='Win32 ld.exe'
     ;;
   esac
@@ -14828,8 +15444,8 @@ darwin* | rhapsody*)
   version_type=darwin
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
+  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+  soname_spec='$libname$release$major$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
@@ -14838,18 +15454,14 @@ darwin* | rhapsody*)
   ;;
 
 dgux*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
 freebsd* | dragonfly*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
@@ -14857,25 +15469,26 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[123]*) objformat=aout ;;
+    freebsd[23].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
   version_type=freebsd-$objformat
   case $version_type in
     freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+      soname_spec='$libname$release$shared_ext$major'
       need_version=no
       need_lib_prefix=no
       ;;
     freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
       need_version=yes
       ;;
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[01]* | freebsdelf3.[01]*)
@@ -14894,26 +15507,15 @@ freebsd* | dragonfly*)
   esac
   ;;
 
-gnu*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
 haiku*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   dynamic_linker="$host_os runtime_loader"
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
+  shlibpath_overrides_runpath=no
   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
   hardcode_into_libs=yes
   ;;
@@ -14931,14 +15533,15 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.so"
     shlibpath_var=LD_LIBRARY_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
+    if test 32 = "$HPUX_IA64_MODE"; then
       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
     else
       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
     fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
   hppa*64*)
     shrext_cmds='.sl'
@@ -14946,8 +15549,8 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
@@ -14956,8 +15559,8 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=SHLIB_PATH
     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     ;;
   esac
   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
@@ -14967,11 +15570,11 @@ hpux9* | hpux10* | hpux11*)
   ;;
 
 interix[3-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
@@ -14982,16 +15585,16 @@ irix5* | irix6* | nonstopux*)
   case $host_os in
     nonstopux*) version_type=nonstopux ;;
     *)
-	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux
+	if test yes = "$lt_cv_prog_gnu_ld"; then
+		version_type=linux # correct to gnu/linux during the next big refactor
 	else
 		version_type=irix
 	fi ;;
   esac
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
   case $host_os in
   irix5* | nonstopux*)
     libsuff= shlibsuff=
@@ -15010,8 +15613,8 @@ irix5* | irix6* | nonstopux*)
   esac
   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
   shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
   hardcode_into_libs=yes
   ;;
 
@@ -15020,13 +15623,33 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
-  version_type=linux
+linux*android*)
+  version_type=none # Android doesn't support versioned libraries.
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext'
+  soname_spec='$libname$release$shared_ext'
+  finish_cmds=
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  dynamic_linker='Android linker'
+  # Don't embed -rpath directories since the linker doesn't support them.
+  hardcode_libdir_flag_spec_CXX='-L$libdir'
+  ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+  version_type=linux # correct to gnu/linux during the next big refactor
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
@@ -15070,7 +15693,12 @@ fi
   # before this can be enabled.
   hardcode_into_libs=yes
 
-  # Append ld.so.conf contents to the search path
+  # Ideally, we could use ldconfig to report *all* directores which are
+  # searched for libraries, however this is still not possible.  Aside from not
+  # being certain /sbin/ldconfig is available, command
+  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
+  # even though it is searched at run-time.  Try to do the best guess by
+  # appending ld.so.conf contents (and includes) to the search path.
   if test -f /etc/ld.so.conf; then
     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
@@ -15102,12 +15730,12 @@ netbsd*)
   need_lib_prefix=no
   need_version=no
   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
     dynamic_linker='NetBSD (a.out) ld.so'
   else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     dynamic_linker='NetBSD ld.elf_so'
   fi
   shlibpath_var=LD_LIBRARY_PATH
@@ -15116,8 +15744,8 @@ netbsd*)
   ;;
 
 newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   ;;
@@ -15126,58 +15754,68 @@ newsos6)
   version_type=qnx
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
   dynamic_linker='ldqnx.so'
   ;;
 
-openbsd*)
+openbsd* | bitrig*)
   version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
+  sys_lib_dlsearch_path_spec=/usr/lib
   need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
-    *)				need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[89] | openbsd2.[89].*)
-	shlibpath_overrides_runpath=no
-	;;
-      *)
-	shlibpath_overrides_runpath=yes
-	;;
-      esac
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+    need_version=no
   else
-    shlibpath_overrides_runpath=yes
+    need_version=yes
   fi
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
   ;;
 
 os2*)
   libname_spec='$name'
-  shrext_cmds=".dll"
+  version_type=windows
+  shrext_cmds=.dll
+  need_version=no
   need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
+  # OS/2 can only load a DLL with a base name of 8 characters or less.
+  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+    v=$($ECHO $release$versuffix | tr -d .-);
+    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+    $ECHO $n$v`$shared_ext'
+  library_names_spec='${libname}_dll.$libext'
   dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
+  shlibpath_var=BEGINLIBPATH
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+  postinstall_cmds='base_file=`basename \$file`~
+    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
+    dldir=$destdir/`dirname \$dlpath`~
+    test -d \$dldir || mkdir -p \$dldir~
+    $install_prog $dir/$dlname \$dldir/$dlname~
+    chmod a+x \$dldir/$dlname~
+    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+    fi'
+  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
+    dlpath=$dir/\$dldll~
+    $RM \$dlpath'
   ;;
 
 osf3* | osf4* | osf5*)
   version_type=osf
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
   ;;
 
 rdos*)
@@ -15185,11 +15823,11 @@ rdos*)
   ;;
 
 solaris*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
@@ -15199,20 +15837,20 @@ solaris*)
 
 sunos4*)
   version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
+  if test yes = "$with_gnu_ld"; then
     need_lib_prefix=no
   fi
   need_version=yes
   ;;
 
 sysv4 | sysv4.3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   case $host_vendor in
     sni)
@@ -15233,24 +15871,24 @@ sysv4 | sysv4.3*)
   ;;
 
 sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
+  if test -d /usr/nec; then
+    version_type=linux # correct to gnu/linux during the next big refactor
+    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+    soname_spec='$libname$shared_ext.$major'
     shlibpath_var=LD_LIBRARY_PATH
   fi
   ;;
 
 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
+  version_type=sco
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
+  if test yes = "$with_gnu_ld"; then
     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
   else
     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
@@ -15265,19 +15903,19 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
 tpf*)
   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
   ;;
 
 uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -15287,20 +15925,32 @@ uts4*)
 esac
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
 $as_echo "$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
+test no = "$dynamic_linker" && can_build_shared=no
 
 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 fi
 
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
-  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
 fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
-  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
 fi
 
+# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
+configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
+
+# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
+configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
+
+
+
 
 
 
@@ -15343,15 +15993,15 @@ $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
 hardcode_action_CXX=
 if test -n "$hardcode_libdir_flag_spec_CXX" ||
    test -n "$runpath_var_CXX" ||
-   test "X$hardcode_automatic_CXX" = "Xyes" ; then
+   test yes = "$hardcode_automatic_CXX"; then
 
   # We can hardcode non-existent directories.
-  if test "$hardcode_direct_CXX" != no &&
+  if test no != "$hardcode_direct_CXX" &&
      # If the only mechanism to avoid hardcoding is shlibpath_var, we
      # have to relink, otherwise we might link with an installed library
      # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
-     test "$hardcode_minus_L_CXX" != no; then
+     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" &&
+     test no != "$hardcode_minus_L_CXX"; then
     # Linking always hardcodes the temporary library directory.
     hardcode_action_CXX=relink
   else
@@ -15366,12 +16016,12 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
 $as_echo "$hardcode_action_CXX" >&6; }
 
-if test "$hardcode_action_CXX" = relink ||
-   test "$inherit_rpath_CXX" = yes; then
+if test relink = "$hardcode_action_CXX" ||
+   test yes = "$inherit_rpath_CXX"; then
   # Fast installation is not supported
   enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
+elif test yes = "$shlibpath_overrides_runpath" ||
+     test no = "$enable_shared"; then
   # Fast installation is not necessary
   enable_fast_install=needless
 fi
@@ -15394,7 +16044,7 @@ fi
   lt_cv_path_LD=$lt_save_path_LD
   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-fi # test "$_lt_caught_CXX_error" != yes
+fi # test yes != "$_lt_caught_CXX_error"
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -15414,6 +16064,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+
+
         ac_config_commands="$ac_config_commands libtool"
 
 
@@ -15531,164 +16183,61 @@ $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
 
 fi
 
-ac_header_dirent=no
-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
-  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
-$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
-if eval \${$as_ac_Header+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if ${ac_cv_c_inline+:} false; then :
   $as_echo_n "(cached) " >&6
 else
+  ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.h>
-#include <$ac_hdr>
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
 
-int
-main ()
-{
-if ((DIR *) 0)
-return 0;
-  ;
-  return 0;
-}
 _ACEOF
 if ac_fn_cxx_try_compile "$LINENO"; then :
-  eval "$as_ac_Header=yes"
-else
-  eval "$as_ac_Header=no"
+  ac_cv_c_inline=$ac_kw
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$as_ac_Header
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
-_ACEOF
+  test "$ac_cv_c_inline" != no && break
+done
 
-ac_header_dirent=$ac_hdr; break
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
 
-done
-# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
-if test $ac_header_dirent = dirent.h; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if ${ac_cv_search_opendir+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
+case $ac_cv_c_inline in
+  inline | yes) ;;
+  *)
+    case $ac_cv_c_inline in
+      no) ac_val=;;
+      *) ac_val=$ac_cv_c_inline;;
+    esac
+    cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
 #endif
-char opendir ();
-int
-main ()
-{
-return opendir ();
-  ;
-  return 0;
-}
 _ACEOF
-for ac_lib in '' dir; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_cxx_try_link "$LINENO"; then :
-  ac_cv_search_opendir=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if ${ac_cv_search_opendir+:} false; then :
-  break
-fi
-done
-if ${ac_cv_search_opendir+:} false; then :
-
-else
-  ac_cv_search_opendir=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
-ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+    ;;
+esac
 
-fi
+ac_fn_cxx_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes; then :
 
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if ${ac_cv_search_opendir+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char opendir ();
-int
-main ()
-{
-return opendir ();
-  ;
-  return 0;
-}
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
 _ACEOF
-for ac_lib in '' x; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_cxx_try_link "$LINENO"; then :
-  ac_cv_search_opendir=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if ${ac_cv_search_opendir+:} false; then :
-  break
-fi
-done
-if ${ac_cv_search_opendir+:} false; then :
 
-else
-  ac_cv_search_opendir=no
 fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
-ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
-fi
-
-fi
 
+# Checks for library functions.
 ac_fn_cxx_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
 if test "x$ac_cv_type_pid_t" = xyes; then :
 
@@ -15700,19 +16249,6 @@ _ACEOF
 
 fi
 
-ac_fn_cxx_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = xyes; then :
-
-else
-
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned int
-_ACEOF
-
-fi
-
-
-# Checks for library functions.
 
 for ac_header in vfork.h
 do :
@@ -15927,6 +16463,164 @@ $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
 
 fi
 
+ac_header_dirent=no
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
+$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
+if eval \${$as_ac_Header+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <$ac_hdr>
+
+int
+main ()
+{
+if ((DIR *) 0)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "$as_ac_Header=yes"
+else
+  eval "$as_ac_Header=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_ac_Header
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+_ACEOF
+
+ac_header_dirent=$ac_hdr; break
+fi
+
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+$as_echo_n "checking for library containing opendir... " >&6; }
+if ${ac_cv_search_opendir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char opendir ();
+int
+main ()
+{
+return opendir ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' dir; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_search_opendir=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_opendir+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_opendir+:} false; then :
+
+else
+  ac_cv_search_opendir=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+$as_echo "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+$as_echo_n "checking for library containing opendir... " >&6; }
+if ${ac_cv_search_opendir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char opendir ();
+int
+main ()
+{
+return opendir ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' x; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_search_opendir=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_opendir+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_opendir+:} false; then :
+
+else
+  ac_cv_search_opendir=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+$as_echo "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+fi
+
 for ac_func in localtime_r
 do :
   ac_fn_cxx_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r"
@@ -16387,70 +17081,83 @@ if test x"$acx_pthread_ok" = xyes; then
    CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
 fi
 
-# check for OpenMP
+# check OpenMP support
 
+  OPENMP_CXXFLAGS=
+  # Check whether --enable-openmp was given.
+if test "${enable_openmp+set}" = set; then :
+  enableval=$enable_openmp;
+fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenMP flag of C++ compiler" >&5
-$as_echo_n "checking for OpenMP flag of C++ compiler... " >&6; }
-if ${ax_cv_cxx_openmp+:} false; then :
+  if test "$enable_openmp" != no; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CXX option to support OpenMP" >&5
+$as_echo_n "checking for $CXX option to support OpenMP... " >&6; }
+if ${ac_cv_prog_cxx_openmp+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  saveCXXFLAGS=$CXXFLAGS
-ax_cv_cxx_openmp=unknown
-# Flags to try:  -fopenmp (gcc), -openmp (icc), -mp (SGI & PGI),
-#                -xopenmp (Sun), -omp (Tru64), -qsmp=omp (AIX), none
-ax_openmp_flags="-fopenmp -openmp -mp -xopenmp -omp -qsmp=omp none"
-if test "x$OPENMP_CXXFLAGS" != x; then
-  ax_openmp_flags="$OPENMP_CXXFLAGS $ax_openmp_flags"
-fi
-for ax_openmp_flag in $ax_openmp_flags; do
-  case $ax_openmp_flag in
-    none) CXXFLAGS=$saveCXX ;;
-    *) CXXFLAGS="$saveCXXFLAGS $ax_openmp_flag" ;;
-  esac
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
+#ifndef _OPENMP
+ choke me
 #endif
-char omp_get_num_threads ();
-int
-main ()
-{
-return omp_get_num_threads ();
-  ;
-  return 0;
-}
+#include <omp.h>
+int main () { return omp_get_num_threads (); }
+
 _ACEOF
 if ac_fn_cxx_try_link "$LINENO"; then :
-  ax_cv_cxx_openmp=$ax_openmp_flag; break
+  ac_cv_prog_cxx_openmp='none needed'
+else
+  ac_cv_prog_cxx_openmp='unsupported'
+	  	  	  	  	  	  	                                	  	  	  	  	  	  for ac_option in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp -homp \
+                           -Popenmp --openmp; do
+	    ac_save_CXXFLAGS=$CXXFLAGS
+	    CXXFLAGS="$CXXFLAGS $ac_option"
+	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifndef _OPENMP
+ choke me
+#endif
+#include <omp.h>
+int main () { return omp_get_num_threads (); }
+
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_prog_cxx_openmp=$ac_option
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-done
-CXXFLAGS=$saveCXXFLAGS
-
+	    CXXFLAGS=$ac_save_CXXFLAGS
+	    if test "$ac_cv_prog_cxx_openmp" != unsupported; then
+	      break
+	    fi
+	  done
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_openmp" >&5
-$as_echo "$ax_cv_cxx_openmp" >&6; }
-if test "x$ax_cv_cxx_openmp" = "xunknown"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: We don't have OpenMP. Multithreaded testing is disabled" >&5
-$as_echo "$as_me: We don't have OpenMP. Multithreaded testing is disabled" >&6;}
-else
-  if test "x$ax_cv_cxx_openmp" != "xnone"; then
-    OPENMP_CXXFLAGS=$ax_cv_cxx_openmp
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_openmp" >&5
+$as_echo "$ac_cv_prog_cxx_openmp" >&6; }
+    case $ac_cv_prog_cxx_openmp in #(
+      "none needed" | unsupported)
+	;; #(
+      *)
+	OPENMP_CXXFLAGS=$ac_cv_prog_cxx_openmp ;;
+    esac
   fi
-  CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
+
+
+if test "x$ac_cv_prog_cxx_openmp" != "xunsupported"; then
+   CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
 
 $as_echo "#define HAVE_OPENMP 1 " >>confdefs.h
 
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: We don't have OpenMP. Multithreaded operation is disabled" >&5
+$as_echo "$as_me: We don't have OpenMP. Multithreaded operation is disabled" >&6;}
 fi
 
-
 if test $prefix = "NONE"; then
    prefix="$ac_default_prefix"
 fi
@@ -16849,16 +17556,16 @@ done
 
 #check for needed dependencies
 useICU=1;
-# inspired by feh-1.3.4/configure.ac.  Tnx Tom Gilbert and feh hackers.
+# inspired by feh-1.3.4/configure.ac. Tnx Tom Gilbert and feh hackers.
 
 # Check whether --with-icu was given.
 if test "${with_icu+set}" = set; then :
   withval=$with_icu; if test "$with_icu" = "no"; then
-           useICU=0
-	else
-	   CXXFLAGS="$CXXFLAGS -I$withval/include"
-           LIBS="-L$withval/lib $LIBS"
-	fi
+ useICU=0
+ else
+ CXXFLAGS="$CXXFLAGS -I$withval/include"
+ LIBS="-L$withval/lib $LIBS"
+ fi
 fi
 
 
@@ -16916,9 +17623,9 @@ fi
      echo "*** Or see http://www.icu-project.org/"
   else
 	ICU_VERSION=`$ICU_CONFIG --version`
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICU >= 3.6" >&5
-$as_echo_n "checking for ICU >= 3.6... " >&6; }
-	VERSION_CHECK=`expr $ICU_VERSION \>\= 3.6`
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICU >= 4.2" >&5
+$as_echo_n "checking for ICU >= 4.2... " >&6; }
+	VERSION_CHECK=`expr $ICU_VERSION \>\= 4.2`
 	if test "$VERSION_CHECK" = "1" ; then
 	   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
@@ -16982,122 +17689,20 @@ $as_echo "$ICU_IOLIBS" >&6; }
 
   if test $succeeded = yes; then
      CXXFLAGS="$CXXFLAGS $ICU_CPPSEARCHPATH"
-		LIBS="$ICU_LIBPATH $ICU_LIBS $ICU_IOLIBS $LIBS"
+ LIBS="$ICU_LIBPATH $ICU_LIBS $ICU_IOLIBS $LIBS"
   else
      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "\"No ICU development environment found. Please check if libicu-dev or the like is installed\"
+as_fn_error $? "\"No ICU development environment found. Please check if libicu-ev or the like is installed\"
 See \`config.log' for more details" "$LINENO" 5; }
   fi
 
 
-$as_echo "#define HAVE_ICU 1" >>confdefs.h
-
-else
-  as_fn_error $? "\"ICU support is required\"" "$LINENO" 5
-fi
-
-
-# Check whether --with-timbl was given.
-if test "${with_timbl+set}" = set; then :
-  withval=$with_timbl; PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$withval/lib/pkgconfig"
-else
-  PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$prefix/lib/pkgconfig"
-fi
-
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for timbl" >&5
-$as_echo_n "checking for timbl... " >&6; }
-
-if test -n "$timbl_CFLAGS"; then
-    pkg_cv_timbl_CFLAGS="$timbl_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"timbl >= 6.4.4 \""; } >&5
-  ($PKG_CONFIG --exists --print-errors "timbl >= 6.4.4 ") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_timbl_CFLAGS=`$PKG_CONFIG --cflags "timbl >= 6.4.4 " 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$timbl_LIBS"; then
-    pkg_cv_timbl_LIBS="$timbl_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"timbl >= 6.4.4 \""; } >&5
-  ($PKG_CONFIG --exists --print-errors "timbl >= 6.4.4 ") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_timbl_LIBS=`$PKG_CONFIG --libs "timbl >= 6.4.4 " 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        timbl_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "timbl >= 6.4.4 " 2>&1`
-        else
-	        timbl_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "timbl >= 6.4.4 " 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$timbl_PKG_ERRORS" >&5
-
-	as_fn_error $? "Package requirements (timbl >= 6.4.4 ) were not met:
-
-$timbl_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables timbl_CFLAGS
-and timbl_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables timbl_CFLAGS
-and timbl_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5; }
-else
-	timbl_CFLAGS=$pkg_cv_timbl_CFLAGS
-	timbl_LIBS=$pkg_cv_timbl_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+$as_echo "#define HAVE_ICU 1" >>confdefs.h
 
+else
+ as_fn_error $? "\"ICU support is required\"" "$LINENO" 5
 fi
-CXXFLAGS="$CXXFLAGS $timbl_CFLAGS"
-LIBS="$timbl_LIBS $LIBS"
 
 
 # Check whether --with-ticcutils was given.
@@ -17116,12 +17721,12 @@ if test -n "$ticcutils_CFLAGS"; then
     pkg_cv_ticcutils_CFLAGS="$ticcutils_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ticcutils >= 0.5 \""; } >&5
-  ($PKG_CONFIG --exists --print-errors "ticcutils >= 0.5 ") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ticcutils >= 0.9 \""; } >&5
+  ($PKG_CONFIG --exists --print-errors "ticcutils >= 0.9 ") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_ticcutils_CFLAGS=`$PKG_CONFIG --cflags "ticcutils >= 0.5 " 2>/dev/null`
+  pkg_cv_ticcutils_CFLAGS=`$PKG_CONFIG --cflags "ticcutils >= 0.9 " 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -17133,12 +17738,12 @@ if test -n "$ticcutils_LIBS"; then
     pkg_cv_ticcutils_LIBS="$ticcutils_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ticcutils >= 0.5 \""; } >&5
-  ($PKG_CONFIG --exists --print-errors "ticcutils >= 0.5 ") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ticcutils >= 0.9 \""; } >&5
+  ($PKG_CONFIG --exists --print-errors "ticcutils >= 0.9 ") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_ticcutils_LIBS=`$PKG_CONFIG --libs "ticcutils >= 0.5 " 2>/dev/null`
+  pkg_cv_ticcutils_LIBS=`$PKG_CONFIG --libs "ticcutils >= 0.9 " 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -17159,14 +17764,14 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        ticcutils_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "ticcutils >= 0.5 " 2>&1`
+	        ticcutils_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "ticcutils >= 0.9 " 2>&1`
         else
-	        ticcutils_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "ticcutils >= 0.5 " 2>&1`
+	        ticcutils_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "ticcutils >= 0.9 " 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$ticcutils_PKG_ERRORS" >&5
 
-	as_fn_error $? "Package requirements (ticcutils >= 0.5 ) were not met:
+	as_fn_error $? "Package requirements (ticcutils >= 0.9 ) were not met:
 
 $ticcutils_PKG_ERRORS
 
@@ -17202,28 +17807,28 @@ CXXFLAGS="$CXXFLAGS $ticcutils_CFLAGS"
 LIBS="$ticcutils_LIBS $LIBS"
 
 
-# Check whether --with-timblserver was given.
-if test "${with_timblserver+set}" = set; then :
-  withval=$with_timblserver; PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$withval/lib/pkgconfig"
+# Check whether --with-timbl was given.
+if test "${with_timbl+set}" = set; then :
+  withval=$with_timbl; PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$withval/lib/pkgconfig"
 else
   PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$prefix/lib/pkgconfig"
 fi
 
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for timblserver" >&5
-$as_echo_n "checking for timblserver... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for timbl" >&5
+$as_echo_n "checking for timbl... " >&6; }
 
-if test -n "$timblserver_CFLAGS"; then
-    pkg_cv_timblserver_CFLAGS="$timblserver_CFLAGS"
+if test -n "$timbl_CFLAGS"; then
+    pkg_cv_timbl_CFLAGS="$timbl_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"timblserver >= 1.7 \""; } >&5
-  ($PKG_CONFIG --exists --print-errors "timblserver >= 1.7 ") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"timbl >= 6.4.4 \""; } >&5
+  ($PKG_CONFIG --exists --print-errors "timbl >= 6.4.4 ") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_timblserver_CFLAGS=`$PKG_CONFIG --cflags "timblserver >= 1.7 " 2>/dev/null`
+  pkg_cv_timbl_CFLAGS=`$PKG_CONFIG --cflags "timbl >= 6.4.4 " 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -17231,16 +17836,16 @@ fi
  else
     pkg_failed=untried
 fi
-if test -n "$timblserver_LIBS"; then
-    pkg_cv_timblserver_LIBS="$timblserver_LIBS"
+if test -n "$timbl_LIBS"; then
+    pkg_cv_timbl_LIBS="$timbl_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"timblserver >= 1.7 \""; } >&5
-  ($PKG_CONFIG --exists --print-errors "timblserver >= 1.7 ") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"timbl >= 6.4.4 \""; } >&5
+  ($PKG_CONFIG --exists --print-errors "timbl >= 6.4.4 ") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_timblserver_LIBS=`$PKG_CONFIG --libs "timblserver >= 1.7 " 2>/dev/null`
+  pkg_cv_timbl_LIBS=`$PKG_CONFIG --libs "timbl >= 6.4.4 " 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -17261,22 +17866,22 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        timblserver_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "timblserver >= 1.7 " 2>&1`
+	        timbl_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "timbl >= 6.4.4 " 2>&1`
         else
-	        timblserver_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "timblserver >= 1.7 " 2>&1`
+	        timbl_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "timbl >= 6.4.4 " 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
-	echo "$timblserver_PKG_ERRORS" >&5
+	echo "$timbl_PKG_ERRORS" >&5
 
-	as_fn_error $? "Package requirements (timblserver >= 1.7 ) were not met:
+	as_fn_error $? "Package requirements (timbl >= 6.4.4 ) were not met:
 
-$timblserver_PKG_ERRORS
+$timbl_PKG_ERRORS
 
 Consider adjusting the PKG_CONFIG_PATH environment variable if you
 installed software in a non-standard prefix.
 
-Alternatively, you may set the environment variables timblserver_CFLAGS
-and timblserver_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables timbl_CFLAGS
+and timbl_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
      	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -17287,21 +17892,21 @@ as_fn_error $? "The pkg-config script could not be found or is too old.  Make su
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
-Alternatively, you may set the environment variables timblserver_CFLAGS
-and timblserver_LIBS to avoid the need to call pkg-config.
+Alternatively, you may set the environment variables timbl_CFLAGS
+and timbl_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.
 
 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
 See \`config.log' for more details" "$LINENO" 5; }
 else
-	timblserver_CFLAGS=$pkg_cv_timblserver_CFLAGS
-	timblserver_LIBS=$pkg_cv_timblserver_LIBS
+	timbl_CFLAGS=$pkg_cv_timbl_CFLAGS
+	timbl_LIBS=$pkg_cv_timbl_LIBS
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
 fi
-CXXFLAGS="$CXXFLAGS $timblserver_CFLAGS"
-LIBS="$timblserver_LIBS $LIBS"
+CXXFLAGS="$CXXFLAGS $timbl_CFLAGS"
+LIBS="$timbl_LIBS $LIBS"
 
 
 # Check whether --with-mbt was given.
@@ -17320,12 +17925,12 @@ if test -n "$mbt_CFLAGS"; then
     pkg_cv_mbt_CFLAGS="$mbt_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"mbt >= 3.2.10 \""; } >&5
-  ($PKG_CONFIG --exists --print-errors "mbt >= 3.2.10 ") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"mbt >= 3.2.14 \""; } >&5
+  ($PKG_CONFIG --exists --print-errors "mbt >= 3.2.14 ") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_mbt_CFLAGS=`$PKG_CONFIG --cflags "mbt >= 3.2.10 " 2>/dev/null`
+  pkg_cv_mbt_CFLAGS=`$PKG_CONFIG --cflags "mbt >= 3.2.14 " 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -17337,12 +17942,12 @@ if test -n "$mbt_LIBS"; then
     pkg_cv_mbt_LIBS="$mbt_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"mbt >= 3.2.10 \""; } >&5
-  ($PKG_CONFIG --exists --print-errors "mbt >= 3.2.10 ") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"mbt >= 3.2.14 \""; } >&5
+  ($PKG_CONFIG --exists --print-errors "mbt >= 3.2.14 ") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_mbt_LIBS=`$PKG_CONFIG --libs "mbt >= 3.2.10 " 2>/dev/null`
+  pkg_cv_mbt_LIBS=`$PKG_CONFIG --libs "mbt >= 3.2.14 " 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -17363,14 +17968,14 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        mbt_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "mbt >= 3.2.10 " 2>&1`
+	        mbt_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "mbt >= 3.2.14 " 2>&1`
         else
-	        mbt_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "mbt >= 3.2.10 " 2>&1`
+	        mbt_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "mbt >= 3.2.14 " 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$mbt_PKG_ERRORS" >&5
 
-	as_fn_error $? "Package requirements (mbt >= 3.2.10 ) were not met:
+	as_fn_error $? "Package requirements (mbt >= 3.2.14 ) were not met:
 
 $mbt_PKG_ERRORS
 
@@ -17424,12 +18029,12 @@ if test -n "$folia_CFLAGS"; then
     pkg_cv_folia_CFLAGS="$folia_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"folia >= 0.11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "folia >= 0.11") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"folia >= 1.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "folia >= 1.0") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_folia_CFLAGS=`$PKG_CONFIG --cflags "folia >= 0.11" 2>/dev/null`
+  pkg_cv_folia_CFLAGS=`$PKG_CONFIG --cflags "folia >= 1.0" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -17441,12 +18046,12 @@ if test -n "$folia_LIBS"; then
     pkg_cv_folia_LIBS="$folia_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"folia >= 0.11\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "folia >= 0.11") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"folia >= 1.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "folia >= 1.0") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_folia_LIBS=`$PKG_CONFIG --libs "folia >= 0.11" 2>/dev/null`
+  pkg_cv_folia_LIBS=`$PKG_CONFIG --libs "folia >= 1.0" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -17467,14 +18072,14 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        folia_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "folia >= 0.11" 2>&1`
+	        folia_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "folia >= 1.0" 2>&1`
         else
-	        folia_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "folia >= 0.11" 2>&1`
+	        folia_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "folia >= 1.0" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$folia_PKG_ERRORS" >&5
 
-	as_fn_error $? "Package requirements (folia >= 0.11) were not met:
+	as_fn_error $? "Package requirements (folia >= 1.0) were not met:
 
 $folia_PKG_ERRORS
 
@@ -17495,778 +18100,216 @@ path to pkg-config.
 
 Alternatively, you may set the environment variables folia_CFLAGS
 and folia_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5; }
-else
-	folia_CFLAGS=$pkg_cv_folia_CFLAGS
-	folia_LIBS=$pkg_cv_folia_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
-CXXFLAGS="$CXXFLAGS $folia_CFLAGS"
-LIBS="$folia_LIBS $LIBS"
-
-
-# Check whether --with-ucto was given.
-if test "${with_ucto+set}" = set; then :
-  withval=$with_ucto; PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$withval/lib/pkgconfig"
-else
-  PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$prefix/lib/pkgconfig"
-fi
-
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ucto" >&5
-$as_echo_n "checking for ucto... " >&6; }
-
-if test -n "$ucto_CFLAGS"; then
-    pkg_cv_ucto_CFLAGS="$ucto_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ucto >= 0.5.3 \""; } >&5
-  ($PKG_CONFIG --exists --print-errors "ucto >= 0.5.3 ") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_ucto_CFLAGS=`$PKG_CONFIG --cflags "ucto >= 0.5.3 " 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$ucto_LIBS"; then
-    pkg_cv_ucto_LIBS="$ucto_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ucto >= 0.5.3 \""; } >&5
-  ($PKG_CONFIG --exists --print-errors "ucto >= 0.5.3 ") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_ucto_LIBS=`$PKG_CONFIG --libs "ucto >= 0.5.3 " 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        ucto_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "ucto >= 0.5.3 " 2>&1`
-        else
-	        ucto_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "ucto >= 0.5.3 " 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$ucto_PKG_ERRORS" >&5
-
-	as_fn_error $? "Package requirements (ucto >= 0.5.3 ) were not met:
-
-$ucto_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables ucto_CFLAGS
-and ucto_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables ucto_CFLAGS
-and ucto_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5; }
-else
-	ucto_CFLAGS=$pkg_cv_ucto_CFLAGS
-	ucto_LIBS=$pkg_cv_ucto_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
-CXXFLAGS="$CXXFLAGS $ucto_CFLAGS"
-LIBS="$ucto_LIBS $LIBS"
-
-#
-# the ac_python_devel.m4 script tramples upon $LIBS, so we save it
-save_LIBS="$LIBS"
-save_FLAGS="$CXXFLAGS"
-
-
-# Check whether --with-python was given.
-if test "${with_python+set}" = set; then :
-  withval=$with_python; PYTHON="$withval/python"
-else
-  PYTHON="python"
-fi
-
-
-#we need Python > 2.5.x
-
-
-
-
-
-
-        if test -n "$PYTHON"; then
-      # If the user set $PYTHON, use it and don't search something else.
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 2.5" >&5
-$as_echo_n "checking whether $PYTHON version is >= 2.5... " >&6; }
-      prog="import sys
-# split strings by '.' and convert to numeric.  Append some zeros
-# because we need at least 4 digits for the hex conversion.
-# map returns an iterator in Python 3.0 and a list in 2.x
-minver = list(map(int, '2.5'.split('.'))) + [0, 0, 0]
-minverhex = 0
-# xrange is not present in Python 3.0 and range returns an iterator
-for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
-sys.exit(sys.hexversion < minverhex)"
-  if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5
-   ($PYTHON -c "$prog") >&5 2>&5
-   ac_status=$?
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   (exit $ac_status); }; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-			       as_fn_error $? "Python interpreter is too old" "$LINENO" 5
-fi
-      am_display_PYTHON=$PYTHON
-    else
-      # Otherwise, try each interpreter until we find one that satisfies
-      # VERSION.
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 2.5" >&5
-$as_echo_n "checking for a Python interpreter with version >= 2.5... " >&6; }
-if ${am_cv_pathless_PYTHON+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-	for am_cv_pathless_PYTHON in python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7  python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do
-	  test "$am_cv_pathless_PYTHON" = none && break
-	  prog="import sys
-# split strings by '.' and convert to numeric.  Append some zeros
-# because we need at least 4 digits for the hex conversion.
-# map returns an iterator in Python 3.0 and a list in 2.x
-minver = list(map(int, '2.5'.split('.'))) + [0, 0, 0]
-minverhex = 0
-# xrange is not present in Python 3.0 and range returns an iterator
-for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i]
-sys.exit(sys.hexversion < minverhex)"
-  if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5
-   ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5
-   ac_status=$?
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   (exit $ac_status); }; then :
-  break
-fi
-	done
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5
-$as_echo "$am_cv_pathless_PYTHON" >&6; }
-      # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
-      if test "$am_cv_pathless_PYTHON" = none; then
-	PYTHON=:
-      else
-        # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args.
-set dummy $am_cv_pathless_PYTHON; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PYTHON+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $PYTHON in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-PYTHON=$ac_cv_path_PYTHON
-if test -n "$PYTHON"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
-$as_echo "$PYTHON" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-      fi
-      am_display_PYTHON=$am_cv_pathless_PYTHON
-    fi
-
-
-  if test "$PYTHON" = :; then
-      :
-  else
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5
-$as_echo_n "checking for $am_display_PYTHON version... " >&6; }
-if ${am_cv_python_version+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5
-$as_echo "$am_cv_python_version" >&6; }
-  PYTHON_VERSION=$am_cv_python_version
-
-
-
-  PYTHON_PREFIX='${prefix}'
-
-  PYTHON_EXEC_PREFIX='${exec_prefix}'
-
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5
-$as_echo_n "checking for $am_display_PYTHON platform... " >&6; }
-if ${am_cv_python_platform+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5
-$as_echo "$am_cv_python_platform" >&6; }
-  PYTHON_PLATFORM=$am_cv_python_platform
-
-
-  # Just factor out some code duplication.
-  am_python_setup_sysconfig="\
-import sys
-# Prefer sysconfig over distutils.sysconfig, for better compatibility
-# with python 3.x.  See automake bug#10227.
-try:
-    import sysconfig
-except ImportError:
-    can_use_sysconfig = 0
-else:
-    can_use_sysconfig = 1
-# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
-# <https://github.com/pypa/virtualenv/issues/118>
-try:
-    from platform import python_implementation
-    if python_implementation() == 'CPython' and sys.version[:3] == '2.7':
-        can_use_sysconfig = 0
-except ImportError:
-    pass"
-
-
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5
-$as_echo_n "checking for $am_display_PYTHON script directory... " >&6; }
-if ${am_cv_python_pythondir+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "x$prefix" = xNONE
-     then
-       am_py_prefix=$ac_default_prefix
-     else
-       am_py_prefix=$prefix
-     fi
-     am_cv_python_pythondir=`$PYTHON -c "
-$am_python_setup_sysconfig
-if can_use_sysconfig:
-    sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
-else:
-    from distutils import sysconfig
-    sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
-sys.stdout.write(sitedir)"`
-     case $am_cv_python_pythondir in
-     $am_py_prefix*)
-       am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
-       am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
-       ;;
-     *)
-       case $am_py_prefix in
-         /usr|/System*) ;;
-         *)
-	  am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
-	  ;;
-       esac
-       ;;
-     esac
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5
-$as_echo "$am_cv_python_pythondir" >&6; }
-  pythondir=$am_cv_python_pythondir
-
-
-
-  pkgpythondir=\${pythondir}/$PACKAGE
-
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5
-$as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; }
-if ${am_cv_python_pyexecdir+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "x$exec_prefix" = xNONE
-     then
-       am_py_exec_prefix=$am_py_prefix
-     else
-       am_py_exec_prefix=$exec_prefix
-     fi
-     am_cv_python_pyexecdir=`$PYTHON -c "
-$am_python_setup_sysconfig
-if can_use_sysconfig:
-    sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'})
-else:
-    from distutils import sysconfig
-    sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix')
-sys.stdout.write(sitedir)"`
-     case $am_cv_python_pyexecdir in
-     $am_py_exec_prefix*)
-       am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
-       am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
-       ;;
-     *)
-       case $am_py_exec_prefix in
-         /usr|/System*) ;;
-         *)
-	   am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
-	   ;;
-       esac
-       ;;
-     esac
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5
-$as_echo "$am_cv_python_pyexecdir" >&6; }
-  pyexecdir=$am_cv_python_pyexecdir
-
-
-
-  pkgpyexecdir=\${pyexecdir}/$PACKAGE
+See the pkg-config man page for more details.
 
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+	folia_CFLAGS=$pkg_cv_folia_CFLAGS
+	folia_LIBS=$pkg_cv_folia_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-    PYTHONDIR=${pkgpythondir}
+fi
+CXXFLAGS="$CXXFLAGS $folia_CFLAGS"
+LIBS="$folia_LIBS $LIBS"
 
-  fi
 
+# Check whether --with-ucto was given.
+if test "${with_ucto+set}" = set; then :
+  withval=$with_ucto; PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$withval/lib/pkgconfig"
+else
+  PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$prefix/lib/pkgconfig"
+fi
 
 
-# set PYTHON_EXTRA_LIBS to a non-empty string
-# this fools AC_PYTHON_DEVEL into NOT setting it.
-# That fails on some systems with linking errors
-# we don't need PYTHON_EXTRA_LIBS
-PYTHON_EXTRA_LIBS=" "
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ucto" >&5
+$as_echo_n "checking for ucto... " >&6; }
 
+if test -n "$ucto_CFLAGS"; then
+    pkg_cv_ucto_CFLAGS="$ucto_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ucto >= 0.8.4 \""; } >&5
+  ($PKG_CONFIG --exists --print-errors "ucto >= 0.8.4 ") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_ucto_CFLAGS=`$PKG_CONFIG --cflags "ucto >= 0.8.4 " 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$ucto_LIBS"; then
+    pkg_cv_ucto_LIBS="$ucto_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ucto >= 0.8.4 \""; } >&5
+  ($PKG_CONFIG --exists --print-errors "ucto >= 0.8.4 ") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_ucto_LIBS=`$PKG_CONFIG --libs "ucto >= 0.8.4 " 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
 
-	#
-	# Allow the use of a (user set) custom python version
-	#
 
 
-	# Extract the first word of "python[$PYTHON_VERSION]", so it can be a program name with args.
-set dummy python$PYTHON_VERSION; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PYTHON+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $PYTHON in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-  ;;
-esac
-fi
-PYTHON=$ac_cv_path_PYTHON
-if test -n "$PYTHON"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
-$as_echo "$PYTHON" >&6; }
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+        _pkg_short_errors_supported=no
 fi
+        if test $_pkg_short_errors_supported = yes; then
+	        ucto_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "ucto >= 0.8.4 " 2>&1`
+        else
+	        ucto_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "ucto >= 0.8.4 " 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$ucto_PKG_ERRORS" >&5
 
+	as_fn_error $? "Package requirements (ucto >= 0.8.4 ) were not met:
 
-	if test -z "$PYTHON"; then
-	   as_fn_error $? "Cannot find python$PYTHON_VERSION in your system path" "$LINENO" 5
-	   PYTHON_VERSION=""
-	fi
+$ucto_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
 
-	#
-	# Check for a version of Python >= 2.1.0
-	#
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a version of Python >= '2.1.0'" >&5
-$as_echo_n "checking for a version of Python >= '2.1.0'... " >&6; }
-	ac_supports_python_ver=`$PYTHON -c "import sys; \
-		ver = sys.version.split ()[0]; \
-		print (ver >= '2.1.0')"`
-	if test "$ac_supports_python_ver" != "True"; then
-		if test -z "$PYTHON_NOVERSIONCHECK"; then
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+Alternatively, you may set the environment variables ucto_CFLAGS
+and ucto_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-			{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "
-This version of the AC_PYTHON_DEVEL macro
-doesn't work properly with versions of Python before
-2.1.0. You may need to re-run configure, setting the
-variables PYTHON_CPPFLAGS, PYTHON_LDFLAGS, PYTHON_SITE_PKG,
-PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand.
-Moreover, to disable this check, set PYTHON_NOVERSIONCHECK
-to something else than an empty string.
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
 
-See \`config.log' for more details" "$LINENO" 5; }
-		else
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: skip at user request" >&5
-$as_echo "skip at user request" >&6; }
-		fi
-	else
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	fi
+Alternatively, you may set the environment variables ucto_CFLAGS
+and ucto_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
 
-	#
-	# if the macro parameter ``version'' is set, honour it
-	#
-	if test -n ">= '2.5'"; then
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a version of Python >= '2.5'" >&5
-$as_echo_n "checking for a version of Python >= '2.5'... " >&6; }
-		ac_supports_python_ver=`$PYTHON -c "import sys; \
-			ver = sys.version.split ()[0]; \
-			print (ver >= '2.5')"`
-		if test "$ac_supports_python_ver" = "True"; then
-	   	   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+	ucto_CFLAGS=$pkg_cv_ucto_CFLAGS
+	ucto_LIBS=$pkg_cv_ucto_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-		else
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-			as_fn_error $? "this package requires Python >= '2.5'.
-If you have it installed, but it isn't the default Python
-interpreter in your system path, please pass the PYTHON_VERSION
-variable to configure. See \`\`configure --help'' for reference.
-" "$LINENO" 5
-			PYTHON_VERSION=""
-		fi
-	fi
 
-	#
-	# Check if you have distutils, else fail
-	#
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the distutils Python package" >&5
-$as_echo_n "checking for the distutils Python package... " >&6; }
-	ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
-	if test -z "$ac_distutils_result"; then
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	else
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-		as_fn_error $? "cannot import Python module \"distutils\".
-Please check your Python installation. The error was:
-$ac_distutils_result" "$LINENO" 5
-		PYTHON_VERSION=""
-	fi
+fi
+CXXFLAGS="$CXXFLAGS $ucto_CFLAGS"
+LIBS="$ucto_LIBS $LIBS"
 
-	#
-	# Check for Python include path
-	#
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5
-$as_echo_n "checking for Python include path... " >&6; }
-	if test -z "$PYTHON_CPPFLAGS"; then
-		python_path=`$PYTHON -c "import distutils.sysconfig; \
-           		print (distutils.sysconfig.get_python_inc ());"`
-		if test -n "${python_path}"; then
-		   	python_path="-I$python_path"
-		fi
-		PYTHON_CPPFLAGS=$python_path
-	fi
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_CPPFLAGS" >&5
-$as_echo "$PYTHON_CPPFLAGS" >&6; }
-
-
-	#
-	# Check for Python library path
-	#
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5
-$as_echo_n "checking for Python library path... " >&6; }
-	if test -z "$PYTHON_LDFLAGS"; then
-		# (makes two attempts to ensure we've got a version number
-		# from the interpreter)
-		ac_python_version=`cat<<EOD | $PYTHON -
-
-# join all versioning strings, on some systems
-# major/minor numbers could be in different list elements
-from distutils.sysconfig import *
-ret = ''
-for e in get_config_vars ('VERSION'):
-	if (e != None):
-		ret += e
-print (ret)
-EOD`
-
-		if test -z "$ac_python_version"; then
-			if test -n "$PYTHON_VERSION"; then
-				ac_python_version=$PYTHON_VERSION
-			else
-				ac_python_version=`$PYTHON -c "import sys; \
-					print (sys.version[:3])"`
-			fi
-		fi
-
-		# Make the versioning information available to the compiler
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_PYTHON "$ac_python_version"
-_ACEOF
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for frogdata" >&5
+$as_echo_n "checking for frogdata... " >&6; }
 
+if test -n "$frogdata_CFLAGS"; then
+    pkg_cv_frogdata_CFLAGS="$frogdata_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"frogdata >= 0.9 \""; } >&5
+  ($PKG_CONFIG --exists --print-errors "frogdata >= 0.9 ") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_frogdata_CFLAGS=`$PKG_CONFIG --cflags "frogdata >= 0.9 " 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$frogdata_LIBS"; then
+    pkg_cv_frogdata_LIBS="$frogdata_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"frogdata >= 0.9 \""; } >&5
+  ($PKG_CONFIG --exists --print-errors "frogdata >= 0.9 ") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_frogdata_LIBS=`$PKG_CONFIG --libs "frogdata >= 0.9 " 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
 
-		# First, the library directory:
-		ac_python_libdir=`cat<<EOD | $PYTHON -
-
-# There should be only one
-import distutils.sysconfig
-for e in distutils.sysconfig.get_config_vars ('LIBDIR'):
-	if e != None:
-		print (e)
-		break
-EOD`
-
-		# Before checking for libpythonX.Y, we need to know
-		# the extension the OS we're on uses for libraries
-		# (we take the first one, if there's more than one fix me!):
-		ac_python_soext=`$PYTHON -c \
-		  "import distutils.sysconfig; \
-		  print (distutils.sysconfig.get_config_vars('SO')[0])"`
-
-		# Now, for the library:
-		ac_python_soname=`$PYTHON -c \
-		  "import distutils.sysconfig; \
-		  print (distutils.sysconfig.get_config_vars('LDLIBRARY')[0])"`
-
-		# Strip away extension from the end to canonicalize its name:
-		ac_python_library=`echo "$ac_python_soname" | sed "s/${ac_python_soext}$//"`
-
-		# This small piece shamelessly adapted from PostgreSQL python macro;
-		# credits goes to momjian, I think. I'd like to put the right name
-		# in the credits, if someone can point me in the right direction... ?
-		#
-		if test -n "$ac_python_libdir" -a -n "$ac_python_library" \
-			-a x"$ac_python_library" != x"$ac_python_soname"
-		then
-			# use the official shared library
-			ac_python_library=`echo "$ac_python_library" | sed "s/^lib//"`
-			PYTHON_LDFLAGS="-L$ac_python_libdir -l$ac_python_library"
-		else
-			# old way: use libpython from python_configdir
-			ac_python_libdir=`$PYTHON -c \
-			  "from distutils.sysconfig import get_python_lib as f; \
-			  import os; \
-			  print (os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"`
-			PYTHON_LDFLAGS="-L$ac_python_libdir -lpython$ac_python_version"
-		fi
-
-		if test -z "PYTHON_LDFLAGS"; then
-			as_fn_error $? "
-  Cannot determine location of your Python DSO. Please check it was installed with
-  dynamic libraries enabled, or try setting PYTHON_LDFLAGS by hand.
-			" "$LINENO" 5
-		fi
-	fi
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_LDFLAGS" >&5
-$as_echo "$PYTHON_LDFLAGS" >&6; }
-
-
-	#
-	# Check for site packages
-	#
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python site-packages path" >&5
-$as_echo_n "checking for Python site-packages path... " >&6; }
-	if test -z "$PYTHON_SITE_PKG"; then
-		PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
-		        print (distutils.sysconfig.get_python_lib(0,0));"`
-	fi
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_SITE_PKG" >&5
-$as_echo "$PYTHON_SITE_PKG" >&6; }
-
-
-	#
-	# libraries which must be linked in when embedding
-	#
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra libraries" >&5
-$as_echo_n "checking python extra libraries... " >&6; }
-	if test -z "$PYTHON_EXTRA_LIBS"; then
-	   PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
-                conf = distutils.sysconfig.get_config_var; \
-                print (conf('LOCALMODLIBS') + ' ' + conf('LIBS'))"`
-	fi
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LIBS" >&5
-$as_echo "$PYTHON_EXTRA_LIBS" >&6; }
-
-
-	#
-	# linking flags needed when embedding
-	#
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking python extra linking flags" >&5
-$as_echo_n "checking python extra linking flags... " >&6; }
-	if test -z "$PYTHON_EXTRA_LDFLAGS"; then
-		PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \
-			conf = distutils.sysconfig.get_config_var; \
-			print (conf('LINKFORSHARED'))"`
-	fi
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LDFLAGS" >&5
-$as_echo "$PYTHON_EXTRA_LDFLAGS" >&6; }
-
-
-	#
-	# final check to see if everything compiles alright
-	#
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking consistency of all components of python development environment" >&5
-$as_echo_n "checking consistency of all components of python development environment... " >&6; }
-	# save current global flags
-	LIBS="$ac_save_LIBS $PYTHON_LDFLAGS $PYTHON_EXTRA_LDFLAGS $PYTHON_EXTRA_LIBS"
-	CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS"
-	ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-		#include <Python.h>
-int
-main ()
-{
-Py_Initialize();
-  ;
-  return 0;
-}
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  pythonexists=yes
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
 else
-  pythonexists=no
+        _pkg_short_errors_supported=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-	ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+        if test $_pkg_short_errors_supported = yes; then
+	        frogdata_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "frogdata >= 0.9 " 2>&1`
+        else
+	        frogdata_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "frogdata >= 0.9 " 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$frogdata_PKG_ERRORS" >&5
 
-	# turn back to default flags
-	CPPFLAGS="$ac_save_CPPFLAGS"
-	LIBS="$ac_save_LIBS"
+	as_fn_error $? "Package requirements (frogdata >= 0.9 ) were not met:
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pythonexists" >&5
-$as_echo "$pythonexists" >&6; }
+$frogdata_PKG_ERRORS
 
-        if test ! "x$pythonexists" = "xyes"; then
-	   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "
-  Could not link test program to Python. Maybe the main Python library has been
-  installed in some non-standard library path. If so, pass it to configure,
-  via the LDFLAGS environment variable.
-  Example: ./configure LDFLAGS=\"-L/usr/non-standard-path/python/lib\"
-  ============================================================================
-   ERROR!
-   You probably have to install the development version of the Python package
-   for your distribution.  The exact name of this package varies among them.
-  ============================================================================
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
 
-See \`config.log' for more details" "$LINENO" 5; }
-	  PYTHON_VERSION=""
-	fi
+Alternatively, you may set the environment variables frogdata_CFLAGS
+and frogdata_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
 
-	#
-	# all done!
-	#
+Alternatively, you may set the environment variables frogdata_CFLAGS
+and frogdata_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
 
-if test "x$PYTHON_CPPFLAGS" != "x"; then
- CXXFLAGS="$save_FLAGS $PYTHON_CPPFLAGS"
- LIBS="$save_LIBS $PYTHON_LDFLAGS"
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
 else
- CXXFLAGS="$save_FLAGS"
- LIBS="$save_LIBS"
-fi
-
-for ac_header in Python.h
-do :
-  ac_fn_cxx_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
-if test "x$ac_cv_header_Python_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_PYTHON_H 1
-_ACEOF
+	frogdata_CFLAGS=$pkg_cv_frogdata_CFLAGS
+	frogdata_LIBS=$pkg_cv_frogdata_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "\"can't find Python C API\"
-See \`config.log' for more details" "$LINENO" 5; }
 fi
+#
 
-done
-
-
-ac_config_files="$ac_config_files Makefile frog.pc m4/Makefile docs/Makefile scripts/Makefile tests/Makefile src/Makefile include/Makefile include/frog/Makefile"
+ac_config_files="$ac_config_files Makefile frog.pc m4/Makefile docs/Makefile tests/Makefile src/Makefile include/Makefile include/frog/Makefile"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -18802,7 +18845,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by frog $as_me 0.12.18, which was
+This file was extended by frog $as_me 0.13.4, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -18862,13 +18905,13 @@ $config_headers
 Configuration commands:
 $config_commands
 
-Report bugs to <timbl at uvt.nl>."
+Report bugs to <lamasoftware at science.ru.nl>."
 
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-frog config.status 0.12.18
+frog config.status 0.13.4
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
@@ -19003,8 +19046,10 @@ enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
+shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
+PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
@@ -19051,10 +19096,13 @@ compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
+lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
+lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
@@ -19087,7 +19135,6 @@ with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`'
 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
@@ -19120,7 +19167,8 @@ finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
-sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
+configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
+configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
@@ -19159,7 +19207,6 @@ with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
 allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
 no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
 hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`'
 hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
 hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
 hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
@@ -19198,6 +19245,7 @@ _LTECHO_EOF'
 # Quote evaled strings.
 for var in SHELL \
 ECHO \
+PATH_SEPARATOR \
 SED \
 GREP \
 EGREP \
@@ -19225,9 +19273,12 @@ CFLAGS \
 compiler \
 lt_cv_sys_global_symbol_pipe \
 lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_import \
 lt_cv_sys_global_symbol_to_c_name_address \
 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+lt_cv_nm_interface \
 nm_file_list_spec \
+lt_cv_truncate_bin \
 lt_prog_compiler_no_builtin_flag \
 lt_prog_compiler_pic \
 lt_prog_compiler_wl \
@@ -19248,7 +19299,6 @@ with_gnu_ld \
 allow_undefined_flag \
 no_undefined_flag \
 hardcode_libdir_flag_spec \
-hardcode_libdir_flag_spec_ld \
 hardcode_libdir_separator \
 exclude_expsyms \
 include_expsyms \
@@ -19282,7 +19332,6 @@ with_gnu_ld_CXX \
 allow_undefined_flag_CXX \
 no_undefined_flag_CXX \
 hardcode_libdir_flag_spec_CXX \
-hardcode_libdir_flag_spec_ld_CXX \
 hardcode_libdir_separator_CXX \
 exclude_expsyms_CXX \
 include_expsyms_CXX \
@@ -19295,7 +19344,7 @@ postdeps_CXX \
 compiler_lib_search_path_CXX; do
     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[\\\\\\\`\\"\\\$]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -19322,7 +19371,8 @@ postinstall_cmds \
 postuninstall_cmds \
 finish_cmds \
 sys_lib_search_path_spec \
-sys_lib_dlsearch_path_spec \
+configure_time_dlsearch_path \
+configure_time_lt_sys_library_path \
 reload_cmds_CXX \
 old_archive_cmds_CXX \
 old_archive_from_new_cmds_CXX \
@@ -19336,7 +19386,7 @@ prelink_cmds_CXX \
 postlink_cmds_CXX; do
     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[\\\\\\\`\\"\\\$]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -19345,19 +19395,16 @@ postlink_cmds_CXX; do
 done
 
 ac_aux_dir='$ac_aux_dir'
-xsi_shell='$xsi_shell'
-lt_shell_append='$lt_shell_append'
 
-# See if we are running on zsh, and set the options which allow our
+# See if we are running on zsh, and set the options that allow our
 # commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
+if test -n "\${ZSH_VERSION+set}"; then
    setopt NO_GLOB_SUBST
 fi
 
 
     PACKAGE='$PACKAGE'
     VERSION='$VERSION'
-    TIMESTAMP='$TIMESTAMP'
     RM='$RM'
     ofile='$ofile'
 
@@ -19381,7 +19428,6 @@ do
     "frog.pc") CONFIG_FILES="$CONFIG_FILES frog.pc" ;;
     "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;;
     "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;;
-    "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
     "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
@@ -20076,55 +20122,53 @@ $as_echo X"$file" |
  ;;
     "libtool":C)
 
-    # See if we are running on zsh, and set the options which allow our
+    # See if we are running on zsh, and set the options that allow our
     # commands through without removal of \ escapes.
-    if test -n "${ZSH_VERSION+set}" ; then
+    if test -n "${ZSH_VERSION+set}"; then
       setopt NO_GLOB_SUBST
     fi
 
-    cfgfile="${ofile}T"
+    cfgfile=${ofile}T
     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
     $RM "$cfgfile"
 
     cat <<_LT_EOF >> "$cfgfile"
 #! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Generated automatically by $as_me ($PACKAGE) $VERSION
 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
+
+# Provide generalized library-building support services.
+# Written by Gordon Matzigkeit, 1996
+
+# Copyright (C) 2014 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions.  There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of of the License, or
+# (at your option) any later version.
 #
-#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
-#                 Inc.
-#   Written by Gordon Matzigkeit, 1996
-#
-#   This file is part of GNU Libtool.
-#
-# GNU Libtool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
+# 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
+# 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.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 # The names of the tagged configurations supported by this script.
-available_tags="CXX "
+available_tags='CXX '
+
+# Configured defaults for sys_lib_dlsearch_path munging.
+: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
 
 # ### BEGIN LIBTOOL CONFIG
 
@@ -20144,12 +20188,18 @@ pic_mode=$pic_mode
 # Whether or not to optimize for fast installation.
 fast_install=$enable_fast_install
 
+# Shared archive member basename,for filename based shared library versioning on AIX.
+shared_archive_member_spec=$shared_archive_member_spec
+
 # Shell to use when invoking shell scripts.
 SHELL=$lt_SHELL
 
 # An echo program that protects backslashes.
 ECHO=$lt_ECHO
 
+# The PATH separator for the build system.
+PATH_SEPARATOR=$lt_PATH_SEPARATOR
+
 # The host system.
 host_alias=$host_alias
 host=$host
@@ -20258,18 +20308,27 @@ global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
 # Transform the output of nm in a proper C declaration.
 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
 
+# Transform the output of nm into a list of symbols to manually relocate.
+global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
+
 # Transform the output of nm in a C name address pair.
 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
 
 # Transform the output of nm in a C name address pair when lib prefix is needed.
 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
 
+# The name lister interface.
+nm_interface=$lt_lt_cv_nm_interface
+
 # Specify filename containing input files for \$NM.
 nm_file_list_spec=$lt_nm_file_list_spec
 
-# The root where to search for dependent libraries,and in which our libraries should be installed.
+# The root where to search for dependent libraries,and where our libraries should be installed.
 lt_sysroot=$lt_sysroot
 
+# Command to truncate a binary pipe.
+lt_truncate_bin=$lt_lt_cv_truncate_bin
+
 # The name of the directory that contains temporary libtool files.
 objdir=$objdir
 
@@ -20360,8 +20419,11 @@ hardcode_into_libs=$hardcode_into_libs
 # Compile-time system search path for libraries.
 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 
-# Run-time system search path for libraries.
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+# Detected run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
+
+# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
+configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
 
 # Whether dlopen is supported.
 dlopen_support=$enable_dlopen
@@ -20451,20 +20513,16 @@ no_undefined_flag=$lt_no_undefined_flag
 # This must work even if \$libdir does not exist
 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
 
-# If ld is used when linking, flag to hardcode \$libdir into a binary
-# during linking.  This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
-
 # Whether we need a single "-rpath" flag with a separated argument.
 hardcode_libdir_separator=$lt_hardcode_libdir_separator
 
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
 # DIR into the resulting binary.
 hardcode_direct=$hardcode_direct
 
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
 # DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# "absolute",i.e impossible to change by setting \$shlibpath_var if the
 # library is relocated.
 hardcode_direct_absolute=$hardcode_direct_absolute
 
@@ -20530,13 +20588,72 @@ compiler_lib_search_path=$lt_compiler_lib_search_path
 
 _LT_EOF
 
+    cat <<'_LT_EOF' >> "$cfgfile"
+
+# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
+
+# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+#       string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+#       string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+#       "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+#       VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+    case x$2 in
+    x)
+        ;;
+    *:)
+        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
+        ;;
+    x:*)
+        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
+        ;;
+    *::*)
+        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
+        ;;
+    *)
+        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
+        ;;
+    esac
+}
+
+
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+    for cc_temp in $*""; do
+      case $cc_temp in
+        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+        \-*) ;;
+        *) break;;
+      esac
+    done
+    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+
+
+# ### END FUNCTIONS SHARED WITH CONFIGURE
+
+_LT_EOF
+
   case $host_os in
   aix3*)
     cat <<\_LT_EOF >> "$cfgfile"
 # AIX sometimes has problems with the GCC collect2 program.  For some
 # reason, if we set the COLLECT_NAMES environment variable, the problems
 # vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
+if test set != "${COLLECT_NAMES+set}"; then
   COLLECT_NAMES=
   export COLLECT_NAMES
 fi
@@ -20545,7 +20662,7 @@ _LT_EOF
   esac
 
 
-ltmain="$ac_aux_dir/ltmain.sh"
+ltmain=$ac_aux_dir/ltmain.sh
 
 
   # We use sed instead of cat because bash on DJGPP gets confused if
@@ -20555,165 +20672,6 @@ ltmain="$ac_aux_dir/ltmain.sh"
   sed '$q' "$ltmain" >> "$cfgfile" \
      || (rm -f "$cfgfile"; exit 1)
 
-  if test x"$xsi_shell" = xyes; then
-  sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
-func_dirname ()\
-{\
-\    case ${1} in\
-\      */*) func_dirname_result="${1%/*}${2}" ;;\
-\      *  ) func_dirname_result="${3}" ;;\
-\    esac\
-} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_basename ()$/,/^} # func_basename /c\
-func_basename ()\
-{\
-\    func_basename_result="${1##*/}"\
-} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
-func_dirname_and_basename ()\
-{\
-\    case ${1} in\
-\      */*) func_dirname_result="${1%/*}${2}" ;;\
-\      *  ) func_dirname_result="${3}" ;;\
-\    esac\
-\    func_basename_result="${1##*/}"\
-} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
-func_stripname ()\
-{\
-\    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
-\    # positional parameters, so assign one to ordinary parameter first.\
-\    func_stripname_result=${3}\
-\    func_stripname_result=${func_stripname_result#"${1}"}\
-\    func_stripname_result=${func_stripname_result%"${2}"}\
-} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
-func_split_long_opt ()\
-{\
-\    func_split_long_opt_name=${1%%=*}\
-\    func_split_long_opt_arg=${1#*=}\
-} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
-func_split_short_opt ()\
-{\
-\    func_split_short_opt_arg=${1#??}\
-\    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
-} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
-func_lo2o ()\
-{\
-\    case ${1} in\
-\      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
-\      *)    func_lo2o_result=${1} ;;\
-\    esac\
-} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_xform ()$/,/^} # func_xform /c\
-func_xform ()\
-{\
-    func_xform_result=${1%.*}.lo\
-} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_arith ()$/,/^} # func_arith /c\
-func_arith ()\
-{\
-    func_arith_result=$(( $* ))\
-} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_len ()$/,/^} # func_len /c\
-func_len ()\
-{\
-    func_len_result=${#1}\
-} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-fi
-
-if test x"$lt_shell_append" = xyes; then
-  sed -e '/^func_append ()$/,/^} # func_append /c\
-func_append ()\
-{\
-    eval "${1}+=\\${2}"\
-} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
-func_append_quoted ()\
-{\
-\    func_quote_for_eval "${2}"\
-\    eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
-} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
-  # Save a `func_append' function call where possible by direct use of '+='
-  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
-    && mv -f "$cfgfile.tmp" "$cfgfile" \
-      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-  test 0 -eq $? || _lt_function_replace_fail=:
-else
-  # Save a `func_append' function call even when '+=' is not available
-  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
-    && mv -f "$cfgfile.tmp" "$cfgfile" \
-      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-  test 0 -eq $? || _lt_function_replace_fail=:
-fi
-
-if test x"$_lt_function_replace_fail" = x":"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
-$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
-fi
-
-
    mv -f "$cfgfile" "$ofile" ||
     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
   chmod +x "$ofile"
@@ -20797,20 +20755,16 @@ no_undefined_flag=$lt_no_undefined_flag_CXX
 # This must work even if \$libdir does not exist
 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
 
-# If ld is used when linking, flag to hardcode \$libdir into a binary
-# during linking.  This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
-
 # Whether we need a single "-rpath" flag with a separated argument.
 hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
 
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
 # DIR into the resulting binary.
 hardcode_direct=$hardcode_direct_CXX
 
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
 # DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# "absolute",i.e impossible to change by setting \$shlibpath_var if the
 # library is relocated.
 hardcode_direct_absolute=$hardcode_direct_absolute_CXX
 
diff --git a/configure.ac b/configure.ac
index feaa6b8..21adbbc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,10 +1,8 @@
 #                                               -*- Autoconf -*-
 # Process this file with autoconf to produce a configure script.
-# $Id: configure.ac 17474 2014-08-05 09:55:58Z sloot $
-# $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/configure.ac $
 
 AC_PREREQ(2.59)
-AC_INIT([frog], [0.12.18], [timbl at uvt.nl])
+AC_INIT([frog], [0.13.4], [lamasoftware at science.ru.nl])
 AM_INIT_AUTOMAKE
 AC_CONFIG_SRCDIR([configure.ac])
 AC_CONFIG_MACRO_DIR([m4])
@@ -18,7 +16,7 @@ else
 fi
 
 # Checks for programs.
-AC_PROG_CXX( [g++] )
+AC_PROG_CXX( [g++ c++] )
 
 if $cxx_flags_were_set; then
   CXXFLAGS=$CXXFLAGS
@@ -38,12 +36,12 @@ AC_LANG([C++])
 
 # Checks for typedefs, structures, and compiler characteristics.
 AC_HEADER_STDBOOL
-AC_HEADER_DIRENT
-AC_TYPE_PID_T
+AC_C_INLINE
 AC_TYPE_SIZE_T
 
 # Checks for library functions.
 AC_FUNC_FORK
+AC_HEADER_DIRENT
 AC_CHECK_FUNCS([localtime_r])
 
 ACX_PTHREAD([],[AC_MSG_ERROR([We need pthread support!])])
@@ -53,10 +51,14 @@ if test x"$acx_pthread_ok" = xyes; then
    CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
 fi
 
-# check for OpenMP
-OPENMP_CHECK( [CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
-	      AC_DEFINE(HAVE_OPENMP, 1 , Define to 1 if you have OpenMP )],
-	      [AC_MSG_NOTICE(We don't have OpenMP. Multithreaded testing is disabled)] )
+# check OpenMP support
+AC_OPENMP
+if test "x$ac_cv_prog_cxx_openmp" != "xunsupported"; then
+   CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
+   AC_DEFINE(HAVE_OPENMP, 1 , Define to 1 if you have OpenMP )
+else
+   AC_MSG_NOTICE(We don't have OpenMP. Multithreaded operation is disabled)
+fi
 
 if test $prefix = "NONE"; then
    prefix="$ac_default_prefix"
@@ -80,55 +82,47 @@ AX_LIB_READLINE
 
 #check for needed dependencies
 useICU=1;
-# inspired by feh-1.3.4/configure.ac.  Tnx Tom Gilbert and feh hackers.
+# inspired by feh-1.3.4/configure.ac. Tnx Tom Gilbert and feh hackers.
 AC_ARG_WITH(icu,
-       [  --with-icu=DIR       use ICU installed in <DIR>],
-       [if test "$with_icu" = "no"; then
-           useICU=0
-	else
-	   CXXFLAGS="$CXXFLAGS -I$withval/include"
-           LIBS="-L$withval/lib $LIBS"
-	fi] )
+ [ --with-icu=DIR use ICU installed in <DIR>],
+ [if test "$with_icu" = "no"; then
+ useICU=0
+ else
+ CXXFLAGS="$CXXFLAGS -I$withval/include"
+ LIBS="-L$withval/lib $LIBS"
+ fi] )
 
 if test "$useICU" = "1"; then
-  AX_ICU_CHECK( [3.6],
-		[CXXFLAGS="$CXXFLAGS $ICU_CPPSEARCHPATH"
-		LIBS="$ICU_LIBPATH $ICU_LIBS $ICU_IOLIBS $LIBS"],
-		[AC_MSG_FAILURE( "No ICU development environment found. Please check if libicu-dev or the like is installed" )] )
-  AC_DEFINE(HAVE_ICU, 1, we want to use ICU )
+ AX_ICU_CHECK( [4.2],
+ [CXXFLAGS="$CXXFLAGS $ICU_CPPSEARCHPATH"
+ LIBS="$ICU_LIBPATH $ICU_LIBS $ICU_IOLIBS $LIBS"],
+ [AC_MSG_FAILURE( "No ICU development environment found. Please check if libicu-ev or the like is installed" )] )
+ AC_DEFINE(HAVE_ICU, 1, we want to use ICU )
 else
-  AC_MSG_ERROR("ICU support is required")
+ AC_MSG_ERROR("ICU support is required")
 fi
 
-AC_ARG_WITH(timbl,
-       [  --with-timbl=DIR       use timbl installed in <DIR>],
-       [PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$withval/lib/pkgconfig"],
-       [PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$prefix/lib/pkgconfig"])
-PKG_CHECK_MODULES([timbl], [timbl >= 6.4.4] )
-CXXFLAGS="$CXXFLAGS $timbl_CFLAGS"
-LIBS="$timbl_LIBS $LIBS"
-
 AC_ARG_WITH(ticcutils,
        [  --with-ticcutils=DIR       use ticcutils installed in <DIR>],
        [PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$withval/lib/pkgconfig"],
        [PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$prefix/lib/pkgconfig"])
-PKG_CHECK_MODULES([ticcutils], [ticcutils >= 0.5] )
+PKG_CHECK_MODULES([ticcutils], [ticcutils >= 0.9] )
 CXXFLAGS="$CXXFLAGS $ticcutils_CFLAGS"
 LIBS="$ticcutils_LIBS $LIBS"
 
-AC_ARG_WITH(timblserver,
-       [  --with-timblserver=DIR     use timblserver installed in <DIR>],
+AC_ARG_WITH(timbl,
+       [  --with-timbl=DIR       use timbl installed in <DIR>],
        [PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$withval/lib/pkgconfig"],
        [PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$prefix/lib/pkgconfig"])
-PKG_CHECK_MODULES([timblserver], [timblserver >= 1.7] )
-CXXFLAGS="$CXXFLAGS $timblserver_CFLAGS"
-LIBS="$timblserver_LIBS $LIBS"
+PKG_CHECK_MODULES([timbl], [timbl >= 6.4.4] )
+CXXFLAGS="$CXXFLAGS $timbl_CFLAGS"
+LIBS="$timbl_LIBS $LIBS"
 
 AC_ARG_WITH(mbt,
        [  --with-mbt=DIR       use mbt installed in <DIR>],
        [PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$withval/lib/pkgconfig"],
        [PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$prefix/lib/pkgconfig"])
-PKG_CHECK_MODULES([mbt], [mbt >= 3.2.10] )
+PKG_CHECK_MODULES([mbt], [mbt >= 3.2.14] )
 CXXFLAGS="$CXXFLAGS $mbt_CFLAGS"
 LIBS="$mbt_LIBS $LIBS"
 
@@ -137,7 +131,7 @@ AC_ARG_WITH(folia,
        [PKG_CONFIG_PATH="$withval/lib/pkgconfig:$PKG_CONFIG_PATH"],
        [PKG_CONFIG_PATH="$prefix/lib/pkgconfig:$PKG_CONFIG_PATH"])
 AC_MSG_NOTICE( [pkg-config search path: $PKG_CONFIG_PATH] )
-PKG_CHECK_MODULES([folia],[folia >= 0.11])
+PKG_CHECK_MODULES([folia],[folia >= 1.0])
 CXXFLAGS="$CXXFLAGS $folia_CFLAGS"
 LIBS="$folia_LIBS $LIBS"
 
@@ -145,49 +139,18 @@ AC_ARG_WITH(ucto,
        [  --with-ucto=DIR       use ucto installed in <DIR>],
        [PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$withval/lib/pkgconfig"],
        [PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$prefix/lib/pkgconfig"])
-PKG_CHECK_MODULES([ucto], [ucto >= 0.5.3] )
+PKG_CHECK_MODULES([ucto], [ucto >= 0.8.4] )
 CXXFLAGS="$CXXFLAGS $ucto_CFLAGS"
 LIBS="$ucto_LIBS $LIBS"
 
+PKG_CHECK_MODULES([frogdata], [frogdata >= 0.9] )
 #
-# the ac_python_devel.m4 script tramples upon $LIBS, so we save it
-save_LIBS="$LIBS"
-save_FLAGS="$CXXFLAGS"
-
-AC_ARG_WITH(python,
-       [  --with-python=DIR       use python executable installed in <DIR>],
-       [PYTHON="$withval/python"],
-       [PYTHON="python"])
-
-#we need Python > 2.5.x
-AM_PATH_PYTHON([2.5],
-	[PYTHONDIR=${pkgpythondir}
-	 AC_SUBST([PYTHONDIR])],
-	[:])
-
-# set PYTHON_EXTRA_LIBS to a non-empty string
-# this fools AC_PYTHON_DEVEL into NOT setting it.
-# That fails on some systems with linking errors
-# we don't need PYTHON_EXTRA_LIBS
-PYTHON_EXTRA_LIBS=" "
-
-AC_PYTHON_DEVEL([>= '2.5'])
-if test "x$PYTHON_CPPFLAGS" != "x"; then
- CXXFLAGS="$save_FLAGS $PYTHON_CPPFLAGS"
- LIBS="$save_LIBS $PYTHON_LDFLAGS"
-else
- CXXFLAGS="$save_FLAGS"
- LIBS="$save_LIBS"
-fi
-
-AC_CHECK_HEADERS( [Python.h], , AC_MSG_FAILURE("can't find Python C API") )
 
 AC_OUTPUT([
   Makefile
   frog.pc
   m4/Makefile
   docs/Makefile
-  scripts/Makefile
   tests/Makefile
   src/Makefile
   include/Makefile
diff --git a/depcomp b/depcomp
index 4ebd5b3..fc98710 100755
--- a/depcomp
+++ b/depcomp
@@ -3,7 +3,7 @@
 
 scriptversion=2013-05-30.07; # UTC
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 9c44086..43eed03 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -1,5 +1,5 @@
-# $Id: Makefile.am 15946 2013-04-04 12:22:16Z sloot $
-# $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/docs/Makefile.am $
+# $Id$
+# $URL$
 
 man1_MANS = frog.1 mbma.1 mblem.1
 EXTRA_DIST = frog.1 mbma.1 mblem.1
diff --git a/docs/Makefile.in b/docs/Makefile.in
index cc339d4..073c444 100644
--- a/docs/Makefile.in
+++ b/docs/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,10 +14,20 @@
 
 @SET_MAKE@
 
-# $Id: Makefile.am 15946 2013-04-04 12:22:16Z sloot $
-# $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/docs/Makefile.am $
+# $Id$
+# $URL$
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,18 +91,16 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = docs
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ac_python_devel.m4 \
-	$(top_srcdir)/m4/ax_icu_check.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_icu_check.m4 \
 	$(top_srcdir)/m4/ax_lib_readline.m4 \
 	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-	$(top_srcdir)/m4/openmp.m4 $(top_srcdir)/m4/pkg.m4 \
-	$(top_srcdir)/configure.ac
+	$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -148,6 +156,7 @@ am__installdirs = "$(DESTDIR)$(man1dir)"
 NROFF = nroff
 MANS = $(man1_MANS)
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -200,6 +209,7 @@ LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -207,6 +217,7 @@ NM = @NM@
 NMEDIT = @NMEDIT@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@
 OTOOL = @OTOOL@
 OTOOL64 = @OTOOL64@
 PACKAGE = @PACKAGE@
@@ -223,17 +234,6 @@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
-PYTHON = @PYTHON@
-PYTHONDIR = @PYTHONDIR@
-PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
-PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
-PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@
-PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
-PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
-PYTHON_PLATFORM = @PYTHON_PLATFORM@
-PYTHON_PREFIX = @PYTHON_PREFIX@
-PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
-PYTHON_VERSION = @PYTHON_VERSION@
 RANLIB = @RANLIB@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
@@ -271,6 +271,8 @@ dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 folia_CFLAGS = @folia_CFLAGS@
 folia_LIBS = @folia_LIBS@
+frogdata_CFLAGS = @frogdata_CFLAGS@
+frogdata_LIBS = @frogdata_LIBS@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
@@ -291,13 +293,10 @@ mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
 pkgconfigpath = @pkgconfigpath@
-pkgpyexecdir = @pkgpyexecdir@
-pkgpythondir = @pkgpythondir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
-pyexecdir = @pyexecdir@
-pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -307,8 +306,6 @@ ticcutils_CFLAGS = @ticcutils_CFLAGS@
 ticcutils_LIBS = @ticcutils_LIBS@
 timbl_CFLAGS = @timbl_CFLAGS@
 timbl_LIBS = @timbl_LIBS@
-timblserver_CFLAGS = @timblserver_CFLAGS@
-timblserver_LIBS = @timblserver_LIBS@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
@@ -331,7 +328,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu docs/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -553,6 +549,8 @@ uninstall-man: uninstall-man1
 	ps ps-am tags-am uninstall uninstall-am uninstall-man \
 	uninstall-man1
 
+.PRECIOUS: Makefile
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/docs/frog.1 b/docs/frog.1
index 3c1d314..aeb0551 100644
--- a/docs/frog.1
+++ b/docs/frog.1
@@ -1,129 +1,151 @@
-.TH frog 1 "2012 January 31"
+.TH frog 1 "2016 march 10"
 
 .SH NAME
-frog - Dutch morpho-syntactic analyzer, IOB chunker and dependency parser
+frog \- Dutch Natural Language Toolkit
 .SH SYNOPSYS
 frog [options]
 
-frog -t test-file
+frog \-t test\-file
 
 .SH DESCRIPTION
-frog is an integration of memory-based natural language processing (NLP) modules developed for Dutch.
+frog is an integration of memory\(hy-based natural language processing (NLP) modules developed for Dutch.
 frog's current version will tokenize, tag, lemmatize, and morphologically segment word tokens in Dutch text files, add IOB chunks and will assign a dependency graph to each sentence.
 
 .SH OPTIONS
 
-.BR -c " <configfile>"
+.BR \-c " <configfile>"
 .RS
 set the configuration using 'file'
 .RE
 
-.BR -d " <level>"
+.BR \-\-debug =<modele><level>,...
 .RS
-set debug level.
+set debug level per module.
+Tokenizer (t), Lemmatizer (l), Morphological Analyzer (a), Chunker (c), Multi\(hyWord Units (m), Named Entity Recognition (n), or Parser (p).
+
+(e.g. \-\-debug=l5,n3 sets the level for the Lemmatizer to 5 and for the NER
+to 3 )
+
+.RE
+
+.BR \-d " <level>"
+.RS
+set global debug level. (for all modules)
 .RE
 
-.BR -e " <encoding>"
+.BR \-\-deep\(hymorph
+.RS
+generate a deep morphological analisys and add it to the XML. This also includes compound information.
+The default tabbed output is also more detailed in the Morpheme field.
+
+.RE
+
+.BR \-e " <encoding>"
 .RS
 set input encoding. (default UTF8)
 .RE
 
-.BR -h
+.BR \-h
 .RS
 give some help
 .RE
 
-.BR --keep-parser-files =[yes|no]
+.BR \-\-keep\-parser\-files =[yes|no]
 .RS
 keep the intermediate files from the parser. Last sentence only!
 .RE
 
-.BR -n
+.BR \-n
 .RS
-assume inputfile to hold one sentence per line
+assume inputfile to hold one sentence per line.
+
+Very useful when running interactive, otherwise an empty line is needed to
+signal end of input.
 .RE
 
-.BR -o " <file>"
+.BR \-o " <file>"
 .RS
 send output to 'file' instead of stdout. Defaults to the name of the inputfile with '.out' appended.
 .RE
 
-.BR --outputdir " <dir>"
+.BR \-\-outputdir " <dir>"
 .RS
 send all output to 'dir' instead of stdout. Creates filenames from the inputfilename(s) with '.out' appended.
 .RE
 
-.BR --skip =[aclmnpt]
+.BR \-\-skip =[aclmnpt]
 .RS
-skip parts of the proces: Tokenizer (t), Chunker (c), Lemmatizer (l), Morphological Analyzer (a), Multi-Word unit (m), Named-Entity recognizer (n) or Parser (p)
+skip parts of the proces: Tokenizer (t), Chunker (c), Lemmatizer (l), Morphological Analyzer (a), Multi\(hyWord unit (m), Named\(hyEntity recognizer (n) or Parser (p)
 .RE
 
-.BR -Q
+.BR \-Q
 .RS
 Enable quotedetection in the tokenizer. May run havock!
 .RE
 
-.BR -S " <port>"
+.BR \-S " <port>"
 .RS
 Run a server on 'port'
 .RE
 
-.BR -t " <file>"
+.BR \-t " <file>"
 .RS
-process 'file'
+process 'file'.
+
+When \-t is omitted, Frog will run in interactive mode.
 .RE
 
-.BR -x " <xmlfile>"
+.BR \-x " <xmlfile>"
 .RS
-process 'xmlfile', which is supposed to be in FoLiA format! If 'xmlfile' is empty, and 
-.BR --testdir =<dir> 
+process 'xmlfile', which is supposed to be in FoLiA format! If 'xmlfile' is empty, and
+.BR \-\-testdir =<dir>
 is provided, all '.xml' files in 'dir' will be processed as FoLia XML.
 .RE
 
-.BR --textclass "=<cls>"
+.BR \-\-textclass "=<cls>"
 .RS
-When 
-.BR -x
+When
+.BR \-x
 is given, use 'cls' to find text in the FoLiA document(s).
 .RE
 
 
-.BR --testdir =<dir>
+.BR \-\-testdir =<dir>
 .RS
-process all files in 'dir'. When the input mode is XML, only '.xml' files are teken from 'dir'. see also 
-.B --outputdir
+process all files in 'dir'. When the input mode is XML, only '.xml' files are teken from 'dir'. see also
+.B \-\-outputdir
 .RE
 
-.BR --tmpdir =<dir>
+.BR \-\-tmpdir =<dir>
 .RS
 location to store intermediate files. Default /tmp.
 .RE
 
-.BR --threads =<n>
+.BR \-\-threads =<n>
 .RS
 use a maximum of 'n' threads. The default is to take whatever is needed.
-In servermode we always run on 1 thread.
+In servermode we always run on 1 thread per session.
 .RE
 
-.BR -V " or " --version
+.BR \-V " or " \-\-version
 .RS
 show version info
 .RE
 
-.BR --xmldir =<dir>
+.BR \-\-xmldir =<dir>
 .RS
 generate FoLiA XML output and send it to 'dir'. Creates filenames from the inputfilename with '.xml' appended. (Except when it already ends with '.xml')
 .RE
 
-.BR -X " <file>"
+.BR \-X " <file>"
 .RS
 generate FoLiA XML output and send it to 'file'. Defaults to the name of the inputfile(s) with '.xml' appended. (Except when it already ends with '.xml')
 .RE
 
-.BR --id "=<id>"
+.BR \-\-id "=<id>"
 .RS
-When 
-.BR -X
+When
+.BR \-X
 for FoLia is given, use 'id' to give the doc an ID.
 .RE
 
diff --git a/docs/mblem.1 b/docs/mblem.1
index af83d3e..aaac434 100644
--- a/docs/mblem.1
+++ b/docs/mblem.1
@@ -1,7 +1,7 @@
-.TH mblem 1 "2012 June 27"
+.TH mblem 1 "2015 October 06"
 
 .SH NAME
-mblem - Dutch lemmatizer
+mblem - (dutch) lemmatizer
 .SH SYNOPSYS
 mblem -t test-file
 
@@ -12,7 +12,7 @@ mblem will tokenize, tag, and lemmatize word tokens in Dutch text files.
 
 .BR -c " <configfile>"
 .RS
-set the configuration using 'file'
+set the configuration using 'file' The default is to use the Frog config file.
 .RE
 
 .BR -d " <level>"
@@ -20,9 +20,16 @@ set the configuration using 'file'
 set debug level.
 .RE
 
-.BR -a
+.BR --notagger
 .RS
-Give ALL analysis, not just the 'best' ones.
+Don't use a tagger to disambiguate. All variants are shown.
+The default is to use the Dutch CGN tagger.
+.RE
+
+.BR --notokenizer
+.RS
+Don't use a tokenizer. Assume al input to be tokenized.
+The default is to use the Ucto Tokenizer for Dutch.
 .RE
 
 .BR -h
@@ -45,4 +52,5 @@ Antal van den Bosch Timbl at uvt.nl
 
 .SH SEE ALSO
 .BR frog (1)
+.BR ucto (1)
 .BR mbma (1)
diff --git a/docs/mbma.1 b/docs/mbma.1
index 593df3e..6d79e8c 100644
--- a/docs/mbma.1
+++ b/docs/mbma.1
@@ -1,12 +1,14 @@
 .TH mbma 1 "2012 June 27"
 
 .SH NAME
-mbma - Dutch morphological analyzer
+mbma - (Dutch) morphological analyzer
 .SH SYNOPSYS
 mbma -t test-file
 
 .SH DESCRIPTION
-mbma will tokenize, tag, and morphologically segment word tokens in Dutch text files.
+mbma will tokenize, tag, and morphologically segment word tokens in Dutch text files. The default  is  to  use  the
+ Frog config file.
+
 
 .SH OPTIONS
 
@@ -20,9 +22,16 @@ set the configuration using 'file'
 set debug level.
 .RE
 
-.BR -a
+.BR --notagger
+.RS
+Don't use a tagger to disambiguate. All variants are shown.  The
+default is to use the Dutch CGN tagger.
+.RE
+
+.BR --notokenizer
 .RS
-Give ALL analysis, not just the 'best' ones.
+Don't use a tokenizer. Assume al input  to  be  tokenized.  The
+default is to use the Ucto Tokenizer for Dutch.
 .RE
 
 .BR -h
@@ -45,4 +54,5 @@ Antal van den Bosch Timbl at uvt.nl
 
 .SH SEE ALSO
 .BR frog (1)
+.BR ucto (1)
 .BR mblem (1)
diff --git a/include/Makefile.am b/include/Makefile.am
index 743e0e4..d47b597 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1,5 +1,5 @@
-# $Id: Makefile.am 8582 2011-02-27 11:38:10Z joostvb $
-# $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/include/Makefile.am $
+# $Id$
+# $URL$
 
 #AUTOMAKE_OPTIONS = foreign 
 
diff --git a/include/Makefile.in b/include/Makefile.in
index 1687d68..1655069 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,12 +14,22 @@
 
 @SET_MAKE@
 
-# $Id: Makefile.am 8582 2011-02-27 11:38:10Z joostvb $
-# $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/include/Makefile.am $
+# $Id$
+# $URL$
 
 #AUTOMAKE_OPTIONS = foreign 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -83,18 +93,16 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = include
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ac_python_devel.m4 \
-	$(top_srcdir)/m4/ax_icu_check.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_icu_check.m4 \
 	$(top_srcdir)/m4/ax_lib_readline.m4 \
 	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-	$(top_srcdir)/m4/openmp.m4 $(top_srcdir)/m4/pkg.m4 \
-	$(top_srcdir)/configure.ac
+	$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -154,6 +162,7 @@ am__define_uniq_tagged_files = \
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -231,6 +240,7 @@ LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -238,6 +248,7 @@ NM = @NM@
 NMEDIT = @NMEDIT@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@
 OTOOL = @OTOOL@
 OTOOL64 = @OTOOL64@
 PACKAGE = @PACKAGE@
@@ -254,17 +265,6 @@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
-PYTHON = @PYTHON@
-PYTHONDIR = @PYTHONDIR@
-PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
-PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
-PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@
-PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
-PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
-PYTHON_PLATFORM = @PYTHON_PLATFORM@
-PYTHON_PREFIX = @PYTHON_PREFIX@
-PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
-PYTHON_VERSION = @PYTHON_VERSION@
 RANLIB = @RANLIB@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
@@ -302,6 +302,8 @@ dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 folia_CFLAGS = @folia_CFLAGS@
 folia_LIBS = @folia_LIBS@
+frogdata_CFLAGS = @frogdata_CFLAGS@
+frogdata_LIBS = @frogdata_LIBS@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
@@ -322,13 +324,10 @@ mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
 pkgconfigpath = @pkgconfigpath@
-pkgpyexecdir = @pkgpyexecdir@
-pkgpythondir = @pkgpythondir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
-pyexecdir = @pyexecdir@
-pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -338,8 +337,6 @@ ticcutils_CFLAGS = @ticcutils_CFLAGS@
 ticcutils_LIBS = @ticcutils_LIBS@
 timbl_CFLAGS = @timbl_CFLAGS@
 timbl_LIBS = @timbl_LIBS@
-timblserver_CFLAGS = @timblserver_CFLAGS@
-timblserver_LIBS = @timblserver_LIBS@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
@@ -361,7 +358,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu include/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -656,6 +652,8 @@ uninstall-am:
 	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
 	ps ps-am tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/include/frog/Frog.h b/include/frog/Frog.h
old mode 100755
new mode 100644
index 490bc31..fe41684
--- a/include/frog/Frog.h
+++ b/include/frog/Frog.h
@@ -1,11 +1,13 @@
+/* ex: set tabstop=8 expandtab: */
 /*
-  $Id: Frog.h 17436 2014-07-09 13:13:35Z sloot $
-  $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/include/frog/Frog.h $
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
 
-  Copyright (c) 2006 - 2014
-  Tilburg University
+  This file is part of frog:
 
-  This file is part of frog
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
 
   frog is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -21,11 +23,11 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
   For questions and suggestions, see:
-      http://ilk.uvt.nl/software.html
+      https://github.com/LanguageMachines/frog/issues
   or send mail to:
-      timbl at uvt.nl
-*/
+      lamasoftware (at ) science.ru.nl
 
+*/
 
 #ifndef FROG_H
 #define FROG_H
@@ -34,16 +36,15 @@
 #include "ticcutils/LogStream.h"
 #include "ticcutils/Configuration.h"
 #include "ticcutils/Timer.h"
-#include "libfolia/document.h"
+#include "ticcutils/PrettyPrint.h"
+#include "ticcutils/StringOps.h"
+#include "libfolia/folia.h"
+
 
+//declared here and defined in Frog-util.cxx (bit messy)
 std::string prefix( const std::string&, const std::string& );
-bool existsDir( const std::string& );
 std::string getTime();
-
-void getFileNames( const std::string&, const std::string&,
-		   std::set<std::string>& );
-
-extern TiCC::LogStream *theErrLog;
+void getFileNames( const std::string&, const std::string&, std::set<std::string>& );
 
 class TimerBlock{
 public:
@@ -61,6 +62,23 @@ public:
   TiCC::Timer dirTimer;
   TiCC::Timer csiTimer;
   TiCC::Timer frogTimer;
+  void reset(){
+    parseTimer.reset();
+    tokTimer.reset();
+    mblemTimer.reset();
+    mbmaTimer.reset();
+    mwuTimer.reset();
+    tagTimer.reset();
+    iobTimer.reset();
+    nerTimer.reset();
+    prepareTimer.reset();
+    pairsTimer.reset();
+    relsTimer.reset();
+    dirTimer.reset();
+    csiTimer.reset();
+    frogTimer.reset();
+  }
 };
 
+
 #endif
diff --git a/include/frog/FrogAPI.h b/include/frog/FrogAPI.h
new file mode 100644
index 0000000..aafdd61
--- /dev/null
+++ b/include/frog/FrogAPI.h
@@ -0,0 +1,140 @@
+/* ex: set tabstop=8 expandtab: */
+/*
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
+
+  This file is part of frog
+
+  frog 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.
+
+  frog 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/>.
+
+  For questions and suggestions, see:
+      https://github.com/LanguageMachines/timblserver/issues
+  or send mail to:
+      lamasoftware (at ) science.ru.nl
+*/
+
+
+#ifndef FROGAPI_H
+#define FROGAPI_H
+
+#include "timbl/TimblAPI.h"
+
+#include "frog/Frog.h" //internals
+#include "ticcutils/Configuration.h"
+#include "ticcutils/LogStream.h"
+#include "ticcutils/FdStream.h"
+#include "ticcutils/ServerBase.h"
+
+#include <vector>
+#include <string>
+#include <iostream>
+
+class UctoTokenizer;
+class Mbma;
+class Mblem;
+class Mwu;
+class Parser;
+class POSTagger;
+class IOBTagger;
+class NERTagger;
+
+class FrogOptions {
+ public:
+  bool doTok;
+  bool doLemma;
+  bool doMorph;
+  bool doDeepMorph;
+  bool doMwu;
+  bool doIOB;
+  bool doNER;
+  bool doParse;
+  bool doSentencePerLine;
+  bool doQuoteDetection;
+  bool doDirTest;
+  bool doServer;
+
+  bool doXMLin;
+  bool doXMLout;
+  bool doKanon;
+
+  int debugFlag;
+  bool interactive;
+  int numThreads;
+
+  std::string encoding;
+  std::string uttmark;
+  std::string listenport;
+  std::string docid;
+  std::string textclass;
+  std::string language;
+
+  unsigned int maxParserTokens;
+
+  FrogOptions();
+ private:
+  FrogOptions(const FrogOptions & );
+};
+
+
+class FrogAPI {
+ public:
+  FrogAPI( FrogOptions&,
+	   const TiCC::Configuration&,
+	   TiCC::LogStream * );
+  ~FrogAPI();
+  static std::string defaultConfigDir( const std::string& ="" );
+  static std::string defaultConfigFile( const std::string& ="" );
+  void FrogFile( const std::string&, std::ostream&, const std::string& );
+  void FrogDoc( folia::Document&, bool=false );
+  void FrogServer( Sockets::ServerSocket &conn );
+  void FrogInteractive();
+  std::string Frogtostring( const std::string& );
+  std::string Frogtostringfromfile( const std::string& );
+
+ private:
+  // functions
+  bool TestSentence( folia::Sentence*, TimerBlock&);
+  void FrogStdin( bool prompt );
+  std::vector<folia::Word*> lookup( folia::Word *,
+				    const std::vector<folia::Entity*>& ) const;
+  folia::Dependency *lookupDep( const folia::Word *,
+				const std::vector<folia::Dependency*>& ) const;
+  std::string lookupNEREntity( const std::vector<folia::Word *>&,
+			       const std::vector<folia::Entity*>& ) const;
+  std::string lookupIOBChunk( const std::vector<folia::Word *>&,
+			      const std::vector<folia::Chunk*>& ) const;
+  void displayMWU( std::ostream&, size_t, const std::vector<folia::Word*>& ) const;
+  std::ostream& showResults( std::ostream&, folia::Document& ) const;
+
+  // data
+  const TiCC::Configuration& configuration;
+  FrogOptions& options;
+  TiCC::LogStream *theErrLog;
+  TimerBlock timers;
+  // pointers to all the modules
+  Mbma *myMbma;
+  Mblem *myMblem;
+  Mwu *myMwu;
+  Parser *myParser;
+  POSTagger *myPoSTagger;
+  IOBTagger *myIOBTagger;
+  NERTagger *myNERTagger;
+  UctoTokenizer *tokenizer;
+};
+
+std::vector<std::string> get_full_morph_analysis( folia::Word *, bool = false );
+std::vector<std::string> get_compound_analysis( folia::Word * );
+
+#endif
diff --git a/include/frog/Makefile.am b/include/frog/Makefile.am
index 3d4fe19..4f0711e 100644
--- a/include/frog/Makefile.am
+++ b/include/frog/Makefile.am
@@ -1,3 +1,4 @@
-pkginclude_HEADERS = Frog.h  mblem_mod.h  mbma_mod.h  mwu_chunker_mod.h \
-	cgn_tagger_mod.h iob_tagger_mod.h Parser.h \
-	ucto_tokenizer_mod.h ner_tagger_mod.h
+pkginclude_HEADERS = FrogAPI.h Frog.h mblem_mod.h \
+	mbma_rule.h mbma_mod.h mbma_brackets.h clex.h mwu_chunker_mod.h \
+	pos_tagger_mod.h cgn_tagger_mod.h iob_tagger_mod.h Parser.h \
+	ucto_tokenizer_mod.h ner_tagger_mod.h csidp.h ckyparser.h
diff --git a/include/frog/Makefile.in b/include/frog/Makefile.in
index df5d934..ab235c1 100644
--- a/include/frog/Makefile.in
+++ b/include/frog/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,19 +89,17 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = include/frog
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(pkginclude_HEADERS)
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ac_python_devel.m4 \
-	$(top_srcdir)/m4/ax_icu_check.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_icu_check.m4 \
 	$(top_srcdir)/m4/ax_lib_readline.m4 \
 	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-	$(top_srcdir)/m4/openmp.m4 $(top_srcdir)/m4/pkg.m4 \
-	$(top_srcdir)/configure.ac
+	$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(pkginclude_HEADERS) \
+	$(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -163,6 +171,7 @@ am__define_uniq_tagged_files = \
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -215,6 +224,7 @@ LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -222,6 +232,7 @@ NM = @NM@
 NMEDIT = @NMEDIT@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@
 OTOOL = @OTOOL@
 OTOOL64 = @OTOOL64@
 PACKAGE = @PACKAGE@
@@ -238,17 +249,6 @@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
-PYTHON = @PYTHON@
-PYTHONDIR = @PYTHONDIR@
-PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
-PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
-PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@
-PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
-PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
-PYTHON_PLATFORM = @PYTHON_PLATFORM@
-PYTHON_PREFIX = @PYTHON_PREFIX@
-PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
-PYTHON_VERSION = @PYTHON_VERSION@
 RANLIB = @RANLIB@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
@@ -286,6 +286,8 @@ dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 folia_CFLAGS = @folia_CFLAGS@
 folia_LIBS = @folia_LIBS@
+frogdata_CFLAGS = @frogdata_CFLAGS@
+frogdata_LIBS = @frogdata_LIBS@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
@@ -306,13 +308,10 @@ mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
 pkgconfigpath = @pkgconfigpath@
-pkgpyexecdir = @pkgpyexecdir@
-pkgpythondir = @pkgpythondir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
-pyexecdir = @pyexecdir@
-pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -322,16 +321,15 @@ ticcutils_CFLAGS = @ticcutils_CFLAGS@
 ticcutils_LIBS = @ticcutils_LIBS@
 timbl_CFLAGS = @timbl_CFLAGS@
 timbl_LIBS = @timbl_LIBS@
-timblserver_CFLAGS = @timblserver_CFLAGS@
-timblserver_LIBS = @timblserver_LIBS@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 ucto_CFLAGS = @ucto_CFLAGS@
 ucto_LIBS = @ucto_LIBS@
-pkginclude_HEADERS = Frog.h  mblem_mod.h  mbma_mod.h  mwu_chunker_mod.h \
-	cgn_tagger_mod.h iob_tagger_mod.h Parser.h \
-	ucto_tokenizer_mod.h ner_tagger_mod.h
+pkginclude_HEADERS = FrogAPI.h Frog.h mblem_mod.h \
+	mbma_rule.h mbma_mod.h mbma_brackets.h clex.h mwu_chunker_mod.h \
+	pos_tagger_mod.h cgn_tagger_mod.h iob_tagger_mod.h Parser.h \
+	ucto_tokenizer_mod.h ner_tagger_mod.h csidp.h ckyparser.h
 
 all: all-am
 
@@ -348,7 +346,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/frog/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu include/frog/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -595,6 +592,8 @@ uninstall-am: uninstall-pkgincludeHEADERS
 	ps ps-am tags tags-am uninstall uninstall-am \
 	uninstall-pkgincludeHEADERS
 
+.PRECIOUS: Makefile
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/include/frog/Parser.h b/include/frog/Parser.h
index 3a6eae9..0129d8e 100644
--- a/include/frog/Parser.h
+++ b/include/frog/Parser.h
@@ -1,13 +1,13 @@
+/* ex: set tabstop=8 expandtab: */
 /*
-  $Id: Parser.h 16815 2014-01-06 10:00:29Z sloot $
-  $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/include/frog/Parser.h $
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
 
-  Copyright (c) 2006 - 2014
-  Tilburg University
+  This file is part of frog:
 
-  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for Dutch
-
-  This file is part of frog.
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
 
   frog is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -23,87 +23,47 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
   For questions and suggestions, see:
-      http://ilk.uvt.nl/software.html
+      https://github.com/LanguageMachines/frog/issues
   or send mail to:
-      timbl at uvt.nl
+      lamasoftware (at ) science.ru.nl
+
 */
 
 #ifndef PARSER_H
 #define PARSER_H
 
-class PyObjectRef {
- private:
-  PyObject* ref;
-
- public:
- PyObjectRef() : ref(0) {}
-
- PyObjectRef(PyObject* obj) : ref(obj) {}
-
-  void assign(PyObject* obj) {
-    // assume ref == 0, otherwhise call Py_DECREF
-    if ( ref ){
-      Py_XDECREF(ref);
-    }
-    ref = obj;
-  }
-
-  operator PyObject* () {
-    return ref;
-  }
-
-  ~PyObjectRef() {
-    //    Py_XDECREF(ref);
-  }
-};
-
-class PythonInterface {
- private:
-  PyObjectRef module;
-  PyObjectRef mainFunction;
-
- public:
-  PythonInterface();
-  ~PythonInterface();
-
-  void parse( const std::string& depFile,
-	      const std::string& modFile,
-	      const std::string& dirFile,
-	      const std::string& maxDist,
-	      const std::string& inputFile,
-	      const std::string& outputFile);
-};
-
 struct parseData;
 
 class Parser {
  public:
- Parser():pairs(0),dir(0),rels(0),PI(0),isInit(false),keepIntermediate(false){};
+  Parser(TiCC::LogStream* logstream):pairs(0),dir(0),rels(0),isInit(false) {
+    parseLog = new TiCC::LogStream(logstream, "parser-");
+  };
   ~Parser();
   bool init( const TiCC::Configuration& );
   void addDeclaration( folia::Document& doc ) const;
-  void Parse( const std::vector<folia::Word *>&,
-	      const std::string&, const std::string&, TimerBlock& );
-  void prepareParse( const std::vector<folia::Word *>&,
-		     const std::string&, parseData& );
-  void createParserFile( const parseData& );
+  void Parse( const std::vector<folia::Word *>&, TimerBlock& );
+  parseData prepareParse( const std::vector<folia::Word *>& );
+
+  std::vector<std::string> createParserInstances( const parseData& );
+  std::string getTagset() const { return dep_tagset; };
  private:
-  void createRelDir( const parseData& );
-  void createPairs( const parseData& );
+  std::vector<std::string> createPairInstances( const parseData& );
+  std::vector<std::string> createDirInstances( const parseData& );
+  std::vector<std::string> createRelInstances( const parseData& );
+
   Timbl::TimblAPI *pairs;
   Timbl::TimblAPI *dir;
   Timbl::TimblAPI *rels;
   std::string maxDepSpanS;
   size_t maxDepSpan;
-  PythonInterface *PI;
   bool isInit;
-  std::string fileName;
   TiCC::LogStream *parseLog;
-  bool keepIntermediate;
   std::string version;
-  std::string tagset;
-  std::string cgn_tagset;
-
+  std::string dep_tagset;
+  std::string POS_tagset;
+  std::string MWU_tagset;
+  Tokenizer::UnicodeFilter *filter;
 };
 
 
diff --git a/include/frog/cgn_tagger_mod.h b/include/frog/cgn_tagger_mod.h
index 31470a0..d9b669d 100644
--- a/include/frog/cgn_tagger_mod.h
+++ b/include/frog/cgn_tagger_mod.h
@@ -1,11 +1,13 @@
+/* ex: set tabstop=8 expandtab: */
 /*
-  $Id: cgn_tagger_mod.h 16815 2014-01-06 10:00:29Z sloot $
-  $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/include/frog/cgn_tagger_mod.h $
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
 
-  Copyright (c) 2006 - 2014
-  Tilburg University
+  This file is part of frog:
 
-  This file is part of frog.
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
 
   frog is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -14,40 +16,35 @@
 
   frog 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  
+  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/>.
-  
+
   For questions and suggestions, see:
-      http://ilk.uvt.nl/software.html
+      https://github.com/LanguageMachines/frog/issues
   or send mail to:
-      timbl at uvt.nl
+      lamasoftware (at ) science.ru.nl
+
 */
 
 #ifndef CGN_TAGGER_MOD_H
 #define CGN_TAGGER_MOD_H
 
-#include "mbt/MbtAPI.h"
+#include "frog/pos_tagger_mod.h"
 
-class CGNTagger {
+class CGNTagger: public POSTagger {
  public:
-  CGNTagger();
-  ~CGNTagger();
+ CGNTagger( TiCC::LogStream *l ): POSTagger( l ){};
   bool init( const TiCC::Configuration& );
-  void addDeclaration( folia::Document& ) const;
-  void addTag( folia::Word *, const std::string&, double );
   void Classify( const std::vector<folia::Word *>& );
-  std::vector<TagResult> tagLine( const std::string& );
-  std::string getTagset() const { return tagset; };
+  void post_process( const std::vector<folia::Word *>& words );
  private:
-  MbtAPI *tagger;  
-  LogStream *cgnLog;
-  int debug;
-  std::string tagset;
-  std::string version;
-  Tokenizer::UnicodeFilter *filter;
+  void fillSubSetTable();
+  std::string getSubSet( const std::string& , const std::string& );
+  std::multimap<std::string,std::string> cgnSubSets;
+  std::multimap<std::string,std::string> cgnConstraints;
 };
 
 #endif // CGN_TAGGER_MOD_H
diff --git a/include/frog/ckyparser.h b/include/frog/ckyparser.h
new file mode 100644
index 0000000..0f3720e
--- /dev/null
+++ b/include/frog/ckyparser.h
@@ -0,0 +1,132 @@
+#ifndef CKYPARSER_H
+#define CKYPARSER_H
+
+#include <set>
+
+enum dirType { ROOT, LEFT, RIGHT, ERROR };
+
+class Constraint {
+ public:
+  enum ConstraintType { Incoming, Dependency, Direction };
+ Constraint( double w, int i ): weight(w),tokenIndex(i){
+  };
+  virtual ~Constraint(){};
+  virtual void put( std::ostream& os ) const {
+    os << tokenIndex << " " << weight;
+  };
+  virtual ConstraintType type() const = 0;
+  virtual dirType direct() const { return ERROR; };
+  virtual std::string rel() const { return "NOREL"; };
+  virtual int hIndex() const { abort(); };
+  int tIndex() const { return tokenIndex; };
+  double wght() const { return weight; };
+ protected:
+  double weight;
+  int    tokenIndex;
+};
+
+std::ostream& operator<<( std::ostream& os, const Constraint& c );
+std::ostream& operator<<( std::ostream& os, const Constraint* c );
+
+class HasIncomingRel: public Constraint {
+ public:
+ HasIncomingRel( int i, const std::string& r, double w ):
+  Constraint( w, i ), relType(r){
+  };
+  void put( std::ostream& ) const;
+  ConstraintType type() const { return Incoming; }
+  std::string rel() const { return relType; };
+ private:
+  std::string relType;
+};
+
+class HasDependency: public Constraint {
+ public:
+ HasDependency( int i, int h, const std::string& r, double w ):
+  Constraint( w, i ), relType(r), headType(h) {
+    };
+  void put( std::ostream& ) const;
+  ConstraintType type() const { return Dependency; };
+  int hIndex() const { return headType; };
+  std::string rel() const { return relType; };
+ private:
+  std::string relType;
+  int headType;
+};
+
+class DependencyDirection: public Constraint {
+ public:
+ DependencyDirection( int i, const std::string& d, double w ):
+  Constraint( w, i ), direction(toEnum(d)){
+  }
+  void put( std::ostream& ) const;
+  ConstraintType type() const { return Direction; };
+  dirType direct() const { return direction; };
+ private:
+  dirType toEnum( const std::string& s ){
+    if ( s == "ROOT" )
+      return ROOT;
+    else if ( s == "LEFT" )
+      return LEFT;
+    else if ( s == "RIGHT" )
+      return RIGHT;
+    else {
+      abort();
+    }
+  }
+  dirType direction;
+};
+
+class SubTree {
+ public:
+ SubTree( double score, int r, const std::string& label ):
+  _score( score ), _r( r ), _edgeLabel( label ){
+  }
+ SubTree( ):
+  _score( 0.0 ), _r( -1 ), _edgeLabel( "" ){
+  }
+  std::set<const Constraint*>  satisfiedConstraints;
+  double score() const { return _score; };
+  int r() const { return _r; };
+  std::string edgeLabel() const { return _edgeLabel; };
+ private:
+  double _score;
+  int _r;
+  std::string _edgeLabel;
+};
+
+struct parsrel {
+  std::string deprel;
+  int head;
+};
+
+class chart_rec {
+ public:
+  SubTree l_True;
+  SubTree l_False;
+  SubTree r_True;
+  SubTree r_False;
+};
+
+class CKYParser {
+public:
+  CKYParser( size_t, const std::vector<const Constraint*>& );
+  void parse();
+  void leftIncomplete( int , int , std::vector<parsrel>& );
+  void rightIncomplete( int , int , std::vector<parsrel>& );
+  void leftComplete( int , int , std::vector<parsrel>& );
+  void rightComplete( int , int , std::vector<parsrel>& );
+
+private:
+  void addConstraint( const Constraint * );
+  std::string bestEdge( const SubTree& , const SubTree& , size_t , size_t,
+			std::set<const Constraint*>&, double& );
+  size_t numTokens;
+  std::vector< std::vector<const Constraint*>> inDepConstraints;
+  std::vector< std::vector<const Constraint*>> outDepConstraints;
+  std::vector< std::vector< std::vector<const Constraint*>>> edgeConstraints;
+  std::vector< std::vector<chart_rec>> chart;
+
+};
+
+#endif
diff --git a/include/frog/clex.h b/include/frog/clex.h
new file mode 100644
index 0000000..3d3e1ef
--- /dev/null
+++ b/include/frog/clex.h
@@ -0,0 +1,51 @@
+/* ex: set tabstop=8 expandtab: */
+/*
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
+
+  This file is part of frog:
+
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
+
+  frog 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.
+
+  frog 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/>.
+
+  For questions and suggestions, see:
+      https://github.com/LanguageMachines/frog/issues
+  or send mail to:
+      lamasoftware (at ) science.ru.nl
+
+*/
+
+#ifndef CLEX_H
+#define CLEX_H
+
+namespace CLEX {
+  enum Type { UNASS, N, A, Q, V, D, O, B, P, C, I, X, Z, PN, AFFIX, XAFFIX,
+	      NEUTRAL };
+  bool isBasicClass( const Type& );
+  Type select_tag( const char ch );
+  std::string toString( const Type& );
+  Type toCLEX( const std::string& );
+  Type toCLEX( const char );
+  extern std::map<CLEX::Type,std::string> tagNames;
+  extern std::map<char,std::string> iNames;
+  inline std::string get_iDescr( char c ) { return iNames[c]; }
+  inline std::string get_tDescr( CLEX::Type t ) {  return tagNames[t]; }
+}
+
+std::ostream& operator<<( std::ostream&, const CLEX::Type& );
+
+#endif // CLEX_H
diff --git a/include/frog/csidp.h b/include/frog/csidp.h
new file mode 100644
index 0000000..2ec5efd
--- /dev/null
+++ b/include/frog/csidp.h
@@ -0,0 +1,27 @@
+#ifndef CSIDP_H
+#define CSIDP_H
+#include "timbl/TimblAPI.h"
+#include "frog/ckyparser.h"
+
+class timbl_result {
+ public:
+  timbl_result( const std::string& cls,
+		double conf,
+		const Timbl::ValueDistribution* );
+  std::string cls() const { return _cls; };
+  double confidence() const { return _confidence; };
+  std::vector< std::pair<std::string,double> > dist() const { return _dist; };
+private:
+  std::string _cls;
+  double _confidence;
+  std::vector< std::pair<std::string,double> > _dist;
+};
+
+
+std::vector<parsrel> parse( const std::vector<timbl_result>&,
+			    const std::vector<timbl_result>&,
+			    const std::vector<timbl_result>&,
+			    size_t,
+			    int );
+
+#endif
diff --git a/include/frog/iob_tagger_mod.h b/include/frog/iob_tagger_mod.h
index edf16ec..47cf2e4 100644
--- a/include/frog/iob_tagger_mod.h
+++ b/include/frog/iob_tagger_mod.h
@@ -1,11 +1,13 @@
+/* ex: set tabstop=8 expandtab: */
 /*
-  $Id: iob_tagger_mod.h 16815 2014-01-06 10:00:29Z sloot $
-  $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/include/frog/iob_tagger_mod.h $
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
 
-  Copyright (c) 2006 - 2014
-  Tilburg University
+  This file is part of frog:
 
-  This file is part of frog.
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
 
   frog is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -14,16 +16,17 @@
 
   frog 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  
+  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/>.
-  
+
   For questions and suggestions, see:
-      http://ilk.uvt.nl/software.html
+      https://github.com/LanguageMachines/frog/issues
   or send mail to:
-      timbl at uvt.nl
+      lamasoftware (at ) science.ru.nl
+
 */
 
 #ifndef IOB_TAGGER_MOD_H
@@ -31,14 +34,15 @@
 
 class IOBTagger {
  public:
-  IOBTagger();
+  IOBTagger(TiCC::LogStream *);
   ~IOBTagger();
   bool init( const TiCC::Configuration& );
   void addDeclaration( folia::Document& ) const;
   void Classify( const std::vector<folia::Word *>& );
   std::string getTagset() const { return tagset; };
+  std::string set_eos_mark( const std::string& );
  private:
-  void addChunk( folia::ChunkingLayer *, 
+  void addChunk( folia::ChunkingLayer *,
 		 const std::vector<folia::Word*>&,
 		 const std::vector<double>&,
 		 const std::string& );
@@ -46,10 +50,11 @@ class IOBTagger {
 		   const std::vector<std::string>&,
 		   const std::vector<double>& );
   MbtAPI *tagger;
-  LogStream *iobLog;
+  TiCC::LogStream *iobLog;
   int debug;
   std::string version;
   std::string tagset;
+  Tokenizer::UnicodeFilter *filter;
 };
 
 #endif // IOB_TAGGER_MOD_H
diff --git a/include/frog/mblem_mod.h b/include/frog/mblem_mod.h
old mode 100755
new mode 100644
index 899ba32..c36532f
--- a/include/frog/mblem_mod.h
+++ b/include/frog/mblem_mod.h
@@ -1,11 +1,13 @@
+/* ex: set tabstop=8 expandtab: */
 /*
-  $Id: mblem_mod.h 16815 2014-01-06 10:00:29Z sloot $
-  $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/include/frog/mblem_mod.h $
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
 
-  Copyright (c) 2006 - 2014
-  Tilburg University
+  This file is part of frog:
 
-  This file is part of frog.
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
 
   frog is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -14,20 +16,21 @@
 
   frog 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  
+  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/>.
-  
+
   For questions and suggestions, see:
-      http://ilk.uvt.nl/software.html
+      https://github.com/LanguageMachines/frog/issues
   or send mail to:
-      timbl at uvt.nl
+      lamasoftware (at ) science.ru.nl
+
 */
 
-#ifndef __MBLEM_MOD__
-#define __MBLEM_MOD__
+#ifndef MBLEM_MOD_H
+#define MBLEM_MOD_H
 
 class mblemData {
  public:
@@ -44,7 +47,7 @@ class mblemData {
 
 class Mblem {
  public:
-  Mblem();
+  Mblem(TiCC::LogStream *);
   ~Mblem();
   bool init( const TiCC::Configuration& );
   void addDeclaration( folia::Document& doc ) const;
@@ -53,23 +56,28 @@ class Mblem {
   std::vector<std::pair<std::string,std::string> > getResult() const;
   void filterTag( const std::string&  );
   void makeUnique();
+  std::string getTagset() const { return tagset; };
+  bool fill_ts_map( const std::string& );
+  bool fill_eq_set( const std::string& );
  private:
   void read_transtable( const std::string& );
   void create_MBlem_defaults();
   bool readsettings( const std::string& dir, const std::string& fname );
-  void addLemma( folia::FoliaElement *, const std::string&);
-  void addAltLemma( folia::Word *, const std::string&);
+  void addLemma( folia::Word *, const std::string&) ;
   std::string make_instance( const UnicodeString& in );
   void getFoLiAResult( folia::Word *, const UnicodeString& );
   Timbl::TimblAPI *myLex;
   std::string punctuation;
   size_t history;
   int debug;
-  std::map <std::string,std::string> classMap;
+  bool keep_case;
+  std::map<std::string,std::string> classMap;
+  std::map<std::string, std::map<std::string, int>> token_strip_map;
+  std::set<std::string> one_one_tags;
   std::vector<mblemData> mblemResult;
   std::string version;
   std::string tagset;
-  std::string cgn_tagset;
+  std::string POS_tagset;
   TiCC::LogStream *mblemLog;
   Tokenizer::UnicodeFilter *filter;
 };
diff --git a/include/frog/mbma_brackets.h b/include/frog/mbma_brackets.h
new file mode 100644
index 0000000..1ee42e8
--- /dev/null
+++ b/include/frog/mbma_brackets.h
@@ -0,0 +1,149 @@
+/* ex: set tabstop=8 expandtab: */
+/*
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
+
+  This file is part of frog:
+
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
+
+  frog 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.
+
+  frog 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/>.
+
+  For questions and suggestions, see:
+      https://github.com/LanguageMachines/frog/issues
+  or send mail to:
+      lamasoftware (at ) science.ru.nl
+
+*/
+
+#ifndef MBMA_BRACKETS_H
+#define MBMA_BRACKETS_H
+
+enum Status { INFO, PARTICLE, PARTICIPLE, STEM, COMPLEX, INFLECTION,
+	      DERIVATIONAL, FAILED };
+
+namespace Compound {
+  enum Type : int {
+    // NB and PB compounds don't exist
+    NONE,
+      NN, NA, NB, NP, NV,
+      AN, AA, AB, AP, AV,
+      BN, BA, BB, BP, BV,
+      PN, PA, PB, PP, PV,
+      VN, VA, VB, VP, VV };
+}
+
+namespace folia {
+  class Document;
+  class Morpheme;
+}
+
+class RulePart;
+
+class BaseBracket {
+public:
+ BaseBracket( CLEX::Type t, const std::vector<CLEX::Type>& R, int flag ):
+  RightHand(R),
+    cls(t),
+    debugFlag(flag)
+
+   {};
+ BaseBracket( CLEX::Type t, int flag ):
+  cls(t), debugFlag(flag)
+  {};
+  virtual ~BaseBracket() {};
+
+  Status status() const { return _status; };
+  void set_status( const Status s ) { _status = s; };
+  virtual UnicodeString morpheme() const { return "";};
+  virtual std::string inflection() const { return ""; };
+  virtual std::string original() const { return ""; };
+  virtual int infixpos() const { return -1; };
+  virtual UnicodeString put( bool = true ) const;
+  virtual BaseBracket *append( BaseBracket * ){ abort(); };
+  virtual bool isNested() { return false; };
+  virtual void resolveLead(){ abort(); };
+  virtual void resolveTail(){ abort(); };
+  virtual void resolveMiddle(){ abort(); };
+  virtual void clearEmptyNodes() { abort(); };
+  virtual folia::Morpheme *createMorpheme( folia::Document *  ) const = 0;
+  virtual folia::Morpheme *createMorpheme( folia::Document *,
+					   std::string&, int& ) const = 0;
+  virtual Compound::Type compound() const { return Compound::Type::NONE; };
+  virtual Compound::Type getCompoundType() { return compound(); };
+  CLEX::Type tag() const { return cls; };
+  void setTag( CLEX::Type t ) { cls = t; };
+  std::vector<CLEX::Type> RightHand;
+ protected:
+  CLEX::Type cls;
+  Status _status;
+  int debugFlag;
+};
+
+class BracketLeaf: public BaseBracket {
+public:
+  BracketLeaf( const RulePart&, int );
+  BracketLeaf( CLEX::Type, const UnicodeString&, int );
+  UnicodeString put( bool = true ) const;
+  UnicodeString morpheme() const { return morph; };
+  std::string inflection() const { return inflect; };
+  std::string original() const { return orig; };
+  int infixpos() const { return ifpos; };
+  folia::Morpheme *createMorpheme( folia::Document * ) const;
+  folia::Morpheme *createMorpheme( folia::Document *,
+				   std::string&, int& ) const;
+private:
+  int ifpos;
+  UnicodeString morph;
+  std::string orig;
+  std::string inflect;
+};
+
+class BracketNest: public BaseBracket {
+ public:
+  BracketNest( CLEX::Type, Compound::Type, int );
+  BaseBracket *append( BaseBracket * );
+  ~BracketNest();
+  bool isNested() { return true; };
+  void clearEmptyNodes();
+  UnicodeString put( bool = true ) const;
+  bool testMatch( std::list<BaseBracket*>& result,
+		  const std::list<BaseBracket*>::iterator& rpos,
+		  std::list<BaseBracket*>::iterator& bpos );
+  std::list<BaseBracket*>::iterator resolveAffix( std::list<BaseBracket*>&,
+						  const std::list<BaseBracket*>::iterator& );
+  void resolveNouns();
+  void resolveLead();
+  void resolveTail();
+  void resolveMiddle();
+  Compound::Type getCompoundType();
+  CLEX::Type getFinalTag();
+  folia::Morpheme *createMorpheme( folia::Document * ) const;
+  folia::Morpheme *createMorpheme( folia::Document *,
+				   std::string&, int& ) const;
+  std::list<BaseBracket *> parts;
+  Compound::Type compound() const { return _compound; };
+ private:
+  Compound::Type _compound;
+};
+
+std::string toString( const Compound::Type& );
+std::ostream& operator<<( std::ostream&, const Status& );
+std::ostream& operator<<( std::ostream&, const Compound::Type& );
+std::ostream& operator<<( std::ostream&, const BaseBracket& );
+std::ostream& operator<<( std::ostream&, const BaseBracket * );
+
+#endif // MBMA_BRACKETS_H
diff --git a/include/frog/mbma_mod.h b/include/frog/mbma_mod.h
old mode 100755
new mode 100644
index 2d78bdf..a4c2361
--- a/include/frog/mbma_mod.h
+++ b/include/frog/mbma_mod.h
@@ -1,11 +1,13 @@
+/* ex: set tabstop=8 expandtab: */
 /*
-  $Id: mbma_mod.h 17440 2014-07-10 12:11:27Z sloot $
-  $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/include/frog/mbma_mod.h $
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
 
-  Copyright (c) 2006 - 2014
-  Tilburg University
+  This file is part of frog:
 
-  This file is part of frog.
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
 
   frog is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -21,238 +23,89 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
   For questions and suggestions, see:
-      http://ilk.uvt.nl/software.html
+      https://github.com/LanguageMachines/frog/issues
   or send mail to:
-      timbl at uvt.nl
+      lamasoftware (at ) science.ru.nl
+
 */
 
 #ifndef MBMA_MOD_H
 #define MBMA_MOD_H
 
 #include <unicode/translit.h>
+#include "ticcutils/LogStream.h"
+#include "frog/clex.h"
+#include "frog/mbma_rule.h"
+#include "frog/mbma_brackets.h"
 
 class MBMAana;
-class RulePart;
-
-namespace CLEX {
-  enum Type { UNASS, N, A, Q, V, D, O, B, P, Y, I, X, Z, PN, AFFIX, XAFFIX,
-	      NEUTRAL };
-  std::string toString( const Type& t );
+namespace Timbl{
+  class TimblAPI;
 }
 
-enum Status { INFO, STEM, COMPLEX, INFLECTION, DERIVATIONAL };
-
-class BaseBracket {
-public:
- BaseBracket( CLEX::Type t, const std::vector<CLEX::Type>& R, int flag ):
-  RightHand(R),
-    cls(t),
-    debugFlag(flag)
-
-   {};
- BaseBracket( CLEX::Type t, int flag ):
-  cls(t), debugFlag(flag)
-  {};
-  virtual ~BaseBracket() {};
-
-  Status stat() const { return status; };
-  virtual UnicodeString morpheme() const { return "";};
-  virtual UnicodeString deepmorphemes() const { return "";};
-  virtual std::string inflection() const { return ""; };
-  virtual std::string original() const { return ""; };
-  virtual int infixpos() const { return -1; };
-  virtual UnicodeString put( bool = false ) const;
-  virtual BaseBracket *append( BaseBracket * ){ abort(); };
-  virtual bool isNested() { return false; };
-  virtual void resolveLead(){ abort(); };
-  virtual void resolveTail(){ abort(); };
-  virtual void resolveMiddle(){ abort(); };
-  virtual folia::Morpheme *createMorpheme( folia::Document *,
-					   const std::string& ) const = 0;
-  virtual folia::Morpheme *createMorpheme( folia::Document *,
-					   const std::string&,
-					   int&,
-					   std::string& ) const = 0;
-  CLEX::Type tag() const { return cls; };
-  void setTag( CLEX::Type t ) { cls = t; };
-  std::vector<CLEX::Type> RightHand;
- protected:
-  CLEX::Type cls;
-  Status status;
-  int debugFlag;
-};
-
-class BracketLeaf: public BaseBracket {
-public:
-  BracketLeaf( const RulePart&, int );
-  BracketLeaf( CLEX::Type, const UnicodeString&, int );
-  UnicodeString put( bool = false ) const;
-  UnicodeString morpheme() const { return morph; };
-  UnicodeString deepmorphemes() const { return morph; };
-  std::string inflection() const { return inflect; };
-  std::string original() const { return orig; };
-  int infixpos() const { return ifpos; };
-  folia::Morpheme *createMorpheme( folia::Document *,
-				   const std::string& ) const;
-  folia::Morpheme *createMorpheme( folia::Document *,
-				   const std::string&,
-				   int&,
-				   std::string& ) const;
-private:
-  int ifpos;
-  UnicodeString morph;
-  std::string orig;
-  std::string inflect;
-};
-
-class BracketNest: public BaseBracket {
- public:
- BracketNest( CLEX::Type t, int flag ): BaseBracket( t, flag ){
-    status = COMPLEX; };
-  BaseBracket *append( BaseBracket *t ){
-    parts.push_back( t );
-    return this;
-  };
-  ~BracketNest();
-  bool isNested() { return true; };
-  UnicodeString put( bool = false ) const;
-  bool testMatch( std::list<BaseBracket*>& result,
-		  const std::list<BaseBracket*>::iterator& rpos,
-		  std::list<BaseBracket*>::iterator& bpos );
-  std::list<BaseBracket*>::iterator resolveAffix( std::list<BaseBracket*>&,
-						  const std::list<BaseBracket*>::iterator& );
-  void resolveNouns();
-  void resolveLead();
-  void resolveTail();
-  void resolveMiddle();
-  UnicodeString deepmorphemes() const;
-  CLEX::Type getFinalTag();
-  folia::Morpheme *createMorpheme( folia::Document *,
-				   const std::string& ) const;
-  folia::Morpheme *createMorpheme( folia::Document *,
-				   const std::string&,
-				   int&,
-				   std::string& ) const;
-  std::list<BaseBracket *> parts;
-};
-
-
-class RulePart {
-public:
-  RulePart( const std::string&, const UChar );
-  bool isBasic() const;
-  void get_ins_del( const std::string& );
-  CLEX::Type ResultClass;
-  std::vector<CLEX::Type> RightHand;
-  UnicodeString ins;
-  UnicodeString del;
-  UnicodeString uchar;
-  UnicodeString morpheme;
-  std::string inflect;
-  int fixpos;
-  int xfixpos;
-  bool participle;
-};
-
+namespace Tokenizer {
+  class UnicodeFilter;
+}
 
-class Rule {
-public:
-  Rule( const std::vector<std::string>&, const UnicodeString&, int flag );
-  std::vector<std::string> extract_morphemes() const;
-  std::string getCleanInflect() const;
-  void reduceZeroNodes();
-  BracketNest *resolveBrackets( bool, CLEX::Type& );
-  std::vector<RulePart> rules;
-  int debugFlag;
-};
+namespace TiCC {
+  class Configuration;
+}
 
-static std::map<CLEX::Type,std::string> tagNames;
-static std::map<char,std::string> iNames;
+namespace folia {
+  class Word;
+  class Document;
+  class MorphologyLayer;
+  class Morpheme;
+}
 
 class Mbma {
  public:
-  Mbma();
+  Mbma(TiCC::LogStream *);
   ~Mbma();
   bool init( const TiCC::Configuration& );
   void addDeclaration( folia::Document& doc ) const;
   void Classify( folia::Word * );
   void Classify( const UnicodeString& );
-  void filterTag( const std::string&, const std::vector<std::string>& );
-  std::vector<std::vector<std::string> > getResult() const;
-  void setDaring( bool b ){ doDaring = b; };
+  void filterHeadTag( const std::string& );
+  void filterSubTags( const std::vector<std::string>& );
+  std::vector<std::string> getResult() const;
+  void setDeepMorph( bool b ){ doDeepMorph = b; };
   void clearAnalysis();
+  Rule* matchRule( const std::vector<std::string>&, const UnicodeString& );
+  std::vector<Rule*> execute( const UnicodeString& ,
+			      const std::vector<std::string>& );
+  static std::map<std::string,std::string> TAGconv;
+  static std::string mbma_tagset;
+  static std::string cgn_tagset;
+  static std::string clex_tagset;
  private:
   void cleanUp();
   bool readsettings( const std::string&, const std::string& );
   void fillMaps();
-  void init_cgn( const std::string& );
+  void init_cgn( const std::string&, const std::string& );
   Transliterator * init_trans();
   UnicodeString filterDiacritics( const UnicodeString& ) const;
   void getFoLiAResult( folia::Word *, const UnicodeString& ) const;
   std::vector<std::string> make_instances( const UnicodeString& word );
-  bool performEdits( Rule& );
-  void resolve_inflections( Rule& );
   CLEX::Type getFinalTag( const std::list<BaseBracket*>& );
-  void execute( const UnicodeString& word,
-		const std::vector<std::string>& classes );
   int debugFlag;
   void addMorph( folia::MorphologyLayer *,
 		 const std::vector<std::string>& ) const;
   void addMorph( folia::Word *, const std::vector<std::string>& ) const;
-  void addAltMorph( folia::Word *, const std::vector<std::string>& ) const;
   void addBracketMorph( folia::Word *,
 			const std::string&,
 			const std::string& ) const;
-  void addBracketMorph( folia::Word *, const BracketNest * ) const;
-  void addAltBracketMorph( folia::Word *, const BracketNest * ) const;
+  void addBracketMorph( folia::Word *,
+			const std::string&,
+			const BracketNest * ) const;
   std::string MTreeFilename;
   Timbl::TimblAPI *MTree;
-  std::map<std::string,std::string> TAGconv;
-  std::vector<MBMAana*> analysis;
+  std::vector<Rule*> analysis;
   std::string version;
-  std::string tagset;
-  std::string cgn_tagset;
-  std::string clex_tagset;
   TiCC::LogStream *mbmaLog;
   Transliterator *transliterator;
   Tokenizer::UnicodeFilter *filter;
-  bool doDaring;
-};
-
-class MBMAana {
-  friend std::ostream& operator<< ( std::ostream& , const MBMAana& );
-  friend std::ostream& operator<< ( std::ostream& , const MBMAana* );
-  public:
-  MBMAana(const Rule&, bool );
-
-  ~MBMAana() { delete brackets; };
-
-  std::string getTag() const {
-    return tag;
-  };
-
-  const Rule& getRule() const {
-    return rule;
-  };
-
-  const BracketNest *getBrackets() const {
-    return brackets;
-  };
-
-  std::string getInflection() const {
-    return infl;
-  };
-
-  const std::vector<std::string> getMorph() const {
-    return rule.extract_morphemes();
-  };
-
- private:
-  std::string tag;
-  std::string infl;
-  std::string description;
-  Rule rule;
-  BracketNest *brackets;
+  bool doDeepMorph;
 };
 
 #endif
diff --git a/include/frog/mbma_rule.h b/include/frog/mbma_rule.h
new file mode 100644
index 0000000..880d1ac
--- /dev/null
+++ b/include/frog/mbma_rule.h
@@ -0,0 +1,92 @@
+/* ex: set tabstop=8 expandtab: */
+/*
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
+
+  This file is part of frog:
+
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
+
+  frog 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.
+
+  frog 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/>.
+
+  For questions and suggestions, see:
+      https://github.com/LanguageMachines/frog/issues
+  or send mail to:
+      lamasoftware (at ) science.ru.nl
+
+*/
+
+#ifndef MBMA_RULE_H
+#define MBMA_RULE_H
+
+namespace Compound {
+  enum Type : int;
+}
+
+class RulePart {
+public:
+  RulePart( const std::string&, const UChar, bool );
+  bool isBasic() const;
+  void get_ins_del( const std::string& );
+  CLEX::Type ResultClass;
+  std::vector<CLEX::Type> RightHand;
+  UnicodeString ins;
+  UnicodeString del;
+  UnicodeString uchar;
+  UnicodeString morpheme;
+  std::string inflect;
+  int fixpos;
+  int xfixpos;
+  bool participle;
+};
+
+std::ostream& operator<<( std::ostream& os, const RulePart&  );
+std::ostream& operator<<( std::ostream& os, const RulePart * );
+
+class BracketNest;
+
+class Rule {
+public:
+  Rule( const std::vector<std::string>&,
+	const UnicodeString&,
+	TiCC::LogStream *,
+	int );
+  ~Rule();
+  std::vector<std::string> extract_morphemes() const;
+  std::string morpheme_string( bool = false ) const;
+  UnicodeString getKey( bool );
+  bool performEdits();
+  void getCleanInflect();
+  void reduceZeroNodes();
+  void resolveBrackets( bool );
+  void resolve_inflections();
+  std::vector<RulePart> rules;
+  int debugFlag;
+  CLEX::Type tag;
+  UnicodeString sortkey;
+  UnicodeString orig_word;
+  std::string description;
+  std::string inflection;
+  Compound::Type compound;
+  BracketNest *brackets;
+  TiCC::LogStream *myLog;
+  double confidence;
+};
+
+std::ostream& operator<<( std::ostream& os, const Rule& );
+std::ostream& operator<<( std::ostream& os, const Rule * );
+
+#endif // MBMA_RULE_H
diff --git a/include/frog/mwu_chunker_mod.h b/include/frog/mwu_chunker_mod.h
old mode 100755
new mode 100644
index 1dd506d..0b75182
--- a/include/frog/mwu_chunker_mod.h
+++ b/include/frog/mwu_chunker_mod.h
@@ -1,29 +1,32 @@
+/* ex: set tabstop=8 expandtab: */
 /*
-  $Id: mwu_chunker_mod.h 16815 2014-01-06 10:00:29Z sloot $
-  $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/include/frog/mwu_chunker_mod.h $
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
 
-  Copyright (c) 2006 - 2014
-  Tilburg University
-  
-  This file is part of frog.
+  This file is part of frog:
+
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
 
   frog 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  
+  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.
 
   frog 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.  
+  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/>.  
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
   For questions and suggestions, see:
-      http://ilk.uvt.nl/software.html
+      https://github.com/LanguageMachines/frog/issues
   or send mail to:
-      timbl at uvt.nl
+      lamasoftware (at ) science.ru.nl
+
 */
 
 #ifndef MWU_CHUNKER_H
@@ -32,9 +35,9 @@
 class mwuAna {
   friend std::ostream& operator<< (std::ostream&, const mwuAna& );
  public:
-  mwuAna( folia::Word * );
+  mwuAna( folia::Word *, const std::string&, const std::string& );
   virtual ~mwuAna() {};
-  
+
   void merge( const mwuAna * );
 
   std::string getWord() const {
@@ -45,7 +48,7 @@ class mwuAna {
   folia::EntitiesLayer *addEntity( const std::string&,
 				   folia::Sentence *,
 				   folia::EntitiesLayer * );
-  
+
  protected:
     mwuAna(){};
     std::string word;
@@ -58,14 +61,14 @@ class mwuAna {
 class Mwu {
   friend std::ostream& operator<< (std::ostream&, const Mwu& );
  public:
-  Mwu();
+  Mwu(TiCC::LogStream*);
   ~Mwu();
   void reset();
   bool init( const TiCC::Configuration& );
   void addDeclaration( folia::Document& ) const;
   void Classify( const std::vector<folia::Word *>& );
   void add( folia::Word * );
-  std::string getTagset() const { return tagset; };
+  std::string getTagset() const { return mwu_tagset; };
   std::vector<mwuAna*>& getAna(){ return mWords; };
  private:
   bool readsettings( const std::string&, const std::string&);
@@ -77,7 +80,9 @@ class Mwu {
   mymap2 MWUs;
   TiCC::LogStream *mwuLog;
   std::string version;
-  std::string tagset;
+  std::string mwu_tagset;
+  std::string glue_tag;
+  Tokenizer::UnicodeFilter *filter;
 };
 
 #endif
diff --git a/include/frog/ner_tagger_mod.h b/include/frog/ner_tagger_mod.h
index af053e3..52810dd 100644
--- a/include/frog/ner_tagger_mod.h
+++ b/include/frog/ner_tagger_mod.h
@@ -1,11 +1,13 @@
+/* ex: set tabstop=8 expandtab: */
 /*
-  $Id: ner_tagger_mod.h 16815 2014-01-06 10:00:29Z sloot $
-  $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/include/frog/ner_tagger_mod.h $
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
 
-  Copyright (c) 2006 - 2014
-  Tilburg University
+  This file is part of frog:
 
-  This file is part of frog.
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
 
   frog is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -14,16 +16,17 @@
 
   frog 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  
+  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/>.
-  
+
   For questions and suggestions, see:
-      http://ilk.uvt.nl/software.html
+      https://github.com/LanguageMachines/frog/issues
   or send mail to:
-      timbl at uvt.nl
+      lamasoftware (at ) science.ru.nl
+
 */
 
 #ifndef NER_TAGGER_MOD_H
@@ -31,7 +34,7 @@
 
 class NERTagger {
  public:
-  NERTagger();
+  NERTagger(TiCC::LogStream *);
   ~NERTagger();
   bool init( const TiCC::Configuration& );
   void Classify( const std::vector<folia::Word *>& );
@@ -40,12 +43,22 @@ class NERTagger {
 		   const std::vector<std::string>&,
 		   const std::vector<double>& );
   std::string getTagset() const { return tagset; };
+  std::vector<Tagger::TagResult> tagLine( const std::string& );
+  bool fill_known_ners( const std::string& );
+  void handle_known_ners( const std::vector<std::string>&,
+			  std::vector<std::string>& );
+  void merge( const std::vector<std::string>&,
+	      std::vector<std::string>& tags,
+	      std::vector<double>& );
+  std::string set_eos_mark( const std::string& );
  private:
   MbtAPI *tagger;
-  LogStream *nerLog;
+  TiCC::LogStream *nerLog;
   int debug;
   std::string version;
   std::string tagset;
+  std::vector<std::map<std::string,std::string>> known_ners;
+  Tokenizer::UnicodeFilter *filter;
 };
 
 #endif // NER_TAGGER_MOD_H
diff --git a/include/frog/pos_tagger_mod.h b/include/frog/pos_tagger_mod.h
new file mode 100644
index 0000000..d1f0281
--- /dev/null
+++ b/include/frog/pos_tagger_mod.h
@@ -0,0 +1,61 @@
+/* ex: set tabstop=8 expandtab: */
+/*
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
+
+  This file is part of frog:
+
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
+
+  frog 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.
+
+  frog 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/>.
+
+  For questions and suggestions, see:
+      https://github.com/LanguageMachines/frog/issues
+  or send mail to:
+      lamasoftware (at ) science.ru.nl
+
+*/
+
+#ifndef POS_TAGGER_MOD_H
+#define POS_TAGGER_MOD_H
+
+#include "mbt/MbtAPI.h"
+
+class POSTagger {
+ public:
+  POSTagger(TiCC::LogStream*);
+  virtual ~POSTagger();
+  virtual bool init( const TiCC::Configuration& );
+  virtual void Classify( const std::vector<folia::Word *>& );
+  void addDeclaration( folia::Document& ) const;
+  void addTag( folia::Word *, const std::string&, double );
+  std::vector<Tagger::TagResult> tagLine( const std::string& );
+  std::string getTagset() const { return tagset; };
+  bool fill_map( const std::string&, std::map<std::string,std::string>& );
+  std::string set_eos_mark( const std::string& );
+ protected:
+  int debug;
+  std::string tagset;
+  TiCC::LogStream *tag_log;
+ private:
+  MbtAPI *tagger;
+  std::string version;
+  Tokenizer::UnicodeFilter *filter;
+  std::map<std::string,std::string> token_tag_map;
+  std::set<std::string> valid_tags;
+};
+
+#endif // POS_TAGGER_MOD_H
diff --git a/include/frog/ucto_tokenizer_mod.h b/include/frog/ucto_tokenizer_mod.h
index c5a73c8..ebe7ff6 100644
--- a/include/frog/ucto_tokenizer_mod.h
+++ b/include/frog/ucto_tokenizer_mod.h
@@ -1,31 +1,30 @@
 /*
-  $Id: ucto_tokenizer_mod.h 16815 2014-01-06 10:00:29Z sloot $
-  $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/include/frog/ucto_tokenizer_mod.h $
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
 
-  Copyright (c) 2006 - 2014
-  Tilburg University
-  
   This file is part of frog.
 
   frog 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.  
-                  
+  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.
+
   frog 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/>.  
+  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/>.
 
   For questions and suggestions, see:
-      http://ilk.uvt.nl/software.html
+      https://github.com/LanguageMachines/timblserver/issues
   or send mail to:
-      timbl at uvt.nl
+      lamasoftware (at ) science.ru.nl
+
 */
-                                    
+
 #ifndef UCTO_TOKENIZER_MOD_H
 #define UCTO_TOKENIZER_MOD_H
 
@@ -33,21 +32,26 @@
 
 class UctoTokenizer {
  public:
-  UctoTokenizer();
-  ~UctoTokenizer() { delete tokenizer; delete uctoLog; };
-  bool init( const TiCC::Configuration&, const std::string&, bool );
+  UctoTokenizer(TiCC::LogStream *);
+  ~UctoTokenizer() { delete tokenizer; };
+  bool init( const TiCC::Configuration& );
   void setUttMarker( const std::string& );
+  void setPassThru( bool );
+  bool getPassThru() const;
   void setSentencePerLineInput( bool );
   void setInputEncoding( const std::string& );
   void setQuoteDetection( bool );
   void setInputXml( bool );
   void setTextClass( const std::string& );
-  folia::Document tokenize( std::istream& );
+  void setDocID( const std::string& );
+  folia::Document *tokenizestring( const std::string& );
+  folia::Document *tokenize( std::istream& );
   bool tokenize( folia::Document& );
   std::vector<std::string> tokenize( const std::string&  );
+  std::string tokenizeStream( std::istream& );
  private:
   Tokenizer::TokenizerClass *tokenizer;
   TiCC::LogStream *uctoLog;
 };
 
-#endif 
+#endif
diff --git a/install-sh b/install-sh
index 377bb86..59990a1 100755
--- a/install-sh
+++ b/install-sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2011-11-20.07; # UTC
+scriptversion=2014-09-12.12; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC
 # This script is compatible with the BSD install script, but was written
 # from scratch.
 
+tab='	'
 nl='
 '
-IFS=" ""	$nl"
+IFS=" $tab$nl"
 
-# set DOITPROG to echo to test this script
+# Set DOITPROG to "echo" to test this script.
 
-# Don't use :- since 4.3BSD and earlier shells don't like it.
 doit=${DOITPROG-}
-if test -z "$doit"; then
-  doit_exec=exec
-else
-  doit_exec=$doit
-fi
+doit_exec=${doit:-exec}
 
 # Put in absolute file names if you don't have them in your path;
 # or use environment vars.
@@ -68,17 +64,6 @@ mvprog=${MVPROG-mv}
 rmprog=${RMPROG-rm}
 stripprog=${STRIPPROG-strip}
 
-posix_glob='?'
-initialize_posix_glob='
-  test "$posix_glob" != "?" || {
-    if (set -f) 2>/dev/null; then
-      posix_glob=
-    else
-      posix_glob=:
-    fi
-  }
-'
-
 posix_mkdir=
 
 # Desired mode of installed file.
@@ -97,7 +82,7 @@ dir_arg=
 dst_arg=
 
 copy_on_change=false
-no_target_directory=
+is_target_a_directory=possibly
 
 usage="\
 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@@ -137,46 +122,57 @@ while test $# -ne 0; do
     -d) dir_arg=true;;
 
     -g) chgrpcmd="$chgrpprog $2"
-	shift;;
+        shift;;
 
     --help) echo "$usage"; exit $?;;
 
     -m) mode=$2
-	case $mode in
-	  *' '* | *'	'* | *'
-'*	  | *'*'* | *'?'* | *'['*)
-	    echo "$0: invalid mode: $mode" >&2
-	    exit 1;;
-	esac
-	shift;;
+        case $mode in
+          *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+            echo "$0: invalid mode: $mode" >&2
+            exit 1;;
+        esac
+        shift;;
 
     -o) chowncmd="$chownprog $2"
-	shift;;
+        shift;;
 
     -s) stripcmd=$stripprog;;
 
-    -t) dst_arg=$2
-	# Protect names problematic for 'test' and other utilities.
-	case $dst_arg in
-	  -* | [=\(\)!]) dst_arg=./$dst_arg;;
-	esac
-	shift;;
+    -t)
+        is_target_a_directory=always
+        dst_arg=$2
+        # Protect names problematic for 'test' and other utilities.
+        case $dst_arg in
+          -* | [=\(\)!]) dst_arg=./$dst_arg;;
+        esac
+        shift;;
 
-    -T) no_target_directory=true;;
+    -T) is_target_a_directory=never;;
 
     --version) echo "$0 $scriptversion"; exit $?;;
 
-    --)	shift
-	break;;
+    --) shift
+        break;;
 
-    -*)	echo "$0: invalid option: $1" >&2
-	exit 1;;
+    -*) echo "$0: invalid option: $1" >&2
+        exit 1;;
 
     *)  break;;
   esac
   shift
 done
 
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
+
+if test -n "$dir_arg"; then
+  if test -n "$dst_arg"; then
+    echo "$0: target directory not allowed when installing a directory." >&2
+    exit 1
+  fi
+fi
+
 if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
   # When -d is used, all remaining arguments are directories to create.
   # When -t is used, the destination is already specified.
@@ -208,6 +204,15 @@ if test $# -eq 0; then
 fi
 
 if test -z "$dir_arg"; then
+  if test $# -gt 1 || test "$is_target_a_directory" = always; then
+    if test ! -d "$dst_arg"; then
+      echo "$0: $dst_arg: Is not a directory." >&2
+      exit 1
+    fi
+  fi
+fi
+
+if test -z "$dir_arg"; then
   do_exit='(exit $ret); exit $ret'
   trap "ret=129; $do_exit" 1
   trap "ret=130; $do_exit" 2
@@ -223,16 +228,16 @@ if test -z "$dir_arg"; then
 
     *[0-7])
       if test -z "$stripcmd"; then
-	u_plus_rw=
+        u_plus_rw=
       else
-	u_plus_rw='% 200'
+        u_plus_rw='% 200'
       fi
       cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
     *)
       if test -z "$stripcmd"; then
-	u_plus_rw=
+        u_plus_rw=
       else
-	u_plus_rw=,u+rw
+        u_plus_rw=,u+rw
       fi
       cp_umask=$mode$u_plus_rw;;
   esac
@@ -269,41 +274,15 @@ do
     # If destination is a directory, append the input filename; won't work
     # if double slashes aren't ignored.
     if test -d "$dst"; then
-      if test -n "$no_target_directory"; then
-	echo "$0: $dst_arg: Is a directory" >&2
-	exit 1
+      if test "$is_target_a_directory" = never; then
+        echo "$0: $dst_arg: Is a directory" >&2
+        exit 1
       fi
       dstdir=$dst
       dst=$dstdir/`basename "$src"`
       dstdir_status=0
     else
-      # Prefer dirname, but fall back on a substitute if dirname fails.
-      dstdir=`
-	(dirname "$dst") 2>/dev/null ||
-	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	     X"$dst" : 'X\(//\)[^/]' \| \
-	     X"$dst" : 'X\(//\)$' \| \
-	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
-	echo X"$dst" |
-	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-		   s//\1/
-		   q
-		 }
-		 /^X\(\/\/\)[^/].*/{
-		   s//\1/
-		   q
-		 }
-		 /^X\(\/\/\)$/{
-		   s//\1/
-		   q
-		 }
-		 /^X\(\/\).*/{
-		   s//\1/
-		   q
-		 }
-		 s/.*/./; q'
-      `
-
+      dstdir=`dirname "$dst"`
       test -d "$dstdir"
       dstdir_status=$?
     fi
@@ -314,74 +293,81 @@ do
   if test $dstdir_status != 0; then
     case $posix_mkdir in
       '')
-	# Create intermediate dirs using mode 755 as modified by the umask.
-	# This is like FreeBSD 'install' as of 1997-10-28.
-	umask=`umask`
-	case $stripcmd.$umask in
-	  # Optimize common cases.
-	  *[2367][2367]) mkdir_umask=$umask;;
-	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
-	  *[0-7])
-	    mkdir_umask=`expr $umask + 22 \
-	      - $umask % 100 % 40 + $umask % 20 \
-	      - $umask % 10 % 4 + $umask % 2
-	    `;;
-	  *) mkdir_umask=$umask,go-w;;
-	esac
-
-	# With -d, create the new directory with the user-specified mode.
-	# Otherwise, rely on $mkdir_umask.
-	if test -n "$dir_arg"; then
-	  mkdir_mode=-m$mode
-	else
-	  mkdir_mode=
-	fi
-
-	posix_mkdir=false
-	case $umask in
-	  *[123567][0-7][0-7])
-	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
-	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
-	    ;;
-	  *)
-	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
-	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
-	    if (umask $mkdir_umask &&
-		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
-	    then
-	      if test -z "$dir_arg" || {
-		   # Check for POSIX incompatibilities with -m.
-		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
-		   # other-writable bit of parent directory when it shouldn't.
-		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
-		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
-		   case $ls_ld_tmpdir in
-		     d????-?r-*) different_mode=700;;
-		     d????-?--*) different_mode=755;;
-		     *) false;;
-		   esac &&
-		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
-		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
-		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
-		   }
-		 }
-	      then posix_mkdir=:
-	      fi
-	      rmdir "$tmpdir/d" "$tmpdir"
-	    else
-	      # Remove any dirs left behind by ancient mkdir implementations.
-	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
-	    fi
-	    trap '' 0;;
-	esac;;
+        # Create intermediate dirs using mode 755 as modified by the umask.
+        # This is like FreeBSD 'install' as of 1997-10-28.
+        umask=`umask`
+        case $stripcmd.$umask in
+          # Optimize common cases.
+          *[2367][2367]) mkdir_umask=$umask;;
+          .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+          *[0-7])
+            mkdir_umask=`expr $umask + 22 \
+              - $umask % 100 % 40 + $umask % 20 \
+              - $umask % 10 % 4 + $umask % 2
+            `;;
+          *) mkdir_umask=$umask,go-w;;
+        esac
+
+        # With -d, create the new directory with the user-specified mode.
+        # Otherwise, rely on $mkdir_umask.
+        if test -n "$dir_arg"; then
+          mkdir_mode=-m$mode
+        else
+          mkdir_mode=
+        fi
+
+        posix_mkdir=false
+        case $umask in
+          *[123567][0-7][0-7])
+            # POSIX mkdir -p sets u+wx bits regardless of umask, which
+            # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+            ;;
+          *)
+            # $RANDOM is not portable (e.g. dash);  use it when possible to
+            # lower collision chance
+            tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+            trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+            # As "mkdir -p" follows symlinks and we work in /tmp possibly;  so
+            # create the $tmpdir first (and fail if unsuccessful) to make sure
+            # that nobody tries to guess the $tmpdir name.
+            if (umask $mkdir_umask &&
+                $mkdirprog $mkdir_mode "$tmpdir" &&
+                exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
+            then
+              if test -z "$dir_arg" || {
+                   # Check for POSIX incompatibilities with -m.
+                   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+                   # other-writable bit of parent directory when it shouldn't.
+                   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+                   test_tmpdir="$tmpdir/a"
+                   ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
+                   case $ls_ld_tmpdir in
+                     d????-?r-*) different_mode=700;;
+                     d????-?--*) different_mode=755;;
+                     *) false;;
+                   esac &&
+                   $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
+                     ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
+                     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+                   }
+                 }
+              then posix_mkdir=:
+              fi
+              rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
+            else
+              # Remove any dirs left behind by ancient mkdir implementations.
+              rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
+            fi
+            trap '' 0;;
+        esac;;
     esac
 
     if
       $posix_mkdir && (
-	umask $mkdir_umask &&
-	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+        umask $mkdir_umask &&
+        $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
       )
     then :
     else
@@ -391,53 +377,51 @@ do
       # directory the slow way, step by step, checking for races as we go.
 
       case $dstdir in
-	/*) prefix='/';;
-	[-=\(\)!]*) prefix='./';;
-	*)  prefix='';;
+        /*) prefix='/';;
+        [-=\(\)!]*) prefix='./';;
+        *)  prefix='';;
       esac
 
-      eval "$initialize_posix_glob"
-
       oIFS=$IFS
       IFS=/
-      $posix_glob set -f
+      set -f
       set fnord $dstdir
       shift
-      $posix_glob set +f
+      set +f
       IFS=$oIFS
 
       prefixes=
 
       for d
       do
-	test X"$d" = X && continue
-
-	prefix=$prefix$d
-	if test -d "$prefix"; then
-	  prefixes=
-	else
-	  if $posix_mkdir; then
-	    (umask=$mkdir_umask &&
-	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
-	    # Don't fail if two instances are running concurrently.
-	    test -d "$prefix" || exit 1
-	  else
-	    case $prefix in
-	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
-	      *) qprefix=$prefix;;
-	    esac
-	    prefixes="$prefixes '$qprefix'"
-	  fi
-	fi
-	prefix=$prefix/
+        test X"$d" = X && continue
+
+        prefix=$prefix$d
+        if test -d "$prefix"; then
+          prefixes=
+        else
+          if $posix_mkdir; then
+            (umask=$mkdir_umask &&
+             $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+            # Don't fail if two instances are running concurrently.
+            test -d "$prefix" || exit 1
+          else
+            case $prefix in
+              *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+              *) qprefix=$prefix;;
+            esac
+            prefixes="$prefixes '$qprefix'"
+          fi
+        fi
+        prefix=$prefix/
       done
 
       if test -n "$prefixes"; then
-	# Don't fail if two instances are running concurrently.
-	(umask $mkdir_umask &&
-	 eval "\$doit_exec \$mkdirprog $prefixes") ||
-	  test -d "$dstdir" || exit 1
-	obsolete_mkdir_used=true
+        # Don't fail if two instances are running concurrently.
+        (umask $mkdir_umask &&
+         eval "\$doit_exec \$mkdirprog $prefixes") ||
+          test -d "$dstdir" || exit 1
+        obsolete_mkdir_used=true
       fi
     fi
   fi
@@ -472,15 +456,12 @@ do
 
     # If -C, don't bother to copy if it wouldn't change the file.
     if $copy_on_change &&
-       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
-       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&
-
-       eval "$initialize_posix_glob" &&
-       $posix_glob set -f &&
+       old=`LC_ALL=C ls -dlL "$dst"     2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"  2>/dev/null` &&
+       set -f &&
        set X $old && old=:$2:$4:$5:$6 &&
        set X $new && new=:$2:$4:$5:$6 &&
-       $posix_glob set +f &&
-
+       set +f &&
        test "$old" = "$new" &&
        $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
     then
@@ -493,24 +474,24 @@ do
       # to itself, or perhaps because mv is so ancient that it does not
       # support -f.
       {
-	# Now remove or move aside any old file at destination location.
-	# We try this two ways since rm can't unlink itself on some
-	# systems and the destination file might be busy for other
-	# reasons.  In this case, the final cleanup might fail but the new
-	# file should still install successfully.
-	{
-	  test ! -f "$dst" ||
-	  $doit $rmcmd -f "$dst" 2>/dev/null ||
-	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
-	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
-	  } ||
-	  { echo "$0: cannot unlink or rename $dst" >&2
-	    (exit 1); exit 1
-	  }
-	} &&
-
-	# Now rename the file to the real destination.
-	$doit $mvcmd "$dsttmp" "$dst"
+        # Now remove or move aside any old file at destination location.
+        # We try this two ways since rm can't unlink itself on some
+        # systems and the destination file might be busy for other
+        # reasons.  In this case, the final cleanup might fail but the new
+        # file should still install successfully.
+        {
+          test ! -f "$dst" ||
+          $doit $rmcmd -f "$dst" 2>/dev/null ||
+          { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+            { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+          } ||
+          { echo "$0: cannot unlink or rename $dst" >&2
+            (exit 1); exit 1
+          }
+        } &&
+
+        # Now rename the file to the real destination.
+        $doit $mvcmd "$dsttmp" "$dst"
       }
     fi || exit 1
 
diff --git a/ltmain.sh b/ltmain.sh
index a356aca..147d758 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -1,9 +1,12 @@
+#! /bin/sh
+## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
+##               by inline-source v2014-01-03.01
 
-# libtool (GNU libtool) 2.4.2
+# libtool (GNU libtool) 2.4.6
+# Provide generalized library-building support services.
 # Written by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
-# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 1996-2015 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,881 +26,2112 @@
 # 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 libtool) 2.4.2 Debian-2.4.2-1.7ubuntu1
-#         automake:	$automake_version
-#         autoconf:	$autoconf_version
-#
-# Report bugs to <bug-libtool at gnu.org>.
-# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
-# General help using GNU software: <http://www.gnu.org/gethelp/>.
 
 PROGRAM=libtool
 PACKAGE=libtool
-VERSION="2.4.2 Debian-2.4.2-1.7ubuntu1"
-TIMESTAMP=""
-package_revision=1.3337
+VERSION="2.4.6 Debian-2.4.6-0.1"
+package_revision=2.4.6
 
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+
+## ------ ##
+## 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.
+
+# Set a version string for this script.
+scriptversion=2015-01-20.17; # UTC
+
+# General shell script boiler plate, and helper functions.
+# Written by Gary V. Vaughan, 2004
+
+# Copyright (C) 2004-2015 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.
+
+# 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 or propose patches to gary at gnu.org.
+
+
+## ------ ##
+## 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=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # 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
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac
 fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# A function that is used when there is no print builtin or printf.
-func_fallback_echo ()
-{
-  eval 'cat <<_LTECHO_EOF
-$1
-_LTECHO_EOF'
-}
 
-# NLS nuisances: We save the old values to restore during execute mode.
-lt_user_locale=
-lt_safe_locale=
-for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+# 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 \"\${$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\"
+  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
-LC_ALL=C
-LANGUAGE=C
-export LANGUAGE LC_ALL
 
-$lt_unset CDPATH
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
+# Make sure IFS has a sensible default
+sp=' '
+nl='
+'
+IFS="$sp	$nl"
+
+# There are apparently some retarded systems that use ';' as a PATH separator!
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
 
-# 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"
 
 
+## ------------------------- ##
+## Locate command utilities. ##
+## ------------------------- ##
+
+
+# func_executable_p FILE
+# ----------------------
+# Check that FILE is an executable regular file.
+func_executable_p ()
+{
+    test -f "$1" && test -x "$1"
+}
+
+
+# func_path_progs PROGS_LIST CHECK_FUNC [PATH]
+# --------------------------------------------
+# Search for either a program that responds to --version with output
+# containing "GNU", or else returned by CHECK_FUNC otherwise, by
+# trying all the directories in PATH with each of the elements of
+# PROGS_LIST.
+#
+# CHECK_FUNC should accept the path to a candidate program, and
+# set $func_check_prog_result if it truncates its output less than
+# $_G_path_prog_max characters.
+func_path_progs ()
+{
+    _G_progs_list=$1
+    _G_check_func=$2
+    _G_PATH=${3-"$PATH"}
+
+    _G_path_prog_max=0
+    _G_path_prog_found=false
+    _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:}
+    for _G_dir in $_G_PATH; do
+      IFS=$_G_save_IFS
+      test -z "$_G_dir" && _G_dir=.
+      for _G_prog_name in $_G_progs_list; do
+        for _exeext in '' .EXE; do
+          _G_path_prog=$_G_dir/$_G_prog_name$_exeext
+          func_executable_p "$_G_path_prog" || continue
+          case `"$_G_path_prog" --version 2>&1` in
+            *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;;
+            *)     $_G_check_func $_G_path_prog
+		   func_path_progs_result=$func_check_prog_result
+		   ;;
+          esac
+          $_G_path_prog_found && break 3
+        done
+      done
+    done
+    IFS=$_G_save_IFS
+    test -z "$func_path_progs_result" && {
+      echo "no acceptable sed could be found in \$PATH" >&2
+      exit 1
+    }
+}
+
+
+# We want to be able to use the functions in this file before configure
+# has figured out where the best binaries are kept, which means we have
+# to search for them ourselves - except when the results are already set
+# where we skip the searches.
+
+# Unless the user overrides by setting SED, search the path for either GNU
+# sed, or the sed that truncates its output the least.
+test -z "$SED" && {
+  _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+  for _G_i in 1 2 3 4 5 6 7; do
+    _G_sed_script=$_G_sed_script$nl$_G_sed_script
+  done
+  echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed
+  _G_sed_script=
+
+  func_check_prog_sed ()
+  {
+    _G_path_prog=$1
+
+    _G_count=0
+    printf 0123456789 >conftest.in
+    while :
+    do
+      cat conftest.in conftest.in >conftest.tmp
+      mv conftest.tmp conftest.in
+      cp conftest.in conftest.nl
+      echo '' >> conftest.nl
+      "$_G_path_prog" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
+      diff conftest.out conftest.nl >/dev/null 2>&1 || break
+      _G_count=`expr $_G_count + 1`
+      if test "$_G_count" -gt "$_G_path_prog_max"; then
+        # Best one so far, save it but keep looking for a better one
+        func_check_prog_result=$_G_path_prog
+        _G_path_prog_max=$_G_count
+      fi
+      # 10*(2^10) chars as input seems more than enough
+      test 10 -lt "$_G_count" && break
+    done
+    rm -f conftest.in conftest.tmp conftest.nl conftest.out
+  }
+
+  func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
+  rm -f conftest.sed
+  SED=$func_path_progs_result
+}
+
+
+# Unless the user overrides by setting GREP, search the path for either GNU
+# grep, or the grep that truncates its output the least.
+test -z "$GREP" && {
+  func_check_prog_grep ()
+  {
+    _G_path_prog=$1
+
+    _G_count=0
+    _G_path_prog_max=0
+    printf 0123456789 >conftest.in
+    while :
+    do
+      cat conftest.in conftest.in >conftest.tmp
+      mv conftest.tmp conftest.in
+      cp conftest.in conftest.nl
+      echo 'GREP' >> conftest.nl
+      "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' <conftest.nl >conftest.out 2>/dev/null || break
+      diff conftest.out conftest.nl >/dev/null 2>&1 || break
+      _G_count=`expr $_G_count + 1`
+      if test "$_G_count" -gt "$_G_path_prog_max"; then
+        # Best one so far, save it but keep looking for a better one
+        func_check_prog_result=$_G_path_prog
+        _G_path_prog_max=$_G_count
+      fi
+      # 10*(2^10) chars as input seems more than enough
+      test 10 -lt "$_G_count" && break
+    done
+    rm -f conftest.in conftest.tmp conftest.nl conftest.out
+  }
+
+  func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
+  GREP=$func_path_progs_result
+}
+
+
+## ------------------------------- ##
+## 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"}
-test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
+: ${ECHO="printf %s\n"}
+: ${EGREP="$GREP -E"}
+: ${FGREP="$GREP -F"}
+: ${LN_S="ln -s"}
 : ${MAKE="make"}
 : ${MKDIR="mkdir"}
 : ${MV="mv -f"}
 : ${RM="rm -f"}
 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
-: ${Xsed="$SED -e 1s/^X//"}
-
-# Global variables:
-EXIT_SUCCESS=0
-EXIT_FAILURE=1
-EXIT_MISMATCH=63  # $? = 63 is used to indicate version mismatch to missing.
-EXIT_SKIP=77	  # $? = 77 is used to indicate a skipped test to automake.
-
-exit_status=$EXIT_SUCCESS
-
-# Make sure IFS has a sensible default
-lt_nl='
-'
-IFS=" 	$lt_nl"
 
-dirname="s,/[^/]*$,,"
-basename="s,^.*/,,"
 
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
-    func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
-    if test "X$func_dirname_result" = "X${1}"; then
-      func_dirname_result="${3}"
-    else
-      func_dirname_result="$func_dirname_result${2}"
-    fi
-} # func_dirname may be replaced by extended shell implementation
+## -------------------- ##
+## Useful sed snippets. ##
+## -------------------- ##
 
+sed_dirname='s|/[^/]*$||'
+sed_basename='s|^.*/||'
 
-# func_basename file
-func_basename ()
-{
-    func_basename_result=`$ECHO "${1}" | $SED "$basename"`
-} # func_basename may be replaced by extended shell implementation
+# 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'
 
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-#   dirname:  Compute the dirname of FILE.  If nonempty,
-#             add APPEND to the result, otherwise set result
-#             to NONDIR_REPLACEMENT.
-#             value returned in "$func_dirname_result"
-#   basename: Compute filename of FILE.
-#             value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
-    # Extract subdirectory from the argument.
-    func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
-    if test "X$func_dirname_result" = "X${1}"; then
-      func_dirname_result="${3}"
-    else
-      func_dirname_result="$func_dirname_result${2}"
-    fi
-    func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
-} # func_dirname_and_basename may be replaced by extended shell implementation
+# 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
+# that 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"
 
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-# func_strip_suffix prefix name
-func_stripname ()
-{
-    case ${2} in
-      .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
-      *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
-    esac
-} # func_stripname may be replaced by extended shell implementation
 
+## ----------------- ##
+## Global variables. ##
+## ----------------- ##
 
-# 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,/*$,/,'
+# 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.
 
-# func_normal_abspath PATH
-# Remove doubled-up and trailing slashes, "." path components,
-# and cancel out any ".." path components in PATH after making
-# it an absolute path.
-#             value returned in "$func_normal_abspath_result"
-func_normal_abspath ()
-{
-  # Start from root dir and reassemble the path.
-  func_normal_abspath_result=
-  func_normal_abspath_tpath=$1
-  func_normal_abspath_altnamespace=
-  case $func_normal_abspath_tpath in
-    "")
-      # Empty path, that just means $cwd.
-      func_stripname '' '/' "`pwd`"
-      func_normal_abspath_result=$func_stripname_result
-      return
-    ;;
-    # The next three entries are used to spot a run of precisely
-    # two leading slashes without using negated character classes;
-    # we take advantage of case's first-match behaviour.
-    ///*)
-      # Unusual form of absolute path, do nothing.
-    ;;
-    //*)
-      # Not necessarily an ordinary path; POSIX reserves leading '//'
-      # and for example Cygwin uses it to access remote file shares
-      # over CIFS/SMB, so we conserve a leading double slash if found.
-      func_normal_abspath_altnamespace=/
-    ;;
-    /*)
-      # Absolute path, do nothing.
-    ;;
-    *)
-      # Relative path, prepend $cwd.
-      func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
-    ;;
-  esac
-  # Cancel out all the simple stuff to save iterations.  We also want
-  # the path to end with a slash for ease of parsing, so make sure
-  # there is one (and only one) here.
-  func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
-        -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
-  while :; do
-    # Processed it all yet?
-    if test "$func_normal_abspath_tpath" = / ; then
-      # If we ascended to the root using ".." the result may be empty now.
-      if test -z "$func_normal_abspath_result" ; then
-        func_normal_abspath_result=/
-      fi
-      break
-    fi
-    func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
-        -e "$pathcar"`
-    func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
-        -e "$pathcdr"`
-    # Figure out what to do with it
-    case $func_normal_abspath_tcomponent in
-      "")
-        # Trailing empty path component, ignore it.
-      ;;
-      ..)
-        # Parent dir; strip last assembled component from result.
-        func_dirname "$func_normal_abspath_result"
-        func_normal_abspath_result=$func_dirname_result
-      ;;
-      *)
-        # Actual path component, append it.
-        func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
-      ;;
-    esac
-  done
-  # Restore leading double-slash if one was found on entry.
-  func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
-}
+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.
 
-# func_relative_path SRCDIR DSTDIR
-# generates a relative path from SRCDIR to DSTDIR, with a trailing
-# slash if non-empty, suitable for immediately appending a filename
-# without needing to append a separator.
-#             value returned in "$func_relative_path_result"
-func_relative_path ()
-{
-  func_relative_path_result=
-  func_normal_abspath "$1"
-  func_relative_path_tlibdir=$func_normal_abspath_result
-  func_normal_abspath "$2"
-  func_relative_path_tbindir=$func_normal_abspath_result
-
-  # Ascend the tree starting from libdir
-  while :; do
-    # check if we have found a prefix of bindir
-    case $func_relative_path_tbindir in
-      $func_relative_path_tlibdir)
-        # found an exact match
-        func_relative_path_tcancelled=
-        break
-        ;;
-      $func_relative_path_tlibdir*)
-        # found a matching prefix
-        func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
-        func_relative_path_tcancelled=$func_stripname_result
-        if test -z "$func_relative_path_result"; then
-          func_relative_path_result=.
-        fi
-        break
-        ;;
-      *)
-        func_dirname $func_relative_path_tlibdir
-        func_relative_path_tlibdir=${func_dirname_result}
-        if test "x$func_relative_path_tlibdir" = x ; then
-          # Have to descend all the way to the root!
-          func_relative_path_result=../$func_relative_path_result
-          func_relative_path_tcancelled=$func_relative_path_tbindir
-          break
-        fi
-        func_relative_path_result=../$func_relative_path_result
-        ;;
-    esac
-  done
+# 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=:
 
-  # Now calculate path; take care to avoid doubling-up slashes.
-  func_stripname '' '/' "$func_relative_path_result"
-  func_relative_path_result=$func_stripname_result
-  func_stripname '/' '/' "$func_relative_path_tcancelled"
-  if test "x$func_stripname_result" != x ; then
-    func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
-  fi
+# 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
 
-  # Normalisation. If bindir is libdir, return empty string,
-  # else relative path ending with a slash; either way, target
-  # file name can be directly appended.
-  if test ! -z "$func_relative_path_result"; then
-    func_stripname './' '' "$func_relative_path_result/"
-    func_relative_path_result=$func_stripname_result
-  fi
-}
+# 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:
-func_dirname_and_basename "$progpath"
-progname=$func_basename_result
+# The name of this program.
+progname=`$ECHO "$progpath" |$SED "$sed_basename"`
 
-# Make sure we have an absolute path for reexecution:
+# Make sure we have an absolute progpath for reexecution:
 case $progpath in
   [\\/]*|[A-Za-z]:\\*) ;;
   *[\\/]*)
-     progdir=$func_dirname_result
+     progdir=`$ECHO "$progpath" |$SED "$sed_dirname"`
      progdir=`cd "$progdir" && pwd`
-     progpath="$progdir/$progname"
+     progpath=$progdir/$progname
      ;;
   *)
-     save_IFS="$IFS"
+     _G_IFS=$IFS
      IFS=${PATH_SEPARATOR-:}
      for progdir in $PATH; do
-       IFS="$save_IFS"
+       IFS=$_G_IFS
        test -x "$progdir/$progname" && break
      done
-     IFS="$save_IFS"
+     IFS=$_G_IFS
      test -n "$progdir" || progdir=`pwd`
-     progpath="$progdir/$progname"
+     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'
+## ----------------- ##
+## Standard options. ##
+## ----------------- ##
 
-# 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"
+# 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.
 
-# 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: }$*"
-}
+# 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=
 
-# func_verbose arg...
-# Echo program name prefixed message in verbose mode only.
-func_verbose ()
-{
-    $opt_verbose && func_echo ${1+"$@"}
+# 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
 
-    # 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:
-    :
-}
+# 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
 
-# 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
-}
+## -------------------- ##
+## Resource management. ##
+## -------------------- ##
 
-# 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
+# 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.
 
-    # bash bug again:
-    :
-}
 
-# func_fatal_error arg...
-# Echo program name prefixed message to standard error, and exit.
-func_fatal_error ()
+# require_term_colors
+# -------------------
+# Allow display of bold text on terminals that support it.
+require_term_colors=func_require_term_colors
+func_require_term_colors ()
 {
-    func_error ${1+"$@"}
-    exit $EXIT_FAILURE
-}
+    $debug_cmd
+
+    test -t 1 && {
+      # COLORTERM and USE_ANSI_COLORS environment variables take
+      # precedence, because most terminfo databases neglect to describe
+      # whether color sequences are supported.
+      test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"}
+
+      if test 1 = "$USE_ANSI_COLORS"; then
+        # Standard ANSI escape sequences
+        tc_reset=''
+        tc_bold='';   tc_standout=''
+        tc_red='';   tc_green=''
+        tc_blue='';  tc_cyan=''
+      else
+        # Otherwise trust the terminfo database after all.
+        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`
+        }
+      fi
+    }
 
-# 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"
+    require_term_colors=:
 }
-help="Try \`$progname --help' for more information."  ## default
 
 
-# func_grep expression filename
+## ----------------- ##
+## 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='`$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
+      $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=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"`
+        _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"`
+      }
+    done
+    _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`"  " ## exclude from sc_prohibit_nested_quotes
+
+    func_echo_infix_1_IFS=$IFS
+    IFS=$nl
+    for _G_line in $_G_message; do
+      IFS=$func_echo_infix_1_IFS
+      $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_mkdir_p directory-path
+# 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 ()
 {
-    my_directory_path="$1"
-    my_dir_list=
+    $debug_cmd
 
-    if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+    _G_directory_path=$1
+    _G_dir_list=
 
-      # Protect directory names starting with `-'
-      case $my_directory_path in
-        -*) my_directory_path="./$my_directory_path" ;;
+    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 "$my_directory_path"; do
+      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.
-        my_dir_list="$my_directory_path:$my_dir_list"
+        _G_dir_list=$_G_directory_path:$_G_dir_list
 
         # If the last portion added has no slash in it, the list is done
-        case $my_directory_path in */*) ;; *) break ;; esac
+        case $_G_directory_path in */*) ;; *) break ;; esac
 
         # ...otherwise throw away the child directory and loop
-        my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
+        _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"`
       done
-      my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
+      _G_dir_list=`$ECHO "$_G_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
+      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 "$my_dir" 2>/dev/null || :
+        $MKDIR "$_G_dir" 2>/dev/null || :
       done
-      IFS="$save_mkdir_p_IFS"
+      IFS=$func_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'"
+      test -d "$_G_directory_path" || \
+        func_fatal_error "Failed to create '$1'"
     fi
 }
 
 
-# func_mktempdir [string]
+# func_mktempdir [BASENAME]
+# -------------------------
 # 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.
+# given, BASENAME is the basename for that directory.
 func_mktempdir ()
 {
-    my_template="${TMPDIR-/tmp}/${1-$progname}"
+    $debug_cmd
+
+    _G_template=${TMPDIR-/tmp}/${1-$progname}
 
-    if test "$opt_dry_run" = ":"; then
+    if test : = "$opt_dry_run"; then
       # Return a directory name, but don't create it in dry-run mode
-      my_tmpdir="${my_template}-$$"
+      _G_tmpdir=$_G_template-$$
     else
 
       # If mktemp works, use that first and foremost
-      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+      _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null`
 
-      if test ! -d "$my_tmpdir"; then
+      if test ! -d "$_G_tmpdir"; then
         # Failing that, at least try and use $RANDOM to avoid a race
-        my_tmpdir="${my_template}-${RANDOM-0}$$"
+        _G_tmpdir=$_G_template-${RANDOM-0}$$
 
-        save_mktempdir_umask=`umask`
+        func_mktempdir_umask=`umask`
         umask 0077
-        $MKDIR "$my_tmpdir"
-        umask $save_mktempdir_umask
+        $MKDIR "$_G_tmpdir"
+        umask $func_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'"
+      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
 
-    $ECHO "$my_tmpdir"
+    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 all characters that 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 -e "s%^$1%%" -e "s%\\\\$2\$%%"`;;
+      *)  func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "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 -e 's/^\([0-9]\)/_\1/' -e '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
+}
+
+
+# func_sort_ver VER1 VER2
+# -----------------------
+# 'sort -V' is not generally available.
+# Note this deviates from the version comparison in automake
+# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
+# but this should suffice as we won't be specifying old
+# version formats or redundant trailing .0 in bootstrap.conf.
+# If we did want full compatibility then we should probably
+# use m4_version_compare from autoconf.
+func_sort_ver ()
+{
+    $debug_cmd
+
+    printf '%s\n%s\n' "$1" "$2" \
+      | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n
+}
+
+# func_lt_ver PREV CURR
+# ---------------------
+# Return true if PREV and CURR are in the correct order according to
+# func_sort_ver, otherwise false.  Use it like this:
+#
+#  func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..."
+func_lt_ver ()
+{
+    $debug_cmd
+
+    test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q`
+}
+
+
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
+#! /bin/sh
+
+# Set a version string for this script.
+scriptversion=2014-01-07.03; # UTC
+
+# A portable, pluggable option parser for Bourne shell.
+# Written by Gary V. Vaughan, 2010
+
+# Copyright (C) 2010-2015 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 gary at gnu.org.
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# This file is a library for parsing options in your shell scripts along
+# with assorted other useful supporting features that you can make use
+# of too.
+#
+# 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+"$@"}
+#   eval set dummy "$func_options_result"; shift
+#   ...rest of your script...
+#
+# In order for the '--version' option to work, you will need to have a
+# suitably formatted comment like the one at the top of this file
+# starting with '# Written by ' and ending with '# warranty; '.
+#
+# For '-h' and '--help' to work, you will also need a one line
+# description of your script's purpose in a comment directly above the
+# '# Written by ' line, like the one at the top of this file.
+#
+# The default options also support '--debug', which will turn on shell
+# execution tracing (see the comment above debug_cmd below for another
+# use), and '--verbose' and the func_verbose function to allow your script
+# to display verbose messages only when your user has specified
+# '--verbose'.
+#
+# After sourcing this file, you can plug processing for additional
+# options by amending the variables from the 'Configuration' section
+# below, and following the instructions in the 'Option parsing'
+# section further down.
+
+## -------------- ##
+## Configuration. ##
+## -------------- ##
+
+# You should override these variables in your script after sourcing this
+# file so that they reflect the customisations you have added to the
+# option parser.
+
+# The usage line for option parsing errors and the start of '-h' and
+# '--help' output messages. You can embed shell variables for delayed
+# expansion at the time the message is displayed, but you will need to
+# quote other shell meta-characters carefully to prevent them being
+# expanded when the contents are evaled.
+usage='$progpath [OPTION]...'
+
+# Short help message in response to '-h' and '--help'.  Add to this or
+# override it after sourcing this library to reflect the full set of
+# options your script accepts.
+usage_message="\
+       --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="
+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."
+
+
+
+## ------------------------- ##
+## Hook function management. ##
+## ------------------------- ##
+
+# This section contains functions for adding, removing, and running hooks
+# to the main code.  A hook is just a named list of of function, that can
+# be run in order later on.
+
+# func_hookable FUNC_NAME
+# -----------------------
+# Declare that FUNC_NAME will run hooks added with
+# 'func_add_hook FUNC_NAME ...'.
+func_hookable ()
+{
+    $debug_cmd
+
+    func_append hookable_fns " $1"
+}
+
+
+# func_add_hook FUNC_NAME HOOK_FUNC
+# ---------------------------------
+# Request that FUNC_NAME call HOOK_FUNC before it returns.  FUNC_NAME must
+# first have been declared "hookable" by a call to 'func_hookable'.
+func_add_hook ()
+{
+    $debug_cmd
+
+    case " $hookable_fns " in
+      *" $1 "*) ;;
+      *) func_fatal_error "'$1' does not accept hook functions." ;;
+    esac
+
+    eval func_append ${1}_hooks '" $2"'
+}
+
+
+# func_remove_hook FUNC_NAME HOOK_FUNC
+# ------------------------------------
+# Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
+func_remove_hook ()
+{
+    $debug_cmd
+
+    eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`'
+}
+
+
+# func_run_hooks FUNC_NAME [ARG]...
+# ---------------------------------
+# Run all hook functions registered to FUNC_NAME.
+# It is assumed that the list of hook functions contains nothing more
+# than a whitespace-delimited list of legal shell function names, and
+# no effort is wasted trying to catch shell meta-characters or preserve
+# whitespace.
+func_run_hooks ()
+{
+    $debug_cmd
+
+    case " $hookable_fns " in
+      *" $1 "*) ;;
+      *) func_fatal_error "'$1' does not support hook funcions.n" ;;
+    esac
+
+    eval _G_hook_fns=\$$1_hooks; shift
+
+    for _G_hook in $_G_hook_fns; do
+      eval $_G_hook '"$@"'
+
+      # store returned options list back into positional
+      # parameters for next 'cmd' execution.
+      eval _G_hook_result=\$${_G_hook}_result
+      eval set dummy "$_G_hook_result"; shift
+    done
+
+    func_quote_for_eval ${1+"$@"}
+    func_run_hooks_result=$func_quote_for_eval_result
+}
+
+
+
+## --------------- ##
+## Option parsing. ##
+## --------------- ##
+
+# In order to add your own option parsing hooks, you must accept the
+# full positional parameter list in your hook function, remove any
+# options that you action, and then pass back the remaining unprocessed
+# options in '<hooked_function_name>_result', escaped suitably for
+# 'eval'.  Like this:
+#
+#    my_options_prep ()
+#    {
+#        $debug_cmd
+#
+#        # Extend the existing usage message.
+#        usage_message=$usage_message'
+#      -s, --silent       don'\''t print informational messages
+#    '
+#
+#        func_quote_for_eval ${1+"$@"}
+#        my_options_prep_result=$func_quote_for_eval_result
+#    }
+#    func_add_hook func_options_prep my_options_prep
+#
+#
+#    my_silent_option ()
+#    {
+#        $debug_cmd
+#
+#        # Note that for efficiency, we parse as many options as we can
+#        # recognise in a loop before passing the remainder back to the
+#        # caller on the first unrecognised argument we encounter.
+#        while test $# -gt 0; do
+#          opt=$1; shift
+#          case $opt in
+#            --silent|-s) opt_silent=: ;;
+#            # Separate non-argument short options:
+#            -s*)         func_split_short_opt "$_G_opt"
+#                         set dummy "$func_split_short_opt_name" \
+#                             "-$func_split_short_opt_arg" ${1+"$@"}
+#                         shift
+#                         ;;
+#            *)            set dummy "$_G_opt" "$*"; shift; break ;;
+#          esac
+#        done
+#
+#        func_quote_for_eval ${1+"$@"}
+#        my_silent_option_result=$func_quote_for_eval_result
+#    }
+#    func_add_hook func_parse_options my_silent_option
+#
+#
+#    my_option_validation ()
+#    {
+#        $debug_cmd
+#
+#        $opt_silent && $opt_verbose && func_fatal_help "\
+#    '--silent' and '--verbose' options are mutually exclusive."
+#
+#        func_quote_for_eval ${1+"$@"}
+#        my_option_validation_result=$func_quote_for_eval_result
+#    }
+#    func_add_hook func_validate_options my_option_validation
+#
+# You'll alse need to manually amend $usage_message to reflect the extra
+# options you parse.  It's preferable to append if you can, so that
+# multiple option parsing hooks can be added safely.
+
+
+# func_options [ARG]...
+# ---------------------
+# All the functions called inside func_options are hookable. See the
+# individual implementations for details.
+func_hookable func_options
+func_options ()
+{
+    $debug_cmd
+
+    func_options_prep ${1+"$@"}
+    eval func_parse_options \
+        ${func_options_prep_result+"$func_options_prep_result"}
+    eval func_validate_options \
+        ${func_parse_options_result+"$func_parse_options_result"}
+
+    eval func_run_hooks func_options \
+        ${func_validate_options_result+"$func_validate_options_result"}
+
+    # save modified positional parameters for caller
+    func_options_result=$func_run_hooks_result
 }
 
 
-# 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 ()
+# func_options_prep [ARG]...
+# --------------------------
+# All initialisations required before starting the option parse loop.
+# Note that when calling hook functions, we pass through the list of
+# positional parameters.  If a hook function modifies that list, and
+# needs to propogate that back to rest of this script, then the complete
+# modified list must be put in 'func_run_hooks_result' before
+# returning.
+func_hookable func_options_prep
+func_options_prep ()
 {
-    case $1 in
-      *[\\\`\"\$]*)
-	func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
-      *)
-        func_quote_for_eval_unquoted_result="$1" ;;
-    esac
+    $debug_cmd
 
-    case $func_quote_for_eval_unquoted_result in
-      # Double-quote args containing shell metacharacters to delay
-      # word splitting, command substitution and and variable
-      # expansion for a subsequent eval.
-      # Many Bourne shells cannot handle close brackets correctly
-      # in scan sets, so we specify it separately.
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-        func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
-        ;;
-      *)
-        func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
-    esac
+    # Option defaults:
+    opt_verbose=false
+    opt_warning_types=
+
+    func_run_hooks func_options_prep ${1+"$@"}
+
+    # save modified positional parameters for caller
+    func_options_prep_result=$func_run_hooks_result
 }
 
 
-# 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 ()
+# func_parse_options [ARG]...
+# ---------------------------
+# The main option parsing loop.
+func_hookable func_parse_options
+func_parse_options ()
 {
-    case $1 in
-      *[\\\`\"]*)
-	my_arg=`$ECHO "$1" | $SED \
-	    -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
-      *)
-        my_arg="$1" ;;
-    esac
+    $debug_cmd
 
-    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_parse_options_result=
 
-    func_quote_for_expand_result="$my_arg"
-}
+    # this just eases exit handling
+    while test $# -gt 0; do
+      # Defer to hook functions for initial option parsing, so they
+      # get priority in the event of reusing an option name.
+      func_run_hooks func_parse_options ${1+"$@"}
 
+      # Adjust func_parse_options positional parameters to match
+      eval set dummy "$func_run_hooks_result"; shift
 
-# 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-:}"
+      # Break out of the loop if we already parsed every option.
+      test $# -gt 0 || break
 
-    ${opt_silent-false} || {
-      func_quote_for_expand "$my_cmd"
-      eval "func_echo $func_quote_for_expand_result"
-    }
+      _G_opt=$1
+      shift
+      case $_G_opt in
+        --debug|-x)   debug_cmd='set -x'
+                      func_echo "enabling shell trace mode"
+                      $debug_cmd
+                      ;;
+
+        --no-warnings|--no-warning|--no-warn)
+                      set dummy --warnings none ${1+"$@"}
+                      shift
+		      ;;
 
-    if ${opt_dry_run-false}; then :; else
-      eval "$my_cmd"
-      my_status=$?
-      if test "$my_status" -eq 0; then :; else
-	eval "(exit $my_status); $my_fail_exp"
-      fi
-    fi
+        --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 ;;
+        --help)       func_help ;;
+
+	# Separate optargs to long options (plugins may need this):
+	--*=*)        func_split_equals "$_G_opt"
+	              set dummy "$func_split_equals_lhs" \
+                          "$func_split_equals_rhs" ${1+"$@"}
+                      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"
+                      set dummy "$func_split_short_opt_name" \
+                          "-$func_split_short_opt_arg" ${1+"$@"}
+                      shift
+                      ;;
+
+        --)           break ;;
+        -*)           func_fatal_help "unrecognised option: '$_G_opt'" ;;
+        *)            set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+      esac
+    done
+
+    # save modified positional parameters for caller
+    func_quote_for_eval ${1+"$@"}
+    func_parse_options_result=$func_quote_for_eval_result
 }
 
 
-# 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 ()
+# func_validate_options [ARG]...
+# ------------------------------
+# Perform any sanity checks on option settings and/or unconsumed
+# arguments.
+func_hookable func_validate_options
+func_validate_options ()
 {
-    my_cmd="$1"
-    my_fail_exp="${2-:}"
+    $debug_cmd
 
-    ${opt_silent-false} || {
-      func_quote_for_expand "$my_cmd"
-      eval "func_echo $func_quote_for_expand_result"
-    }
+    # Display all warnings if -W was not given.
+    test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
 
-    if ${opt_dry_run-false}; then :; else
-      eval "$lt_user_locale
-	    $my_cmd"
-      my_status=$?
-      eval "$lt_safe_locale"
-      if test "$my_status" -eq 0; then :; else
-	eval "(exit $my_status); $my_fail_exp"
-      fi
-    fi
-}
+    func_run_hooks func_validate_options ${1+"$@"}
 
-# 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
+    # Bail if the options were screwed!
+    $exit_cmd $EXIT_FAILURE
+
+    # save modified positional parameters for caller
+    func_validate_options_result=$func_run_hooks_result
 }
 
 
-# func_version
-# Echo version message to standard output and exit.
-func_version ()
-{
-    $opt_debug
 
-    $SED -n '/(C)/!b go
-	:more
-	/\./!{
-	  N
-	  s/\n# / /
-	  b more
-	}
-	:go
-	/^# '$PROGRAM' (GNU /,/# warranty; / {
-        s/^# //
-	s/^# *$//
-        s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
-        p
-     }' < "$progpath"
-     exit $?
-}
+## ----------------- ##
+## Helper functions. ##
+## ----------------- ##
 
-# func_usage
-# Echo short help message to standard output and exit.
-func_usage ()
+# This section contains the helper functions used by the rest of the
+# hookable option parser framework in ascii-betical order.
+
+
+# func_fatal_help ARG...
+# ----------------------
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
 {
-    $opt_debug
+    $debug_cmd
 
-    $SED -n '/^# Usage:/,/^#  *.*--help/ {
-        s/^# //
-	s/^# *$//
-	s/\$progname/'$progname'/
-	p
-    }' < "$progpath"
-    echo
-    $ECHO "run \`$progname --help | more' for full usage"
-    exit $?
+    eval \$ECHO \""Usage: $usage"\"
+    eval \$ECHO \""$fatal_help"\"
+    func_error ${1+"$@"}
+    exit $EXIT_FAILURE
 }
 
-# func_help [NOEXIT]
-# Echo long help message to standard output and exit,
-# unless 'noexit' is passed as argument.
+
+# func_help
+# ---------
+# Echo long help message to standard output and exit.
 func_help ()
 {
-    $opt_debug
-
-    $SED -n '/^# Usage:/,/# Report bugs to/ {
-	:print
-        s/^# //
-	s/^# *$//
-	s*\$progname*'$progname'*
-	s*\$host*'"$host"'*
-	s*\$SHELL*'"$SHELL"'*
-	s*\$LTCC*'"$LTCC"'*
-	s*\$LTCFLAGS*'"$LTCFLAGS"'*
-	s*\$LD*'"$LD"'*
-	s/\$with_gnu_ld/'"$with_gnu_ld"'/
-	s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
-	s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
-	p
-	d
-     }
-     /^# .* home page:/b print
-     /^# General help using/b print
-     ' < "$progpath"
-    ret=$?
-    if test -z "$1"; then
-      exit $ret
-    fi
+    $debug_cmd
+
+    func_usage_message
+    $ECHO "$long_help_message"
+    exit 0
 }
 
-# func_missing_arg argname
+
+# func_missing_arg ARGNAME
+# ------------------------
 # Echo program name prefixed message to standard error and set global
 # exit_cmd.
 func_missing_arg ()
 {
-    $opt_debug
+    $debug_cmd
 
-    func_error "missing argument for $1."
+    func_error "Missing argument for '$1'."
     exit_cmd=exit
 }
 
 
-# func_split_short_opt shortopt
+# func_split_equals STRING
+# ------------------------
+# Set func_split_equals_lhs and func_split_equals_rhs shell variables after
+# splitting STRING at the '=' sign.
+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 ()
+  {
+      $debug_cmd
+
+      func_split_equals_lhs=${1%%=*}
+      func_split_equals_rhs=${1#*=}
+      test "x$func_split_equals_lhs" = "x$1" \
+        && func_split_equals_rhs=
+  }'
+else
+  # ...otherwise fall back to using expr, which is often a shell builtin.
+  func_split_equals ()
+  {
+      $debug_cmd
+
+      func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
+      func_split_equals_rhs=
+      test "x$func_split_equals_lhs" = "x$1" \
+        || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
+  }
+fi #func_split_equals
+
+
+# func_split_short_opt SHORTOPT
+# -----------------------------
 # Set func_split_short_opt_name and func_split_short_opt_arg shell
 # variables after splitting SHORTOPT after the 2nd character.
-func_split_short_opt ()
+if test yes = "$_G_HAVE_XSI_OPS"
+then
+  # This is an XSI compatible shell, allowing a faster implementation...
+  eval 'func_split_short_opt ()
+  {
+      $debug_cmd
+
+      func_split_short_opt_arg=${1#??}
+      func_split_short_opt_name=${1%"$func_split_short_opt_arg"}
+  }'
+else
+  # ...otherwise fall back to using expr, which is often a shell builtin.
+  func_split_short_opt ()
+  {
+      $debug_cmd
+
+      func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
+      func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
+  }
+fi #func_split_short_opt
+
+
+# func_usage
+# ----------
+# Echo short help message to standard output and exit.
+func_usage ()
 {
-    my_sed_short_opt='1s/^\(..\).*$/\1/;q'
-    my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
+    $debug_cmd
 
-    func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
-    func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
-} # func_split_short_opt may be replaced by extended shell implementation
+    func_usage_message
+    $ECHO "Run '$progname --help |${PAGER-more}' for full usage"
+    exit 0
+}
 
 
-# func_split_long_opt longopt
-# Set func_split_long_opt_name and func_split_long_opt_arg shell
-# variables after splitting LONGOPT at the `=' sign.
-func_split_long_opt ()
+# func_usage_message
+# ------------------
+# Echo short help message to standard output.
+func_usage_message ()
 {
-    my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
-    my_sed_long_arg='1s/^--[^=]*=//'
+    $debug_cmd
 
-    func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
-    func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
-} # func_split_long_opt may be replaced by extended shell implementation
+    eval \$ECHO \""Usage: $usage"\"
+    echo
+    $SED -n 's|^# ||
+        /^Written by/{
+          x;p;x
+        }
+	h
+	/^Written by/q' < "$progpath"
+    echo
+    eval \$ECHO \""$usage_message"\"
+}
 
-exit_cmd=:
 
+# func_version
+# ------------
+# Echo version message to standard output and exit.
+func_version ()
+{
+    $debug_cmd
 
+    printf '%s\n' "$progname $scriptversion"
+    $SED -n '
+        /(C)/!b go
+        :more
+        /\./!{
+          N
+          s|\n# | |
+          b more
+        }
+        :go
+        /^# Written by /,/# warranty; / {
+          s|^# ||
+          s|^# *$||
+          s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
+          p
+        }
+        /^# Written by / {
+          s|^# ||
+          p
+        }
+        /^warranty; /q' < "$progpath"
 
+    exit $?
+}
 
 
-magic="%%%MAGIC variable%%%"
-magic_exe="%%%MAGIC EXE variable%%%"
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
 
-# Global variables.
-nonopt=
-preserve_args=
-lo2o="s/\\.lo\$/.${objext}/"
-o2lo="s/\\.${objext}\$/.lo/"
-extracted_archives=
-extracted_serial=0
+# Set a version string.
+scriptversion='(GNU libtool) 2.4.6'
 
-# If this variable is set in any of the actions, the command in it
-# will be execed at the end.  This prevents here-documents from being
-# left over by shells.
-exec_cmd=
 
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
+# func_echo ARG...
+# ----------------
+# Libtool also displays the current mode in messages, so override
+# funclib.sh func_echo with this custom definition.
+func_echo ()
 {
-    eval "${1}=\$${1}\${2}"
-} # func_append may be replaced by extended shell implementation
+    $debug_cmd
 
-# func_append_quoted var value
-# Quote VALUE and append to the end of shell variable VAR, separated
-# by a space.
-func_append_quoted ()
-{
-    func_quote_for_eval "${2}"
-    eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
-} # func_append_quoted may be replaced by extended shell implementation
+    _G_message=$*
 
+    func_echo_IFS=$IFS
+    IFS=$nl
+    for _G_line in $_G_message; do
+      IFS=$func_echo_IFS
+      $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line"
+    done
+    IFS=$func_echo_IFS
+}
 
-# func_arith arithmetic-term...
-func_arith ()
+
+# func_warning ARG...
+# -------------------
+# Libtool warnings are not categorized, so override funclib.sh
+# func_warning with this simpler definition.
+func_warning ()
 {
-    func_arith_result=`expr "${@}"`
-} # func_arith may be replaced by extended shell implementation
+    $debug_cmd
 
+    $warning_func ${1+"$@"}
+}
 
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-    func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
-} # func_len may be replaced by extended shell implementation
 
+## ---------------- ##
+## 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
+"
 
-# func_lo2o object
-func_lo2o ()
+# Additional text appended to 'usage_message' in response to '--help'.
+func_help ()
 {
-    func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
-} # func_lo2o may be replaced by extended shell implementation
+    $debug_cmd
+
+    func_usage_message
+    $ECHO "$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 libtool) 2.4.6
+       automake:       `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
+       autoconf:       `($AUTOCONF --version) 2>/dev/null |$SED 1q`
+
+Report bugs to <bug-libtool at gnu.org>.
+GNU libtool home page: <http://www.gnu.org/s/libtool/>.
+General help using GNU software: <http://www.gnu.org/gethelp/>."
+    exit 0
+}
 
 
-# func_xform libobj-or-source
-func_xform ()
-{
-    func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
-} # func_xform may be replaced by extended shell implementation
+# func_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 test yes = "$_G_HAVE_XSI_OPS"; then
+  eval 'func_lo2o ()
+  {
+    case $1 in
+      *.lo) func_lo2o_result=${1%.lo}.$objext ;;
+      *   ) func_lo2o_result=$1               ;;
+    esac
+  }'
+
+  # 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
+  }'
+else
+  # ...otherwise fall back to using sed.
+  func_lo2o ()
+  {
+    func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"`
+  }
+
+  func_xform ()
+  {
+    func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'`
+  }
+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 ()
 {
@@ -915,17 +2149,19 @@ func_config ()
     exit $?
 }
 
+
 # func_features
+# -------------
 # Display the features supported by this script.
 func_features ()
 {
     echo "host: $host"
-    if test "$build_libtool_libs" = yes; then
+    if test yes = "$build_libtool_libs"; then
       echo "enable shared libraries"
     else
       echo "disable shared libraries"
     fi
-    if test "$build_old_libs" = yes; then
+    if test yes = "$build_old_libs"; then
       echo "enable static libraries"
     else
       echo "disable static libraries"
@@ -934,314 +2170,350 @@ 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
+# libtool_options_prep [ARG]...
+# -----------------------------
+# Preparation for options parsed by libtool.
+libtool_options_prep ()
+{
+    $debug_mode
 
+    # Option defaults:
+    opt_config=false
+    opt_dlopen=
+    opt_dry_run=false
+    opt_help=false
+    opt_mode=
+    opt_preserve_dup_deps=false
+    opt_quiet=false
 
+    nonopt=
+    preserve_args=
 
-# Option defaults:
-opt_debug=:
-opt_dry_run=false
-opt_config=false
-opt_preserve_dup_deps=false
-opt_features=false
-opt_finish=false
-opt_help=false
-opt_help_all=false
-opt_silent=:
-opt_warning=:
-opt_verbose=:
-opt_silent=false
-opt_verbose=false
+    # 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
+
+    # 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
 
 
-# Parse options once, thoroughly.  This comes as soon as possible in the
-# script to make things like `--version' happen as quickly as we can.
+# libtool_parse_options [ARG]...
+# ---------------------------------
+# Provide handling for libtool specific options.
+libtool_parse_options ()
 {
-  # this just eases exit handling
-  while test $# -gt 0; do
-    opt="$1"
-    shift
-    case $opt in
-      --debug|-x)	opt_debug='set -x'
-			func_echo "enabling shell trace mode"
-			$opt_debug
-			;;
-      --dry-run|--dryrun|-n)
-			opt_dry_run=:
-			;;
-      --config)
-			opt_config=:
-func_config
-			;;
-      --dlopen|-dlopen)
-			optarg="$1"
-			opt_dlopen="${opt_dlopen+$opt_dlopen
-}$optarg"
-			shift
-			;;
-      --preserve-dup-deps)
-			opt_preserve_dup_deps=:
-			;;
-      --features)
-			opt_features=:
-func_features
-			;;
-      --finish)
-			opt_finish=:
-set dummy --mode finish ${1+"$@"}; shift
-			;;
-      --help)
-			opt_help=:
-			;;
-      --help-all)
-			opt_help_all=:
-opt_help=': help-all'
-			;;
-      --mode)
-			test $# = 0 && func_missing_arg $opt && break
-			optarg="$1"
-			opt_mode="$optarg"
-case $optarg in
-  # Valid mode arguments:
-  clean|compile|execute|finish|install|link|relink|uninstall) ;;
-
-  # Catch anything else as an error
-  *) func_error "invalid argument for $opt"
-     exit_cmd=exit
-     break
-     ;;
-esac
-			shift
-			;;
-      --no-silent|--no-quiet)
-			opt_silent=false
-func_append preserve_args " $opt"
-			;;
-      --no-warning|--no-warn)
-			opt_warning=false
-func_append preserve_args " $opt"
-			;;
-      --no-verbose)
-			opt_verbose=false
-func_append preserve_args " $opt"
-			;;
-      --silent|--quiet)
-			opt_silent=:
-func_append preserve_args " $opt"
-        opt_verbose=false
-			;;
-      --verbose|-v)
-			opt_verbose=:
-func_append preserve_args " $opt"
-opt_silent=false
-			;;
-      --tag)
-			test $# = 0 && func_missing_arg $opt && break
-			optarg="$1"
-			opt_tag="$optarg"
-func_append preserve_args " $opt $optarg"
-func_enable_tag "$optarg"
-			shift
-			;;
-
-      -\?|-h)		func_usage				;;
-      --help)		func_help				;;
-      --version)	func_version				;;
-
-      # Separate optargs to long options:
-      --*=*)
-			func_split_long_opt "$opt"
-			set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
-			shift
-			;;
-
-      # Separate non-argument short options:
-      -\?*|-h*|-n*|-v*)
-			func_split_short_opt "$opt"
-			set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
-			shift
-			;;
-
-      --)		break					;;
-      -*)		func_fatal_help "unrecognized option \`$opt'" ;;
-      *)		set dummy "$opt" ${1+"$@"};	shift; break  ;;
-    esac
-  done
+    $debug_cmd
 
-  # Validate options:
+    # 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
 
-  # save first non-option argument
-  if test "$#" -gt 0; then
-    nonopt="$opt"
-    shift
-  fi
 
-  # preserve --debug
-  test "$opt_debug" = : || func_append preserve_args " --debug"
+    # 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
 
-  case $host in
-    *cygwin* | *mingw* | *pw32* | *cegcc*)
-      # don't eliminate duplications in $postdeps and $predeps
-      opt_duplicate_compiler_generated_deps=:
-      ;;
-    *)
-      opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
-      ;;
-  esac
 
-  $opt_help || {
-    # Sanity checks first:
-    func_check_version_match
 
-    if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
-      func_fatal_configuration "not configured to build any kind of library"
+# 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
 
-    # Darwin sucks
-    eval std_shrext=\"$shrext_cmds\"
+    # preserve --debug
+    test : = "$debug_cmd" || func_append preserve_args " --debug"
 
-    # Only execute mode is allowed to have -dlopen flags.
-    if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
-      func_error "unrecognized option \`-dlopen'"
-      $ECHO "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
+    case $host in
+      # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
+      # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
+      *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
+        # don't eliminate duplications in $postdeps and $predeps
+        opt_duplicate_compiler_generated_deps=:
+        ;;
+      *)
+        opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
+        ;;
+    esac
 
-    # Change the help message to a mode-specific one.
-    generic_help="$help"
-    help="Try \`$progname --help --mode=$opt_mode' for more information."
-  }
+    $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."
+    }
 
-  # Bail if the options were screwed
-  $exit_cmd $EXIT_FAILURE
+    # 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
+
 
 
 ## ----------- ##
 ##    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_generated_by_libtool
+# True iff stdin has been generated by Libtool. This function is only
+# a basic sanity check; it will hardly flush out determined imposters.
+func_generated_by_libtool_p ()
+{
+  $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
 # func_lalib_p file
-# True iff FILE is a libtool `.la' library or `.lo' object file.
+# True iff FILE is a libtool '.la' library or '.lo' object file.
 # This function is only a basic sanity check; it will hardly flush out
 # determined imposters.
 func_lalib_p ()
 {
     test -f "$1" &&
-      $SED -e 4q "$1" 2>/dev/null \
-        | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+      $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p
 }
 
 # func_lalib_unsafe_p file
-# True iff FILE is a libtool `.la' library or `.lo' object file.
+# True iff FILE is a libtool '.la' library or '.lo' object file.
 # This function implements the same check as func_lalib_p without
 # resorting to external programs.  To this end, it redirects stdin and
 # closes it afterwards, without saving the original file descriptor.
 # As a safety measure, use it only where a negative result would be
-# fatal anyway.  Works if `file' does not exist.
+# fatal anyway.  Works if 'file' does not exist.
 func_lalib_unsafe_p ()
 {
     lalib_p=no
@@ -1249,13 +2521,13 @@ func_lalib_unsafe_p ()
 	for lalib_p_l in 1 2 3 4
 	do
 	    read lalib_p_line
-	    case "$lalib_p_line" in
+	    case $lalib_p_line in
 		\#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
 	    esac
 	done
 	exec 0<&5 5<&-
     fi
-    test "$lalib_p" = yes
+    test yes = "$lalib_p"
 }
 
 # func_ltwrapper_script_p file
@@ -1264,7 +2536,8 @@ func_lalib_unsafe_p ()
 # determined imposters.
 func_ltwrapper_script_p ()
 {
-    func_lalib_p "$1"
+    test -f "$1" &&
+      $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p
 }
 
 # func_ltwrapper_executable_p file
@@ -1289,7 +2562,7 @@ func_ltwrapper_scriptname ()
 {
     func_dirname_and_basename "$1" "" "."
     func_stripname '' '.exe' "$func_basename_result"
-    func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
+    func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper
 }
 
 # func_ltwrapper_p file
@@ -1308,11 +2581,13 @@ func_ltwrapper_p ()
 # FAIL_CMD may read-access the current command in variable CMD!
 func_execute_cmds ()
 {
-    $opt_debug
+    $debug_cmd
+
     save_ifs=$IFS; IFS='~'
     for cmd in $1; do
-      IFS=$save_ifs
+      IFS=$sp$nl
       eval cmd=\"$cmd\"
+      IFS=$save_ifs
       func_show_eval "$cmd" "${2-:}"
     done
     IFS=$save_ifs
@@ -1324,10 +2599,11 @@ func_execute_cmds ()
 # Note that it is not necessary on cygwin/mingw to append a dot to
 # FILE even if both FILE and FILE.exe exist: automatic-append-.exe
 # behavior happens only for exec(3), not for open(2)!  Also, sourcing
-# `FILE.' does not work on cygwin managed mounts.
+# 'FILE.' does not work on cygwin managed mounts.
 func_source ()
 {
-    $opt_debug
+    $debug_cmd
+
     case $1 in
     */* | *\\*)	. "$1" ;;
     *)		. "./$1" ;;
@@ -1354,10 +2630,10 @@ func_resolve_sysroot ()
 # store the result into func_replace_sysroot_result.
 func_replace_sysroot ()
 {
-  case "$lt_sysroot:$1" in
+  case $lt_sysroot:$1 in
   ?*:"$lt_sysroot"*)
     func_stripname "$lt_sysroot" '' "$1"
-    func_replace_sysroot_result="=$func_stripname_result"
+    func_replace_sysroot_result='='$func_stripname_result
     ;;
   *)
     # Including no sysroot.
@@ -1374,7 +2650,8 @@ func_replace_sysroot ()
 # arg is usually of the form 'gcc ...'
 func_infer_tag ()
 {
-    $opt_debug
+    $debug_cmd
+
     if test -n "$available_tags" && test -z "$tagname"; then
       CC_quoted=
       for arg in $CC; do
@@ -1393,7 +2670,7 @@ func_infer_tag ()
 	for z in $available_tags; do
 	  if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
 	    # Evaluate the configuration.
-	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+	    eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
 	    CC_quoted=
 	    for arg in $CC; do
 	      # Double-quote args containing other shell metacharacters.
@@ -1418,7 +2695,7 @@ func_infer_tag ()
 	# line option must be used.
 	if test -z "$tagname"; then
 	  func_echo "unable to infer tagged configuration"
-	  func_fatal_error "specify a tag with \`--tag'"
+	  func_fatal_error "specify a tag with '--tag'"
 #	else
 #	  func_verbose "using $tagname tagged configuration"
 	fi
@@ -1434,15 +2711,15 @@ func_infer_tag ()
 # but don't create it if we're doing a dry run.
 func_write_libtool_object ()
 {
-    write_libobj=${1}
-    if test "$build_libtool_libs" = yes; then
-      write_lobj=\'${2}\'
+    write_libobj=$1
+    if test yes = "$build_libtool_libs"; then
+      write_lobj=\'$2\'
     else
       write_lobj=none
     fi
 
-    if test "$build_old_libs" = yes; then
-      write_oldobj=\'${3}\'
+    if test yes = "$build_old_libs"; then
+      write_oldobj=\'$3\'
     else
       write_oldobj=none
     fi
@@ -1450,7 +2727,7 @@ func_write_libtool_object ()
     $opt_dry_run || {
       cat >${write_libobj}T <<EOF
 # $write_libobj - a libtool object file
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
 #
 # Please DO NOT delete this file!
 # It is necessary for linking the library.
@@ -1462,7 +2739,7 @@ pic_object=$write_lobj
 non_pic_object=$write_oldobj
 
 EOF
-      $MV "${write_libobj}T" "${write_libobj}"
+      $MV "${write_libobj}T" "$write_libobj"
     }
 }
 
@@ -1482,8 +2759,9 @@ EOF
 # be empty on error (or when ARG is empty)
 func_convert_core_file_wine_to_w32 ()
 {
-  $opt_debug
-  func_convert_core_file_wine_to_w32_result="$1"
+  $debug_cmd
+
+  func_convert_core_file_wine_to_w32_result=$1
   if test -n "$1"; then
     # Unfortunately, winepath does not exit with a non-zero error code, so we
     # are forced to check the contents of stdout. On the other hand, if the
@@ -1491,9 +2769,9 @@ func_convert_core_file_wine_to_w32 ()
     # *an error message* to stdout. So we must check for both error code of
     # zero AND non-empty stdout, which explains the odd construction:
     func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
-    if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
+    if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then
       func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
-        $SED -e "$lt_sed_naive_backslashify"`
+        $SED -e "$sed_naive_backslashify"`
     else
       func_convert_core_file_wine_to_w32_result=
     fi
@@ -1514,18 +2792,19 @@ func_convert_core_file_wine_to_w32 ()
 # are convertible, then the result may be empty.
 func_convert_core_path_wine_to_w32 ()
 {
-  $opt_debug
+  $debug_cmd
+
   # unfortunately, winepath doesn't convert paths, only file names
-  func_convert_core_path_wine_to_w32_result=""
+  func_convert_core_path_wine_to_w32_result=
   if test -n "$1"; then
     oldIFS=$IFS
     IFS=:
     for func_convert_core_path_wine_to_w32_f in $1; do
       IFS=$oldIFS
       func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
-      if test -n "$func_convert_core_file_wine_to_w32_result" ; then
+      if test -n "$func_convert_core_file_wine_to_w32_result"; then
         if test -z "$func_convert_core_path_wine_to_w32_result"; then
-          func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
+          func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result
         else
           func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
         fi
@@ -1554,7 +2833,8 @@ func_convert_core_path_wine_to_w32 ()
 # environment variable; do not put it in $PATH.
 func_cygpath ()
 {
-  $opt_debug
+  $debug_cmd
+
   if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
     func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
     if test "$?" -ne 0; then
@@ -1563,7 +2843,7 @@ func_cygpath ()
     fi
   else
     func_cygpath_result=
-    func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
+    func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'"
   fi
 }
 #end: func_cygpath
@@ -1574,10 +2854,11 @@ func_cygpath ()
 # result in func_convert_core_msys_to_w32_result.
 func_convert_core_msys_to_w32 ()
 {
-  $opt_debug
+  $debug_cmd
+
   # awkward: cmd appends spaces to result
   func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
-    $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
+    $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"`
 }
 #end: func_convert_core_msys_to_w32
 
@@ -1588,13 +2869,14 @@ func_convert_core_msys_to_w32 ()
 # func_to_host_file_result to ARG1).
 func_convert_file_check ()
 {
-  $opt_debug
-  if test -z "$2" && test -n "$1" ; then
+  $debug_cmd
+
+  if test -z "$2" && test -n "$1"; then
     func_error "Could not determine host file name corresponding to"
-    func_error "  \`$1'"
+    func_error "  '$1'"
     func_error "Continuing, but uninstalled executables may not work."
     # Fallback:
-    func_to_host_file_result="$1"
+    func_to_host_file_result=$1
   fi
 }
 # end func_convert_file_check
@@ -1606,10 +2888,11 @@ func_convert_file_check ()
 # func_to_host_file_result to a simplistic fallback value (see below).
 func_convert_path_check ()
 {
-  $opt_debug
+  $debug_cmd
+
   if test -z "$4" && test -n "$3"; then
     func_error "Could not determine the host path corresponding to"
-    func_error "  \`$3'"
+    func_error "  '$3'"
     func_error "Continuing, but uninstalled executables may not work."
     # Fallback.  This is a deliberately simplistic "conversion" and
     # should not be "improved".  See libtool.info.
@@ -1618,7 +2901,7 @@ func_convert_path_check ()
       func_to_host_path_result=`echo "$3" |
         $SED -e "$lt_replace_pathsep_chars"`
     else
-      func_to_host_path_result="$3"
+      func_to_host_path_result=$3
     fi
   fi
 }
@@ -1630,9 +2913,10 @@ func_convert_path_check ()
 # and appending REPL if ORIG matches BACKPAT.
 func_convert_path_front_back_pathsep ()
 {
-  $opt_debug
+  $debug_cmd
+
   case $4 in
-  $1 ) func_to_host_path_result="$3$func_to_host_path_result"
+  $1 ) func_to_host_path_result=$3$func_to_host_path_result
     ;;
   esac
   case $4 in
@@ -1646,7 +2930,7 @@ func_convert_path_front_back_pathsep ()
 ##################################################
 # $build to $host FILE NAME CONVERSION FUNCTIONS #
 ##################################################
-# invoked via `$to_host_file_cmd ARG'
+# invoked via '$to_host_file_cmd ARG'
 #
 # In each case, ARG is the path to be converted from $build to $host format.
 # Result will be available in $func_to_host_file_result.
@@ -1657,7 +2941,8 @@ func_convert_path_front_back_pathsep ()
 # in func_to_host_file_result.
 func_to_host_file ()
 {
-  $opt_debug
+  $debug_cmd
+
   $to_host_file_cmd "$1"
 }
 # end func_to_host_file
@@ -1669,7 +2954,8 @@ func_to_host_file ()
 # in (the comma separated) LAZY, no conversion takes place.
 func_to_tool_file ()
 {
-  $opt_debug
+  $debug_cmd
+
   case ,$2, in
     *,"$to_tool_file_cmd",*)
       func_to_tool_file_result=$1
@@ -1687,7 +2973,7 @@ func_to_tool_file ()
 # Copy ARG to func_to_host_file_result.
 func_convert_file_noop ()
 {
-  func_to_host_file_result="$1"
+  func_to_host_file_result=$1
 }
 # end func_convert_file_noop
 
@@ -1698,11 +2984,12 @@ func_convert_file_noop ()
 # func_to_host_file_result.
 func_convert_file_msys_to_w32 ()
 {
-  $opt_debug
-  func_to_host_file_result="$1"
+  $debug_cmd
+
+  func_to_host_file_result=$1
   if test -n "$1"; then
     func_convert_core_msys_to_w32 "$1"
-    func_to_host_file_result="$func_convert_core_msys_to_w32_result"
+    func_to_host_file_result=$func_convert_core_msys_to_w32_result
   fi
   func_convert_file_check "$1" "$func_to_host_file_result"
 }
@@ -1714,8 +3001,9 @@ func_convert_file_msys_to_w32 ()
 # func_to_host_file_result.
 func_convert_file_cygwin_to_w32 ()
 {
-  $opt_debug
-  func_to_host_file_result="$1"
+  $debug_cmd
+
+  func_to_host_file_result=$1
   if test -n "$1"; then
     # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
     # LT_CYGPATH in this case.
@@ -1731,11 +3019,12 @@ func_convert_file_cygwin_to_w32 ()
 # and a working winepath. Returns result in func_to_host_file_result.
 func_convert_file_nix_to_w32 ()
 {
-  $opt_debug
-  func_to_host_file_result="$1"
+  $debug_cmd
+
+  func_to_host_file_result=$1
   if test -n "$1"; then
     func_convert_core_file_wine_to_w32 "$1"
-    func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
+    func_to_host_file_result=$func_convert_core_file_wine_to_w32_result
   fi
   func_convert_file_check "$1" "$func_to_host_file_result"
 }
@@ -1747,12 +3036,13 @@ func_convert_file_nix_to_w32 ()
 # Returns result in func_to_host_file_result.
 func_convert_file_msys_to_cygwin ()
 {
-  $opt_debug
-  func_to_host_file_result="$1"
+  $debug_cmd
+
+  func_to_host_file_result=$1
   if test -n "$1"; then
     func_convert_core_msys_to_w32 "$1"
     func_cygpath -u "$func_convert_core_msys_to_w32_result"
-    func_to_host_file_result="$func_cygpath_result"
+    func_to_host_file_result=$func_cygpath_result
   fi
   func_convert_file_check "$1" "$func_to_host_file_result"
 }
@@ -1765,13 +3055,14 @@ func_convert_file_msys_to_cygwin ()
 # in func_to_host_file_result.
 func_convert_file_nix_to_cygwin ()
 {
-  $opt_debug
-  func_to_host_file_result="$1"
+  $debug_cmd
+
+  func_to_host_file_result=$1
   if test -n "$1"; then
     # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
     func_convert_core_file_wine_to_w32 "$1"
     func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
-    func_to_host_file_result="$func_cygpath_result"
+    func_to_host_file_result=$func_cygpath_result
   fi
   func_convert_file_check "$1" "$func_to_host_file_result"
 }
@@ -1781,7 +3072,7 @@ func_convert_file_nix_to_cygwin ()
 #############################################
 # $build to $host PATH CONVERSION FUNCTIONS #
 #############################################
-# invoked via `$to_host_path_cmd ARG'
+# invoked via '$to_host_path_cmd ARG'
 #
 # In each case, ARG is the path to be converted from $build to $host format.
 # The result will be available in $func_to_host_path_result.
@@ -1805,10 +3096,11 @@ func_convert_file_nix_to_cygwin ()
 to_host_path_cmd=
 func_init_to_host_path_cmd ()
 {
-  $opt_debug
+  $debug_cmd
+
   if test -z "$to_host_path_cmd"; then
     func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
-    to_host_path_cmd="func_convert_path_${func_stripname_result}"
+    to_host_path_cmd=func_convert_path_$func_stripname_result
   fi
 }
 
@@ -1818,7 +3110,8 @@ func_init_to_host_path_cmd ()
 # in func_to_host_path_result.
 func_to_host_path ()
 {
-  $opt_debug
+  $debug_cmd
+
   func_init_to_host_path_cmd
   $to_host_path_cmd "$1"
 }
@@ -1829,7 +3122,7 @@ func_to_host_path ()
 # Copy ARG to func_to_host_path_result.
 func_convert_path_noop ()
 {
-  func_to_host_path_result="$1"
+  func_to_host_path_result=$1
 }
 # end func_convert_path_noop
 
@@ -1840,8 +3133,9 @@ func_convert_path_noop ()
 # func_to_host_path_result.
 func_convert_path_msys_to_w32 ()
 {
-  $opt_debug
-  func_to_host_path_result="$1"
+  $debug_cmd
+
+  func_to_host_path_result=$1
   if test -n "$1"; then
     # Remove leading and trailing path separator characters from ARG.  MSYS
     # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
@@ -1849,7 +3143,7 @@ func_convert_path_msys_to_w32 ()
     func_stripname : : "$1"
     func_to_host_path_tmp1=$func_stripname_result
     func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
-    func_to_host_path_result="$func_convert_core_msys_to_w32_result"
+    func_to_host_path_result=$func_convert_core_msys_to_w32_result
     func_convert_path_check : ";" \
       "$func_to_host_path_tmp1" "$func_to_host_path_result"
     func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
@@ -1863,8 +3157,9 @@ func_convert_path_msys_to_w32 ()
 # func_to_host_file_result.
 func_convert_path_cygwin_to_w32 ()
 {
-  $opt_debug
-  func_to_host_path_result="$1"
+  $debug_cmd
+
+  func_to_host_path_result=$1
   if test -n "$1"; then
     # See func_convert_path_msys_to_w32:
     func_stripname : : "$1"
@@ -1883,14 +3178,15 @@ func_convert_path_cygwin_to_w32 ()
 # a working winepath.  Returns result in func_to_host_file_result.
 func_convert_path_nix_to_w32 ()
 {
-  $opt_debug
-  func_to_host_path_result="$1"
+  $debug_cmd
+
+  func_to_host_path_result=$1
   if test -n "$1"; then
     # See func_convert_path_msys_to_w32:
     func_stripname : : "$1"
     func_to_host_path_tmp1=$func_stripname_result
     func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
-    func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
+    func_to_host_path_result=$func_convert_core_path_wine_to_w32_result
     func_convert_path_check : ";" \
       "$func_to_host_path_tmp1" "$func_to_host_path_result"
     func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
@@ -1904,15 +3200,16 @@ func_convert_path_nix_to_w32 ()
 # Returns result in func_to_host_file_result.
 func_convert_path_msys_to_cygwin ()
 {
-  $opt_debug
-  func_to_host_path_result="$1"
+  $debug_cmd
+
+  func_to_host_path_result=$1
   if test -n "$1"; then
     # See func_convert_path_msys_to_w32:
     func_stripname : : "$1"
     func_to_host_path_tmp1=$func_stripname_result
     func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
     func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
-    func_to_host_path_result="$func_cygpath_result"
+    func_to_host_path_result=$func_cygpath_result
     func_convert_path_check : : \
       "$func_to_host_path_tmp1" "$func_to_host_path_result"
     func_convert_path_front_back_pathsep ":*" "*:" : "$1"
@@ -1927,8 +3224,9 @@ func_convert_path_msys_to_cygwin ()
 # func_to_host_file_result.
 func_convert_path_nix_to_cygwin ()
 {
-  $opt_debug
-  func_to_host_path_result="$1"
+  $debug_cmd
+
+  func_to_host_path_result=$1
   if test -n "$1"; then
     # Remove leading and trailing path separator characters from
     # ARG. msys behavior is inconsistent here, cygpath turns them
@@ -1937,7 +3235,7 @@ func_convert_path_nix_to_cygwin ()
     func_to_host_path_tmp1=$func_stripname_result
     func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
     func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
-    func_to_host_path_result="$func_cygpath_result"
+    func_to_host_path_result=$func_cygpath_result
     func_convert_path_check : : \
       "$func_to_host_path_tmp1" "$func_to_host_path_result"
     func_convert_path_front_back_pathsep ":*" "*:" : "$1"
@@ -1946,13 +3244,31 @@ func_convert_path_nix_to_cygwin ()
 # end func_convert_path_nix_to_cygwin
 
 
+# func_dll_def_p FILE
+# True iff FILE is a Windows DLL '.def' file.
+# Keep in sync with _LT_DLL_DEF_P in libtool.m4
+func_dll_def_p ()
+{
+  $debug_cmd
+
+  func_dll_def_p_tmp=`$SED -n \
+    -e 's/^[	 ]*//' \
+    -e '/^\(;.*\)*$/d' \
+    -e 's/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p' \
+    -e q \
+    "$1"`
+  test DEF = "$func_dll_def_p_tmp"
+}
+
+
 # func_mode_compile arg...
 func_mode_compile ()
 {
-    $opt_debug
+    $debug_cmd
+
     # Get the compilation command and the source file.
     base_compile=
-    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
+    srcfile=$nonopt  #  always keep a non-empty value in "srcfile"
     suppress_opt=yes
     suppress_output=
     arg_mode=normal
@@ -1965,12 +3281,12 @@ func_mode_compile ()
       case $arg_mode in
       arg  )
 	# do not "continue".  Instead, add this to base_compile
-	lastarg="$arg"
+	lastarg=$arg
 	arg_mode=normal
 	;;
 
       target )
-	libobj="$arg"
+	libobj=$arg
 	arg_mode=normal
 	continue
 	;;
@@ -1980,7 +3296,7 @@ func_mode_compile ()
 	case $arg in
 	-o)
 	  test -n "$libobj" && \
-	    func_fatal_error "you cannot specify \`-o' more than once"
+	    func_fatal_error "you cannot specify '-o' more than once"
 	  arg_mode=target
 	  continue
 	  ;;
@@ -2009,12 +3325,12 @@ func_mode_compile ()
 	  func_stripname '-Wc,' '' "$arg"
 	  args=$func_stripname_result
 	  lastarg=
-	  save_ifs="$IFS"; IFS=','
+	  save_ifs=$IFS; IFS=,
 	  for arg in $args; do
-	    IFS="$save_ifs"
+	    IFS=$save_ifs
 	    func_append_quoted lastarg "$arg"
 	  done
-	  IFS="$save_ifs"
+	  IFS=$save_ifs
 	  func_stripname ' ' '' "$lastarg"
 	  lastarg=$func_stripname_result
 
@@ -2027,8 +3343,8 @@ func_mode_compile ()
 	  # Accept the current argument as the source file.
 	  # The previous "srcfile" becomes the current argument.
 	  #
-	  lastarg="$srcfile"
-	  srcfile="$arg"
+	  lastarg=$srcfile
+	  srcfile=$arg
 	  ;;
 	esac  #  case $arg
 	;;
@@ -2043,13 +3359,13 @@ func_mode_compile ()
       func_fatal_error "you must specify an argument for -Xcompile"
       ;;
     target)
-      func_fatal_error "you must specify a target with \`-o'"
+      func_fatal_error "you must specify a target with '-o'"
       ;;
     *)
       # Get the name of the library object.
       test -z "$libobj" && {
 	func_basename "$srcfile"
-	libobj="$func_basename_result"
+	libobj=$func_basename_result
       }
       ;;
     esac
@@ -2069,7 +3385,7 @@ func_mode_compile ()
     case $libobj in
     *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
     *)
-      func_fatal_error "cannot determine name of library object from \`$libobj'"
+      func_fatal_error "cannot determine name of library object from '$libobj'"
       ;;
     esac
 
@@ -2078,8 +3394,8 @@ func_mode_compile ()
     for arg in $later; do
       case $arg in
       -shared)
-	test "$build_libtool_libs" != yes && \
-	  func_fatal_configuration "can not build a shared library"
+	test yes = "$build_libtool_libs" \
+	  || func_fatal_configuration "cannot build a shared library"
 	build_old_libs=no
 	continue
 	;;
@@ -2105,17 +3421,17 @@ func_mode_compile ()
     func_quote_for_eval "$libobj"
     test "X$libobj" != "X$func_quote_for_eval_result" \
       && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"'	 &()|`$[]' \
-      && func_warning "libobj name \`$libobj' may not contain shell special characters."
+      && func_warning "libobj name '$libobj' may not contain shell special characters."
     func_dirname_and_basename "$obj" "/" ""
-    objname="$func_basename_result"
-    xdir="$func_dirname_result"
-    lobj=${xdir}$objdir/$objname
+    objname=$func_basename_result
+    xdir=$func_dirname_result
+    lobj=$xdir$objdir/$objname
 
     test -z "$base_compile" && \
       func_fatal_help "you must specify a compilation command"
 
     # Delete any leftover library objects.
-    if test "$build_old_libs" = yes; then
+    if test yes = "$build_old_libs"; then
       removelist="$obj $lobj $libobj ${libobj}T"
     else
       removelist="$lobj $libobj ${libobj}T"
@@ -2127,16 +3443,16 @@ func_mode_compile ()
       pic_mode=default
       ;;
     esac
-    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+    if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then
       # non-PIC code in shared libraries is not supported
       pic_mode=default
     fi
 
     # Calculate the filename of the output object if compiler does
     # not support -o with -c
-    if test "$compiler_c_o" = no; then
-      output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
-      lockfile="$output_obj.lock"
+    if test no = "$compiler_c_o"; then
+      output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext
+      lockfile=$output_obj.lock
     else
       output_obj=
       need_locks=no
@@ -2145,12 +3461,12 @@ func_mode_compile ()
 
     # Lock this critical section if it is needed
     # We use this script file to make the link, it avoids creating a new file
-    if test "$need_locks" = yes; then
+    if test yes = "$need_locks"; then
       until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
 	func_echo "Waiting for $lockfile to be removed"
 	sleep 2
       done
-    elif test "$need_locks" = warn; then
+    elif test warn = "$need_locks"; then
       if test -f "$lockfile"; then
 	$ECHO "\
 *** ERROR, $lockfile exists and contains:
@@ -2158,7 +3474,7 @@ func_mode_compile ()
 
 This indicates that another process is trying to use the same
 temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
+your compiler does not support '-c' and '-o' together.  If you
 repeat this compilation, it may succeed, by chance, but you had better
 avoid parallel builds (make -j) in this platform, or get a better
 compiler."
@@ -2180,11 +3496,11 @@ compiler."
     qsrcfile=$func_quote_for_eval_result
 
     # Only build a PIC object if we are building libtool libraries.
-    if test "$build_libtool_libs" = yes; then
+    if test yes = "$build_libtool_libs"; then
       # Without this assignment, base_compile gets emptied.
       fbsd_hideous_sh_bug=$base_compile
 
-      if test "$pic_mode" != no; then
+      if test no != "$pic_mode"; then
 	command="$base_compile $qsrcfile $pic_flag"
       else
 	# Don't build PIC code
@@ -2201,7 +3517,7 @@ compiler."
       func_show_eval_locale "$command"	\
           'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
 
-      if test "$need_locks" = warn &&
+      if test warn = "$need_locks" &&
 	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
 	$ECHO "\
 *** ERROR, $lockfile contains:
@@ -2212,7 +3528,7 @@ $srcfile
 
 This indicates that another process is trying to use the same
 temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
+your compiler does not support '-c' and '-o' together.  If you
 repeat this compilation, it may succeed, by chance, but you had better
 avoid parallel builds (make -j) in this platform, or get a better
 compiler."
@@ -2228,20 +3544,20 @@ compiler."
       fi
 
       # Allow error messages only from the first compilation.
-      if test "$suppress_opt" = yes; then
+      if test yes = "$suppress_opt"; then
 	suppress_output=' >/dev/null 2>&1'
       fi
     fi
 
     # Only build a position-dependent object if we build old libraries.
-    if test "$build_old_libs" = yes; then
-      if test "$pic_mode" != yes; then
+    if test yes = "$build_old_libs"; then
+      if test yes != "$pic_mode"; then
 	# Don't build PIC code
 	command="$base_compile $qsrcfile$pie_flag"
       else
 	command="$base_compile $qsrcfile $pic_flag"
       fi
-      if test "$compiler_c_o" = yes; then
+      if test yes = "$compiler_c_o"; then
 	func_append command " -o $obj"
       fi
 
@@ -2250,7 +3566,7 @@ compiler."
       func_show_eval_locale "$command" \
         '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
 
-      if test "$need_locks" = warn &&
+      if test warn = "$need_locks" &&
 	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
 	$ECHO "\
 *** ERROR, $lockfile contains:
@@ -2261,7 +3577,7 @@ $srcfile
 
 This indicates that another process is trying to use the same
 temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
+your compiler does not support '-c' and '-o' together.  If you
 repeat this compilation, it may succeed, by chance, but you had better
 avoid parallel builds (make -j) in this platform, or get a better
 compiler."
@@ -2281,7 +3597,7 @@ compiler."
       func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
 
       # Unlock the critical section if it was locked
-      if test "$need_locks" != no; then
+      if test no != "$need_locks"; then
 	removelist=$lockfile
         $RM "$lockfile"
       fi
@@ -2291,7 +3607,7 @@ compiler."
 }
 
 $opt_help || {
-  test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
+  test compile = "$opt_mode" && func_mode_compile ${1+"$@"}
 }
 
 func_mode_help ()
@@ -2311,7 +3627,7 @@ func_mode_help ()
 Remove files from the build directory.
 
 RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+(typically '/bin/rm').  RM-OPTIONS are options (such as '-f') to be passed
 to RM.
 
 If FILE is a libtool library, object or program, all the files associated
@@ -2330,16 +3646,16 @@ This mode accepts the following additional options:
   -no-suppress      do not suppress compiler output for multiple passes
   -prefer-pic       try to build PIC objects only
   -prefer-non-pic   try to build non-PIC objects only
-  -shared           do not build a \`.o' file suitable for static linking
-  -static           only build a \`.o' file suitable for static linking
+  -shared           do not build a '.o' file suitable for static linking
+  -static           only build a '.o' file suitable for static linking
   -Wc,FLAG          pass FLAG directly to the compiler
 
-COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+COMPILE-COMMAND is a command to be used in creating a 'standard' object file
 from the given SOURCEFILE.
 
 The output file name is determined by removing the directory component from
-SOURCEFILE, then substituting the C source code suffix \`.c' with the
-library object suffix, \`.lo'."
+SOURCEFILE, then substituting the C source code suffix '.c' with the
+library object suffix, '.lo'."
         ;;
 
       execute)
@@ -2352,7 +3668,7 @@ This mode accepts the following additional options:
 
   -dlopen FILE      add the directory containing FILE to the library path
 
-This mode sets the library path environment variable according to \`-dlopen'
+This mode sets the library path environment variable according to '-dlopen'
 flags.
 
 If any of the ARGS are libtool executable wrappers, then they are translated
@@ -2371,7 +3687,7 @@ Complete the installation of libtool libraries.
 Each LIBDIR is a directory that contains libtool libraries.
 
 The commands that this mode executes may require superuser privileges.  Use
-the \`--dry-run' option if you just want to see what would be executed."
+the '--dry-run' option if you just want to see what would be executed."
         ;;
 
       install)
@@ -2381,7 +3697,7 @@ the \`--dry-run' option if you just want to see what would be executed."
 Install executables or libraries.
 
 INSTALL-COMMAND is the installation command.  The first component should be
-either the \`install' or \`cp' program.
+either the 'install' or 'cp' program.
 
 The following components of INSTALL-COMMAND are treated specially:
 
@@ -2407,7 +3723,7 @@ The following components of LINK-COMMAND are treated specially:
   -avoid-version    do not add a version suffix if possible
   -bindir BINDIR    specify path to binaries directory (for systems where
                     libraries must be found in the PATH setting at runtime)
-  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
+  -dlopen FILE      '-dlpreopen' FILE if it cannot be dlopened at runtime
   -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
   -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
   -export-symbols SYMFILE
@@ -2421,7 +3737,8 @@ The following components of LINK-COMMAND are treated specially:
   -no-install       link a not-installable executable
   -no-undefined     declare that a library does not refer to external symbols
   -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
-  -objectlist FILE  Use a list of object files found in FILE to specify objects
+  -objectlist FILE  use a list of object files found in FILE to specify objects
+  -os2dllname NAME  force a short DLL name on OS/2 (no effect on other OSes)
   -precious-files-regex REGEX
                     don't remove output files matching REGEX
   -release RELEASE  specify package release information
@@ -2441,20 +3758,20 @@ The following components of LINK-COMMAND are treated specially:
   -Xlinker FLAG     pass linker-specific FLAG directly to the linker
   -XCClinker FLAG   pass link-specific FLAG to the compiler driver (CC)
 
-All other options (arguments beginning with \`-') are ignored.
+All other options (arguments beginning with '-') are ignored.
 
-Every other argument is treated as a filename.  Files ending in \`.la' are
+Every other argument is treated as a filename.  Files ending in '.la' are
 treated as uninstalled libtool libraries, other files are standard or library
 object files.
 
-If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
-only library objects (\`.lo' files) may be specified, and \`-rpath' is
+If the OUTPUT-FILE ends in '.la', then a libtool library is created,
+only library objects ('.lo' files) may be specified, and '-rpath' is
 required, except when creating a convenience library.
 
-If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
-using \`ar' and \`ranlib', or on Windows using \`lib'.
+If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created
+using 'ar' and 'ranlib', or on Windows using 'lib'.
 
-If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file
 is created, otherwise an executable program is created."
         ;;
 
@@ -2465,7 +3782,7 @@ is created, otherwise an executable program is created."
 Remove libraries from an installation directory.
 
 RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+(typically '/bin/rm').  RM-OPTIONS are options (such as '-f') to be passed
 to RM.
 
 If FILE is a libtool library, all the files associated with it are deleted.
@@ -2473,17 +3790,17 @@ Otherwise, only FILE itself is deleted using RM."
         ;;
 
       *)
-        func_fatal_help "invalid operation mode \`$opt_mode'"
+        func_fatal_help "invalid operation mode '$opt_mode'"
         ;;
     esac
 
     echo
-    $ECHO "Try \`$progname --help' for more information about other modes."
+    $ECHO "Try '$progname --help' for more information about other modes."
 }
 
 # Now that we've collected a possible --mode arg, show help if necessary
 if $opt_help; then
-  if test "$opt_help" = :; then
+  if test : = "$opt_help"; then
     func_mode_help
   else
     {
@@ -2491,7 +3808,7 @@ if $opt_help; then
       for opt_mode in compile link execute install finish uninstall clean; do
 	func_mode_help
       done
-    } | sed -n '1p; 2,$s/^Usage:/  or: /p'
+    } | $SED -n '1p; 2,$s/^Usage:/  or: /p'
     {
       func_help noexit
       for opt_mode in compile link execute install finish uninstall clean; do
@@ -2499,7 +3816,7 @@ if $opt_help; then
 	func_mode_help
       done
     } |
-    sed '1d
+    $SED '1d
       /^When reporting/,/^Report/{
 	H
 	d
@@ -2516,16 +3833,17 @@ fi
 # func_mode_execute arg...
 func_mode_execute ()
 {
-    $opt_debug
+    $debug_cmd
+
     # The first argument is the command name.
-    cmd="$nonopt"
+    cmd=$nonopt
     test -z "$cmd" && \
       func_fatal_help "you must specify a COMMAND"
 
     # Handle -dlopen flags immediately.
     for file in $opt_dlopen; do
       test -f "$file" \
-	|| func_fatal_help "\`$file' is not a file"
+	|| func_fatal_help "'$file' is not a file"
 
       dir=
       case $file in
@@ -2535,7 +3853,7 @@ func_mode_execute ()
 
 	# Check to see that this really is a libtool archive.
 	func_lalib_unsafe_p "$file" \
-	  || func_fatal_help "\`$lib' is not a valid libtool archive"
+	  || func_fatal_help "'$lib' is not a valid libtool archive"
 
 	# Read the libtool library.
 	dlname=
@@ -2546,18 +3864,18 @@ func_mode_execute ()
 	if test -z "$dlname"; then
 	  # Warn if it was a shared library.
 	  test -n "$library_names" && \
-	    func_warning "\`$file' was not linked with \`-export-dynamic'"
+	    func_warning "'$file' was not linked with '-export-dynamic'"
 	  continue
 	fi
 
 	func_dirname "$file" "" "."
-	dir="$func_dirname_result"
+	dir=$func_dirname_result
 
 	if test -f "$dir/$objdir/$dlname"; then
 	  func_append dir "/$objdir"
 	else
 	  if test ! -f "$dir/$dlname"; then
-	    func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
+	    func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'"
 	  fi
 	fi
 	;;
@@ -2565,18 +3883,18 @@ func_mode_execute ()
       *.lo)
 	# Just add the directory containing the .lo file.
 	func_dirname "$file" "" "."
-	dir="$func_dirname_result"
+	dir=$func_dirname_result
 	;;
 
       *)
-	func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
+	func_warning "'-dlopen' is ignored for non-libtool libraries and objects"
 	continue
 	;;
       esac
 
       # Get the absolute pathname.
       absdir=`cd "$dir" && pwd`
-      test -n "$absdir" && dir="$absdir"
+      test -n "$absdir" && dir=$absdir
 
       # Now add the directory to shlibpath_var.
       if eval "test -z \"\$$shlibpath_var\""; then
@@ -2588,7 +3906,7 @@ func_mode_execute ()
 
     # This variable tells wrapper scripts just to set shlibpath_var
     # rather than running their programs.
-    libtool_execute_magic="$magic"
+    libtool_execute_magic=$magic
 
     # Check if any of the arguments is a wrapper script.
     args=
@@ -2601,12 +3919,12 @@ func_mode_execute ()
 	if func_ltwrapper_script_p "$file"; then
 	  func_source "$file"
 	  # Transform arg to wrapped name.
-	  file="$progdir/$program"
+	  file=$progdir/$program
 	elif func_ltwrapper_executable_p "$file"; then
 	  func_ltwrapper_scriptname "$file"
 	  func_source "$func_ltwrapper_scriptname_result"
 	  # Transform arg to wrapped name.
-	  file="$progdir/$program"
+	  file=$progdir/$program
 	fi
 	;;
       esac
@@ -2614,7 +3932,15 @@ func_mode_execute ()
       func_append_quoted args "$file"
     done
 
-    if test "X$opt_dry_run" = Xfalse; then
+    if $opt_dry_run; then
+      # Display what would be done.
+      if test -n "$shlibpath_var"; then
+	eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+	echo "export $shlibpath_var"
+      fi
+      $ECHO "$cmd$args"
+      exit $EXIT_SUCCESS
+    else
       if test -n "$shlibpath_var"; then
 	# Export the shlibpath_var.
 	eval "export $shlibpath_var"
@@ -2631,25 +3957,18 @@ func_mode_execute ()
       done
 
       # Now prepare to actually exec the command.
-      exec_cmd="\$cmd$args"
-    else
-      # Display what would be done.
-      if test -n "$shlibpath_var"; then
-	eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
-	echo "export $shlibpath_var"
-      fi
-      $ECHO "$cmd$args"
-      exit $EXIT_SUCCESS
+      exec_cmd=\$cmd$args
     fi
 }
 
-test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
+test execute = "$opt_mode" && func_mode_execute ${1+"$@"}
 
 
 # func_mode_finish arg...
 func_mode_finish ()
 {
-    $opt_debug
+    $debug_cmd
+
     libs=
     libdirs=
     admincmds=
@@ -2663,11 +3982,11 @@ func_mode_finish ()
 	if func_lalib_unsafe_p "$opt"; then
 	  func_append libs " $opt"
 	else
-	  func_warning "\`$opt' is not a valid libtool archive"
+	  func_warning "'$opt' is not a valid libtool archive"
 	fi
 
       else
-	func_fatal_error "invalid argument \`$opt'"
+	func_fatal_error "invalid argument '$opt'"
       fi
     done
 
@@ -2682,12 +4001,12 @@ func_mode_finish ()
       # Remove sysroot references
       if $opt_dry_run; then
         for lib in $libs; do
-          echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
+          echo "removing references to $lt_sysroot and '=' prefixes from $lib"
         done
       else
         tmpdir=`func_mktempdir`
         for lib in $libs; do
-	  sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
+	  $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
 	    > $tmpdir/tmp-la
 	  mv -f $tmpdir/tmp-la $lib
 	done
@@ -2712,7 +4031,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 "----------------------------------------------------------------------"
@@ -2723,27 +4042,27 @@ func_mode_finish ()
       echo
       echo "If you ever happen to want to link against installed libraries"
       echo "in a given directory, LIBDIR, you must either use libtool, and"
-      echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+      echo "specify the full pathname of the library, or use the '-LLIBDIR'"
       echo "flag during linking and do at least one of the following:"
       if test -n "$shlibpath_var"; then
-	echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
+	echo "   - add LIBDIR to the '$shlibpath_var' environment variable"
 	echo "     during execution"
       fi
       if test -n "$runpath_var"; then
-	echo "   - add LIBDIR to the \`$runpath_var' environment variable"
+	echo "   - add LIBDIR to the '$runpath_var' environment variable"
 	echo "     during linking"
       fi
       if test -n "$hardcode_libdir_flag_spec"; then
 	libdir=LIBDIR
 	eval flag=\"$hardcode_libdir_flag_spec\"
 
-	$ECHO "   - use the \`$flag' linker flag"
+	$ECHO "   - use the '$flag' linker flag"
       fi
       if test -n "$admincmds"; then
 	$ECHO "   - have your system administrator run these commands:$admincmds"
       fi
       if test -f /etc/ld.so.conf; then
-	echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+	echo "   - have your system administrator add LIBDIR to '/etc/ld.so.conf'"
       fi
       echo
 
@@ -2762,18 +4081,20 @@ func_mode_finish ()
     exit $EXIT_SUCCESS
 }
 
-test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
+test finish = "$opt_mode" && func_mode_finish ${1+"$@"}
 
 
 # func_mode_install arg...
 func_mode_install ()
 {
-    $opt_debug
+    $debug_cmd
+
     # There may be an optional sh(1) argument at the beginning of
     # install_prog (especially on Windows NT).
-    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+    if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" ||
        # Allow the use of GNU shtool's install command.
-       case $nonopt in *shtool*) :;; *) false;; esac; then
+       case $nonopt in *shtool*) :;; *) false;; esac
+    then
       # Aesthetically quote it.
       func_quote_for_eval "$nonopt"
       install_prog="$func_quote_for_eval_result "
@@ -2800,7 +4121,7 @@ func_mode_install ()
     opts=
     prev=
     install_type=
-    isdir=no
+    isdir=false
     stripme=
     no_mode=:
     for arg
@@ -2813,7 +4134,7 @@ func_mode_install ()
       fi
 
       case $arg in
-      -d) isdir=yes ;;
+      -d) isdir=: ;;
       -f)
 	if $install_cp; then :; else
 	  prev=$arg
@@ -2831,7 +4152,7 @@ func_mode_install ()
       *)
 	# If the previous option needed an argument, then skip it.
 	if test -n "$prev"; then
-	  if test "x$prev" = x-m && test -n "$install_override_mode"; then
+	  if test X-m = "X$prev" && test -n "$install_override_mode"; then
 	    arg2=$install_override_mode
 	    no_mode=false
 	  fi
@@ -2856,7 +4177,7 @@ func_mode_install ()
       func_fatal_help "you must specify an install program"
 
     test -n "$prev" && \
-      func_fatal_help "the \`$prev' option requires an argument"
+      func_fatal_help "the '$prev' option requires an argument"
 
     if test -n "$install_override_mode" && $no_mode; then
       if $install_cp; then :; else
@@ -2878,19 +4199,19 @@ func_mode_install ()
     dest=$func_stripname_result
 
     # Check to see that the destination is a directory.
-    test -d "$dest" && isdir=yes
-    if test "$isdir" = yes; then
-      destdir="$dest"
+    test -d "$dest" && isdir=:
+    if $isdir; then
+      destdir=$dest
       destname=
     else
       func_dirname_and_basename "$dest" "" "."
-      destdir="$func_dirname_result"
-      destname="$func_basename_result"
+      destdir=$func_dirname_result
+      destname=$func_basename_result
 
       # Not a directory, so check to see that there is only one file specified.
       set dummy $files; shift
       test "$#" -gt 1 && \
-	func_fatal_help "\`$dest' is not a directory"
+	func_fatal_help "'$dest' is not a directory"
     fi
     case $destdir in
     [\\/]* | [A-Za-z]:[\\/]*) ;;
@@ -2899,7 +4220,7 @@ func_mode_install ()
 	case $file in
 	*.lo) ;;
 	*)
-	  func_fatal_help "\`$destdir' must be an absolute directory name"
+	  func_fatal_help "'$destdir' must be an absolute directory name"
 	  ;;
 	esac
       done
@@ -2908,7 +4229,7 @@ func_mode_install ()
 
     # This variable tells wrapper scripts just to set variables rather
     # than running their programs.
-    libtool_install_magic="$magic"
+    libtool_install_magic=$magic
 
     staticlibs=
     future_libdirs=
@@ -2928,7 +4249,7 @@ func_mode_install ()
 
 	# Check to see that this really is a libtool archive.
 	func_lalib_unsafe_p "$file" \
-	  || func_fatal_help "\`$file' is not a valid libtool archive"
+	  || func_fatal_help "'$file' is not a valid libtool archive"
 
 	library_names=
 	old_library=
@@ -2950,7 +4271,7 @@ func_mode_install ()
 	fi
 
 	func_dirname "$file" "/" ""
-	dir="$func_dirname_result"
+	dir=$func_dirname_result
 	func_append dir "$objdir"
 
 	if test -n "$relink_command"; then
@@ -2964,7 +4285,7 @@ func_mode_install ()
 	  # are installed into $libdir/../bin (currently, that works fine)
 	  # but it's something to keep an eye on.
 	  test "$inst_prefix_dir" = "$destdir" && \
-	    func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
+	    func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir"
 
 	  if test -n "$inst_prefix_dir"; then
 	    # Stick the inst_prefix_dir data into the link command.
@@ -2973,29 +4294,36 @@ func_mode_install ()
 	    relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
 	  fi
 
-	  func_warning "relinking \`$file'"
+	  func_warning "relinking '$file'"
 	  func_show_eval "$relink_command" \
-	    'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
+	    'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"'
 	fi
 
 	# See the names of the shared library.
 	set dummy $library_names; shift
 	if test -n "$1"; then
-	  realname="$1"
+	  realname=$1
 	  shift
 
-	  srcname="$realname"
-	  test -n "$relink_command" && srcname="$realname"T
+	  srcname=$realname
+	  test -n "$relink_command" && srcname=${realname}T
 
 	  # Install the shared library and build the symlinks.
 	  func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
 	      'exit $?'
-	  tstripme="$stripme"
+	  tstripme=$stripme
 	  case $host_os in
 	  cygwin* | mingw* | pw32* | cegcc*)
 	    case $realname in
 	    *.dll.a)
-	      tstripme=""
+	      tstripme=
+	      ;;
+	    esac
+	    ;;
+	  os2*)
+	    case $realname in
+	    *_dll.a)
+	      tstripme=
 	      ;;
 	    esac
 	    ;;
@@ -3006,7 +4334,7 @@ func_mode_install ()
 
 	  if test "$#" -gt 0; then
 	    # Delete the old symlinks, and create new ones.
-	    # Try `ln -sf' first, because the `ln' binary might depend on
+	    # Try 'ln -sf' first, because the 'ln' binary might depend on
 	    # the symlink we replace!  Solaris /bin/ln does not understand -f,
 	    # so we also need to try rm && ln -s.
 	    for linkname
@@ -3017,14 +4345,14 @@ func_mode_install ()
 	  fi
 
 	  # Do each command in the postinstall commands.
-	  lib="$destdir/$realname"
+	  lib=$destdir/$realname
 	  func_execute_cmds "$postinstall_cmds" 'exit $?'
 	fi
 
 	# Install the pseudo-library for information purposes.
 	func_basename "$file"
-	name="$func_basename_result"
-	instname="$dir/$name"i
+	name=$func_basename_result
+	instname=$dir/${name}i
 	func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
 
 	# Maybe install the static library, too.
@@ -3036,11 +4364,11 @@ func_mode_install ()
 
 	# Figure out destination file name, if it wasn't already specified.
 	if test -n "$destname"; then
-	  destfile="$destdir/$destname"
+	  destfile=$destdir/$destname
 	else
 	  func_basename "$file"
-	  destfile="$func_basename_result"
-	  destfile="$destdir/$destfile"
+	  destfile=$func_basename_result
+	  destfile=$destdir/$destfile
 	fi
 
 	# Deduce the name of the destination old-style object file.
@@ -3050,11 +4378,11 @@ func_mode_install ()
 	  staticdest=$func_lo2o_result
 	  ;;
 	*.$objext)
-	  staticdest="$destfile"
+	  staticdest=$destfile
 	  destfile=
 	  ;;
 	*)
-	  func_fatal_help "cannot copy a libtool object to \`$destfile'"
+	  func_fatal_help "cannot copy a libtool object to '$destfile'"
 	  ;;
 	esac
 
@@ -3063,7 +4391,7 @@ func_mode_install ()
 	  func_show_eval "$install_prog $file $destfile" 'exit $?'
 
 	# Install the old object if enabled.
-	if test "$build_old_libs" = yes; then
+	if test yes = "$build_old_libs"; then
 	  # Deduce the name of the old-style object file.
 	  func_lo2o "$file"
 	  staticobj=$func_lo2o_result
@@ -3075,23 +4403,23 @@ func_mode_install ()
       *)
 	# Figure out destination file name, if it wasn't already specified.
 	if test -n "$destname"; then
-	  destfile="$destdir/$destname"
+	  destfile=$destdir/$destname
 	else
 	  func_basename "$file"
-	  destfile="$func_basename_result"
-	  destfile="$destdir/$destfile"
+	  destfile=$func_basename_result
+	  destfile=$destdir/$destfile
 	fi
 
 	# If the file is missing, and there is a .exe on the end, strip it
 	# because it is most likely a libtool script we actually want to
 	# install
-	stripped_ext=""
+	stripped_ext=
 	case $file in
 	  *.exe)
 	    if test ! -f "$file"; then
 	      func_stripname '' '.exe' "$file"
 	      file=$func_stripname_result
-	      stripped_ext=".exe"
+	      stripped_ext=.exe
 	    fi
 	    ;;
 	esac
@@ -3119,19 +4447,19 @@ func_mode_install ()
 
 	  # Check the variables that should have been set.
 	  test -z "$generated_by_libtool_version" && \
-	    func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+	    func_fatal_error "invalid libtool wrapper script '$wrapper'"
 
-	  finalize=yes
+	  finalize=:
 	  for lib in $notinst_deplibs; do
 	    # Check to see that each library is installed.
 	    libdir=
 	    if test -f "$lib"; then
 	      func_source "$lib"
 	    fi
-	    libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
+	    libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'`
 	    if test -n "$libdir" && test ! -f "$libfile"; then
-	      func_warning "\`$lib' has not been installed in \`$libdir'"
-	      finalize=no
+	      func_warning "'$lib' has not been installed in '$libdir'"
+	      finalize=false
 	    fi
 	  done
 
@@ -3139,29 +4467,29 @@ func_mode_install ()
 	  func_source "$wrapper"
 
 	  outputname=
-	  if test "$fast_install" = no && test -n "$relink_command"; then
+	  if test no = "$fast_install" && test -n "$relink_command"; then
 	    $opt_dry_run || {
-	      if test "$finalize" = yes; then
+	      if $finalize; then
 	        tmpdir=`func_mktempdir`
 		func_basename "$file$stripped_ext"
-		file="$func_basename_result"
-	        outputname="$tmpdir/$file"
+		file=$func_basename_result
+	        outputname=$tmpdir/$file
 	        # Replace the output file specification.
 	        relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
 
-	        $opt_silent || {
+	        $opt_quiet || {
 	          func_quote_for_expand "$relink_command"
 		  eval "func_echo $func_quote_for_expand_result"
 	        }
 	        if eval "$relink_command"; then :
 	          else
-		  func_error "error: relink \`$file' with the above command before installing it"
+		  func_error "error: relink '$file' with the above command before installing it"
 		  $opt_dry_run || ${RM}r "$tmpdir"
 		  continue
 	        fi
-	        file="$outputname"
+	        file=$outputname
 	      else
-	        func_warning "cannot relink \`$file'"
+	        func_warning "cannot relink '$file'"
 	      fi
 	    }
 	  else
@@ -3198,10 +4526,10 @@ func_mode_install ()
 
     for file in $staticlibs; do
       func_basename "$file"
-      name="$func_basename_result"
+      name=$func_basename_result
 
       # Set up the ranlib parameters.
-      oldlib="$destdir/$name"
+      oldlib=$destdir/$name
       func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
       tool_oldlib=$func_to_tool_file_result
 
@@ -3216,18 +4544,18 @@ func_mode_install ()
     done
 
     test -n "$future_libdirs" && \
-      func_warning "remember to run \`$progname --finish$future_libdirs'"
+      func_warning "remember to run '$progname --finish$future_libdirs'"
 
     if test -n "$current_libdirs"; then
       # Maybe just do a dry run.
       $opt_dry_run && current_libdirs=" -n$current_libdirs"
-      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+      exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs'
     else
       exit $EXIT_SUCCESS
     fi
 }
 
-test "$opt_mode" = install && func_mode_install ${1+"$@"}
+test install = "$opt_mode" && func_mode_install ${1+"$@"}
 
 
 # func_generate_dlsyms outputname originator pic_p
@@ -3235,16 +4563,17 @@ test "$opt_mode" = install && func_mode_install ${1+"$@"}
 # a dlpreopen symbol table.
 func_generate_dlsyms ()
 {
-    $opt_debug
-    my_outputname="$1"
-    my_originator="$2"
-    my_pic_p="${3-no}"
-    my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+    $debug_cmd
+
+    my_outputname=$1
+    my_originator=$2
+    my_pic_p=${3-false}
+    my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'`
     my_dlsyms=
 
-    if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+    if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
       if test -n "$NM" && test -n "$global_symbol_pipe"; then
-	my_dlsyms="${my_outputname}S.c"
+	my_dlsyms=${my_outputname}S.c
       else
 	func_error "not configured to extract global symbols from dlpreopened files"
       fi
@@ -3255,7 +4584,7 @@ func_generate_dlsyms ()
       "") ;;
       *.c)
 	# Discover the nlist of each of the dlfiles.
-	nlist="$output_objdir/${my_outputname}.nm"
+	nlist=$output_objdir/$my_outputname.nm
 
 	func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
 
@@ -3263,34 +4592,36 @@ func_generate_dlsyms ()
 	func_verbose "creating $output_objdir/$my_dlsyms"
 
 	$opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
-/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
-/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
+/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */
 
 #ifdef __cplusplus
 extern \"C\" {
 #endif
 
-#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
 #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
 #endif
 
 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
-/* DATA imports from DLLs on WIN32 con't be const, because runtime
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
    relocations are performed -- see ld's documentation on pseudo-relocs.  */
 # define LT_DLSYM_CONST
-#elif defined(__osf__)
+#elif defined __osf__
 /* This system does not cope well with relocations in const data.  */
 # define LT_DLSYM_CONST
 #else
 # define LT_DLSYM_CONST const
 #endif
 
+#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
+
 /* External symbol declarations for the compiler. */\
 "
 
-	if test "$dlself" = yes; then
-	  func_verbose "generating symbol list for \`$output'"
+	if test yes = "$dlself"; then
+	  func_verbose "generating symbol list for '$output'"
 
 	  $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
 
@@ -3298,7 +4629,7 @@ extern \"C\" {
 	  progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
 	  for progfile in $progfiles; do
 	    func_to_tool_file "$progfile" func_convert_file_msys_to_w32
-	    func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
+	    func_verbose "extracting global C symbols from '$func_to_tool_file_result'"
 	    $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
 	  done
 
@@ -3318,10 +4649,10 @@ extern \"C\" {
 
 	  # Prepare the list of exported symbols
 	  if test -z "$export_symbols"; then
-	    export_symbols="$output_objdir/$outputname.exp"
+	    export_symbols=$output_objdir/$outputname.exp
 	    $opt_dry_run || {
 	      $RM $export_symbols
-	      eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+	      eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
 	      case $host in
 	      *cygwin* | *mingw* | *cegcc* )
                 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
@@ -3331,7 +4662,7 @@ extern \"C\" {
 	    }
 	  else
 	    $opt_dry_run || {
-	      eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+	      eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
 	      eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
 	      eval '$MV "$nlist"T "$nlist"'
 	      case $host in
@@ -3345,22 +4676,22 @@ extern \"C\" {
 	fi
 
 	for dlprefile in $dlprefiles; do
-	  func_verbose "extracting global C symbols from \`$dlprefile'"
+	  func_verbose "extracting global C symbols from '$dlprefile'"
 	  func_basename "$dlprefile"
-	  name="$func_basename_result"
+	  name=$func_basename_result
           case $host in
 	    *cygwin* | *mingw* | *cegcc* )
 	      # if an import library, we need to obtain dlname
 	      if func_win32_import_lib_p "$dlprefile"; then
 	        func_tr_sh "$dlprefile"
 	        eval "curr_lafile=\$libfile_$func_tr_sh_result"
-	        dlprefile_dlbasename=""
+	        dlprefile_dlbasename=
 	        if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
 	          # Use subshell, to avoid clobbering current variable values
 	          dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
-	          if test -n "$dlprefile_dlname" ; then
+	          if test -n "$dlprefile_dlname"; then
 	            func_basename "$dlprefile_dlname"
-	            dlprefile_dlbasename="$func_basename_result"
+	            dlprefile_dlbasename=$func_basename_result
 	          else
 	            # no lafile. user explicitly requested -dlpreopen <import library>.
 	            $sharedlib_from_linklib_cmd "$dlprefile"
@@ -3368,7 +4699,7 @@ extern \"C\" {
 	          fi
 	        fi
 	        $opt_dry_run || {
-	          if test -n "$dlprefile_dlbasename" ; then
+	          if test -n "$dlprefile_dlbasename"; then
 	            eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
 	          else
 	            func_warning "Could not compute DLL name from $name"
@@ -3424,6 +4755,11 @@ extern \"C\" {
 	    echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
 	  fi
 
+	  func_show_eval '$RM "${nlist}I"'
+	  if test -n "$global_symbol_to_import"; then
+	    eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I'
+	  fi
+
 	  echo >> "$output_objdir/$my_dlsyms" "\
 
 /* The mapping between symbol names and symbols.  */
@@ -3432,11 +4768,30 @@ typedef struct {
   void *address;
 } lt_dlsymlist;
 extern LT_DLSYM_CONST lt_dlsymlist
-lt_${my_prefix}_LTX_preloaded_symbols[];
+lt_${my_prefix}_LTX_preloaded_symbols[];\
+"
+
+	  if test -s "$nlist"I; then
+	    echo >> "$output_objdir/$my_dlsyms" "\
+static void lt_syminit(void)
+{
+  LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols;
+  for (; symbol->name; ++symbol)
+    {"
+	    $SED 's/.*/      if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms"
+	    echo >> "$output_objdir/$my_dlsyms" "\
+    }
+}"
+	  fi
+	  echo >> "$output_objdir/$my_dlsyms" "\
 LT_DLSYM_CONST lt_dlsymlist
 lt_${my_prefix}_LTX_preloaded_symbols[] =
-{\
-  { \"$my_originator\", (void *) 0 },"
+{ {\"$my_originator\", (void *) 0},"
+
+	  if test -s "$nlist"I; then
+	    echo >> "$output_objdir/$my_dlsyms" "\
+  {\"@INIT@\", (void *) &lt_syminit},"
+	  fi
 
 	  case $need_lib_prefix in
 	  no)
@@ -3478,9 +4833,7 @@ static const void *lt_preloaded_setup() {
 	  *-*-hpux*)
 	    pic_flag_for_symtable=" $pic_flag"  ;;
 	  *)
-	    if test "X$my_pic_p" != Xno; then
-	      pic_flag_for_symtable=" $pic_flag"
-	    fi
+	    $my_pic_p && pic_flag_for_symtable=" $pic_flag"
 	    ;;
 	  esac
 	  ;;
@@ -3497,10 +4850,10 @@ static const void *lt_preloaded_setup() {
 	func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
 
 	# Clean up the generated files.
-	func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
+	func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"'
 
 	# Transform the symbol file into the correct name.
-	symfileobj="$output_objdir/${my_outputname}S.$objext"
+	symfileobj=$output_objdir/${my_outputname}S.$objext
 	case $host in
 	*cygwin* | *mingw* | *cegcc* )
 	  if test -f "$output_objdir/$my_outputname.def"; then
@@ -3518,7 +4871,7 @@ static const void *lt_preloaded_setup() {
 	esac
 	;;
       *)
-	func_fatal_error "unknown suffix for \`$my_dlsyms'"
+	func_fatal_error "unknown suffix for '$my_dlsyms'"
 	;;
       esac
     else
@@ -3532,6 +4885,32 @@ static const void *lt_preloaded_setup() {
     fi
 }
 
+# func_cygming_gnu_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is a GNU/binutils-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_gnu_implib_p ()
+{
+  $debug_cmd
+
+  func_to_tool_file "$1" func_convert_file_msys_to_w32
+  func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
+  test -n "$func_cygming_gnu_implib_tmp"
+}
+
+# func_cygming_ms_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is an MS-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_ms_implib_p ()
+{
+  $debug_cmd
+
+  func_to_tool_file "$1" func_convert_file_msys_to_w32
+  func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
+  test -n "$func_cygming_ms_implib_tmp"
+}
+
 # func_win32_libid arg
 # return the library type of file 'arg'
 #
@@ -3541,8 +4920,9 @@ static const void *lt_preloaded_setup() {
 # Despite the name, also deal with 64 bit binaries.
 func_win32_libid ()
 {
-  $opt_debug
-  win32_libid_type="unknown"
+  $debug_cmd
+
+  win32_libid_type=unknown
   win32_fileres=`file -L $1 2>/dev/null`
   case $win32_fileres in
   *ar\ archive\ import\ library*) # definitely import
@@ -3552,16 +4932,29 @@ func_win32_libid ()
     # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
     if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
        $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
-      func_to_tool_file "$1" func_convert_file_msys_to_w32
-      win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
-	$SED -n -e '
+      case $nm_interface in
+      "MS dumpbin")
+	if func_cygming_ms_implib_p "$1" ||
+	   func_cygming_gnu_implib_p "$1"
+	then
+	  win32_nmres=import
+	else
+	  win32_nmres=
+	fi
+	;;
+      *)
+	func_to_tool_file "$1" func_convert_file_msys_to_w32
+	win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
+	  $SED -n -e '
 	    1,100{
 		/ I /{
-		    s,.*,import,
+		    s|.*|import|
 		    p
 		    q
 		}
 	    }'`
+	;;
+      esac
       case $win32_nmres in
       import*)  win32_libid_type="x86 archive import";;
       *)        win32_libid_type="x86 archive static";;
@@ -3593,7 +4986,8 @@ func_win32_libid ()
 #    $sharedlib_from_linklib_result
 func_cygming_dll_for_implib ()
 {
-  $opt_debug
+  $debug_cmd
+
   sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
 }
 
@@ -3610,7 +5004,8 @@ func_cygming_dll_for_implib ()
 # specified import library.
 func_cygming_dll_for_implib_fallback_core ()
 {
-  $opt_debug
+  $debug_cmd
+
   match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
   $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
     $SED '/^Contents of section '"$match_literal"':/{
@@ -3646,8 +5041,8 @@ func_cygming_dll_for_implib_fallback_core ()
       /./p' |
     # we now have a list, one entry per line, of the stringified
     # contents of the appropriate section of all members of the
-    # archive which possess that section. Heuristic: eliminate
-    # all those which have a first or second character that is
+    # archive that possess that section. Heuristic: eliminate
+    # all those that have a first or second character that is
     # a '.' (that is, objdump's representation of an unprintable
     # character.) This should work for all archives with less than
     # 0x302f exports -- but will fail for DLLs whose name actually
@@ -3658,30 +5053,6 @@ func_cygming_dll_for_implib_fallback_core ()
     $SED -e '/^\./d;/^.\./d;q'
 }
 
-# func_cygming_gnu_implib_p ARG
-# This predicate returns with zero status (TRUE) if
-# ARG is a GNU/binutils-style import library. Returns
-# with nonzero status (FALSE) otherwise.
-func_cygming_gnu_implib_p ()
-{
-  $opt_debug
-  func_to_tool_file "$1" func_convert_file_msys_to_w32
-  func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
-  test -n "$func_cygming_gnu_implib_tmp"
-}
-
-# func_cygming_ms_implib_p ARG
-# This predicate returns with zero status (TRUE) if
-# ARG is an MS-style import library. Returns
-# with nonzero status (FALSE) otherwise.
-func_cygming_ms_implib_p ()
-{
-  $opt_debug
-  func_to_tool_file "$1" func_convert_file_msys_to_w32
-  func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
-  test -n "$func_cygming_ms_implib_tmp"
-}
-
 # func_cygming_dll_for_implib_fallback ARG
 # Platform-specific function to extract the
 # name of the DLL associated with the specified
@@ -3695,16 +5066,17 @@ func_cygming_ms_implib_p ()
 #    $sharedlib_from_linklib_result
 func_cygming_dll_for_implib_fallback ()
 {
-  $opt_debug
-  if func_cygming_gnu_implib_p "$1" ; then
+  $debug_cmd
+
+  if func_cygming_gnu_implib_p "$1"; then
     # binutils import library
     sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
-  elif func_cygming_ms_implib_p "$1" ; then
+  elif func_cygming_ms_implib_p "$1"; then
     # ms-generated import library
     sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
   else
     # unknown
-    sharedlib_from_linklib_result=""
+    sharedlib_from_linklib_result=
   fi
 }
 
@@ -3712,10 +5084,11 @@ func_cygming_dll_for_implib_fallback ()
 # func_extract_an_archive dir oldlib
 func_extract_an_archive ()
 {
-    $opt_debug
-    f_ex_an_ar_dir="$1"; shift
-    f_ex_an_ar_oldlib="$1"
-    if test "$lock_old_archive_extraction" = yes; then
+    $debug_cmd
+
+    f_ex_an_ar_dir=$1; shift
+    f_ex_an_ar_oldlib=$1
+    if test yes = "$lock_old_archive_extraction"; then
       lockfile=$f_ex_an_ar_oldlib.lock
       until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
 	func_echo "Waiting for $lockfile to be removed"
@@ -3724,7 +5097,7 @@ func_extract_an_archive ()
     fi
     func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
 		   'stat=$?; rm -f "$lockfile"; exit $stat'
-    if test "$lock_old_archive_extraction" = yes; then
+    if test yes = "$lock_old_archive_extraction"; then
       $opt_dry_run || rm -f "$lockfile"
     fi
     if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
@@ -3738,22 +5111,23 @@ func_extract_an_archive ()
 # func_extract_archives gentop oldlib ...
 func_extract_archives ()
 {
-    $opt_debug
-    my_gentop="$1"; shift
+    $debug_cmd
+
+    my_gentop=$1; shift
     my_oldlibs=${1+"$@"}
-    my_oldobjs=""
-    my_xlib=""
-    my_xabs=""
-    my_xdir=""
+    my_oldobjs=
+    my_xlib=
+    my_xabs=
+    my_xdir=
 
     for my_xlib in $my_oldlibs; do
       # Extract the objects.
       case $my_xlib in
-	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+	[\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;;
 	*) my_xabs=`pwd`"/$my_xlib" ;;
       esac
       func_basename "$my_xlib"
-      my_xlib="$func_basename_result"
+      my_xlib=$func_basename_result
       my_xlib_u=$my_xlib
       while :; do
         case " $extracted_archives " in
@@ -3765,7 +5139,7 @@ func_extract_archives ()
 	esac
       done
       extracted_archives="$extracted_archives $my_xlib_u"
-      my_xdir="$my_gentop/$my_xlib_u"
+      my_xdir=$my_gentop/$my_xlib_u
 
       func_mkdir_p "$my_xdir"
 
@@ -3778,22 +5152,23 @@ func_extract_archives ()
 	  cd $my_xdir || exit $?
 	  darwin_archive=$my_xabs
 	  darwin_curdir=`pwd`
-	  darwin_base_archive=`basename "$darwin_archive"`
+	  func_basename "$darwin_archive"
+	  darwin_base_archive=$func_basename_result
 	  darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
 	  if test -n "$darwin_arches"; then
 	    darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
 	    darwin_arch=
 	    func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
-	    for darwin_arch in  $darwin_arches ; do
-	      func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
-	      $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
-	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
-	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+	    for darwin_arch in  $darwin_arches; do
+	      func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch"
+	      $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive"
+	      cd "unfat-$$/$darwin_base_archive-$darwin_arch"
+	      func_extract_an_archive "`pwd`" "$darwin_base_archive"
 	      cd "$darwin_curdir"
-	      $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+	      $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive"
 	    done # $darwin_arches
             ## Okay now we've a bunch of thin objects, gotta fatten them up :)
-	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
+	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u`
 	    darwin_file=
 	    darwin_files=
 	    for darwin_file in $darwin_filelist; do
@@ -3815,7 +5190,7 @@ func_extract_archives ()
       my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
     done
 
-    func_extract_archives_result="$my_oldobjs"
+    func_extract_archives_result=$my_oldobjs
 }
 
 
@@ -3830,7 +5205,7 @@ func_extract_archives ()
 #
 # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
 # variable will take.  If 'yes', then the emitted script
-# will assume that the directory in which it is stored is
+# will assume that the directory where it is stored is
 # the $objdir directory.  This is a cygwin/mingw-specific
 # behavior.
 func_emit_wrapper ()
@@ -3841,7 +5216,7 @@ func_emit_wrapper ()
 #! $SHELL
 
 # $output - temporary wrapper script for $objdir/$outputname
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
 #
 # The $output program cannot be directly executed until all the libtool
 # libraries that it depends on are installed.
@@ -3898,9 +5273,9 @@ _LTECHO_EOF'
 
 # Very basic option parsing. These options are (a) specific to
 # the libtool wrapper, (b) are identical between the wrapper
-# /script/ and the wrapper /executable/ which is used only on
+# /script/ and the wrapper /executable/ that is used only on
 # windows platforms, and (c) all begin with the string "--lt-"
-# (application programs are unlikely to have options which match
+# (application programs are unlikely to have options that match
 # this pattern).
 #
 # There are only two supported options: --lt-debug and
@@ -3933,7 +5308,7 @@ func_parse_lt_options ()
 
   # Print the debug banner immediately:
   if test -n \"\$lt_option_debug\"; then
-    echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
+    echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2
   fi
 }
 
@@ -3944,7 +5319,7 @@ func_lt_dump_args ()
   lt_dump_args_N=1;
   for lt_arg
   do
-    \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
+    \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\"
     lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
   done
 }
@@ -3958,7 +5333,7 @@ func_exec_program_core ()
   *-*-mingw | *-*-os2* | *-cegcc*)
     $ECHO "\
       if test -n \"\$lt_option_debug\"; then
-        \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
+        \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2
         func_lt_dump_args \${1+\"\$@\"} 1>&2
       fi
       exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
@@ -3968,7 +5343,7 @@ func_exec_program_core ()
   *)
     $ECHO "\
       if test -n \"\$lt_option_debug\"; then
-        \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
+        \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2
         func_lt_dump_args \${1+\"\$@\"} 1>&2
       fi
       exec \"\$progdir/\$program\" \${1+\"\$@\"}
@@ -4043,13 +5418,13 @@ func_exec_program ()
   test -n \"\$absdir\" && thisdir=\"\$absdir\"
 "
 
-	if test "$fast_install" = yes; then
+	if test yes = "$fast_install"; then
 	  $ECHO "\
   program=lt-'$outputname'$exeext
   progdir=\"\$thisdir/$objdir\"
 
   if test ! -f \"\$progdir/\$program\" ||
-     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\
        test \"X\$file\" != \"X\$progdir/\$program\"; }; then
 
     file=\"\$\$-\$program\"
@@ -4066,7 +5441,7 @@ func_exec_program ()
     if test -n \"\$relink_command\"; then
       if relink_command_output=\`eval \$relink_command 2>&1\`; then :
       else
-	$ECHO \"\$relink_command_output\" >&2
+	\$ECHO \"\$relink_command_output\" >&2
 	$RM \"\$progdir/\$file\"
 	exit 1
       fi
@@ -4101,7 +5476,7 @@ func_exec_program ()
 	fi
 
 	# Export our shlibpath_var if we have one.
-	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+	if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
 	  $ECHO "\
     # Add our own library path to $shlibpath_var
     $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
@@ -4121,7 +5496,7 @@ func_exec_program ()
     fi
   else
     # The program doesn't exist.
-    \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+    \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2
     \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
     \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
     exit 1
@@ -4140,7 +5515,7 @@ func_emit_cwrapperexe_src ()
 	cat <<EOF
 
 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
-   Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+   Generated by $PROGRAM (GNU $PACKAGE) $VERSION
 
    The $output program cannot be directly executed until all the libtool
    libraries that it depends on are installed.
@@ -4175,47 +5550,45 @@ EOF
 #include <fcntl.h>
 #include <sys/stat.h>
 
+#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
+
 /* declarations of non-ANSI functions */
-#if defined(__MINGW32__)
+#if defined __MINGW32__
 # ifdef __STRICT_ANSI__
 int _putenv (const char *);
 # endif
-#elif defined(__CYGWIN__)
+#elif defined __CYGWIN__
 # ifdef __STRICT_ANSI__
 char *realpath (const char *, char *);
 int putenv (char *);
 int setenv (const char *, const char *, int);
 # endif
-/* #elif defined (other platforms) ... */
+/* #elif defined other_platform || defined ... */
 #endif
 
 /* portability defines, excluding path handling macros */
-#if defined(_MSC_VER)
+#if defined _MSC_VER
 # define setmode _setmode
 # define stat    _stat
 # define chmod   _chmod
 # define getcwd  _getcwd
 # define putenv  _putenv
 # define S_IXUSR _S_IEXEC
-# ifndef _INTPTR_T_DEFINED
-#  define _INTPTR_T_DEFINED
-#  define intptr_t int
-# endif
-#elif defined(__MINGW32__)
+#elif defined __MINGW32__
 # define setmode _setmode
 # define stat    _stat
 # define chmod   _chmod
 # define getcwd  _getcwd
 # define putenv  _putenv
-#elif defined(__CYGWIN__)
+#elif defined __CYGWIN__
 # define HAVE_SETENV
 # define FOPEN_WB "wb"
-/* #elif defined (other platforms) ... */
+/* #elif defined other platforms ... */
 #endif
 
-#if defined(PATH_MAX)
+#if defined PATH_MAX
 # define LT_PATHMAX PATH_MAX
-#elif defined(MAXPATHLEN)
+#elif defined MAXPATHLEN
 # define LT_PATHMAX MAXPATHLEN
 #else
 # define LT_PATHMAX 1024
@@ -4234,8 +5607,8 @@ int setenv (const char *, const char *, int);
 # define PATH_SEPARATOR ':'
 #endif
 
-#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
-  defined (__OS2__)
+#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \
+  defined __OS2__
 # define HAVE_DOS_BASED_FILE_SYSTEM
 # define FOPEN_WB "wb"
 # ifndef DIR_SEPARATOR_2
@@ -4268,10 +5641,10 @@ int setenv (const char *, const char *, int);
 
 #define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
 #define XFREE(stale) do { \
-  if (stale) { free ((void *) stale); stale = 0; } \
+  if (stale) { free (stale); stale = 0; } \
 } while (0)
 
-#if defined(LT_DEBUGWRAPPER)
+#if defined LT_DEBUGWRAPPER
 static int lt_debug = 1;
 #else
 static int lt_debug = 0;
@@ -4300,11 +5673,16 @@ void lt_dump_script (FILE *f);
 EOF
 
 	    cat <<EOF
-volatile const char * MAGIC_EXE = "$magic_exe";
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
+# define externally_visible volatile
+#else
+# define externally_visible __attribute__((externally_visible)) volatile
+#endif
+externally_visible const char * MAGIC_EXE = "$magic_exe";
 const char * LIB_PATH_VARNAME = "$shlibpath_var";
 EOF
 
-	    if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+	    if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
               func_to_host_path "$temp_rpath"
 	      cat <<EOF
 const char * LIB_PATH_VALUE   = "$func_to_host_path_result";
@@ -4328,7 +5706,7 @@ const char * EXE_PATH_VALUE   = "";
 EOF
 	    fi
 
-	    if test "$fast_install" = yes; then
+	    if test yes = "$fast_install"; then
 	      cat <<EOF
 const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
 EOF
@@ -4357,12 +5735,12 @@ main (int argc, char *argv[])
   char *actual_cwrapper_name;
   char *target_name;
   char *lt_argv_zero;
-  intptr_t rval = 127;
+  int rval = 127;
 
   int i;
 
   program_name = (char *) xstrdup (base_name (argv[0]));
-  newargz = XMALLOC (char *, argc + 1);
+  newargz = XMALLOC (char *, (size_t) argc + 1);
 
   /* very simple arg parsing; don't want to rely on getopt
    * also, copy all non cwrapper options to newargz, except
@@ -4371,10 +5749,10 @@ main (int argc, char *argv[])
   newargc=0;
   for (i = 1; i < argc; i++)
     {
-      if (strcmp (argv[i], dumpscript_opt) == 0)
+      if (STREQ (argv[i], dumpscript_opt))
 	{
 EOF
-	    case "$host" in
+	    case $host in
 	      *mingw* | *cygwin* )
 		# make stdout use "unix" line endings
 		echo "          setmode(1,_O_BINARY);"
@@ -4385,12 +5763,12 @@ EOF
 	  lt_dump_script (stdout);
 	  return 0;
 	}
-      if (strcmp (argv[i], debug_opt) == 0)
+      if (STREQ (argv[i], debug_opt))
 	{
           lt_debug = 1;
           continue;
 	}
-      if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
+      if (STREQ (argv[i], ltwrapper_option_prefix))
         {
           /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
              namespace, but it is not one of the ones we know about and
@@ -4413,7 +5791,7 @@ EOF
 EOF
 	    cat <<EOF
   /* The GNU banner must be the first non-error debug message */
-  lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
+  lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE) $VERSION\n");
 EOF
 	    cat <<"EOF"
   lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
@@ -4524,7 +5902,7 @@ EOF
 		cat <<"EOF"
   /* execv doesn't actually work on mingw as expected on unix */
   newargz = prepare_spawn (newargz);
-  rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+  rval = (int) _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
   if (rval == -1)
     {
       /* failed to start process */
@@ -4569,7 +5947,7 @@ base_name (const char *name)
 {
   const char *base;
 
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
   /* Skip over the disk name in MSDOS pathnames. */
   if (isalpha ((unsigned char) name[0]) && name[1] == ':')
     name += 2;
@@ -4628,7 +6006,7 @@ find_executable (const char *wrapper)
   const char *p_next;
   /* static buffer for getcwd */
   char tmp[LT_PATHMAX + 1];
-  int tmp_len;
+  size_t tmp_len;
   char *concat_name;
 
   lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
@@ -4638,7 +6016,7 @@ find_executable (const char *wrapper)
     return NULL;
 
   /* Absolute path? */
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
   if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
     {
       concat_name = xstrdup (wrapper);
@@ -4656,7 +6034,7 @@ find_executable (const char *wrapper)
 	    return concat_name;
 	  XFREE (concat_name);
 	}
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
     }
 #endif
 
@@ -4679,7 +6057,7 @@ find_executable (const char *wrapper)
 	      for (q = p; *q; q++)
 		if (IS_PATH_SEPARATOR (*q))
 		  break;
-	      p_len = q - p;
+	      p_len = (size_t) (q - p);
 	      p_next = (*q == '\0' ? q : q + 1);
 	      if (p_len == 0)
 		{
@@ -4798,7 +6176,7 @@ strendzap (char *str, const char *pat)
   if (patlen <= len)
     {
       str += len - patlen;
-      if (strcmp (str, pat) == 0)
+      if (STREQ (str, pat))
 	*str = '\0';
     }
   return str;
@@ -4863,7 +6241,7 @@ lt_setenv (const char *name, const char *value)
     char *str = xstrdup (value);
     setenv (name, str, 1);
 #else
-    int len = strlen (name) + 1 + strlen (value) + 1;
+    size_t len = strlen (name) + 1 + strlen (value) + 1;
     char *str = XMALLOC (char, len);
     sprintf (str, "%s=%s", name, value);
     if (putenv (str) != EXIT_SUCCESS)
@@ -4880,8 +6258,8 @@ lt_extend_str (const char *orig_value, const char *add, int to_end)
   char *new_value;
   if (orig_value && *orig_value)
     {
-      int orig_value_len = strlen (orig_value);
-      int add_len = strlen (add);
+      size_t orig_value_len = strlen (orig_value);
+      size_t add_len = strlen (add);
       new_value = XMALLOC (char, add_len + orig_value_len + 1);
       if (to_end)
         {
@@ -4912,10 +6290,10 @@ lt_update_exe_path (const char *name, const char *value)
     {
       char *new_value = lt_extend_str (getenv (name), value, 0);
       /* some systems can't cope with a ':'-terminated path #' */
-      int len = strlen (new_value);
-      while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+      size_t len = strlen (new_value);
+      while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
         {
-          new_value[len-1] = '\0';
+          new_value[--len] = '\0';
         }
       lt_setenv (name, new_value);
       XFREE (new_value);
@@ -5082,27 +6460,47 @@ EOF
 # True if ARG is an import lib, as indicated by $file_magic_cmd
 func_win32_import_lib_p ()
 {
-    $opt_debug
+    $debug_cmd
+
     case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
     *import*) : ;;
     *) false ;;
     esac
 }
 
+# func_suncc_cstd_abi
+# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!!
+# Several compiler flags select an ABI that is incompatible with the
+# Cstd library. Avoid specifying it if any are in CXXFLAGS.
+func_suncc_cstd_abi ()
+{
+    $debug_cmd
+
+    case " $compile_command " in
+    *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*)
+      suncc_use_cstd_abi=no
+      ;;
+    *)
+      suncc_use_cstd_abi=yes
+      ;;
+    esac
+}
+
 # func_mode_link arg...
 func_mode_link ()
 {
-    $opt_debug
+    $debug_cmd
+
     case $host in
     *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
       # It is impossible to link a dll without this setting, and
       # we shouldn't force the makefile maintainer to figure out
-      # which system we are compiling for in order to pass an extra
+      # what system we are compiling for in order to pass an extra
       # flag for every libtool invocation.
       # allow_undefined=no
 
       # FIXME: Unfortunately, there are problems with the above when trying
-      # to make a dll which has undefined symbols, in which case not
+      # to make a dll that has undefined symbols, in which case not
       # even a static library is built.  For now, we need to specify
       # -no-undefined on the libtool link line when we can be certain
       # that all symbols are satisfied, otherwise we get a static library.
@@ -5146,10 +6544,11 @@ func_mode_link ()
     module=no
     no_install=no
     objs=
+    os2dllname=
     non_pic_objects=
     precious_files_regex=
     prefer_static_libs=no
-    preload=no
+    preload=false
     prev=
     prevarg=
     release=
@@ -5161,7 +6560,7 @@ func_mode_link ()
     vinfo=
     vinfo_number=no
     weak_libs=
-    single_module="${wl}-single_module"
+    single_module=$wl-single_module
     func_infer_tag $base_compile
 
     # We need to know -static, to get the right output filenames.
@@ -5169,15 +6568,15 @@ func_mode_link ()
     do
       case $arg in
       -shared)
-	test "$build_libtool_libs" != yes && \
-	  func_fatal_configuration "can not build a shared library"
+	test yes != "$build_libtool_libs" \
+	  && func_fatal_configuration "cannot build a shared library"
 	build_old_libs=no
 	break
 	;;
       -all-static | -static | -static-libtool-libs)
 	case $arg in
 	-all-static)
-	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+	  if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then
 	    func_warning "complete static linking is impossible in this configuration"
 	  fi
 	  if test -n "$link_static_flag"; then
@@ -5210,7 +6609,7 @@ func_mode_link ()
 
     # Go through the arguments, transforming them on the way.
     while test "$#" -gt 0; do
-      arg="$1"
+      arg=$1
       shift
       func_quote_for_eval "$arg"
       qarg=$func_quote_for_eval_unquoted_result
@@ -5227,21 +6626,21 @@ func_mode_link ()
 
 	case $prev in
 	bindir)
-	  bindir="$arg"
+	  bindir=$arg
 	  prev=
 	  continue
 	  ;;
 	dlfiles|dlprefiles)
-	  if test "$preload" = no; then
+	  $preload || {
 	    # Add the symbol object into the linking commands.
 	    func_append compile_command " @SYMFILE@"
 	    func_append finalize_command " @SYMFILE@"
-	    preload=yes
-	  fi
+	    preload=:
+	  }
 	  case $arg in
 	  *.la | *.lo) ;;  # We handle these cases below.
 	  force)
-	    if test "$dlself" = no; then
+	    if test no = "$dlself"; then
 	      dlself=needless
 	      export_dynamic=yes
 	    fi
@@ -5249,9 +6648,9 @@ func_mode_link ()
 	    continue
 	    ;;
 	  self)
-	    if test "$prev" = dlprefiles; then
+	    if test dlprefiles = "$prev"; then
 	      dlself=yes
-	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+	    elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then
 	      dlself=yes
 	    else
 	      dlself=needless
@@ -5261,7 +6660,7 @@ func_mode_link ()
 	    continue
 	    ;;
 	  *)
-	    if test "$prev" = dlfiles; then
+	    if test dlfiles = "$prev"; then
 	      func_append dlfiles " $arg"
 	    else
 	      func_append dlprefiles " $arg"
@@ -5272,14 +6671,14 @@ func_mode_link ()
 	  esac
 	  ;;
 	expsyms)
-	  export_symbols="$arg"
+	  export_symbols=$arg
 	  test -f "$arg" \
-	    || func_fatal_error "symbol file \`$arg' does not exist"
+	    || func_fatal_error "symbol file '$arg' does not exist"
 	  prev=
 	  continue
 	  ;;
 	expsyms_regex)
-	  export_symbols_regex="$arg"
+	  export_symbols_regex=$arg
 	  prev=
 	  continue
 	  ;;
@@ -5297,7 +6696,13 @@ func_mode_link ()
 	  continue
 	  ;;
 	inst_prefix)
-	  inst_prefix_dir="$arg"
+	  inst_prefix_dir=$arg
+	  prev=
+	  continue
+	  ;;
+	mllvm)
+	  # Clang does not use LLVM to link, so we can simply discard any
+	  # '-mllvm $arg' options when doing the link step.
 	  prev=
 	  continue
 	  ;;
@@ -5321,21 +6726,21 @@ func_mode_link ()
 
 		if test -z "$pic_object" ||
 		   test -z "$non_pic_object" ||
-		   test "$pic_object" = none &&
-		   test "$non_pic_object" = none; then
-		  func_fatal_error "cannot find name of object for \`$arg'"
+		   test none = "$pic_object" &&
+		   test none = "$non_pic_object"; then
+		  func_fatal_error "cannot find name of object for '$arg'"
 		fi
 
 		# Extract subdirectory from the argument.
 		func_dirname "$arg" "/" ""
-		xdir="$func_dirname_result"
+		xdir=$func_dirname_result
 
-		if test "$pic_object" != none; then
+		if test none != "$pic_object"; then
 		  # Prepend the subdirectory the object is found in.
-		  pic_object="$xdir$pic_object"
+		  pic_object=$xdir$pic_object
 
-		  if test "$prev" = dlfiles; then
-		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		  if test dlfiles = "$prev"; then
+		    if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
 		      func_append dlfiles " $pic_object"
 		      prev=
 		      continue
@@ -5346,7 +6751,7 @@ func_mode_link ()
 		  fi
 
 		  # CHECK ME:  I think I busted this.  -Ossama
-		  if test "$prev" = dlprefiles; then
+		  if test dlprefiles = "$prev"; then
 		    # Preload the old-style object.
 		    func_append dlprefiles " $pic_object"
 		    prev=
@@ -5354,23 +6759,23 @@ func_mode_link ()
 
 		  # A PIC object.
 		  func_append libobjs " $pic_object"
-		  arg="$pic_object"
+		  arg=$pic_object
 		fi
 
 		# Non-PIC object.
-		if test "$non_pic_object" != none; then
+		if test none != "$non_pic_object"; then
 		  # Prepend the subdirectory the object is found in.
-		  non_pic_object="$xdir$non_pic_object"
+		  non_pic_object=$xdir$non_pic_object
 
 		  # A standard non-PIC object
 		  func_append non_pic_objects " $non_pic_object"
-		  if test -z "$pic_object" || test "$pic_object" = none ; then
-		    arg="$non_pic_object"
+		  if test -z "$pic_object" || test none = "$pic_object"; then
+		    arg=$non_pic_object
 		  fi
 		else
 		  # If the PIC object exists, use it instead.
 		  # $xdir was prepended to $pic_object above.
-		  non_pic_object="$pic_object"
+		  non_pic_object=$pic_object
 		  func_append non_pic_objects " $non_pic_object"
 		fi
 	      else
@@ -5378,7 +6783,7 @@ func_mode_link ()
 		if $opt_dry_run; then
 		  # Extract subdirectory from the argument.
 		  func_dirname "$arg" "/" ""
-		  xdir="$func_dirname_result"
+		  xdir=$func_dirname_result
 
 		  func_lo2o "$arg"
 		  pic_object=$xdir$objdir/$func_lo2o_result
@@ -5386,24 +6791,29 @@ func_mode_link ()
 		  func_append libobjs " $pic_object"
 		  func_append non_pic_objects " $non_pic_object"
 	        else
-		  func_fatal_error "\`$arg' is not a valid libtool object"
+		  func_fatal_error "'$arg' is not a valid libtool object"
 		fi
 	      fi
 	    done
 	  else
-	    func_fatal_error "link input file \`$arg' does not exist"
+	    func_fatal_error "link input file '$arg' does not exist"
 	  fi
 	  arg=$save_arg
 	  prev=
 	  continue
 	  ;;
+	os2dllname)
+	  os2dllname=$arg
+	  prev=
+	  continue
+	  ;;
 	precious_regex)
-	  precious_files_regex="$arg"
+	  precious_files_regex=$arg
 	  prev=
 	  continue
 	  ;;
 	release)
-	  release="-$arg"
+	  release=-$arg
 	  prev=
 	  continue
 	  ;;
@@ -5415,7 +6825,7 @@ func_mode_link ()
 	    func_fatal_error "only absolute run-paths are allowed"
 	    ;;
 	  esac
-	  if test "$prev" = rpath; then
+	  if test rpath = "$prev"; then
 	    case "$rpath " in
 	    *" $arg "*) ;;
 	    *) func_append rpath " $arg" ;;
@@ -5430,7 +6840,7 @@ func_mode_link ()
 	  continue
 	  ;;
 	shrext)
-	  shrext_cmds="$arg"
+	  shrext_cmds=$arg
 	  prev=
 	  continue
 	  ;;
@@ -5470,7 +6880,7 @@ func_mode_link ()
 	esac
       fi # test -n "$prev"
 
-      prevarg="$arg"
+      prevarg=$arg
 
       case $arg in
       -all-static)
@@ -5484,7 +6894,7 @@ func_mode_link ()
 
       -allow-undefined)
 	# FIXME: remove this flag sometime in the future.
-	func_fatal_error "\`-allow-undefined' must not be used because it is the default"
+	func_fatal_error "'-allow-undefined' must not be used because it is the default"
 	;;
 
       -avoid-version)
@@ -5516,7 +6926,7 @@ func_mode_link ()
 	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
 	  func_fatal_error "more than one -exported-symbols argument is not allowed"
 	fi
-	if test "X$arg" = "X-export-symbols"; then
+	if test X-export-symbols = "X$arg"; then
 	  prev=expsyms
 	else
 	  prev=expsyms_regex
@@ -5550,9 +6960,9 @@ func_mode_link ()
 	func_stripname "-L" '' "$arg"
 	if test -z "$func_stripname_result"; then
 	  if test "$#" -gt 0; then
-	    func_fatal_error "require no space between \`-L' and \`$1'"
+	    func_fatal_error "require no space between '-L' and '$1'"
 	  else
-	    func_fatal_error "need path for \`-L' option"
+	    func_fatal_error "need path for '-L' option"
 	  fi
 	fi
 	func_resolve_sysroot "$func_stripname_result"
@@ -5563,8 +6973,8 @@ func_mode_link ()
 	*)
 	  absdir=`cd "$dir" && pwd`
 	  test -z "$absdir" && \
-	    func_fatal_error "cannot determine absolute directory name of \`$dir'"
-	  dir="$absdir"
+	    func_fatal_error "cannot determine absolute directory name of '$dir'"
+	  dir=$absdir
 	  ;;
 	esac
 	case "$deplibs " in
@@ -5599,7 +7009,7 @@ func_mode_link ()
 	;;
 
       -l*)
-	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+	if test X-lc = "X$arg" || test X-lm = "X$arg"; then
 	  case $host in
 	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
 	    # These systems don't actually have a C or math library (as such)
@@ -5607,11 +7017,11 @@ func_mode_link ()
 	    ;;
 	  *-*-os2*)
 	    # These systems don't actually have a C library (as such)
-	    test "X$arg" = "X-lc" && continue
+	    test X-lc = "X$arg" && continue
 	    ;;
-	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
 	    # Do not include libc due to us having libc/libc_r.
-	    test "X$arg" = "X-lc" && continue
+	    test X-lc = "X$arg" && continue
 	    ;;
 	  *-*-rhapsody* | *-*-darwin1.[012])
 	    # Rhapsody C and math libraries are in the System framework
@@ -5620,16 +7030,16 @@ func_mode_link ()
 	    ;;
 	  *-*-sco3.2v5* | *-*-sco5v6*)
 	    # Causes problems with __ctype
-	    test "X$arg" = "X-lc" && continue
+	    test X-lc = "X$arg" && continue
 	    ;;
 	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
 	    # Compiler inserts libc in the correct place for threads to work
-	    test "X$arg" = "X-lc" && continue
+	    test X-lc = "X$arg" && continue
 	    ;;
 	  esac
-	elif test "X$arg" = "X-lc_r"; then
+	elif test X-lc_r = "X$arg"; then
 	 case $host in
-	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
 	   # Do not include libc_r directly, use -pthread flag.
 	   continue
 	   ;;
@@ -5639,6 +7049,11 @@ func_mode_link ()
 	continue
 	;;
 
+      -mllvm)
+	prev=mllvm
+	continue
+	;;
+
       -module)
 	module=yes
 	continue
@@ -5668,7 +7083,7 @@ func_mode_link ()
 	;;
 
       -multi_module)
-	single_module="${wl}-multi_module"
+	single_module=$wl-multi_module
 	continue
 	;;
 
@@ -5682,8 +7097,8 @@ func_mode_link ()
 	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
 	  # The PATH hackery in wrapper scripts is required on Windows
 	  # and Darwin in order for the loader to find any dlls it needs.
-	  func_warning "\`-no-install' is ignored for $host"
-	  func_warning "assuming \`-no-fast-install' instead"
+	  func_warning "'-no-install' is ignored for $host"
+	  func_warning "assuming '-no-fast-install' instead"
 	  fast_install=no
 	  ;;
 	*) no_install=yes ;;
@@ -5701,6 +7116,11 @@ func_mode_link ()
 	continue
 	;;
 
+      -os2dllname)
+	prev=os2dllname
+	continue
+	;;
+
       -o) prev=output ;;
 
       -precious-files-regex)
@@ -5788,14 +7208,14 @@ func_mode_link ()
 	func_stripname '-Wc,' '' "$arg"
 	args=$func_stripname_result
 	arg=
-	save_ifs="$IFS"; IFS=','
+	save_ifs=$IFS; IFS=,
 	for flag in $args; do
-	  IFS="$save_ifs"
+	  IFS=$save_ifs
           func_quote_for_eval "$flag"
 	  func_append arg " $func_quote_for_eval_result"
 	  func_append compiler_flags " $func_quote_for_eval_result"
 	done
-	IFS="$save_ifs"
+	IFS=$save_ifs
 	func_stripname ' ' '' "$arg"
 	arg=$func_stripname_result
 	;;
@@ -5804,15 +7224,15 @@ func_mode_link ()
 	func_stripname '-Wl,' '' "$arg"
 	args=$func_stripname_result
 	arg=
-	save_ifs="$IFS"; IFS=','
+	save_ifs=$IFS; IFS=,
 	for flag in $args; do
-	  IFS="$save_ifs"
+	  IFS=$save_ifs
           func_quote_for_eval "$flag"
 	  func_append arg " $wl$func_quote_for_eval_result"
 	  func_append compiler_flags " $wl$func_quote_for_eval_result"
 	  func_append linker_flags " $func_quote_for_eval_result"
 	done
-	IFS="$save_ifs"
+	IFS=$save_ifs
 	func_stripname ' ' '' "$arg"
 	arg=$func_stripname_result
 	;;
@@ -5835,7 +7255,7 @@ func_mode_link ()
       # -msg_* for osf cc
       -msg_*)
 	func_quote_for_eval "$arg"
-	arg="$func_quote_for_eval_result"
+	arg=$func_quote_for_eval_result
 	;;
 
       # Flags to be passed through unchanged, with rationale:
@@ -5847,25 +7267,49 @@ func_mode_link ()
       # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
       # -F/path              path to uninstalled frameworks, gcc on darwin
       # -p, -pg, --coverage, -fprofile-*  profiling flags for GCC
+      # -fstack-protector*   stack protector flags for GCC
       # @file                GCC response files
       # -tp=*                Portland pgcc target processor selection
       # --sysroot=*          for sysroot support
-      # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+      # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+      # -specs=*             GCC specs files
+      # -stdlib=*            select c++ std lib with clang
+      # -fsanitize=*         Clang/GCC memory and address sanitizer
       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
-      -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
+      -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
+      -specs=*|-fsanitize=*)
         func_quote_for_eval "$arg"
-	arg="$func_quote_for_eval_result"
+	arg=$func_quote_for_eval_result
         func_append compile_command " $arg"
         func_append finalize_command " $arg"
         func_append compiler_flags " $arg"
         continue
         ;;
 
+      -Z*)
+        if test os2 = "`expr $host : '.*\(os2\)'`"; then
+          # OS/2 uses -Zxxx to specify OS/2-specific options
+	  compiler_flags="$compiler_flags $arg"
+	  func_append compile_command " $arg"
+	  func_append finalize_command " $arg"
+	  case $arg in
+	  -Zlinker | -Zstack)
+	    prev=xcompiler
+	    ;;
+	  esac
+	  continue
+        else
+	  # Otherwise treat like 'Some other compiler flag' below
+	  func_quote_for_eval "$arg"
+	  arg=$func_quote_for_eval_result
+        fi
+	;;
+
       # Some other compiler flag.
       -* | +*)
         func_quote_for_eval "$arg"
-	arg="$func_quote_for_eval_result"
+	arg=$func_quote_for_eval_result
 	;;
 
       *.$objext)
@@ -5886,21 +7330,21 @@ func_mode_link ()
 
 	  if test -z "$pic_object" ||
 	     test -z "$non_pic_object" ||
-	     test "$pic_object" = none &&
-	     test "$non_pic_object" = none; then
-	    func_fatal_error "cannot find name of object for \`$arg'"
+	     test none = "$pic_object" &&
+	     test none = "$non_pic_object"; then
+	    func_fatal_error "cannot find name of object for '$arg'"
 	  fi
 
 	  # Extract subdirectory from the argument.
 	  func_dirname "$arg" "/" ""
-	  xdir="$func_dirname_result"
+	  xdir=$func_dirname_result
 
-	  if test "$pic_object" != none; then
+	  test none = "$pic_object" || {
 	    # Prepend the subdirectory the object is found in.
-	    pic_object="$xdir$pic_object"
+	    pic_object=$xdir$pic_object
 
-	    if test "$prev" = dlfiles; then
-	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+	    if test dlfiles = "$prev"; then
+	      if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
 		func_append dlfiles " $pic_object"
 		prev=
 		continue
@@ -5911,7 +7355,7 @@ func_mode_link ()
 	    fi
 
 	    # CHECK ME:  I think I busted this.  -Ossama
-	    if test "$prev" = dlprefiles; then
+	    if test dlprefiles = "$prev"; then
 	      # Preload the old-style object.
 	      func_append dlprefiles " $pic_object"
 	      prev=
@@ -5919,23 +7363,23 @@ func_mode_link ()
 
 	    # A PIC object.
 	    func_append libobjs " $pic_object"
-	    arg="$pic_object"
-	  fi
+	    arg=$pic_object
+	  }
 
 	  # Non-PIC object.
-	  if test "$non_pic_object" != none; then
+	  if test none != "$non_pic_object"; then
 	    # Prepend the subdirectory the object is found in.
-	    non_pic_object="$xdir$non_pic_object"
+	    non_pic_object=$xdir$non_pic_object
 
 	    # A standard non-PIC object
 	    func_append non_pic_objects " $non_pic_object"
-	    if test -z "$pic_object" || test "$pic_object" = none ; then
-	      arg="$non_pic_object"
+	    if test -z "$pic_object" || test none = "$pic_object"; then
+	      arg=$non_pic_object
 	    fi
 	  else
 	    # If the PIC object exists, use it instead.
 	    # $xdir was prepended to $pic_object above.
-	    non_pic_object="$pic_object"
+	    non_pic_object=$pic_object
 	    func_append non_pic_objects " $non_pic_object"
 	  fi
 	else
@@ -5943,7 +7387,7 @@ func_mode_link ()
 	  if $opt_dry_run; then
 	    # Extract subdirectory from the argument.
 	    func_dirname "$arg" "/" ""
-	    xdir="$func_dirname_result"
+	    xdir=$func_dirname_result
 
 	    func_lo2o "$arg"
 	    pic_object=$xdir$objdir/$func_lo2o_result
@@ -5951,7 +7395,7 @@ func_mode_link ()
 	    func_append libobjs " $pic_object"
 	    func_append non_pic_objects " $non_pic_object"
 	  else
-	    func_fatal_error "\`$arg' is not a valid libtool object"
+	    func_fatal_error "'$arg' is not a valid libtool object"
 	  fi
 	fi
 	;;
@@ -5967,11 +7411,11 @@ func_mode_link ()
 	# A libtool-controlled library.
 
 	func_resolve_sysroot "$arg"
-	if test "$prev" = dlfiles; then
+	if test dlfiles = "$prev"; then
 	  # This library was specified with -dlopen.
 	  func_append dlfiles " $func_resolve_sysroot_result"
 	  prev=
-	elif test "$prev" = dlprefiles; then
+	elif test dlprefiles = "$prev"; then
 	  # The library was specified with -dlpreopen.
 	  func_append dlprefiles " $func_resolve_sysroot_result"
 	  prev=
@@ -5986,7 +7430,7 @@ func_mode_link ()
 	# Unknown arguments in both finalize_command and compile_command need
 	# to be aesthetically quoted because they are evaled later.
 	func_quote_for_eval "$arg"
-	arg="$func_quote_for_eval_result"
+	arg=$func_quote_for_eval_result
 	;;
       esac # arg
 
@@ -5998,9 +7442,9 @@ func_mode_link ()
     done # argument parsing loop
 
     test -n "$prev" && \
-      func_fatal_help "the \`$prevarg' option requires an argument"
+      func_fatal_help "the '$prevarg' option requires an argument"
 
-    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+    if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then
       eval arg=\"$export_dynamic_flag_spec\"
       func_append compile_command " $arg"
       func_append finalize_command " $arg"
@@ -6009,20 +7453,23 @@ func_mode_link ()
     oldlibs=
     # calculate the name of the file, without its directory
     func_basename "$output"
-    outputname="$func_basename_result"
-    libobjs_save="$libobjs"
+    outputname=$func_basename_result
+    libobjs_save=$libobjs
 
     if test -n "$shlibpath_var"; then
       # get the directories listed in $shlibpath_var
-      eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
+      eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\`
     else
       shlib_search_path=
     fi
     eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
     eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
 
+    # Definition is injected by LT_CONFIG during libtool generation.
+    func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH"
+
     func_dirname "$output" "/" ""
-    output_objdir="$func_dirname_result$objdir"
+    output_objdir=$func_dirname_result$objdir
     func_to_tool_file "$output_objdir/"
     tool_output_objdir=$func_to_tool_file_result
     # Create the object directory.
@@ -6045,7 +7492,7 @@ func_mode_link ()
     # Find all interdependent deplibs by searching for libraries
     # that are linked more than once (e.g. -la -lb -la)
     for deplib in $deplibs; do
-      if $opt_preserve_dup_deps ; then
+      if $opt_preserve_dup_deps; then
 	case "$libs " in
 	*" $deplib "*) func_append specialdeplibs " $deplib" ;;
 	esac
@@ -6053,7 +7500,7 @@ func_mode_link ()
       func_append libs " $deplib"
     done
 
-    if test "$linkmode" = lib; then
+    if test lib = "$linkmode"; then
       libs="$predeps $libs $compiler_lib_search_path $postdeps"
 
       # Compute libraries that are listed more than once in $predeps
@@ -6085,7 +7532,7 @@ func_mode_link ()
 	  case $file in
 	  *.la) ;;
 	  *)
-	    func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
+	    func_fatal_help "libraries can '-dlopen' only libtool libraries: $file"
 	    ;;
 	  esac
 	done
@@ -6093,7 +7540,7 @@ func_mode_link ()
     prog)
 	compile_deplibs=
 	finalize_deplibs=
-	alldeplibs=no
+	alldeplibs=false
 	newdlfiles=
 	newdlprefiles=
 	passes="conv scan dlopen dlpreopen link"
@@ -6105,32 +7552,32 @@ func_mode_link ()
     for pass in $passes; do
       # The preopen pass in lib mode reverses $deplibs; put it back here
       # so that -L comes before libs that need it for instance...
-      if test "$linkmode,$pass" = "lib,link"; then
+      if test lib,link = "$linkmode,$pass"; then
 	## FIXME: Find the place where the list is rebuilt in the wrong
 	##        order, and fix it there properly
         tmp_deplibs=
 	for deplib in $deplibs; do
 	  tmp_deplibs="$deplib $tmp_deplibs"
 	done
-	deplibs="$tmp_deplibs"
+	deplibs=$tmp_deplibs
       fi
 
-      if test "$linkmode,$pass" = "lib,link" ||
-	 test "$linkmode,$pass" = "prog,scan"; then
-	libs="$deplibs"
+      if test lib,link = "$linkmode,$pass" ||
+	 test prog,scan = "$linkmode,$pass"; then
+	libs=$deplibs
 	deplibs=
       fi
-      if test "$linkmode" = prog; then
+      if test prog = "$linkmode"; then
 	case $pass in
-	dlopen) libs="$dlfiles" ;;
-	dlpreopen) libs="$dlprefiles" ;;
+	dlopen) libs=$dlfiles ;;
+	dlpreopen) libs=$dlprefiles ;;
 	link)
 	  libs="$deplibs %DEPLIBS%"
 	  test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
 	  ;;
 	esac
       fi
-      if test "$linkmode,$pass" = "lib,dlpreopen"; then
+      if test lib,dlpreopen = "$linkmode,$pass"; then
 	# Collect and forward deplibs of preopened libtool libs
 	for lib in $dlprefiles; do
 	  # Ignore non-libtool-libs
@@ -6151,26 +7598,26 @@ func_mode_link ()
 	    esac
 	  done
 	done
-	libs="$dlprefiles"
+	libs=$dlprefiles
       fi
-      if test "$pass" = dlopen; then
+      if test dlopen = "$pass"; then
 	# Collect dlpreopened libraries
-	save_deplibs="$deplibs"
+	save_deplibs=$deplibs
 	deplibs=
       fi
 
       for deplib in $libs; do
 	lib=
-	found=no
+	found=false
 	case $deplib in
 	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
         |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
-	  if test "$linkmode,$pass" = "prog,link"; then
+	  if test prog,link = "$linkmode,$pass"; then
 	    compile_deplibs="$deplib $compile_deplibs"
 	    finalize_deplibs="$deplib $finalize_deplibs"
 	  else
 	    func_append compiler_flags " $deplib"
-	    if test "$linkmode" = lib ; then
+	    if test lib = "$linkmode"; then
 		case "$new_inherited_linker_flags " in
 		    *" $deplib "*) ;;
 		    * ) func_append new_inherited_linker_flags " $deplib" ;;
@@ -6180,13 +7627,13 @@ func_mode_link ()
 	  continue
 	  ;;
 	-l*)
-	  if test "$linkmode" != lib && test "$linkmode" != prog; then
-	    func_warning "\`-l' is ignored for archives/objects"
+	  if test lib != "$linkmode" && test prog != "$linkmode"; then
+	    func_warning "'-l' is ignored for archives/objects"
 	    continue
 	  fi
 	  func_stripname '-l' '' "$deplib"
 	  name=$func_stripname_result
-	  if test "$linkmode" = lib; then
+	  if test lib = "$linkmode"; then
 	    searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
 	  else
 	    searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
@@ -6194,31 +7641,22 @@ func_mode_link ()
 	  for searchdir in $searchdirs; do
 	    for search_ext in .la $std_shrext .so .a; do
 	      # Search the libtool library
-	      lib="$searchdir/lib${name}${search_ext}"
+	      lib=$searchdir/lib$name$search_ext
 	      if test -f "$lib"; then
-		if test "$search_ext" = ".la"; then
-		  found=yes
+		if test .la = "$search_ext"; then
+		  found=:
 		else
-		  found=no
+		  found=false
 		fi
 		break 2
 	      fi
 	    done
 	  done
-	  if test "$found" != yes; then
-	    # deplib doesn't seem to be a libtool library
-	    if test "$linkmode,$pass" = "prog,link"; then
-	      compile_deplibs="$deplib $compile_deplibs"
-	      finalize_deplibs="$deplib $finalize_deplibs"
-	    else
-	      deplibs="$deplib $deplibs"
-	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
-	    fi
-	    continue
-	  else # deplib is a libtool library
+	  if $found; then
+	    # deplib is a libtool library
 	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
 	    # We need to do some special things here, and not later.
-	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	    if test yes = "$allow_libtool_libs_with_static_runtimes"; then
 	      case " $predeps $postdeps " in
 	      *" $deplib "*)
 		if func_lalib_p "$lib"; then
@@ -6226,19 +7664,19 @@ func_mode_link ()
 		  old_library=
 		  func_source "$lib"
 		  for l in $old_library $library_names; do
-		    ll="$l"
+		    ll=$l
 		  done
-		  if test "X$ll" = "X$old_library" ; then # only static version available
-		    found=no
+		  if test "X$ll" = "X$old_library"; then # only static version available
+		    found=false
 		    func_dirname "$lib" "" "."
-		    ladir="$func_dirname_result"
+		    ladir=$func_dirname_result
 		    lib=$ladir/$old_library
-		    if test "$linkmode,$pass" = "prog,link"; then
+		    if test prog,link = "$linkmode,$pass"; then
 		      compile_deplibs="$deplib $compile_deplibs"
 		      finalize_deplibs="$deplib $finalize_deplibs"
 		    else
 		      deplibs="$deplib $deplibs"
-		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+		      test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
 		    fi
 		    continue
 		  fi
@@ -6247,15 +7685,25 @@ func_mode_link ()
 	      *) ;;
 	      esac
 	    fi
+	  else
+	    # deplib doesn't seem to be a libtool library
+	    if test prog,link = "$linkmode,$pass"; then
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      deplibs="$deplib $deplibs"
+	      test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    continue
 	  fi
 	  ;; # -l
 	*.ltframework)
-	  if test "$linkmode,$pass" = "prog,link"; then
+	  if test prog,link = "$linkmode,$pass"; then
 	    compile_deplibs="$deplib $compile_deplibs"
 	    finalize_deplibs="$deplib $finalize_deplibs"
 	  else
 	    deplibs="$deplib $deplibs"
-	    if test "$linkmode" = lib ; then
+	    if test lib = "$linkmode"; then
 		case "$new_inherited_linker_flags " in
 		    *" $deplib "*) ;;
 		    * ) func_append new_inherited_linker_flags " $deplib" ;;
@@ -6268,18 +7716,18 @@ func_mode_link ()
 	  case $linkmode in
 	  lib)
 	    deplibs="$deplib $deplibs"
-	    test "$pass" = conv && continue
+	    test conv = "$pass" && continue
 	    newdependency_libs="$deplib $newdependency_libs"
 	    func_stripname '-L' '' "$deplib"
 	    func_resolve_sysroot "$func_stripname_result"
 	    func_append newlib_search_path " $func_resolve_sysroot_result"
 	    ;;
 	  prog)
-	    if test "$pass" = conv; then
+	    if test conv = "$pass"; then
 	      deplibs="$deplib $deplibs"
 	      continue
 	    fi
-	    if test "$pass" = scan; then
+	    if test scan = "$pass"; then
 	      deplibs="$deplib $deplibs"
 	    else
 	      compile_deplibs="$deplib $compile_deplibs"
@@ -6290,13 +7738,13 @@ func_mode_link ()
 	    func_append newlib_search_path " $func_resolve_sysroot_result"
 	    ;;
 	  *)
-	    func_warning "\`-L' is ignored for archives/objects"
+	    func_warning "'-L' is ignored for archives/objects"
 	    ;;
 	  esac # linkmode
 	  continue
 	  ;; # -L
 	-R*)
-	  if test "$pass" = link; then
+	  if test link = "$pass"; then
 	    func_stripname '-R' '' "$deplib"
 	    func_resolve_sysroot "$func_stripname_result"
 	    dir=$func_resolve_sysroot_result
@@ -6314,7 +7762,7 @@ func_mode_link ()
 	  lib=$func_resolve_sysroot_result
 	  ;;
 	*.$libext)
-	  if test "$pass" = conv; then
+	  if test conv = "$pass"; then
 	    deplibs="$deplib $deplibs"
 	    continue
 	  fi
@@ -6325,21 +7773,26 @@ func_mode_link ()
 	    case " $dlpreconveniencelibs " in
 	    *" $deplib "*) ;;
 	    *)
-	      valid_a_lib=no
+	      valid_a_lib=false
 	      case $deplibs_check_method in
 		match_pattern*)
 		  set dummy $deplibs_check_method; shift
 		  match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
 		  if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
 		    | $EGREP "$match_pattern_regex" > /dev/null; then
-		    valid_a_lib=yes
+		    valid_a_lib=:
 		  fi
 		;;
 		pass_all)
-		  valid_a_lib=yes
+		  valid_a_lib=:
 		;;
 	      esac
-	      if test "$valid_a_lib" != yes; then
+	      if $valid_a_lib; then
+		echo
+		$ECHO "*** Warning: Linking the shared library $output against the"
+		$ECHO "*** static library $deplib is not portable!"
+		deplibs="$deplib $deplibs"
+	      else
 		echo
 		$ECHO "*** Warning: Trying to link with static lib archive $deplib."
 		echo "*** I have the capability to make that library automatically link in when"
@@ -6347,18 +7800,13 @@ func_mode_link ()
 		echo "*** shared version of the library, which you do not appear to have"
 		echo "*** because the file extensions .$libext of this argument makes me believe"
 		echo "*** that it is just a static archive that I should not use here."
-	      else
-		echo
-		$ECHO "*** Warning: Linking the shared library $output against the"
-		$ECHO "*** static library $deplib is not portable!"
-		deplibs="$deplib $deplibs"
 	      fi
 	      ;;
 	    esac
 	    continue
 	    ;;
 	  prog)
-	    if test "$pass" != link; then
+	    if test link != "$pass"; then
 	      deplibs="$deplib $deplibs"
 	    else
 	      compile_deplibs="$deplib $compile_deplibs"
@@ -6369,10 +7817,10 @@ func_mode_link ()
 	  esac # linkmode
 	  ;; # *.$libext
 	*.lo | *.$objext)
-	  if test "$pass" = conv; then
+	  if test conv = "$pass"; then
 	    deplibs="$deplib $deplibs"
-	  elif test "$linkmode" = prog; then
-	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+	  elif test prog = "$linkmode"; then
+	    if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then
 	      # If there is no dlopen support or we're linking statically,
 	      # we need to preload.
 	      func_append newdlprefiles " $deplib"
@@ -6385,22 +7833,20 @@ func_mode_link ()
 	  continue
 	  ;;
 	%DEPLIBS%)
-	  alldeplibs=yes
+	  alldeplibs=:
 	  continue
 	  ;;
 	esac # case $deplib
 
-	if test "$found" = yes || test -f "$lib"; then :
-	else
-	  func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
-	fi
+	$found || test -f "$lib" \
+	  || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'"
 
 	# Check to see that this really is a libtool archive.
 	func_lalib_unsafe_p "$lib" \
-	  || func_fatal_error "\`$lib' is not a valid libtool archive"
+	  || func_fatal_error "'$lib' is not a valid libtool archive"
 
 	func_dirname "$lib" "" "."
-	ladir="$func_dirname_result"
+	ladir=$func_dirname_result
 
 	dlname=
 	dlopen=
@@ -6430,19 +7876,19 @@ func_mode_link ()
 	  done
 	fi
 	dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
-	if test "$linkmode,$pass" = "lib,link" ||
-	   test "$linkmode,$pass" = "prog,scan" ||
-	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+	if test lib,link = "$linkmode,$pass" ||
+	   test prog,scan = "$linkmode,$pass" ||
+	   { test prog != "$linkmode" && test lib != "$linkmode"; }; then
 	  test -n "$dlopen" && func_append dlfiles " $dlopen"
 	  test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
 	fi
 
-	if test "$pass" = conv; then
+	if test conv = "$pass"; then
 	  # Only check for convenience libraries
 	  deplibs="$lib $deplibs"
 	  if test -z "$libdir"; then
 	    if test -z "$old_library"; then
-	      func_fatal_error "cannot find name of link library for \`$lib'"
+	      func_fatal_error "cannot find name of link library for '$lib'"
 	    fi
 	    # It is a libtool convenience library, so add in its objects.
 	    func_append convenience " $ladir/$objdir/$old_library"
@@ -6450,15 +7896,15 @@ func_mode_link ()
 	    tmp_libs=
 	    for deplib in $dependency_libs; do
 	      deplibs="$deplib $deplibs"
-	      if $opt_preserve_dup_deps ; then
+	      if $opt_preserve_dup_deps; then
 		case "$tmp_libs " in
 		*" $deplib "*) func_append specialdeplibs " $deplib" ;;
 		esac
 	      fi
 	      func_append tmp_libs " $deplib"
 	    done
-	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
-	    func_fatal_error "\`$lib' is not a convenience library"
+	  elif test prog != "$linkmode" && test lib != "$linkmode"; then
+	    func_fatal_error "'$lib' is not a convenience library"
 	  fi
 	  continue
 	fi # $pass = conv
@@ -6467,26 +7913,26 @@ func_mode_link ()
 	# Get the name of the library we link against.
 	linklib=
 	if test -n "$old_library" &&
-	   { test "$prefer_static_libs" = yes ||
-	     test "$prefer_static_libs,$installed" = "built,no"; }; then
+	   { test yes = "$prefer_static_libs" ||
+	     test built,no = "$prefer_static_libs,$installed"; }; then
 	  linklib=$old_library
 	else
 	  for l in $old_library $library_names; do
-	    linklib="$l"
+	    linklib=$l
 	  done
 	fi
 	if test -z "$linklib"; then
-	  func_fatal_error "cannot find name of link library for \`$lib'"
+	  func_fatal_error "cannot find name of link library for '$lib'"
 	fi
 
 	# This library was specified with -dlopen.
-	if test "$pass" = dlopen; then
-	  if test -z "$libdir"; then
-	    func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
-	  fi
+	if test dlopen = "$pass"; then
+	  test -z "$libdir" \
+	    && func_fatal_error "cannot -dlopen a convenience library: '$lib'"
 	  if test -z "$dlname" ||
-	     test "$dlopen_support" != yes ||
-	     test "$build_libtool_libs" = no; then
+	     test yes != "$dlopen_support" ||
+	     test no = "$build_libtool_libs"
+	  then
 	    # If there is no dlname, no dlopen support or we're linking
 	    # statically, we need to preload.  We also need to preload any
 	    # dependent libraries so libltdl's deplib preloader doesn't
@@ -6500,40 +7946,40 @@ func_mode_link ()
 
 	# We need an absolute path.
 	case $ladir in
-	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;;
 	*)
 	  abs_ladir=`cd "$ladir" && pwd`
 	  if test -z "$abs_ladir"; then
-	    func_warning "cannot determine absolute directory name of \`$ladir'"
+	    func_warning "cannot determine absolute directory name of '$ladir'"
 	    func_warning "passing it literally to the linker, although it might fail"
-	    abs_ladir="$ladir"
+	    abs_ladir=$ladir
 	  fi
 	  ;;
 	esac
 	func_basename "$lib"
-	laname="$func_basename_result"
+	laname=$func_basename_result
 
 	# Find the relevant object directory and library name.
-	if test "X$installed" = Xyes; then
+	if test yes = "$installed"; then
 	  if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
-	    func_warning "library \`$lib' was moved."
-	    dir="$ladir"
-	    absdir="$abs_ladir"
-	    libdir="$abs_ladir"
+	    func_warning "library '$lib' was moved."
+	    dir=$ladir
+	    absdir=$abs_ladir
+	    libdir=$abs_ladir
 	  else
-	    dir="$lt_sysroot$libdir"
-	    absdir="$lt_sysroot$libdir"
+	    dir=$lt_sysroot$libdir
+	    absdir=$lt_sysroot$libdir
 	  fi
-	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+	  test yes = "$hardcode_automatic" && avoidtemprpath=yes
 	else
 	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
-	    dir="$ladir"
-	    absdir="$abs_ladir"
+	    dir=$ladir
+	    absdir=$abs_ladir
 	    # Remove this search path later
 	    func_append notinst_path " $abs_ladir"
 	  else
-	    dir="$ladir/$objdir"
-	    absdir="$abs_ladir/$objdir"
+	    dir=$ladir/$objdir
+	    absdir=$abs_ladir/$objdir
 	    # Remove this search path later
 	    func_append notinst_path " $abs_ladir"
 	  fi
@@ -6542,11 +7988,11 @@ func_mode_link ()
 	name=$func_stripname_result
 
 	# This library was specified with -dlpreopen.
-	if test "$pass" = dlpreopen; then
-	  if test -z "$libdir" && test "$linkmode" = prog; then
-	    func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
+	if test dlpreopen = "$pass"; then
+	  if test -z "$libdir" && test prog = "$linkmode"; then
+	    func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'"
 	  fi
-	  case "$host" in
+	  case $host in
 	    # special handling for platforms with PE-DLLs.
 	    *cygwin* | *mingw* | *cegcc* )
 	      # Linker will automatically link against shared library if both
@@ -6590,9 +8036,9 @@ func_mode_link ()
 
 	if test -z "$libdir"; then
 	  # Link the convenience library
-	  if test "$linkmode" = lib; then
+	  if test lib = "$linkmode"; then
 	    deplibs="$dir/$old_library $deplibs"
-	  elif test "$linkmode,$pass" = "prog,link"; then
+	  elif test prog,link = "$linkmode,$pass"; then
 	    compile_deplibs="$dir/$old_library $compile_deplibs"
 	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
 	  else
@@ -6602,14 +8048,14 @@ func_mode_link ()
 	fi
 
 
-	if test "$linkmode" = prog && test "$pass" != link; then
+	if test prog = "$linkmode" && test link != "$pass"; then
 	  func_append newlib_search_path " $ladir"
 	  deplibs="$lib $deplibs"
 
-	  linkalldeplibs=no
-	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
-	     test "$build_libtool_libs" = no; then
-	    linkalldeplibs=yes
+	  linkalldeplibs=false
+	  if test no != "$link_all_deplibs" || test -z "$library_names" ||
+	     test no = "$build_libtool_libs"; then
+	    linkalldeplibs=:
 	  fi
 
 	  tmp_libs=
@@ -6621,14 +8067,14 @@ func_mode_link ()
 		 ;;
 	    esac
 	    # Need to link against all dependency_libs?
-	    if test "$linkalldeplibs" = yes; then
+	    if $linkalldeplibs; then
 	      deplibs="$deplib $deplibs"
 	    else
 	      # Need to hardcode shared library paths
 	      # or/and link against static libraries
 	      newdependency_libs="$deplib $newdependency_libs"
 	    fi
-	    if $opt_preserve_dup_deps ; then
+	    if $opt_preserve_dup_deps; then
 	      case "$tmp_libs " in
 	      *" $deplib "*) func_append specialdeplibs " $deplib" ;;
 	      esac
@@ -6638,15 +8084,15 @@ func_mode_link ()
 	  continue
 	fi # $linkmode = prog...
 
-	if test "$linkmode,$pass" = "prog,link"; then
+	if test prog,link = "$linkmode,$pass"; then
 	  if test -n "$library_names" &&
-	     { { test "$prefer_static_libs" = no ||
-	         test "$prefer_static_libs,$installed" = "built,yes"; } ||
+	     { { test no = "$prefer_static_libs" ||
+	         test built,yes = "$prefer_static_libs,$installed"; } ||
 	       test -z "$old_library"; }; then
 	    # We need to hardcode the library path
-	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then
 	      # Make sure the rpath contains only unique directories.
-	      case "$temp_rpath:" in
+	      case $temp_rpath: in
 	      *"$absdir:"*) ;;
 	      *) func_append temp_rpath "$absdir:" ;;
 	      esac
@@ -6675,9 +8121,9 @@ func_mode_link ()
 	    esac
 	  fi # $linkmode,$pass = prog,link...
 
-	  if test "$alldeplibs" = yes &&
-	     { test "$deplibs_check_method" = pass_all ||
-	       { test "$build_libtool_libs" = yes &&
+	  if $alldeplibs &&
+	     { test pass_all = "$deplibs_check_method" ||
+	       { test yes = "$build_libtool_libs" &&
 		 test -n "$library_names"; }; }; then
 	    # We only need to search for static libraries
 	    continue
@@ -6686,19 +8132,19 @@ func_mode_link ()
 
 	link_static=no # Whether the deplib will be linked statically
 	use_static_libs=$prefer_static_libs
-	if test "$use_static_libs" = built && test "$installed" = yes; then
+	if test built = "$use_static_libs" && test yes = "$installed"; then
 	  use_static_libs=no
 	fi
 	if test -n "$library_names" &&
-	   { test "$use_static_libs" = no || test -z "$old_library"; }; then
+	   { test no = "$use_static_libs" || test -z "$old_library"; }; then
 	  case $host in
-	  *cygwin* | *mingw* | *cegcc*)
+	  *cygwin* | *mingw* | *cegcc* | *os2*)
 	      # No point in relinking DLLs because paths are not encoded
 	      func_append notinst_deplibs " $lib"
 	      need_relink=no
 	    ;;
 	  *)
-	    if test "$installed" = no; then
+	    if test no = "$installed"; then
 	      func_append notinst_deplibs " $lib"
 	      need_relink=yes
 	    fi
@@ -6708,24 +8154,24 @@ func_mode_link ()
 
 	  # Warn about portability, can't link against -module's on some
 	  # systems (darwin).  Don't bleat about dlopened modules though!
-	  dlopenmodule=""
+	  dlopenmodule=
 	  for dlpremoduletest in $dlprefiles; do
 	    if test "X$dlpremoduletest" = "X$lib"; then
-	      dlopenmodule="$dlpremoduletest"
+	      dlopenmodule=$dlpremoduletest
 	      break
 	    fi
 	  done
-	  if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
+	  if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then
 	    echo
-	    if test "$linkmode" = prog; then
+	    if test prog = "$linkmode"; then
 	      $ECHO "*** Warning: Linking the executable $output against the loadable module"
 	    else
 	      $ECHO "*** Warning: Linking the shared library $output against the loadable module"
 	    fi
 	    $ECHO "*** $linklib is not portable!"
 	  fi
-	  if test "$linkmode" = lib &&
-	     test "$hardcode_into_libs" = yes; then
+	  if test lib = "$linkmode" &&
+	     test yes = "$hardcode_into_libs"; then
 	    # Hardcode the library path.
 	    # Skip directories that are in the system default run-time
 	    # search path.
@@ -6753,43 +8199,43 @@ func_mode_link ()
 	    # figure out the soname
 	    set dummy $library_names
 	    shift
-	    realname="$1"
+	    realname=$1
 	    shift
 	    libname=`eval "\\$ECHO \"$libname_spec\""`
 	    # use dlname if we got it. it's perfectly good, no?
 	    if test -n "$dlname"; then
-	      soname="$dlname"
+	      soname=$dlname
 	    elif test -n "$soname_spec"; then
 	      # bleh windows
 	      case $host in
-	      *cygwin* | mingw* | *cegcc*)
+	      *cygwin* | mingw* | *cegcc* | *os2*)
 	        func_arith $current - $age
 		major=$func_arith_result
-		versuffix="-$major"
+		versuffix=-$major
 		;;
 	      esac
 	      eval soname=\"$soname_spec\"
 	    else
-	      soname="$realname"
+	      soname=$realname
 	    fi
 
 	    # Make a new name for the extract_expsyms_cmds to use
-	    soroot="$soname"
+	    soroot=$soname
 	    func_basename "$soroot"
-	    soname="$func_basename_result"
+	    soname=$func_basename_result
 	    func_stripname 'lib' '.dll' "$soname"
 	    newlib=libimp-$func_stripname_result.a
 
 	    # If the library has no export list, then create one now
 	    if test -f "$output_objdir/$soname-def"; then :
 	    else
-	      func_verbose "extracting exported symbol list from \`$soname'"
+	      func_verbose "extracting exported symbol list from '$soname'"
 	      func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
 	    fi
 
 	    # Create $newlib
 	    if test -f "$output_objdir/$newlib"; then :; else
-	      func_verbose "generating import library for \`$soname'"
+	      func_verbose "generating import library for '$soname'"
 	      func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
 	    fi
 	    # make sure the library variables are pointing to the new library
@@ -6797,58 +8243,58 @@ func_mode_link ()
 	    linklib=$newlib
 	  fi # test -n "$old_archive_from_expsyms_cmds"
 
-	  if test "$linkmode" = prog || test "$opt_mode" != relink; then
+	  if test prog = "$linkmode" || test relink != "$opt_mode"; then
 	    add_shlibpath=
 	    add_dir=
 	    add=
 	    lib_linked=yes
 	    case $hardcode_action in
 	    immediate | unsupported)
-	      if test "$hardcode_direct" = no; then
-		add="$dir/$linklib"
+	      if test no = "$hardcode_direct"; then
+		add=$dir/$linklib
 		case $host in
-		  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
-		  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+		  *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;;
+		  *-*-sysv4*uw2*) add_dir=-L$dir ;;
 		  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
-		    *-*-unixware7*) add_dir="-L$dir" ;;
+		    *-*-unixware7*) add_dir=-L$dir ;;
 		  *-*-darwin* )
-		    # if the lib is a (non-dlopened) module then we can not
+		    # if the lib is a (non-dlopened) module then we cannot
 		    # link against it, someone is ignoring the earlier warnings
 		    if /usr/bin/file -L $add 2> /dev/null |
-			 $GREP ": [^:]* bundle" >/dev/null ; then
+			 $GREP ": [^:]* bundle" >/dev/null; then
 		      if test "X$dlopenmodule" != "X$lib"; then
 			$ECHO "*** Warning: lib $linklib is a module, not a shared library"
-			if test -z "$old_library" ; then
+			if test -z "$old_library"; then
 			  echo
 			  echo "*** And there doesn't seem to be a static archive available"
 			  echo "*** The link will probably fail, sorry"
 			else
-			  add="$dir/$old_library"
+			  add=$dir/$old_library
 			fi
 		      elif test -n "$old_library"; then
-			add="$dir/$old_library"
+			add=$dir/$old_library
 		      fi
 		    fi
 		esac
-	      elif test "$hardcode_minus_L" = no; then
+	      elif test no = "$hardcode_minus_L"; then
 		case $host in
-		*-*-sunos*) add_shlibpath="$dir" ;;
+		*-*-sunos*) add_shlibpath=$dir ;;
 		esac
-		add_dir="-L$dir"
-		add="-l$name"
-	      elif test "$hardcode_shlibpath_var" = no; then
-		add_shlibpath="$dir"
-		add="-l$name"
+		add_dir=-L$dir
+		add=-l$name
+	      elif test no = "$hardcode_shlibpath_var"; then
+		add_shlibpath=$dir
+		add=-l$name
 	      else
 		lib_linked=no
 	      fi
 	      ;;
 	    relink)
-	      if test "$hardcode_direct" = yes &&
-	         test "$hardcode_direct_absolute" = no; then
-		add="$dir/$linklib"
-	      elif test "$hardcode_minus_L" = yes; then
-		add_dir="-L$absdir"
+	      if test yes = "$hardcode_direct" &&
+	         test no = "$hardcode_direct_absolute"; then
+		add=$dir/$linklib
+	      elif test yes = "$hardcode_minus_L"; then
+		add_dir=-L$absdir
 		# Try looking first in the location we're being installed to.
 		if test -n "$inst_prefix_dir"; then
 		  case $libdir in
@@ -6857,10 +8303,10 @@ func_mode_link ()
 		      ;;
 		  esac
 		fi
-		add="-l$name"
-	      elif test "$hardcode_shlibpath_var" = yes; then
-		add_shlibpath="$dir"
-		add="-l$name"
+		add=-l$name
+	      elif test yes = "$hardcode_shlibpath_var"; then
+		add_shlibpath=$dir
+		add=-l$name
 	      else
 		lib_linked=no
 	      fi
@@ -6868,7 +8314,7 @@ func_mode_link ()
 	    *) lib_linked=no ;;
 	    esac
 
-	    if test "$lib_linked" != yes; then
+	    if test yes != "$lib_linked"; then
 	      func_fatal_configuration "unsupported hardcode properties"
 	    fi
 
@@ -6878,15 +8324,15 @@ func_mode_link ()
 	      *) func_append compile_shlibpath "$add_shlibpath:" ;;
 	      esac
 	    fi
-	    if test "$linkmode" = prog; then
+	    if test prog = "$linkmode"; then
 	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
 	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
 	    else
 	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
 	      test -n "$add" && deplibs="$add $deplibs"
-	      if test "$hardcode_direct" != yes &&
-		 test "$hardcode_minus_L" != yes &&
-		 test "$hardcode_shlibpath_var" = yes; then
+	      if test yes != "$hardcode_direct" &&
+		 test yes != "$hardcode_minus_L" &&
+		 test yes = "$hardcode_shlibpath_var"; then
 		case :$finalize_shlibpath: in
 		*":$libdir:"*) ;;
 		*) func_append finalize_shlibpath "$libdir:" ;;
@@ -6895,33 +8341,33 @@ func_mode_link ()
 	    fi
 	  fi
 
-	  if test "$linkmode" = prog || test "$opt_mode" = relink; then
+	  if test prog = "$linkmode" || test relink = "$opt_mode"; then
 	    add_shlibpath=
 	    add_dir=
 	    add=
 	    # Finalize command for both is simple: just hardcode it.
-	    if test "$hardcode_direct" = yes &&
-	       test "$hardcode_direct_absolute" = no; then
-	      add="$libdir/$linklib"
-	    elif test "$hardcode_minus_L" = yes; then
-	      add_dir="-L$libdir"
-	      add="-l$name"
-	    elif test "$hardcode_shlibpath_var" = yes; then
+	    if test yes = "$hardcode_direct" &&
+	       test no = "$hardcode_direct_absolute"; then
+	      add=$libdir/$linklib
+	    elif test yes = "$hardcode_minus_L"; then
+	      add_dir=-L$libdir
+	      add=-l$name
+	    elif test yes = "$hardcode_shlibpath_var"; then
 	      case :$finalize_shlibpath: in
 	      *":$libdir:"*) ;;
 	      *) func_append finalize_shlibpath "$libdir:" ;;
 	      esac
-	      add="-l$name"
-	    elif test "$hardcode_automatic" = yes; then
+	      add=-l$name
+	    elif test yes = "$hardcode_automatic"; then
 	      if test -n "$inst_prefix_dir" &&
-		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
-		add="$inst_prefix_dir$libdir/$linklib"
+		 test -f "$inst_prefix_dir$libdir/$linklib"; then
+		add=$inst_prefix_dir$libdir/$linklib
 	      else
-		add="$libdir/$linklib"
+		add=$libdir/$linklib
 	      fi
 	    else
 	      # We cannot seem to hardcode it, guess we'll fake it.
-	      add_dir="-L$libdir"
+	      add_dir=-L$libdir
 	      # Try looking first in the location we're being installed to.
 	      if test -n "$inst_prefix_dir"; then
 		case $libdir in
@@ -6930,10 +8376,10 @@ func_mode_link ()
 		    ;;
 		esac
 	      fi
-	      add="-l$name"
+	      add=-l$name
 	    fi
 
-	    if test "$linkmode" = prog; then
+	    if test prog = "$linkmode"; then
 	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
 	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
 	    else
@@ -6941,43 +8387,43 @@ func_mode_link ()
 	      test -n "$add" && deplibs="$add $deplibs"
 	    fi
 	  fi
-	elif test "$linkmode" = prog; then
+	elif test prog = "$linkmode"; then
 	  # Here we assume that one of hardcode_direct or hardcode_minus_L
 	  # is not unsupported.  This is valid on all known static and
 	  # shared platforms.
-	  if test "$hardcode_direct" != unsupported; then
-	    test -n "$old_library" && linklib="$old_library"
+	  if test unsupported != "$hardcode_direct"; then
+	    test -n "$old_library" && linklib=$old_library
 	    compile_deplibs="$dir/$linklib $compile_deplibs"
 	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
 	  else
 	    compile_deplibs="-l$name -L$dir $compile_deplibs"
 	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
 	  fi
-	elif test "$build_libtool_libs" = yes; then
+	elif test yes = "$build_libtool_libs"; then
 	  # Not a shared library
-	  if test "$deplibs_check_method" != pass_all; then
+	  if test pass_all != "$deplibs_check_method"; then
 	    # We're trying link a shared library against a static one
 	    # but the system doesn't support it.
 
 	    # Just print a warning and add the library to dependency_libs so
 	    # that the program can be linked against the static library.
 	    echo
-	    $ECHO "*** Warning: This system can not link to static lib archive $lib."
+	    $ECHO "*** Warning: This system cannot link to static lib archive $lib."
 	    echo "*** I have the capability to make that library automatically link in when"
 	    echo "*** you link to this library.  But I can only do this if you have a"
 	    echo "*** shared version of the library, which you do not appear to have."
-	    if test "$module" = yes; then
+	    if test yes = "$module"; then
 	      echo "*** But as you try to build a module library, libtool will still create "
 	      echo "*** a static module, that should work as long as the dlopening application"
 	      echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
 	      if test -z "$global_symbol_pipe"; then
 		echo
 		echo "*** However, this would only work if libtool was able to extract symbol"
-		echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+		echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
 		echo "*** not find such a program.  So, this module is probably useless."
-		echo "*** \`nm' from GNU binutils and a full rebuild may help."
+		echo "*** 'nm' from GNU binutils and a full rebuild may help."
 	      fi
-	      if test "$build_old_libs" = no; then
+	      if test no = "$build_old_libs"; then
 		build_libtool_libs=module
 		build_old_libs=yes
 	      else
@@ -6990,11 +8436,11 @@ func_mode_link ()
 	  fi
 	fi # link shared/static library?
 
-	if test "$linkmode" = lib; then
+	if test lib = "$linkmode"; then
 	  if test -n "$dependency_libs" &&
-	     { test "$hardcode_into_libs" != yes ||
-	       test "$build_old_libs" = yes ||
-	       test "$link_static" = yes; }; then
+	     { test yes != "$hardcode_into_libs" ||
+	       test yes = "$build_old_libs" ||
+	       test yes = "$link_static"; }; then
 	    # Extract -R from dependency_libs
 	    temp_deplibs=
 	    for libdir in $dependency_libs; do
@@ -7008,12 +8454,12 @@ func_mode_link ()
 	      *) func_append temp_deplibs " $libdir";;
 	      esac
 	    done
-	    dependency_libs="$temp_deplibs"
+	    dependency_libs=$temp_deplibs
 	  fi
 
 	  func_append newlib_search_path " $absdir"
 	  # Link against this library
-	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+	  test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
 	  # ... and its dependency_libs
 	  tmp_libs=
 	  for deplib in $dependency_libs; do
@@ -7023,7 +8469,7 @@ func_mode_link ()
                    func_resolve_sysroot "$func_stripname_result";;
               *) func_resolve_sysroot "$deplib" ;;
             esac
-	    if $opt_preserve_dup_deps ; then
+	    if $opt_preserve_dup_deps; then
 	      case "$tmp_libs " in
 	      *" $func_resolve_sysroot_result "*)
                 func_append specialdeplibs " $func_resolve_sysroot_result" ;;
@@ -7032,12 +8478,12 @@ func_mode_link ()
 	    func_append tmp_libs " $func_resolve_sysroot_result"
 	  done
 
-	  if test "$link_all_deplibs" != no; then
+	  if test no != "$link_all_deplibs"; then
 	    # Add the search paths of all dependency libraries
 	    for deplib in $dependency_libs; do
 	      path=
 	      case $deplib in
-	      -L*) path="$deplib" ;;
+	      -L*) path=$deplib ;;
 	      *.la)
 	        func_resolve_sysroot "$deplib"
 	        deplib=$func_resolve_sysroot_result
@@ -7045,12 +8491,12 @@ func_mode_link ()
 		dir=$func_dirname_result
 		# We need an absolute path.
 		case $dir in
-		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+		[\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;;
 		*)
 		  absdir=`cd "$dir" && pwd`
 		  if test -z "$absdir"; then
-		    func_warning "cannot determine absolute directory name of \`$dir'"
-		    absdir="$dir"
+		    func_warning "cannot determine absolute directory name of '$dir'"
+		    absdir=$dir
 		  fi
 		  ;;
 		esac
@@ -7058,35 +8504,35 @@ func_mode_link ()
 		case $host in
 		*-*-darwin*)
 		  depdepl=
-		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
-		  if test -n "$deplibrary_names" ; then
-		    for tmp in $deplibrary_names ; do
+		  eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+		  if test -n "$deplibrary_names"; then
+		    for tmp in $deplibrary_names; do
 		      depdepl=$tmp
 		    done
-		    if test -f "$absdir/$objdir/$depdepl" ; then
-		      depdepl="$absdir/$objdir/$depdepl"
-		      darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+		    if test -f "$absdir/$objdir/$depdepl"; then
+		      depdepl=$absdir/$objdir/$depdepl
+		      darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
                       if test -z "$darwin_install_name"; then
-                          darwin_install_name=`${OTOOL64} -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`
+                          darwin_install_name=`$OTOOL64 -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`
                       fi
-		      func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
-		      func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
+		      func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl"
+		      func_append linker_flags " -dylib_file $darwin_install_name:$depdepl"
 		      path=
 		    fi
 		  fi
 		  ;;
 		*)
-		  path="-L$absdir/$objdir"
+		  path=-L$absdir/$objdir
 		  ;;
 		esac
 		else
-		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		  eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
 		  test -z "$libdir" && \
-		    func_fatal_error "\`$deplib' is not a valid libtool archive"
+		    func_fatal_error "'$deplib' is not a valid libtool archive"
 		  test "$absdir" != "$libdir" && \
-		    func_warning "\`$deplib' seems to be moved"
+		    func_warning "'$deplib' seems to be moved"
 
-		  path="-L$absdir"
+		  path=-L$absdir
 		fi
 		;;
 	      esac
@@ -7098,23 +8544,23 @@ func_mode_link ()
 	  fi # link_all_deplibs != no
 	fi # linkmode = lib
       done # for deplib in $libs
-      if test "$pass" = link; then
-	if test "$linkmode" = "prog"; then
+      if test link = "$pass"; then
+	if test prog = "$linkmode"; then
 	  compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
 	  finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
 	else
 	  compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
 	fi
       fi
-      dependency_libs="$newdependency_libs"
-      if test "$pass" = dlpreopen; then
+      dependency_libs=$newdependency_libs
+      if test dlpreopen = "$pass"; then
 	# Link the dlpreopened libraries before other libraries
 	for deplib in $save_deplibs; do
 	  deplibs="$deplib $deplibs"
 	done
       fi
-      if test "$pass" != dlopen; then
-	if test "$pass" != conv; then
+      if test dlopen != "$pass"; then
+	test conv = "$pass" || {
 	  # Make sure lib_search_path contains only unique directories.
 	  lib_search_path=
 	  for dir in $newlib_search_path; do
@@ -7124,12 +8570,12 @@ func_mode_link ()
 	    esac
 	  done
 	  newlib_search_path=
-	fi
+	}
 
-	if test "$linkmode,$pass" != "prog,link"; then
-	  vars="deplibs"
-	else
+	if test prog,link = "$linkmode,$pass"; then
 	  vars="compile_deplibs finalize_deplibs"
+	else
+	  vars=deplibs
 	fi
 	for var in $vars dependency_libs; do
 	  # Add libraries to $var in reverse order
@@ -7187,62 +8633,93 @@ func_mode_link ()
 	  eval $var=\"$tmp_libs\"
 	done # for var
       fi
+
+      # Add Sun CC postdeps if required:
+      test CXX = "$tagname" && {
+        case $host_os in
+        linux*)
+          case `$CC -V 2>&1 | sed 5q` in
+          *Sun\ C*) # Sun C++ 5.9
+            func_suncc_cstd_abi
+
+            if test no != "$suncc_use_cstd_abi"; then
+              func_append postdeps ' -library=Cstd -library=Crun'
+            fi
+            ;;
+          esac
+          ;;
+
+        solaris*)
+          func_cc_basename "$CC"
+          case $func_cc_basename_result in
+          CC* | sunCC*)
+            func_suncc_cstd_abi
+
+            if test no != "$suncc_use_cstd_abi"; then
+              func_append postdeps ' -library=Cstd -library=Crun'
+            fi
+            ;;
+          esac
+          ;;
+        esac
+      }
+
       # Last step: remove runtime libs from dependency_libs
       # (they stay in deplibs)
       tmp_libs=
-      for i in $dependency_libs ; do
+      for i in $dependency_libs; do
 	case " $predeps $postdeps $compiler_lib_search_path " in
 	*" $i "*)
-	  i=""
+	  i=
 	  ;;
 	esac
-	if test -n "$i" ; then
+	if test -n "$i"; then
 	  func_append tmp_libs " $i"
 	fi
       done
       dependency_libs=$tmp_libs
     done # for pass
-    if test "$linkmode" = prog; then
-      dlfiles="$newdlfiles"
+    if test prog = "$linkmode"; then
+      dlfiles=$newdlfiles
     fi
-    if test "$linkmode" = prog || test "$linkmode" = lib; then
-      dlprefiles="$newdlprefiles"
+    if test prog = "$linkmode" || test lib = "$linkmode"; then
+      dlprefiles=$newdlprefiles
     fi
 
     case $linkmode in
     oldlib)
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-	func_warning "\`-dlopen' is ignored for archives"
+      if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+	func_warning "'-dlopen' is ignored for archives"
       fi
 
       case " $deplibs" in
       *\ -l* | *\ -L*)
-	func_warning "\`-l' and \`-L' are ignored for archives" ;;
+	func_warning "'-l' and '-L' are ignored for archives" ;;
       esac
 
       test -n "$rpath" && \
-	func_warning "\`-rpath' is ignored for archives"
+	func_warning "'-rpath' is ignored for archives"
 
       test -n "$xrpath" && \
-	func_warning "\`-R' is ignored for archives"
+	func_warning "'-R' is ignored for archives"
 
       test -n "$vinfo" && \
-	func_warning "\`-version-info/-version-number' is ignored for archives"
+	func_warning "'-version-info/-version-number' is ignored for archives"
 
       test -n "$release" && \
-	func_warning "\`-release' is ignored for archives"
+	func_warning "'-release' is ignored for archives"
 
       test -n "$export_symbols$export_symbols_regex" && \
-	func_warning "\`-export-symbols' is ignored for archives"
+	func_warning "'-export-symbols' is ignored for archives"
 
       # Now set the variables for building old libraries.
       build_libtool_libs=no
-      oldlibs="$output"
+      oldlibs=$output
       func_append objs "$old_deplibs"
       ;;
 
     lib)
-      # Make sure we only generate libraries of the form `libNAME.la'.
+      # Make sure we only generate libraries of the form 'libNAME.la'.
       case $outputname in
       lib*)
 	func_stripname 'lib' '.la' "$outputname"
@@ -7251,10 +8728,10 @@ func_mode_link ()
 	eval libname=\"$libname_spec\"
 	;;
       *)
-	test "$module" = no && \
-	  func_fatal_help "libtool library \`$output' must begin with \`lib'"
+	test no = "$module" \
+	  && func_fatal_help "libtool library '$output' must begin with 'lib'"
 
-	if test "$need_lib_prefix" != no; then
+	if test no != "$need_lib_prefix"; then
 	  # Add the "lib" prefix for modules if required
 	  func_stripname '' '.la' "$outputname"
 	  name=$func_stripname_result
@@ -7268,8 +8745,8 @@ func_mode_link ()
       esac
 
       if test -n "$objs"; then
-	if test "$deplibs_check_method" != pass_all; then
-	  func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
+	if test pass_all != "$deplibs_check_method"; then
+	  func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs"
 	else
 	  echo
 	  $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
@@ -7278,21 +8755,21 @@ func_mode_link ()
 	fi
       fi
 
-      test "$dlself" != no && \
-	func_warning "\`-dlopen self' is ignored for libtool libraries"
+      test no = "$dlself" \
+	|| func_warning "'-dlopen self' is ignored for libtool libraries"
 
       set dummy $rpath
       shift
-      test "$#" -gt 1 && \
-	func_warning "ignoring multiple \`-rpath's for a libtool library"
+      test 1 -lt "$#" \
+	&& func_warning "ignoring multiple '-rpath's for a libtool library"
 
-      install_libdir="$1"
+      install_libdir=$1
 
       oldlibs=
       if test -z "$rpath"; then
-	if test "$build_libtool_libs" = yes; then
+	if test yes = "$build_libtool_libs"; then
 	  # Building a libtool convenience library.
-	  # Some compilers have problems with a `.al' extension so
+	  # Some compilers have problems with a '.al' extension so
 	  # convenience libraries should have the same extension an
 	  # archive normally would.
 	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
@@ -7301,20 +8778,20 @@ func_mode_link ()
 	fi
 
 	test -n "$vinfo" && \
-	  func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
+	  func_warning "'-version-info/-version-number' is ignored for convenience libraries"
 
 	test -n "$release" && \
-	  func_warning "\`-release' is ignored for convenience libraries"
+	  func_warning "'-release' is ignored for convenience libraries"
       else
 
 	# Parse the version information argument.
-	save_ifs="$IFS"; IFS=':'
+	save_ifs=$IFS; IFS=:
 	set dummy $vinfo 0 0 0
 	shift
-	IFS="$save_ifs"
+	IFS=$save_ifs
 
 	test -n "$7" && \
-	  func_fatal_help "too many parameters to \`-version-info'"
+	  func_fatal_help "too many parameters to '-version-info'"
 
 	# convert absolute version numbers to libtool ages
 	# this retains compatibility with .la files and attempts
@@ -7322,45 +8799,45 @@ func_mode_link ()
 
 	case $vinfo_number in
 	yes)
-	  number_major="$1"
-	  number_minor="$2"
-	  number_revision="$3"
+	  number_major=$1
+	  number_minor=$2
+	  number_revision=$3
 	  #
 	  # There are really only two kinds -- those that
 	  # use the current revision as the major version
 	  # and those that subtract age and use age as
 	  # a minor version.  But, then there is irix
-	  # which has an extra 1 added just for fun
+	  # that has an extra 1 added just for fun
 	  #
 	  case $version_type in
 	  # correct linux to gnu/linux during the next big refactor
-	  darwin|linux|osf|windows|none)
+	  darwin|freebsd-elf|linux|osf|windows|none)
 	    func_arith $number_major + $number_minor
 	    current=$func_arith_result
-	    age="$number_minor"
-	    revision="$number_revision"
+	    age=$number_minor
+	    revision=$number_revision
 	    ;;
-	  freebsd-aout|freebsd-elf|qnx|sunos)
-	    current="$number_major"
-	    revision="$number_minor"
-	    age="0"
+	  freebsd-aout|qnx|sunos)
+	    current=$number_major
+	    revision=$number_minor
+	    age=0
 	    ;;
 	  irix|nonstopux)
 	    func_arith $number_major + $number_minor
 	    current=$func_arith_result
-	    age="$number_minor"
-	    revision="$number_minor"
+	    age=$number_minor
+	    revision=$number_minor
 	    lt_irix_increment=no
 	    ;;
 	  *)
-	    func_fatal_configuration "$modename: unknown library version type \`$version_type'"
+	    func_fatal_configuration "$modename: unknown library version type '$version_type'"
 	    ;;
 	  esac
 	  ;;
 	no)
-	  current="$1"
-	  revision="$2"
-	  age="$3"
+	  current=$1
+	  revision=$2
+	  age=$3
 	  ;;
 	esac
 
@@ -7368,30 +8845,30 @@ func_mode_link ()
 	case $current in
 	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
 	*)
-	  func_error "CURRENT \`$current' must be a nonnegative integer"
-	  func_fatal_error "\`$vinfo' is not valid version information"
+	  func_error "CURRENT '$current' must be a nonnegative integer"
+	  func_fatal_error "'$vinfo' is not valid version information"
 	  ;;
 	esac
 
 	case $revision in
 	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
 	*)
-	  func_error "REVISION \`$revision' must be a nonnegative integer"
-	  func_fatal_error "\`$vinfo' is not valid version information"
+	  func_error "REVISION '$revision' must be a nonnegative integer"
+	  func_fatal_error "'$vinfo' is not valid version information"
 	  ;;
 	esac
 
 	case $age in
 	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
 	*)
-	  func_error "AGE \`$age' must be a nonnegative integer"
-	  func_fatal_error "\`$vinfo' is not valid version information"
+	  func_error "AGE '$age' must be a nonnegative integer"
+	  func_fatal_error "'$vinfo' is not valid version information"
 	  ;;
 	esac
 
 	if test "$age" -gt "$current"; then
-	  func_error "AGE \`$age' is greater than the current interface number \`$current'"
-	  func_fatal_error "\`$vinfo' is not valid version information"
+	  func_error "AGE '$age' is greater than the current interface number '$current'"
+	  func_fatal_error "'$vinfo' is not valid version information"
 	fi
 
 	# Calculate the version variables.
@@ -7406,26 +8883,36 @@ func_mode_link ()
 	  # verstring for coding it into the library header
 	  func_arith $current - $age
 	  major=.$func_arith_result
-	  versuffix="$major.$age.$revision"
+	  versuffix=$major.$age.$revision
 	  # Darwin ld doesn't like 0 for these options...
 	  func_arith $current + 1
 	  minor_current=$func_arith_result
-	  xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+	  xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
 	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+          # On Darwin other compilers
+          case $CC in
+              nagfor*)
+                  verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
+                  ;;
+              *)
+                  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+                  ;;
+          esac
 	  ;;
 
 	freebsd-aout)
-	  major=".$current"
-	  versuffix=".$current.$revision";
+	  major=.$current
+	  versuffix=.$current.$revision
 	  ;;
 
 	freebsd-elf)
-	  major=".$current"
-	  versuffix=".$current"
+	  func_arith $current - $age
+	  major=.$func_arith_result
+	  versuffix=$major.$age.$revision
 	  ;;
 
 	irix | nonstopux)
-	  if test "X$lt_irix_increment" = "Xno"; then
+	  if test no = "$lt_irix_increment"; then
 	    func_arith $current - $age
 	  else
 	    func_arith $current - $age + 1
@@ -7436,69 +8923,74 @@ func_mode_link ()
 	    nonstopux) verstring_prefix=nonstopux ;;
 	    *)         verstring_prefix=sgi ;;
 	  esac
-	  verstring="$verstring_prefix$major.$revision"
+	  verstring=$verstring_prefix$major.$revision
 
 	  # Add in all the interfaces that we are compatible with.
 	  loop=$revision
-	  while test "$loop" -ne 0; do
+	  while test 0 -ne "$loop"; do
 	    func_arith $revision - $loop
 	    iface=$func_arith_result
 	    func_arith $loop - 1
 	    loop=$func_arith_result
-	    verstring="$verstring_prefix$major.$iface:$verstring"
+	    verstring=$verstring_prefix$major.$iface:$verstring
 	  done
 
-	  # Before this point, $major must not contain `.'.
+	  # Before this point, $major must not contain '.'.
 	  major=.$major
-	  versuffix="$major.$revision"
+	  versuffix=$major.$revision
 	  ;;
 
 	linux) # correct to gnu/linux during the next big refactor
 	  func_arith $current - $age
 	  major=.$func_arith_result
-	  versuffix="$major.$age.$revision"
+	  versuffix=$major.$age.$revision
 	  ;;
 
 	osf)
 	  func_arith $current - $age
 	  major=.$func_arith_result
-	  versuffix=".$current.$age.$revision"
-	  verstring="$current.$age.$revision"
+	  versuffix=.$current.$age.$revision
+	  verstring=$current.$age.$revision
 
 	  # Add in all the interfaces that we are compatible with.
 	  loop=$age
-	  while test "$loop" -ne 0; do
+	  while test 0 -ne "$loop"; do
 	    func_arith $current - $loop
 	    iface=$func_arith_result
 	    func_arith $loop - 1
 	    loop=$func_arith_result
-	    verstring="$verstring:${iface}.0"
+	    verstring=$verstring:$iface.0
 	  done
 
 	  # Make executables depend on our current version.
-	  func_append verstring ":${current}.0"
+	  func_append verstring ":$current.0"
 	  ;;
 
 	qnx)
-	  major=".$current"
-	  versuffix=".$current"
+	  major=.$current
+	  versuffix=.$current
+	  ;;
+
+	sco)
+	  major=.$current
+	  versuffix=.$current
 	  ;;
 
 	sunos)
-	  major=".$current"
-	  versuffix=".$current.$revision"
+	  major=.$current
+	  versuffix=.$current.$revision
 	  ;;
 
 	windows)
 	  # Use '-' rather than '.', since we only want one
-	  # extension on DOS 8.3 filesystems.
+	  # extension on DOS 8.3 file systems.
 	  func_arith $current - $age
 	  major=$func_arith_result
-	  versuffix="-$major"
+	  versuffix=-$major
 	  ;;
 
 	*)
-	  func_fatal_configuration "unknown library version type \`$version_type'"
+	  func_fatal_configuration "unknown library version type '$version_type'"
 	  ;;
 	esac
 
@@ -7512,42 +9004,45 @@ func_mode_link ()
 	    verstring=
 	    ;;
 	  *)
-	    verstring="0.0"
+	    verstring=0.0
 	    ;;
 	  esac
-	  if test "$need_version" = no; then
+	  if test no = "$need_version"; then
 	    versuffix=
 	  else
-	    versuffix=".0.0"
+	    versuffix=.0.0
 	  fi
 	fi
 
 	# Remove version info from name if versioning should be avoided
-	if test "$avoid_version" = yes && test "$need_version" = no; then
+	if test yes,no = "$avoid_version,$need_version"; then
 	  major=
 	  versuffix=
-	  verstring=""
+	  verstring=
 	fi
 
 	# Check to see if the archive will have undefined symbols.
-	if test "$allow_undefined" = yes; then
-	  if test "$allow_undefined_flag" = unsupported; then
-	    func_warning "undefined symbols not allowed in $host shared libraries"
-	    build_libtool_libs=no
-	    build_old_libs=yes
+	if test yes = "$allow_undefined"; then
+	  if test unsupported = "$allow_undefined_flag"; then
+	    if test yes = "$build_old_libs"; then
+	      func_warning "undefined symbols not allowed in $host shared libraries; building static only"
+	      build_libtool_libs=no
+	    else
+	      func_fatal_error "can't build $host shared library unless -no-undefined is specified"
+	    fi
 	  fi
 	else
 	  # Don't allow undefined symbols.
-	  allow_undefined_flag="$no_undefined_flag"
+	  allow_undefined_flag=$no_undefined_flag
 	fi
 
       fi
 
-      func_generate_dlsyms "$libname" "$libname" "yes"
+      func_generate_dlsyms "$libname" "$libname" :
       func_append libobjs " $symfileobj"
-      test "X$libobjs" = "X " && libobjs=
+      test " " = "$libobjs" && libobjs=
 
-      if test "$opt_mode" != relink; then
+      if test relink != "$opt_mode"; then
 	# Remove our outputs, but don't remove object files since they
 	# may have been created when compiling PIC objects.
 	removelist=
@@ -7556,8 +9051,8 @@ func_mode_link ()
 	  case $p in
 	    *.$objext | *.gcno)
 	       ;;
-	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
-	       if test "X$precious_files_regex" != "X"; then
+	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*)
+	       if test -n "$precious_files_regex"; then
 		 if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
 		 then
 		   continue
@@ -7573,11 +9068,11 @@ func_mode_link ()
       fi
 
       # Now set the variables for building old libraries.
-      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+      if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then
 	func_append oldlibs " $output_objdir/$libname.$libext"
 
 	# Transform .lo files to .o files.
-	oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
+	oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP`
       fi
 
       # Eliminate all temporary directories.
@@ -7598,13 +9093,13 @@ func_mode_link ()
 	  *) func_append finalize_rpath " $libdir" ;;
 	  esac
 	done
-	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+	if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then
 	  dependency_libs="$temp_xrpath $dependency_libs"
 	fi
       fi
 
       # Make sure dlfiles contains only unique files that won't be dlpreopened
-      old_dlfiles="$dlfiles"
+      old_dlfiles=$dlfiles
       dlfiles=
       for lib in $old_dlfiles; do
 	case " $dlprefiles $dlfiles " in
@@ -7614,7 +9109,7 @@ func_mode_link ()
       done
 
       # Make sure dlprefiles contains only unique files
-      old_dlprefiles="$dlprefiles"
+      old_dlprefiles=$dlprefiles
       dlprefiles=
       for lib in $old_dlprefiles; do
 	case "$dlprefiles " in
@@ -7623,7 +9118,7 @@ func_mode_link ()
 	esac
       done
 
-      if test "$build_libtool_libs" = yes; then
+      if test yes = "$build_libtool_libs"; then
 	if test -n "$rpath"; then
 	  case $host in
 	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
@@ -7647,7 +9142,7 @@ func_mode_link ()
 	    ;;
 	  *)
 	    # Add libc to deplibs on all other systems if necessary.
-	    if test "$build_libtool_need_lc" = "yes"; then
+	    if test yes = "$build_libtool_need_lc"; then
 	      func_append deplibs " -lc"
 	    fi
 	    ;;
@@ -7663,9 +9158,9 @@ func_mode_link ()
 	# I'm not sure if I'm treating the release correctly.  I think
 	# release should show up in the -l (ie -lgmp5) so we don't want to
 	# add it in twice.  Is that correct?
-	release=""
-	versuffix=""
-	major=""
+	release=
+	versuffix=
+	major=
 	newdeplibs=
 	droppeddeps=no
 	case $deplibs_check_method in
@@ -7694,20 +9189,20 @@ EOF
 	      -l*)
 		func_stripname -l '' "$i"
 		name=$func_stripname_result
-		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		if test yes = "$allow_libtool_libs_with_static_runtimes"; then
 		  case " $predeps $postdeps " in
 		  *" $i "*)
 		    func_append newdeplibs " $i"
-		    i=""
+		    i=
 		    ;;
 		  esac
 		fi
-		if test -n "$i" ; then
+		if test -n "$i"; then
 		  libname=`eval "\\$ECHO \"$libname_spec\""`
 		  deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
 		  set dummy $deplib_matches; shift
 		  deplib_match=$1
-		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
 		    func_append newdeplibs " $i"
 		  else
 		    droppeddeps=yes
@@ -7737,20 +9232,20 @@ EOF
 		$opt_dry_run || $RM conftest
 		if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
 		  ldd_output=`ldd conftest`
-		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		  if test yes = "$allow_libtool_libs_with_static_runtimes"; then
 		    case " $predeps $postdeps " in
 		    *" $i "*)
 		      func_append newdeplibs " $i"
-		      i=""
+		      i=
 		      ;;
 		    esac
 		  fi
-		  if test -n "$i" ; then
+		  if test -n "$i"; then
 		    libname=`eval "\\$ECHO \"$libname_spec\""`
 		    deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
 		    set dummy $deplib_matches; shift
 		    deplib_match=$1
-		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
 		      func_append newdeplibs " $i"
 		    else
 		      droppeddeps=yes
@@ -7787,24 +9282,24 @@ EOF
 	    -l*)
 	      func_stripname -l '' "$a_deplib"
 	      name=$func_stripname_result
-	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	      if test yes = "$allow_libtool_libs_with_static_runtimes"; then
 		case " $predeps $postdeps " in
 		*" $a_deplib "*)
 		  func_append newdeplibs " $a_deplib"
-		  a_deplib=""
+		  a_deplib=
 		  ;;
 		esac
 	      fi
-	      if test -n "$a_deplib" ; then
+	      if test -n "$a_deplib"; then
 		libname=`eval "\\$ECHO \"$libname_spec\""`
 		if test -n "$file_magic_glob"; then
 		  libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
 		else
 		  libnameglob=$libname
 		fi
-		test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
+		test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob`
 		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
-		  if test "$want_nocaseglob" = yes; then
+		  if test yes = "$want_nocaseglob"; then
 		    shopt -s nocaseglob
 		    potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
 		    $nocaseglob
@@ -7822,25 +9317,25 @@ EOF
 		      # We might still enter an endless loop, since a link
 		      # loop can be closed while we follow links,
 		      # but so what?
-		      potlib="$potent_lib"
+		      potlib=$potent_lib
 		      while test -h "$potlib" 2>/dev/null; do
-			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+			potliblink=`ls -ld $potlib | $SED 's/.* -> //'`
 			case $potliblink in
-			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
-			*) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
+			[\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;;
+			*) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";;
 			esac
 		      done
 		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
 			 $SED -e 10q |
 			 $EGREP "$file_magic_regex" > /dev/null; then
 			func_append newdeplibs " $a_deplib"
-			a_deplib=""
+			a_deplib=
 			break 2
 		      fi
 		  done
 		done
 	      fi
-	      if test -n "$a_deplib" ; then
+	      if test -n "$a_deplib"; then
 		droppeddeps=yes
 		echo
 		$ECHO "*** Warning: linker path does not have real file for library $a_deplib."
@@ -7848,7 +9343,7 @@ EOF
 		echo "*** you link to this library.  But I can only do this if you have a"
 		echo "*** shared version of the library, which you do not appear to have"
 		echo "*** because I did check the linker path looking for a file starting"
-		if test -z "$potlib" ; then
+		if test -z "$potlib"; then
 		  $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
 		else
 		  $ECHO "*** with $libname and none of the candidates passed a file format test"
@@ -7871,30 +9366,30 @@ EOF
 	    -l*)
 	      func_stripname -l '' "$a_deplib"
 	      name=$func_stripname_result
-	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	      if test yes = "$allow_libtool_libs_with_static_runtimes"; then
 		case " $predeps $postdeps " in
 		*" $a_deplib "*)
 		  func_append newdeplibs " $a_deplib"
-		  a_deplib=""
+		  a_deplib=
 		  ;;
 		esac
 	      fi
-	      if test -n "$a_deplib" ; then
+	      if test -n "$a_deplib"; then
 		libname=`eval "\\$ECHO \"$libname_spec\""`
 		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
 		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
 		  for potent_lib in $potential_libs; do
-		    potlib="$potent_lib" # see symlink-check above in file_magic test
+		    potlib=$potent_lib # see symlink-check above in file_magic test
 		    if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
 		       $EGREP "$match_pattern_regex" > /dev/null; then
 		      func_append newdeplibs " $a_deplib"
-		      a_deplib=""
+		      a_deplib=
 		      break 2
 		    fi
 		  done
 		done
 	      fi
-	      if test -n "$a_deplib" ; then
+	      if test -n "$a_deplib"; then
 		droppeddeps=yes
 		echo
 		$ECHO "*** Warning: linker path does not have real file for library $a_deplib."
@@ -7902,7 +9397,7 @@ EOF
 		echo "*** you link to this library.  But I can only do this if you have a"
 		echo "*** shared version of the library, which you do not appear to have"
 		echo "*** because I did check the linker path looking for a file starting"
-		if test -z "$potlib" ; then
+		if test -z "$potlib"; then
 		  $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
 		else
 		  $ECHO "*** with $libname and none of the candidates passed a file format test"
@@ -7918,18 +9413,18 @@ EOF
 	  done # Gone through all deplibs.
 	  ;;
 	none | unknown | *)
-	  newdeplibs=""
+	  newdeplibs=
 	  tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
-	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-	    for i in $predeps $postdeps ; do
+	  if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+	    for i in $predeps $postdeps; do
 	      # can't use Xsed below, because $i might contain '/'
-	      tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
+	      tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"`
 	    done
 	  fi
 	  case $tmp_deplibs in
 	  *[!\	\ ]*)
 	    echo
-	    if test "X$deplibs_check_method" = "Xnone"; then
+	    if test none = "$deplibs_check_method"; then
 	      echo "*** Warning: inter-library dependencies are not supported in this platform."
 	    else
 	      echo "*** Warning: inter-library dependencies are not known to be supported."
@@ -7953,8 +9448,8 @@ EOF
 	  ;;
 	esac
 
-	if test "$droppeddeps" = yes; then
-	  if test "$module" = yes; then
+	if test yes = "$droppeddeps"; then
+	  if test yes = "$module"; then
 	    echo
 	    echo "*** Warning: libtool could not satisfy all declared inter-library"
 	    $ECHO "*** dependencies of module $libname.  Therefore, libtool will create"
@@ -7963,12 +9458,12 @@ EOF
 	    if test -z "$global_symbol_pipe"; then
 	      echo
 	      echo "*** However, this would only work if libtool was able to extract symbol"
-	      echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+	      echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
 	      echo "*** not find such a program.  So, this module is probably useless."
-	      echo "*** \`nm' from GNU binutils and a full rebuild may help."
+	      echo "*** 'nm' from GNU binutils and a full rebuild may help."
 	    fi
-	    if test "$build_old_libs" = no; then
-	      oldlibs="$output_objdir/$libname.$libext"
+	    if test no = "$build_old_libs"; then
+	      oldlibs=$output_objdir/$libname.$libext
 	      build_libtool_libs=module
 	      build_old_libs=yes
 	    else
@@ -7979,14 +9474,14 @@ EOF
 	    echo "*** automatically added whenever a program is linked with this library"
 	    echo "*** or is declared to -dlopen it."
 
-	    if test "$allow_undefined" = no; then
+	    if test no = "$allow_undefined"; then
 	      echo
 	      echo "*** Since this library must not contain undefined symbols,"
 	      echo "*** because either the platform does not support them or"
 	      echo "*** it was explicitly requested with -no-undefined,"
 	      echo "*** libtool will only create a static version of it."
-	      if test "$build_old_libs" = no; then
-		oldlibs="$output_objdir/$libname.$libext"
+	      if test no = "$build_old_libs"; then
+		oldlibs=$output_objdir/$libname.$libext
 		build_libtool_libs=module
 		build_old_libs=yes
 	      else
@@ -8032,7 +9527,7 @@ EOF
 	*) func_append new_libs " $deplib" ;;
 	esac
       done
-      deplibs="$new_libs"
+      deplibs=$new_libs
 
       # All the library-specific variables (install_libdir is set above).
       library_names=
@@ -8040,25 +9535,25 @@ EOF
       dlname=
 
       # Test again, we may have decided not to build it any more
-      if test "$build_libtool_libs" = yes; then
-	# Remove ${wl} instances when linking with ld.
+      if test yes = "$build_libtool_libs"; then
+	# Remove $wl instances when linking with ld.
 	# FIXME: should test the right _cmds variable.
 	case $archive_cmds in
 	  *\$LD\ *) wl= ;;
         esac
-	if test "$hardcode_into_libs" = yes; then
+	if test yes = "$hardcode_into_libs"; then
 	  # Hardcode the library paths
 	  hardcode_libdirs=
 	  dep_rpath=
-	  rpath="$finalize_rpath"
-	  test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
+	  rpath=$finalize_rpath
+	  test relink = "$opt_mode" || rpath=$compile_rpath$rpath
 	  for libdir in $rpath; do
 	    if test -n "$hardcode_libdir_flag_spec"; then
 	      if test -n "$hardcode_libdir_separator"; then
 		func_replace_sysroot "$libdir"
 		libdir=$func_replace_sysroot_result
 		if test -z "$hardcode_libdirs"; then
-		  hardcode_libdirs="$libdir"
+		  hardcode_libdirs=$libdir
 		else
 		  # Just accumulate the unique libdirs.
 		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
@@ -8083,7 +9578,7 @@ EOF
 	  # Substitute the hardcoded libdirs into the rpath.
 	  if test -n "$hardcode_libdir_separator" &&
 	     test -n "$hardcode_libdirs"; then
-	    libdir="$hardcode_libdirs"
+	    libdir=$hardcode_libdirs
 	    eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
 	  fi
 	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
@@ -8097,8 +9592,8 @@ EOF
 	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
 	fi
 
-	shlibpath="$finalize_shlibpath"
-	test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+	shlibpath=$finalize_shlibpath
+	test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath
 	if test -n "$shlibpath"; then
 	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
 	fi
@@ -8108,19 +9603,19 @@ EOF
 	eval library_names=\"$library_names_spec\"
 	set dummy $library_names
 	shift
-	realname="$1"
+	realname=$1
 	shift
 
 	if test -n "$soname_spec"; then
 	  eval soname=\"$soname_spec\"
 	else
-	  soname="$realname"
+	  soname=$realname
 	fi
 	if test -z "$dlname"; then
 	  dlname=$soname
 	fi
 
-	lib="$output_objdir/$realname"
+	lib=$output_objdir/$realname
 	linknames=
 	for link
 	do
@@ -8134,7 +9629,7 @@ EOF
 	delfiles=
 	if test -n "$export_symbols" && test -n "$include_expsyms"; then
 	  $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
-	  export_symbols="$output_objdir/$libname.uexp"
+	  export_symbols=$output_objdir/$libname.uexp
 	  func_append delfiles " $export_symbols"
 	fi
 
@@ -8143,31 +9638,31 @@ EOF
 	cygwin* | mingw* | cegcc*)
 	  if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
 	    # exporting using user supplied symfile
-	    if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+	    func_dll_def_p "$export_symbols" || {
 	      # and it's NOT already a .def file. Must figure out
 	      # which of the given symbols are data symbols and tag
 	      # them as such. So, trigger use of export_symbols_cmds.
 	      # export_symbols gets reassigned inside the "prepare
 	      # the list of exported symbols" if statement, so the
 	      # include_expsyms logic still works.
-	      orig_export_symbols="$export_symbols"
+	      orig_export_symbols=$export_symbols
 	      export_symbols=
 	      always_export_symbols=yes
-	    fi
+	    }
 	  fi
 	  ;;
 	esac
 
 	# Prepare the list of exported symbols
 	if test -z "$export_symbols"; then
-	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
-	    func_verbose "generating symbol list for \`$libname.la'"
-	    export_symbols="$output_objdir/$libname.exp"
+	  if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then
+	    func_verbose "generating symbol list for '$libname.la'"
+	    export_symbols=$output_objdir/$libname.exp
 	    $opt_dry_run || $RM $export_symbols
 	    cmds=$export_symbols_cmds
-	    save_ifs="$IFS"; IFS='~'
+	    save_ifs=$IFS; IFS='~'
 	    for cmd1 in $cmds; do
-	      IFS="$save_ifs"
+	      IFS=$save_ifs
 	      # Take the normal branch if the nm_file_list_spec branch
 	      # doesn't work or if tool conversion is not needed.
 	      case $nm_file_list_spec~$to_tool_file_cmd in
@@ -8181,7 +9676,7 @@ EOF
 		  try_normal_branch=no
 		  ;;
 	      esac
-	      if test "$try_normal_branch" = yes \
+	      if test yes = "$try_normal_branch" \
 		 && { test "$len" -lt "$max_cmd_len" \
 		      || test "$max_cmd_len" -le -1; }
 	      then
@@ -8192,7 +9687,7 @@ EOF
 		output_la=$func_basename_result
 		save_libobjs=$libobjs
 		save_output=$output
-		output=${output_objdir}/${output_la}.nm
+		output=$output_objdir/$output_la.nm
 		func_to_tool_file "$output"
 		libobjs=$nm_file_list_spec$func_to_tool_file_result
 		func_append delfiles " $output"
@@ -8215,8 +9710,8 @@ EOF
 		break
 	      fi
 	    done
-	    IFS="$save_ifs"
-	    if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
+	    IFS=$save_ifs
+	    if test -n "$export_symbols_regex" && test : != "$skipped_export"; then
 	      func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
 	      func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
 	    fi
@@ -8224,16 +9719,16 @@ EOF
 	fi
 
 	if test -n "$export_symbols" && test -n "$include_expsyms"; then
-	  tmp_export_symbols="$export_symbols"
-	  test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+	  tmp_export_symbols=$export_symbols
+	  test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
 	  $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
 	fi
 
-	if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
+	if test : != "$skipped_export" && test -n "$orig_export_symbols"; then
 	  # The given exports_symbols file has to be filtered, so filter it.
-	  func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+	  func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
 	  # FIXME: $output_objdir/$libname.filter potentially contains lots of
-	  # 's' commands which not all seds can handle. GNU sed should be fine
+	  # 's' commands, which not all seds can handle. GNU sed should be fine
 	  # though. Also, the filter scales superlinearly with the number of
 	  # global variables. join(1) would be nice here, but unfortunately
 	  # isn't a blessed tool.
@@ -8252,11 +9747,11 @@ EOF
 	    ;;
 	  esac
 	done
-	deplibs="$tmp_deplibs"
+	deplibs=$tmp_deplibs
 
 	if test -n "$convenience"; then
 	  if test -n "$whole_archive_flag_spec" &&
-	    test "$compiler_needs_object" = yes &&
+	    test yes = "$compiler_needs_object" &&
 	    test -z "$libobjs"; then
 	    # extract the archives, so we have objects to list.
 	    # TODO: could optimize this to just extract one archive.
@@ -8267,7 +9762,7 @@ EOF
 	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
 	    test "X$libobjs" = "X " && libobjs=
 	  else
-	    gentop="$output_objdir/${outputname}x"
+	    gentop=$output_objdir/${outputname}x
 	    func_append generated " $gentop"
 
 	    func_extract_archives $gentop $convenience
@@ -8276,18 +9771,18 @@ EOF
 	  fi
 	fi
 
-	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+	if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then
 	  eval flag=\"$thread_safe_flag_spec\"
 	  func_append linker_flags " $flag"
 	fi
 
 	# Make a backup of the uninstalled library when relinking
-	if test "$opt_mode" = relink; then
+	if test relink = "$opt_mode"; then
 	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
 	fi
 
 	# Do each of the archive commands.
-	if test "$module" = yes && test -n "$module_cmds" ; then
+	if test yes = "$module" && test -n "$module_cmds"; then
 	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
 	    eval test_cmds=\"$module_expsym_cmds\"
 	    cmds=$module_expsym_cmds
@@ -8305,7 +9800,7 @@ EOF
 	  fi
 	fi
 
-	if test "X$skipped_export" != "X:" &&
+	if test : != "$skipped_export" &&
 	   func_len " $test_cmds" &&
 	   len=$func_len_result &&
 	   test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
@@ -8338,8 +9833,8 @@ EOF
 	  last_robj=
 	  k=1
 
-	  if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
-	    output=${output_objdir}/${output_la}.lnkscript
+	  if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
+	    output=$output_objdir/$output_la.lnkscript
 	    func_verbose "creating GNU ld script: $output"
 	    echo 'INPUT (' > $output
 	    for obj in $save_libobjs
@@ -8351,14 +9846,14 @@ EOF
 	    func_append delfiles " $output"
 	    func_to_tool_file "$output"
 	    output=$func_to_tool_file_result
-	  elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
-	    output=${output_objdir}/${output_la}.lnk
+	  elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
+	    output=$output_objdir/$output_la.lnk
 	    func_verbose "creating linker input file list: $output"
 	    : > $output
 	    set x $save_libobjs
 	    shift
 	    firstobj=
-	    if test "$compiler_needs_object" = yes; then
+	    if test yes = "$compiler_needs_object"; then
 	      firstobj="$1 "
 	      shift
 	    fi
@@ -8373,7 +9868,7 @@ EOF
 	  else
 	    if test -n "$save_libobjs"; then
 	      func_verbose "creating reloadable object files..."
-	      output=$output_objdir/$output_la-${k}.$objext
+	      output=$output_objdir/$output_la-$k.$objext
 	      eval test_cmds=\"$reload_cmds\"
 	      func_len " $test_cmds"
 	      len0=$func_len_result
@@ -8385,13 +9880,13 @@ EOF
 		func_len " $obj"
 		func_arith $len + $func_len_result
 		len=$func_arith_result
-		if test "X$objlist" = X ||
+		if test -z "$objlist" ||
 		   test "$len" -lt "$max_cmd_len"; then
 		  func_append objlist " $obj"
 		else
 		  # The command $test_cmds is almost too long, add a
 		  # command to the queue.
-		  if test "$k" -eq 1 ; then
+		  if test 1 -eq "$k"; then
 		    # The first file doesn't have a previous command to add.
 		    reload_objs=$objlist
 		    eval concat_cmds=\"$reload_cmds\"
@@ -8401,10 +9896,10 @@ EOF
 		    reload_objs="$objlist $last_robj"
 		    eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
 		  fi
-		  last_robj=$output_objdir/$output_la-${k}.$objext
+		  last_robj=$output_objdir/$output_la-$k.$objext
 		  func_arith $k + 1
 		  k=$func_arith_result
-		  output=$output_objdir/$output_la-${k}.$objext
+		  output=$output_objdir/$output_la-$k.$objext
 		  objlist=" $obj"
 		  func_len " $last_robj"
 		  func_arith $len0 + $func_len_result
@@ -8416,9 +9911,9 @@ EOF
 	      # files will link in the last one created.
 	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
 	      reload_objs="$objlist $last_robj"
-	      eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
+	      eval concat_cmds=\"\$concat_cmds$reload_cmds\"
 	      if test -n "$last_robj"; then
-	        eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
+	        eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
 	      fi
 	      func_append delfiles " $output"
 
@@ -8426,9 +9921,9 @@ EOF
 	      output=
 	    fi
 
-	    if ${skipped_export-false}; then
-	      func_verbose "generating symbol list for \`$libname.la'"
-	      export_symbols="$output_objdir/$libname.exp"
+	    ${skipped_export-false} && {
+	      func_verbose "generating symbol list for '$libname.la'"
+	      export_symbols=$output_objdir/$libname.exp
 	      $opt_dry_run || $RM $export_symbols
 	      libobjs=$output
 	      # Append the command to create the export file.
@@ -8437,16 +9932,16 @@ EOF
 	      if test -n "$last_robj"; then
 		eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
 	      fi
-	    fi
+	    }
 
 	    test -n "$save_libobjs" &&
 	      func_verbose "creating a temporary reloadable object file: $output"
 
 	    # Loop through the commands generated above and execute them.
-	    save_ifs="$IFS"; IFS='~'
+	    save_ifs=$IFS; IFS='~'
 	    for cmd in $concat_cmds; do
-	      IFS="$save_ifs"
-	      $opt_silent || {
+	      IFS=$save_ifs
+	      $opt_quiet || {
 		  func_quote_for_expand "$cmd"
 		  eval "func_echo $func_quote_for_expand_result"
 	      }
@@ -8454,7 +9949,7 @@ EOF
 		lt_exit=$?
 
 		# Restore the uninstalled library and exit
-		if test "$opt_mode" = relink; then
+		if test relink = "$opt_mode"; then
 		  ( cd "$output_objdir" && \
 		    $RM "${realname}T" && \
 		    $MV "${realname}U" "$realname" )
@@ -8463,7 +9958,7 @@ EOF
 		exit $lt_exit
 	      }
 	    done
-	    IFS="$save_ifs"
+	    IFS=$save_ifs
 
 	    if test -n "$export_symbols_regex" && ${skipped_export-false}; then
 	      func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
@@ -8471,18 +9966,18 @@ EOF
 	    fi
 	  fi
 
-          if ${skipped_export-false}; then
+          ${skipped_export-false} && {
 	    if test -n "$export_symbols" && test -n "$include_expsyms"; then
-	      tmp_export_symbols="$export_symbols"
-	      test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+	      tmp_export_symbols=$export_symbols
+	      test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
 	      $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
 	    fi
 
 	    if test -n "$orig_export_symbols"; then
 	      # The given exports_symbols file has to be filtered, so filter it.
-	      func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+	      func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
 	      # FIXME: $output_objdir/$libname.filter potentially contains lots of
-	      # 's' commands which not all seds can handle. GNU sed should be fine
+	      # 's' commands, which not all seds can handle. GNU sed should be fine
 	      # though. Also, the filter scales superlinearly with the number of
 	      # global variables. join(1) would be nice here, but unfortunately
 	      # isn't a blessed tool.
@@ -8491,7 +9986,7 @@ EOF
 	      export_symbols=$output_objdir/$libname.def
 	      $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
 	    fi
-	  fi
+	  }
 
 	  libobjs=$output
 	  # Restore the value of output.
@@ -8505,7 +10000,7 @@ EOF
 	  # value of $libobjs for piecewise linking.
 
 	  # Do each of the archive commands.
-	  if test "$module" = yes && test -n "$module_cmds" ; then
+	  if test yes = "$module" && test -n "$module_cmds"; then
 	    if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
 	      cmds=$module_expsym_cmds
 	    else
@@ -8527,7 +10022,7 @@ EOF
 
 	# Add any objects from preloaded convenience libraries
 	if test -n "$dlprefiles"; then
-	  gentop="$output_objdir/${outputname}x"
+	  gentop=$output_objdir/${outputname}x
 	  func_append generated " $gentop"
 
 	  func_extract_archives $gentop $dlprefiles
@@ -8535,11 +10030,12 @@ EOF
 	  test "X$libobjs" = "X " && libobjs=
 	fi
 
-	save_ifs="$IFS"; IFS='~'
+	save_ifs=$IFS; IFS='~'
 	for cmd in $cmds; do
-	  IFS="$save_ifs"
+	  IFS=$sp$nl
 	  eval cmd=\"$cmd\"
-	  $opt_silent || {
+	  IFS=$save_ifs
+	  $opt_quiet || {
 	    func_quote_for_expand "$cmd"
 	    eval "func_echo $func_quote_for_expand_result"
 	  }
@@ -8547,7 +10043,7 @@ EOF
 	    lt_exit=$?
 
 	    # Restore the uninstalled library and exit
-	    if test "$opt_mode" = relink; then
+	    if test relink = "$opt_mode"; then
 	      ( cd "$output_objdir" && \
 	        $RM "${realname}T" && \
 		$MV "${realname}U" "$realname" )
@@ -8556,10 +10052,10 @@ EOF
 	    exit $lt_exit
 	  }
 	done
-	IFS="$save_ifs"
+	IFS=$save_ifs
 
 	# Restore the uninstalled library and exit
-	if test "$opt_mode" = relink; then
+	if test relink = "$opt_mode"; then
 	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
 
 	  if test -n "$convenience"; then
@@ -8579,39 +10075,39 @@ EOF
 	done
 
 	# If -module or -export-dynamic was specified, set the dlname.
-	if test "$module" = yes || test "$export_dynamic" = yes; then
+	if test yes = "$module" || test yes = "$export_dynamic"; then
 	  # On all known operating systems, these are identical.
-	  dlname="$soname"
+	  dlname=$soname
 	fi
       fi
       ;;
 
     obj)
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-	func_warning "\`-dlopen' is ignored for objects"
+      if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+	func_warning "'-dlopen' is ignored for objects"
       fi
 
       case " $deplibs" in
       *\ -l* | *\ -L*)
-	func_warning "\`-l' and \`-L' are ignored for objects" ;;
+	func_warning "'-l' and '-L' are ignored for objects" ;;
       esac
 
       test -n "$rpath" && \
-	func_warning "\`-rpath' is ignored for objects"
+	func_warning "'-rpath' is ignored for objects"
 
       test -n "$xrpath" && \
-	func_warning "\`-R' is ignored for objects"
+	func_warning "'-R' is ignored for objects"
 
       test -n "$vinfo" && \
-	func_warning "\`-version-info' is ignored for objects"
+	func_warning "'-version-info' is ignored for objects"
 
       test -n "$release" && \
-	func_warning "\`-release' is ignored for objects"
+	func_warning "'-release' is ignored for objects"
 
       case $output in
       *.lo)
 	test -n "$objs$old_deplibs" && \
-	  func_fatal_error "cannot build library object \`$output' from non-libtool objects"
+	  func_fatal_error "cannot build library object '$output' from non-libtool objects"
 
 	libobj=$output
 	func_lo2o "$libobj"
@@ -8619,7 +10115,7 @@ EOF
 	;;
       *)
 	libobj=
-	obj="$output"
+	obj=$output
 	;;
       esac
 
@@ -8632,17 +10128,19 @@ EOF
       # the extraction.
       reload_conv_objs=
       gentop=
-      # reload_cmds runs $LD directly, so let us get rid of
-      # -Wl from whole_archive_flag_spec and hope we can get by with
-      # turning comma into space..
-      wl=
-
+      # if reload_cmds runs $LD directly, get rid of -Wl from
+      # whole_archive_flag_spec and hope we can get by with turning comma
+      # into space.
+      case $reload_cmds in
+        *\$LD[\ \$]*) wl= ;;
+      esac
       if test -n "$convenience"; then
 	if test -n "$whole_archive_flag_spec"; then
 	  eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
-	  reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
+	  test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
+	  reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags
 	else
-	  gentop="$output_objdir/${obj}x"
+	  gentop=$output_objdir/${obj}x
 	  func_append generated " $gentop"
 
 	  func_extract_archives $gentop $convenience
@@ -8651,12 +10149,12 @@ EOF
       fi
 
       # If we're not building shared, we need to use non_pic_objs
-      test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
+      test yes = "$build_libtool_libs" || libobjs=$non_pic_objects
 
       # Create the old-style object.
-      reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+      reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs
 
-      output="$obj"
+      output=$obj
       func_execute_cmds "$reload_cmds" 'exit $?'
 
       # Exit if we aren't doing a library object file.
@@ -8668,7 +10166,7 @@ EOF
 	exit $EXIT_SUCCESS
       fi
 
-      if test "$build_libtool_libs" != yes; then
+      test yes = "$build_libtool_libs" || {
 	if test -n "$gentop"; then
 	  func_show_eval '${RM}r "$gentop"'
 	fi
@@ -8678,12 +10176,12 @@ EOF
 	# $show "echo timestamp > $libobj"
 	# $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
 	exit $EXIT_SUCCESS
-      fi
+      }
 
-      if test -n "$pic_flag" || test "$pic_mode" != default; then
+      if test -n "$pic_flag" || test default != "$pic_mode"; then
 	# Only do commands if we really have different PIC objects.
 	reload_objs="$libobjs $reload_conv_objs"
-	output="$libobj"
+	output=$libobj
 	func_execute_cmds "$reload_cmds" 'exit $?'
       fi
 
@@ -8700,16 +10198,14 @@ EOF
 	          output=$func_stripname_result.exe;;
       esac
       test -n "$vinfo" && \
-	func_warning "\`-version-info' is ignored for programs"
+	func_warning "'-version-info' is ignored for programs"
 
       test -n "$release" && \
-	func_warning "\`-release' is ignored for programs"
+	func_warning "'-release' is ignored for programs"
 
-      test "$preload" = yes \
-        && test "$dlopen_support" = unknown \
-	&& test "$dlopen_self" = unknown \
-	&& test "$dlopen_self_static" = unknown && \
-	  func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
+      $preload \
+	&& test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \
+	&& func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support."
 
       case $host in
       *-*-rhapsody* | *-*-darwin1.[012])
@@ -8723,11 +10219,11 @@ EOF
       *-*-darwin*)
 	# Don't allow lazy linking, it breaks C++ global constructors
 	# But is supposedly fixed on 10.4 or later (yay!).
-	if test "$tagname" = CXX ; then
+	if test CXX = "$tagname"; then
 	  case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
 	    10.[0123])
-	      func_append compile_command " ${wl}-bind_at_load"
-	      func_append finalize_command " ${wl}-bind_at_load"
+	      func_append compile_command " $wl-bind_at_load"
+	      func_append finalize_command " $wl-bind_at_load"
 	    ;;
 	  esac
 	fi
@@ -8763,7 +10259,7 @@ EOF
 	*) func_append new_libs " $deplib" ;;
 	esac
       done
-      compile_deplibs="$new_libs"
+      compile_deplibs=$new_libs
 
 
       func_append compile_command " $compile_deplibs"
@@ -8787,7 +10283,7 @@ EOF
 	if test -n "$hardcode_libdir_flag_spec"; then
 	  if test -n "$hardcode_libdir_separator"; then
 	    if test -z "$hardcode_libdirs"; then
-	      hardcode_libdirs="$libdir"
+	      hardcode_libdirs=$libdir
 	    else
 	      # Just accumulate the unique libdirs.
 	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
@@ -8810,7 +10306,7 @@ EOF
 	fi
 	case $host in
 	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
-	  testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
+	  testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
 	  case :$dllsearchpath: in
 	  *":$libdir:"*) ;;
 	  ::) dllsearchpath=$libdir;;
@@ -8827,10 +10323,10 @@ EOF
       # Substitute the hardcoded libdirs into the rpath.
       if test -n "$hardcode_libdir_separator" &&
 	 test -n "$hardcode_libdirs"; then
-	libdir="$hardcode_libdirs"
+	libdir=$hardcode_libdirs
 	eval rpath=\" $hardcode_libdir_flag_spec\"
       fi
-      compile_rpath="$rpath"
+      compile_rpath=$rpath
 
       rpath=
       hardcode_libdirs=
@@ -8838,7 +10334,7 @@ EOF
 	if test -n "$hardcode_libdir_flag_spec"; then
 	  if test -n "$hardcode_libdir_separator"; then
 	    if test -z "$hardcode_libdirs"; then
-	      hardcode_libdirs="$libdir"
+	      hardcode_libdirs=$libdir
 	    else
 	      # Just accumulate the unique libdirs.
 	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
@@ -8863,45 +10359,43 @@ EOF
       # Substitute the hardcoded libdirs into the rpath.
       if test -n "$hardcode_libdir_separator" &&
 	 test -n "$hardcode_libdirs"; then
-	libdir="$hardcode_libdirs"
+	libdir=$hardcode_libdirs
 	eval rpath=\" $hardcode_libdir_flag_spec\"
       fi
-      finalize_rpath="$rpath"
+      finalize_rpath=$rpath
 
-      if test -n "$libobjs" && test "$build_old_libs" = yes; then
+      if test -n "$libobjs" && test yes = "$build_old_libs"; then
 	# Transform all the library objects into standard objects.
 	compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
 	finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
       fi
 
-      func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
+      func_generate_dlsyms "$outputname" "@PROGRAM@" false
 
       # template prelinking step
       if test -n "$prelink_cmds"; then
 	func_execute_cmds "$prelink_cmds" 'exit $?'
       fi
 
-      wrappers_required=yes
+      wrappers_required=:
       case $host in
       *cegcc* | *mingw32ce*)
         # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
-        wrappers_required=no
+        wrappers_required=false
         ;;
       *cygwin* | *mingw* )
-        if test "$build_libtool_libs" != yes; then
-          wrappers_required=no
-        fi
+        test yes = "$build_libtool_libs" || wrappers_required=false
         ;;
       *)
-        if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
-          wrappers_required=no
+        if test no = "$need_relink" || test yes != "$build_libtool_libs"; then
+          wrappers_required=false
         fi
         ;;
       esac
-      if test "$wrappers_required" = no; then
+      $wrappers_required || {
 	# Replace the output file specification.
 	compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
-	link_command="$compile_command$compile_rpath"
+	link_command=$compile_command$compile_rpath
 
 	# We have no uninstalled library dependencies, so finalize right now.
 	exit_status=0
@@ -8914,12 +10408,12 @@ EOF
 	fi
 
 	# Delete the generated files.
-	if test -f "$output_objdir/${outputname}S.${objext}"; then
-	  func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
+	if test -f "$output_objdir/${outputname}S.$objext"; then
+	  func_show_eval '$RM "$output_objdir/${outputname}S.$objext"'
 	fi
 
 	exit $exit_status
-      fi
+      }
 
       if test -n "$compile_shlibpath$finalize_shlibpath"; then
 	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
@@ -8949,9 +10443,9 @@ EOF
 	fi
       fi
 
-      if test "$no_install" = yes; then
+      if test yes = "$no_install"; then
 	# We don't need to create a wrapper script.
-	link_command="$compile_var$compile_command$compile_rpath"
+	link_command=$compile_var$compile_command$compile_rpath
 	# Replace the output file specification.
 	link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
 	# Delete the old output file.
@@ -8968,27 +10462,28 @@ EOF
 	exit $EXIT_SUCCESS
       fi
 
-      if test "$hardcode_action" = relink; then
-	# Fast installation is not supported
-	link_command="$compile_var$compile_command$compile_rpath"
-	relink_command="$finalize_var$finalize_command$finalize_rpath"
+      case $hardcode_action,$fast_install in
+        relink,*)
+	  # Fast installation is not supported
+	  link_command=$compile_var$compile_command$compile_rpath
+	  relink_command=$finalize_var$finalize_command$finalize_rpath
 
-	func_warning "this platform does not like uninstalled shared libraries"
-	func_warning "\`$output' will be relinked during installation"
-      else
-	if test "$fast_install" != no; then
-	  link_command="$finalize_var$compile_command$finalize_rpath"
-	  if test "$fast_install" = yes; then
-	    relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
-	  else
-	    # fast_install is set to needless
-	    relink_command=
-	  fi
-	else
-	  link_command="$compile_var$compile_command$compile_rpath"
-	  relink_command="$finalize_var$finalize_command$finalize_rpath"
-	fi
-      fi
+	  func_warning "this platform does not like uninstalled shared libraries"
+	  func_warning "'$output' will be relinked during installation"
+	  ;;
+        *,yes)
+	  link_command=$finalize_var$compile_command$finalize_rpath
+	  relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
+          ;;
+	*,no)
+	  link_command=$compile_var$compile_command$compile_rpath
+	  relink_command=$finalize_var$finalize_command$finalize_rpath
+          ;;
+	*,needless)
+	  link_command=$finalize_var$compile_command$finalize_rpath
+	  relink_command=
+          ;;
+      esac
 
       # Replace the output file specification.
       link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
@@ -9045,8 +10540,8 @@ EOF
 	    func_dirname_and_basename "$output" "" "."
 	    output_name=$func_basename_result
 	    output_path=$func_dirname_result
-	    cwrappersource="$output_path/$objdir/lt-$output_name.c"
-	    cwrapper="$output_path/$output_name.exe"
+	    cwrappersource=$output_path/$objdir/lt-$output_name.c
+	    cwrapper=$output_path/$output_name.exe
 	    $RM $cwrappersource $cwrapper
 	    trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
 
@@ -9067,7 +10562,7 @@ EOF
 	    trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
 	    $opt_dry_run || {
 	      # note: this script will not be executed, so do not chmod.
-	      if test "x$build" = "x$host" ; then
+	      if test "x$build" = "x$host"; then
 		$cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
 	      else
 		func_emit_wrapper no > $func_ltwrapper_scriptname_result
@@ -9090,25 +10585,27 @@ EOF
     # See if we need to build an old-fashioned archive.
     for oldlib in $oldlibs; do
 
-      if test "$build_libtool_libs" = convenience; then
-	oldobjs="$libobjs_save $symfileobj"
-	addlibs="$convenience"
-	build_libtool_libs=no
-      else
-	if test "$build_libtool_libs" = module; then
-	  oldobjs="$libobjs_save"
+      case $build_libtool_libs in
+        convenience)
+	  oldobjs="$libobjs_save $symfileobj"
+	  addlibs=$convenience
 	  build_libtool_libs=no
-	else
+	  ;;
+	module)
+	  oldobjs=$libobjs_save
+	  addlibs=$old_convenience
+	  build_libtool_libs=no
+          ;;
+	*)
 	  oldobjs="$old_deplibs $non_pic_objects"
-	  if test "$preload" = yes && test -f "$symfileobj"; then
-	    func_append oldobjs " $symfileobj"
-	  fi
-	fi
-	addlibs="$old_convenience"
-      fi
+	  $preload && test -f "$symfileobj" \
+	    && func_append oldobjs " $symfileobj"
+	  addlibs=$old_convenience
+	  ;;
+      esac
 
       if test -n "$addlibs"; then
-	gentop="$output_objdir/${outputname}x"
+	gentop=$output_objdir/${outputname}x
 	func_append generated " $gentop"
 
 	func_extract_archives $gentop $addlibs
@@ -9116,13 +10613,13 @@ EOF
       fi
 
       # Do each command in the archive commands.
-      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+      if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then
 	cmds=$old_archive_from_new_cmds
       else
 
 	# Add any objects from preloaded convenience libraries
 	if test -n "$dlprefiles"; then
-	  gentop="$output_objdir/${outputname}x"
+	  gentop=$output_objdir/${outputname}x
 	  func_append generated " $gentop"
 
 	  func_extract_archives $gentop $dlprefiles
@@ -9143,7 +10640,7 @@ EOF
 	  :
 	else
 	  echo "copying selected object files to avoid basename conflicts..."
-	  gentop="$output_objdir/${outputname}x"
+	  gentop=$output_objdir/${outputname}x
 	  func_append generated " $gentop"
 	  func_mkdir_p "$gentop"
 	  save_oldobjs=$oldobjs
@@ -9152,7 +10649,7 @@ EOF
 	  for obj in $save_oldobjs
 	  do
 	    func_basename "$obj"
-	    objbase="$func_basename_result"
+	    objbase=$func_basename_result
 	    case " $oldobjs " in
 	    " ") oldobjs=$obj ;;
 	    *[\ /]"$objbase "*)
@@ -9221,18 +10718,18 @@ EOF
 	    else
 	      # the above command should be used before it gets too long
 	      oldobjs=$objlist
-	      if test "$obj" = "$last_oldobj" ; then
+	      if test "$obj" = "$last_oldobj"; then
 		RANLIB=$save_RANLIB
 	      fi
 	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
-	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+	      eval concat_cmds=\"\$concat_cmds$old_archive_cmds\"
 	      objlist=
 	      len=$len0
 	    fi
 	  done
 	  RANLIB=$save_RANLIB
 	  oldobjs=$objlist
-	  if test "X$oldobjs" = "X" ; then
+	  if test -z "$oldobjs"; then
 	    eval cmds=\"\$concat_cmds\"
 	  else
 	    eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
@@ -9249,7 +10746,7 @@ EOF
     case $output in
     *.la)
       old_library=
-      test "$build_old_libs" = yes && old_library="$libname.$libext"
+      test yes = "$build_old_libs" && old_library=$libname.$libext
       func_verbose "creating $output"
 
       # Preserve any variables that may affect compiler behavior
@@ -9264,31 +10761,31 @@ EOF
 	fi
       done
       # Quote the link command for shipping.
-      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+      relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
       relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
-      if test "$hardcode_automatic" = yes ; then
+      if test yes = "$hardcode_automatic"; then
 	relink_command=
       fi
 
       # Only create the output if not a dry run.
       $opt_dry_run || {
 	for installed in no yes; do
-	  if test "$installed" = yes; then
+	  if test yes = "$installed"; then
 	    if test -z "$install_libdir"; then
 	      break
 	    fi
-	    output="$output_objdir/$outputname"i
+	    output=$output_objdir/${outputname}i
 	    # Replace all uninstalled libtool libraries with the installed ones
 	    newdependency_libs=
 	    for deplib in $dependency_libs; do
 	      case $deplib in
 	      *.la)
 		func_basename "$deplib"
-		name="$func_basename_result"
+		name=$func_basename_result
 		func_resolve_sysroot "$deplib"
-		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
+		eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
 		test -z "$libdir" && \
-		  func_fatal_error "\`$deplib' is not a valid libtool archive"
+		  func_fatal_error "'$deplib' is not a valid libtool archive"
 		func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
 		;;
 	      -L*)
@@ -9304,23 +10801,23 @@ EOF
 	      *) func_append newdependency_libs " $deplib" ;;
 	      esac
 	    done
-	    dependency_libs="$newdependency_libs"
+	    dependency_libs=$newdependency_libs
 	    newdlfiles=
 
 	    for lib in $dlfiles; do
 	      case $lib in
 	      *.la)
 	        func_basename "$lib"
-		name="$func_basename_result"
-		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+		name=$func_basename_result
+		eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
 		test -z "$libdir" && \
-		  func_fatal_error "\`$lib' is not a valid libtool archive"
+		  func_fatal_error "'$lib' is not a valid libtool archive"
 		func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
 		;;
 	      *) func_append newdlfiles " $lib" ;;
 	      esac
 	    done
-	    dlfiles="$newdlfiles"
+	    dlfiles=$newdlfiles
 	    newdlprefiles=
 	    for lib in $dlprefiles; do
 	      case $lib in
@@ -9330,34 +10827,34 @@ EOF
 		# didn't already link the preopened objects directly into
 		# the library:
 		func_basename "$lib"
-		name="$func_basename_result"
-		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+		name=$func_basename_result
+		eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
 		test -z "$libdir" && \
-		  func_fatal_error "\`$lib' is not a valid libtool archive"
+		  func_fatal_error "'$lib' is not a valid libtool archive"
 		func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
 		;;
 	      esac
 	    done
-	    dlprefiles="$newdlprefiles"
+	    dlprefiles=$newdlprefiles
 	  else
 	    newdlfiles=
 	    for lib in $dlfiles; do
 	      case $lib in
-		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		[\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
 		*) abs=`pwd`"/$lib" ;;
 	      esac
 	      func_append newdlfiles " $abs"
 	    done
-	    dlfiles="$newdlfiles"
+	    dlfiles=$newdlfiles
 	    newdlprefiles=
 	    for lib in $dlprefiles; do
 	      case $lib in
-		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		[\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
 		*) abs=`pwd`"/$lib" ;;
 	      esac
 	      func_append newdlprefiles " $abs"
 	    done
-	    dlprefiles="$newdlprefiles"
+	    dlprefiles=$newdlprefiles
 	  fi
 	  $RM $output
 	  # place dlname in correct position for cygwin
@@ -9373,10 +10870,9 @@ EOF
 	  case $host,$output,$installed,$module,$dlname in
 	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
 	      # If a -bindir argument was supplied, place the dll there.
-	      if test "x$bindir" != x ;
-	      then
+	      if test -n "$bindir"; then
 		func_relative_path "$install_libdir" "$bindir"
-		tdlname=$func_relative_path_result$dlname
+		tdlname=$func_relative_path_result/$dlname
 	      else
 		# Otherwise fall back on heuristic.
 		tdlname=../bin/$dlname
@@ -9385,7 +10881,7 @@ EOF
 	  esac
 	  $ECHO > $output "\
 # $outputname - a libtool library file
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
 #
 # Please DO NOT delete this file!
 # It is necessary for linking the library.
@@ -9399,7 +10895,7 @@ library_names='$library_names'
 # The name of the static archive.
 old_library='$old_library'
 
-# Linker flags that can not go in dependency_libs.
+# Linker flags that cannot go in dependency_libs.
 inherited_linker_flags='$new_inherited_linker_flags'
 
 # Libraries that this one depends upon.
@@ -9425,7 +10921,7 @@ dlpreopen='$dlprefiles'
 
 # Directory that this library needs to be installed in:
 libdir='$install_libdir'"
-	  if test "$installed" = no && test "$need_relink" = yes; then
+	  if test no,yes = "$installed,$need_relink"; then
 	    $ECHO >> $output "\
 relink_command=\"$relink_command\""
 	  fi
@@ -9440,27 +10936,29 @@ relink_command=\"$relink_command\""
     exit $EXIT_SUCCESS
 }
 
-{ test "$opt_mode" = link || test "$opt_mode" = relink; } &&
-    func_mode_link ${1+"$@"}
+if test link = "$opt_mode" || test relink = "$opt_mode"; then
+  func_mode_link ${1+"$@"}
+fi
 
 
 # func_mode_uninstall arg...
 func_mode_uninstall ()
 {
-    $opt_debug
-    RM="$nonopt"
+    $debug_cmd
+
+    RM=$nonopt
     files=
-    rmforce=
+    rmforce=false
     exit_status=0
 
     # This variable tells wrapper scripts just to set variables rather
     # than running their programs.
-    libtool_install_magic="$magic"
+    libtool_install_magic=$magic
 
     for arg
     do
       case $arg in
-      -f) func_append RM " $arg"; rmforce=yes ;;
+      -f) func_append RM " $arg"; rmforce=: ;;
       -*) func_append RM " $arg" ;;
       *) func_append files " $arg" ;;
       esac
@@ -9473,18 +10971,18 @@ func_mode_uninstall ()
 
     for file in $files; do
       func_dirname "$file" "" "."
-      dir="$func_dirname_result"
-      if test "X$dir" = X.; then
-	odir="$objdir"
+      dir=$func_dirname_result
+      if test . = "$dir"; then
+	odir=$objdir
       else
-	odir="$dir/$objdir"
+	odir=$dir/$objdir
       fi
       func_basename "$file"
-      name="$func_basename_result"
-      test "$opt_mode" = uninstall && odir="$dir"
+      name=$func_basename_result
+      test uninstall = "$opt_mode" && odir=$dir
 
       # Remember odir for removal later, being careful to avoid duplicates
-      if test "$opt_mode" = clean; then
+      if test clean = "$opt_mode"; then
 	case " $rmdirs " in
 	  *" $odir "*) ;;
 	  *) func_append rmdirs " $odir" ;;
@@ -9499,11 +10997,11 @@ func_mode_uninstall ()
       elif test -d "$file"; then
 	exit_status=1
 	continue
-      elif test "$rmforce" = yes; then
+      elif $rmforce; then
 	continue
       fi
 
-      rmfiles="$file"
+      rmfiles=$file
 
       case $name in
       *.la)
@@ -9517,7 +11015,7 @@ func_mode_uninstall ()
 	  done
 	  test -n "$old_library" && func_append rmfiles " $odir/$old_library"
 
-	  case "$opt_mode" in
+	  case $opt_mode in
 	  clean)
 	    case " $library_names " in
 	    *" $dlname "*) ;;
@@ -9528,12 +11026,12 @@ func_mode_uninstall ()
 	  uninstall)
 	    if test -n "$library_names"; then
 	      # Do each command in the postuninstall commands.
-	      func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+	      func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1'
 	    fi
 
 	    if test -n "$old_library"; then
 	      # Do each command in the old_postuninstall commands.
-	      func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+	      func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1'
 	    fi
 	    # FIXME: should reinstall the best remaining shared library.
 	    ;;
@@ -9549,21 +11047,19 @@ func_mode_uninstall ()
 	  func_source $dir/$name
 
 	  # Add PIC object to the list of files to remove.
-	  if test -n "$pic_object" &&
-	     test "$pic_object" != none; then
+	  if test -n "$pic_object" && test none != "$pic_object"; then
 	    func_append rmfiles " $dir/$pic_object"
 	  fi
 
 	  # Add non-PIC object to the list of files to remove.
-	  if test -n "$non_pic_object" &&
-	     test "$non_pic_object" != none; then
+	  if test -n "$non_pic_object" && test none != "$non_pic_object"; then
 	    func_append rmfiles " $dir/$non_pic_object"
 	  fi
 	fi
 	;;
 
       *)
-	if test "$opt_mode" = clean ; then
+	if test clean = "$opt_mode"; then
 	  noexename=$name
 	  case $file in
 	  *.exe)
@@ -9590,12 +11086,12 @@ func_mode_uninstall ()
 
 	    # note $name still contains .exe if it was in $file originally
 	    # as does the version of $file that was added into $rmfiles
-	    func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
-	    if test "$fast_install" = yes && test -n "$relink_command"; then
+	    func_append rmfiles " $odir/$name $odir/${name}S.$objext"
+	    if test yes = "$fast_install" && test -n "$relink_command"; then
 	      func_append rmfiles " $odir/lt-$name"
 	    fi
-	    if test "X$noexename" != "X$name" ; then
-	      func_append rmfiles " $odir/lt-${noexename}.c"
+	    if test "X$noexename" != "X$name"; then
+	      func_append rmfiles " $odir/lt-$noexename.c"
 	    fi
 	  fi
 	fi
@@ -9604,7 +11100,7 @@ func_mode_uninstall ()
       func_show_eval "$RM $rmfiles" 'exit_status=1'
     done
 
-    # Try to remove the ${objdir}s in the directories where we deleted files
+    # Try to remove the $objdir's in the directories where we deleted files
     for dir in $rmdirs; do
       if test -d "$dir"; then
 	func_show_eval "rmdir $dir >/dev/null 2>&1"
@@ -9614,16 +11110,17 @@ func_mode_uninstall ()
     exit $exit_status
 }
 
-{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
-    func_mode_uninstall ${1+"$@"}
+if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then
+  func_mode_uninstall ${1+"$@"}
+fi
 
 test -z "$opt_mode" && {
-  help="$generic_help"
+  help=$generic_help
   func_fatal_help "you must specify a MODE"
 }
 
 test -z "$exec_cmd" && \
-  func_fatal_help "invalid operation mode \`$opt_mode'"
+  func_fatal_help "invalid operation mode '$opt_mode'"
 
 if test -n "$exec_cmd"; then
   eval exec "$exec_cmd"
@@ -9634,7 +11131,7 @@ exit $exit_status
 
 
 # The TAGs below are defined such that we never get into a situation
-# in which we disable both kinds of libraries.  Given conflicting
+# where we disable both kinds of libraries.  Given conflicting
 # choices, we go for a static library, that is the most portable,
 # since we can't tell whether shared libraries were disabled because
 # the user asked for that or because the platform doesn't support
@@ -9657,5 +11154,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/m4/Makefile.am b/m4/Makefile.am
index 58d9377..a38058a 100644
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -1,5 +1,5 @@
-# $Id: Makefile.am 8582 2011-02-27 11:38:10Z joostvb $
-# $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/m4/Makefile.am $
+# $Id$
+# $URL$
 
 extra_DIST = ax_icu_check.m4 ax_boost_base.m4 ax_boost_filesystem.m4 \
-	ac_python_devel.m4 ax_openmp.m4
+	ax_openmp.m4
diff --git a/m4/Makefile.in b/m4/Makefile.in
index 60eefb8..754c417 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,10 +14,20 @@
 
 @SET_MAKE@
 
-# $Id: Makefile.am 8582 2011-02-27 11:38:10Z joostvb $
-# $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/m4/Makefile.am $
+# $Id$
+# $URL$
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,18 +91,16 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = m4
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ac_python_devel.m4 \
-	$(top_srcdir)/m4/ax_icu_check.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_icu_check.m4 \
 	$(top_srcdir)/m4/ax_lib_readline.m4 \
 	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-	$(top_srcdir)/m4/openmp.m4 $(top_srcdir)/m4/pkg.m4 \
-	$(top_srcdir)/configure.ac
+	$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -117,6 +125,7 @@ am__can_run_installinfo = \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -169,6 +178,7 @@ LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -176,6 +186,7 @@ NM = @NM@
 NMEDIT = @NMEDIT@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@
 OTOOL = @OTOOL@
 OTOOL64 = @OTOOL64@
 PACKAGE = @PACKAGE@
@@ -192,17 +203,6 @@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
-PYTHON = @PYTHON@
-PYTHONDIR = @PYTHONDIR@
-PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
-PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
-PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@
-PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
-PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
-PYTHON_PLATFORM = @PYTHON_PLATFORM@
-PYTHON_PREFIX = @PYTHON_PREFIX@
-PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
-PYTHON_VERSION = @PYTHON_VERSION@
 RANLIB = @RANLIB@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
@@ -240,6 +240,8 @@ dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 folia_CFLAGS = @folia_CFLAGS@
 folia_LIBS = @folia_LIBS@
+frogdata_CFLAGS = @frogdata_CFLAGS@
+frogdata_LIBS = @frogdata_LIBS@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
@@ -260,13 +262,10 @@ mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
 pkgconfigpath = @pkgconfigpath@
-pkgpyexecdir = @pkgpyexecdir@
-pkgpythondir = @pkgpythondir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
-pyexecdir = @pyexecdir@
-pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -276,15 +275,13 @@ ticcutils_CFLAGS = @ticcutils_CFLAGS@
 ticcutils_LIBS = @ticcutils_LIBS@
 timbl_CFLAGS = @timbl_CFLAGS@
 timbl_LIBS = @timbl_LIBS@
-timblserver_CFLAGS = @timblserver_CFLAGS@
-timblserver_LIBS = @timblserver_LIBS@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 ucto_CFLAGS = @ucto_CFLAGS@
 ucto_LIBS = @ucto_LIBS@
 extra_DIST = ax_icu_check.m4 ax_boost_base.m4 ax_boost_filesystem.m4 \
-	ac_python_devel.m4 ax_openmp.m4
+	ax_openmp.m4
 
 all: all-am
 
@@ -301,7 +298,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu m4/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -476,6 +472,8 @@ uninstall-am:
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/m4/ac_python_devel.m4 b/m4/ac_python_devel.m4
deleted file mode 100644
index 5183450..0000000
--- a/m4/ac_python_devel.m4
+++ /dev/null
@@ -1,320 +0,0 @@
-# ===========================================================================
-#            http://autoconf-archive.cryp.to/ac_python_devel.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AC_PYTHON_DEVEL([version])
-#
-# DESCRIPTION
-#
-#   Note: Defines as a precious variable "PYTHON_VERSION". Don't override it
-#   in your configure.ac.
-#
-#   This macro checks for Python and tries to get the include path to
-#   'Python.h'. It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LDFLAGS)
-#   output variables. It also exports $(PYTHON_EXTRA_LIBS) and
-#   $(PYTHON_EXTRA_LDFLAGS) for embedding Python in your code.
-#
-#   You can search for some particular version of Python by passing a
-#   parameter to this macro, for example ">= '2.3.1'", or "== '2.4'". Please
-#   note that you *have* to pass also an operator along with the version to
-#   match, and pay special attention to the single quotes surrounding the
-#   version number. Don't use "PYTHON_VERSION" for this: that environment
-#   variable is declared as precious and thus reserved for the end-user.
-#
-#   This macro should work for all versions of Python >= 2.1.0. As an end
-#   user, you can disable the check for the python version by setting the
-#   PYTHON_NOVERSIONCHECK environment variable to something else than the
-#   empty string.
-#
-#   If you need to use this macro for an older Python version, please
-#   contact the authors. We're always open for feedback.
-#
-# LICENSE
-#
-#   Copyright (c) 2009 Sebastian Huber <sebastian-huber at web.de>
-#   Copyright (c) 2009 Alan W. Irwin <irwin at beluga.phys.uvic.ca>
-#   Copyright (c) 2009 Rafael Laboissiere <rafael at laboissiere.net>
-#   Copyright (c) 2009 Andrew Collier <colliera at ukzn.ac.za>
-#   Copyright (c) 2009 Matteo Settenvini <matteo at member.fsf.org>
-#   Copyright (c) 2009 Horst Knorr <hk_classes at knoda.org>
-#
-#   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/>.
-#
-#   As a special exception, the respective Autoconf Macro's copyright owner
-#   gives unlimited permission to copy, distribute and modify the configure
-#   scripts that are the output of Autoconf when processing the Macro. You
-#   need not follow the terms of the GNU General Public License when using
-#   or distributing such scripts, even though portions of the text of the
-#   Macro appear in them. The GNU General Public License (GPL) does govern
-#   all other use of the material that constitutes the Autoconf Macro.
-#
-#   This special exception to the GPL applies to versions of the Autoconf
-#   Macro released by the Autoconf Archive. When you make and distribute a
-#   modified version of the Autoconf Macro, you may extend this special
-#   exception to the GPL to apply to your modified version as well.
-
-AC_DEFUN([AC_PYTHON_DEVEL],[
-	#
-	# Allow the use of a (user set) custom python version
-	#
-	AC_ARG_VAR([PYTHON_VERSION],[The installed Python
-		version to use, for example '2.3'. This string
-		will be appended to the Python interpreter
-		canonical name.])
-
-	AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]])
-	if test -z "$PYTHON"; then
-	   AC_MSG_ERROR([Cannot find python$PYTHON_VERSION in your system path])
-	   PYTHON_VERSION=""
-	fi
-
-	#
-	# Check for a version of Python >= 2.1.0
-	#
-	AC_MSG_CHECKING([for a version of Python >= '2.1.0'])
-	ac_supports_python_ver=`$PYTHON -c "import sys; \
-		ver = sys.version.split ()[[0]]; \
-		print (ver >= '2.1.0')"`
-	if test "$ac_supports_python_ver" != "True"; then
-		if test -z "$PYTHON_NOVERSIONCHECK"; then
-			AC_MSG_RESULT([no])
-			AC_MSG_FAILURE([
-This version of the AC@&t at _PYTHON_DEVEL macro
-doesn't work properly with versions of Python before
-2.1.0. You may need to re-run configure, setting the
-variables PYTHON_CPPFLAGS, PYTHON_LDFLAGS, PYTHON_SITE_PKG,
-PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand.
-Moreover, to disable this check, set PYTHON_NOVERSIONCHECK
-to something else than an empty string.
-])
-		else
-			AC_MSG_RESULT([skip at user request])
-		fi
-	else
-		AC_MSG_RESULT([yes])
-	fi
-
-	#
-	# if the macro parameter ``version'' is set, honour it
-	#
-	if test -n "$1"; then
-		AC_MSG_CHECKING([for a version of Python $1])
-		ac_supports_python_ver=`$PYTHON -c "import sys; \
-			ver = sys.version.split ()[[0]]; \
-			print (ver $1)"`
-		if test "$ac_supports_python_ver" = "True"; then
-	   	   AC_MSG_RESULT([yes])
-		else
-			AC_MSG_RESULT([no])
-			AC_MSG_ERROR([this package requires Python $1.
-If you have it installed, but it isn't the default Python
-interpreter in your system path, please pass the PYTHON_VERSION
-variable to configure. See ``configure --help'' for reference.
-])
-			PYTHON_VERSION=""
-		fi
-	fi
-
-	#
-	# Check if you have distutils, else fail
-	#
-	AC_MSG_CHECKING([for the distutils Python package])
-	ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
-	if test -z "$ac_distutils_result"; then
-		AC_MSG_RESULT([yes])
-	else
-		AC_MSG_RESULT([no])
-		AC_MSG_ERROR([cannot import Python module "distutils".
-Please check your Python installation. The error was:
-$ac_distutils_result])
-		PYTHON_VERSION=""
-	fi
-
-	#
-	# Check for Python include path
-	#
-	AC_MSG_CHECKING([for Python include path])
-	if test -z "$PYTHON_CPPFLAGS"; then
-		python_path=`$PYTHON -c "import distutils.sysconfig; \
-           		print (distutils.sysconfig.get_python_inc ());"`
-		if test -n "${python_path}"; then
-		   	python_path="-I$python_path"
-		fi
-		PYTHON_CPPFLAGS=$python_path
-	fi
-	AC_MSG_RESULT([$PYTHON_CPPFLAGS])
-	AC_SUBST([PYTHON_CPPFLAGS])
-
-	#
-	# Check for Python library path
-	#
-	AC_MSG_CHECKING([for Python library path])
-	if test -z "$PYTHON_LDFLAGS"; then
-		# (makes two attempts to ensure we've got a version number
-		# from the interpreter)
-		ac_python_version=`cat<<EOD | $PYTHON -
-
-# join all versioning strings, on some systems
-# major/minor numbers could be in different list elements
-from distutils.sysconfig import *
-ret = ''
-for e in get_config_vars ('VERSION'):
-	if (e != None):
-		ret += e
-print (ret)
-EOD`
-
-		if test -z "$ac_python_version"; then
-			if test -n "$PYTHON_VERSION"; then
-				ac_python_version=$PYTHON_VERSION
-			else
-				ac_python_version=`$PYTHON -c "import sys; \
-					print (sys.version[[:3]])"`
-			fi
-		fi
-
-		# Make the versioning information available to the compiler
-		AC_DEFINE_UNQUOTED([HAVE_PYTHON], ["$ac_python_version"],
-                                   [If available, contains the Python version number currently in use.])
-
-		# First, the library directory:
-		ac_python_libdir=`cat<<EOD | $PYTHON -
-
-# There should be only one
-import distutils.sysconfig
-for e in distutils.sysconfig.get_config_vars ('LIBDIR'):
-	if e != None:
-		print (e)
-		break
-EOD`
-
-		# Before checking for libpythonX.Y, we need to know
-		# the extension the OS we're on uses for libraries
-		# (we take the first one, if there's more than one fix me!):
-		ac_python_soext=`$PYTHON -c \
-		  "import distutils.sysconfig; \
-		  print (distutils.sysconfig.get_config_vars('SO')[[0]])"`
-
-		# Now, for the library:
-		ac_python_soname=`$PYTHON -c \
-		  "import distutils.sysconfig; \
-		  print (distutils.sysconfig.get_config_vars('LDLIBRARY')[[0]])"`
-
-		# Strip away extension from the end to canonicalize its name:
-		ac_python_library=`echo "$ac_python_soname" | sed "s/${ac_python_soext}$//"`
-
-		# This small piece shamelessly adapted from PostgreSQL python macro;
-		# credits goes to momjian, I think. I'd like to put the right name
-		# in the credits, if someone can point me in the right direction... ?
-		#
-		if test -n "$ac_python_libdir" -a -n "$ac_python_library" \
-			-a x"$ac_python_library" != x"$ac_python_soname"
-		then
-			# use the official shared library
-			ac_python_library=`echo "$ac_python_library" | sed "s/^lib//"`
-			PYTHON_LDFLAGS="-L$ac_python_libdir -l$ac_python_library"
-		else
-			# old way: use libpython from python_configdir
-			ac_python_libdir=`$PYTHON -c \
-			  "from distutils.sysconfig import get_python_lib as f; \
-			  import os; \
-			  print (os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"`
-			PYTHON_LDFLAGS="-L$ac_python_libdir -lpython$ac_python_version"
-		fi
-
-		if test -z "PYTHON_LDFLAGS"; then
-			AC_MSG_ERROR([
-  Cannot determine location of your Python DSO. Please check it was installed with
-  dynamic libraries enabled, or try setting PYTHON_LDFLAGS by hand.
-			])
-		fi
-	fi
-	AC_MSG_RESULT([$PYTHON_LDFLAGS])
-	AC_SUBST([PYTHON_LDFLAGS])
-
-	#
-	# Check for site packages
-	#
-	AC_MSG_CHECKING([for Python site-packages path])
-	if test -z "$PYTHON_SITE_PKG"; then
-		PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
-		        print (distutils.sysconfig.get_python_lib(0,0));"`
-	fi
-	AC_MSG_RESULT([$PYTHON_SITE_PKG])
-	AC_SUBST([PYTHON_SITE_PKG])
-
-	#
-	# libraries which must be linked in when embedding
-	#
-	AC_MSG_CHECKING(python extra libraries)
-	if test -z "$PYTHON_EXTRA_LIBS"; then
-	   PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
-                conf = distutils.sysconfig.get_config_var; \
-                print (conf('LOCALMODLIBS') + ' ' + conf('LIBS'))"`
-	fi
-	AC_MSG_RESULT([$PYTHON_EXTRA_LIBS])
-	AC_SUBST(PYTHON_EXTRA_LIBS)
-
-	#
-	# linking flags needed when embedding
-	#
-	AC_MSG_CHECKING(python extra linking flags)
-	if test -z "$PYTHON_EXTRA_LDFLAGS"; then
-		PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \
-			conf = distutils.sysconfig.get_config_var; \
-			print (conf('LINKFORSHARED'))"`
-	fi
-	AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS])
-	AC_SUBST(PYTHON_EXTRA_LDFLAGS)
-
-	#
-	# final check to see if everything compiles alright
-	#
-	AC_MSG_CHECKING([consistency of all components of python development environment])
-	# save current global flags
-	LIBS="$ac_save_LIBS $PYTHON_LDFLAGS $PYTHON_EXTRA_LDFLAGS $PYTHON_EXTRA_LIBS"
-	CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS"
-	AC_LANG_PUSH([C])
-	AC_LINK_IFELSE([
-		AC_LANG_PROGRAM([[#include <Python.h>]],
-				[[Py_Initialize();]])
-		],[pythonexists=yes],[pythonexists=no])
-	AC_LANG_POP([C])
-	# turn back to default flags
-	CPPFLAGS="$ac_save_CPPFLAGS"
-	LIBS="$ac_save_LIBS"
-
-	AC_MSG_RESULT([$pythonexists])
-
-        if test ! "x$pythonexists" = "xyes"; then
-	   AC_MSG_FAILURE([
-  Could not link test program to Python. Maybe the main Python library has been
-  installed in some non-standard library path. If so, pass it to configure,
-  via the LDFLAGS environment variable.
-  Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
-  ============================================================================
-   ERROR!
-   You probably have to install the development version of the Python package
-   for your distribution.  The exact name of this package varies among them.
-  ============================================================================
-	   ])
-	  PYTHON_VERSION=""
-	fi
-
-	#
-	# all done!
-	#
-])
diff --git a/m4/ax_lib_readline.m4 b/m4/ax_lib_readline.m4
index 2347ad7..056f25c 100644
--- a/m4/ax_lib_readline.m4
+++ b/m4/ax_lib_readline.m4
@@ -92,7 +92,7 @@ AC_DEFUN([AX_LIB_READLINE], [
     LIBS="$LIBS $ax_cv_lib_readline"
     AC_DEFINE(HAVE_LIBREADLINE, 1,
               [Define if you have a readline compatible library])
-    AC_CHECK_HEADERS([readline.h readline/readline.h])
+    AC_CHECK_HEADERS(readline.h readline/readline.h)
     AC_CACHE_CHECK([whether readline supports history],
                    ax_cv_lib_readline_history, [
       ax_cv_lib_readline_history="no"
@@ -101,7 +101,7 @@ AC_DEFUN([AX_LIB_READLINE], [
     if test "$ax_cv_lib_readline_history" = "yes"; then
       AC_DEFINE(HAVE_READLINE_HISTORY, 1,
                 [Define if your readline library has \`add_history'])
-      AC_CHECK_HEADERS([history.h readline/history.h])
+      AC_CHECK_HEADERS(history.h readline/history.h)
     fi
   fi
 ])dnl
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 8ff3c76..10ab284 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1,8 +1,6 @@
 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 #
-#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
-#                 Inc.
+#   Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 # This file is free software; the Free Software Foundation gives
@@ -10,36 +8,30 @@
 # modifications, as long as this notice is preserved.
 
 m4_define([_LT_COPYING], [dnl
-#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
-#                 Inc.
-#   Written by Gordon Matzigkeit, 1996
-#
-#   This file is part of GNU Libtool.
+# Copyright (C) 2014 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions.  There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of of the License, or
+# (at your option) any later version.
 #
-# 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.
 #
-# 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
+# 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.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ])
 
-# serial 57 LT_INIT
+# serial 58 LT_INIT
 
 
 # LT_PREREQ(VERSION)
@@ -67,7 +59,7 @@ esac
 # LT_INIT([OPTIONS])
 # ------------------
 AC_DEFUN([LT_INIT],
-[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
 AC_BEFORE([$0], [LT_LANG])dnl
 AC_BEFORE([$0], [LT_OUTPUT])dnl
@@ -91,7 +83,7 @@ dnl Parse OPTIONS
 _LT_SET_OPTIONS([$0], [$1])
 
 # This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
+LIBTOOL_DEPS=$ltmain
 
 # Always use our own libtool.
 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
@@ -111,26 +103,43 @@ dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
 
 
+# _LT_PREPARE_CC_BASENAME
+# -----------------------
+m4_defun([_LT_PREPARE_CC_BASENAME], [
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+    for cc_temp in @S|@*""; do
+      case $cc_temp in
+        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+        \-*) ;;
+        *) break;;
+      esac
+    done
+    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+])# _LT_PREPARE_CC_BASENAME
+
+
 # _LT_CC_BASENAME(CC)
 # -------------------
-# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
+# but that macro is also expanded into generated libtool script, which
+# arranges for $SED and $ECHO to be set by different means.
 m4_defun([_LT_CC_BASENAME],
-[for cc_temp in $1""; do
-  case $cc_temp in
-    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
-    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+[m4_require([_LT_PREPARE_CC_BASENAME])dnl
+AC_REQUIRE([_LT_DECL_SED])dnl
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
+func_cc_basename $1
+cc_basename=$func_cc_basename_result
 ])
 
 
 # _LT_FILEUTILS_DEFAULTS
 # ----------------------
 # It is okay to use these file commands and assume they have been set
-# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
+# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
 m4_defun([_LT_FILEUTILS_DEFAULTS],
 [: ${CP="cp -f"}
 : ${MV="mv -f"}
@@ -146,6 +155,8 @@ AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
 
+_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
+dnl
 _LT_DECL([], [host_alias], [0], [The host system])dnl
 _LT_DECL([], [host], [0])dnl
 _LT_DECL([], [host_os], [0])dnl
@@ -175,15 +186,16 @@ m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
 m4_require([_LT_WITH_SYSROOT])dnl
+m4_require([_LT_CMD_TRUNCATE])dnl
 
 _LT_CONFIG_LIBTOOL_INIT([
-# See if we are running on zsh, and set the options which allow our
+# See if we are running on zsh, and set the options that allow our
 # commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
+if test -n "\${ZSH_VERSION+set}"; then
    setopt NO_GLOB_SUBST
 fi
 ])
-if test -n "${ZSH_VERSION+set}" ; then
+if test -n "${ZSH_VERSION+set}"; then
    setopt NO_GLOB_SUBST
 fi
 
@@ -196,7 +208,7 @@ aix3*)
   # AIX sometimes has problems with the GCC collect2 program.  For some
   # reason, if we set the COLLECT_NAMES environment variable, the problems
   # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
+  if test set != "${COLLECT_NAMES+set}"; then
     COLLECT_NAMES=
     export COLLECT_NAMES
   fi
@@ -207,14 +219,14 @@ esac
 ofile=libtool
 can_build_shared=yes
 
-# All known linkers require a `.a' archive for static linking (except MSVC,
+# All known linkers require a '.a' archive for static linking (except MSVC,
 # which needs '.lib').
 libext=a
 
-with_gnu_ld="$lt_cv_prog_gnu_ld"
+with_gnu_ld=$lt_cv_prog_gnu_ld
 
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
+old_CC=$CC
+old_CFLAGS=$CFLAGS
 
 # Set sane defaults for various variables
 test -z "$CC" && CC=cc
@@ -267,14 +279,14 @@ no_glob_subst='s/\*/\\\*/g'
 
 # _LT_PROG_LTMAIN
 # ---------------
-# Note that this code is called both from `configure', and `config.status'
+# Note that this code is called both from 'configure', and 'config.status'
 # now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
-# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# 'config.status' has no value for ac_aux_dir unless we are using Automake,
 # so we pass a copy along to make sure it has a sensible value anyway.
 m4_defun([_LT_PROG_LTMAIN],
 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
-ltmain="$ac_aux_dir/ltmain.sh"
+ltmain=$ac_aux_dir/ltmain.sh
 ])# _LT_PROG_LTMAIN
 
 
@@ -284,7 +296,7 @@ ltmain="$ac_aux_dir/ltmain.sh"
 
 # So that we can recreate a full libtool script including additional
 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
-# in macros and then make a single call at the end using the `libtool'
+# in macros and then make a single call at the end using the 'libtool'
 # label.
 
 
@@ -419,8 +431,8 @@ m4_define([_lt_decl_all_varnames],
 
 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
 # ------------------------------------
-# Quote a variable value, and forward it to `config.status' so that its
-# declaration there will have the same value as in `configure'.  VARNAME
+# Quote a variable value, and forward it to 'config.status' so that its
+# declaration there will have the same value as in 'configure'.  VARNAME
 # must have a single quote delimited value for this to work.
 m4_define([_LT_CONFIG_STATUS_DECLARE],
 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
@@ -444,7 +456,7 @@ m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
 # Output comment and list of tags supported by the script
 m4_defun([_LT_LIBTOOL_TAGS],
 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
-available_tags="_LT_TAGS"dnl
+available_tags='_LT_TAGS'dnl
 ])
 
 
@@ -472,7 +484,7 @@ m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
 # _LT_LIBTOOL_CONFIG_VARS
 # -----------------------
 # Produce commented declarations of non-tagged libtool config variables
-# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
 # script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
 # section) are produced by _LT_LIBTOOL_TAG_VARS.
 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
@@ -498,8 +510,8 @@ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
 # Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
 # variables for single and double quote escaping we saved from calls
 # to _LT_DECL, we can put quote escaped variables declarations
-# into `config.status', and then the shell code to quote escape them in
-# for loops in `config.status'.  Finally, any additional code accumulated
+# into 'config.status', and then the shell code to quote escape them in
+# for loops in 'config.status'.  Finally, any additional code accumulated
 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
 m4_defun([_LT_CONFIG_COMMANDS],
 [AC_PROVIDE_IFELSE([LT_OUTPUT],
@@ -545,7 +557,7 @@ for var in lt_decl_all_varnames([[ \
 ]], lt_decl_quote_varnames); do
     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -558,7 +570,7 @@ for var in lt_decl_all_varnames([[ \
 ]], lt_decl_dquote_varnames); do
     case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -574,7 +586,7 @@ _LT_OUTPUT_LIBTOOL_INIT
 # Generate a child script FILE with all initialization necessary to
 # reuse the environment learned by the parent script, and make the
 # file executable.  If COMMENT is supplied, it is inserted after the
-# `#!' sequence but before initialization text begins.  After this
+# '#!' sequence but before initialization text begins.  After this
 # macro, additional text can be appended to FILE to form the body of
 # the child script.  The macro ends with non-zero status if the
 # file could not be fully written (such as if the disk is full).
@@ -596,7 +608,7 @@ AS_SHELL_SANITIZE
 _AS_PREPARE
 exec AS_MESSAGE_FD>&1
 _ASEOF
-test $lt_write_fail = 0 && chmod +x $1[]dnl
+test 0 = "$lt_write_fail" && chmod +x $1[]dnl
 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
 
 # LT_OUTPUT
@@ -619,7 +631,7 @@ exec AS_MESSAGE_LOG_FD>>config.log
 } >&AS_MESSAGE_LOG_FD
 
 lt_cl_help="\
-\`$as_me' creates a local libtool stub from the current configuration,
+'$as_me' creates a local libtool stub from the current configuration,
 for use in further configure time tests before the real libtool is
 generated.
 
@@ -637,11 +649,11 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
 configured by $[0], generated by m4_PACKAGE_STRING.
 
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2011 Free Software Foundation, Inc.
 This config.lt script is free software; the Free Software Foundation
 gives unlimited permision to copy, distribute and modify it."
 
-while test $[#] != 0
+while test 0 != $[#]
 do
   case $[1] in
     --version | --v* | -V )
@@ -654,10 +666,10 @@ do
       lt_cl_silent=: ;;
 
     -*) AC_MSG_ERROR([unrecognized option: $[1]
-Try \`$[0] --help' for more information.]) ;;
+Try '$[0] --help' for more information.]) ;;
 
     *) AC_MSG_ERROR([unrecognized argument: $[1]
-Try \`$[0] --help' for more information.]) ;;
+Try '$[0] --help' for more information.]) ;;
   esac
   shift
 done
@@ -683,7 +695,7 @@ chmod +x "$CONFIG_LT"
 # open by configure.  Here we exec the FD to /dev/null, effectively closing
 # config.log, so it can be properly (re)opened and appended to by config.lt.
 lt_cl_success=:
-test "$silent" = yes &&
+test yes = "$silent" &&
   lt_config_lt_args="$lt_config_lt_args --quiet"
 exec AS_MESSAGE_LOG_FD>/dev/null
 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
@@ -703,27 +715,31 @@ m4_defun([_LT_CONFIG],
 _LT_CONFIG_SAVE_COMMANDS([
   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
   m4_if(_LT_TAG, [C], [
-    # See if we are running on zsh, and set the options which allow our
+    # See if we are running on zsh, and set the options that allow our
     # commands through without removal of \ escapes.
-    if test -n "${ZSH_VERSION+set}" ; then
+    if test -n "${ZSH_VERSION+set}"; then
       setopt NO_GLOB_SUBST
     fi
 
-    cfgfile="${ofile}T"
+    cfgfile=${ofile}T
     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
     $RM "$cfgfile"
 
     cat <<_LT_EOF >> "$cfgfile"
 #! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Generated automatically by $as_me ($PACKAGE) $VERSION
 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
+
+# Provide generalized library-building support services.
+# Written by Gordon Matzigkeit, 1996
+
 _LT_COPYING
 _LT_LIBTOOL_TAGS
 
+# Configured defaults for sys_lib_dlsearch_path munging.
+: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
+
 # ### BEGIN LIBTOOL CONFIG
 _LT_LIBTOOL_CONFIG_VARS
 _LT_LIBTOOL_TAG_VARS
@@ -731,13 +747,24 @@ _LT_LIBTOOL_TAG_VARS
 
 _LT_EOF
 
+    cat <<'_LT_EOF' >> "$cfgfile"
+
+# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
+
+_LT_PREPARE_MUNGE_PATH_LIST
+_LT_PREPARE_CC_BASENAME
+
+# ### END FUNCTIONS SHARED WITH CONFIGURE
+
+_LT_EOF
+
   case $host_os in
   aix3*)
     cat <<\_LT_EOF >> "$cfgfile"
 # AIX sometimes has problems with the GCC collect2 program.  For some
 # reason, if we set the COLLECT_NAMES environment variable, the problems
 # vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
+if test set != "${COLLECT_NAMES+set}"; then
   COLLECT_NAMES=
   export COLLECT_NAMES
 fi
@@ -754,8 +781,6 @@ _LT_EOF
   sed '$q' "$ltmain" >> "$cfgfile" \
      || (rm -f "$cfgfile"; exit 1)
 
-  _LT_PROG_REPLACE_SHELLFNS
-
    mv -f "$cfgfile" "$ofile" ||
     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
   chmod +x "$ofile"
@@ -773,7 +798,6 @@ _LT_EOF
 [m4_if([$1], [], [
     PACKAGE='$PACKAGE'
     VERSION='$VERSION'
-    TIMESTAMP='$TIMESTAMP'
     RM='$RM'
     ofile='$ofile'], [])
 ])dnl /_LT_CONFIG_SAVE_COMMANDS
@@ -801,6 +825,7 @@ AC_DEFUN([LT_LANG],
 m4_case([$1],
   [C],			[_LT_LANG(C)],
   [C++],		[_LT_LANG(CXX)],
+  [Go],			[_LT_LANG(GO)],
   [Java],		[_LT_LANG(GCJ)],
   [Fortran 77],		[_LT_LANG(F77)],
   [Fortran],		[_LT_LANG(FC)],
@@ -822,6 +847,31 @@ m4_defun([_LT_LANG],
 ])# _LT_LANG
 
 
+m4_ifndef([AC_PROG_GO], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into   #
+#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
+#  a released version of Autoconf we should remove this    #
+#  macro and use it instead.                               #
+############################################################
+m4_defun([AC_PROG_GO],
+[AC_LANG_PUSH(Go)dnl
+AC_ARG_VAR([GOC],     [Go compiler command])dnl
+AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
+_AC_ARG_VAR_LDFLAGS()dnl
+AC_CHECK_TOOL(GOC, gccgo)
+if test -z "$GOC"; then
+  if test -n "$ac_tool_prefix"; then
+    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
+  fi
+fi
+if test -z "$GOC"; then
+  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
+fi
+])#m4_defun
+])#m4_ifndef
+
+
 # _LT_LANG_DEFAULT_CONFIG
 # -----------------------
 m4_defun([_LT_LANG_DEFAULT_CONFIG],
@@ -852,6 +902,10 @@ AC_PROVIDE_IFELSE([AC_PROG_GCJ],
        m4_ifdef([LT_PROG_GCJ],
 	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
 
+AC_PROVIDE_IFELSE([AC_PROG_GO],
+  [LT_LANG(GO)],
+  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
+
 AC_PROVIDE_IFELSE([LT_PROG_RC],
   [LT_LANG(RC)],
   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
@@ -942,7 +996,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 
     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
       [lt_cv_apple_cc_single_mod=no
-      if test -z "${LT_MULTI_MODULE}"; then
+      if test -z "$LT_MULTI_MODULE"; then
 	# By default we will add the -single_module flag. You can override
 	# by either setting the environment variable LT_MULTI_MODULE
 	# non-empty at configure time, or by adding -multi_module to the
@@ -954,7 +1008,13 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
 	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
         _lt_result=$?
-	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+	# If there is a non-empty error log, and "single_module"
+	# appears in it, assume the flag caused a linker warning
+        if test -s conftest.err && $GREP single_module conftest.err; then
+	  cat conftest.err >&AS_MESSAGE_LOG_FD
+	# Otherwise, if the output was created with a 0 exit code from
+	# the compiler, it worked.
+	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
 	  lt_cv_apple_cc_single_mod=yes
 	else
 	  cat conftest.err >&AS_MESSAGE_LOG_FD
@@ -962,6 +1022,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 	rm -rf libconftest.dylib*
 	rm -f conftest.*
       fi])
+
     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
       [lt_cv_ld_exported_symbols_list],
       [lt_cv_ld_exported_symbols_list=no
@@ -971,8 +1032,9 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
 	[lt_cv_ld_exported_symbols_list=yes],
 	[lt_cv_ld_exported_symbols_list=no])
-	LDFLAGS="$save_LDFLAGS"
+	LDFLAGS=$save_LDFLAGS
     ])
+
     AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
       [lt_cv_ld_force_load=no
       cat > conftest.c << _LT_EOF
@@ -990,7 +1052,9 @@ _LT_EOF
       echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
       $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
       _lt_result=$?
-      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
+      if test -s conftest.err && $GREP force_load conftest.err; then
+	cat conftest.err >&AS_MESSAGE_LOG_FD
+      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
 	lt_cv_ld_force_load=yes
       else
 	cat conftest.err >&AS_MESSAGE_LOG_FD
@@ -1000,32 +1064,32 @@ _LT_EOF
     ])
     case $host_os in
     rhapsody* | darwin1.[[012]])
-      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
     darwin1.*)
-      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
     darwin*) # darwin 5.x on
       # if running on 10.5 or later, the deployment target defaults
       # to the OS version, if on x86, and 10.4, the deployment
       # target defaults to 10.4. Don't you love it?
       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
 	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-	10.[[012]]*)
-	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+	10.[[012]][[,.]]*)
+	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
 	10.*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
       esac
     ;;
   esac
-    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+    if test yes = "$lt_cv_apple_cc_single_mod"; then
       _lt_dar_single_mod='$single_module'
     fi
-    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
-      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+    if test yes = "$lt_cv_ld_exported_symbols_list"; then
+      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
     else
-      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
     fi
-    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
+    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
       _lt_dsymutil='~$DSYMUTIL $lib || :'
     else
       _lt_dsymutil=
@@ -1035,8 +1099,8 @@ _LT_EOF
 ])
 
 
-# _LT_DARWIN_LINKER_FEATURES
-# --------------------------
+# _LT_DARWIN_LINKER_FEATURES([TAG])
+# ---------------------------------
 # Checks for linker and compiler features on darwin
 m4_defun([_LT_DARWIN_LINKER_FEATURES],
 [
@@ -1045,27 +1109,29 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
   _LT_TAGVAR(hardcode_direct, $1)=no
   _LT_TAGVAR(hardcode_automatic, $1)=yes
   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-  if test "$lt_cv_ld_force_load" = "yes"; then
-    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+  if test yes = "$lt_cv_ld_force_load"; then
+    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
+                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
   else
     _LT_TAGVAR(whole_archive_flag_spec, $1)=''
   fi
   _LT_TAGVAR(link_all_deplibs, $1)=yes
-  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
   case $cc_basename in
-     ifort*) _lt_dar_can_shared=yes ;;
+     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
      *) _lt_dar_can_shared=$GCC ;;
   esac
-  if test "$_lt_dar_can_shared" = "yes"; then
+  if test yes = "$_lt_dar_can_shared"; then
     output_verbose_link_cmd=func_echo_all
-    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
-    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
-    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
     m4_if([$1], [CXX],
-[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
-      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
-      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+[   if test yes != "$lt_cv_apple_cc_single_mod"; then
+      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
+      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
     fi
 ],[])
   else
@@ -1085,7 +1151,7 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
 # Allow to override them for all tags through lt_cv_aix_libpath.
 m4_defun([_LT_SYS_MODULE_PATH_AIX],
 [m4_require([_LT_DECL_SED])dnl
-if test "${lt_cv_aix_libpath+set}" = set; then
+if test set = "${lt_cv_aix_libpath+set}"; then
   aix_libpath=$lt_cv_aix_libpath
 else
   AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
@@ -1103,7 +1169,7 @@ else
     _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
   fi],[])
   if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
-    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
+    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
   fi
   ])
   aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
@@ -1123,8 +1189,8 @@ m4_define([_LT_SHELL_INIT],
 # -----------------------
 # Find how we can fake an echo command that does not interpret backslash.
 # In particular, with Autoconf 2.60 or later we add some code to the start
-# of the generated configure script which will find a shell with a builtin
-# printf (which we can use as an echo command).
+# of the generated configure script that will find a shell with a builtin
+# printf (that we can use as an echo command).
 m4_defun([_LT_PROG_ECHO_BACKSLASH],
 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
@@ -1152,10 +1218,10 @@ fi
 # Invoke $ECHO with all args, space-separated.
 func_echo_all ()
 {
-    $ECHO "$*" 
+    $ECHO "$*"
 }
 
-case "$ECHO" in
+case $ECHO in
   printf*) AC_MSG_RESULT([printf]) ;;
   print*) AC_MSG_RESULT([print -r]) ;;
   *) AC_MSG_RESULT([cat]) ;;
@@ -1181,16 +1247,17 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
 AC_DEFUN([_LT_WITH_SYSROOT],
 [AC_MSG_CHECKING([for sysroot])
 AC_ARG_WITH([sysroot],
-[  --with-sysroot[=DIR] Search for dependent libraries within DIR
-                        (or the compiler's sysroot if not specified).],
+[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
+  [Search for dependent libraries within DIR (or the compiler's sysroot
+   if not specified).])],
 [], [with_sysroot=no])
 
 dnl lt_sysroot will always be passed unquoted.  We quote it here
 dnl in case the user passed a directory name.
 lt_sysroot=
-case ${with_sysroot} in #(
+case $with_sysroot in #(
  yes)
-   if test "$GCC" = yes; then
+   if test yes = "$GCC"; then
      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
    fi
    ;; #(
@@ -1200,14 +1267,14 @@ case ${with_sysroot} in #(
  no|'')
    ;; #(
  *)
-   AC_MSG_RESULT([${with_sysroot}])
+   AC_MSG_RESULT([$with_sysroot])
    AC_MSG_ERROR([The sysroot must be an absolute path.])
    ;;
 esac
 
  AC_MSG_RESULT([${lt_sysroot:-no}])
 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
-[dependent libraries, and in which our libraries should be installed.])])
+[dependent libraries, and where our libraries should be installed.])])
 
 # _LT_ENABLE_LOCK
 # ---------------
@@ -1215,31 +1282,33 @@ m4_defun([_LT_ENABLE_LOCK],
 [AC_ARG_ENABLE([libtool-lock],
   [AS_HELP_STRING([--disable-libtool-lock],
     [avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+test no = "$enable_libtool_lock" || enable_libtool_lock=yes
 
 # Some flags need to be propagated to the compiler or linker for good
 # libtool support.
 case $host in
 ia64-*-hpux*)
-  # Find out which ABI we are using.
+  # Find out what ABI is being produced by ac_compile, and set mode
+  # options accordingly.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     case `/usr/bin/file conftest.$ac_objext` in
       *ELF-32*)
-	HPUX_IA64_MODE="32"
+	HPUX_IA64_MODE=32
 	;;
       *ELF-64*)
-	HPUX_IA64_MODE="64"
+	HPUX_IA64_MODE=64
 	;;
     esac
   fi
   rm -rf conftest*
   ;;
 *-*-irix6*)
-  # Find out which ABI we are using.
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.
   echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
-    if test "$lt_cv_prog_gnu_ld" = yes; then
+    if test yes = "$lt_cv_prog_gnu_ld"; then
       case `/usr/bin/file conftest.$ac_objext` in
 	*32-bit*)
 	  LD="${LD-ld} -melf32bsmip"
@@ -1268,9 +1337,46 @@ ia64-*-hpux*)
   rm -rf conftest*
   ;;
 
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+mips64*-*linux*)
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.
+  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    emul=elf
+    case `/usr/bin/file conftest.$ac_objext` in
+      *32-bit*)
+	emul="${emul}32"
+	;;
+      *64-bit*)
+	emul="${emul}64"
+	;;
+    esac
+    case `/usr/bin/file conftest.$ac_objext` in
+      *MSB*)
+	emul="${emul}btsmip"
+	;;
+      *LSB*)
+	emul="${emul}ltsmip"
+	;;
+    esac
+    case `/usr/bin/file conftest.$ac_objext` in
+      *N32*)
+	emul="${emul}n32"
+	;;
+    esac
+    LD="${LD-ld} -m $emul"
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
-  # Find out which ABI we are using.
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.  Note that the listed cases only cover the
+  # situations where additional linker options are needed (such as when
+  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
+  # vice versa); the common cases where no linker options are needed do
+  # not appear in the list.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     case `/usr/bin/file conftest.o` in
@@ -1280,9 +1386,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 	    LD="${LD-ld} -m elf_i386_fbsd"
 	    ;;
 	  x86_64-*linux*)
-	    LD="${LD-ld} -m elf_i386"
+	    case `/usr/bin/file conftest.o` in
+	      *x86-64*)
+		LD="${LD-ld} -m elf32_x86_64"
+		;;
+	      *)
+		LD="${LD-ld} -m elf_i386"
+		;;
+	    esac
+	    ;;
+	  powerpc64le-*linux*)
+	    LD="${LD-ld} -m elf32lppclinux"
 	    ;;
-	  ppc64-*linux*|powerpc64-*linux*)
+	  powerpc64-*linux*)
 	    LD="${LD-ld} -m elf32ppclinux"
 	    ;;
 	  s390x-*linux*)
@@ -1301,7 +1417,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 	  x86_64-*linux*)
 	    LD="${LD-ld} -m elf_x86_64"
 	    ;;
-	  ppc*-*linux*|powerpc*-*linux*)
+	  powerpcle-*linux*)
+	    LD="${LD-ld} -m elf64lppc"
+	    ;;
+	  powerpc-*linux*)
 	    LD="${LD-ld} -m elf64ppc"
 	    ;;
 	  s390*-*linux*|s390*-*tpf*)
@@ -1319,25 +1438,39 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 
 *-*-sco3.2v5*)
   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  SAVE_CFLAGS="$CFLAGS"
+  SAVE_CFLAGS=$CFLAGS
   CFLAGS="$CFLAGS -belf"
   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
     [AC_LANG_PUSH(C)
      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
      AC_LANG_POP])
-  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+  if test yes != "$lt_cv_cc_needs_belf"; then
     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS="$SAVE_CFLAGS"
+    CFLAGS=$SAVE_CFLAGS
   fi
   ;;
-sparc*-*solaris*)
-  # Find out which ABI we are using.
+*-*solaris*)
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     case `/usr/bin/file conftest.o` in
     *64-bit*)
       case $lt_cv_prog_gnu_ld in
-      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      yes*)
+        case $host in
+        i?86-*-solaris*|x86_64-*-solaris*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        sparc*-*-solaris*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+        esac
+        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
+        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+          LD=${LD-ld}_sol2
+        fi
+        ;;
       *)
 	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
 	  LD="${LD-ld} -64"
@@ -1351,7 +1484,7 @@ sparc*-*solaris*)
   ;;
 esac
 
-need_locks="$enable_libtool_lock"
+need_locks=$enable_libtool_lock
 ])# _LT_ENABLE_LOCK
 
 
@@ -1370,11 +1503,11 @@ AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
      [echo conftest.$ac_objext > conftest.lst
       lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
       AC_TRY_EVAL([lt_ar_try])
-      if test "$ac_status" -eq 0; then
+      if test 0 -eq "$ac_status"; then
 	# Ensure the archiver fails upon bogus file names.
 	rm -f conftest.$ac_objext libconftest.a
 	AC_TRY_EVAL([lt_ar_try])
-	if test "$ac_status" -ne 0; then
+	if test 0 -ne "$ac_status"; then
           lt_cv_ar_at_file=@
         fi
       fi
@@ -1382,7 +1515,7 @@ AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
      ])
   ])
 
-if test "x$lt_cv_ar_at_file" = xno; then
+if test no = "$lt_cv_ar_at_file"; then
   archiver_list_spec=
 else
   archiver_list_spec=$lt_cv_ar_at_file
@@ -1413,14 +1546,14 @@ old_postuninstall_cmds=
 
 if test -n "$RANLIB"; then
   case $host_os in
-  openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+  bitrig* | openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
     ;;
   *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
     ;;
   esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
 fi
 
 case $host_os in
@@ -1449,7 +1582,7 @@ AC_CACHE_CHECK([$1], [$2],
   [$2=no
    m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$3"
+   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
    # Insert the option either (1) after the last *FLAGS variable, or
    # (2) before a word containing "conftest.", or (3) at the end.
    # Note that $ac_compile itself does not contain backslashes and begins
@@ -1476,7 +1609,7 @@ AC_CACHE_CHECK([$1], [$2],
    $RM conftest*
 ])
 
-if test x"[$]$2" = xyes; then
+if test yes = "[$]$2"; then
     m4_if([$5], , :, [$5])
 else
     m4_if([$6], , :, [$6])
@@ -1498,7 +1631,7 @@ AC_DEFUN([_LT_LINKER_OPTION],
 m4_require([_LT_DECL_SED])dnl
 AC_CACHE_CHECK([$1], [$2],
   [$2=no
-   save_LDFLAGS="$LDFLAGS"
+   save_LDFLAGS=$LDFLAGS
    LDFLAGS="$LDFLAGS $3"
    echo "$lt_simple_link_test_code" > conftest.$ac_ext
    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -1517,10 +1650,10 @@ AC_CACHE_CHECK([$1], [$2],
      fi
    fi
    $RM -r conftest*
-   LDFLAGS="$save_LDFLAGS"
+   LDFLAGS=$save_LDFLAGS
 ])
 
-if test x"[$]$2" = xyes; then
+if test yes = "[$]$2"; then
     m4_if([$4], , :, [$4])
 else
     m4_if([$5], , :, [$5])
@@ -1541,7 +1674,7 @@ AC_DEFUN([LT_CMD_MAX_LEN],
 AC_MSG_CHECKING([the maximum length of command line arguments])
 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
   i=0
-  teststring="ABCD"
+  teststring=ABCD
 
   case $build_os in
   msdosdjgpp*)
@@ -1581,7 +1714,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
-  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
     # This has been around since 386BSD, at least.  Likely further.
     if test -x /sbin/sysctl; then
       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -1600,6 +1733,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     lt_cv_sys_max_cmd_len=196608
     ;;
 
+  os2*)
+    # The test takes a long time on OS/2.
+    lt_cv_sys_max_cmd_len=8192
+    ;;
+
   osf*)
     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
@@ -1626,22 +1764,23 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     ;;
   *)
     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
-    if test -n "$lt_cv_sys_max_cmd_len"; then
+    if test -n "$lt_cv_sys_max_cmd_len" && \
+       test undefined != "$lt_cv_sys_max_cmd_len"; then
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
     else
       # Make teststring a little bigger before we do anything with it.
       # a 1K string should be a reasonable start.
-      for i in 1 2 3 4 5 6 7 8 ; do
+      for i in 1 2 3 4 5 6 7 8; do
         teststring=$teststring$teststring
       done
       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
       # If test is not a shell built-in, we'll probably end up computing a
       # maximum length that is only half of the actual maximum length, but
       # we can't tell.
-      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
+      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
 	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
-	      test $i != 17 # 1/2 MB should be enough
+	      test 17 != "$i" # 1/2 MB should be enough
       do
         i=`expr $i + 1`
         teststring=$teststring$teststring
@@ -1657,7 +1796,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     ;;
   esac
 ])
-if test -n $lt_cv_sys_max_cmd_len ; then
+if test -n "$lt_cv_sys_max_cmd_len"; then
   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
 else
   AC_MSG_RESULT(none)
@@ -1685,7 +1824,7 @@ m4_defun([_LT_HEADER_DLFCN],
 # ----------------------------------------------------------------
 m4_defun([_LT_TRY_DLOPEN_SELF],
 [m4_require([_LT_HEADER_DLFCN])dnl
-if test "$cross_compiling" = yes; then :
+if test yes = "$cross_compiling"; then :
   [$4]
 else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
@@ -1732,9 +1871,9 @@ else
 #  endif
 #endif
 
-/* When -fvisbility=hidden is used, assume the code has been annotated
+/* When -fvisibility=hidden is used, assume the code has been annotated
    correspondingly for the symbols needed.  */
-#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
 int fnord () __attribute__((visibility("default")));
 #endif
 
@@ -1760,7 +1899,7 @@ int main ()
   return status;
 }]
 _LT_EOF
-  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
     lt_status=$?
     case x$lt_status in
@@ -1781,7 +1920,7 @@ rm -fr conftest*
 # ------------------
 AC_DEFUN([LT_SYS_DLOPEN_SELF],
 [m4_require([_LT_HEADER_DLFCN])dnl
-if test "x$enable_dlopen" != xyes; then
+if test yes != "$enable_dlopen"; then
   enable_dlopen=unknown
   enable_dlopen_self=unknown
   enable_dlopen_self_static=unknown
@@ -1791,44 +1930,52 @@ else
 
   case $host_os in
   beos*)
-    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen=load_add_on
     lt_cv_dlopen_libs=
     lt_cv_dlopen_self=yes
     ;;
 
   mingw* | pw32* | cegcc*)
-    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen=LoadLibrary
     lt_cv_dlopen_libs=
     ;;
 
   cygwin*)
-    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen=dlopen
     lt_cv_dlopen_libs=
     ;;
 
   darwin*)
-  # if libdl is installed we need to link against it
+    # if libdl is installed we need to link against it
     AC_CHECK_LIB([dl], [dlopen],
-		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
-    lt_cv_dlopen="dyld"
+		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
+    lt_cv_dlopen=dyld
     lt_cv_dlopen_libs=
     lt_cv_dlopen_self=yes
     ])
     ;;
 
+  tpf*)
+    # Don't try to run any link tests for TPF.  We know it's impossible
+    # because TPF is a cross-compiler, and we know how we open DSOs.
+    lt_cv_dlopen=dlopen
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=no
+    ;;
+
   *)
     AC_CHECK_FUNC([shl_load],
-	  [lt_cv_dlopen="shl_load"],
+	  [lt_cv_dlopen=shl_load],
       [AC_CHECK_LIB([dld], [shl_load],
-	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
+	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
 	[AC_CHECK_FUNC([dlopen],
-	      [lt_cv_dlopen="dlopen"],
+	      [lt_cv_dlopen=dlopen],
 	  [AC_CHECK_LIB([dl], [dlopen],
-		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
 	    [AC_CHECK_LIB([svld], [dlopen],
-		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
 	      [AC_CHECK_LIB([dld], [dld_link],
-		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
+		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
 	      ])
 	    ])
 	  ])
@@ -1837,21 +1984,21 @@ else
     ;;
   esac
 
-  if test "x$lt_cv_dlopen" != xno; then
-    enable_dlopen=yes
-  else
+  if test no = "$lt_cv_dlopen"; then
     enable_dlopen=no
+  else
+    enable_dlopen=yes
   fi
 
   case $lt_cv_dlopen in
   dlopen)
-    save_CPPFLAGS="$CPPFLAGS"
-    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+    save_CPPFLAGS=$CPPFLAGS
+    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
-    save_LDFLAGS="$LDFLAGS"
+    save_LDFLAGS=$LDFLAGS
     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
-    save_LIBS="$LIBS"
+    save_LIBS=$LIBS
     LIBS="$lt_cv_dlopen_libs $LIBS"
 
     AC_CACHE_CHECK([whether a program can dlopen itself],
@@ -1861,7 +2008,7 @@ else
 	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
     ])
 
-    if test "x$lt_cv_dlopen_self" = xyes; then
+    if test yes = "$lt_cv_dlopen_self"; then
       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
 	  lt_cv_dlopen_self_static, [dnl
@@ -1871,9 +2018,9 @@ else
       ])
     fi
 
-    CPPFLAGS="$save_CPPFLAGS"
-    LDFLAGS="$save_LDFLAGS"
-    LIBS="$save_LIBS"
+    CPPFLAGS=$save_CPPFLAGS
+    LDFLAGS=$save_LDFLAGS
+    LIBS=$save_LIBS
     ;;
   esac
 
@@ -1965,8 +2112,8 @@ m4_defun([_LT_COMPILER_FILE_LOCKS],
 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 _LT_COMPILER_C_O([$1])
 
-hard_links="nottested"
-if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+hard_links=nottested
+if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
   # do not overwrite the value of need_locks provided by the user
   AC_MSG_CHECKING([if we can lock with hard links])
   hard_links=yes
@@ -1976,8 +2123,8 @@ if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" !=
   ln conftest.a conftest.b 2>&5 || hard_links=no
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
   AC_MSG_RESULT([$hard_links])
-  if test "$hard_links" = no; then
-    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+  if test no = "$hard_links"; then
+    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
     need_locks=warn
   fi
 else
@@ -2004,8 +2151,8 @@ objdir=$lt_cv_objdir
 _LT_DECL([], [objdir], [0],
          [The name of the directory that contains temporary libtool files])dnl
 m4_pattern_allow([LT_OBJDIR])dnl
-AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
-  [Define to the sub-directory in which libtool stores uninstalled libraries.])
+AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
+  [Define to the sub-directory where libtool stores uninstalled libraries.])
 ])# _LT_CHECK_OBJDIR
 
 
@@ -2017,15 +2164,15 @@ m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
 _LT_TAGVAR(hardcode_action, $1)=
 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
    test -n "$_LT_TAGVAR(runpath_var, $1)" ||
-   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
 
   # We can hardcode non-existent directories.
-  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
+  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
      # If the only mechanism to avoid hardcoding is shlibpath_var, we
      # have to relink, otherwise we might link with an installed library
      # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
-     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
+     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
+     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
     # Linking always hardcodes the temporary library directory.
     _LT_TAGVAR(hardcode_action, $1)=relink
   else
@@ -2039,12 +2186,12 @@ else
 fi
 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
 
-if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
-   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
+if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
+   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
   # Fast installation is not supported
   enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
+elif test yes = "$shlibpath_overrides_runpath" ||
+     test no = "$enable_shared"; then
   # Fast installation is not necessary
   enable_fast_install=needless
 fi
@@ -2068,7 +2215,7 @@ else
 # FIXME - insert some real tests, host_os isn't really good enough
   case $host_os in
   darwin*)
-    if test -n "$STRIP" ; then
+    if test -n "$STRIP"; then
       striplib="$STRIP -x"
       old_striplib="$STRIP -S"
       AC_MSG_RESULT([yes])
@@ -2086,6 +2233,47 @@ _LT_DECL([], [striplib], [1])
 ])# _LT_CMD_STRIPLIB
 
 
+# _LT_PREPARE_MUNGE_PATH_LIST
+# ---------------------------
+# Make sure func_munge_path_list() is defined correctly.
+m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
+[[# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+#       string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+#       string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+#       "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+#       VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+    case x at S|@2 in
+    x)
+        ;;
+    *:)
+        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
+        ;;
+    x:*)
+        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
+        ;;
+    *::*)
+        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
+        ;;
+    *)
+        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
+        ;;
+    esac
+}
+]])# _LT_PREPARE_PATH_LIST
+
+
 # _LT_SYS_DYNAMIC_LINKER([TAG])
 # -----------------------------
 # PORTME Fill in your ld.so characteristics
@@ -2096,17 +2284,18 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_DECL_OBJDUMP])dnl
 m4_require([_LT_DECL_SED])dnl
 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
 AC_MSG_CHECKING([dynamic linker characteristics])
 m4_if([$1],
 	[], [
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   case $host_os in
-    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
-    *) lt_awk_arg="/^libraries:/" ;;
+    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
+    *) lt_awk_arg='/^libraries:/' ;;
   esac
   case $host_os in
-    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
-    *) lt_sed_strip_eq="s,=/,/,g" ;;
+    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
+    *) lt_sed_strip_eq='s|=/|/|g' ;;
   esac
   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
   case $lt_search_path_spec in
@@ -2122,28 +2311,35 @@ if test "$GCC" = yes; then
     ;;
   esac
   # Ok, now we have the path, separated by spaces, we can step through it
-  # and add multilib dir if necessary.
+  # and add multilib dir if necessary...
   lt_tmp_lt_search_path_spec=
-  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  # ...but if some path component already ends with the multilib dir we assume
+  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
+  case "$lt_multi_os_dir; $lt_search_path_spec " in
+  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
+    lt_multi_os_dir=
+    ;;
+  esac
   for lt_sys_path in $lt_search_path_spec; do
-    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
-      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
-    else
+    if test -d "$lt_sys_path$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
+    elif test -n "$lt_multi_os_dir"; then
       test -d "$lt_sys_path" && \
 	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
     fi
   done
   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
-BEGIN {RS=" "; FS="/|\n";} {
-  lt_foo="";
-  lt_count=0;
+BEGIN {RS = " "; FS = "/|\n";} {
+  lt_foo = "";
+  lt_count = 0;
   for (lt_i = NF; lt_i > 0; lt_i--) {
     if ($lt_i != "" && $lt_i != ".") {
       if ($lt_i == "..") {
         lt_count++;
       } else {
         if (lt_count == 0) {
-          lt_foo="/" $lt_i lt_foo;
+          lt_foo = "/" $lt_i lt_foo;
         } else {
           lt_count--;
         }
@@ -2157,7 +2353,7 @@ BEGIN {RS=" "; FS="/|\n";} {
   # for these hosts.
   case $host_os in
     mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
-      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
+      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
   esac
   sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
 else
@@ -2166,7 +2362,7 @@ fi])
 library_names_spec=
 libname_spec='lib$name'
 soname_spec=
-shrext_cmds=".so"
+shrext_cmds=.so
 postinstall_cmds=
 postuninstall_cmds=
 finish_cmds=
@@ -2183,56 +2379,109 @@ hardcode_into_libs=no
 # flags to be left without arguments
 need_version=unknown
 
+AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
+[User-defined run-time library search path.])
+
 case $host_os in
 aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
   # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
+  soname_spec='$libname$release$shared_ext$major'
   ;;
 
 aix[[4-9]]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
+  if test ia64 = "$host_cpu"; then
     # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
     shlibpath_var=LD_LIBRARY_PATH
   else
     # With GCC up to 2.95.x, collect2 would create an import file
     # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
+    # the line '#! .'.  This would cause the generated library to
+    # depend on '.', always an invalid library.  This was fixed in
     # development snapshots of GCC prior to 3.0.
     case $host_os in
       aix4 | aix4.[[01]] | aix4.[[01]].*)
       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 	   echo ' yes '
-	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
 	:
       else
 	can_build_shared=no
       fi
       ;;
     esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # Using Import Files as archive members, it is possible to support
+    # filename-based versioning of shared library archives on AIX. While
+    # this would work for both with and without runtime linking, it will
+    # prevent static linking of such archives. So we do filename-based
+    # shared library versioning with .so extension only, which is used
+    # when both runtime linking and shared linking is enabled.
+    # Unfortunately, runtime linking may impact performance, so we do
+    # not want this to be the default eventually. Also, we use the
+    # versioned .so libs for executables only if there is the -brtl
+    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+    # To allow for filename-based versioning support, we need to create
+    # libNAME.so.V as an archive file, containing:
+    # *) an Import File, referring to the versioned filename of the
+    #    archive as well as the shared archive member, telling the
+    #    bitwidth (32 or 64) of that shared object, and providing the
+    #    list of exported symbols of that shared object, eventually
+    #    decorated with the 'weak' keyword
+    # *) the shared object with the F_LOADONLY flag set, to really avoid
+    #    it being seen by the linker.
+    # At run time we better use the real file rather than another symlink,
+    # but for link time we create the symlink libNAME.so -> libNAME.so.V
+
+    case $with_aix_soname,$aix_use_runtimelinking in
+    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
     # soname into executable. Probably we can add versioning support to
     # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
+    aix,yes) # traditional libtool
+      dynamic_linker='AIX unversionable lib.so'
       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
       # instead of lib<name>.a to let people know that these are not
       # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+      ;;
+    aix,no) # traditional AIX only
+      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
       # We preserve .a as extension for shared libraries through AIX4.2
       # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
+      library_names_spec='$libname$release.a $libname.a'
+      soname_spec='$libname$release$shared_ext$major'
+      ;;
+    svr4,*) # full svr4 only
+      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
+      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+      # We do not specify a path in Import Files, so LIBPATH fires.
+      shlibpath_overrides_runpath=yes
+      ;;
+    *,yes) # both, prefer svr4
+      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
+      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+      # unpreferred sharedlib libNAME.a needs extra handling
+      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
+      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
+      # We do not specify a path in Import Files, so LIBPATH fires.
+      shlibpath_overrides_runpath=yes
+      ;;
+    *,no) # both, prefer aix
+      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
+      library_names_spec='$libname$release.a $libname.a'
+      soname_spec='$libname$release$shared_ext$major'
+      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
+      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
+      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
+      ;;
+    esac
     shlibpath_var=LIBPATH
   fi
   ;;
@@ -2242,27 +2491,27 @@ amigaos*)
   powerpc)
     # Since July 2007 AmigaOS4 officially supports .so libraries.
     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
     ;;
   m68k)
     library_names_spec='$libname.ixlibrary $libname.a'
     # Create ${libname}_ixlibrary.a entries in /sys/libs.
-    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
     ;;
   esac
   ;;
 
 beos*)
-  library_names_spec='${libname}${shared_ext}'
+  library_names_spec='$libname$shared_ext'
   dynamic_linker="$host_os ld.so"
   shlibpath_var=LIBRARY_PATH
   ;;
 
 bsdi[[45]]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@@ -2274,7 +2523,7 @@ bsdi[[45]]*)
 
 cygwin* | mingw* | pw32* | cegcc*)
   version_type=windows
-  shrext_cmds=".dll"
+  shrext_cmds=.dll
   need_version=no
   need_lib_prefix=no
 
@@ -2283,8 +2532,8 @@ cygwin* | mingw* | pw32* | cegcc*)
     # gcc
     library_names_spec='$libname.dll.a'
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+    postinstall_cmds='base_file=`basename \$file`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
       $install_prog $dir/$dlname \$dldir/$dlname~
@@ -2300,17 +2549,17 @@ cygwin* | mingw* | pw32* | cegcc*)
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
 m4_if([$1], [],[
       sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
       ;;
     mingw* | cegcc*)
       # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
       ;;
     pw32*)
       # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
       ;;
     esac
     dynamic_linker='Win32 ld.exe'
@@ -2319,8 +2568,8 @@ m4_if([$1], [],[
   *,cl*)
     # Native MSVC
     libname_spec='$name'
-    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-    library_names_spec='${libname}.dll.lib'
+    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+    library_names_spec='$libname.dll.lib'
 
     case $build_os in
     mingw*)
@@ -2347,7 +2596,7 @@ m4_if([$1], [],[
       sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
       ;;
     *)
-      sys_lib_search_path_spec="$LIB"
+      sys_lib_search_path_spec=$LIB
       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
         # It is most probably a Windows format PATH.
         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
@@ -2360,8 +2609,8 @@ m4_if([$1], [],[
     esac
 
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+    postinstall_cmds='base_file=`basename \$file`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
       $install_prog $dir/$dlname \$dldir/$dlname'
@@ -2374,7 +2623,7 @@ m4_if([$1], [],[
 
   *)
     # Assume MSVC wrapper
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
     dynamic_linker='Win32 ld.exe'
     ;;
   esac
@@ -2387,8 +2636,8 @@ darwin* | rhapsody*)
   version_type=darwin
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
+  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+  soname_spec='$libname$release$major$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
@@ -2398,18 +2647,14 @@ m4_if([$1], [],[
   ;;
 
 dgux*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
 freebsd* | dragonfly*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
@@ -2417,25 +2662,26 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[[123]]*) objformat=aout ;;
+    freebsd[[23]].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
   version_type=freebsd-$objformat
   case $version_type in
     freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+      soname_spec='$libname$release$shared_ext$major'
       need_version=no
       need_lib_prefix=no
       ;;
     freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
       need_version=yes
       ;;
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
@@ -2454,26 +2700,15 @@ freebsd* | dragonfly*)
   esac
   ;;
 
-gnu*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
 haiku*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   dynamic_linker="$host_os runtime_loader"
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
+  shlibpath_overrides_runpath=no
   sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
   hardcode_into_libs=yes
   ;;
@@ -2491,14 +2726,15 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.so"
     shlibpath_var=LD_LIBRARY_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
+    if test 32 = "$HPUX_IA64_MODE"; then
       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
     else
       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
     fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
   hppa*64*)
     shrext_cmds='.sl'
@@ -2506,8 +2742,8 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
@@ -2516,8 +2752,8 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=SHLIB_PATH
     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     ;;
   esac
   # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
@@ -2527,11 +2763,11 @@ hpux9* | hpux10* | hpux11*)
   ;;
 
 interix[[3-9]]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
@@ -2542,16 +2778,16 @@ irix5* | irix6* | nonstopux*)
   case $host_os in
     nonstopux*) version_type=nonstopux ;;
     *)
-	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux
+	if test yes = "$lt_cv_prog_gnu_ld"; then
+		version_type=linux # correct to gnu/linux during the next big refactor
 	else
 		version_type=irix
 	fi ;;
   esac
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
   case $host_os in
   irix5* | nonstopux*)
     libsuff= shlibsuff=
@@ -2570,8 +2806,8 @@ irix5* | irix6* | nonstopux*)
   esac
   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
   shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
   hardcode_into_libs=yes
   ;;
 
@@ -2580,13 +2816,33 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
-  version_type=linux
+linux*android*)
+  version_type=none # Android doesn't support versioned libraries.
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext'
+  soname_spec='$libname$release$shared_ext'
+  finish_cmds=
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  dynamic_linker='Android linker'
+  # Don't embed -rpath directories since the linker doesn't support them.
+  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+  ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+  version_type=linux # correct to gnu/linux during the next big refactor
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
@@ -2611,7 +2867,12 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
   # before this can be enabled.
   hardcode_into_libs=yes
 
-  # Append ld.so.conf contents to the search path
+  # Ideally, we could use ldconfig to report *all* directores which are
+  # searched for libraries, however this is still not possible.  Aside from not
+  # being certain /sbin/ldconfig is available, command
+  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
+  # even though it is searched at run-time.  Try to do the best guess by
+  # appending ld.so.conf contents (and includes) to the search path.
   if test -f /etc/ld.so.conf; then
     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
@@ -2643,12 +2904,12 @@ netbsd*)
   need_lib_prefix=no
   need_version=no
   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
     dynamic_linker='NetBSD (a.out) ld.so'
   else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     dynamic_linker='NetBSD ld.elf_so'
   fi
   shlibpath_var=LD_LIBRARY_PATH
@@ -2657,8 +2918,8 @@ netbsd*)
   ;;
 
 newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   ;;
@@ -2667,58 +2928,68 @@ newsos6)
   version_type=qnx
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
   dynamic_linker='ldqnx.so'
   ;;
 
-openbsd*)
+openbsd* | bitrig*)
   version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
+  sys_lib_dlsearch_path_spec=/usr/lib
   need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
-    *)				need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[[89]] | openbsd2.[[89]].*)
-	shlibpath_overrides_runpath=no
-	;;
-      *)
-	shlibpath_overrides_runpath=yes
-	;;
-      esac
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+    need_version=no
   else
-    shlibpath_overrides_runpath=yes
+    need_version=yes
   fi
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
   ;;
 
 os2*)
   libname_spec='$name'
-  shrext_cmds=".dll"
+  version_type=windows
+  shrext_cmds=.dll
+  need_version=no
   need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
+  # OS/2 can only load a DLL with a base name of 8 characters or less.
+  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+    v=$($ECHO $release$versuffix | tr -d .-);
+    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+    $ECHO $n$v`$shared_ext'
+  library_names_spec='${libname}_dll.$libext'
   dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
+  shlibpath_var=BEGINLIBPATH
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+  postinstall_cmds='base_file=`basename \$file`~
+    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
+    dldir=$destdir/`dirname \$dlpath`~
+    test -d \$dldir || mkdir -p \$dldir~
+    $install_prog $dir/$dlname \$dldir/$dlname~
+    chmod a+x \$dldir/$dlname~
+    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+    fi'
+  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
+    dlpath=$dir/\$dldll~
+    $RM \$dlpath'
   ;;
 
 osf3* | osf4* | osf5*)
   version_type=osf
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
   ;;
 
 rdos*)
@@ -2726,11 +2997,11 @@ rdos*)
   ;;
 
 solaris*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
@@ -2740,20 +3011,20 @@ solaris*)
 
 sunos4*)
   version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
+  if test yes = "$with_gnu_ld"; then
     need_lib_prefix=no
   fi
   need_version=yes
   ;;
 
 sysv4 | sysv4.3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   case $host_vendor in
     sni)
@@ -2774,24 +3045,24 @@ sysv4 | sysv4.3*)
   ;;
 
 sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
+  if test -d /usr/nec; then
+    version_type=linux # correct to gnu/linux during the next big refactor
+    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+    soname_spec='$libname$shared_ext.$major'
     shlibpath_var=LD_LIBRARY_PATH
   fi
   ;;
 
 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
+  version_type=sco
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
+  if test yes = "$with_gnu_ld"; then
     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
   else
     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
@@ -2806,19 +3077,19 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
 tpf*)
   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
   ;;
 
 uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -2827,20 +3098,30 @@ uts4*)
   ;;
 esac
 AC_MSG_RESULT([$dynamic_linker])
-test "$dynamic_linker" = no && can_build_shared=no
+test no = "$dynamic_linker" && can_build_shared=no
 
 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 fi
 
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
-  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
 fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
-  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
 fi
 
+# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
+configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
+
+# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
+configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
+
 _LT_DECL([], [variables_saved_for_relink], [1],
     [Variables whose values should be saved in libtool wrapper scripts and
     restored at link time])
@@ -2873,39 +3154,41 @@ _LT_DECL([], [hardcode_into_libs], [0],
     [Whether we should hardcode library paths into libraries])
 _LT_DECL([], [sys_lib_search_path_spec], [2],
     [Compile-time system search path for libraries])
-_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
-    [Run-time system search path for libraries])
+_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
+    [Detected run-time system search path for libraries])
+_LT_DECL([], [configure_time_lt_sys_library_path], [2],
+    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
 ])# _LT_SYS_DYNAMIC_LINKER
 
 
 # _LT_PATH_TOOL_PREFIX(TOOL)
 # --------------------------
-# find a file program which can recognize shared library
+# find a file program that can recognize shared library
 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
 [m4_require([_LT_DECL_EGREP])dnl
 AC_MSG_CHECKING([for $1])
 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
 [case $MAGIC_CMD in
 [[\\/*] |  ?:[\\/]*])
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
   ;;
 *)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  lt_save_MAGIC_CMD=$MAGIC_CMD
+  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
 dnl $ac_dummy forces splitting on constant user-supplied paths.
 dnl POSIX.2 word splitting is done only on the output of word expansions,
 dnl not every word.  This closes a longstanding sh security hole.
   ac_dummy="m4_if([$2], , $PATH, [$2])"
   for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
     test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$1; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+    if test -f "$ac_dir/$1"; then
+      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
       if test -n "$file_magic_test_file"; then
 	case $deplibs_check_method in
 	"file_magic "*)
 	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
 	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 	    $EGREP "$file_magic_regex" > /dev/null; then
 	    :
@@ -2928,11 +3211,11 @@ _LT_EOF
       break
     fi
   done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  IFS=$lt_save_ifs
+  MAGIC_CMD=$lt_save_MAGIC_CMD
   ;;
 esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
 if test -n "$MAGIC_CMD"; then
   AC_MSG_RESULT($MAGIC_CMD)
 else
@@ -2950,7 +3233,7 @@ dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
 
 # _LT_PATH_MAGIC
 # --------------
-# find a file program which can recognize a shared library
+# find a file program that can recognize a shared library
 m4_defun([_LT_PATH_MAGIC],
 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
 if test -z "$lt_cv_path_MAGIC_CMD"; then
@@ -2977,16 +3260,16 @@ m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
 AC_ARG_WITH([gnu-ld],
     [AS_HELP_STRING([--with-gnu-ld],
 	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
-    [test "$withval" = no || with_gnu_ld=yes],
+    [test no = "$withval" || with_gnu_ld=yes],
     [with_gnu_ld=no])dnl
 
 ac_prog=ld
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   # Check if gcc -print-prog-name=ld gives a path.
   AC_MSG_CHECKING([for ld used by $CC])
   case $host in
   *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
+    # gcc leaves a trailing carriage return, which upsets mingw
     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
   *)
     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
@@ -3000,7 +3283,7 @@ if test "$GCC" = yes; then
       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
 	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
       done
-      test -z "$LD" && LD="$ac_prog"
+      test -z "$LD" && LD=$ac_prog
       ;;
   "")
     # If it fails, then pretend we aren't using GCC.
@@ -3011,37 +3294,37 @@ if test "$GCC" = yes; then
     with_gnu_ld=unknown
     ;;
   esac
-elif test "$with_gnu_ld" = yes; then
+elif test yes = "$with_gnu_ld"; then
   AC_MSG_CHECKING([for GNU ld])
 else
   AC_MSG_CHECKING([for non-GNU ld])
 fi
 AC_CACHE_VAL(lt_cv_path_LD,
 [if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
   for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
     test -z "$ac_dir" && ac_dir=.
     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
+      lt_cv_path_LD=$ac_dir/$ac_prog
       # Check to see if the program is GNU ld.  I'd rather use --version,
       # but apparently some variants of GNU ld only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
       *GNU* | *'with BFD'*)
-	test "$with_gnu_ld" != no && break
+	test no != "$with_gnu_ld" && break
 	;;
       *)
-	test "$with_gnu_ld" != yes && break
+	test yes != "$with_gnu_ld" && break
 	;;
       esac
     fi
   done
-  IFS="$lt_save_ifs"
+  IFS=$lt_save_ifs
 else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+  lt_cv_path_LD=$LD # Let the user override the test with a path.
 fi])
-LD="$lt_cv_path_LD"
+LD=$lt_cv_path_LD
 if test -n "$LD"; then
   AC_MSG_RESULT($LD)
 else
@@ -3095,13 +3378,13 @@ esac
 reload_cmds='$LD$reload_flag -o $output$reload_objs'
 case $host_os in
   cygwin* | mingw* | pw32* | cegcc*)
-    if test "$GCC" != yes; then
+    if test yes != "$GCC"; then
       reload_cmds=false
     fi
     ;;
   darwin*)
-    if test "$GCC" = yes; then
-      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    if test yes = "$GCC"; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
     else
       reload_cmds='$LD$reload_flag -o $output$reload_objs'
     fi
@@ -3112,6 +3395,43 @@ _LT_TAGDECL([], [reload_cmds], [2])dnl
 ])# _LT_CMD_RELOAD
 
 
+# _LT_PATH_DD
+# -----------
+# find a working dd
+m4_defun([_LT_PATH_DD],
+[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
+[printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+: ${lt_DD:=$DD}
+AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
+[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+  cmp -s conftest.i conftest.out \
+  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
+fi])
+rm -f conftest.i conftest2.i conftest.out])
+])# _LT_PATH_DD
+
+
+# _LT_CMD_TRUNCATE
+# ----------------
+# find command to truncate a binary pipe
+m4_defun([_LT_CMD_TRUNCATE],
+[m4_require([_LT_PATH_DD])
+AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
+[printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+lt_cv_truncate_bin=
+if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+  cmp -s conftest.i conftest.out \
+  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
+fi
+rm -f conftest.i conftest2.i conftest.out
+test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
+_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
+  [Command to truncate a binary pipe])
+])# _LT_CMD_TRUNCATE
+
+
 # _LT_CHECK_MAGIC_METHOD
 # ----------------------
 # how to check for library dependencies
@@ -3127,13 +3447,13 @@ lt_cv_deplibs_check_method='unknown'
 # Need to set the preceding variable on all platforms that support
 # interlibrary dependencies.
 # 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
+# 'unknown' -- same as none, but documents that we really don't know.
 # 'pass_all' -- all dependencies passed with no checks.
 # 'test_compile' -- check by making test program.
 # 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
+# that responds to the $file_magic_cmd with a given extended regex.
+# If you have 'file' or equivalent on your system and you're not sure
+# whether 'pass_all' will *always* work, you probably want this one.
 
 case $host_os in
 aix[[4-9]]*)
@@ -3160,8 +3480,7 @@ mingw* | pw32*)
   # Base MSYS/MinGW do not provide the 'file' command needed by
   # func_win32_libid shell function, so use a weaker test based on 'objdump',
   # unless we find 'file', for example because we are cross-compiling.
-  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
-  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
+  if ( file / ) >/dev/null 2>&1; then
     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
     lt_cv_file_magic_cmd='func_win32_libid'
   else
@@ -3197,10 +3516,6 @@ freebsd* | dragonfly*)
   fi
   ;;
 
-gnu*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
 haiku*)
   lt_cv_deplibs_check_method=pass_all
   ;;
@@ -3238,8 +3553,8 @@ irix5* | irix6* | nonstopux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -3261,8 +3576,8 @@ newos6*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-openbsd*)
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+openbsd* | bitrig*)
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
   else
     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
@@ -3315,6 +3630,9 @@ sysv4 | sysv4.3*)
 tpf*)
   lt_cv_deplibs_check_method=pass_all
   ;;
+os2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 esac
 ])
 
@@ -3355,33 +3673,38 @@ AC_DEFUN([LT_PATH_NM],
 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
 [if test -n "$NM"; then
   # Let the user override the test.
-  lt_cv_path_NM="$NM"
+  lt_cv_path_NM=$NM
 else
-  lt_nm_to_check="${ac_tool_prefix}nm"
+  lt_nm_to_check=${ac_tool_prefix}nm
   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
     lt_nm_to_check="$lt_nm_to_check nm"
   fi
   for lt_tmp_nm in $lt_nm_to_check; do
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       test -z "$ac_dir" && ac_dir=.
-      tmp_nm="$ac_dir/$lt_tmp_nm"
-      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+      tmp_nm=$ac_dir/$lt_tmp_nm
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
 	# Check to see if the nm accepts a BSD-compat flag.
-	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
+	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
 	#   nm: unknown option "B" ignored
 	# Tru64's nm complains that /dev/null is an invalid object file
-	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
-	*/dev/null* | *'Invalid file or object type'*)
+	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
+	case $build_os in
+	mingw*) lt_bad_file=conftest.nm/nofile ;;
+	*) lt_bad_file=/dev/null ;;
+	esac
+	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+	*$lt_bad_file* | *'Invalid file or object type'*)
 	  lt_cv_path_NM="$tmp_nm -B"
-	  break
+	  break 2
 	  ;;
 	*)
 	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
 	  */dev/null*)
 	    lt_cv_path_NM="$tmp_nm -p"
-	    break
+	    break 2
 	    ;;
 	  *)
 	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
@@ -3392,21 +3715,21 @@ else
 	esac
       fi
     done
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
   done
   : ${lt_cv_path_NM=no}
 fi])
-if test "$lt_cv_path_NM" != "no"; then
-  NM="$lt_cv_path_NM"
+if test no != "$lt_cv_path_NM"; then
+  NM=$lt_cv_path_NM
 else
   # Didn't find any BSD compatible name lister, look for dumpbin.
   if test -n "$DUMPBIN"; then :
     # Let the user override the test.
   else
     AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
-    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
     *COFF*)
-      DUMPBIN="$DUMPBIN -symbols"
+      DUMPBIN="$DUMPBIN -symbols -headers"
       ;;
     *)
       DUMPBIN=:
@@ -3414,8 +3737,8 @@ else
     esac
   fi
   AC_SUBST([DUMPBIN])
-  if test "$DUMPBIN" != ":"; then
-    NM="$DUMPBIN"
+  if test : != "$DUMPBIN"; then
+    NM=$DUMPBIN
   fi
 fi
 test -z "$NM" && NM=nm
@@ -3461,8 +3784,8 @@ lt_cv_sharedlib_from_linklib_cmd,
 
 case $host_os in
 cygwin* | mingw* | pw32* | cegcc*)
-  # two different shell functions defined in ltmain.sh
-  # decide which to use based on capabilities of $DLLTOOL
+  # two different shell functions defined in ltmain.sh;
+  # decide which one to use based on capabilities of $DLLTOOL
   case `$DLLTOOL --help 2>&1` in
   *--identify-strict*)
     lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
@@ -3474,7 +3797,7 @@ cygwin* | mingw* | pw32* | cegcc*)
   ;;
 *)
   # fallback: assume linklib IS sharedlib
-  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+  lt_cv_sharedlib_from_linklib_cmd=$ECHO
   ;;
 esac
 ])
@@ -3501,13 +3824,28 @@ AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool
     lt_cv_path_mainfest_tool=yes
   fi
   rm -f conftest*])
-if test "x$lt_cv_path_mainfest_tool" != xyes; then
+if test yes != "$lt_cv_path_mainfest_tool"; then
   MANIFEST_TOOL=:
 fi
 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
 ])# _LT_PATH_MANIFEST_TOOL
 
 
+# _LT_DLL_DEF_P([FILE])
+# ---------------------
+# True iff FILE is a Windows DLL '.def' file.
+# Keep in sync with func_dll_def_p in the libtool script
+AC_DEFUN([_LT_DLL_DEF_P],
+[dnl
+  test DEF = "`$SED -n dnl
+    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
+    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
+    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
+    -e q dnl                          Only consider the first "real" line
+    $1`" dnl
+])# _LT_DLL_DEF_P
+
+
 # LT_LIB_M
 # --------
 # check for math library
@@ -3519,11 +3857,11 @@ case $host in
   # These system don't have libm, or don't need it
   ;;
 *-ncr-sysv4.3*)
-  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
   ;;
 *)
-  AC_CHECK_LIB(m, cos, LIBM="-lm")
+  AC_CHECK_LIB(m, cos, LIBM=-lm)
   ;;
 esac
 AC_SUBST([LIBM])
@@ -3542,7 +3880,7 @@ m4_defun([_LT_COMPILER_NO_RTTI],
 
 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   case $cc_basename in
   nvcc*)
     _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
@@ -3594,7 +3932,7 @@ cygwin* | mingw* | pw32* | cegcc*)
   symcode='[[ABCDGISTW]]'
   ;;
 hpux*)
-  if test "$host_cpu" = ia64; then
+  if test ia64 = "$host_cpu"; then
     symcode='[[ABCDEGRST]]'
   fi
   ;;
@@ -3627,14 +3965,44 @@ case `$NM -V 2>&1` in
   symcode='[[ABCDGIRSTW]]' ;;
 esac
 
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+  # Gets list of data symbols to import.
+  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+  # Adjust the below global symbol transforms to fixup imported variables.
+  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
+  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
+  lt_c_name_lib_hook="\
+  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
+  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
+else
+  # Disable hooks by default.
+  lt_cv_sys_global_symbol_to_import=
+  lt_cdecl_hook=
+  lt_c_name_hook=
+  lt_c_name_lib_hook=
+fi
+
 # Transform an extracted symbol line into a proper C declaration.
 # Some systems (esp. on ia64) link data and code symbols differently,
 # so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+$lt_cdecl_hook\
+" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
 
 # Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+$lt_c_name_hook\
+" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
+
+# Transform an extracted symbol line into symbol name with lib prefix and
+# symbol address.
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+$lt_c_name_lib_hook\
+" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
 
 # Handle CRLF in mingw tool chain
 opt_cr=
@@ -3652,20 +4020,24 @@ for ac_symprfx in "" "_"; do
 
   # Write the raw and C identifiers.
   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
-    # Fake it for dumpbin and say T for any non-static function
-    # and D for any global variable.
+    # Fake it for dumpbin and say T for any non-static function,
+    # D for any global variable and I for any imported variable.
     # Also find C++ and __fastcall symbols from MSVC++,
     # which start with @ or ?.
     lt_cv_sys_global_symbol_pipe="$AWK ['"\
 "     {last_section=section; section=\$ 3};"\
+"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
+"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
+"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
 "     \$ 0!~/External *\|/{next};"\
 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
 "     {if(hide[section]) next};"\
-"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
-"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
+"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
+"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
+"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
 "     ' prfx=^$ac_symprfx]"
   else
     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
@@ -3705,11 +4077,11 @@ _LT_EOF
 	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
 	  cat <<_LT_EOF > conftest.$ac_ext
 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
-/* DATA imports from DLLs on WIN32 con't be const, because runtime
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
    relocations are performed -- see ld's documentation on pseudo-relocs.  */
 # define LT@&t at _DLSYM_CONST
-#elif defined(__osf__)
+#elif defined __osf__
 /* This system does not cope well with relocations in const data.  */
 # define LT@&t at _DLSYM_CONST
 #else
@@ -3735,7 +4107,7 @@ lt__PROGRAM__LTX_preloaded_symbols[[]] =
 {
   { "@PROGRAM@", (void *) 0 },
 _LT_EOF
-	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
 	  cat <<\_LT_EOF >> conftest.$ac_ext
   {0, (void *) 0}
 };
@@ -3755,9 +4127,9 @@ _LT_EOF
 	  mv conftest.$ac_objext conftstm.$ac_objext
 	  lt_globsym_save_LIBS=$LIBS
 	  lt_globsym_save_CFLAGS=$CFLAGS
-	  LIBS="conftstm.$ac_objext"
+	  LIBS=conftstm.$ac_objext
 	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
-	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
 	    pipe_works=yes
 	  fi
 	  LIBS=$lt_globsym_save_LIBS
@@ -3778,7 +4150,7 @@ _LT_EOF
   rm -rf conftest* conftst*
 
   # Do not use the global_symbol_pipe unless it works.
-  if test "$pipe_works" = yes; then
+  if test yes = "$pipe_works"; then
     break
   else
     lt_cv_sys_global_symbol_pipe=
@@ -3805,12 +4177,16 @@ _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
     [Take the output of nm and produce a listing of raw symbols and C names])
 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
     [Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
+    [Transform the output of nm into a list of symbols to manually relocate])
 _LT_DECL([global_symbol_to_c_name_address],
     [lt_cv_sys_global_symbol_to_c_name_address], [1],
     [Transform the output of nm in a C name address pair])
 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
     [Transform the output of nm in a C name address pair when lib prefix is needed])
+_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
+    [The name lister interface])
 _LT_DECL([], [nm_file_list_spec], [1],
     [Specify filename containing input files for $NM])
 ]) # _LT_CMD_GLOBAL_SYMBOLS
@@ -3826,17 +4202,18 @@ _LT_TAGVAR(lt_prog_compiler_static, $1)=
 
 m4_if([$1], [CXX], [
   # C++ specific cases for pic, static, wl, etc.
-  if test "$GXX" = yes; then
+  if test yes = "$GXX"; then
     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
     case $host_os in
     aix*)
       # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
 	# AIX 5 now supports IA64 processor
 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       fi
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
       ;;
 
     amigaos*)
@@ -3847,8 +4224,8 @@ m4_if([$1], [CXX], [
         ;;
       m68k)
             # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
+            # adding the '-m68020' flag to GCC prevents building anything better,
+            # like '-m68040'.
             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
         ;;
       esac
@@ -3864,6 +4241,11 @@ m4_if([$1], [CXX], [
       # (--disable-auto-import) libraries
       m4_if([$1], [GCJ], [],
 	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      case $host_os in
+      os2*)
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
+	;;
+      esac
       ;;
     darwin* | rhapsody*)
       # PIC is the default on this platform
@@ -3913,7 +4295,7 @@ m4_if([$1], [CXX], [
     case $host_os in
       aix[[4-9]]*)
 	# All AIX code is PIC.
-	if test "$host_cpu" = ia64; then
+	if test ia64 = "$host_cpu"; then
 	  # AIX 5 now supports IA64 processor
 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 	else
@@ -3954,14 +4336,14 @@ m4_if([$1], [CXX], [
 	case $cc_basename in
 	  CC*)
 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-	    if test "$host_cpu" != ia64; then
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
+	    if test ia64 != "$host_cpu"; then
 	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 	    fi
 	    ;;
 	  aCC*)
 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
 	    case $host_cpu in
 	    hppa*64*|ia64*)
 	      # +Z the default
@@ -3990,7 +4372,7 @@ m4_if([$1], [CXX], [
 	    ;;
 	esac
 	;;
-      linux* | k*bsd*-gnu | kopensolaris*-gnu)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
 	case $cc_basename in
 	  KCC*)
 	    # KAI C++ Compiler
@@ -3998,7 +4380,7 @@ m4_if([$1], [CXX], [
 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 	    ;;
 	  ecpc* )
-	    # old Intel C++ for x86_64 which still supported -KPIC.
+	    # old Intel C++ for x86_64, which still supported -KPIC.
 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
@@ -4143,17 +4525,18 @@ m4_if([$1], [CXX], [
   fi
 ],
 [
-  if test "$GCC" = yes; then
+  if test yes = "$GCC"; then
     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
     case $host_os in
       aix*)
       # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
 	# AIX 5 now supports IA64 processor
 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       fi
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
       ;;
 
     amigaos*)
@@ -4164,8 +4547,8 @@ m4_if([$1], [CXX], [
         ;;
       m68k)
             # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
+            # adding the '-m68020' flag to GCC prevents building anything better,
+            # like '-m68040'.
             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
         ;;
       esac
@@ -4182,6 +4565,11 @@ m4_if([$1], [CXX], [
       # (--disable-auto-import) libraries
       m4_if([$1], [GCJ], [],
 	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      case $host_os in
+      os2*)
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
+	;;
+      esac
       ;;
 
     darwin* | rhapsody*)
@@ -4242,7 +4630,9 @@ m4_if([$1], [CXX], [
     case $cc_basename in
     nvcc*) # Cuda Compiler Driver 2.2
       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
-      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
+      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
+      fi
       ;;
     esac
   else
@@ -4250,7 +4640,7 @@ m4_if([$1], [CXX], [
     case $host_os in
     aix*)
       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
 	# AIX 5 now supports IA64 processor
 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       else
@@ -4258,11 +4648,30 @@ m4_if([$1], [CXX], [
       fi
       ;;
 
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      case $cc_basename in
+      nagfor*)
+        # NAG Fortran compiler
+        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
+        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+        ;;
+      esac
+      ;;
+
     mingw* | cygwin* | pw32* | os2* | cegcc*)
       # This hack is so that the source file can tell whether it is being
       # built for inclusion in a dll (and should export symbols for example).
       m4_if([$1], [GCJ], [],
 	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      case $host_os in
+      os2*)
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
+	;;
+      esac
       ;;
 
     hpux9* | hpux10* | hpux11*)
@@ -4278,7 +4687,7 @@ m4_if([$1], [CXX], [
 	;;
       esac
       # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
       ;;
 
     irix5* | irix6* | nonstopux*)
@@ -4287,9 +4696,9 @@ m4_if([$1], [CXX], [
       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
       ;;
 
-    linux* | k*bsd*-gnu | kopensolaris*-gnu)
+    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
       case $cc_basename in
-      # old Intel for x86_64 which still supported -KPIC.
+      # old Intel for x86_64, which still supported -KPIC.
       ecc*)
 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
@@ -4314,6 +4723,12 @@ m4_if([$1], [CXX], [
 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 	;;
+      tcc*)
+	# Fabrice Bellard et al's Tiny C Compiler
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	;;
       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
         # Portland Group compilers (*not* the Pentium gcc compiler,
 	# which looks to be a dead project)
@@ -4334,18 +4749,33 @@ m4_if([$1], [CXX], [
 	;;
       *)
 	case `$CC -V 2>&1 | sed 5q` in
-	*Sun\ F* | *Sun*Fortran*)
+	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
 	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
 	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
 	  ;;
+	*Sun\ F* | *Sun*Fortran*)
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+	  ;;
 	*Sun\ C*)
 	  # Sun C 5.9
 	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 	  ;;
+        *Intel*\ [[CF]]*Compiler*)
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	  ;;
+	*Portland\ Group*)
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  ;;
 	esac
 	;;
       esac
@@ -4396,7 +4826,7 @@ m4_if([$1], [CXX], [
       ;;
 
     sysv4*MP*)
-      if test -d /usr/nec ;then
+      if test -d /usr/nec; then
 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       fi
@@ -4425,7 +4855,7 @@ m4_if([$1], [CXX], [
   fi
 ])
 case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
+  # For platforms that do not support PIC, -DPIC is meaningless:
   *djgpp*)
     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
     ;;
@@ -4491,21 +4921,27 @@ m4_if([$1], [CXX], [
   case $host_os in
   aix[[4-9]]*)
     # If we're using GNU nm, then we don't want the "-C" option.
-    # -C means demangle to AIX nm, but means don't demangle with GNU nm
-    # Also, AIX nm treats weak defined symbols like other global defined
-    # symbols, whereas GNU nm marks them as "W".
+    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
+    # Without the "-l" option, or with the "-B" option, AIX nm treats
+    # weak defined symbols like other global defined symbols, whereas
+    # GNU nm marks them as "W".
+    # While the 'weak' keyword is ignored in the Export File, we need
+    # it in the Import File for the 'aix-soname' feature, so we have
+    # to replace the "-B" option with "-P" for AIX nm.
     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
     else
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+      _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
     fi
     ;;
   pw32*)
-    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
     ;;
   cygwin* | mingw* | cegcc*)
     case $cc_basename in
-    cl*) ;;
+    cl*)
+      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+      ;;
     *)
       _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
@@ -4533,7 +4969,6 @@ m4_if([$1], [CXX], [
   _LT_TAGVAR(hardcode_direct, $1)=no
   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
   _LT_TAGVAR(hardcode_libdir_separator, $1)=
   _LT_TAGVAR(hardcode_minus_L, $1)=no
   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
@@ -4549,9 +4984,9 @@ m4_if([$1], [CXX], [
   # included in the symbol list
   _LT_TAGVAR(include_expsyms, $1)=
   # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
+  # it will be wrapped by ' (' and ')$', so one must not match beginning or
+  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
+  # as well as any symbol that contains 'd'.
   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
   # platforms (ab)use it in PIC code, but their linkers get confused if
@@ -4567,7 +5002,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
     # FIXME: the MSVC++ port hasn't been tested in a loooong time
     # When not using gcc, we currently assume that we are using
     # Microsoft Visual C++.
-    if test "$GCC" != yes; then
+    if test yes != "$GCC"; then
       with_gnu_ld=no
     fi
     ;;
@@ -4575,7 +5010,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
     # we just hope/assume this is gcc and not c89 (= MSVC++)
     with_gnu_ld=yes
     ;;
-  openbsd*)
+  openbsd* | bitrig*)
     with_gnu_ld=no
     ;;
   linux* | k*bsd*-gnu | gnu*)
@@ -4588,7 +5023,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
   # On some targets, GNU ld is compatible enough with the native linker
   # that we're better off using the native interface for both.
   lt_use_gnu_ld_interface=no
-  if test "$with_gnu_ld" = yes; then
+  if test yes = "$with_gnu_ld"; then
     case $host_os in
       aix*)
 	# The AIX port of GNU ld has always aspired to compatibility
@@ -4610,24 +5045,24 @@ dnl Note also adjust exclude_expsyms for C++ above.
     esac
   fi
 
-  if test "$lt_use_gnu_ld_interface" = yes; then
+  if test yes = "$lt_use_gnu_ld_interface"; then
     # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
+    wlarc='$wl'
 
     # Set some defaults for GNU ld with shared library support. These
     # are reset later if shared libraries are not supported. Putting them
     # here allows them to be overridden if necessary.
     runpath_var=LD_RUN_PATH
-    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
     # ancient GNU ld didn't support --whole-archive et. al.
     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
-      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
     else
       _LT_TAGVAR(whole_archive_flag_spec, $1)=
     fi
     supports_anon_versioning=no
-    case `$LD -v 2>&1` in
+    case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
       *GNU\ gold*) supports_anon_versioning=yes ;;
       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
@@ -4640,7 +5075,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
     case $host_os in
     aix[[3-9]]*)
       # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
+      if test ia64 != "$host_cpu"; then
 	_LT_TAGVAR(ld_shlibs, $1)=no
 	cat <<_LT_EOF 1>&2
 
@@ -4659,7 +5094,7 @@ _LT_EOF
       case $host_cpu in
       powerpc)
             # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
             _LT_TAGVAR(archive_expsym_cmds, $1)=''
         ;;
       m68k)
@@ -4675,7 +5110,7 @@ _LT_EOF
 	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
 	# support --undefined.  This deserves some investigation.  FIXME
-	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
       else
 	_LT_TAGVAR(ld_shlibs, $1)=no
       fi
@@ -4685,7 +5120,7 @@ _LT_EOF
       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
       # as there is no search path for DLLs.
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
       _LT_TAGVAR(always_export_symbols, $1)=no
       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
@@ -4693,61 +5128,89 @@ _LT_EOF
       _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
 
       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-	# If the export-symbols file already is a .def file (1st line
-	# is EXPORTS), use it as is; otherwise, prepend...
-	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	  cp $export_symbols $output_objdir/$soname.def;
-	else
-	  echo EXPORTS > $output_objdir/$soname.def;
-	  cat $export_symbols >> $output_objdir/$soname.def;
-	fi~
-	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file, use it as
+	# is; otherwise, prepend EXPORTS...
+	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+          cp $export_symbols $output_objdir/$soname.def;
+        else
+          echo EXPORTS > $output_objdir/$soname.def;
+          cat $export_symbols >> $output_objdir/$soname.def;
+        fi~
+        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
       else
 	_LT_TAGVAR(ld_shlibs, $1)=no
       fi
       ;;
 
     haiku*)
-      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
       _LT_TAGVAR(link_all_deplibs, $1)=yes
       ;;
 
+    os2*)
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      shrext_cmds=.dll
+      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	$ECHO EXPORTS >> $output_objdir/$libname.def~
+	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	emximp -o $lib $output_objdir/$libname.def'
+      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	$ECHO EXPORTS >> $output_objdir/$libname.def~
+	prefix_cmds="$SED"~
+	if test EXPORTS = "`$SED 1q $export_symbols`"; then
+	  prefix_cmds="$prefix_cmds -e 1d";
+	fi~
+	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	emximp -o $lib $output_objdir/$libname.def'
+      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      ;;
+
     interix[[3-9]]*)
       _LT_TAGVAR(hardcode_direct, $1)=no
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
       # Instead, shared libraries are loaded at an image base (0x10000000 by
       # default) and relocated if they conflict, which is a slow very memory
       # consuming and fragmenting process.  To avoid this, we pick a random,
       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
       ;;
 
     gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
       tmp_diet=no
-      if test "$host_os" = linux-dietlibc; then
+      if test linux-dietlibc = "$host_os"; then
 	case $cc_basename in
 	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
 	esac
       fi
       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
-	 && test "$tmp_diet" = no
+	 && test no = "$tmp_diet"
       then
 	tmp_addflag=' $pic_flag'
 	tmp_sharedflag='-shared'
 	case $cc_basename,$host_cpu in
         pgcc*)				# Portland Group C compiler
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
 	  tmp_addflag=' $pic_flag'
 	  ;;
 	pgf77* | pgf90* | pgf95* | pgfortran*)
 					# Portland Group f77 and f90 compilers
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
 	  tmp_addflag=' $pic_flag -Mnomain' ;;
 	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
 	  tmp_addflag=' -i_dynamic' ;;
@@ -4758,43 +5221,47 @@ _LT_EOF
 	lf95*)				# Lahey Fortran 8.1
 	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
 	  tmp_sharedflag='--shared' ;;
+        nagfor*)                        # NAGFOR 5.3
+          tmp_sharedflag='-Wl,-shared' ;;
 	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
 	  tmp_sharedflag='-qmkshrobj'
 	  tmp_addflag= ;;
 	nvcc*)	# Cuda Compiler Driver 2.2
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
 	  _LT_TAGVAR(compiler_needs_object, $1)=yes
 	  ;;
 	esac
 	case `$CC -V 2>&1 | sed 5q` in
 	*Sun\ C*)			# Sun C 5.9
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
 	  _LT_TAGVAR(compiler_needs_object, $1)=yes
 	  tmp_sharedflag='-G' ;;
 	*Sun\ F*)			# Sun Fortran 8.3
 	  tmp_sharedflag='-G' ;;
 	esac
-	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
 
-        if test "x$supports_anon_versioning" = xyes; then
+        if test yes = "$supports_anon_versioning"; then
           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-	    echo "local: *; };" >> $output_objdir/$libname.ver~
-	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+            echo "local: *; };" >> $output_objdir/$libname.ver~
+            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
         fi
 
 	case $cc_basename in
+	tcc*)
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
+	  ;;
 	xlf* | bgf* | bgxlf* | mpixlf*)
 	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
 	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
 	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
-	  if test "x$supports_anon_versioning" = xyes; then
+	  if test yes = "$supports_anon_versioning"; then
 	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-	      echo "local: *; };" >> $output_objdir/$libname.ver~
-	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+              echo "local: *; };" >> $output_objdir/$libname.ver~
+              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
 	  fi
 	  ;;
 	esac
@@ -4808,8 +5275,8 @@ _LT_EOF
 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 	wlarc=
       else
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       fi
       ;;
 
@@ -4827,8 +5294,8 @@ _LT_EOF
 
 _LT_EOF
       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       else
 	_LT_TAGVAR(ld_shlibs, $1)=no
       fi
@@ -4840,7 +5307,7 @@ _LT_EOF
 	_LT_TAGVAR(ld_shlibs, $1)=no
 	cat <<_LT_EOF 1>&2
 
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
 *** reliably create shared libraries on SCO systems.  Therefore, libtool
 *** is disabling shared libraries support.  We urge you to upgrade GNU
 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
@@ -4855,9 +5322,9 @@ _LT_EOF
 	  # DT_RUNPATH tag from executables and libraries.  But doing so
 	  # requires that you compile everything twice, which is a pain.
 	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 	  else
 	    _LT_TAGVAR(ld_shlibs, $1)=no
 	  fi
@@ -4874,15 +5341,15 @@ _LT_EOF
 
     *)
       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       else
 	_LT_TAGVAR(ld_shlibs, $1)=no
       fi
       ;;
     esac
 
-    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
+    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
       runpath_var=
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
       _LT_TAGVAR(export_dynamic_flag_spec, $1)=
@@ -4898,7 +5365,7 @@ _LT_EOF
       # Note: this linker hardcodes the directories in LIBPATH if there
       # are no directories specified by -L.
       _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
 	# Neither direct hardcoding nor static linking is supported with a
 	# broken collect2.
 	_LT_TAGVAR(hardcode_direct, $1)=unsupported
@@ -4906,34 +5373,57 @@ _LT_EOF
       ;;
 
     aix[[4-9]]*)
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
 	# On IA64, the linker does run time linking by default, so we don't
 	# have to do anything special.
 	aix_use_runtimelinking=no
 	exp_sym_flag='-Bexport'
-	no_entry_flag=""
+	no_entry_flag=
       else
 	# If we're using GNU nm, then we don't want the "-C" option.
-	# -C means demangle to AIX nm, but means don't demangle with GNU nm
-	# Also, AIX nm treats weak defined symbols like other global
-	# defined symbols, whereas GNU nm marks them as "W".
+	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
+	# Without the "-l" option, or with the "-B" option, AIX nm treats
+	# weak defined symbols like other global defined symbols, whereas
+	# GNU nm marks them as "W".
+	# While the 'weak' keyword is ignored in the Export File, we need
+	# it in the Import File for the 'aix-soname' feature, so we have
+	# to replace the "-B" option with "-P" for AIX nm.
 	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
 	else
-	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	  _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
 	fi
 	aix_use_runtimelinking=no
 
 	# Test if we are trying to use run time linking or normal
 	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
-	# need to do runtime linking.
+	# have runtime linking enabled, and use it for executables.
+	# For shared libraries, we enable/disable runtime linking
+	# depending on the kind of the shared library created -
+	# when "with_aix_soname,aix_use_runtimelinking" is:
+	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
+	# "aix,yes"  lib.so          shared, rtl:yes, for executables
+	#            lib.a           static archive
+	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
+	#            lib.a(lib.so.V) shared, rtl:no,  for executables
+	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+	#            lib.a(lib.so.V) shared, rtl:no
+	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
+	#            lib.a           static archive
 	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
 	  for ld_flag in $LDFLAGS; do
-	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
 	    aix_use_runtimelinking=yes
 	    break
 	  fi
 	  done
+	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
+	    # so we don't have lib.a shared libs to link our executables.
+	    # We have to force runtime linking in this case.
+	    aix_use_runtimelinking=yes
+	    LDFLAGS="$LDFLAGS -Wl,-brtl"
+	  fi
 	  ;;
 	esac
 
@@ -4952,13 +5442,21 @@ _LT_EOF
       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
       _LT_TAGVAR(link_all_deplibs, $1)=yes
-      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
+      case $with_aix_soname,$aix_use_runtimelinking in
+      aix,*) ;; # traditional, no import file
+      svr4,* | *,yes) # use import file
+	# The Import File defines what to hardcode.
+	_LT_TAGVAR(hardcode_direct, $1)=no
+	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+	;;
+      esac
 
-      if test "$GCC" = yes; then
+      if test yes = "$GCC"; then
 	case $host_os in aix4.[[012]]|aix4.[[012]].*)
 	# We only want to do this on AIX 4.2 and lower, the check
 	# below for broken collect2 doesn't work under 4.3+
-	  collect2name=`${CC} -print-prog-name=collect2`
+	  collect2name=`$CC -print-prog-name=collect2`
 	  if test -f "$collect2name" &&
 	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
 	  then
@@ -4977,62 +5475,80 @@ _LT_EOF
 	  ;;
 	esac
 	shared_flag='-shared'
-	if test "$aix_use_runtimelinking" = yes; then
-	  shared_flag="$shared_flag "'${wl}-G'
+	if test yes = "$aix_use_runtimelinking"; then
+	  shared_flag="$shared_flag "'$wl-G'
 	fi
-	_LT_TAGVAR(link_all_deplibs, $1)=no
+	# Need to ensure runtime linking is disabled for the traditional
+	# shared library, or the linker may eventually find shared libraries
+	# /with/ Import File - we do not want to mix them.
+	shared_flag_aix='-shared'
+	shared_flag_svr4='-shared $wl-G'
       else
 	# not using gcc
-	if test "$host_cpu" = ia64; then
+	if test ia64 = "$host_cpu"; then
 	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 	# chokes on -Wl,-G. The following line is correct:
 	  shared_flag='-G'
 	else
-	  if test "$aix_use_runtimelinking" = yes; then
-	    shared_flag='${wl}-G'
+	  if test yes = "$aix_use_runtimelinking"; then
+	    shared_flag='$wl-G'
 	  else
-	    shared_flag='${wl}-bM:SRE'
+	    shared_flag='$wl-bM:SRE'
 	  fi
+	  shared_flag_aix='$wl-bM:SRE'
+	  shared_flag_svr4='$wl-G'
 	fi
       fi
 
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
       # It seems that -bexpall does not export symbols beginning with
       # underscore (_), so it is better to generate a list of symbols to export.
       _LT_TAGVAR(always_export_symbols, $1)=yes
-      if test "$aix_use_runtimelinking" = yes; then
+      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
 	# Warning - without using the other runtime loading flags (-brtl),
 	# -berok will link without error, but may produce a broken library.
 	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
         # Determine the default libpath from the value encoded in an
         # empty executable.
         _LT_SYS_MODULE_PATH_AIX([$1])
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
       else
-	if test "$host_cpu" = ia64; then
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	if test ia64 = "$host_cpu"; then
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
 	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
 	else
 	 # Determine the default libpath from the value encoded in an
 	 # empty executable.
 	 _LT_SYS_MODULE_PATH_AIX([$1])
-	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
 	  # Warning - without using the other run time loading flags,
 	  # -berok will link without error, but may produce a broken library.
-	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-	  if test "$with_gnu_ld" = yes; then
+	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
+	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
+	  if test yes = "$with_gnu_ld"; then
 	    # We only use this code for GNU lds that support --whole-archive.
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
 	  else
 	    # Exported symbols can be pulled into shared objects from archives
 	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
 	  fi
 	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-	  # This is similar to how AIX traditionally builds its shared libraries.
-	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+	  # -brtl affects multiple linker settings, -berok does not and is overridden later
+	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
+	  if test svr4 != "$with_aix_soname"; then
+	    # This is similar to how AIX traditionally builds its shared libraries.
+	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+	  fi
+	  if test aix != "$with_aix_soname"; then
+	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 3 [...]
+	  else
+	    # used by -dlpreopen to get the symbols
+	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
+	  fi
+	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
 	fi
       fi
       ;;
@@ -5041,7 +5557,7 @@ _LT_EOF
       case $host_cpu in
       powerpc)
             # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
             _LT_TAGVAR(archive_expsym_cmds, $1)=''
         ;;
       m68k)
@@ -5071,35 +5587,37 @@ _LT_EOF
 	# Tell ltmain to make .lib files, not .a files.
 	libext=lib
 	# Tell ltmain to make .dll files, not .so files.
-	shrext_cmds=".dll"
+	shrext_cmds=.dll
 	# FIXME: Setting linknames here is a bad hack.
-	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
-	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
-	  else
-	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
-	  fi~
-	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
-	  linknames='
+	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+            cp "$export_symbols" "$output_objdir/$soname.def";
+            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+          else
+            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+          fi~
+          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+          linknames='
 	# The linker will not automatically build a static lib if we build a DLL.
 	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
 	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
 	_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
 	# Don't use ranlib
 	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
 	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
-	  lt_tool_outputfile="@TOOL_OUTPUT@"~
-	  case $lt_outputfile in
-	    *.exe|*.EXE) ;;
-	    *)
-	      lt_outputfile="$lt_outputfile.exe"
-	      lt_tool_outputfile="$lt_tool_outputfile.exe"
-	      ;;
-	  esac~
-	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
-	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
-	    $RM "$lt_outputfile.manifest";
-	  fi'
+          lt_tool_outputfile="@TOOL_OUTPUT@"~
+          case $lt_outputfile in
+            *.exe|*.EXE) ;;
+            *)
+              lt_outputfile=$lt_outputfile.exe
+              lt_tool_outputfile=$lt_tool_outputfile.exe
+              ;;
+          esac~
+          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+            $RM "$lt_outputfile.manifest";
+          fi'
 	;;
       *)
 	# Assume MSVC wrapper
@@ -5108,7 +5626,7 @@ _LT_EOF
 	# Tell ltmain to make .lib files, not .a files.
 	libext=lib
 	# Tell ltmain to make .dll files, not .so files.
-	shrext_cmds=".dll"
+	shrext_cmds=.dll
 	# FIXME: Setting linknames here is a bad hack.
 	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
 	# The linker will automatically build a .lib file if we build a DLL.
@@ -5130,10 +5648,6 @@ _LT_EOF
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
 
-    freebsd1*)
-      _LT_TAGVAR(ld_shlibs, $1)=no
-      ;;
-
     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
     # support.  Future versions do this automatically, but an explicit c++rt0.o
     # does not break anything, and helps significantly (at the cost of a little
@@ -5146,7 +5660,7 @@ _LT_EOF
       ;;
 
     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
+    freebsd2.*)
       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
       _LT_TAGVAR(hardcode_direct, $1)=yes
       _LT_TAGVAR(hardcode_minus_L, $1)=yes
@@ -5162,34 +5676,33 @@ _LT_EOF
       ;;
 
     hpux9*)
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      if test yes = "$GCC"; then
+	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
       else
-	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
       fi
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
       _LT_TAGVAR(hardcode_direct, $1)=yes
 
       # hardcode_minus_L: Not really in the search PATH,
       # but as the default location of the library.
       _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
       ;;
 
     hpux10*)
-      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes,no = "$GCC,$with_gnu_ld"; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
       else
 	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
       fi
-      if test "$with_gnu_ld" = no; then
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+      if test no = "$with_gnu_ld"; then
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
 	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
 	_LT_TAGVAR(hardcode_direct, $1)=yes
 	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
 	# hardcode_minus_L: Not really in the search PATH,
 	# but as the default location of the library.
 	_LT_TAGVAR(hardcode_minus_L, $1)=yes
@@ -5197,25 +5710,25 @@ _LT_EOF
       ;;
 
     hpux11*)
-      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+      if test yes,no = "$GCC,$with_gnu_ld"; then
 	case $host_cpu in
 	hppa*64*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	ia64*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	esac
       else
 	case $host_cpu in
 	hppa*64*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	ia64*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
 	m4_if($1, [], [
@@ -5223,14 +5736,14 @@ _LT_EOF
 	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
 	  _LT_LINKER_OPTION([if $CC understands -b],
 	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
-	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
+	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
 	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
-	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
+	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
 	  ;;
 	esac
       fi
-      if test "$with_gnu_ld" = no; then
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      if test no = "$with_gnu_ld"; then
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
 	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
 	case $host_cpu in
@@ -5241,7 +5754,7 @@ _LT_EOF
 	*)
 	  _LT_TAGVAR(hardcode_direct, $1)=yes
 	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
 
 	  # hardcode_minus_L: Not really in the search PATH,
 	  # but as the default location of the library.
@@ -5252,16 +5765,16 @@ _LT_EOF
       ;;
 
     irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      if test yes = "$GCC"; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
 	# Try to use the -exported_symbol ld option, if it does not
 	# work, assume that -exports_file does not work either and
 	# implicitly export all symbols.
 	# This should be the same for all languages, so no per-tag cache variable.
 	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
 	  [lt_cv_irix_exported_symbol],
-	  [save_LDFLAGS="$LDFLAGS"
-	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+	  [save_LDFLAGS=$LDFLAGS
+	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
 	   AC_LINK_IFELSE(
 	     [AC_LANG_SOURCE(
 	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
@@ -5274,21 +5787,32 @@ _LT_EOF
       end]])])],
 	      [lt_cv_irix_exported_symbol=yes],
 	      [lt_cv_irix_exported_symbol=no])
-           LDFLAGS="$save_LDFLAGS"])
-	if test "$lt_cv_irix_exported_symbol" = yes; then
-          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+           LDFLAGS=$save_LDFLAGS])
+	if test yes = "$lt_cv_irix_exported_symbol"; then
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
 	fi
+	_LT_TAGVAR(link_all_deplibs, $1)=no
       else
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
       fi
       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
       _LT_TAGVAR(inherit_rpath, $1)=yes
       _LT_TAGVAR(link_all_deplibs, $1)=yes
       ;;
 
+    linux*)
+      case $cc_basename in
+      tcc*)
+	# Fabrice Bellard et al's Tiny C Compiler
+	_LT_TAGVAR(ld_shlibs, $1)=yes
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+      esac
+      ;;
+
     netbsd* | netbsdelf*-gnu)
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
@@ -5303,7 +5827,7 @@ _LT_EOF
     newsos6)
       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
       _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
@@ -5311,27 +5835,19 @@ _LT_EOF
     *nto* | *qnx*)
       ;;
 
-    openbsd*)
+    openbsd* | bitrig*)
       if test -f /usr/libexec/ld.so; then
 	_LT_TAGVAR(hardcode_direct, $1)=yes
 	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
 	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
 	else
-	  case $host_os in
-	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
-	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	     ;;
-	   *)
-	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	     ;;
-	  esac
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
 	fi
       else
 	_LT_TAGVAR(ld_shlibs, $1)=no
@@ -5342,33 +5858,53 @@ _LT_EOF
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
       _LT_TAGVAR(hardcode_minus_L, $1)=yes
       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      shrext_cmds=.dll
+      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	$ECHO EXPORTS >> $output_objdir/$libname.def~
+	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	emximp -o $lib $output_objdir/$libname.def'
+      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	$ECHO EXPORTS >> $output_objdir/$libname.def~
+	prefix_cmds="$SED"~
+	if test EXPORTS = "`$SED 1q $export_symbols`"; then
+	  prefix_cmds="$prefix_cmds -e 1d";
+	fi~
+	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	emximp -o $lib $output_objdir/$libname.def'
+      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
       ;;
 
     osf3*)
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      if test yes = "$GCC"; then
+	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
       else
 	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
       fi
       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
       ;;
 
     osf4* | osf5*)	# as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      if test yes = "$GCC"; then
+	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
       else
 	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
 	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
-	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+          $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
 
 	# Both c and cxx compiler support -rpath directly
 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
@@ -5379,24 +5915,24 @@ _LT_EOF
 
     solaris*)
       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
-      if test "$GCC" = yes; then
-	wlarc='${wl}'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+	wlarc='$wl'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
 	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+          $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
       else
 	case `$CC -V 2>&1` in
 	*"Compilers 5.0"*)
 	  wlarc=''
-	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
 	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
 	  ;;
 	*)
-	  wlarc='${wl}'
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	  wlarc='$wl'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
 	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
 	  ;;
 	esac
       fi
@@ -5406,11 +5942,11 @@ _LT_EOF
       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
       *)
 	# The compiler driver will combine and reorder linker options,
-	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but understands '-z linker_flag'.  GCC discards it without '$wl',
 	# but is careful enough not to reorder.
 	# Supported since Solaris 2.6 (maybe 2.5.1?)
-	if test "$GCC" = yes; then
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	if test yes = "$GCC"; then
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
 	else
 	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
 	fi
@@ -5420,10 +5956,10 @@ _LT_EOF
       ;;
 
     sunos4*)
-      if test "x$host_vendor" = xsequent; then
+      if test sequent = "$host_vendor"; then
 	# Use $CC to link under sequent, because it throws in some extra .o
 	# files that make .init and .fini sections work.
-	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
       else
 	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
       fi
@@ -5472,43 +6008,43 @@ _LT_EOF
       ;;
 
     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
-      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       fi
       ;;
 
     sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
+      # Note: We CANNOT use -z defs as we might desire, because we do not
       # link with -lc, and that would cause any symbols used from libc to
       # always be unresolved, which means just about no library would
       # ever link correctly.  If we're not using GNU ld we use -z text
       # though, which does catch some bad symbols but isn't as heavy-handed
       # as -z defs.
-      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
+      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
       _LT_TAGVAR(link_all_deplibs, $1)=yes
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
       runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       fi
       ;;
 
@@ -5523,17 +6059,17 @@ _LT_EOF
       ;;
     esac
 
-    if test x$host_vendor = xsni; then
+    if test sni = "$host_vendor"; then
       case $host in
       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
 	;;
       esac
     fi
   fi
 ])
 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
 
 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
 
@@ -5550,7 +6086,7 @@ x|xyes)
   # Assume -lc should be added
   _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
+  if test yes,yes = "$GCC,$enable_shared"; then
     case $_LT_TAGVAR(archive_cmds, $1) in
     *'~'*)
       # FIXME: we may have to deal with multi-command sequences.
@@ -5627,18 +6163,15 @@ _LT_TAGDECL([], [no_undefined_flag], [1],
 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
     [Flag to hardcode $libdir into a binary during linking.
     This must work even if $libdir does not exist])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
-    [[If ld is used when linking, flag to hardcode $libdir into a binary
-    during linking.  This must work even if $libdir does not exist]])
 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
     [Whether we need a single "-rpath" flag with a separated argument])
 _LT_TAGDECL([], [hardcode_direct], [0],
-    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
     DIR into the resulting binary])
 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
-    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
     DIR into the resulting binary and the resulting library dependency is
-    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
+    "absolute", i.e impossible to change by setting $shlibpath_var if the
     library is relocated])
 _LT_TAGDECL([], [hardcode_minus_L], [0],
     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
@@ -5679,10 +6212,10 @@ dnl    [Compiler flag to generate thread safe objects])
 # ------------------------
 # Ensure that the configuration variables for a C compiler are suitably
 # defined.  These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
+# the compiler configuration to 'libtool'.
 m4_defun([_LT_LANG_C_CONFIG],
 [m4_require([_LT_DECL_EGREP])dnl
-lt_save_CC="$CC"
+lt_save_CC=$CC
 AC_LANG_PUSH(C)
 
 # Source file extension for C test sources.
@@ -5722,18 +6255,18 @@ if test -n "$compiler"; then
   LT_SYS_DLOPEN_SELF
   _LT_CMD_STRIPLIB
 
-  # Report which library types will actually be built
+  # Report what library types will actually be built
   AC_MSG_CHECKING([if libtool supports shared libraries])
   AC_MSG_RESULT([$can_build_shared])
 
   AC_MSG_CHECKING([whether to build shared libraries])
-  test "$can_build_shared" = "no" && enable_shared=no
+  test no = "$can_build_shared" && enable_shared=no
 
   # On AIX, shared libraries and static libraries use the same namespace, and
   # are all built from PIC.
   case $host_os in
   aix3*)
-    test "$enable_shared" = yes && enable_static=no
+    test yes = "$enable_shared" && enable_static=no
     if test -n "$RANLIB"; then
       archive_cmds="$archive_cmds~\$RANLIB \$lib"
       postinstall_cmds='$RANLIB $lib'
@@ -5741,8 +6274,12 @@ if test -n "$compiler"; then
     ;;
 
   aix[[4-9]]*)
-    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-      test "$enable_shared" = yes && enable_static=no
+    if test ia64 != "$host_cpu"; then
+      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+      yes,aix,yes) ;;			# shared object as lib.so file only
+      yes,svr4,*) ;;			# shared object as lib.so archive member only
+      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
+      esac
     fi
     ;;
   esac
@@ -5750,13 +6287,13 @@ if test -n "$compiler"; then
 
   AC_MSG_CHECKING([whether to build static libraries])
   # Make sure either enable_shared or enable_static is yes.
-  test "$enable_shared" = yes || enable_static=yes
+  test yes = "$enable_shared" || enable_static=yes
   AC_MSG_RESULT([$enable_static])
 
   _LT_CONFIG($1)
 fi
 AC_LANG_POP
-CC="$lt_save_CC"
+CC=$lt_save_CC
 ])# _LT_LANG_C_CONFIG
 
 
@@ -5764,14 +6301,14 @@ CC="$lt_save_CC"
 # --------------------------
 # Ensure that the configuration variables for a C++ compiler are suitably
 # defined.  These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
+# the compiler configuration to 'libtool'.
 m4_defun([_LT_LANG_CXX_CONFIG],
 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_DECL_EGREP])dnl
 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-    (test "X$CXX" != "Xg++"))) ; then
+if test -n "$CXX" && ( test no != "$CXX" &&
+    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
+    (test g++ != "$CXX"))); then
   AC_PROG_CXXCPP
 else
   _lt_caught_CXX_error=yes
@@ -5787,7 +6324,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 _LT_TAGVAR(hardcode_direct, $1)=no
 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 _LT_TAGVAR(hardcode_libdir_separator, $1)=
 _LT_TAGVAR(hardcode_minus_L, $1)=no
 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
@@ -5814,7 +6350,7 @@ _LT_TAGVAR(objext, $1)=$objext
 # the CXX compiler isn't working.  Some variables (like enable_shared)
 # are currently assumed to apply to all compilers on this platform,
 # and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_caught_CXX_error" != yes; then
+if test yes != "$_lt_caught_CXX_error"; then
   # Code to be used in simple compile tests
   lt_simple_compile_test_code="int some_variable = 0;"
 
@@ -5856,35 +6392,35 @@ if test "$_lt_caught_CXX_error" != yes; then
   if test -n "$compiler"; then
     # We don't want -fno-exception when compiling C++ code, so set the
     # no_builtin_flag separately
-    if test "$GXX" = yes; then
+    if test yes = "$GXX"; then
       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
     else
       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
     fi
 
-    if test "$GXX" = yes; then
+    if test yes = "$GXX"; then
       # Set up default GNU C++ configuration
 
       LT_PATH_LD
 
       # Check if GNU C++ uses GNU ld as the underlying linker, since the
       # archiving commands below assume that GNU ld is being used.
-      if test "$with_gnu_ld" = yes; then
-        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      if test yes = "$with_gnu_ld"; then
+        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
 
         # If archive_cmds runs LD, not CC, wlarc should be empty
         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
         #     investigate it a little bit more. (MM)
-        wlarc='${wl}'
+        wlarc='$wl'
 
         # ancient GNU ld didn't support --whole-archive et. al.
         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
 	  $GREP 'no-whole-archive' > /dev/null; then
-          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
         else
           _LT_TAGVAR(whole_archive_flag_spec, $1)=
         fi
@@ -5920,18 +6456,30 @@ if test "$_lt_caught_CXX_error" != yes; then
         _LT_TAGVAR(ld_shlibs, $1)=no
         ;;
       aix[[4-9]]*)
-        if test "$host_cpu" = ia64; then
+        if test ia64 = "$host_cpu"; then
           # On IA64, the linker does run time linking by default, so we don't
           # have to do anything special.
           aix_use_runtimelinking=no
           exp_sym_flag='-Bexport'
-          no_entry_flag=""
+          no_entry_flag=
         else
           aix_use_runtimelinking=no
 
           # Test if we are trying to use run time linking or normal
           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-          # need to do runtime linking.
+          # have runtime linking enabled, and use it for executables.
+          # For shared libraries, we enable/disable runtime linking
+          # depending on the kind of the shared library created -
+          # when "with_aix_soname,aix_use_runtimelinking" is:
+          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
+          # "aix,yes"  lib.so          shared, rtl:yes, for executables
+          #            lib.a           static archive
+          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
+          #            lib.a(lib.so.V) shared, rtl:no,  for executables
+          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+          #            lib.a(lib.so.V) shared, rtl:no
+          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
+          #            lib.a           static archive
           case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
 	    for ld_flag in $LDFLAGS; do
 	      case $ld_flag in
@@ -5941,6 +6489,13 @@ if test "$_lt_caught_CXX_error" != yes; then
 	        ;;
 	      esac
 	    done
+	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
+	      # so we don't have lib.a shared libs to link our executables.
+	      # We have to force runtime linking in this case.
+	      aix_use_runtimelinking=yes
+	      LDFLAGS="$LDFLAGS -Wl,-brtl"
+	    fi
 	    ;;
           esac
 
@@ -5959,13 +6514,21 @@ if test "$_lt_caught_CXX_error" != yes; then
         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
         _LT_TAGVAR(link_all_deplibs, $1)=yes
-        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
+        case $with_aix_soname,$aix_use_runtimelinking in
+        aix,*) ;;	# no import file
+        svr4,* | *,yes) # use import file
+          # The Import File defines what to hardcode.
+          _LT_TAGVAR(hardcode_direct, $1)=no
+          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+          ;;
+        esac
 
-        if test "$GXX" = yes; then
+        if test yes = "$GXX"; then
           case $host_os in aix4.[[012]]|aix4.[[012]].*)
           # We only want to do this on AIX 4.2 and lower, the check
           # below for broken collect2 doesn't work under 4.3+
-	  collect2name=`${CC} -print-prog-name=collect2`
+	  collect2name=`$CC -print-prog-name=collect2`
 	  if test -f "$collect2name" &&
 	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
 	  then
@@ -5983,64 +6546,84 @@ if test "$_lt_caught_CXX_error" != yes; then
 	  fi
           esac
           shared_flag='-shared'
-	  if test "$aix_use_runtimelinking" = yes; then
-	    shared_flag="$shared_flag "'${wl}-G'
+	  if test yes = "$aix_use_runtimelinking"; then
+	    shared_flag=$shared_flag' $wl-G'
 	  fi
+	  # Need to ensure runtime linking is disabled for the traditional
+	  # shared library, or the linker may eventually find shared libraries
+	  # /with/ Import File - we do not want to mix them.
+	  shared_flag_aix='-shared'
+	  shared_flag_svr4='-shared $wl-G'
         else
           # not using gcc
-          if test "$host_cpu" = ia64; then
+          if test ia64 = "$host_cpu"; then
 	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 	  # chokes on -Wl,-G. The following line is correct:
 	  shared_flag='-G'
           else
-	    if test "$aix_use_runtimelinking" = yes; then
-	      shared_flag='${wl}-G'
+	    if test yes = "$aix_use_runtimelinking"; then
+	      shared_flag='$wl-G'
 	    else
-	      shared_flag='${wl}-bM:SRE'
+	      shared_flag='$wl-bM:SRE'
 	    fi
+	    shared_flag_aix='$wl-bM:SRE'
+	    shared_flag_svr4='$wl-G'
           fi
         fi
 
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
         # It seems that -bexpall does not export symbols beginning with
         # underscore (_), so it is better to generate a list of symbols to
 	# export.
         _LT_TAGVAR(always_export_symbols, $1)=yes
-        if test "$aix_use_runtimelinking" = yes; then
+	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
           # Warning - without using the other runtime loading flags (-brtl),
           # -berok will link without error, but may produce a broken library.
-          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+          # The "-G" linker flag allows undefined symbols.
+          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
           # Determine the default libpath from the value encoded in an empty
           # executable.
           _LT_SYS_MODULE_PATH_AIX([$1])
-          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
 
-          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
         else
-          if test "$host_cpu" = ia64; then
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+          if test ia64 = "$host_cpu"; then
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
 	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
           else
 	    # Determine the default libpath from the value encoded in an
 	    # empty executable.
 	    _LT_SYS_MODULE_PATH_AIX([$1])
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
 	    # Warning - without using the other run time loading flags,
 	    # -berok will link without error, but may produce a broken library.
-	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-	    if test "$with_gnu_ld" = yes; then
+	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
+	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
+	    if test yes = "$with_gnu_ld"; then
 	      # We only use this code for GNU lds that support --whole-archive.
-	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
 	    else
 	      # Exported symbols can be pulled into shared objects from archives
 	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
 	    fi
 	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-	    # This is similar to how AIX traditionally builds its shared
-	    # libraries.
-	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+	    # -brtl affects multiple linker settings, -berok does not and is overridden later
+	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
+	    if test svr4 != "$with_aix_soname"; then
+	      # This is similar to how AIX traditionally builds its shared
+	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
+	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+	    fi
+	    if test aix != "$with_aix_soname"; then
+	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# [...]
+	    else
+	      # used by -dlpreopen to get the symbols
+	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
+	    fi
+	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
           fi
         fi
         ;;
@@ -6050,7 +6633,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 	  # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
 	  # support --undefined.  This deserves some investigation.  FIXME
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
 	else
 	  _LT_TAGVAR(ld_shlibs, $1)=no
 	fi
@@ -6078,57 +6661,58 @@ if test "$_lt_caught_CXX_error" != yes; then
 	  # Tell ltmain to make .lib files, not .a files.
 	  libext=lib
 	  # Tell ltmain to make .dll files, not .so files.
-	  shrext_cmds=".dll"
+	  shrext_cmds=.dll
 	  # FIXME: Setting linknames here is a bad hack.
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
-	    else
-	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
-	    fi~
-	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
-	    linknames='
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+              cp "$export_symbols" "$output_objdir/$soname.def";
+              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+            else
+              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+            fi~
+            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+            linknames='
 	  # The linker will not automatically build a static lib if we build a DLL.
 	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
 	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 	  # Don't use ranlib
 	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
 	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
-	    lt_tool_outputfile="@TOOL_OUTPUT@"~
-	    case $lt_outputfile in
-	      *.exe|*.EXE) ;;
-	      *)
-		lt_outputfile="$lt_outputfile.exe"
-		lt_tool_outputfile="$lt_tool_outputfile.exe"
-		;;
-	    esac~
-	    func_to_tool_file "$lt_outputfile"~
-	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
-	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
-	      $RM "$lt_outputfile.manifest";
-	    fi'
+            lt_tool_outputfile="@TOOL_OUTPUT@"~
+            case $lt_outputfile in
+              *.exe|*.EXE) ;;
+              *)
+                lt_outputfile=$lt_outputfile.exe
+                lt_tool_outputfile=$lt_tool_outputfile.exe
+                ;;
+            esac~
+            func_to_tool_file "$lt_outputfile"~
+            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+              $RM "$lt_outputfile.manifest";
+            fi'
 	  ;;
 	*)
 	  # g++
 	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 	  # as there is no search path for DLLs.
 	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
 	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 	  _LT_TAGVAR(always_export_symbols, $1)=no
 	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
 	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-	    # If the export-symbols file already is a .def file (1st line
-	    # is EXPORTS), use it as is; otherwise, prepend...
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	      cp $export_symbols $output_objdir/$soname.def;
-	    else
-	      echo EXPORTS > $output_objdir/$soname.def;
-	      cat $export_symbols >> $output_objdir/$soname.def;
-	    fi~
-	    $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	    # If the export-symbols file already is a .def file, use it as
+	    # is; otherwise, prepend EXPORTS...
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+              cp $export_symbols $output_objdir/$soname.def;
+            else
+              echo EXPORTS > $output_objdir/$soname.def;
+              cat $export_symbols >> $output_objdir/$soname.def;
+            fi~
+            $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
 	  else
 	    _LT_TAGVAR(ld_shlibs, $1)=no
 	  fi
@@ -6139,6 +6723,34 @@ if test "$_lt_caught_CXX_error" != yes; then
         _LT_DARWIN_LINKER_FEATURES($1)
 	;;
 
+      os2*)
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	_LT_TAGVAR(hardcode_minus_L, $1)=yes
+	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	shrext_cmds=.dll
+	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	  $ECHO EXPORTS >> $output_objdir/$libname.def~
+	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	  emximp -o $lib $output_objdir/$libname.def'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	  $ECHO EXPORTS >> $output_objdir/$libname.def~
+	  prefix_cmds="$SED"~
+	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
+	    prefix_cmds="$prefix_cmds -e 1d";
+	  fi~
+	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	  emximp -o $lib $output_objdir/$libname.def'
+	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+	;;
+
       dgux*)
         case $cc_basename in
           ec++*)
@@ -6157,7 +6769,7 @@ if test "$_lt_caught_CXX_error" != yes; then
         esac
         ;;
 
-      freebsd[[12]]*)
+      freebsd2.*)
         # C++ shared libraries reported to be fairly broken before
 	# switch to ELF
         _LT_TAGVAR(ld_shlibs, $1)=no
@@ -6173,18 +6785,15 @@ if test "$_lt_caught_CXX_error" != yes; then
         _LT_TAGVAR(ld_shlibs, $1)=yes
         ;;
 
-      gnu*)
-        ;;
-
       haiku*)
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
         _LT_TAGVAR(link_all_deplibs, $1)=yes
         ;;
 
       hpux9*)
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
         _LT_TAGVAR(hardcode_direct, $1)=yes
         _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 				             # but as the default
@@ -6196,7 +6805,7 @@ if test "$_lt_caught_CXX_error" != yes; then
             _LT_TAGVAR(ld_shlibs, $1)=no
             ;;
           aCC*)
-            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
             # Commands to make compiler produce verbose output that lists
             # what "hidden" libraries, object files and flags are used when
             # linking a shared library.
@@ -6205,11 +6814,11 @@ if test "$_lt_caught_CXX_error" != yes; then
             # explicitly linking system object files so we need to strip them
             # from the output so that they don't get included in the library
             # dependencies.
-            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
             ;;
           *)
-            if test "$GXX" = yes; then
-              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            if test yes = "$GXX"; then
+              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
             else
               # FIXME: insert proper C++ library support
               _LT_TAGVAR(ld_shlibs, $1)=no
@@ -6219,15 +6828,15 @@ if test "$_lt_caught_CXX_error" != yes; then
         ;;
 
       hpux10*|hpux11*)
-        if test $with_gnu_ld = no; then
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+        if test no = "$with_gnu_ld"; then
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
 	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
           case $host_cpu in
             hppa*64*|ia64*)
               ;;
             *)
-	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
               ;;
           esac
         fi
@@ -6253,13 +6862,13 @@ if test "$_lt_caught_CXX_error" != yes; then
           aCC*)
 	    case $host_cpu in
 	      hppa*64*)
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	        ;;
 	      ia64*)
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	        ;;
 	      *)
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	        ;;
 	    esac
 	    # Commands to make compiler produce verbose output that lists
@@ -6270,20 +6879,20 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    # explicitly linking system object files so we need to strip them
 	    # from the output so that they don't get included in the library
 	    # dependencies.
-	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
 	    ;;
           *)
-	    if test "$GXX" = yes; then
-	      if test $with_gnu_ld = no; then
+	    if test yes = "$GXX"; then
+	      if test no = "$with_gnu_ld"; then
 	        case $host_cpu in
 	          hppa*64*)
-	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	            ;;
 	          ia64*)
-	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	            ;;
 	          *)
-	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	            ;;
 	        esac
 	      fi
@@ -6298,22 +6907,22 @@ if test "$_lt_caught_CXX_error" != yes; then
       interix[[3-9]]*)
 	_LT_TAGVAR(hardcode_direct, $1)=no
 	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
 	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
 	# Instead, shared libraries are loaded at an image base (0x10000000 by
 	# default) and relocated if they conflict, which is a slow very memory
 	# consuming and fragmenting process.  To avoid this, we pick a random,
 	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
 	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
 	;;
       irix5* | irix6*)
         case $cc_basename in
           CC*)
 	    # SGI C++
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
 
 	    # Archives containing C++ object files must be created using
 	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
@@ -6322,22 +6931,22 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
 	    ;;
           *)
-	    if test "$GXX" = yes; then
-	      if test "$with_gnu_ld" = no; then
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	    if test yes = "$GXX"; then
+	      if test no = "$with_gnu_ld"; then
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
 	      else
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
 	      fi
 	    fi
 	    _LT_TAGVAR(link_all_deplibs, $1)=yes
 	    ;;
         esac
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
         _LT_TAGVAR(inherit_rpath, $1)=yes
         ;;
 
-      linux* | k*bsd*-gnu | kopensolaris*-gnu)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
         case $cc_basename in
           KCC*)
 	    # Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -6345,8 +6954,8 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    # KCC will only create a shared library if the output file
 	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
 	    # to its proper name (with version) after linking.
-	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
 	    # Commands to make compiler produce verbose output that lists
 	    # what "hidden" libraries, object files and flags are used when
 	    # linking a shared library.
@@ -6355,10 +6964,10 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    # explicitly linking system object files so we need to strip them
 	    # from the output so that they don't get included in the library
 	    # dependencies.
-	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
 
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
 
 	    # Archives containing C++ object files must be created using
 	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
@@ -6372,59 +6981,59 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    # earlier do not add the objects themselves.
 	    case `$CC -V 2>&1` in
 	      *"Version 7."*)
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 		;;
 	      *)  # Version 8.0 or newer
 	        tmp_idyn=
 	        case $host_cpu in
 		  ia64*) tmp_idyn=' -i_dynamic';;
 		esac
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 		;;
 	    esac
 	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
 	    ;;
           pgCC* | pgcpp*)
             # Portland Group C++ compiler
 	    case `$CC -V` in
 	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
 	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
-		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
+               rm -rf $tpldir~
+               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
 	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
-		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
-		$RANLIB $oldlib'
+                rm -rf $tpldir~
+                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+                $RANLIB $oldlib'
 	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+                rm -rf $tpldir~
+                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
 	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+                rm -rf $tpldir~
+                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 	      ;;
 	    *) # Version 6 and above use weak symbols
-	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 	      ;;
 	    esac
 
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
             ;;
 	  cxx*)
 	    # Compaq C++
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname  -o $lib $wl-retain-symbols-file $wl$export_symbols'
 
 	    runpath_var=LD_RUN_PATH
 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
@@ -6438,18 +7047,18 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    # explicitly linking system object files so we need to strip them
 	    # from the output so that they don't get included in the library
 	    # dependencies.
-	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
 	    ;;
 	  xl* | mpixl* | bgxl*)
 	    # IBM XL 8.0 on PPC, with GNU ld
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	    if test "x$supports_anon_versioning" = xyes; then
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	    if test yes = "$supports_anon_versioning"; then
 	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-		echo "local: *; };" >> $output_objdir/$libname.ver~
-		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+                echo "local: *; };" >> $output_objdir/$libname.ver~
+                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
 	    fi
 	    ;;
 	  *)
@@ -6457,10 +7066,10 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    *Sun\ C*)
 	      # Sun C++ 5.9
 	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
-	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+	      _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
 	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
 	      _LT_TAGVAR(compiler_needs_object, $1)=yes
 
 	      # Not sure whether something based on
@@ -6518,22 +7127,17 @@ if test "$_lt_caught_CXX_error" != yes; then
         _LT_TAGVAR(ld_shlibs, $1)=yes
 	;;
 
-      openbsd2*)
-        # C++ shared libraries are fairly broken
-	_LT_TAGVAR(ld_shlibs, $1)=no
-	;;
-
-      openbsd*)
+      openbsd* | bitrig*)
 	if test -f /usr/libexec/ld.so; then
 	  _LT_TAGVAR(hardcode_direct, $1)=yes
 	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
 	  fi
 	  output_verbose_link_cmd=func_echo_all
 	else
@@ -6549,9 +7153,9 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    # KCC will only create a shared library if the output file
 	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
 	    # to its proper name (with version) after linking.
-	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
 	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
 	    # Archives containing C++ object files must be created using
@@ -6569,17 +7173,17 @@ if test "$_lt_caught_CXX_error" != yes; then
           cxx*)
 	    case $host in
 	      osf3*)
-	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
-	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
 		;;
 	      *)
 	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
 	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
-	          echo "-hidden">> $lib.exp~
-	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
-	          $RM $lib.exp'
+                  echo "-hidden">> $lib.exp~
+                  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
+                  $RM $lib.exp'
 	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 		;;
 	    esac
@@ -6594,21 +7198,21 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    # explicitly linking system object files so we need to strip them
 	    # from the output so that they don't get included in the library
 	    # dependencies.
-	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
 	    ;;
 	  *)
-	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	    if test yes,no = "$GXX,$with_gnu_ld"; then
+	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
 	      case $host in
 	        osf3*)
-	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
 		  ;;
 	        *)
-	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
 		  ;;
 	      esac
 
-	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
 	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
 	      # Commands to make compiler produce verbose output that lists
@@ -6654,9 +7258,9 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    # Sun C++ 4.2, 5.x and Centerline C++
             _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
 	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+              $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -6664,7 +7268,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 	      *)
 		# The compiler driver will combine and reorder linker options,
-		# but understands `-z linker_flag'.
+		# but understands '-z linker_flag'.
 	        # Supported since Solaris 2.6 (maybe 2.5.1?)
 		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
 	        ;;
@@ -6681,30 +7285,30 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    ;;
           gcx*)
 	    # Green Hills C++ Compiler
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
 
 	    # The C++ compiler must be used to create the archive.
 	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
 	    ;;
           *)
 	    # GNU C++ compiler with Solaris linker
-	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+	    if test yes,no = "$GXX,$with_gnu_ld"; then
+	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
 	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
 	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+                  $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
 	        # Commands to make compiler produce verbose output that lists
 	        # what "hidden" libraries, object files and flags are used when
 	        # linking a shared library.
 	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 	      else
-	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
+	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
 	        # platform.
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
 	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+                  $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
 	        # Commands to make compiler produce verbose output that lists
 	        # what "hidden" libraries, object files and flags are used when
@@ -6712,11 +7316,11 @@ if test "$_lt_caught_CXX_error" != yes; then
 	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 	      fi
 
-	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
 	      case $host_os in
 		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 		*)
-		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
 		  ;;
 	      esac
 	    fi
@@ -6725,52 +7329,52 @@ if test "$_lt_caught_CXX_error" != yes; then
         ;;
 
     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
-      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       runpath_var='LD_RUN_PATH'
 
       case $cc_basename in
         CC*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
       esac
       ;;
 
       sysv5* | sco3.2v5* | sco5v6*)
-	# Note: We can NOT use -z defs as we might desire, because we do not
+	# Note: We CANNOT use -z defs as we might desire, because we do not
 	# link with -lc, and that would cause any symbols used from libc to
 	# always be unresolved, which means just about no library would
 	# ever link correctly.  If we're not using GNU ld we use -z text
 	# though, which does catch some bad symbols but isn't as heavy-handed
 	# as -z defs.
-	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
+	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
 	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
 	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
 	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
 	_LT_TAGVAR(link_all_deplibs, $1)=yes
-	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
 	runpath_var='LD_RUN_PATH'
 
 	case $cc_basename in
           CC*)
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
-	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
+              '"$_LT_TAGVAR(old_archive_cmds, $1)"
 	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
-	      '"$_LT_TAGVAR(reload_cmds, $1)"
+              '"$_LT_TAGVAR(reload_cmds, $1)"
 	    ;;
 	  *)
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 	    ;;
 	esac
       ;;
@@ -6801,10 +7405,10 @@ if test "$_lt_caught_CXX_error" != yes; then
     esac
 
     AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
 
-    _LT_TAGVAR(GCC, $1)="$GXX"
-    _LT_TAGVAR(LD, $1)="$LD"
+    _LT_TAGVAR(GCC, $1)=$GXX
+    _LT_TAGVAR(LD, $1)=$LD
 
     ## CAVEAT EMPTOR:
     ## There is no encapsulation within the following macros, do not change
@@ -6831,7 +7435,7 @@ if test "$_lt_caught_CXX_error" != yes; then
   lt_cv_path_LD=$lt_save_path_LD
   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-fi # test "$_lt_caught_CXX_error" != yes
+fi # test yes != "$_lt_caught_CXX_error"
 
 AC_LANG_POP
 ])# _LT_LANG_CXX_CONFIG
@@ -6853,13 +7457,14 @@ AC_REQUIRE([_LT_DECL_SED])
 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
 func_stripname_cnf ()
 {
-  case ${2} in
-  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
-  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+  case @S|@2 in
+  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
+  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
   esac
 } # func_stripname_cnf
 ])# _LT_FUNC_STRIPNAME_CNF
 
+
 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
 # ---------------------------------
 # Figure out "hidden" library dependencies from verbose
@@ -6918,12 +7523,18 @@ public class foo {
   }
 };
 _LT_EOF
+], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
+package foo
+func foo() {
+}
+_LT_EOF
 ])
 
 _lt_libdeps_save_CFLAGS=$CFLAGS
 case "$CC $CFLAGS " in #(
 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
 esac
 
 dnl Parse the compiler output and extract the necessary
@@ -6937,13 +7548,13 @@ if AC_TRY_EVAL(ac_compile); then
   pre_test_object_deps_done=no
 
   for p in `eval "$output_verbose_link_cmd"`; do
-    case ${prev}${p} in
+    case $prev$p in
 
     -L* | -R* | -l*)
        # Some compilers place space between "-{L,R}" and the path.
        # Remove the space.
-       if test $p = "-L" ||
-          test $p = "-R"; then
+       if test x-L = "$p" ||
+          test x-R = "$p"; then
 	 prev=$p
 	 continue
        fi
@@ -6959,16 +7570,16 @@ if AC_TRY_EVAL(ac_compile); then
        case $p in
        =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
        esac
-       if test "$pre_test_object_deps_done" = no; then
-	 case ${prev} in
+       if test no = "$pre_test_object_deps_done"; then
+	 case $prev in
 	 -L | -R)
 	   # Internal compiler library paths should come after those
 	   # provided the user.  The postdeps already come after the
 	   # user supplied libs so there is no need to process them.
 	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
-	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
 	   else
-	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
 	   fi
 	   ;;
 	 # The "-l" case would never come before the object being
@@ -6976,9 +7587,9 @@ if AC_TRY_EVAL(ac_compile); then
 	 esac
        else
 	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
-	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
+	   _LT_TAGVAR(postdeps, $1)=$prev$p
 	 else
-	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
+	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
 	 fi
        fi
        prev=
@@ -6993,15 +7604,15 @@ if AC_TRY_EVAL(ac_compile); then
 	 continue
        fi
 
-       if test "$pre_test_object_deps_done" = no; then
+       if test no = "$pre_test_object_deps_done"; then
 	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
-	   _LT_TAGVAR(predep_objects, $1)="$p"
+	   _LT_TAGVAR(predep_objects, $1)=$p
 	 else
 	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
 	 fi
        else
 	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
-	   _LT_TAGVAR(postdep_objects, $1)="$p"
+	   _LT_TAGVAR(postdep_objects, $1)=$p
 	 else
 	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
 	 fi
@@ -7032,51 +7643,6 @@ interix[[3-9]]*)
   _LT_TAGVAR(postdep_objects,$1)=
   _LT_TAGVAR(postdeps,$1)=
   ;;
-
-linux*)
-  case `$CC -V 2>&1 | sed 5q` in
-  *Sun\ C*)
-    # Sun C++ 5.9
-
-    # The more standards-conforming stlport4 library is
-    # incompatible with the Cstd library. Avoid specifying
-    # it if it's in CXXFLAGS. Ignore libCrun as
-    # -library=stlport4 depends on it.
-    case " $CXX $CXXFLAGS " in
-    *" -library=stlport4 "*)
-      solaris_use_stlport4=yes
-      ;;
-    esac
-
-    if test "$solaris_use_stlport4" != yes; then
-      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
-    fi
-    ;;
-  esac
-  ;;
-
-solaris*)
-  case $cc_basename in
-  CC* | sunCC*)
-    # The more standards-conforming stlport4 library is
-    # incompatible with the Cstd library. Avoid specifying
-    # it if it's in CXXFLAGS. Ignore libCrun as
-    # -library=stlport4 depends on it.
-    case " $CXX $CXXFLAGS " in
-    *" -library=stlport4 "*)
-      solaris_use_stlport4=yes
-      ;;
-    esac
-
-    # Adding this requires a known-good setup of shared libraries for
-    # Sun compiler versions before 5.6, else PIC objects from an old
-    # archive will be linked into the output, leading to subtle bugs.
-    if test "$solaris_use_stlport4" != yes; then
-      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
-    fi
-    ;;
-  esac
-  ;;
 esac
 ])
 
@@ -7085,7 +7651,7 @@ case " $_LT_TAGVAR(postdeps, $1) " in
 esac
  _LT_TAGVAR(compiler_lib_search_dirs, $1)=
 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
 fi
 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
     [The directories searched by this compiler when creating a shared library])
@@ -7105,10 +7671,10 @@ _LT_TAGDECL([], [compiler_lib_search_path], [1],
 # --------------------------
 # Ensure that the configuration variables for a Fortran 77 compiler are
 # suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
+# to write the compiler configuration to 'libtool'.
 m4_defun([_LT_LANG_F77_CONFIG],
 [AC_LANG_PUSH(Fortran 77)
-if test -z "$F77" || test "X$F77" = "Xno"; then
+if test -z "$F77" || test no = "$F77"; then
   _lt_disable_F77=yes
 fi
 
@@ -7120,7 +7686,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 _LT_TAGVAR(hardcode_direct, $1)=no
 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 _LT_TAGVAR(hardcode_libdir_separator, $1)=
 _LT_TAGVAR(hardcode_minus_L, $1)=no
 _LT_TAGVAR(hardcode_automatic, $1)=no
@@ -7146,7 +7711,7 @@ _LT_TAGVAR(objext, $1)=$objext
 # the F77 compiler isn't working.  Some variables (like enable_shared)
 # are currently assumed to apply to all compilers on this platform,
 # and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_F77" != yes; then
+if test yes != "$_lt_disable_F77"; then
   # Code to be used in simple compile tests
   lt_simple_compile_test_code="\
       subroutine t
@@ -7168,7 +7733,7 @@ if test "$_lt_disable_F77" != yes; then
   _LT_LINKER_BOILERPLATE
 
   # Allow CC to be a program name with arguments.
-  lt_save_CC="$CC"
+  lt_save_CC=$CC
   lt_save_GCC=$GCC
   lt_save_CFLAGS=$CFLAGS
   CC=${F77-"f77"}
@@ -7182,21 +7747,25 @@ if test "$_lt_disable_F77" != yes; then
     AC_MSG_RESULT([$can_build_shared])
 
     AC_MSG_CHECKING([whether to build shared libraries])
-    test "$can_build_shared" = "no" && enable_shared=no
+    test no = "$can_build_shared" && enable_shared=no
 
     # On AIX, shared libraries and static libraries use the same namespace, and
     # are all built from PIC.
     case $host_os in
       aix3*)
-        test "$enable_shared" = yes && enable_static=no
+        test yes = "$enable_shared" && enable_static=no
         if test -n "$RANLIB"; then
           archive_cmds="$archive_cmds~\$RANLIB \$lib"
           postinstall_cmds='$RANLIB $lib'
         fi
         ;;
       aix[[4-9]]*)
-	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-	  test "$enable_shared" = yes && enable_static=no
+	if test ia64 != "$host_cpu"; then
+	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+	  yes,aix,yes) ;;		# shared object as lib.so file only
+	  yes,svr4,*) ;;		# shared object as lib.so archive member only
+	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
+	  esac
 	fi
         ;;
     esac
@@ -7204,11 +7773,11 @@ if test "$_lt_disable_F77" != yes; then
 
     AC_MSG_CHECKING([whether to build static libraries])
     # Make sure either enable_shared or enable_static is yes.
-    test "$enable_shared" = yes || enable_static=yes
+    test yes = "$enable_shared" || enable_static=yes
     AC_MSG_RESULT([$enable_static])
 
-    _LT_TAGVAR(GCC, $1)="$G77"
-    _LT_TAGVAR(LD, $1)="$LD"
+    _LT_TAGVAR(GCC, $1)=$G77
+    _LT_TAGVAR(LD, $1)=$LD
 
     ## CAVEAT EMPTOR:
     ## There is no encapsulation within the following macros, do not change
@@ -7225,9 +7794,9 @@ if test "$_lt_disable_F77" != yes; then
   fi # test -n "$compiler"
 
   GCC=$lt_save_GCC
-  CC="$lt_save_CC"
-  CFLAGS="$lt_save_CFLAGS"
-fi # test "$_lt_disable_F77" != yes
+  CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
+fi # test yes != "$_lt_disable_F77"
 
 AC_LANG_POP
 ])# _LT_LANG_F77_CONFIG
@@ -7237,11 +7806,11 @@ AC_LANG_POP
 # -------------------------
 # Ensure that the configuration variables for a Fortran compiler are
 # suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
+# to write the compiler configuration to 'libtool'.
 m4_defun([_LT_LANG_FC_CONFIG],
 [AC_LANG_PUSH(Fortran)
 
-if test -z "$FC" || test "X$FC" = "Xno"; then
+if test -z "$FC" || test no = "$FC"; then
   _lt_disable_FC=yes
 fi
 
@@ -7253,7 +7822,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 _LT_TAGVAR(hardcode_direct, $1)=no
 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 _LT_TAGVAR(hardcode_libdir_separator, $1)=
 _LT_TAGVAR(hardcode_minus_L, $1)=no
 _LT_TAGVAR(hardcode_automatic, $1)=no
@@ -7279,7 +7847,7 @@ _LT_TAGVAR(objext, $1)=$objext
 # the FC compiler isn't working.  Some variables (like enable_shared)
 # are currently assumed to apply to all compilers on this platform,
 # and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_FC" != yes; then
+if test yes != "$_lt_disable_FC"; then
   # Code to be used in simple compile tests
   lt_simple_compile_test_code="\
       subroutine t
@@ -7301,7 +7869,7 @@ if test "$_lt_disable_FC" != yes; then
   _LT_LINKER_BOILERPLATE
 
   # Allow CC to be a program name with arguments.
-  lt_save_CC="$CC"
+  lt_save_CC=$CC
   lt_save_GCC=$GCC
   lt_save_CFLAGS=$CFLAGS
   CC=${FC-"f95"}
@@ -7317,21 +7885,25 @@ if test "$_lt_disable_FC" != yes; then
     AC_MSG_RESULT([$can_build_shared])
 
     AC_MSG_CHECKING([whether to build shared libraries])
-    test "$can_build_shared" = "no" && enable_shared=no
+    test no = "$can_build_shared" && enable_shared=no
 
     # On AIX, shared libraries and static libraries use the same namespace, and
     # are all built from PIC.
     case $host_os in
       aix3*)
-        test "$enable_shared" = yes && enable_static=no
+        test yes = "$enable_shared" && enable_static=no
         if test -n "$RANLIB"; then
           archive_cmds="$archive_cmds~\$RANLIB \$lib"
           postinstall_cmds='$RANLIB $lib'
         fi
         ;;
       aix[[4-9]]*)
-	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-	  test "$enable_shared" = yes && enable_static=no
+	if test ia64 != "$host_cpu"; then
+	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+	  yes,aix,yes) ;;		# shared object as lib.so file only
+	  yes,svr4,*) ;;		# shared object as lib.so archive member only
+	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
+	  esac
 	fi
         ;;
     esac
@@ -7339,11 +7911,11 @@ if test "$_lt_disable_FC" != yes; then
 
     AC_MSG_CHECKING([whether to build static libraries])
     # Make sure either enable_shared or enable_static is yes.
-    test "$enable_shared" = yes || enable_static=yes
+    test yes = "$enable_shared" || enable_static=yes
     AC_MSG_RESULT([$enable_static])
 
-    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
-    _LT_TAGVAR(LD, $1)="$LD"
+    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
+    _LT_TAGVAR(LD, $1)=$LD
 
     ## CAVEAT EMPTOR:
     ## There is no encapsulation within the following macros, do not change
@@ -7363,7 +7935,7 @@ if test "$_lt_disable_FC" != yes; then
   GCC=$lt_save_GCC
   CC=$lt_save_CC
   CFLAGS=$lt_save_CFLAGS
-fi # test "$_lt_disable_FC" != yes
+fi # test yes != "$_lt_disable_FC"
 
 AC_LANG_POP
 ])# _LT_LANG_FC_CONFIG
@@ -7373,7 +7945,7 @@ AC_LANG_POP
 # --------------------------
 # Ensure that the configuration variables for the GNU Java Compiler compiler
 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
+# to write the compiler configuration to 'libtool'.
 m4_defun([_LT_LANG_GCJ_CONFIG],
 [AC_REQUIRE([LT_PROG_GCJ])dnl
 AC_LANG_SAVE
@@ -7407,7 +7979,7 @@ CC=${GCJ-"gcj"}
 CFLAGS=$GCJFLAGS
 compiler=$CC
 _LT_TAGVAR(compiler, $1)=$CC
-_LT_TAGVAR(LD, $1)="$LD"
+_LT_TAGVAR(LD, $1)=$LD
 _LT_CC_BASENAME([$compiler])
 
 # GCJ did not exist at the time GCC didn't implicitly link libc in.
@@ -7440,11 +8012,82 @@ CFLAGS=$lt_save_CFLAGS
 ])# _LT_LANG_GCJ_CONFIG
 
 
+# _LT_LANG_GO_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Go compiler
+# are suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to 'libtool'.
+m4_defun([_LT_LANG_GO_CONFIG],
+[AC_REQUIRE([LT_PROG_GO])dnl
+AC_LANG_SAVE
+
+# Source file extension for Go test sources.
+ac_ext=go
+
+# Object file extension for compiled Go test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="package main; func main() { }"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='package main; func main() { }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GOC-"gccgo"}
+CFLAGS=$GOFLAGS
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)=$LD
+_LT_CC_BASENAME([$compiler])
+
+# Go did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+  _LT_COMPILER_NO_RTTI($1)
+  _LT_COMPILER_PIC($1)
+  _LT_COMPILER_C_O($1)
+  _LT_COMPILER_FILE_LOCKS($1)
+  _LT_LINKER_SHLIBS($1)
+  _LT_LINKER_HARDCODE_LIBPATH($1)
+
+  _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_GO_CONFIG
+
+
 # _LT_LANG_RC_CONFIG([TAG])
 # -------------------------
 # Ensure that the configuration variables for the Windows resource compiler
 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
+# to write the compiler configuration to 'libtool'.
 m4_defun([_LT_LANG_RC_CONFIG],
 [AC_REQUIRE([LT_PROG_RC])dnl
 AC_LANG_SAVE
@@ -7460,7 +8103,7 @@ _LT_TAGVAR(objext, $1)=$objext
 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
 
 # Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
+lt_simple_link_test_code=$lt_simple_compile_test_code
 
 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
 _LT_TAG_COMPILER
@@ -7470,7 +8113,7 @@ _LT_COMPILER_BOILERPLATE
 _LT_LINKER_BOILERPLATE
 
 # Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
+lt_save_CC=$CC
 lt_save_CFLAGS=$CFLAGS
 lt_save_GCC=$GCC
 GCC=
@@ -7499,7 +8142,7 @@ AC_DEFUN([LT_PROG_GCJ],
 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
   [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
     [AC_CHECK_TOOL(GCJ, gcj,)
-      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
       AC_SUBST(GCJFLAGS)])])[]dnl
 ])
 
@@ -7509,6 +8152,13 @@ dnl aclocal-1.4 backwards compatibility:
 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
 
 
+# LT_PROG_GO
+# ----------
+AC_DEFUN([LT_PROG_GO],
+[AC_CHECK_TOOL(GOC, gccgo,)
+])
+
+
 # LT_PROG_RC
 # ----------
 AC_DEFUN([LT_PROG_RC],
@@ -7603,7 +8253,7 @@ lt_ac_count=0
 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
 # along with /bin/sed that truncates output.
 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
-  test ! -f $lt_ac_sed && continue
+  test ! -f "$lt_ac_sed" && continue
   cat /dev/null > conftest.in
   lt_ac_count=0
   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
@@ -7620,9 +8270,9 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
     cmp -s conftest.out conftest.nl || break
     # 10000 chars as input seems more than enough
-    test $lt_ac_count -gt 10 && break
+    test 10 -lt "$lt_ac_count" && break
     lt_ac_count=`expr $lt_ac_count + 1`
-    if test $lt_ac_count -gt $lt_ac_max; then
+    if test "$lt_ac_count" -gt "$lt_ac_max"; then
       lt_ac_max=$lt_ac_count
       lt_cv_path_SED=$lt_ac_sed
     fi
@@ -7646,27 +8296,7 @@ dnl AC_DEFUN([LT_AC_PROG_SED], [])
 # Find out whether the shell is Bourne or XSI compatible,
 # or has some other useful features.
 m4_defun([_LT_CHECK_SHELL_FEATURES],
-[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
-  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
-      = c,a/b,b/c, \
-    && eval 'test $(( 1 + 1 )) -eq 2 \
-    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
-  && xsi_shell=yes
-AC_MSG_RESULT([$xsi_shell])
-_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
-
-AC_MSG_CHECKING([whether the shell understands "+="])
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
-    >/dev/null 2>&1 \
-  && lt_shell_append=yes
-AC_MSG_RESULT([$lt_shell_append])
-_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
-
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
   lt_unset=unset
 else
   lt_unset=false
@@ -7690,102 +8320,9 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
 ])# _LT_CHECK_SHELL_FEATURES
 
 
-# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
-# ------------------------------------------------------
-# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
-# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
-m4_defun([_LT_PROG_FUNCTION_REPLACE],
-[dnl {
-sed -e '/^$1 ()$/,/^} # $1 /c\
-$1 ()\
-{\
-m4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
-} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
-  && mv -f "$cfgfile.tmp" "$cfgfile" \
-    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-])
-
-
-# _LT_PROG_REPLACE_SHELLFNS
-# -------------------------
-# Replace existing portable implementations of several shell functions with
-# equivalent extended shell implementations where those features are available..
-m4_defun([_LT_PROG_REPLACE_SHELLFNS],
-[if test x"$xsi_shell" = xyes; then
-  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
-    case ${1} in
-      */*) func_dirname_result="${1%/*}${2}" ;;
-      *  ) func_dirname_result="${3}" ;;
-    esac])
-
-  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
-    func_basename_result="${1##*/}"])
-
-  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
-    case ${1} in
-      */*) func_dirname_result="${1%/*}${2}" ;;
-      *  ) func_dirname_result="${3}" ;;
-    esac
-    func_basename_result="${1##*/}"])
-
-  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
-    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
-    # positional parameters, so assign one to ordinary parameter first.
-    func_stripname_result=${3}
-    func_stripname_result=${func_stripname_result#"${1}"}
-    func_stripname_result=${func_stripname_result%"${2}"}])
-
-  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
-    func_split_long_opt_name=${1%%=*}
-    func_split_long_opt_arg=${1#*=}])
-
-  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
-    func_split_short_opt_arg=${1#??}
-    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
-
-  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
-    case ${1} in
-      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
-      *)    func_lo2o_result=${1} ;;
-    esac])
-
-  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
-
-  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
-
-  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
-fi
-
-if test x"$lt_shell_append" = xyes; then
-  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
-
-  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
-    func_quote_for_eval "${2}"
-dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
-    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
-
-  # Save a `func_append' function call where possible by direct use of '+='
-  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
-    && mv -f "$cfgfile.tmp" "$cfgfile" \
-      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-  test 0 -eq $? || _lt_function_replace_fail=:
-else
-  # Save a `func_append' function call even when '+=' is not available
-  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
-    && mv -f "$cfgfile.tmp" "$cfgfile" \
-      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-  test 0 -eq $? || _lt_function_replace_fail=:
-fi
-
-if test x"$_lt_function_replace_fail" = x":"; then
-  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
-fi
-])
-
 # _LT_PATH_CONVERSION_FUNCTIONS
 # -----------------------------
-# Determine which file name conversion functions should be used by
+# Determine what file name conversion functions should be used by
 # func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
 # for certain cross-compile configurations and native mingw.
 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4
index 17cfd51..94b0829 100644
--- a/m4/ltoptions.m4
+++ b/m4/ltoptions.m4
@@ -1,14 +1,14 @@
 # Helper functions for option handling.                    -*- Autoconf -*-
 #
-#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
-#   Inc.
+#   Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
+#   Foundation, Inc.
 #   Written by Gary V. Vaughan, 2004
 #
 # This file is free software; the Free Software Foundation gives
 # unlimited permission to copy and/or distribute it, with or without
 # modifications, as long as this notice is preserved.
 
-# serial 7 ltoptions.m4
+# serial 8 ltoptions.m4
 
 # This is to help aclocal find these macros, as it can't see m4_define.
 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
@@ -29,7 +29,7 @@ m4_define([_LT_SET_OPTION],
 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
         _LT_MANGLE_DEFUN([$1], [$2]),
-    [m4_warning([Unknown $1 option `$2'])])[]dnl
+    [m4_warning([Unknown $1 option '$2'])])[]dnl
 ])
 
 
@@ -75,13 +75,15 @@ m4_if([$1],[LT_INIT],[
   dnl
   dnl If no reference was made to various pairs of opposing options, then
   dnl we run the default mode handler for the pair.  For example, if neither
-  dnl `shared' nor `disable-shared' was passed, we enable building of shared
+  dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
   dnl archives by default:
   _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
   _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
   _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
   _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
-  		   [_LT_ENABLE_FAST_INSTALL])
+		   [_LT_ENABLE_FAST_INSTALL])
+  _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
+		   [_LT_WITH_AIX_SONAME([aix])])
   ])
 ])# _LT_SET_OPTIONS
 
@@ -112,7 +114,7 @@ AU_DEFUN([AC_LIBTOOL_DLOPEN],
 [_LT_SET_OPTION([LT_INIT], [dlopen])
 AC_DIAGNOSE([obsolete],
 [$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `dlopen' option into LT_INIT's first parameter.])
+put the 'dlopen' option into LT_INIT's first parameter.])
 ])
 
 dnl aclocal-1.4 backwards compatibility:
@@ -148,7 +150,7 @@ AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
 _LT_SET_OPTION([LT_INIT], [win32-dll])
 AC_DIAGNOSE([obsolete],
 [$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `win32-dll' option into LT_INIT's first parameter.])
+put the 'win32-dll' option into LT_INIT's first parameter.])
 ])
 
 dnl aclocal-1.4 backwards compatibility:
@@ -157,9 +159,9 @@ dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
 
 # _LT_ENABLE_SHARED([DEFAULT])
 # ----------------------------
-# implement the --enable-shared flag, and supports the `shared' and
-# `disable-shared' LT_INIT options.
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+# implement the --enable-shared flag, and supports the 'shared' and
+# 'disable-shared' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
 m4_define([_LT_ENABLE_SHARED],
 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
 AC_ARG_ENABLE([shared],
@@ -172,14 +174,14 @@ AC_ARG_ENABLE([shared],
     *)
       enable_shared=no
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
       for pkg in $enableval; do
-	IFS="$lt_save_ifs"
+	IFS=$lt_save_ifs
 	if test "X$pkg" = "X$p"; then
 	  enable_shared=yes
 	fi
       done
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       ;;
     esac],
     [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
@@ -211,9 +213,9 @@ dnl AC_DEFUN([AM_DISABLE_SHARED], [])
 
 # _LT_ENABLE_STATIC([DEFAULT])
 # ----------------------------
-# implement the --enable-static flag, and support the `static' and
-# `disable-static' LT_INIT options.
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+# implement the --enable-static flag, and support the 'static' and
+# 'disable-static' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
 m4_define([_LT_ENABLE_STATIC],
 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
 AC_ARG_ENABLE([static],
@@ -226,14 +228,14 @@ AC_ARG_ENABLE([static],
     *)
      enable_static=no
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
       for pkg in $enableval; do
-	IFS="$lt_save_ifs"
+	IFS=$lt_save_ifs
 	if test "X$pkg" = "X$p"; then
 	  enable_static=yes
 	fi
       done
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       ;;
     esac],
     [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
@@ -265,9 +267,9 @@ dnl AC_DEFUN([AM_DISABLE_STATIC], [])
 
 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
 # ----------------------------------
-# implement the --enable-fast-install flag, and support the `fast-install'
-# and `disable-fast-install' LT_INIT options.
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+# implement the --enable-fast-install flag, and support the 'fast-install'
+# and 'disable-fast-install' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
 m4_define([_LT_ENABLE_FAST_INSTALL],
 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
 AC_ARG_ENABLE([fast-install],
@@ -280,14 +282,14 @@ AC_ARG_ENABLE([fast-install],
     *)
       enable_fast_install=no
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
       for pkg in $enableval; do
-	IFS="$lt_save_ifs"
+	IFS=$lt_save_ifs
 	if test "X$pkg" = "X$p"; then
 	  enable_fast_install=yes
 	fi
       done
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       ;;
     esac],
     [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
@@ -304,14 +306,14 @@ AU_DEFUN([AC_ENABLE_FAST_INSTALL],
 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
 AC_DIAGNOSE([obsolete],
 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `fast-install' option into LT_INIT's first parameter.])
+the 'fast-install' option into LT_INIT's first parameter.])
 ])
 
 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
 AC_DIAGNOSE([obsolete],
 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `disable-fast-install' option into LT_INIT's first parameter.])
+the 'disable-fast-install' option into LT_INIT's first parameter.])
 ])
 
 dnl aclocal-1.4 backwards compatibility:
@@ -319,19 +321,85 @@ dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
 
 
+# _LT_WITH_AIX_SONAME([DEFAULT])
+# ----------------------------------
+# implement the --with-aix-soname flag, and support the `aix-soname=aix'
+# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
+# is either `aix', `both' or `svr4'.  If omitted, it defaults to `aix'.
+m4_define([_LT_WITH_AIX_SONAME],
+[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
+shared_archive_member_spec=
+case $host,$enable_shared in
+power*-*-aix[[5-9]]*,yes)
+  AC_MSG_CHECKING([which variant of shared library versioning to provide])
+  AC_ARG_WITH([aix-soname],
+    [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
+      [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
+    [case $withval in
+    aix|svr4|both)
+      ;;
+    *)
+      AC_MSG_ERROR([Unknown argument to --with-aix-soname])
+      ;;
+    esac
+    lt_cv_with_aix_soname=$with_aix_soname],
+    [AC_CACHE_VAL([lt_cv_with_aix_soname],
+      [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
+    with_aix_soname=$lt_cv_with_aix_soname])
+  AC_MSG_RESULT([$with_aix_soname])
+  if test aix != "$with_aix_soname"; then
+    # For the AIX way of multilib, we name the shared archive member
+    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
+    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
+    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
+    # the AIX toolchain works better with OBJECT_MODE set (default 32).
+    if test 64 = "${OBJECT_MODE-32}"; then
+      shared_archive_member_spec=shr_64
+    else
+      shared_archive_member_spec=shr
+    fi
+  fi
+  ;;
+*)
+  with_aix_soname=aix
+  ;;
+esac
+
+_LT_DECL([], [shared_archive_member_spec], [0],
+    [Shared archive member basename, for filename based shared library versioning on AIX])dnl
+])# _LT_WITH_AIX_SONAME
+
+LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
+LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
+LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
+
+
 # _LT_WITH_PIC([MODE])
 # --------------------
-# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
 # LT_INIT options.
-# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
+# MODE is either 'yes' or 'no'.  If omitted, it defaults to 'both'.
 m4_define([_LT_WITH_PIC],
 [AC_ARG_WITH([pic],
-    [AS_HELP_STRING([--with-pic],
+    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
 	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
-    [pic_mode="$withval"],
-    [pic_mode=default])
-
-test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
+    [lt_p=${PACKAGE-default}
+    case $withval in
+    yes|no) pic_mode=$withval ;;
+    *)
+      pic_mode=default
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+      for lt_pkg in $withval; do
+	IFS=$lt_save_ifs
+	if test "X$lt_pkg" = "X$lt_p"; then
+	  pic_mode=yes
+	fi
+      done
+      IFS=$lt_save_ifs
+      ;;
+    esac],
+    [pic_mode=m4_default([$1], [default])])
 
 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
 ])# _LT_WITH_PIC
@@ -344,7 +412,7 @@ AU_DEFUN([AC_LIBTOOL_PICMODE],
 [_LT_SET_OPTION([LT_INIT], [pic-only])
 AC_DIAGNOSE([obsolete],
 [$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `pic-only' option into LT_INIT's first parameter.])
+put the 'pic-only' option into LT_INIT's first parameter.])
 ])
 
 dnl aclocal-1.4 backwards compatibility:
diff --git a/m4/ltversion.m4 b/m4/ltversion.m4
index 07a8602..fa04b52 100644
--- a/m4/ltversion.m4
+++ b/m4/ltversion.m4
@@ -1,6 +1,6 @@
 # ltversion.m4 -- version numbers			-*- Autoconf -*-
 #
-#   Copyright (C) 2004 Free Software Foundation, Inc.
+#   Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
 #   Written by Scott James Remnant, 2004
 #
 # This file is free software; the Free Software Foundation gives
@@ -9,15 +9,15 @@
 
 # @configure_input@
 
-# serial 3337 ltversion.m4
+# serial 4179 ltversion.m4
 # This file is part of GNU Libtool
 
-m4_define([LT_PACKAGE_VERSION], [2.4.2])
-m4_define([LT_PACKAGE_REVISION], [1.3337])
+m4_define([LT_PACKAGE_VERSION], [2.4.6])
+m4_define([LT_PACKAGE_REVISION], [2.4.6])
 
 AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.4.2'
-macro_revision='1.3337'
+[macro_version='2.4.6'
+macro_revision='2.4.6'
 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
 _LT_DECL(, macro_revision, 0)
 ])
diff --git a/m4/openmp.m4 b/m4/openmp.m4
deleted file mode 100644
index 3edf3d6..0000000
--- a/m4/openmp.m4
+++ /dev/null
@@ -1,97 +0,0 @@
-# ===========================================================================
-#               http://autoconf-archive.cryp.to/ax_openmp.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   OPENMP_CHECK([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-#
-# DESCRIPTION
-#
-#   This macro tries to find out how to compile programs that use OpenMP a
-#   standard API and set of compiler directives for parallel programming
-#   (see http://www-unix.mcs/)
-#
-#   On success, it sets the OPENMP_CFLAGS/OPENMP_CXXFLAGS/OPENMP_F77FLAGS
-#   output variable to the flag (e.g. -omp) used both to compile *and* link
-#   OpenMP programs in the current language.
-#
-#   NOTE: You are assumed to not only compile your program with these flags,
-#   but also link it with them as well.
-#
-#   If you want to compile everything with OpenMP, you should set:
-#
-#       CFLAGS="$CFLAGS $OPENMP_CFLAGS"
-#       #OR#  CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
-#       #OR#  FFLAGS="$FFLAGS $OPENMP_FFLAGS"
-#
-#   (depending on the selected language).
-#
-#   The user can override the default choice by setting the corresponding
-#   environment variable (e.g. OPENMP_CFLAGS).
-#
-#   ACTION-IF-FOUND is a list of shell commands to run if an OpenMP flag is
-#   found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it is
-#   not found. If ACTION-IF-FOUND is not specified, the default action will
-#   define HAVE_OPENMP.
-#
-# LICENSE
-#
-#   Copyright (c) 2008 Steven G. Johnson <stevenj at alum.mit.edu>
-#
-#   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/>.
-#
-#   As a special exception, the respective Autoconf Macro's copyright owner
-#   gives unlimited permission to copy, distribute and modify the configure
-#   scripts that are the output of Autoconf when processing the Macro. You
-#   need not follow the terms of the GNU General Public License when using
-#   or distributing such scripts, even though portions of the text of the
-#   Macro appear in them. The GNU General Public License (GPL) does govern
-#   all other use of the material that constitutes the Autoconf Macro.
-#
-#   This special exception to the GPL applies to versions of the Autoconf
-#   Macro released by the Autoconf Archive. When you make and distribute a
-#   modified version of the Autoconf Macro, you may extend this special
-#   exception to the GPL to apply to your modified version as well.
-
-AC_DEFUN([OPENMP_CHECK], [
-AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
-
-AC_CACHE_CHECK([for OpenMP flag of _AC_LANG compiler], ax_cv_[]_AC_LANG_ABBREV[]_openmp, [save[]_AC_LANG_PREFIX[]FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
-ax_cv_[]_AC_LANG_ABBREV[]_openmp=unknown
-# Flags to try:  -fopenmp (gcc), -openmp (icc), -mp (SGI & PGI),
-#                -xopenmp (Sun), -omp (Tru64), -qsmp=omp (AIX), none
-ax_openmp_flags="-fopenmp -openmp -mp -xopenmp -omp -qsmp=omp none"
-if test "x$OPENMP_[]_AC_LANG_PREFIX[]FLAGS" != x; then
-  ax_openmp_flags="$OPENMP_[]_AC_LANG_PREFIX[]FLAGS $ax_openmp_flags"
-fi
-for ax_openmp_flag in $ax_openmp_flags; do
-  case $ax_openmp_flag in
-    none) []_AC_LANG_PREFIX[]FLAGS=$save[]_AC_LANG_PREFIX[] ;;
-    *) []_AC_LANG_PREFIX[]FLAGS="$save[]_AC_LANG_PREFIX[]FLAGS $ax_openmp_flag" ;;
-  esac
-  AC_TRY_LINK_FUNC(omp_get_num_threads,
-	[ax_cv_[]_AC_LANG_ABBREV[]_openmp=$ax_openmp_flag; break])
-done
-[]_AC_LANG_PREFIX[]FLAGS=$save[]_AC_LANG_PREFIX[]FLAGS
-])
-if test "x$ax_cv_[]_AC_LANG_ABBREV[]_openmp" = "xunknown"; then
-  m4_default([$2],:)
-else
-  if test "x$ax_cv_[]_AC_LANG_ABBREV[]_openmp" != "xnone"; then
-    OPENMP_[]_AC_LANG_PREFIX[]FLAGS=$ax_cv_[]_AC_LANG_ABBREV[]_openmp
-  fi
-  m4_default([$1], [AC_DEFINE(HAVE_OPENMP,1,[Define if OpenMP is enabled])])
-fi
-])dnl OPENMP_CHECK
diff --git a/m4/pkg.m4 b/m4/pkg.m4
index 9a71878..c5b26b5 100644
--- a/m4/pkg.m4
+++ b/m4/pkg.m4
@@ -157,3 +157,58 @@ else
 	$3
 fi[]dnl
 ])# PKG_CHECK_MODULES
+
+
+# PKG_INSTALLDIR(DIRECTORY)
+# -------------------------
+# Substitutes the variable pkgconfigdir as the location where a module
+# should install pkg-config .pc files. By default the directory is
+# $libdir/pkgconfig, but the default can be changed by passing
+# DIRECTORY. The user can override through the --with-pkgconfigdir
+# parameter.
+AC_DEFUN([PKG_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+    [pkg-config installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([pkgconfigdir],
+    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
+    [with_pkgconfigdir=]pkg_default)
+AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+]) dnl PKG_INSTALLDIR
+
+
+# PKG_NOARCH_INSTALLDIR(DIRECTORY)
+# -------------------------
+# Substitutes the variable noarch_pkgconfigdir as the location where a
+# module should install arch-independent pkg-config .pc files. By
+# default the directory is $datadir/pkgconfig, but the default can be
+# changed by passing DIRECTORY. The user can override through the
+# --with-noarch-pkgconfigdir parameter.
+AC_DEFUN([PKG_NOARCH_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([noarch-pkgconfigdir],
+    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
+    [with_noarch_pkgconfigdir=]pkg_default)
+AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+]) dnl PKG_NOARCH_INSTALLDIR
+
+
+# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# -------------------------------------------
+# Retrieves the value of the pkg-config variable for the given module.
+AC_DEFUN([PKG_CHECK_VAR],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
+
+_PKG_CONFIG([$1], [variable="][$3]["], [$2])
+AS_VAR_COPY([$1], [pkg_cv_][$1])
+
+AS_VAR_IF([$1], [""], [$5], [$4])dnl
+])# PKG_CHECK_VAR
diff --git a/missing b/missing
index db98974..f62bbae 100755
--- a/missing
+++ b/missing
@@ -3,7 +3,7 @@
 
 scriptversion=2013-10-28.13; # UTC
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 # Originally written by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
diff --git a/py-compile b/py-compile
deleted file mode 100755
index 46ea866..0000000
--- a/py-compile
+++ /dev/null
@@ -1,170 +0,0 @@
-#!/bin/sh
-# py-compile - Compile a Python program
-
-scriptversion=2011-06-08.12; # UTC
-
-# Copyright (C) 2000-2013 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to <bug-automake at gnu.org> or send patches to
-# <automake-patches at gnu.org>.
-
-if [ -z "$PYTHON" ]; then
-  PYTHON=python
-fi
-
-me=py-compile
-
-usage_error ()
-{
-  echo "$me: $*" >&2
-  echo "Try '$me --help' for more information." >&2
-  exit 1
-}
-
-basedir=
-destdir=
-while test $# -ne 0; do
-  case "$1" in
-    --basedir)
-      if test $# -lt 2; then
-        usage_error "option '--basedir' requires an argument"
-      else
-        basedir=$2
-      fi
-      shift
-      ;;
-    --destdir)
-      if test $# -lt 2; then
-        usage_error "option '--destdir' requires an argument"
-      else
-        destdir=$2
-      fi
-      shift
-      ;;
-    -h|--help)
-      cat <<\EOF
-Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..."
-
-Byte compile some python scripts FILES.  Use --destdir to specify any
-leading directory path to the FILES that you don't want to include in the
-byte compiled file.  Specify --basedir for any additional path information you
-do want to be shown in the byte compiled file.
-
-Example:
-  py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py
-
-Report bugs to <bug-automake at gnu.org>.
-EOF
-      exit $?
-      ;;
-    -v|--version)
-      echo "$me $scriptversion"
-      exit $?
-      ;;
-    --)
-      shift
-      break
-      ;;
-    -*)
-      usage_error "unrecognized option '$1'"
-      ;;
-    *)
-      break
-      ;;
-  esac
-  shift
-done
-
-files=$*
-if test -z "$files"; then
-    usage_error "no files given"
-fi
-
-# if basedir was given, then it should be prepended to filenames before
-# byte compilation.
-if [ -z "$basedir" ]; then
-    pathtrans="path = file"
-else
-    pathtrans="path = os.path.join('$basedir', file)"
-fi
-
-# if destdir was given, then it needs to be prepended to the filename to
-# byte compile but not go into the compiled file.
-if [ -z "$destdir" ]; then
-    filetrans="filepath = path"
-else
-    filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)"
-fi
-
-$PYTHON -c "
-import sys, os, py_compile, imp
-
-files = '''$files'''
-
-sys.stdout.write('Byte-compiling python modules...\n')
-for file in files.split():
-    $pathtrans
-    $filetrans
-    if not os.path.exists(filepath) or not (len(filepath) >= 3
-                                            and filepath[-3:] == '.py'):
-	    continue
-    sys.stdout.write(file)
-    sys.stdout.flush()
-    if hasattr(imp, 'get_tag'):
-        py_compile.compile(filepath, imp.cache_from_source(filepath), path)
-    else:
-        py_compile.compile(filepath, filepath + 'c', path)
-sys.stdout.write('\n')" || exit $?
-
-# this will fail for python < 1.5, but that doesn't matter ...
-$PYTHON -O -c "
-import sys, os, py_compile, imp
-
-# pypy does not use .pyo optimization
-if hasattr(sys, 'pypy_translation_info'):
-    sys.exit(0)
-
-files = '''$files'''
-sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n')
-for file in files.split():
-    $pathtrans
-    $filetrans
-    if not os.path.exists(filepath) or not (len(filepath) >= 3
-                                            and filepath[-3:] == '.py'):
-	    continue
-    sys.stdout.write(file)
-    sys.stdout.flush()
-    if hasattr(imp, 'get_tag'):
-        py_compile.compile(filepath, imp.cache_from_source(filepath, False), path)
-    else:
-        py_compile.compile(filepath, filepath + 'o', path)
-sys.stdout.write('\n')" 2>/dev/null || :
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
deleted file mode 100644
index adfcdc8..0000000
--- a/scripts/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-# $Id: Makefile.am 8890 2011-03-16 16:00:25Z sloot $
-# $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/scripts/Makefile.am $
-
-frogscripts_PYTHON = csidp.py dir.py pairs.py rels.py common.py cky.py \
-	deptree.py csiparse2.py sentences.py cmdline.py
-
-frogscriptsdir = $(pythondir)/frog
-
-
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
deleted file mode 100644
index 5b550d3..0000000
--- a/scripts/Makefile.in
+++ /dev/null
@@ -1,568 +0,0 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
-
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
- at SET_MAKE@
-
-# $Id: Makefile.am 8890 2011-03-16 16:00:25Z sloot $
-# $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/scripts/Makefile.am $
-VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
-am__make_running_with_option = \
-  case $${target_option-} in \
-      ?) ;; \
-      *) echo "am__make_running_with_option: internal error: invalid" \
-              "target option '$${target_option-}' specified" >&2; \
-         exit 1;; \
-  esac; \
-  has_opt=no; \
-  sane_makeflags=$$MAKEFLAGS; \
-  if $(am__is_gnu_make); then \
-    sane_makeflags=$$MFLAGS; \
-  else \
-    case $$MAKEFLAGS in \
-      *\\[\ \	]*) \
-        bs=\\; \
-        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
-          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
-    esac; \
-  fi; \
-  skip_next=no; \
-  strip_trailopt () \
-  { \
-    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
-  }; \
-  for flg in $$sane_makeflags; do \
-    test $$skip_next = yes && { skip_next=no; continue; }; \
-    case $$flg in \
-      *=*|--*) continue;; \
-        -*I) strip_trailopt 'I'; skip_next=yes;; \
-      -*I?*) strip_trailopt 'I';; \
-        -*O) strip_trailopt 'O'; skip_next=yes;; \
-      -*O?*) strip_trailopt 'O';; \
-        -*l) strip_trailopt 'l'; skip_next=yes;; \
-      -*l?*) strip_trailopt 'l';; \
-      -[dEDm]) skip_next=yes;; \
-      -[JT]) skip_next=yes;; \
-    esac; \
-    case $$flg in \
-      *$$target_option*) has_opt=yes; break;; \
-    esac; \
-  done; \
-  test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkglibexecdir = $(libexecdir)/@PACKAGE@
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = scripts
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(frogscripts_PYTHON) $(top_srcdir)/py-compile
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ac_python_devel.m4 \
-	$(top_srcdir)/m4/ax_icu_check.m4 \
-	$(top_srcdir)/m4/ax_lib_readline.m4 \
-	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
-	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
-	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-	$(top_srcdir)/m4/openmp.m4 $(top_srcdir)/m4/pkg.m4 \
-	$(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-CONFIG_CLEAN_VPATH_FILES =
-AM_V_P = $(am__v_P_ at AM_V@)
-am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
-am__v_P_0 = false
-am__v_P_1 = :
-AM_V_GEN = $(am__v_GEN_ at AM_V@)
-am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
-am__v_GEN_0 = @echo "  GEN     " $@;
-am__v_GEN_1 = 
-AM_V_at = $(am__v_at_ at AM_V@)
-am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
-am__v_at_0 = @
-am__v_at_1 = 
-SOURCES =
-DIST_SOURCES =
-am__can_run_installinfo = \
-  case $$AM_UPDATE_INFO_DIR in \
-    n|no|NO) false;; \
-    *) (install-info --version) >/dev/null 2>&1;; \
-  esac
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__uninstall_files_from_dir = { \
-  test -z "$$files" \
-    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
-    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
-         $(am__cd) "$$dir" && rm -f $$files; }; \
-  }
-am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile)
-am__installdirs = "$(DESTDIR)$(frogscriptsdir)"
-am__pep3147_tweak = \
-  sed -e 's|\.py$$||' -e 's|[^/]*$$|__pycache__/&.*.py|'
-py_compile = $(top_srcdir)/py-compile
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-AR = @AR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-ICU_CFLAGS = @ICU_CFLAGS@
-ICU_CONFIG = @ICU_CONFIG@
-ICU_CPPSEARCHPATH = @ICU_CPPSEARCHPATH@
-ICU_CXXFLAGS = @ICU_CXXFLAGS@
-ICU_IOLIBS = @ICU_IOLIBS@
-ICU_LIBPATH = @ICU_LIBPATH@
-ICU_LIBS = @ICU_LIBS@
-ICU_VERSION = @ICU_VERSION@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-MANIFEST_TOOL = @MANIFEST_TOOL@
-MKDIR_P = @MKDIR_P@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
-PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
-PTHREAD_CC = @PTHREAD_CC@
-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
-PTHREAD_LIBS = @PTHREAD_LIBS@
-PYTHON = @PYTHON@
-PYTHONDIR = @PYTHONDIR@
-PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
-PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
-PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@
-PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
-PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
-PYTHON_PLATFORM = @PYTHON_PLATFORM@
-PYTHON_PREFIX = @PYTHON_PREFIX@
-PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
-PYTHON_VERSION = @PYTHON_VERSION@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-SYSCONFDIR = @SYSCONFDIR@
-VERSION = @VERSION@
-XML2_CFLAGS = @XML2_CFLAGS@
-XML2_LIBS = @XML2_LIBS@
-abs_builddir = @abs_builddir@
-abs_srcdir = @abs_srcdir@
-abs_top_builddir = @abs_top_builddir@
-abs_top_srcdir = @abs_top_srcdir@
-ac_ct_AR = @ac_ct_AR@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-ax_pthread_config = @ax_pthread_config@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-folia_CFLAGS = @folia_CFLAGS@
-folia_LIBS = @folia_LIBS@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mbt_CFLAGS = @mbt_CFLAGS@
-mbt_LIBS = @mbt_LIBS@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-pkgconfigpath = @pkgconfigpath@
-pkgpyexecdir = @pkgpyexecdir@
-pkgpythondir = @pkgpythondir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-pyexecdir = @pyexecdir@
-pythondir = @pythondir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-ticcutils_CFLAGS = @ticcutils_CFLAGS@
-ticcutils_LIBS = @ticcutils_LIBS@
-timbl_CFLAGS = @timbl_CFLAGS@
-timbl_LIBS = @timbl_LIBS@
-timblserver_CFLAGS = @timblserver_CFLAGS@
-timblserver_LIBS = @timblserver_LIBS@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-ucto_CFLAGS = @ucto_CFLAGS@
-ucto_LIBS = @ucto_LIBS@
-frogscripts_PYTHON = csidp.py dir.py pairs.py rels.py common.py cky.py \
-	deptree.py csiparse2.py sentences.py cmdline.py
-
-frogscriptsdir = $(pythondir)/frog
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
-	@for dep in $?; do \
-	  case '$(am__configure_deps)' in \
-	    *$$dep*) \
-	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
-	        && { if test -f $@; then exit 0; else break; fi; }; \
-	      exit 1;; \
-	  esac; \
-	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu scripts/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu scripts/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@case '$?' in \
-	  *config.status*) \
-	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-	  *) \
-	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
-	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
-	esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-install-frogscriptsPYTHON: $(frogscripts_PYTHON)
-	@$(NORMAL_INSTALL)
-	@list='$(frogscripts_PYTHON)'; dlist=; list2=; test -n "$(frogscriptsdir)" || list=; \
-	if test -n "$$list"; then \
-	  echo " $(MKDIR_P) '$(DESTDIR)$(frogscriptsdir)'"; \
-	  $(MKDIR_P) "$(DESTDIR)$(frogscriptsdir)" || exit 1; \
-	fi; \
-	for p in $$list; do \
-	  if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
-	  if test -f $$b$$p; then \
-	    $(am__strip_dir) \
-	    dlist="$$dlist $$f"; \
-	    list2="$$list2 $$b$$p"; \
-	  else :; fi; \
-	done; \
-	for file in $$list2; do echo $$file; done | $(am__base_list) | \
-	while read files; do \
-	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(frogscriptsdir)'"; \
-	  $(INSTALL_DATA) $$files "$(DESTDIR)$(frogscriptsdir)" || exit $$?; \
-	done || exit $$?; \
-	if test -n "$$dlist"; then \
-	  $(am__py_compile) --destdir "$(DESTDIR)" \
-	                    --basedir "$(frogscriptsdir)" $$dlist; \
-	else :; fi
-
-uninstall-frogscriptsPYTHON:
-	@$(NORMAL_UNINSTALL)
-	@list='$(frogscripts_PYTHON)'; test -n "$(frogscriptsdir)" || list=; \
-	py_files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$py_files" || exit 0; \
-	dir='$(DESTDIR)$(frogscriptsdir)'; \
-	pyc_files=`echo "$$py_files" | sed 's|$$|c|'`; \
-	pyo_files=`echo "$$py_files" | sed 's|$$|o|'`; \
-	py_files_pep3147=`echo "$$py_files" | $(am__pep3147_tweak)`; \
-	echo "$$py_files_pep3147";\
-	pyc_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|c|'`; \
-	pyo_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|o|'`; \
-	st=0; \
-	for files in \
-	  "$$py_files" \
-	  "$$pyc_files" \
-	  "$$pyo_files" \
-	  "$$pyc_files_pep3147" \
-	  "$$pyo_files_pep3147" \
-	; do \
-	  $(am__uninstall_files_from_dir) || st=$$?; \
-	done; \
-	exit $$st
-tags TAGS:
-
-ctags CTAGS:
-
-cscope cscopelist:
-
-
-distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
-	list='$(DISTFILES)'; \
-	  dist_files=`for file in $$list; do echo $$file; done | \
-	  sed -e "s|^$$srcdirstrip/||;t" \
-	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
-	case $$dist_files in \
-	  */*) $(MKDIR_P) `echo "$$dist_files" | \
-			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
-			   sort -u` ;; \
-	esac; \
-	for file in $$dist_files; do \
-	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  if test -d $$d/$$file; then \
-	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
-	    if test -d "$(distdir)/$$file"; then \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
-	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
-	    fi; \
-	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
-	  else \
-	    test -f "$(distdir)/$$file" \
-	    || cp -p $$d/$$file "$(distdir)/$$file" \
-	    || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-am
-all-am: Makefile
-installdirs:
-	for dir in "$(DESTDIR)$(frogscriptsdir)"; do \
-	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
-	done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-	if test -z '$(STRIP)'; then \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	      install; \
-	else \
-	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
-	fi
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
-	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-
-maintainer-clean-generic:
-	@echo "This command is intended for maintainers to use"
-	@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-html-am:
-
-info: info-am
-
-info-am:
-
-install-data-am: install-frogscriptsPYTHON
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am:
-
-install-html: install-html-am
-
-install-html-am:
-
-install-info: install-info-am
-
-install-info-am:
-
-install-man:
-
-install-pdf: install-pdf-am
-
-install-pdf-am:
-
-install-ps: install-ps-am
-
-install-ps-am:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-frogscriptsPYTHON
-
-.MAKE: install-am install-strip
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	cscopelist-am ctags-am distclean distclean-generic \
-	distclean-libtool distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am \
-	install-frogscriptsPYTHON install-html install-html-am \
-	install-info install-info-am install-man install-pdf \
-	install-pdf-am install-ps install-ps-am install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-generic \
-	mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
-	uninstall-am uninstall-frogscriptsPYTHON
-
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/scripts/cky.py b/scripts/cky.py
deleted file mode 100644
index 53c3a40..0000000
--- a/scripts/cky.py
+++ /dev/null
@@ -1,171 +0,0 @@
-import deptree
-
-
-class SubTree:
-
-	def __init__(self, score, r, edgeLabel):
-		self.score = score
-		self.r = r
-		self.edgeLabel = edgeLabel
-		self.satisfiedConstraints = set()
-
-
-class CKYParser:
-
-	def __init__(self, numTokens):
-		self.numTokens = numTokens
-		self.inDepConstraints = [[] for i in xrange(numTokens + 1)]
-		self.outDepConstraints = [[] for i in xrange(numTokens + 1)]
-		self.edgeConstraints = [[[] for i in xrange(numTokens + 1)]
-								for i in xrange(numTokens + 1)]
-
-	def addConstraint(self, c):
-		if isinstance(c, deptree.HasIncomingRel):
-			self.inDepConstraints[c.tokenIndex].append(c)
-		elif isinstance(c, deptree.HasDependency):
-			self.edgeConstraints[c.tokenIndex][c.headIndex].append(c)
-		elif isinstance(c, deptree.DependencyDirection):
-			self.outDepConstraints[c.tokenIndex].append(c)
-
-	def bestEdge(self, leftSubTree, rightSubTree, headIndex, depIndex):
-		if headIndex == 0:
-			score = 0.0
-			constraints = set()
-			for constraint in self.outDepConstraints[depIndex]:
-				if constraint.direction == constraint.ROOT:
-					score = constraint.weight
-					constraints.add(constraint)
-			assert len(self.edgeConstraints[depIndex][0]) <= 1
-			label = "ROOT"
-			for constraint in self.edgeConstraints[depIndex][0]:
-				score += constraint.weight
-				constraints.add(constraint)
-				label = constraint.relType
-			return label, score, constraints
-
-		#headIndex -= 1
-		#depIndex -= 1
-		
-		best = None
-		bestScore = -0.5 #-1
-		bestConstraints = set()
-		for edgeConstraint in self.edgeConstraints[depIndex][headIndex]:
-			score = edgeConstraint.weight
-			label = edgeConstraint.relType
-			constraints = set([edgeConstraint])
-
-			for constraint in self.inDepConstraints[headIndex]:
-				if constraint.relType == label and (constraint not in leftSubTree.satisfiedConstraints and constraint not in rightSubTree.satisfiedConstraints):
-					score += constraint.weight
-					constraints.add(constraint)
-
-			for constraint in self.outDepConstraints[depIndex]:
-				if ((constraint.direction == constraint.LEFT and headIndex < depIndex) or (constraint.direction == constraint.RIGHT and headIndex > depIndex)) and (constraint not in leftSubTree.satisfiedConstraints and constraint not in rightSubTree.satisfiedConstraints):
-					score += constraint.weight
-					constraints.add(constraint)
-
-			if score > bestScore:
-				bestScore = score
-				best = label
-				bestConstraints = constraints
-
-		return best, bestScore, bestConstraints
-
-	def parse(self):
-		C = {}
-		for s in xrange(self.numTokens + 1):
-			for d in ["r", "l"]:
-				for c in [True, False]:
-					C[s, s, d, c] = SubTree(0.0, None, None)
-		
-		for k in xrange(1, self.numTokens + 1 + 1):
-			for s in xrange(self.numTokens - k + 1):
-				t = s + k
-
-				best = -1, "__" #####None
-				bestScore = float("-inf") #-1
-				bestConstraints = None
-				for r in xrange(s, t):
-					label, edgeScore, constraints = self.bestEdge(
-						C[s, r, "r", True],
-						C[r + 1, t, "l", True],
-						t, s)
-
-					score = C[s, r, "r", True].score + \
-							C[r + 1, t, "l", True].score + \
-							edgeScore
-					
-					if score > bestScore:
-						bestScore = score
-						best = r, label
-						bestConstraints = constraints
-
-				C[s, t, "l", False] = SubTree(bestScore, *best)
-				C[s, t, "l", False].satisfiedConstraints.update(
-					C[s, best[0], "r", True].satisfiedConstraints)
-				C[s, t, "l", False].satisfiedConstraints.update(
-					C[best[0] + 1, t, "l", True].satisfiedConstraints)
-				C[s, t, "l", False].satisfiedConstraints.update(
-					bestConstraints)
-				
-
-				best = -1, "__" #######None
-				bestScore = float("-inf") #-1
-				bestConstraints = None
-				for r in xrange(s, t):
-					label, edgeScore, constraints = self.bestEdge(
-						C[s, r, "r", True],
-						C[r + 1, t, "l", True],
-						s, t)
-					
-					score = C[s, r, "r", True].score + \
-							C[r + 1, t, "l", True].score + \
-							edgeScore
-					
-					if score > bestScore:
-						bestScore = score
-						best = r, label
-						bestConstraints = constraints
-
-				C[s, t, "r", False] = SubTree(bestScore, *best)
-				C[s, t, "r", False].satisfiedConstraints.update(
-					C[s, best[0], "r", True].satisfiedConstraints)
-				C[s, t, "r", False].satisfiedConstraints.update(
-					C[best[0] + 1, t, "l", True].satisfiedConstraints)
-				C[s, t, "r", False].satisfiedConstraints.update(
-					bestConstraints)
-				
-
-				best = -1 ######None
-				bestScore = float("-inf") #-1
-				for r in xrange(s, t):
-					score = C[s, r, "l", True].score + \
-							C[r, t, "l", False].score
-					if score > bestScore:
-						bestScore = score
-						best = r
-
-				C[s, t, "l", True] = SubTree(bestScore, best, None)
-				C[s, t, "l", True].satisfiedConstraints.update(
-					C[s, best, "l", True].satisfiedConstraints)
-				C[s, t, "l", True].satisfiedConstraints.update(
-					C[best, t, "l", False].satisfiedConstraints)
-				
-
-				best = -1 ####None
-				bestScore = float("-inf") #-1
-				for r in xrange(s + 1, t + 1):
-					score = C[s, r, "r", False].score + \
-							C[r, t, "r", True].score
-					if score > bestScore:
-						bestScore = score
-						best = r
-
-				C[s, t, "r", True] = SubTree(bestScore, best, None)
-				C[s, t, "r", True].satisfiedConstraints.update(
-					C[s, best, "r", False].satisfiedConstraints)
-				C[s, t, "r", True].satisfiedConstraints.update(
-					C[best, t, "r", True].satisfiedConstraints)
-				
-
-		return C
diff --git a/scripts/cmdline.py b/scripts/cmdline.py
deleted file mode 100644
index eb7a1c0..0000000
--- a/scripts/cmdline.py
+++ /dev/null
@@ -1,110 +0,0 @@
-####
-#
-# Pylet - Python Language Engineering Toolkit
-# Written by Sander Canisius <S.V.M.Canisius at uvt.nl>
-#
-
-import optparse
-import warnings
-
-from itertools import imap
-
-
-def parseOption(lines, options, optionRefinements):
-	line = lines.pop(0)
-	switches, helpMessage = map(str.strip, line.split(":", 1))
-
-	metavar = None
-	opts = []
-	for switch in imap(str.strip, switches.split(",")):
-		if switch.startswith("--"):
-			if "=" in switch:
-				switch, metavar = switch.split("=")
-			opts.append(switch)
-			
-		elif switch.startswith("-"):
-			if len(switch) > 2:
-				metavar = switch[2:].strip()
-				switch = switch[:2]
-			opts.append(switch)
-
-		else:
-			warnings.warn("Ignoring invalid option specification " + switch,
-						  SyntaxWarning, stacklevel=3)
-
-	stop = False
-	while lines and not stop:
-		nextLine = lines[0]
-		text = nextLine.strip()
-		if text and nextLine[0].isspace():
-			helpMessage += " " + text
-			lines.pop(0)
-		else:
-			stop = True
-	
-	kwargs = {
-		"help": helpMessage
-	}
-
-	if metavar:
-		kwargs["metavar"] = metavar
-	else:
-		kwargs["action"] = "store_true"
-
-	if opts[0] in optionRefinements:
-		kwargs.update(optionRefinements[opts[0]])
-
-	options.add_option(*opts, **kwargs)
-
-
-def parseOptionGroup(lines, parser):
-	line = lines.pop(0)
-	desc = line[:-1].strip()
-	return parser.add_option_group(desc)
-
-
-def parseRefinements(spec):
-	lines = spec.splitlines()[2:]   # remove ---\n:Refinements:
-	
-	refinements = {}
-	for line in lines:
-		option, attributes = imap(str.strip, line.split(":", 1))
-		refinements[option] = eval("dict(%s)" % attributes)
-
-	return refinements
-
-
-def parse(optionSpec=None, args=None):
-	import __main__
-	if not optionSpec:
-		optionSpec = __main__.__doc__
-	
-	start = optionSpec.index("usage:")
-	try:
-		end = optionSpec.index("---\n:Refinements:")
-		refinements = parseRefinements(optionSpec[end:]) # NOTE: this should be in its own try block!?
-	except:
-		end = len(optionSpec)
-		refinements = {}
-
-	description = optionSpec[:start].strip()
-
-	lines = optionSpec[start:end].splitlines()
-	
-	usage = lines.pop(0)[6:].strip()
-	parser = optparse.OptionParser(usage=usage,
-								   description=description,
-								   version=getattr(__main__,
-												   "__version__", None))
-	options = parser
-
-	while lines:
-		nextLine = lines[0]
-		if nextLine.startswith("-"):
-			parseOption(lines, options, refinements)
-		elif nextLine.endswith(":"):
-			options = parseOptionGroup(lines, parser)
-		else:
-			lines.pop(0)
-
-	return parser.parse_args(args)
diff --git a/scripts/common.py b/scripts/common.py
deleted file mode 100755
index 0b638ac..0000000
--- a/scripts/common.py
+++ /dev/null
@@ -1,27 +0,0 @@
-import unicodedata
-
-
-__all__ = ["ID", "FORM", "LEMMA", "CPOSTAG", "POSTAG",
-		   "FEATS", "HEAD", "DEPREL", "PHEAD", "PDEPREL"]
-
-ID, FORM, LEMMA, CPOSTAG, POSTAG, \
-	FEATS, HEAD, DEPREL, PHEAD, PDEPREL = range(10)
-
-
-def isScoringToken(token):
-	for chr in token.decode("utf-8"):
-		if unicodedata.category(chr) == "Po":
-			return False
-
-	return True
-
-
-def pairIterator(sentence, options):
-	for dependent in sentence:
-		for head in sentence:
-			if dependent is not head:
-				if not options.skipNonScoring or \
-					   isScoringToken(dependent[FORM]):
-					dist = abs(int(dependent[ID]) - int(head[ID]))
-					if not options.maxDist or dist <= options.maxDist:
-						yield dependent, head
diff --git a/scripts/csidp.py b/scripts/csidp.py
deleted file mode 100755
index c800980..0000000
--- a/scripts/csidp.py
+++ /dev/null
@@ -1,303 +0,0 @@
-#!/usr/bin/env python
-
-"""
-Constraint satisfaction inference for dependency parsing.
-
-usage: %prog [options] [file...]
-
--mDIST, --max-dist=DIST: maximum distance between head and dependent
--x, --exclude-non-scoring: do not generate instance for non-scoring
-                           tokens
-
-Constraints:
---dep=FILENAME: classifier output for the C_dep constraint
---dir=FILENAME: classifier output for the C_dir constraint
---mod=FILENAME: classifier output for the C_mod constraint
-
---out=FILENAME: output file name
-
-Parsing algorithm:
---non-projective: approximate non-projective parsing
-
----
-:Refinements:
--m: type='int', dest='maxDist'
--x: action='store_true', default=False, dest='skipNonScoring'
-"""
-
-import fileinput
-import sys
-
-from itertools import izip, imap, groupby, ifilter
-from operator import itemgetter, attrgetter
-
-from sentences import sentenceIterator
-
-import cky
-import csiparse2 as csiparse
-import deptree
-
-from common import *
-
-
-def leftIncomplete(chart, s, t, sentence):
-	r = chart[s, t, "l", False].r
-	label = chart[s, t, "l", False].edgeLabel
-	if r is not None:
-		assert s > 0
-		sentence[s - 1][DEPREL] = label
-		sentence[s - 1][HEAD] = t
-		rightComplete(chart, s, r, sentence)
-		leftComplete(chart, r + 1, t, sentence)
-
-
-def rightIncomplete(chart, s, t, sentence):
-	r = chart[s, t, "r", False].r
-	label = chart[s, t, "r", False].edgeLabel
-	if r is not None:
-		assert t > 0
-		sentence[t - 1][DEPREL] = label
-		sentence[t - 1][HEAD] = s
-		rightComplete(chart, s, r, sentence)
-		leftComplete(chart, r + 1, t, sentence)
-
-
-def leftComplete(chart, s, t, sentence):
-	r = chart[s, t, "l", True].r
-	if r is not None:
-		leftComplete(chart, s, r, sentence)
-		leftIncomplete(chart, r, t, sentence)
-
-
-def rightComplete(chart, s, t, sentence):
-	r = chart[s, t, "r", True].r
-	if r is not None:
-		rightIncomplete(chart, s, r, sentence)
-		rightComplete(chart, r, t, sentence)
-
-
-def cyclic(sentence, head, dependent):
-	if head == dependent:
-		return True
-	x = sentence[head - 1][HEAD]
-	while x > 0:
-		if x == dependent:
-			return True
-		else:
-			x = sentence[x - 1][HEAD]
-
-	return False
-
-
-def evaluateTree(sentence, parser):
-	score = 0
-	
-	for i in xrange(len(sentence)):
-		inDeps = set(x[DEPREL] for x in sentence if x[HEAD] == i + 1)
-		outDep = sentence[i][DEPREL]
-
-		# C_mod
-		for constraint in parser.inDepConstraints[i + 1]:
-			if constraint.relType in inDeps:
-				score += constraint.weight
-
-		# C_dir
-		for constraint in parser.outDepConstraints[i + 1]:
-			if (0 < sentence[i][HEAD] < i + 1 and \
-				constraint.direction == constraint.LEFT) or \
-				(sentence[i][HEAD] > i + 1 and \
-				 constraint.direction == constraint.RIGHT) or \
-				(sentence[i][HEAD] == 0 and \
-				 constraint.direction == constraint.ROOT):
-				score += constraint.weight
-
-		# C_dep
-		if True: #sentence[i][HEAD] > 0:
-			for constraint in parser.edgeConstraints[i + 1][sentence[i][HEAD]]:
-				if constraint.relType == sentence[i][DEPREL]:
-					score += constraint.weight
-
-	return score
-
-
-def scoreDiff(sentence, parser, dependent, newHead):
-	result = 0
-	
-	oldHead = sentence[dependent - 1][HEAD]
-	oldRel = sentence[dependent - 1][DEPREL]
-
-	# C_dep diff
-	if True: #oldHead >= 0:
-		depRels = parser.edgeConstraints[dependent][oldHead]
-		assert len(depRels) <= 1
-		if depRels and depRels[0].relType == oldRel:
-			result -= depRels[0].weight
-	
-	if True: #newHead >= 0:
-		depRels = parser.edgeConstraints[dependent][newHead]
-		assert len(depRels) <= 1
-		if depRels:
-			newRel = depRels[0].relType
-			result += depRels[0].weight
-		else:
-			newRel = "unk" if newHead > 0 else "ROOT"
-
-	# C_mod diff
-	if oldHead > 0:
-		dependents = [x
-					  for x in sentence
-					  if x[HEAD] == oldHead and x[DEPREL] == oldRel]
-		if len(dependents) == 1:
-			for constraint in parser.inDepConstraints[oldHead]:
-				if constraint.relType == oldRel:
-					result -= constraint.weight
-
-	if newHead > 0:
-		dependents = [x
-					  for x in sentence
-					  if x[HEAD] == newHead and x[DEPREL] == newRel]
-		if len(dependents) == 0:
-			for constraint in parser.inDepConstraints[newHead]:
-				if constraint.relType == newRel:
-					result += constraint.weight
-
-	# C_dir diff
-	if True: #(dependent - oldHead) * (dependent - newHead) < 0:
-		for constraint in parser.outDepConstraints[dependent]:
-			if (0 < oldHead < dependent and \
-				constraint.direction == constraint.LEFT) or \
-				(oldHead > dependent and \
-				 constraint.direction == constraint.RIGHT) or \
-				(oldHead == 0 and \
-				 constraint.direction == constraint.ROOT):
-				result -= constraint.weight
-
-			if (0 < newHead < dependent and \
-				constraint.direction == constraint.LEFT) or \
-				(newHead > dependent and \
-				 constraint.direction == constraint.RIGHT) or \
-				(newHead == 0 and \
-				 constraint.direction == constraint.ROOT):
-				result += constraint.weight
-
-	return result
-
-
-def approxNonProjective(sentence, parser):
-	#currentScore = 0 #evaluateTree(sentence, parser)
-	currentScore = evaluateTree(sentence, parser)
-
-	while True:
-		bestScore = float("-inf")
-		bestHead = None
-		bestDependent = None
-
-		for j in xrange(1, len(sentence) + 1):
-			for i in xrange(0, len(sentence) + 1):
-				assert type(sentence[j - 1][HEAD]) == int
-				if not sentence[j - 1][HEAD] == i and \
-					   not cyclic(sentence, i, j):
-
-					score = currentScore + scoreDiff(sentence, parser, j, i)
-					########
-					#newSentence = [t[:] for t in sentence]
-					#newSentence[j - 1][HEAD] = i
-					#if True: #i > 0:
-					#	depRels = parser.edgeConstraints[j][i]
-					#	assert len(depRels) <= 1
-					#	if depRels:
-					#		newSentence[j - 1][DEPREL] = depRels[0].relType
-					#	else:
-					#		newSentence[j - 1][DEPREL] = "unk" if i > 0 else "ROOT"
-					#assert abs(evaluateTree(newSentence, parser) - score) < 0.0001, ("%s %s" % (j, i))
-					#######
-
-					if score > bestScore:
-						bestScore = score
-						bestHead = i
-						bestDependent = j
-
-		if bestScore > currentScore:
-#			sys.stderr.write("+")
-			currentScore = bestScore
-			sentence[bestDependent - 1][HEAD] = bestHead
-			if True: #bestHead > 0:
-				depRels = parser.edgeConstraints[bestDependent][bestHead]
-				assert len(depRels) <= 1
-				if depRels:
-					sentence[bestDependent - 1][DEPREL] = depRels[0].relType
-				else:
-					sentence[bestDependent - 1][DEPREL] = "unk" if bestHead > 0 else "ROOT"
-			#else:
-			#	sentence[bestDependent - 1][DEPREL] = "ROOT"
-		else:
-			return
-
-
-def main(args):
-	import cmdline
-	main_(*cmdline.parse(__doc__, args))
-
-
-def main_(options, args):
-	assert options.dep
-	assert options.out
-	pairsStream = open(options.dep)
-	pairsIterator = csiparse.instanceIterator(pairsStream)
-#	print >> sys.stderr, "C_dep constraints enabled"
-
-	if options.dir:
-		dirStream = open(options.dir)
-		dirIterator = csiparse.instanceIterator(dirStream)
-#		print >> sys.stderr, "C_dir constraints enabled"
-	else:
-		dirIterator = None
-
-	if options.mod:
-		relsStream = open(options.mod)
-		relsIterator = csiparse.instanceIterator(relsStream)
-#		print >> sys.stderr, "C_mod constraints enabled"
-	else:
-		relsIterator = None
-	
-	
-	for sentence in sentenceIterator(fileinput.input(args)):
-		outfile = open(options.out, "w" )
-
-		domains, constraints = csiparse.formulateWCSP(sentence,
-													  dirIterator,
-													  relsIterator,
-													  pairsIterator,
-													  options)
-
-		parser = cky.CKYParser(len(sentence))
-		for constraint in constraints:
-			parser.addConstraint(constraint)
-
-		chart = parser.parse()
-
-		#item = chart[0, self.numTokens - 1, "r", True]
-
-		#for token in sentence:
-		#	token[DEPREL] = "__"
-		#	token[HEAD] = "__"
-		for token in sentence:
-			if len(token) <= DEPREL:
-				token.extend([None, None])  
-
-		#print chart[0, len(sentence) - 1, "r", True].r + 1
-		rightComplete(chart, 0, len(sentence) - 1 + 1, sentence)
-
-		if options.non_projective:
-			approxNonProjective(sentence, parser)
-
-		for token in sentence:
-			outfile.write( " ".join(map(str, token)) )
-			outfile.write("\n")
-		
-#		sys.stderr.write(".")
-
-
-if __name__ == "__main__":
-	import cmdline
-	main(*cmdline.parse())
diff --git a/scripts/csiparse2.py b/scripts/csiparse2.py
deleted file mode 100644
index cb40245..0000000
--- a/scripts/csiparse2.py
+++ /dev/null
@@ -1,192 +0,0 @@
-#!/usr/bin/env python
-
-"""
-Generate instances for the pairwise dependency prediction task.
-
-usage: %prog [options] [file...]
-
--mDIST, --max-dist=DIST: maximum distance between head and dependent
-
----
-:Refinements:
--m: type='int', dest='maxDist'
-"""
-
-import fileinput
-
-from itertools import imap, izip
-
-from sentences import sentenceIterator
-
-import common
-import deptree
-
-
-def list_rindex(lst, x):
-	for i in xrange(len(lst) - 1, -1, -1):
-		if lst[i] == x:
-			return i
-	raise ValueError("")
-
-
-def parseDist(string):
-	dist = dict((label.strip(), float(weight))
-				for label, weight in map(str.split, string.strip().split(",")))
-	normFactor = sum(dist.itervalues())
-	for cls, weight in dist.iteritems():
-		dist[cls] = weight / normFactor
-	
-	return dist
-
-
-def parseInstanceLine(line):
-	instance = line.split()
-	startIndex = list_rindex(instance, "{")
-	endIndex = instance.index("}", startIndex)
-	dist = parseDist(" ".join(instance[startIndex:endIndex]).strip("{}"))
-	return instance[:startIndex], dist, 0 #float(instance[endIndex+1])
-
-
-def instanceIterator(stream):
-	return imap(parseInstanceLine, stream)
-
-
-def formulateWCSP(sentence, dirInstances,
-				  relInstances, pairInstances,
-				  options):
-	domains = [None] + [[] for token in sentence]
-	constraints = []
-
-	for dependent in sentence:
-		dependentId = int(dependent[0])
-		headId = 0
-		instance, distribution, distance = pairInstances.next()
-
-		cls = instance[-1]
-		conf = distribution[cls]
-
-		if cls != "__":
-			constraints.append(deptree.HasDependency(dependentId,
-													 headId, cls,
-													 conf))
-		if cls != "__":
-			domains[dependentId].append((headId, cls))
-
-	for dependent, head in common.pairIterator(sentence, options):
-		dependentId = int(dependent[0])
-		headId = int(head[0])
-
-		instance, distribution, distance = pairInstances.next()
-
-		cls = instance[-1]
-		conf = distribution[cls]
-		#conf = sum(distribution[x] for x in distribution if x != "__")
-
-		#if distance == 0:
-		#	conf = 1000000
-		#else:
-		#	conf = 1.0 / distance
-
-		#constraints.append(deptree.HasDependency(dependentId,
-		#										 headId, cls,
-		#										 conf))
-		if cls != "__":
-			constraints.append(deptree.HasDependency(dependentId,
-													 headId, cls,
-													 conf))
-		if cls != "__":
-			domains[dependentId].append((headId, cls))
-
-
-	if dirInstances:
-		for token, (instance, distribution, distance) in izip(sentence,
-															  dirInstances):
-			tokenId = int(token[0])
-			cls = instance[-1]
-			if True: #cls != "__":
-				#constraints.append(deptree.DependencyDirection(
-				#	tokenId,
-				#	getattr(deptree.DependencyDirection, cls),
-				#	distribution[cls]))
-
-				for cls in distribution:
-					constraints.append(deptree.DependencyDirection(
-						tokenId,
-						getattr(deptree.DependencyDirection, cls),
-						distribution[cls]))
-
-				#if "__" in distribution:
-				#	constraints.append(deptree.DependencyDirection(
-				#		tokenId, 100, distribution["__"]))
-				#if "RIGHT" in distribution:
-				#	cls = "RIGHT"
-				#	constraints.append(deptree.DependencyDirection(
-				#		tokenId,
-				#		getattr(deptree.DependencyDirection, cls),
-				#		distribution[cls]))
-				#if "LEFT" in distribution:
-				#	cls = "LEFT"
-				#	constraints.append(deptree.DependencyDirection(
-				#		tokenId,
-				#		getattr(deptree.DependencyDirection, cls),
-				#		distribution[cls]))
-			#else:
-			#	constraints.append(deptree.DependencyDirection(
-			#		tokenId, deptree.DependencyDirection.LEFT,
-			#		-distribution[cls]))
-			#	constraints.append(deptree.DependencyDirection(
-			#		tokenId, deptree.DependencyDirection.RIGHT,
-			#		-distribution[cls]))
-
-	if relInstances:
-		for token, (instance, distribution, distance) in izip(sentence,
-															  relInstances):
-			tokenId = int(token[0])
-			cls = instance[-1]
-
-			distribution = dict((tuple(key.split("|")), value)
-								for key, value
-								in distribution.iteritems())
-
-			if cls != "__":
-				for rel in cls.split("|"):
-					conf = sum(value
-							   for key, value
-							   in distribution.iteritems()
-							   if rel in key)
-
-					constraints.append(deptree.HasIncomingRel(tokenId,
-															  rel,
-															  conf))
-
-
-	return domains, constraints
-
-
-def main(options, args):
-	dirOutput, relsOutput, pairsOutput = args[:3]
-
-	dirStream = open(dirOutput)
-	relsStream = open(relsOutput)
-	pairsStream = open(pairsOutput)
-
-	dirIterator = instanceIterator(dirStream)
-	relsIterator = instanceIterator(relsStream)
-	pairsIterator = instanceIterator(pairsStream)
-	
-	for sentence in sentenceIterator(fileinput.input(args[3:])):
-		csp = formulateWCSP(sentence,
-							dirIterator,
-							relsIterator,
-							pairsIterator,
-							options)
-
-
-	dirStream.close()
-	relsStream.close()
-	pairsStream.close()
-
-
-if __name__ == "__main__":
-	import cmdline
-	main(*cmdline.parse())
diff --git a/scripts/deptree.py b/scripts/deptree.py
deleted file mode 100755
index 963db4f..0000000
--- a/scripts/deptree.py
+++ /dev/null
@@ -1,124 +0,0 @@
-from itertools import izip
-
-
-class Node:
-
-	def __init__(self):
-		self.outgoingRelation = None
-		self.incomingRelations = set()
-
-
-class DependencyTree:
-
-	def __init__(self, numTokens):
-		self.nodes = [Node() for i in xrange(numTokens)]
-		self.relations = []
-
-	def addRelation(self, source, dest, relType):
-		rel = (self.nodes[source], self.nodes[dest], relType)
-		self.relations.append(rel)
-		self.nodes[source].outgoingRelation = (dest, relType)
-		self.nodes[dest].incomingRelations.add((source, relType))
-
-	def removeRelation(self, source):
-		dest, relType = self.nodes[source].outgoingRelation
-		rel = (self.nodes[source], self.nodes[dest], relType)
-		self.relations.remove(rel)
-		self.nodes[source].outgoingRelation = None
-		self.nodes[dest].incomingRelations.remove((source, relType))
-
-	def findCycle(self):
-		visitedNodes = set()
-		for node in self.nodes:
-			if node not in visitedNodes:
-				result = self.visitNode(node, visitedNodes)
-				if result:
-					return result
-
-	def visitNode(self, node, visitedNodes):
-		currentNodes = set()
-		currentNode = node
-		path = []
-
-		while currentNode.outgoingRelation:
-			currentNodes.add(currentNode)
-			visitedNodes.add(currentNode)
-
-			path.append(currentNode)
-			
-			dest, relType = currentNode.outgoingRelation
-			dest = self.nodes[dest]
-			if dest in currentNodes:
-				return path[path.index(dest):]
-			elif dest in visitedNodes:
-				return None
-			else:
-				currentNode = dest
-
-		return None
-
-
-class Constraint:
-
-	def __init__(self, weight):
-		self.weight = weight
-
-	def isSatisfied(self, tree):
-		raise NotImplementedError
-
-	def getValue(self, tree):
-		if self.isSatisfied(tree):
-			return self.weight
-		else:
-			return 0.0
-
-
-class HasIncomingRel(Constraint):
-
-	def __init__(self, tokenIndex, relType, weight):
-		Constraint.__init__(self, weight)
-		self.tokenIndex = tokenIndex
-		self.relType = relType
-
-	def isSatisfied(self, tree):
-		return self.relType in [rel[1] for rel in tree.nodes[self.tokenIndex].incomingRelations]
-
-
-class HasDependency(Constraint):
-
-	def __init__(self, tokenIndex, headIndex, relType, weight):
-		Constraint.__init__(self, weight)
-		self.tokenIndex = tokenIndex
-		self.headIndex = headIndex
-		self.relType = relType
-
-	def isSatisfied(self, tree):
-		return tree.nodes[self.tokenIndex].outgoingRelation == (self.headIndex, self.relType)
-
-
-class DependencyDirection(Constraint):
-
-	ROOT, LEFT, RIGHT = range(3)
-
-	def __init__(self, tokenIndex, direction, weight):
-		Constraint.__init__(self, weight)
-		self.tokenIndex = tokenIndex
-		self.direction = direction
-
-	def isSatisfied(self, tree):
-		return tree.nodes[self.tokenIndex].outgoingRelation != None and int(tree.nodes[self.tokenIndex].outgoingRelation[0] - self.tokenIndex > 0) == self.direction
-
-
-def writeDepTree(tree, sentence, stream=None):
-	for node, token in izip(tree.nodes, sentence):
-		line = list(token)
-
-		if node.outgoingRelation:
-			headIndex, relType = node.outgoingRelation
-			line[6:8] = str(headIndex + 1), relType
-		else:
-			line[6:8] = "0", "ROOT"
-
-		print >> stream, "\t".join(line)
-
-	print >> stream
diff --git a/scripts/dir.py b/scripts/dir.py
deleted file mode 100755
index 8926566..0000000
--- a/scripts/dir.py
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/env python
-
-import fileinput
-
-from itertools import izip
-from operator import itemgetter
-
-from sentences import sentenceIterator, makeWindow
-
-from common import *
-
-
-def main(args):
-	for sentence in sentenceIterator(fileinput.input()):
-		for i, token in enumerate(sentence):
-			features = []
-
-			#if i == 0:
-			#	features.append("FIRST")
-			#elif i + 1 == len(sentence):
-			#	features.append("LAST")
-			#else:
-			#	features.append("MIDDLE")
-
-			# window of words
-			features.extend(makeWindow(sentence, i, 2, 2, itemgetter(FORM)))
-
-			# window of pos tags
-			features.extend(makeWindow(sentence, i, 2, 2, itemgetter(POSTAG)))
-
-			# window of word-tag conjunctions
-			features.extend(makeWindow(sentence, i, 2, 2, lambda x: "%s^%s" % (x[FORM], x[POSTAG])))
-
-			# pos conjunctions
-			features.append("^".join(makeWindow(sentence, i, 1, 0, itemgetter(POSTAG))))
-			features.append("^".join(makeWindow(sentence, i, 0, 1, itemgetter(POSTAG))))
-
-			#features.append("^".join(makeWindow(sentence, i, 2, 0, itemgetter(POSTAG))))
-			#features.append("^".join(makeWindow(sentence, i, 0, 2, itemgetter(POSTAG))))
-
-
-			#features.append(token[FEATS])
-			features.extend(makeWindow(sentence, i, 1, 1, itemgetter(FEATS)))
-			
-			if token[HEAD] == "0":
-				dir = "ROOT"
-			else:
-				dir = ["LEFT", "RIGHT"][int(token[ID]) < int(token[HEAD])]
-
-			print " ".join(features), dir
-
-		print
-
-
-if __name__ == "__main__":
-	import sys
-	main(sys.argv[1:])
diff --git a/scripts/pairs.py b/scripts/pairs.py
deleted file mode 100755
index a5933d2..0000000
--- a/scripts/pairs.py
+++ /dev/null
@@ -1,171 +0,0 @@
-#!/usr/bin/env python
-
-"""
-Generate instances for the pairwise dependency prediction task.
-
-usage: %prog [options] [file...]
-
--mDIST, --max-dist=DIST: maximum distance between head and dependent
--x, --exclude-non-scoring: do not generate instance for non-scoring
-                           tokens
--t, --test: test data mode: the input does not contain HEAD and DEPREL
-            columns
--s, --separate-sentences: separate instances from different sentences by
-                          an empty line
-
-Features:
---bigram: add a head-dependent bigram feature
---feats-bigram: add a head-dependent bigram of the FEATS column
-
----
-:Refinements:
--m: type='int', dest='maxDist'
--x: action='store_true', default=False, dest='skipNonScoring'
--t: action='store_true', default=False
--s: action='store_true', default=False, dest='separateSentences'
---bigram: action='store_true', default=False
---feats-bigram: action='store_true', default=False, dest='featsBigram'
-"""
-
-import fileinput
-
-from itertools import izip
-from operator import itemgetter
-
-from sentences import sentenceIterator, makeWindow
-
-import common
-
-from common import *  # COLUMN INDEXES ONLY
-
-
-def main(options, args):
-	for sentence in sentenceIterator(fileinput.input(args)):
-		for dependent in sentence:
-			dist = "ROOTDEP"
-			features = []
-
-			dependentId = int(dependent[ID]) - 1
-
-			# window of words
-			features.extend(makeWindow(sentence, dependentId,
-									   1, 1, itemgetter(FORM)))
-#									   2, 2, itemgetter(FORM)))
-			#features.extend(makeWindow(sentence, headId,
-			#						   1, 1, itemgetter(FORM)))
-
-			features.extend(["ROOT", "ROOT", "ROOT"])
-			
-#									   2, 2, itemgetter(FORM)))
-
-			# window of pos tags
-			features.extend(makeWindow(sentence, dependentId,
-									   1, 1, itemgetter(POSTAG)))
-#									   2, 2, itemgetter(POSTAG)))
-			#features.extend(makeWindow(sentence, headId,
-			#						   1, 1, itemgetter(POSTAG)))
-			features.extend(["ROOT", "ROOT", "ROOT"])
-#									   2, 2, itemgetter(POSTAG)))
-
-			#for id in [dependentId, headId]:
-			#	window = makeWindow(sentence, id,
-			#	                    2, 2, itemgetter(POSTAG))
-			#	features.append("%s^%s" % tuple(window[:2]))
-			#	features.append("%s^%s" % tuple(window[-2:]))
-
-			features.append("%s^%s" % (dependent[POSTAG], "ROOT"))
-
-			# relative position, distance
-			#features.append(
-			#	["LEFT", "RIGHT"][dependentId < headId])
-			features.append("ROOT")
-			#features.append(str(abs(dependentId - headId)))
-			features.append("ROOT")
-
-			if options.bigram:
-				features.append("^".join(["ROOT", dependent[FORM]]))
-
-			if options.featsBigram:
-				features.append("^".join(["ROOT", dependent[FEATS]]))
-
-			#posTags = map(itemgetter(CPOSTAG), sentence[min(dependentId, headId):max(dependentId, headId)])
-			#for tag in ["CC", "CD", "DT", "EX", "FW", "IN", "JJ", "MD",
-			#            "NN", "PD", "PO", "PR", "RB", "RP", "SY", "TO",
-			#            "UH", "VB", "WD", "WP", "WR"]:
-			#	features.append(str(sum(1 for t in posTags if t == tag)))
-			
-			if not options.test:
-				if dependent[HEAD] == "0":
-					rel = dependent[DEPREL]
-				else:
-					rel = "__"
-			else:
-				rel = "?"
-
-			print " ".join(features), rel
-		
-		for dependent, head in common.pairIterator(sentence, options):
-			dist = abs(int(dependent[ID]) - int(head[ID]))
-			features = []
-
-			dependentId = int(dependent[ID]) - 1
-			headId = int(head[ID]) - 1
-
-			# window of words
-			features.extend(makeWindow(sentence, dependentId,
-									   1, 1, itemgetter(FORM)))
-#									   2, 2, itemgetter(FORM)))
-			features.extend(makeWindow(sentence, headId,
-									   1, 1, itemgetter(FORM)))
-#									   2, 2, itemgetter(FORM)))
-
-			# window of pos tags
-			features.extend(makeWindow(sentence, dependentId,
-									   1, 1, itemgetter(POSTAG)))
-#									   2, 2, itemgetter(POSTAG)))
-			features.extend(makeWindow(sentence, headId,
-									   1, 1, itemgetter(POSTAG)))
-#									   2, 2, itemgetter(POSTAG)))
-
-			#for id in [dependentId, headId]:
-			#	window = makeWindow(sentence, id,
-			#	                    2, 2, itemgetter(POSTAG))
-			#	features.append("%s^%s" % tuple(window[:2]))
-			#	features.append("%s^%s" % tuple(window[-2:]))
-
-			features.append("%s^%s" % (dependent[POSTAG], head[POSTAG]))
-
-			# relative position, distance
-			features.append(
-				["LEFT", "RIGHT"][dependentId < headId])
-			features.append(str(abs(dependentId - headId)))
-
-			if options.bigram:
-				features.append("^".join([head[FORM], dependent[FORM]]))
-
-			if options.featsBigram:
-				features.append("^".join([head[FEATS], dependent[FEATS]]))
-
-			#posTags = map(itemgetter(CPOSTAG), sentence[min(dependentId, headId):max(dependentId, headId)])
-			#for tag in ["CC", "CD", "DT", "EX", "FW", "IN", "JJ", "MD",
-			#            "NN", "PD", "PO", "PR", "RB", "RP", "SY", "TO",
-			#            "UH", "VB", "WD", "WP", "WR"]:
-			#	features.append(str(sum(1 for t in posTags if t == tag)))
-			
-			if not options.test:
-				if dependent[HEAD] == head[ID]:
-					rel = dependent[DEPREL]
-				else:
-					rel = "__"
-			else:
-				rel = "?"
-
-			print " ".join(features), rel
-
-		if options.separateSentences:
-			print
-
-
-if __name__ == "__main__":
-	import cmdline
-	main(*cmdline.parse())
diff --git a/scripts/rels.py b/scripts/rels.py
deleted file mode 100755
index 43d6bb5..0000000
--- a/scripts/rels.py
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/env python
-
-import fileinput
-
-from itertools import izip
-from operator import itemgetter
-
-from sentences import sentenceIterator, makeWindow
-
-from common import *
-
-
-def main(args):
-	for sentence in sentenceIterator(fileinput.input()):
-		rels = [set() for t in sentence]
-		for token in sentence:
-			if token[HEAD] != "0":
-				head = int(token[HEAD]) - 1
-				rels[head].add(token[DEPREL])
-
-		for i, token in enumerate(sentence):
-			features = []
-		
-			# window of words
-			features.extend(makeWindow(sentence, i, 2, 2, itemgetter(FORM)))
-
-			features.append(token[FEATS])
-			
-			# window of pos tags
-			features.extend(makeWindow(sentence, i, 2, 2, itemgetter(POSTAG)))
-
-			# pos conjunctions
-			features.append("^".join(makeWindow(sentence, i, 1, 0, itemgetter(POSTAG))))
-			features.append("^".join(makeWindow(sentence, i, 0, 1, itemgetter(POSTAG))))
-
-			features.append("^".join(makeWindow(sentence, i, 2, 0, itemgetter(POSTAG))))
-			features.append("^".join(makeWindow(sentence, i, 0, 2, itemgetter(POSTAG))))
-
-			## distance to comma
-			#left = map(itemgetter(FORM), sentence[:i])
-			#right = map(itemgetter(FORM), sentence[i+1:])
-			#left.reverse()
-			#if "," in left:
-			#	features.append(str(left.index(",")))
-			#else:
-			#	features.append("-")
-
-			#if "," in right:
-			#	features.append(str(right.index(",")))
-			#else:
-			#	features.append("-")
-
-			## bag-of-POS
-			#left = map(itemgetter(CPOSTAG), sentence[:i])
-			#left.reverse()
-			#right = map(itemgetter(CPOSTAG), sentence[i+1:])
-			#for tag in ["CC", "CD", "DT", "EX", "FW", "IN", "JJ", "MD",
-			#            "NN", "PD", "PO", "PR", "RB", "RP", "SY", "TO",
-			#            "UH", "VB", "WD", "WP", "WR"]:
-			#	features.append(str(left.index(tag)) if tag in left else "-")
-			#	features.append(str(right.index(tag)) if tag in right else "-")
-
-			print " ".join(features), "|".join(sorted(rels[i])) or "__"
-
-		print
-
-
-if __name__ == "__main__":
-	import sys
-	main(sys.argv[1:])
diff --git a/scripts/sentences.py b/scripts/sentences.py
deleted file mode 100644
index cfd9e6e..0000000
--- a/scripts/sentences.py
+++ /dev/null
@@ -1,64 +0,0 @@
-####
-#
-# Pylet - Python Language Engineering Toolkit
-# Written by Sander Canisius <S.V.M.Canisius at uvt.nl>
-#
-
-from itertools import takewhile, ifilter, imap
-
-
-uttDelimiterTest = lambda line: line.startswith("<utt>")
-emptyLineDelimiterTest = lambda line: not line.strip()
-
-
-class filterFn:
-
-	def __init__(self, delimiterTest):
-		self.delimiterTest = delimiterTest
-		self.keep = False
-
-	def __call__(self, line):
-		if self.delimiterTest(line):
-			result = self.keep
-			self.keep = False
-		else:
-			result = True
-			self.keep = True
-		
-		return result
-
-
-def sentenceIterator(stream, delimiterTest=emptyLineDelimiterTest):
-	lineTest = lambda line: not delimiterTest(line)
-
-	# FIXME: the following code makes sure that extra lines of
-	# whitespace do not cause the iterator to stop before reaching
-	# the actual end of the stream. Most likely, this can be
-	# implemented more efficiently.
-	stream = ifilter(filterFn(delimiterTest), stream)
-
-	sentence = map(str.split, takewhile(lineTest, stream))
-	while sentence:
-		yield sentence
-		sentence = map(str.split, takewhile(lineTest, stream))
-
-
-def nonDelimitedSentenceIterator(stream, sentenceStartTest):
-	sentence = []
-	for line in imap(str.split, stream):
-		if sentenceStartTest(line) and sentence:
-			yield sentence
-			sentence = []
-
-		sentence.append(line)
-
-	if sentence:
-		yield sentence
-
-
-def makeWindow(tokens, focusIndex, leftSize, rightSize, labelFunction,
-			   emptySlotLabel="__"):
-	return max(0, leftSize - focusIndex) * [emptySlotLabel] + \
-		   map(labelFunction,
-			   tokens[max(0, focusIndex - leftSize):min(len(tokens), focusIndex + rightSize + 1)]) + \
-		   max(0, focusIndex + rightSize - len(tokens) + 1) * [emptySlotLabel]
diff --git a/src/Frog-util.cxx b/src/Frog-util.cxx
old mode 100755
new mode 100644
index ce99967..0fa9d37
--- a/src/Frog-util.cxx
+++ b/src/Frog-util.cxx
@@ -1,38 +1,37 @@
+/* ex: set tabstop=8 expandtab: */
 /*
-  $Id: Frog-util.cxx 16815 2014-01-06 10:00:29Z sloot $
-  $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/src/Frog-util.cxx $
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
 
-  Copyright (c) 2006 - 2014
-  Tilburg University
+  This file is part of frog:
 
-  This file is part of frog
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
 
   frog 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.  
+  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.
 
   frog 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.  
+  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/>.  
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
   For questions and suggestions, see:
-      http://ilk.uvt.nl/software.html
+      https://github.com/LanguageMachines/frog/issues
   or send mail to:
-      timbl at uvt.nl
-*/                                                                   
+      lamasoftware (at ) science.ru.nl
 
-#include <iostream>
-#include <fstream>
+*/
+
+#include <set>
 #include <string>
-#include <vector>
-#include <cstdlib>
 #include "config.h"
-#include "timbl/TimblAPI.h"
 #include "frog/Frog.h"
 
 #include <sys/types.h>
@@ -44,25 +43,17 @@
 using namespace std;
 
 string prefix( const string& path, const string& fn ){
-  if ( fn.find( "/" ) == string::npos ){
-    // only append prefix when NO path is specified
-    return path + fn;
+  if ( fn.find( "/" ) == string::npos && !path.empty() ){
+    // only append prefix when it isn't empty AND
+    // NO path is specified in the filename
+    return path + "/" + fn;
   }
   return fn;
 }
 
 #ifdef HAVE_DIRENT_H
-bool existsDir( const string& dirName ){
-  bool result = false;
-  DIR *dir = opendir( dirName.c_str() );
-  if ( dir ){
-    result = (closedir( dir ) == 0);
-  }
-  return result;
-}
-
 void getFileNames( const string& dirName,
-		   const string& ext, 
+		   const string& ext,
 		   set<string>& fileNames ){
   DIR *dir = opendir( dirName.c_str() );
   if ( !dir )
diff --git a/src/Frog.cxx b/src/Frog.cxx
old mode 100755
new mode 100644
index 32fb9a6..4eba70a
--- a/src/Frog.cxx
+++ b/src/Frog.cxx
@@ -1,13 +1,13 @@
+/* ex: set tabstop=8 expandtab: */
 /*
-  $Id: Frog.cxx 17459 2014-07-16 15:28:07Z sloot $
-  $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/src/Frog.cxx $
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
 
-  Copyright (c) 2006 - 2014
-  Tilburg University
+  This file is part of frog:
 
-  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for Dutch
-
-  This file is part of frog
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
 
   frog is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -23,9 +23,10 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
   For questions and suggestions, see:
-      http://ilk.uvt.nl/software.html
+      https://github.com/LanguageMachines/frog/issues
   or send mail to:
-      timbl at uvt.nl
+      lamasoftware (at ) science.ru.nl
+
 */
 
 #include <cstdlib>
@@ -38,86 +39,36 @@
 #include <sstream>
 #include <fstream>
 #include <vector>
-#include <omp.h>
-
 #include "config.h"
-
-#ifdef HAVE_LIBREADLINE
-#  if defined(HAVE_READLINE_READLINE_H)
-#    include <readline/readline.h>
-#  elif defined(HAVE_READLINE_H)
-#    include <readline.h>
-#  endif /* !defined(HAVE_READLINE_H) */
-#endif /* HAVE_LIBREADLINE */
-
-#ifdef HAVE_READLINE_HISTORY
-#  if defined(HAVE_READLINE_HISTORY_H)
-#    include <readline/history.h>
-#  elif defined(HAVE_HISTORY_H)
-#    include <history.h>
-#  endif /* defined(HAVE_READLINE_HISTORY_H) */
-#endif /* HAVE_READLINE_HISTORY */
-
-// Python.h seems to set HAVE_LIBREADLINE so we include this late...
-#include "Python.h"
+#ifdef HAVE_OPENMP
+#include <omp.h>
+#endif
 
 #include "timbl/TimblAPI.h"
-#include "timblserver/FdStream.h"
-#include "timblserver/ServerBase.h"
+#include "ticcutils/FdStream.h"
+#include "ticcutils/ServerBase.h"
 
 // individual module headers
 
-#include "frog/Frog.h"
-#include "ticcutils/Configuration.h"
+#include "frog/Frog.h" //internal interface, included by all modules
+#include "frog/FrogAPI.h" //public API interface
+#include "frog/ucto_tokenizer_mod.h"
+#include "frog/pos_tagger_mod.h"
 #include "ticcutils/StringOps.h"
 #include "ticcutils/CommandLine.h"
-#include "frog/ucto_tokenizer_mod.h"
-#include "frog/mbma_mod.h"
-#include "frog/mblem_mod.h"
-#include "frog/mwu_chunker_mod.h"
-#include "frog/cgn_tagger_mod.h"
-#include "frog/iob_tagger_mod.h"
-#include "frog/ner_tagger_mod.h"
-#include "frog/Parser.h"
+#include "ticcutils/FileUtils.h"
 
 using namespace std;
 using namespace folia;
 using namespace TiCC;
 
-LogStream my_default_log( cerr, "frog-", StampMessage ); // fall-back
-LogStream *theErrLog = &my_default_log;  // fill the externals
-
 string testDirName;
-string tmpDirName;
 string outputFileName;
-string docid = "untitled";
-string textclass;
 bool wantOUT;
 string XMLoutFileName;
-bool doXMLin;
-bool doXMLout;
-bool doKanon;
 string outputDirName;
 string xmlDirName;
 set<string> fileNames;
-string ProgName;
-int debugFlag = 0; //0 for none, more for more output
-unsigned int maxParserTokens = 0; // 0 for unlimited
-bool doTok = true;
-bool doLemma = true;
-bool doMorph = true;
-bool doDaringMorph = false;
-bool doMwu = true;
-bool doIOB = true;
-bool doNER = true;
-bool doParse = true;
-bool doDirTest = false;
-bool doServer = false;
-bool doSentencePerLine = false;
-bool doQuoteDetection = false;
-string listenport = "void";
-string encoding;
-string uttmark = "";
 
 /* assumptions:
    each components gets its own configfile per cmdline options
@@ -139,15 +90,13 @@ string uttmark = "";
 */
 
 Configuration configuration;
-static string configDir = string(SYSCONF_PATH) + "/" + PACKAGE + "/";
-static string configFileName = configDir + "frog.cfg";
 
 void usage( ) {
   cout << endl << "Options:\n";
   cout << "\t============= INPUT MODE (mandatory, choose one) ========================\n"
        << "\t -e <encoding>          specify encoding of the input (default UTF-8)\n"
        << "\t -t <testfile>          Run frog on this file\n"
-       << "\t -x <testfile>          Run frog on this FoLiA XML file. Or the files form 'testdir'\n"
+       << "\t -x <testfile>          Run frog on this FoLiA XML file. Or the files from 'testdir'\n"
        << "\t --textclass=<cls>      use the specified class to search for text in the the FoLia docs.\n"
        << "\t --testdir=<directory>  All files in this dir will be tested\n"
        << "\t --uttmarker=<mark>     utterances are separated by 'mark' symbols"
@@ -158,90 +107,75 @@ void usage( ) {
        << "\t============= MODULE SELECTION ==========================================\n"
        << "\t --skip=[mptncla]    Skip Tokenizer (t), Lemmatizer (l), Morphological Analyzer (a), Chunker (c), Multi-Word Units (m), Named Entity Recognition (n), or Parser (p) \n"
        << "\t============= CONFIGURATION OPTIONS =====================================\n"
-       << "\t -c <filename>    Set configuration file (default " << configFileName << ")\n"
+       << "\t -c <filename>    Set configuration file (default "
+       << FrogAPI::defaultConfigFile() << ")\n"
        << "\t============= OUTPUT OPTIONS ============================================\n"
        << "\t -o <outputfile>	    Output columned output to file, instead of default stdout\n"
        << "\t -X <xmlfile>          Output also to an XML file in FoLiA format\n"
        << "\t --id=<docid>          Document ID, used in FoLiA output. (Default 'untitled')\n"
        << "\t --outputdir=<dir>     Output to dir, instead of default stdout\n"
        << "\t --xmldir=<dir>        Use 'dir' to output FoliA XML to.\n"
-       << "\t --tmpdir=<directory>  (location to store intermediate files. Default /tmp )\n"
-       << "\t --keep-parser-files=[yes|no] keep intermediate parser files. (last sentence only).\n"
+       << "\t --deep-morph          add deep morphological information to the output\n"
        << "\t============= OTHER OPTIONS ============================================\n"
-       << "\t -h. give some help.\n"
-       << "\t -V or --version .   Show version info.\n"
-       << "\t -d <debug level>    (for more verbosity)\n"
+       << "\t -h or --help          give some help.\n"
+       << "\t -V or --version       Show version info.\n"
+       << "\t -d <debug level>  (for more verbosity)\n"
        << "\t --debug=<module><level>,<module><level>... (eg --debug=l5,n3) \n"
        << "\t\t Set debug value for Tokenizer (t), Lemmatizer (l), Morphological Analyzer (a), Chunker (c), Multi-Word Units (m), Named Entity Recognition (n), or Parser (p) \n"
        << "\t -S <port>              Run as server instead of reading from testfile\n"
 #ifdef HAVE_OPENMP
-       << "\t --threads=<n>       Use a maximun of 'n' threads. Default: all we can get. \n"
+       << "\t --threads=<n>       Use a maximum of 'n' threads. Default: all we can get. \n"
 #endif
        << "\t                     (but always 1 for server mode)\n";
 }
 
-//**** stuff to process commandline options *********************************
-
-static Mbma myMbma;
-static Mblem myMblem;
-static Mwu myMwu;
-static Parser myParser;
-static CGNTagger myCGNTagger;
-static IOBTagger myIOBTagger;
-static NERTagger myNERTagger;
-static UctoTokenizer tokenizer;
-
-
-bool parse_args( TiCC::CL_Options& Opts ) {
-  string value;
-  bool mood;
-  if ( Opts.find('V', value, mood ) ||
-       Opts.find("version", value ) ){
-    // we already did show what we wanted.
-    exit( EXIT_SUCCESS );
-  }
-  if ( Opts.find ('h', value, mood)) {
-    usage();
-    exit( EXIT_SUCCESS );
-  };
-  // is a config file specified?
-  if ( Opts.find( 'c',  value, mood ) ) {
-    configFileName = value;
-    Opts.remove( 'c' );
-  };
-
+bool parse_args( TiCC::CL_Options& Opts,
+		 FrogOptions& options,
+		 LogStream* theErrLog ) {
+  // process the command line and fill FrogOptions to initialize the API
+  // also fill some globals we use for our own main.
+
+  // is a language specified? Default is dutch
+  string language = "nl";
+  Opts.extract ("language", language );
+  // is a config file for this language specified?
+  string configFileName = FrogAPI::defaultConfigFile(language);
+  if ( language == "nl" && !TiCC::isFile( configFileName ) ){
+    // for now, ignore language when it is dutch
+    language.clear();
+    configFileName = FrogAPI::defaultConfigFile();
+  }
+  options.language = language;
+  // override language settings when a configfile is specified
+  Opts.extract( 'c',  configFileName );
   if ( configuration.fill( configFileName ) ){
     *Log(theErrLog) << "config read from: " << configFileName << endl;
   }
   else {
-    cerr << "failed te read configuration from! '" << configFileName << "'" << endl;
-    cerr << "did you correctly install the frogdata package?" << endl;
+    cerr << "failed to read configuration from '" << configFileName << "' !!" << endl;
+    cerr << "Did you correctly install the frogdata package?" << endl;
     return false;
   }
 
+  string value;
   // debug opts
-  if ( Opts.find ('d', value, mood)) {
-    if ( !stringTo<int>( value, debugFlag ) ){
+  if ( Opts.extract ('d', value) ) {
+    if ( !stringTo<int>( value, options.debugFlag ) ){
       *Log(theErrLog) << "-d value should be an integer" << endl;
       return false;
     }
     configuration.setatt( "debug", value );
-    Opts.remove('d');
   }
   else {
     configuration.setatt( "debug", "0" );
   }
-  if ( Opts.find( "debug", value ) ) {
-    if ( value.empty() ){
-      *Log(theErrLog) << "missing a value for --debug (did you forget the '='?)" << endl;
-      return false;
-    }
+  if ( Opts.extract( "debug", value ) ) {
     value = TiCC::lowercase( value );
     vector<string> vec;
     TiCC::split_at( value, vec, "," );
-    for ( size_t i=0; i < vec.size(); ++i ){
-      char mod = vec[i][0];
-      string value = vec[i].substr(1);
+    for ( const auto& val : vec ){
+      char mod = val[0];
+      string value = val.substr(1);
       int dbval = 0;
       if ( !stringTo<int>( value, dbval ) ){
 	cerr << "expected integer value for --debug=" << mod << value << endl;
@@ -274,244 +208,147 @@ bool parse_args( TiCC::CL_Options& Opts ) {
 	return false;
       }
     }
-    Opts.remove("debug");
   }
 
-  if ( Opts.find ('n', value, mood)) {
-    doSentencePerLine = true;
-  };
-  if ( Opts.find ('Q', value, mood)) {
-    doQuoteDetection = true;
-  };
-  if ( Opts.find( "skip", value )) {
-    if ( value.empty() ){
-      *Log(theErrLog) << "missing a value for --skip (did you forget the '='?)" << endl;
-      return false;
-    }
+  options.doSentencePerLine = Opts.extract( 'n' );
+  options.doQuoteDetection = Opts.extract( 'Q' );
+  if ( Opts.extract( "skip", value )) {
     string skip = value;
     if ( skip.find_first_of("tT") != string::npos )
-      doTok = false;
+      options.doTok = false;
     if ( skip.find_first_of("lL") != string::npos )
-      doLemma = false;
+      options.doLemma = false;
     if ( skip.find_first_of("aA") != string::npos )
-      doMorph = false;
+      options.doMorph = false;
     if ( skip.find_first_of("mM") != string::npos )
-      doMwu = false;
+      options.doMwu = false;
     if ( skip.find_first_of("cC") != string::npos )
-      doIOB = false;
+      options.doIOB = false;
     if ( skip.find_first_of("nN") != string::npos )
-      doNER = false;
+      options.doNER = false;
     if ( skip.find_first_of("pP") != string::npos )
-      doParse = false;
+      options.doParse = false;
+    else if ( !options.doMwu ){
+      *Log(theErrLog) << " Parser disabled, because MWU is deselected" << endl;
+      options.doParse = false;
+    }
     Opts.remove("skip");
   };
 
-  if ( Opts.find( "daring", value ) ) {
-    if ( value.empty() )
-      value = "1";
-    doDaringMorph = stringTo<bool>( value );
-    if ( doDaringMorph ){
-      doMorph = true;
-    }
-  }
-  if ( Opts.find( 'e', value, mood)) {
-    encoding = value;
+  if ( Opts.extract( "deep-morph" ) ) {
+    options.doDeepMorph = true;
+    options.doMorph = true;
   }
 
-  if ( Opts.find( "max-parser-tokens", value ) ){
-    if ( value.empty() ){
-      *Log(theErrLog) << "max-parser-tokens option without value " << endl;
+  Opts.extract( 'e', options.encoding );
+
+  if ( Opts.extract( "max-parser-tokens", value ) ){
+    if ( !stringTo<unsigned int>( value, options.maxParserTokens ) ){
+      *Log(theErrLog) << "max-parser-tokens value should be an integer" << endl;
       return false;
     }
-    else {
-      if ( !stringTo<unsigned int>( value, maxParserTokens ) ){
-	*Log(theErrLog) << "max-parser-tokens value should be an integer" << endl;
-	return false;
-      }
-    }
-    Opts.remove("max-parser-tokens");
   }
 
-  if ( Opts.find ('S', value, mood)) {
-    doServer = true;
-    listenport= value;
-  }
+  options.doServer = Opts.extract('S', options.listenport );
+
 #ifdef HAVE_OPENMP
-  if ( doServer ) {
+  if ( options.doServer ) {
     // run in one thread in server mode, forking is too expensive for lots of small snippets
-    omp_set_num_threads( 1 );
+    options.numThreads =  1;
+    Opts.extract( "threads", value ); //discard threads option
   }
-  else if ( Opts.find( "threads", value ) ){
-    if ( value.empty() ){
-      *Log(theErrLog) << "missing a value for --threads (did you forget the '='?)" << endl;
-      return false;
-    }
+  else if ( Opts.extract( "threads", value ) ){
     int num;
     if ( !stringTo<int>( value, num ) || num < 1 ){
       *Log(theErrLog) << "threads value should be a positive integer" << endl;
       return false;
     }
-    omp_set_num_threads( num );
+    options.numThreads = num;
+  }
+#else
+  if ( Opts.extract( "threads", value ) ){
+    *Log(theErrLog) << "WARNING!\n---> There is NO OpenMP support enabled\n"
+		    << "---> --threads=" << value << " is ignored.\n"
+		    << "---> Will continue on just 1 thread." << endl;
   }
 #endif
 
-  if ( Opts.find( "keep-parser-files", value ) ){
-    if ( value.empty() ||
-	 stringTo<bool>( value ) ){
-      configuration.setatt( "keepIntermediateFiles", "true", "parser" );
-      Opts.remove("keep-parser-files");
-    }
-  }
-  tmpDirName = configuration.lookUp( "tmpdir", "global" );
-  if ( Opts.find ( "tmpdir", value )) {
-    if ( value.empty() ){
-      *Log(theErrLog) << "missing a value for --tmpdir (did you forget the '='?)" << endl;
-      return false;
-    }
-    tmpDirName = value;
-    Opts.remove("tmpdir");
-  }
-  if ( tmpDirName.empty() ){
-    tmpDirName = "/tmp/";
+  if ( Opts.extract( "keep-parser-files" ) ){
+    *Log(theErrLog) << "keep-parser-files option not longer supported. (ignored)" << endl;
   }
-  else if ( tmpDirName[tmpDirName.size()-1] != '/' ){
-    tmpDirName += "/";
+  if ( Opts.extract( "tmpdir" ) ){
+    *Log(theErrLog) << "tmpdir option not longer supported. (ignored)" << endl;
   }
-#ifdef HAVE_DIRENT_H
-  if ( !tmpDirName.empty() ){
-    if ( !existsDir( tmpDirName ) ){
-      *Log(theErrLog) << "temporary dir " << tmpDirName << " not readable" << endl;
-      return false;
-    }
-    *Log(theErrLog) << "checking tmpdir: " << tmpDirName << " OK" << endl;
-  }
-#endif
   string TestFileName;
-  if ( Opts.find ( "testdir", value )) {
-#ifdef HAVE_DIRENT_H
-    doDirTest = true;
-    testDirName = value;
+  if ( Opts.extract( "testdir", TestFileName ) ) {
+    options.doDirTest = true;
+    testDirName = TestFileName;
     if ( testDirName[testDirName.size()-1] != '/' ){
       testDirName += "/";
     }
-    if ( !testDirName.empty() ){
-      if ( !existsDir( testDirName ) ){
-	*Log(theErrLog) << "input dir " << testDirName << " not readable" << endl;
-	return false;
-      }
-    }
-    else {
-      *Log(theErrLog) << "missing a value for --testdir (did you forget the '='?)" << endl;
+    if ( !TiCC::isDir( testDirName ) ){
+      *Log(theErrLog) << "input dir " << testDirName << " not readable" << endl;
       return false;
     }
-#else
-      *Log(theErrLog) << "--testdir option not supported!" << endl;
-#endif
-    Opts.remove("testdir");
   }
-  else if ( Opts.find( 't', value, mood )) {
-    TestFileName = value;
-    ifstream is( value.c_str() );
-    if ( !is ){
-      *Log(theErrLog) << "input stream " << value << " is not readable" << endl;
+  else if ( Opts.extract( 't', TestFileName ) ) {
+    if ( !TiCC::isFile( TestFileName ) ){
+      *Log(theErrLog) << "input stream " << TestFileName << " is not readable" << endl;
       return false;
     }
-    Opts.remove('t');
   };
   wantOUT = false;
-  if ( Opts.find( "outputdir", value )) {
-    outputDirName = value;
+  if ( Opts.extract( "outputdir", outputDirName )) {
     if ( outputDirName[outputDirName.size()-1] != '/' ){
       outputDirName += "/";
     }
-#ifdef HAVE_DIRENT_H
-    if ( !outputDirName.empty() ){
-      if ( !existsDir( outputDirName ) ){
-	*Log(theErrLog) << "output dir " << outputDirName << " not readable" << endl;
-	return false;
-      }
-    }
-    else {
-      *Log(theErrLog) << "missing a value for --outputdir (did you forget the '='?)" << endl;
+    if ( !TiCC::createPath( outputDirName ) ){
+      *Log(theErrLog) << "output dir " << outputDirName << " not readable" << endl;
       return false;
     }
-#endif
     wantOUT = true;
-    Opts.remove( "outputdir");
   }
-  else if ( Opts.find ('o', value, mood)) {
+  else if ( Opts.extract( 'o', outputFileName ) ){
     wantOUT = true;
-    outputFileName = value;
-    Opts.remove('o');
   };
-  doXMLout = false;
-  if ( Opts.find ( "id", value )) {
-    if ( value.empty() ){
-      *Log(theErrLog) << "missing a value for --id (did you forget the '='?)" << endl;
-      return false;
-    }
-    docid = value;
-    Opts.remove( "id");
-  }
-  if ( Opts.find( "xmldir", value )) {
-    xmlDirName = value;
+  options.doXMLout = false;
+  Opts.extract( "id", options.docid );
+  if ( Opts.extract( "xmldir", xmlDirName ) ){
     if ( xmlDirName[xmlDirName.size()-1] != '/' ){
       xmlDirName += "/";
     }
-#ifdef HAVE_DIRENT_H
-    if ( !xmlDirName.empty() ){
-      if ( !existsDir( xmlDirName ) ){
-	*Log(theErrLog) << "XML output dir " << xmlDirName << " not readable" << endl;
-	return false;
-      }
-    }
-    else {
-      *Log(theErrLog) << "missing a value for --xmldir (did you forget the '='?)" << endl;
+    if ( !TiCC::createPath( xmlDirName ) ){
+      *Log(theErrLog) << "XML output dir " << xmlDirName << " not readable" << endl;
       return false;
     }
-#endif
-    doXMLout = true;
-    Opts.remove( "xmldir");
+    options.doXMLout = true;
   }
-  else if ( Opts.find ('X', value, mood)) {
-    doXMLout = true;
-    XMLoutFileName = value;
-    Opts.remove('X');
+  else if ( Opts.extract('X', XMLoutFileName ) ){
+    options.doXMLout = true;
   }
-  if ( Opts.find ("KANON", value ) ){
-    doKanon = true;
-    Opts.remove( "KANON" );
-  }
-  doXMLin = false;
-  if ( Opts.find ('x', value, mood)) {
-    doXMLin = true;
+
+  options.doKanon = Opts.extract("KANON");
+
+  options.doXMLin = false;
+  if ( Opts.extract ('x', value ) ){
+    options.doXMLin = true;
     if ( !value.empty() ){
-      if ( ! (xmlDirName.empty() &&
-	      testDirName.empty() &&
-	      TestFileName.empty() ) ){
+      if ( !xmlDirName.empty() || !testDirName.empty() ){
 	*Log(theErrLog) << "-x may not provide a value when --testdir or --xmldir is provided" << endl;
 	return false;
       }
       TestFileName = value;
-      ifstream is( value.c_str() );
-      if ( !is ){
+      if ( !TiCC::isFile( TestFileName ) ){
 	*Log(theErrLog) << "input stream " << value << " is not readable" << endl;
 	return false;
       }
     }
-    Opts.remove('x');
   }
-  if ( Opts.find ( "textclass", value )) {
-    if ( !doXMLin ){
+  if ( Opts.extract( "textclass", options.textclass ) ){
+    if ( !options.doXMLin ){
       *Log(theErrLog) << "--textclass is only valid when -x is also present" << endl;
       return false;
     }
-    if ( value.empty() ){
-      *Log(theErrLog) << "missing a value for --textclass (did you forget the '='?)" << endl;
-      return false;
-    }
-    textclass = value;
-    Opts.remove( "textclass");
   }
 
   if ( !XMLoutFileName.empty() && !testDirName.empty() ){
@@ -519,24 +356,14 @@ bool parse_args( TiCC::CL_Options& Opts ) {
     return false;
   }
 
-  if ( Opts.find ("uttmarker", value )) {
-    if ( value.empty() ){
-      *Log(theErrLog) << "missing a value for --uttmarker (did you forget the '='?)" << endl;
-      return false;
-    }
-    uttmark = value;
-  }
-  if ( !outputDirName.empty() && testDirName.empty() ){
-    *Log(theErrLog) << "useless -outputdir option" << endl;
-    return false;
-  }
+  Opts.extract ("uttmarker", options.uttmark );
   if ( !testDirName.empty() ){
-    if ( doXMLin )
+    if ( options.doXMLin )
       getFileNames( testDirName, ".xml", fileNames );
     else
       getFileNames( testDirName, "", fileNames );
     if ( fileNames.empty() ){
-      *Log(theErrLog) << "error: couln't find any files in directory: "
+      *Log(theErrLog) << "error: couldn't find any files in directory: "
 		      << testDirName << endl;
       return false;
     }
@@ -547,8 +374,8 @@ bool parse_args( TiCC::CL_Options& Opts ) {
     }
     else {
       vector<string> mass = Opts.getMassOpts();
-      for (size_t i=0; i < mass.size(); ++i ){
-	fileNames.insert( mass[i] );
+      for ( const auto& name : mass ){
+	fileNames.insert( name );
       }
     }
   }
@@ -559,1003 +386,202 @@ bool parse_args( TiCC::CL_Options& Opts ) {
       return false;
     }
   }
+  if ( !Opts.empty() ){
+    *Log(theErrLog) << "unhandled commandline options: " << Opts.toString() << endl;
 
-  return true;
-}
-
-bool froginit(){
-  // for some modules init can take a long time
-  // so first make sure it will not fail on some trivialities
-  //
-  if ( doTok && !configuration.hasSection("tokenizer") ){
-    *Log(theErrLog) << "Missing [[tokenizer]] section in config file." << endl;
-    return false;
-  }
-  if ( doIOB && !configuration.hasSection("IOB") ){
-    *Log(theErrLog) << "Missing [[IOB]] section in config file." << endl;
     return false;
   }
-  if ( doNER && !configuration.hasSection("NER") ){
-    *Log(theErrLog) << "Missing [[NER]] section in config file." << endl;
-    return false;
-  }
-  if ( doMwu ){
-    if ( !configuration.hasSection("mwu") ){
-      *Log(theErrLog) << "Missing [[mwu]] section in config file." << endl;
-      return false;
-    }
-  }
-  else if ( doParse ){
-    *Log(theErrLog) << " Parser disabled, because MWU is deselected" << endl;
-    doParse = false;
-  }
-
-  if ( doServer ){
-    // we use fork(). omp (GCC version) doesn't do well when omp is used
-    // before the fork!
-    // see: http://bisqwit.iki.fi/story/howto/openmp/#OpenmpAndFork
-    bool stat = tokenizer.init( configuration, docid, !doTok );
-    if ( stat ){
-      tokenizer.setSentencePerLineInput( doSentencePerLine );
-      tokenizer.setQuoteDetection( doQuoteDetection );
-      tokenizer.setInputEncoding( encoding );
-      tokenizer.setInputXml( doXMLin );
-      tokenizer.setUttMarker( uttmark );
-      tokenizer.setTextClass( textclass );
-      stat = myCGNTagger.init( configuration );
-      if ( stat ){
-	if ( doIOB ){
-	  stat = myIOBTagger.init( configuration );
-	}
-	if ( stat && doNER ){
-	  stat = myNERTagger.init( configuration );
-	}
-	if ( stat && doLemma ){
-	  stat = myMblem.init( configuration );
-	}
-	if ( stat && doMorph ){
-	  stat = myMbma.init( configuration );
-	  if ( stat ) {
-	    if ( doDaringMorph )
-	      myMbma.setDaring(true);
-	    if ( doMwu ){
-	      stat = myMwu.init( configuration );
-	      if ( stat && doParse ){
-		stat = myParser.init( configuration );
-	      }
-	    }
-	  }
-	}
-      }
-    }
-    if ( !stat ){
-      *Log(theErrLog) << "Initialization failed." << endl;
-      return false;
-    }
-  }
-  else {
-    bool tokStat = true;
-    bool lemStat = true;
-    bool mwuStat = true;
-    bool mbaStat = true;
-    bool parStat = true;
-    bool tagStat = true;
-    bool iobStat = true;
-    bool nerStat = true;
-
-#pragma omp parallel sections
-    {
-#pragma omp section
-      {
-	tokStat = tokenizer.init( configuration, docid, !doTok );
-	if ( tokStat ){
-	  tokenizer.setSentencePerLineInput( doSentencePerLine );
-	  tokenizer.setQuoteDetection( doQuoteDetection );
-	  tokenizer.setInputEncoding( encoding );
-	  tokenizer.setInputXml( doXMLin );
-	  tokenizer.setUttMarker( uttmark );
-	  tokenizer.setTextClass( textclass );
-	}
-      }
-#pragma omp section
-      {
-	if ( doLemma ){
-	  lemStat = myMblem.init( configuration );
-	}
-      }
-#pragma omp section
-      {
-	if ( doMorph ){
-	  mbaStat = myMbma.init( configuration );
-	  if ( doDaringMorph )
-	    myMbma.setDaring(true);
-	}
-      }
-#pragma omp section
-      {
-	tagStat = myCGNTagger.init( configuration );
-      }
-#pragma omp section
-      {
-	if ( doIOB ){
-	  iobStat = myIOBTagger.init( configuration );
-	}
-      }
-#pragma omp section
-      {
-	if ( doNER ){
-	  nerStat = myNERTagger.init( configuration );
-	}
-      }
-#pragma omp section
-      {
-	if ( doMwu ){
-	  mwuStat = myMwu.init( configuration );
-	  if ( mwuStat && doParse ){
-	    Timer initTimer;
-	    initTimer.start();
-	    parStat = myParser.init( configuration );
-	    initTimer.stop();
-	    *Log(theErrLog) << "init Parse took: " << initTimer << endl;
-	  }
-	}
-      }
-    }   // end omp parallel sections
-    if ( ! ( tokStat && iobStat && nerStat && tagStat && lemStat
-	     && mbaStat && mwuStat && parStat ) ){
-      *Log(theErrLog) << "Initialization failed for: ";
-      if ( ! ( tokStat ) ){
-	*Log(theErrLog) << "[tokenizer] ";
-      }
-      if ( ! ( tagStat ) ){
-	*Log(theErrLog) << "[tagger] ";
-      }
-      if ( ! ( iobStat ) ){
-	*Log(theErrLog) << "[IOB] ";
-      }
-      if ( ! ( nerStat ) ){
-	*Log(theErrLog) << "[NER] ";
-      }
-      if ( ! ( lemStat ) ){
-	*Log(theErrLog) << "[lemmatizer] ";
-      }
-      if ( ! ( mbaStat ) ){
-	*Log(theErrLog) << "[morphology] ";
-      }
-      if ( ! ( mwuStat ) ){
-	*Log(theErrLog) << "[multiword unit] ";
-      }
-      if ( ! ( parStat ) ){
-	*Log(theErrLog) << "[parser] ";
-      }
-      *Log(theErrLog) << endl;
-      return false;
-    }
-  }
-  *Log(theErrLog) << "Initialization done." << endl;
   return true;
 }
 
-vector<Word*> lookup( Word *word, const vector<Entity*>& entities ){
-  vector<Word*> vec;
-  for ( size_t p=0; p < entities.size(); ++p ){
-    vec = entities[p]->select<Word>();
-    if ( !vec.empty() ){
-      if ( vec[0]->id() == word->id() ) {
-	return vec;
-      }
-    }
-  }
-  vec.clear();
-  vec.push_back( word ); // single unit
-  return vec;
-}
-
-Dependency *lookupDep( const Word *word,
-		       const vector<Dependency*>&dependencies ){
-  if (dependencies.size() == 0 ){
-    return 0;
-  }
-  int dbFlag = stringTo<int>( configuration.lookUp( "debug", "parser" ) );
-  if ( dbFlag ){
-    using TiCC::operator<<;
-    *Log( theErrLog ) << "\nDependency-lookup "<< word << " in " << dependencies << endl;
-  }
-  for ( size_t i=0; i < dependencies.size(); ++i ){
-    if ( dbFlag ){
-      *Log( theErrLog ) << "Dependency try: " << dependencies[i] << endl;
-    }
-    try {
-      vector<DependencyDependent*> dv = dependencies[i]->select<DependencyDependent>();
-      if ( !dv.empty() ){
-	vector<Word*> v = dv[0]->select<Word>();
-	for ( size_t j=0; j < v.size(); ++j ){
-	  if ( v[j] == word ){
-	    if ( dbFlag ){
-	      *Log(theErrLog) << "\nDependency found word " << v[j] << endl;
-	    }
-	    return dependencies[i];
-	  }
-	}
-      }
-    }
-    catch ( exception& e ){
-      if (dbFlag > 0)
-	*Log(theErrLog) << "get Dependency results failed: "
-			<< e.what() << endl;
-    }
-  }
-  return 0;
-}
-
-string lookupNEREntity( const vector<Word *>& mwu,
-			const vector<Entity*>& entities ){
-  string endresult;
-  int dbFlag = stringTo<int>( configuration.lookUp( "debug", "NER" ) );
-  for ( size_t j=0; j < mwu.size(); ++j ){
-    if ( dbFlag ){
-      using TiCC::operator<<;
-      *Log(theErrLog) << "\nNER: lookup "<< mwu[j] << " in " << entities << endl;
-    }
-    string result;
-    for ( size_t i=0; i < entities.size(); ++i ){
-      if ( dbFlag ){
-	*Log(theErrLog) << "NER try: " << entities[i] << endl;
-      }
-      try {
-	vector<Word*> v = entities[i]->select<Word>();
-	bool first = true;
-	for ( size_t k=0; k < v.size(); ++k ){
-	  if ( v[k] == mwu[j] ){
-	    if (dbFlag){
-	      *Log(theErrLog) << "NER found word " << v[k] << endl;
-	    }
-	    if ( first )
-	      result += "B-" + uppercase(entities[i]->cls());
-	    else
-	      result += "I-" + uppercase(entities[i]->cls());
-	    break;
-	  }
-	  else
-	    first = false;
-	}
-      }
-      catch ( exception& e ){
-	if  (dbFlag > 0)
-	  *Log(theErrLog) << "get NER results failed: "
-			  << e.what() << endl;
-      }
-    }
-    if ( result.empty() )
-      endresult += "O";
-    else
-      endresult += result;
-    if ( j < mwu.size()-1 )
-      endresult += "_";
-  }
-  return endresult;
-}
-
-
-string lookupIOBChunk( const vector<Word *>& mwu,
-		       const vector<Chunk*>& chunks ){
-  string endresult;
-  int dbFlag = stringTo<int>( configuration.lookUp( "debug", "IOB" ) );
-  for ( size_t j=0; j < mwu.size(); ++j ){
-    if ( dbFlag ){
-      using TiCC::operator<<;
-      *Log(theErrLog) << "IOB lookup "<< mwu[j] << " in " << chunks << endl;
-    }
-    string result;
-    for ( size_t i=0; i < chunks.size(); ++i ){
-      if ( dbFlag ){
-	*Log(theErrLog) << "IOB try: " << chunks[i] << endl;
-      }
-      try {
-	vector<Word*> v = chunks[i]->select<Word>();
-	bool first = true;
-	for ( size_t k=0; k < v.size(); ++k ){
-	  if ( v[k] == mwu[j] ){
-	    if (dbFlag){
-	      *Log(theErrLog) << "IOB found word " << v[k] << endl;
-	    }
-	    if ( first )
-	      result += "B-" + chunks[i]->cls();
-	    else
-	      result += "I-" + chunks[i]->cls();
-	    break;
-	  }
-	  else
-	    first = false;
-	}
-      }
-      catch ( exception& e ){
-	if  (dbFlag > 0)
-	  *Log(theErrLog) << "get Chunks results failed: "
-			  << e.what() << endl;
-      }
-    }
-    if ( result.empty() )
-      endresult += "O";
-    else
-      endresult += result;
-    if ( j < mwu.size()-1 )
-      endresult += "_";
-  }
-  return endresult;
-}
-
-void displayMWU( ostream& os, size_t index,
-		 const vector<Word*> mwu ){
-  string wrd;
-  string pos;
-  string lemma;
-  string morph;
-  double conf = 1;
-  for ( size_t p=0; p < mwu.size(); ++p ){
-    Word *word = mwu[p];
-    try {
-      wrd += word->str();
-      PosAnnotation *postag = word->annotation<PosAnnotation>( );
-      pos += postag->cls();
-      if ( p < mwu.size() -1 ){
-	wrd += "_";
-	pos += "_";
-      }
-      conf *= postag->confidence();
-    }
-    catch ( exception& e ){
-      if  (debugFlag > 0)
-	*Log(theErrLog) << "get Postag results failed: "
-			<< e.what() << endl;
-    }
-    if ( doLemma ){
-      try {
-	lemma += word->lemma();
-	if ( p < mwu.size() -1 ){
-	  lemma += "_";
-	}
-      }
-      catch ( exception& e ){
-	if  (debugFlag > 0)
-	  *Log(theErrLog) << "get Lemma results failed: "
-			  << e.what() << endl;
-      }
-    }
-    if ( doDaringMorph ){
-      try {
-	vector<MorphologyLayer*> ml = word->annotations<MorphologyLayer>();
-	for ( size_t q=0; q < ml.size(); ++q ){
-	  vector<Morpheme*> m = ml[q]->select<Morpheme>( false );
-	  assert( m.size() == 1 ); // top complex layer
-	  string desc = m[0]->description();
-	  morph = desc;
-	  if ( q < ml.size()-1 )
-	    morph += "/";
-	}
-	if ( p < mwu.size() -1 ){
-	  morph += "_";
-	}
-      }
-      catch ( exception& e ){
-	if  (debugFlag > 0)
-	  *Log(theErrLog) << "get Morph results failed: "
-			  << e.what() << endl;
-      }
-    }
-    else if ( doMorph ){
-      try {
-	vector<MorphologyLayer*> ml = word->annotations<MorphologyLayer>();
-	for ( size_t q=0; q < ml.size(); ++q ){
-	  vector<Morpheme*> m = ml[q]->select<Morpheme>();
-	  for ( size_t t=0; t < m.size(); ++t ){
-	    string txt = UnicodeToUTF8( m[t]->text() );
-	    morph += "[" + txt + "]";
-	  }
-	  if ( q < ml.size()-1 )
-	    morph += "/";
-	}
-	if ( p < mwu.size() -1 ){
-	  morph += "_";
-	}
-      }
-      catch ( exception& e ){
-	if  (debugFlag > 0)
-	  *Log(theErrLog) << "get Morph results failed: "
-			  << e.what() << endl;
-      }
-    }
-  }
-  os << index << "\t" << wrd << "\t" << lemma << "\t" << morph << "\t" << pos << "\t" << std::fixed << conf;
-}
-
-ostream &showResults( ostream& os,
-		      const Sentence* sentence,
-		      bool showParse ){
-  vector<Word*> words = sentence->words();
-  vector<Entity*> mwu_entities = sentence->select<Entity>( myMwu.getTagset() );
-  vector<Dependency*> dependencies = sentence->select<Dependency>();
-  vector<Chunk*> iob_chunking = sentence->select<Chunk>();
-  vector<Entity*> ner_entities = sentence->select<Entity>( myNERTagger.getTagset() );
-  static set<ElementType> excludeSet;
-  vector<Sentence*> parts = sentence->select<Sentence>( excludeSet );
-  if ( !doQuoteDetection )
-    assert( parts.size() == 0 );
-  for ( size_t i=0; i < parts.size(); ++i ){
-    vector<Entity*> ents = parts[i]->select<Entity>( myMwu.getTagset() );
-    mwu_entities.insert( mwu_entities.end(), ents.begin(), ents.end() );
-    vector<Dependency*> deps = parts[i]->select<Dependency>();
-    dependencies.insert( dependencies.end(), deps.begin(), deps.end() );
-    vector<Chunk*> chunks = parts[i]->select<Chunk>();
-    iob_chunking.insert( iob_chunking.end(), chunks.begin(), chunks.end() );
-    vector<Entity*> ners = parts[i]->select<Entity>( myNERTagger.getTagset() );
-    ner_entities.insert( ner_entities.end(), ners.begin(), ners.end() );
-  }
-
-  size_t index = 1;
-  map<FoliaElement*, int> enumeration;
-  vector<vector<Word*> > mwus;
-  for( size_t i=0; i < words.size(); ++i ){
-    Word *word = words[i];
-    vector<Word*> mwu = lookup( word, mwu_entities );
-    for ( size_t j=0; j < mwu.size(); ++j ){
-      enumeration[mwu[j]] = index;
-    }
-    mwus.push_back( mwu );
-    i += mwu.size()-1;
-    ++index;
-  }
-  for( size_t i=0; i < mwus.size(); ++i ){
-    displayMWU( os, i+1, mwus[i] );
-    if ( doNER ){
-      string cls;
-      string s = lookupNEREntity( mwus[i], ner_entities );
-      os << "\t" << s;
-    }
-    else {
-      os << "\t\t";
-    }
-    if ( doIOB ){
-      string cls;
-      string s = lookupIOBChunk( mwus[i], iob_chunking );
-      os << "\t" << s;
-    }
-    else {
-      os << "\t\t";
-    }
-    if ( showParse ){
-      string cls;
-      Dependency *dep = lookupDep( mwus[i][0], dependencies );
-      if ( dep ){
-	vector<Headwords*> w = dep->select<Headwords>();
-	size_t num;
-	if ( w[0]->index(0)->isinstance( PlaceHolder_t ) ){
-	  string indexS = w[0]->index(0)->str();
-	  FoliaElement *pnt = w[0]->index(0)->doc()->index(indexS);
-	  num = enumeration.find(pnt->index(0))->second;
-	}
-	else {
-	  num = enumeration.find(w[0]->index(0))->second;
-	}
-	os << "\t" << num << "\t" << dep->cls();
-      }
-      else {
-	os << "\t"<< 0 << "\tROOT";
-      }
-    }
-    else {
-      os << "\t\t";
-    }
-    os << endl;
-    ++index;
-  }
-  if ( words.size() )
-    os << endl;
-  return os;
-}
-
-bool TestSentence( Sentence* sent,
-		   TimerBlock& timers ){
-  vector<Word*> swords;
-  if ( doQuoteDetection )
-    swords = sent->wordParts();
-  else
-    swords = sent->words();
-  bool showParse = doParse;
-  if ( !swords.empty() ) {
-#pragma omp parallel sections
-    {
-#pragma omp section
-      {
-	timers.tagTimer.start();
-	myCGNTagger.Classify( swords );
-	timers.tagTimer.stop();
-      }
-#pragma omp section
-      {
-	if ( doIOB ){
-	  timers.iobTimer.start();
-	  myIOBTagger.Classify( swords );
-	  timers.iobTimer.stop();
-	}
-      }
-#pragma omp section
-      {
-	if ( doNER ){
-	  timers.nerTimer.start();
-	  myNERTagger.Classify( swords );
-	  timers.nerTimer.stop();
-	}
-      }
-    } // parallel sections
-    for ( size_t i = 0; i < swords.size(); ++i ) {
-#pragma omp parallel sections
-      {
-#pragma omp section
-	{
-	  if ( doMorph ){
-	    timers.mbmaTimer.start();
-	    if (debugFlag)
-	      *Log(theErrLog) << "Calling mbma..." << endl;
-	    myMbma.Classify( swords[i] );
-	    timers.mbmaTimer.stop();
-	  }
-	}
-#pragma omp section
-	{
-	  if ( doLemma ){
-	    timers.mblemTimer.start();
-	    if (debugFlag)
-	      *Log(theErrLog) << "Calling mblem..." << endl;
-	    myMblem.Classify( swords[i] );
-	    timers.mblemTimer.stop();
-	  }
-	}
-      } // omp parallel sections
-    } //for int i = 0 to num_words
-
-    if ( doMwu ){
-      if ( swords.size() > 0 ){
-	timers.mwuTimer.start();
-	myMwu.Classify( swords );
-	timers.mwuTimer.stop();
-      }
-    }
-    if ( doParse ){
-      if ( maxParserTokens != 0 && swords.size() > maxParserTokens ){
-	showParse = false;
-      }
-      else {
-	myParser.Parse( swords, myMwu.getTagset(), tmpDirName, timers );
-      }
-    }
-  }
-  return showParse;
-}
-
-void Test( Document& doc,
-	   ostream& outStream,
-	   bool interactive = false,
-	   const string& xmlOutFile = "" ) {
-  TimerBlock timers;
-  timers.frogTimer.start();
-  // first we make sure that the doc will accept our annotations, by
-  // declaring them in the doc
-  myCGNTagger.addDeclaration( doc );
-  if ( doLemma )
-    myMblem.addDeclaration( doc );
-  if ( doMorph )
-    myMbma.addDeclaration( doc );
-  if (doIOB)
-    myIOBTagger.addDeclaration( doc );
-  if (doNER)
-    myNERTagger.addDeclaration( doc );
-  if (doMwu)
-    myMwu.addDeclaration( doc );
-  if (doParse)
-    myParser.addDeclaration( doc );
-
-  if ( debugFlag > 5 )
-    *Log(theErrLog) << "Testing document :" << doc << endl;
-
-  vector<Sentence*> topsentences = doc.sentences();
-  vector<Sentence*> sentences;
-  if ( doQuoteDetection )
-    sentences = doc.sentenceParts();
-  else
-    sentences = topsentences;
-  size_t numS = sentences.size();
-  if ( numS > 0 ) { //process sentences
-    if  (debugFlag > 0)
-      *Log(theErrLog) << "found " << numS << " sentence(s) in document." << endl;
-    for ( size_t i = 0; i < numS; i++) {
-      /* ******* Begin process sentence  ********** */
-      //NOTE- full sentences are passed (which may span multiple lines) (MvG)
-      bool showParse = TestSentence( sentences[i], timers );
-      if ( doParse && !showParse ){
-	*Log(theErrLog) << "WARNING!" << endl;
-	*Log(theErrLog) << "Sentence " << i+1 << " isn't parsed because it contains more tokens then set with the --max-parser-tokens=" << maxParserTokens << " option." << endl;
-      }
-    }
-    for ( size_t i = 0; i < topsentences.size(); ++i ) {
-      if ( !(doServer && doXMLout) )
-	showResults( outStream, topsentences[i], doParse );
-    }
-  }
-  else {
-    if  (debugFlag > 0)
-      *Log(theErrLog) << "No sentences found in document. " << endl;
-  }
-  if ( doServer && doXMLout )
-    outStream << doc << endl;
-  if ( !xmlOutFile.empty() ){
-    doc.save( xmlOutFile, doKanon );
-    *Log(theErrLog) << "resulting FoLiA doc saved in " << xmlOutFile << endl;
-  }
-
-  timers.frogTimer.stop();
-  if ( !interactive ){
-    *Log(theErrLog) << "tokenisation took:  " << timers.tokTimer << endl;
-    *Log(theErrLog) << "CGN tagging took:   " << timers.tagTimer << endl;
-    if ( doIOB)
-      *Log(theErrLog) << "IOB chunking took:  " << timers.iobTimer << endl;
-    if ( doNER)
-      *Log(theErrLog) << "NER took:           " << timers.nerTimer << endl;
-    if ( doMorph )
-      *Log(theErrLog) << "MBA took:           " << timers.mbmaTimer << endl;
-    if ( doLemma )
-      *Log(theErrLog) << "Mblem took:         " << timers.mblemTimer << endl;
-    if ( doMwu )
-      *Log(theErrLog) << "MWU resolving took: " << timers.mwuTimer << endl;
-    if ( doParse ){
-      *Log(theErrLog) << "Parsing (prepare) took: " << timers.prepareTimer << endl;
-      *Log(theErrLog) << "Parsing (pairs)   took: " << timers.pairsTimer << endl;
-      *Log(theErrLog) << "Parsing (rels)    took: " << timers.relsTimer << endl;
-      *Log(theErrLog) << "Parsing (dir)     took: " << timers.dirTimer << endl;
-      *Log(theErrLog) << "Parsing (csi)     took: " << timers.csiTimer << endl;
-      *Log(theErrLog) << "Parsing (total)   took: " << timers.parseTimer << endl;
-    }
-  }
-  *Log(theErrLog) << "Frogging in total took: " << timers.frogTimer << endl;
-  return;
-}
-
-void Test( const string& infilename,
-	   ostream &os,
-	   const string& xmlOutF ) {
-  // stuff the whole input into one FoLiA document.
-  // This is not a good idea on the long term, I think (agreed [proycon] )
-
-  string xmlOutFile = xmlOutF;
-  if ( doXMLin && !xmlOutFile.empty() ){
-    if ( match_back( infilename, ".gz" ) ){
-      if ( !match_back( xmlOutFile, ".gz" ) )
-	xmlOutFile += ".gz";
-    }
-    else if ( match_back( infilename, ".bz2" ) ){
-      if ( !match_back( xmlOutFile, ".bz2" ) )
-	xmlOutFile += ".bz2";
-    }
-  }
-  if ( doXMLin ){
-    Document doc;
-    try {
-      doc.readFromFile( infilename );
-    }
-    catch ( exception &e ){
-      *Log(theErrLog) << "retrieving FoLiA from '" << infilename << "' failed with exception:" << endl;
-      cerr << e.what() << endl;
-      return;
-    }
-    tokenizer.tokenize( doc );
-    Test( doc, os, false, xmlOutFile );
-  }
-  else {
-    ifstream IN( infilename.c_str() );
-    Document doc = tokenizer.tokenize( IN );
-    Test( doc, os, false, xmlOutFile );
-  }
-}
-
-void TestServer( Sockets::ServerSocket &conn) {
-  //by Maarten van Gompel
-
-  try {
-    while (true) {
-      ostringstream outputstream;
-      if ( doXMLin ){
-	string result;
-	string s;
-	while ( conn.read(s) ){
-	  result += s + "\n";
-	  if ( s.empty() )
-	    break;
-	}
-	if ( result.size() < 50 ){
-	  // a FoLia doc must be at least a few 100 bytes
-	  // so this is wrong. Just bail out
-	  throw( runtime_error( "read garbage" ) );
-	}
-	if ( debugFlag )
-	  *Log(theErrLog) << "received data [" << result << "]" << endl;
-	Document doc;
-	try {
-	  doc.readFromString( result );
-	}
-	catch ( std::exception& e ){
-	  *Log(theErrLog) << "FoLiaParsing failed:" << endl
-			  << e.what() << endl;
-	  throw;
-	}
-	*Log(theErrLog) << "Processing... " << endl;
-	tokenizer.tokenize( doc );
-	Test( doc, outputstream );
-      }
-      else {
-	string data = "";
-	if ( doSentencePerLine ){
-	  if ( !conn.read( data ) )	 //read data from client
-	    throw( runtime_error( "read failed" ) );
-	}
-	else {
-	  string line;
-	  while( conn.read(line) ){
-	    if ( line == "EOT" )
-	      break;
-	    data += line + "\n";
-	  }
-	}
-	if (debugFlag)
-	  *Log(theErrLog) << "Received: [" << data << "]" << endl;
-	*Log(theErrLog) << "Processing... " << endl;
-	istringstream inputstream(data,istringstream::in);
-	Document doc = tokenizer.tokenize( inputstream );
-	Test( doc, outputstream );
-      }
-      if (!conn.write( (outputstream.str()) ) || !(conn.write("READY\n"))  ){
-	if (debugFlag)
-	  *Log(theErrLog) << "socket " << conn.getMessage() << endl;
-	throw( runtime_error( "write to client failed" ) );
-      }
-
-    }
-  }
-  catch ( std::exception& e ) {
-    if (debugFlag)
-      *Log(theErrLog) << "connection lost: " << e.what() << endl;
-  }
-  *Log(theErrLog) << "Connection closed.\n";
-}
+bool StillRunning = true;
 
-#ifdef HAVE_LIBREADLINE
-void TestInteractive(){
-  const char *prompt = "frog> ";
-  string line;
-  bool eof = false;
-  while ( !eof ){
-    string data;
-    char *input = readline( prompt );
-    if ( !input ){
-      eof = true;
-      break;
-    }
-    line = input;
-    if ( doSentencePerLine ){
-      if ( line.empty() ){
-	continue;
-      }
-      else {
-	data += line + "\n";
-	add_history( input );
-      }
-    }
-    else {
-      if ( !line.empty() ){
-	add_history( input );
-	data = line + "\n";
-      }
-      while ( !eof ){
-	char *input = readline( prompt );
-	if ( !input ){
-	  eof = true;
-	  break;
-	}
-	line = input;
-	if ( line.empty() ){
-	  break;
-	}
-	add_history( input );
-	data += line + "\n";
-      }
-    }
-    if ( !data.empty() ){
-      if ( data[data.size()-1] == '\n' ){
-	data = data.substr( 0, data.size()-1 );
-      }
-      cout << "Processing... '" << data << "'" << endl;
-      istringstream inputstream(data,istringstream::in);
-      Document doc = tokenizer.tokenize( inputstream );
-      Test( doc, cout, true );
-    }
+void KillServerFun( int Signal ){
+  if ( Signal == SIGTERM ){
+    cerr << "KillServerFun caught a signal SIGTERM" << endl;
+    sleep(5); // give children some spare time...
+    StillRunning = false;
   }
-  cout << "Done.\n";
 }
 
-#else
-void TestInteractive(){
-  cout << "frog>"; cout.flush();
-  string line;
-  string data;
-  while ( getline( cin, line ) ){
-    string data = line;
-    if ( doSentencePerLine ){
-      if ( line.empty() ){
-	cout << "frog>"; cout.flush();
-	continue;
-      }
-    }
-    else {
-      if ( !line.empty() ){
-	data += "\n";
-      }
-      cout << "frog>"; cout.flush();
-      string line2;
-      while( getline( cin, line2 ) ){
-	if ( line2.empty() )
-	  break;
-	data += line2 + "\n";
-	cout << "frog>"; cout.flush();
-      }
-    }
-    if ( data.empty() ){
-      cout << "ignoring empty input" << endl;
-      cout << "frog>"; cout.flush();
-      continue;
-    }
-    cout << "Processing... " << endl;
-    istringstream inputstream(data,istringstream::in);
-    Document doc = tokenizer.tokenize( inputstream );
-    Test( doc, cout, true );
-    cout << "frog>"; cout.flush();
-  }
-  cout << "Done.\n";
-}
-#endif
 
 int main(int argc, char *argv[]) {
-  cerr << "frog " << VERSION << " (c) ILK 1998 - 2014" << endl;
-  cerr << "Induction of Linguistic Knowledge Research Group, Tilburg University" << endl;
-  ProgName = argv[0];
+  cerr << "frog " << VERSION << " (c) CLTS, ILK 1998 - 2016" << endl
+       << "CLST  - Centre for Language and Speech Technology,"
+       << "Radboud University" << endl
+       << "ILK   - Induction of Linguistic Knowledge Research Group,"
+       << "Tilburg University" << endl;
   cerr << "based on [" << Tokenizer::VersionName() << ", "
        << folia::VersionName() << ", "
        << Timbl::VersionName() << ", "
        << TimblServer::VersionName() << ", "
        << Tagger::VersionName() << "]" << endl;
-  //  cout << "configdir: " << configDir << endl;
+  LogStream *theErrLog = new LogStream( cerr, "frog-", StampMessage );
   std::ios_base::sync_with_stdio(false);
+  FrogOptions options;
+
   try {
-    TiCC::CL_Options Opts("c:e:o:t:x:X:nQhVd:S:",
+    TiCC::CL_Options Opts("c:e:o:t:x::X::nQhVd:S:",
 			  "textclass:,testdir:,uttmarker:,max-parser-tokens:,"
-			  "skip:,id:,outputdir:,xmldir:,tmpdir:,daring,debug:,"
-			  "keep-parser-files:,version,threads:,KANON");
-
+			  "skip:,id:,outputdir:,xmldir:,tmpdir:,deep-morph,"
+			  "help,language:,"
+			  "debug:,keep-parser-files,version,threads:,KANON");
     Opts.init(argc, argv);
-    if ( parse_args(Opts) ){
-      if (  !froginit() ){
-	throw runtime_error( "init failed" );
-      }
-      if ( !fileNames.empty() ) {
-	string outPath = outputDirName;
-	string xmlPath = xmlDirName;
-	set<string>::const_iterator it = fileNames.begin();
-	ostream *outS = 0;
-	if ( !outputFileName.empty() ){
-	  outS = new ofstream( outputFileName.c_str() );
-	}
-	while ( it != fileNames.end() ){
-	  string testName = testDirName;
-	  testName += *it;
-	  string outName;
-	  if ( outS == 0 ){
-	    if ( wantOUT ){
-	      if ( doXMLin ){
-		if ( !outPath.empty() )
-		  outName = outPath + *it + ".out";
-	      }
-	      else
-		outName = outPath + *it + ".out";
-	      outS = new ofstream( outName.c_str() );
+    if ( Opts.is_present('V' ) || Opts.is_present("version" ) ){
+      // we already did show what we wanted.
+      return EXIT_SUCCESS;
+    }
+    if ( Opts.is_present( 'h' )
+	 || Opts.is_present( "help" ) ) {
+      usage();
+      return EXIT_SUCCESS;
+    };
+    bool parsed = parse_args( Opts, options, theErrLog );
+    if (!parsed) {
+      throw runtime_error( "init failed" );
+    }
+    FrogAPI frog( options, configuration, theErrLog );
+
+    if ( !fileNames.empty() ) {
+      string outPath = outputDirName;
+      string xmlPath = xmlDirName;
+
+      ostream *outS = 0;
+      if ( !outputFileName.empty() ){
+	if ( !TiCC::createPath( outputFileName ) ) {
+	  *Log(theErrLog) << "problem: unable to create outputfile: "
+			  << outputFileName << endl;
+	  return EXIT_FAILURE;
+	}
+        outS = new ofstream( outputFileName );
+      }
+      for ( auto const& name : fileNames ){
+	string testName = testDirName + name;
+	if ( !TiCC::isFile( testName ) ){
+	  *Log(theErrLog) << "skip " << testName << " (file not found )"
+			  << endl;
+	  continue;
+	}
+	string outName;
+	if ( outS == 0 ){
+	  if ( wantOUT ){
+	    if ( options.doXMLin ){
+	      if ( !outPath.empty() )
+		outName = outPath + name + ".out";
 	    }
 	    else {
-	      outS = &cout;
+	      outName = outPath + name + ".out";
 	    }
-	  }
-	  string xmlName = XMLoutFileName;
-	  if ( xmlName.empty() ){
-	    if ( !xmlDirName.empty() ){
-	      if ( it->rfind(".xml") == string::npos )
-		xmlName = xmlPath + *it + ".xml";
-	      else
-		xmlName = xmlPath + *it;
+	    if ( !TiCC::createPath( outName ) ) {
+	      *Log(theErrLog) << "problem frogging: " << name << endl
+			      << "unable to create outputfile: " << outName
+			      << endl;
+	      continue;
 	    }
-	    else if ( doXMLout )
-	      xmlName = *it + ".xml"; // do not clobber the inputdir!
+	    outS = new ofstream( outName );
+	  } else {
+	    outS = &cout;
 	  }
-	  *Log(theErrLog) << "Frogging " << testName << endl;
-	  Test( testName, *outS, xmlName );
-	  if ( !outName.empty() ){
-	    *Log(theErrLog) << "results stored in " << outName << endl;
-	    delete outS;
-	    outS = 0;
+	}
+	string xmlOutName = XMLoutFileName;
+	if ( xmlOutName.empty() ){
+	  if ( !xmlDirName.empty() ){
+	    if ( name.rfind(".xml") == string::npos )
+	      xmlOutName = xmlPath + name + ".xml";
+	    else
+	      xmlOutName = xmlPath + name;
 	  }
-	  ++it;
+	  else if ( options.doXMLout )
+	    xmlOutName = name + ".xml"; // do not clobber the inputdir!
+	}
+	if ( !xmlOutName.empty() && !TiCC::createPath( xmlOutName ) ){
+	  *Log(theErrLog) << "problem frogging: " << name << endl
+			  << "unable to create outputfile: " << xmlOutName
+			  << endl;
+	  continue;
 	}
-	if ( !outputFileName.empty() ){
-	  *Log(theErrLog) << "results stored in " << outputFileName << endl;
+	*Log(theErrLog) << "Frogging " << testName << endl;
+	try {
+	  frog.FrogFile( testName, *outS, xmlOutName );
+	}
+	catch ( exception& e ){
+	  *Log(theErrLog) << "problem frogging: " << name << endl
+			  << e.what() << endl;
+	  continue;
+	}
+	if ( !outName.empty() ){
+	  *Log(theErrLog) << "results stored in " << outName << endl;
 	  delete outS;
+	  outS = 0;
 	}
       }
-      else if ( doServer ) {
-	//first set up some things to deal with zombies
-	struct sigaction action;
-	action.sa_handler = SIG_IGN;
-	sigemptyset(&action.sa_mask);
+      if ( !outputFileName.empty() ){
+	*Log(theErrLog) << "results stored in " << outputFileName << endl;
+	delete outS;
+      }
+    }
+    else if ( options.doServer ) {
+      //first set up some things to deal with zombies
+      struct sigaction action;
+      action.sa_handler = SIG_IGN;
+      sigemptyset(&action.sa_mask);
 #ifdef SA_NOCLDWAIT
-	action.sa_flags = SA_NOCLDWAIT;
+      action.sa_flags = SA_NOCLDWAIT;
 #endif
-	sigaction(SIGCHLD, &action, NULL);
+      sigaction(SIGCHLD, &action, NULL);
+      struct sigaction act;
+      sigaction( SIGTERM, NULL, &act ); // get current action
+      act.sa_handler = KillServerFun;
+      act.sa_flags &= ~SA_RESTART;      // do not continue after SIGTERM
+      sigaction( SIGTERM, &act, NULL );
 
-	srand((unsigned)time(0));
+      srand((unsigned)time(0));
 
-	*Log(theErrLog) << "Listening on port " << listenport << "\n";
+      *Log(theErrLog) << "Listening on port " << options.listenport << "\n";
 
-	try
-	  {
-	    // Create the socket
-	    Sockets::ServerSocket server;
-	    if ( !server.connect( listenport ) )
-	      throw( runtime_error( "starting server on port " + listenport + " failed" ) );
-	    if ( !server.listen( 5 ) ) {
-	      // maximum of 5 pending requests
-	      throw( runtime_error( "listen(5) failed" ) );
+      try {
+	// Create the socket
+	Sockets::ServerSocket server;
+	if ( !server.connect( options.listenport ) )
+	  throw( runtime_error( "starting server on port " + options.listenport + " failed" ) );
+	if ( !server.listen( 5 ) ) {
+	  // maximum of 5 pending requests
+	  throw( runtime_error( "listen(5) failed" ) );
+	}
+	while ( StillRunning ) {
+	  Sockets::ServerSocket conn;
+	  if ( server.accept( conn ) ){
+	    *Log(theErrLog) << "New connection..." << endl;
+	    int pid = fork();
+	    if (pid < 0) {
+	      string err = strerror(errno);
+	      *Log(theErrLog) << "ERROR on fork: " << err << endl;
+	      throw runtime_error( "FORK failed: " + err );
 	    }
-	    while ( true ) {
-
-	      Sockets::ServerSocket conn;
-	      if ( server.accept( conn ) ){
-		*Log(theErrLog) << "New connection..." << endl;
-		int pid = fork();
-		if (pid < 0) {
-		  *Log(theErrLog) << "ERROR on fork" << endl;
-		  throw runtime_error( "FORK failed" );
-		} else if (pid == 0)  {
-		  //		  server = NULL;
-		  TestServer(conn );
-		  exit(EXIT_SUCCESS);
-		}
-	      }
-	      else {
-		throw( runtime_error( "Accept failed" ) );
-	      }
+	    else if (pid == 0)  {
+	      frog.FrogServer( conn );
+	      return EXIT_SUCCESS;
 	    }
-	  } catch ( std::exception& e )
-	  {
-	    *Log(theErrLog) << "Server error:" << e.what() << " Exiting." << endl;
-	    throw;
 	  }
+	  else {
+	    throw( runtime_error( "Accept failed" ) );
+	  }
+	}
       }
-      else {
-	// interactive mode
-	TestInteractive( );
+      catch ( std::exception& e ) {
+	*Log(theErrLog) << "Server error:" << e.what() << " Exiting." << endl;
+	throw;
       }
     }
     else {
-      throw runtime_error( "invalid arguments" );
+      // interactive mode
+      frog.FrogInteractive();
     }
   }
   catch ( const exception& e ){
     *Log(theErrLog) << "fatal error: " << e.what() << endl;
     return EXIT_FAILURE;
   }
+  delete theErrLog;
   return EXIT_SUCCESS;
 }
diff --git a/src/FrogAPI.cxx b/src/FrogAPI.cxx
new file mode 100644
index 0000000..567286a
--- /dev/null
+++ b/src/FrogAPI.cxx
@@ -0,0 +1,1336 @@
+/* ex: set tabstop=8 expandtab: */
+/*
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
+
+  This file is part of frog:
+
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
+
+  frog 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.
+
+  frog 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/>.
+
+  For questions and suggestions, see:
+      https://github.com/LanguageMachines/frog/issues
+  or send mail to:
+      lamasoftware (at ) science.ru.nl
+*/
+
+#include <cstdlib>
+#include <cstdio>
+#include <unistd.h>
+#include <sys/wait.h>
+#include <signal.h>
+#include <string>
+#include <cstring>
+#include <iostream>
+#include <sstream>
+#include <fstream>
+#include <vector>
+#include "config.h"
+#ifdef HAVE_OPENMP
+#include <omp.h>
+#endif
+
+#ifdef HAVE_LIBREADLINE
+#  if defined(HAVE_READLINE_READLINE_H)
+#    include <readline/readline.h>
+#  elif defined(HAVE_READLINE_H)
+#    include <readline.h>
+#  else
+#    define NO_READLINE
+#  endif /* !defined(HAVE_READLINE_H) */
+#else
+#  define NO_READLINE
+#endif /* HAVE_LIBREADLINE */
+
+#ifdef HAVE_READLINE_HISTORY
+#  if defined(HAVE_READLINE_HISTORY_H)
+#    include <readline/history.h>
+#  elif defined(HAVE_HISTORY_H)
+#    include <history.h>
+#  endif /* defined(HAVE_READLINE_HISTORY_H) */
+#endif /* HAVE_READLINE_HISTORY */
+
+
+// individual module headers
+#include "frog/FrogAPI.h" //will also include Frog.h (internals), FrogAPI.h is for public  interface
+#include "frog/ucto_tokenizer_mod.h"
+#include "frog/mblem_mod.h"
+#include "frog/mbma_mod.h"
+#include "frog/mwu_chunker_mod.h"
+#include "frog/cgn_tagger_mod.h"
+#include "frog/iob_tagger_mod.h"
+#include "frog/ner_tagger_mod.h"
+#include "frog/Parser.h"
+
+
+using namespace std;
+using namespace folia;
+using namespace TiCC;
+using namespace Tagger;
+
+string configDir = string(SYSCONF_PATH) + "/" + PACKAGE + "/";
+string configFileName = configDir + "frog.cfg";
+
+string FrogAPI::defaultConfigDir( const string& lang ){
+  if ( lang.empty() ){
+    return configDir;
+  }
+  else {
+    return configDir+lang+"/";
+  }
+}
+
+string FrogAPI::defaultConfigFile( const string& lang ){
+  return defaultConfigDir( lang ) + "frog.cfg";
+}
+
+FrogOptions::FrogOptions() {
+  doTok = doLemma = doMorph = doMwu = doIOB = doNER = doParse = true;
+  doDeepMorph = false;
+  doSentencePerLine = false;
+  doQuoteDetection = false;
+  doDirTest = false;
+  doServer = false;
+  doXMLin =  false;
+  doXMLout =  false;
+  doKanon =  false;
+  interactive = false;
+
+  maxParserTokens =  0; // 0 for unlimited
+#ifdef HAVE_OPENMP
+  numThreads = omp_get_max_threads();
+#else
+  numThreads = 1;
+#endif
+  uttmark = "<utt>";
+  listenport = "void";
+  docid = "untitled";
+  debugFlag = 0;
+}
+
+FrogAPI::FrogAPI( FrogOptions &opt,
+		  const Configuration &conf,
+		  LogStream *log ):
+  configuration(conf),
+  options(opt),
+  theErrLog(log),
+  myMbma(0),
+  myMblem(0),
+  myMwu(0),
+  myParser(0),
+  myPoSTagger(0),
+  myIOBTagger(0),
+  myNERTagger(0),
+  tokenizer(0)
+{
+  // for some modules init can take a long time
+  // so first make sure it will not fail on some trivialities
+  //
+  if ( options.doTok && !configuration.hasSection("tokenizer") ){
+    *Log(theErrLog) << "Missing [[tokenizer]] section in config file." << endl;
+    *Log(theErrLog) << "Disabled the tokenizer." << endl;
+    options.doTok = false;
+  }
+  if ( options.doMorph && !configuration.hasSection("mbma") ){
+    *Log(theErrLog) << "Missing [[mbma]] section in config file." << endl;
+    *Log(theErrLog) << "Disabled the Morhological analyzer." << endl;
+    options.doMorph = false;
+  }
+  if ( options.doIOB && !configuration.hasSection("IOB") ){
+    *Log(theErrLog) << "Missing [[IOB]] section in config file." << endl;
+    *Log(theErrLog) << "Disabled the IOB Chunker." << endl;
+    options.doIOB = false;
+  }
+  if ( options.doNER && !configuration.hasSection("NER") ){
+    *Log(theErrLog) << "Missing [[NER]] section in config file." << endl;
+    *Log(theErrLog) << "Disabled the NER." << endl;
+    options.doNER = false;
+  }
+  if ( options.doMwu && !configuration.hasSection("mwu") ){
+    *Log(theErrLog) << "Missing [[mwu]] section in config file." << endl;
+    *Log(theErrLog) << "Disabled the Multi Word Unit." << endl;
+    *Log(theErrLog) << "Also disabled the parser." << endl;
+    options.doMwu = false;
+    options.doParse = false;
+  }
+  if ( options.doParse && !configuration.hasSection("parser") ){
+    *Log(theErrLog) << "Missing [[parser]] section in config file." << endl;
+    *Log(theErrLog) << "Disabled the parser." << endl;
+    options.doParse = false;
+  }
+
+  if ( options.doServer ){
+    // we use fork(). omp (GCC version) doesn't do well when omp is used
+    // before the fork!
+    // see: http://bisqwit.iki.fi/story/howto/openmp/#OpenmpAndFork
+    tokenizer = new UctoTokenizer(theErrLog);
+    bool stat = tokenizer->init( configuration );
+    if ( stat ){
+      tokenizer->setPassThru( !options.doTok );
+      tokenizer->setDocID( options.docid );
+      tokenizer->setSentencePerLineInput( options.doSentencePerLine );
+      tokenizer->setQuoteDetection( options.doQuoteDetection );
+      tokenizer->setInputEncoding( options.encoding );
+      tokenizer->setInputXml( options.doXMLin );
+      tokenizer->setUttMarker( options.uttmark );
+      tokenizer->setTextClass( options.textclass );
+      myPoSTagger = new CGNTagger(theErrLog);
+      stat = myPoSTagger->init( configuration );
+      if ( stat ){
+	myPoSTagger->set_eos_mark( options.uttmark );
+	if ( options.doIOB ){
+	  myIOBTagger = new IOBTagger(theErrLog);
+	  stat = myIOBTagger->init( configuration );
+	  if ( stat ){
+	    myIOBTagger->set_eos_mark( options.uttmark );
+	  }
+	}
+	if ( stat && options.doNER ){
+	  myNERTagger = new NERTagger(theErrLog);
+	  stat = myNERTagger->init( configuration );
+	  if ( stat ){
+	    myNERTagger->set_eos_mark( options.uttmark );
+	  }
+	}
+	if ( stat && options.doLemma ){
+	  myMblem = new Mblem(theErrLog);
+	  stat = myMblem->init( configuration );
+	}
+	if ( stat && options.doMorph ){
+	  myMbma = new Mbma(theErrLog);
+	  stat = myMbma->init( configuration );
+	  if ( stat ) {
+	    if ( options.doDeepMorph )
+	      myMbma->setDeepMorph(true);
+	  }
+	}
+	if ( stat && options.doMwu ){
+	  myMwu = new Mwu(theErrLog);
+	  stat = myMwu->init( configuration );
+	  if ( stat && options.doParse ){
+	    myParser = new Parser(theErrLog);
+	    stat = myParser->init( configuration );
+	  }
+	}
+      }
+    }
+    if ( !stat ){
+      *Log(theErrLog) << "Frog initialization failed." << endl;
+      exit(2);
+    }
+  }
+  else {
+#ifdef HAVE_OPENMP
+    omp_set_num_threads( options.numThreads );
+    int curt = omp_get_max_threads();
+    if ( curt != options.numThreads ){
+      *Log(theErrLog) << "attempt to set to " << options.numThreads
+		      << " threads FAILED, running on " << curt
+		      << " threads instead" << endl;
+    }
+    else if ( options.debugFlag ){
+      *Log(theErrLog) << "running on " << curt
+		      << " threads" << endl;
+    }
+
+#endif
+
+    bool tokStat = true;
+    bool lemStat = true;
+    bool mwuStat = true;
+    bool mbaStat = true;
+    bool parStat = true;
+    bool tagStat = true;
+    bool iobStat = true;
+    bool nerStat = true;
+
+#pragma omp parallel sections
+    {
+#pragma omp section
+      {
+	tokenizer = new UctoTokenizer(theErrLog);
+	tokStat = tokenizer->init( configuration );
+	if ( tokStat ){
+	  tokenizer->setPassThru( !options.doTok );
+	  tokenizer->setDocID( options.docid );
+	  tokenizer->setSentencePerLineInput( options.doSentencePerLine );
+	  tokenizer->setQuoteDetection( options.doQuoteDetection );
+	  tokenizer->setInputEncoding( options.encoding );
+	  tokenizer->setInputXml( options.doXMLin );
+	  tokenizer->setUttMarker( options.uttmark );
+	  tokenizer->setTextClass( options.textclass );
+	}
+      }
+#pragma omp section
+      {
+	if ( options.doLemma ){
+	  myMblem = new Mblem(theErrLog);
+	  lemStat = myMblem->init( configuration );
+	}
+      }
+#pragma omp section
+      {
+	if ( options.doMorph ){
+	  myMbma = new Mbma(theErrLog);
+	  mbaStat = myMbma->init( configuration );
+	  if ( options.doDeepMorph )
+	    myMbma->setDeepMorph(true);
+	}
+      }
+#pragma omp section
+      {
+	myPoSTagger = new CGNTagger(theErrLog);
+	tagStat = myPoSTagger->init( configuration );
+      }
+#pragma omp section
+      {
+	if ( options.doIOB ){
+	  myIOBTagger = new IOBTagger(theErrLog);
+	  iobStat = myIOBTagger->init( configuration );
+	}
+      }
+#pragma omp section
+      {
+	if ( options.doNER ){
+	  myNERTagger = new NERTagger(theErrLog);
+	  nerStat = myNERTagger->init( configuration );
+	}
+      }
+#pragma omp section
+      {
+	if ( options.doMwu ){
+	  myMwu = new Mwu(theErrLog);
+	  mwuStat = myMwu->init( configuration );
+	  if ( mwuStat && options.doParse ){
+	    Timer initTimer;
+	    initTimer.start();
+	    myParser = new Parser(theErrLog);
+	    parStat = myParser->init( configuration );
+	    initTimer.stop();
+	    *Log(theErrLog) << "init Parse took: " << initTimer << endl;
+	  }
+	}
+      }
+    }   // end omp parallel sections
+    if ( ! ( tokStat && iobStat && nerStat && tagStat && lemStat
+	     && mbaStat && mwuStat && parStat ) ){
+      string out = "Initialization failed for: ";
+      if ( !tokStat ){
+	out += "[tokenizer] ";
+      }
+      if ( !tagStat ){
+	out += "[tagger] ";
+      }
+      if ( !iobStat ){
+	out += "[IOB] ";
+      }
+      if ( !nerStat ){
+	out += "[NER] ";
+      }
+      if ( !lemStat ){
+	out += "[lemmatizer] ";
+      }
+      if ( !mbaStat ){
+	out += "[morphology] ";
+      }
+      if ( !mwuStat ){
+	out += "[multiword unit] ";
+      }
+      if ( !parStat ){
+	out += "[parser] ";
+      }
+      *Log(theErrLog) << out << endl;
+      exit( EXIT_FAILURE );
+    }
+  }
+  *Log(theErrLog) << "Initialization done." << endl;
+}
+
+FrogAPI::~FrogAPI() {
+  delete myMbma;
+  delete myMblem;
+  delete myMwu;
+  delete myPoSTagger;
+  delete myIOBTagger;
+  delete myNERTagger;
+  delete myParser;
+  delete tokenizer;
+}
+
+bool FrogAPI::TestSentence( Sentence* sent, TimerBlock& timers){
+  vector<Word*> swords;
+  if ( options.doQuoteDetection ){
+    swords = sent->wordParts();
+  }
+  else {
+    swords = sent->words();
+  }
+  bool showParse = options.doParse;
+  bool all_well = true;
+  string exs;
+  if ( !swords.empty() ) {
+#pragma omp parallel sections shared(all_well,exs)
+    {
+#pragma omp section
+      {
+	timers.tagTimer.start();
+	try {
+	  myPoSTagger->Classify( swords );
+	}
+	catch ( exception&e ){
+	  all_well = false;
+	  exs += string(e.what()) + " ";
+	}
+	timers.tagTimer.stop();
+      }
+#pragma omp section
+      {
+	if ( options.doIOB ){
+	  timers.iobTimer.start();
+	  try {
+	    myIOBTagger->Classify( swords );
+	  }
+	  catch ( exception&e ){
+	    all_well = false;
+	    exs += string(e.what()) + " ";
+	  }
+	  timers.iobTimer.stop();
+	}
+      }
+#pragma omp section
+      {
+	if ( options.doNER ){
+	  timers.nerTimer.start();
+	  try {
+	    myNERTagger->Classify( swords );
+	  }
+	  catch ( exception&e ){
+	    all_well = false;
+	    exs += string(e.what()) + " ";
+	  }
+	  timers.nerTimer.stop();
+	}
+      }
+    } // parallel sections
+    if ( !all_well ){
+      throw runtime_error( exs );
+    }
+    for ( const auto& sword : swords ) {
+#pragma omp parallel sections
+      {
+#pragma omp section
+	{
+	  if ( options.doMorph ){
+	    timers.mbmaTimer.start();
+	    if (options.debugFlag){
+	      *Log(theErrLog) << "Calling mbma..." << endl;
+	    }
+	    try {
+	      myMbma->Classify( sword );
+	    }
+	    catch ( exception& e ){
+	      all_well = false;
+	      exs += string(e.what()) + " ";
+	    }
+	    timers.mbmaTimer.stop();
+	  }
+	}
+#pragma omp section
+	{
+	  if ( options.doLemma ){
+	    timers.mblemTimer.start();
+	    if (options.debugFlag) {
+	      *Log(theErrLog) << "Calling mblem..." << endl;
+	    }
+	    try {
+	      myMblem->Classify( sword );
+	    }
+	    catch ( exception&e ){
+	      all_well = false;
+	      exs += string(e.what()) + " ";
+	    }
+	    timers.mblemTimer.stop();
+	  }
+	}
+      } // omp parallel sections
+    } //for int i = 0 to num_words
+    if ( !all_well ){
+      throw runtime_error( exs );
+    }
+
+    if ( options.doMwu ){
+      if ( swords.size() > 0 ){
+	timers.mwuTimer.start();
+	myMwu->Classify( swords );
+	timers.mwuTimer.stop();
+      }
+    }
+    if ( options.doParse ){
+      if ( options.maxParserTokens != 0
+	   && swords.size() > options.maxParserTokens ){
+	showParse = false;
+      }
+      else {
+        myParser->Parse( swords, timers );
+      }
+    }
+  }
+  return showParse;
+}
+
+void FrogAPI::FrogServer( Sockets::ServerSocket &conn ){
+  try {
+    while (true) {
+      ostringstream outputstream;
+      if ( options.doXMLin ){
+        string result;
+        string s;
+        while ( conn.read(s) ){
+            result += s + "\n";
+            if ( s.empty() )
+                break;
+        }
+        if ( result.size() < 50 ){
+            // a FoLia doc must be at least a few 100 bytes
+            // so this is wrong. Just bail out
+            throw( runtime_error( "read garbage" ) );
+        }
+        if ( options.debugFlag ){
+	  *Log(theErrLog) << "received data [" << result << "]" << endl;
+	}
+        Document doc;
+        try {
+	  doc.readFromString( result );
+        }
+	catch ( std::exception& e ){
+	  *Log(theErrLog) << "FoLiaParsing failed:" << endl << e.what() << endl;
+	  throw;
+        }
+        *Log(theErrLog) << "Processing... " << endl;
+	timers.reset();
+	timers.tokTimer.start();
+	tokenizer->tokenize( doc );
+	timers.tokTimer.stop();
+        FrogDoc( doc );
+	if ( options.doXMLout ){
+	  doc.save( outputstream, options.doKanon );
+	}
+	else {
+	  showResults( outputstream, doc );
+	}
+      }
+      else {
+        string data = "";
+        if ( options.doSentencePerLine ){
+	  if ( !conn.read( data ) ){
+	    //read data from client
+	    throw( runtime_error( "read failed" ) );
+	  }
+	}
+        else {
+	  string line;
+	  while( conn.read(line) ){
+	    if ( line == "EOT" )
+	      break;
+	    data += line + "\n";
+	  }
+        }
+        if ( options.debugFlag ){
+	  *Log(theErrLog) << "Received: [" << data << "]" << endl;
+	}
+        *Log(theErrLog) << "Processing... " << endl;
+        istringstream inputstream(data,istringstream::in);
+	timers.reset();
+	timers.tokTimer.start();
+        Document *doc = tokenizer->tokenize( inputstream );
+	timers.tokTimer.stop();
+        FrogDoc( *doc );
+	if ( options.doXMLout ){
+	  doc->save( outputstream, options.doKanon );
+	}
+	else {
+	  showResults( outputstream, *doc );
+	}
+	delete doc;
+      }
+      if (!conn.write( (outputstream.str()) ) || !(conn.write("READY\n"))  ){
+	if (options.debugFlag) {
+	  *Log(theErrLog) << "socket " << conn.getMessage() << endl;
+	}
+	throw( runtime_error( "write to client failed" ) );
+      }
+    }
+  }
+  catch ( std::exception& e ) {
+    if (options.debugFlag){
+      *Log(theErrLog) << "connection lost: " << e.what() << endl;
+    }
+  }
+  *Log(theErrLog) << "Connection closed.\n";
+}
+
+void FrogAPI::FrogStdin( bool prompt ) {
+  if ( prompt ){
+    cout << "frog>"; cout.flush();
+  }
+  string line;
+  string data;
+  while ( getline( cin, line ) ){
+    string data = line;
+    if ( options.doSentencePerLine ){
+      if ( line.empty() ){
+	if ( prompt ){
+	  cout << "frog>"; cout.flush();
+	}
+	continue;
+      }
+    }
+    else {
+      if ( !line.empty() ){
+	data += "\n";
+      }
+      if ( prompt ){
+	cout << "frog>"; cout.flush();
+      }
+      string line2;
+      while( getline( cin, line2 ) ){
+	if ( line2.empty() ){
+	  break;
+	}
+	data += line2 + "\n";
+	if (prompt ){
+	  cout << "frog>"; cout.flush();
+	}
+      }
+    }
+    if ( prompt && data.empty() ){
+      cout << "ignoring empty input" << endl;
+      cout << "frog>"; cout.flush();
+      continue;
+    }
+    if ( prompt ){
+      cout << "Processing... " << endl;
+    }
+    istringstream inputstream(data,istringstream::in);
+    Document *doc = tokenizer->tokenize( inputstream );
+    FrogDoc( *doc, true );
+    showResults( cout, *doc );
+    delete doc;
+    if ( prompt ){
+      cout << "frog>"; cout.flush();
+    }
+  }
+  if ( prompt ){
+    cout << "Done.\n";
+  }
+}
+
+void FrogAPI::FrogInteractive(){
+  bool isTTY = isatty(0);
+#ifdef NO_READLINE
+  FrogStdin(isTTY);
+#else
+  if ( !isTTY ){
+    FrogStdin( false );
+  }
+  else {
+    const char *prompt = "frog> ";
+    string line;
+    bool eof = false;
+    while ( !eof ){
+      string data;
+      char *input = readline( prompt );
+      if ( !input ){
+	eof = true;
+	break;
+      }
+      line = input;
+      if ( options.doSentencePerLine ){
+	if ( line.empty() ){
+	  free( input );
+	  continue;
+	}
+	else {
+	  add_history( input );
+	  free( input );
+	  data += line + "\n";
+	}
+      }
+      else {
+	if ( !line.empty() ){
+	  add_history( input );
+	  free( input );
+	  data = line + "\n";
+	}
+	while ( !eof ){
+	  char *input = readline( prompt );
+	  if ( !input ){
+	    eof = true;
+	    break;
+	  }
+	  line = input;
+	  if ( line.empty() ){
+	    free( input );
+	    break;
+	  }
+	  add_history( input );
+	  free( input );
+	  data += line + "\n";
+	}
+      }
+      if ( !data.empty() ){
+	if ( data[data.size()-1] == '\n' ){
+	  data = data.substr( 0, data.size()-1 );
+	}
+	cout << "Processing... '" << data << "'" << endl;
+	istringstream inputstream(data,istringstream::in);
+	Document *doc = tokenizer->tokenize( inputstream );
+	FrogDoc( *doc, true );
+	showResults( cout, *doc );
+	delete doc;
+      }
+    }
+    cout << "Done.\n";
+  }
+#endif
+}
+
+vector<Word*> FrogAPI::lookup( Word *word,
+			       const vector<Entity*>& entities ) const {
+  for ( const auto& ent : entities ){
+    vector<Word*> vec = ent->select<Word>();
+    if ( !vec.empty() ){
+      if ( vec[0]->id() == word->id() ) {
+	return vec;
+      }
+    }
+  }
+  vector<Word*> vec;
+  vec.push_back( word ); // single unit
+  return vec;
+}
+
+Dependency *FrogAPI::lookupDep( const Word *word,
+				const vector<Dependency*>&dependencies ) const{
+  if (dependencies.size() == 0 ){
+    return 0;
+  }
+  int dbFlag = 0;
+  try {
+    dbFlag = stringTo<int>( configuration.lookUp( "debug", "parser" ) );
+  }
+  catch (exception & e) {
+    dbFlag = 0;
+  }
+  if ( dbFlag ){
+    using TiCC::operator<<;
+    *Log( theErrLog ) << "\nDependency-lookup "<< word << " in " << dependencies << endl;
+  }
+  for ( const auto& dep : dependencies ){
+    if ( dbFlag ){
+      *Log( theErrLog ) << "Dependency try: " << dep << endl;
+    }
+    try {
+      vector<DependencyDependent*> dv = dep->select<DependencyDependent>();
+      if ( !dv.empty() ){
+	vector<Word*> wv = dv[0]->select<Word>();
+	for ( const auto& w : wv ){
+	  if ( w == word ){
+	    if ( dbFlag ){
+	      *Log(theErrLog) << "\nDependency found word " << w << endl;
+	    }
+	    return dep;
+	  }
+	}
+      }
+    }
+    catch ( exception& e ){
+      if (dbFlag > 0){
+	*Log(theErrLog) << "get Dependency results failed: "
+			<< e.what() << endl;
+      }
+    }
+  }
+  return 0;
+}
+
+string FrogAPI::lookupNEREntity( const vector<Word *>& mwus,
+				 const vector<Entity*>& entities ) const {
+  string endresult;
+  int dbFlag = 0;
+  try{
+    dbFlag = stringTo<int>( configuration.lookUp( "debug", "NER" ) );
+  }
+  catch (exception & e) {
+    dbFlag = 0;
+  }
+  for ( const auto& mwu : mwus ){
+    if ( dbFlag ){
+      using TiCC::operator<<;
+      *Log(theErrLog) << "\nNER: lookup "<< mwu << " in " << entities << endl;
+    }
+    string result;
+    for ( const auto& entity :entities ){
+      if ( dbFlag ){
+	*Log(theErrLog) << "NER: try: " << entity << endl;
+      }
+      try {
+	vector<Word*> wv = entity->select<Word>();
+	bool first = true;
+	for ( const auto& word : wv ){
+	  if ( word == mwu ){
+	    if (dbFlag){
+	      *Log(theErrLog) << "NER found word " << word << endl;
+	    }
+	    if ( first ){
+	      result += "B-" + uppercase(entity->cls());
+	    }
+	    else {
+	      result += "I-" + uppercase(entity->cls());
+	    }
+	    break;
+	  }
+	  else {
+	    first = false;
+	  }
+	}
+      }
+      catch ( exception& e ){
+	if  (dbFlag > 0){
+	  *Log(theErrLog) << "get NER results failed: "
+			  << e.what() << endl;
+	}
+      }
+    }
+    if ( result.empty() ){
+      endresult += "O";
+    }
+    else {
+      endresult += result;
+    }
+    if ( &mwu != &mwus.back() ){
+      endresult += "_";
+    }
+  }
+  return endresult;
+}
+
+
+string FrogAPI::lookupIOBChunk( const vector<Word *>& mwus,
+				const vector<Chunk*>& chunks ) const{
+  string endresult;
+  int dbFlag = 0;
+  try {
+   dbFlag = stringTo<int>( configuration.lookUp( "debug", "IOB" ) );
+  }
+  catch (exception & e) {
+    dbFlag = 0;
+  }
+  for ( const auto& mwu : mwus ){
+    if ( dbFlag ){
+      using TiCC::operator<<;
+      *Log(theErrLog) << "IOB lookup "<< mwu << " in " << chunks << endl;
+    }
+    string result;
+    for ( const auto& chunk : chunks ){
+      if ( dbFlag ){
+	*Log(theErrLog) << "IOB try: " << chunk << endl;
+      }
+      try {
+	vector<Word*> wv = chunk->select<Word>();
+	bool first = true;
+	for ( const auto& word : wv ){
+	  if ( word == mwu ){
+	    if (dbFlag){
+	      *Log(theErrLog) << "IOB found word " << word << endl;
+	    }
+	    if ( first ) {
+	      result += "B-" + chunk->cls();
+	    }
+	    else {
+	      result += "I-" + chunk->cls();
+	    }
+	    break;
+	  }
+	  else {
+	    first = false;
+	  }
+	}
+      }
+      catch ( exception& e ){
+	if  (dbFlag > 0) {
+	  *Log(theErrLog) << "get Chunks results failed: "
+			  << e.what() << endl;
+	}
+      }
+    }
+    if ( result.empty() ) {
+      endresult += "O";
+    }
+    else {
+      endresult += result;
+    }
+    if ( &mwu != &mwus.back() ){
+      endresult += "_";
+    }
+  }
+  return endresult;
+}
+
+vector<string> get_compound_analysis( folia::Word* word ){
+  vector<string> result;
+  vector<MorphologyLayer*> layers
+    = word->annotations<MorphologyLayer>( Mbma::mbma_tagset );
+  for ( const auto& layer : layers ){
+    vector<Morpheme*> m =
+      layer->select<Morpheme>( Mbma::mbma_tagset, false );
+    if ( m.size() == 1 ) {
+      // check for top layer compound
+      PosAnnotation *postag = 0;
+      try {
+	postag = m[0]->annotation<PosAnnotation>( Mbma::clex_tagset );
+	//	cerr << "found a clex postag!" << endl;
+	result.push_back( postag->feat( "compound" ) ); // might be empty
+      }
+      catch (...){
+	result.push_back( "" ); // pad with empty strings
+      }
+    }
+  }
+  return result;
+}
+
+string flatten( const string& s ){
+  string result;
+  string::size_type bpos = s.find_first_not_of( "[" );
+  if ( bpos != string::npos ){
+    string::size_type epos = s.find_first_of( "]", bpos );
+    result += "[" + s.substr( bpos, epos-bpos ) + "]";
+    bpos = s.find_first_of( "[", epos+1 );
+    bpos = s.find_first_not_of( "[", bpos );
+    while ( bpos != string::npos ){
+      string::size_type epos = s.find_first_of( "]", bpos );
+      if ( epos == string::npos ){
+	break;
+      }
+      result += "[" + s.substr( bpos, epos-bpos ) + "]";
+      bpos = s.find_first_of( "[", epos+1 );
+      bpos = s.find_first_not_of( "[", bpos );
+    }
+  }
+  else {
+    result = s;
+  }
+  return result;
+}
+
+vector<string> get_full_morph_analysis( folia::Word* w, bool flat ){
+  vector<string> result;
+  vector<MorphologyLayer*> layers
+    = w->annotations<MorphologyLayer>( Mbma::mbma_tagset );
+  for ( const auto& layer : layers ){
+    vector<Morpheme*> m =
+      layer->select<Morpheme>( Mbma::mbma_tagset, false );
+    bool is_deep = false;
+    if ( m.size() == 1 ) {
+      // check for top layer from deep morph analysis
+      string str  = m[0]->feat( "structure" );
+      if ( !str.empty() ){
+	is_deep = true;
+	if ( flat ){
+	  str = flatten(str);
+	}
+	result.push_back( str );
+      }
+    }
+    if ( !is_deep ){
+      // flat structure
+      string morph;
+      vector<Morpheme*> m = layer->select<Morpheme>( Mbma::mbma_tagset );
+      for ( const auto& mor : m ){
+	string txt = UnicodeToUTF8( mor->text() );
+	morph += "[" + txt + "]";
+      }
+      result.push_back( morph );
+    }
+  }
+  return result;
+}
+
+void FrogAPI::displayMWU( ostream& os,
+			  size_t index,
+			  const vector<Word*>& mwu ) const {
+  string wrd;
+  string pos;
+  string lemma;
+  string morph;
+  string comp;
+  double conf = 1;
+  for ( const auto& word : mwu ){
+    try {
+      wrd += word->str();
+      PosAnnotation *postag = word->annotation<PosAnnotation>( myPoSTagger->getTagset() );
+      pos += postag->cls();
+      if ( &word != &mwu.back() ){
+	wrd += "_";
+	pos += "_";
+      }
+      conf *= postag->confidence();
+    }
+    catch ( exception& e ){
+      if  (options.debugFlag > 0){
+	*Log(theErrLog) << "get Postag results failed: "
+			<< e.what() << endl;
+      }
+    }
+    if ( options.doLemma ){
+      try {
+	lemma += word->lemma(myMblem->getTagset());
+	if ( &word != &mwu.back() ){
+	  lemma += "_";
+	}
+      }
+      catch ( exception& e ){
+	if  (options.debugFlag > 0){
+	  *Log(theErrLog) << "get Lemma results failed: "
+			  << e.what() << endl;
+	}
+      }
+    }
+    if ( options.doMorph ){
+      // also covers doDeepMorph
+      try {
+	vector<string> morphs = get_full_morph_analysis( word );
+	for ( const auto& m : morphs ){
+	  morph += m;
+	  if ( &m != &morphs.back() ){
+	    morph += "/";
+	  }
+	}
+	if ( &word != &mwu.back() ){
+	  morph += "_";
+	}
+      }
+      catch ( exception& e ){
+	if  (options.debugFlag > 0){
+	  *Log(theErrLog) << "get Morph results failed: "
+			  << e.what() << endl;
+	}
+      }
+    }
+    if ( options.doDeepMorph ){
+      try {
+	vector<string> cpv = get_compound_analysis( word );
+	for ( const auto& cp : cpv ){
+	  if ( cp.empty() ){
+	    comp += "0";
+	  }
+	  else {
+	    comp += cp+"-compound";
+	  }
+	  if ( &cp != &cpv.back() ){
+	    morph += "/";
+	  }
+	}
+	if ( &word != &mwu.back() ){
+	  comp += "_";
+	}
+      }
+      catch ( exception& e ){
+	if  (options.debugFlag > 0){
+	  *Log(theErrLog) << "get Morph results failed: "
+			  << e.what() << endl;
+	}
+      }
+    }
+  }
+  os << index << "\t" << wrd << "\t" << lemma << "\t" << morph;
+  if ( options.doDeepMorph ){
+    if ( comp.empty() ){
+      comp = "0";
+    }
+    os << "\t" << comp;
+  }
+  os << "\t" << pos << "\t" << std::fixed << conf;
+}
+
+ostream& FrogAPI::showResults( ostream& os,
+			       Document& doc ) const {
+  vector<Sentence*> sentences = doc.sentences();
+  for ( auto const& sentence : sentences ){
+    vector<Word*> words = sentence->words();
+    vector<Entity*> mwu_entities;
+    if (myMwu){
+      mwu_entities = sentence->select<Entity>( myMwu->getTagset() );
+    }
+    vector<Dependency*> dependencies;
+    if (myParser){
+      dependencies = sentence->select<Dependency>( myParser->getTagset() );
+    }
+    vector<Chunk*> iob_chunking;
+    if ( myIOBTagger ){
+      iob_chunking = sentence->select<Chunk>( myIOBTagger->getTagset() );
+    }
+    vector<Entity*> ner_entities;
+    if (myNERTagger){
+      ner_entities =  sentence->select<Entity>( myNERTagger->getTagset() );
+    }
+    static set<ElementType> excludeSet;
+    vector<Sentence*> parts = sentence->select<Sentence>( excludeSet );
+    if ( !options.doQuoteDetection ){
+      assert( parts.size() == 0 );
+    }
+    for ( auto const& part : parts ){
+      vector<Entity*> ents;
+      if (myMwu){
+	ents = part->select<Entity>( myMwu->getTagset() );
+      }
+      mwu_entities.insert( mwu_entities.end(), ents.begin(), ents.end() );
+      vector<Dependency*> deps = part->select<Dependency>();
+      dependencies.insert( dependencies.end(), deps.begin(), deps.end() );
+      vector<Chunk*> chunks = part->select<Chunk>();
+      iob_chunking.insert( iob_chunking.end(), chunks.begin(), chunks.end() );
+      vector<Entity*> ners ;
+      if (myNERTagger) {
+	ners = part->select<Entity>( myNERTagger->getTagset() );
+      }
+      ner_entities.insert( ner_entities.end(), ners.begin(), ners.end() );
+    }
+
+    size_t index = 1;
+    map<FoliaElement*, int> enumeration;
+    vector<vector<Word*> > mwus;
+    for ( size_t i=0; i < words.size(); ++i ){
+      Word *word = words[i];
+      vector<Word*> mwu = lookup( word, mwu_entities );
+      for ( size_t j=0; j < mwu.size(); ++j ){
+	enumeration[mwu[j]] = index;
+      }
+      mwus.push_back( mwu );
+      i += mwu.size()-1;
+      ++index;
+    }
+    index = 0;
+    for ( const auto& mwu : mwus ){
+      displayMWU( os, ++index, mwu );
+      if ( options.doNER ){
+	string cls;
+	string s = lookupNEREntity( mwu, ner_entities );
+	os << "\t" << s;
+      }
+      else {
+	os << "\t\t";
+      }
+      if ( options.doIOB ){
+	string cls;
+	string s = lookupIOBChunk( mwu, iob_chunking);
+	os << "\t" << s;
+      }
+      else {
+	os << "\t\t";
+      }
+      if ( options.doParse ){
+	string cls;
+	Dependency *dep = lookupDep( mwu[0], dependencies);
+	if ( dep ){
+	  vector<Headspan*> w = dep->select<Headspan>();
+	  size_t num;
+	  if ( w[0]->index(0)->isinstance( PlaceHolder_t ) ){
+	    string indexS = w[0]->index(0)->str();
+	    FoliaElement *pnt = w[0]->index(0)->doc()->index(indexS);
+	    num = enumeration.find(pnt->index(0))->second;
+	  }
+	  else {
+	    num = enumeration.find(w[0]->index(0))->second;
+	  }
+	  os << "\t" << num << "\t" << dep->cls();
+	}
+	else {
+	  os << "\t"<< 0 << "\tROOT";
+	}
+      }
+      else {
+	os << "\t\t";
+      }
+      os << endl;
+    }
+    if ( words.size() ){
+      os << endl;
+    }
+  }
+  return os;
+}
+
+string FrogAPI::Frogtostring( const string& s ){
+  Document *doc = tokenizer->tokenizestring( s );
+  stringstream ss;
+  FrogDoc( *doc, true );
+  showResults( ss, *doc );
+  delete doc;
+  return ss.str();
+}
+
+string FrogAPI::Frogtostringfromfile( const string& name ){
+  stringstream ss;
+  FrogFile( name, ss, "" );
+  return ss.str();
+}
+
+void FrogAPI::FrogDoc( Document& doc,
+		       bool hidetimers ){
+  timers.frogTimer.start();
+  // first we make sure that the doc will accept our annotations, by
+  // declaring them in the doc
+  if (myPoSTagger){
+    myPoSTagger->addDeclaration( doc );
+  }
+  if ( options.doLemma && myMblem ) {
+    myMblem->addDeclaration( doc );
+  }
+  if ( options.doMorph && myMbma ) {
+    myMbma->addDeclaration( doc );
+  }
+  if ( options.doIOB && myIOBTagger ){
+    myIOBTagger->addDeclaration( doc );
+  }
+  if ( options.doNER && myNERTagger ){
+    myNERTagger->addDeclaration( doc );
+  }
+  if ( options.doMwu && myMwu ){
+    myMwu->addDeclaration( doc );
+  }
+  if ( options.doParse && myParser ){
+    myParser->addDeclaration( doc );
+  }
+  if ( options.debugFlag > 5 ){
+    *Log(theErrLog) << "Testing document :" << doc << endl;
+  }
+
+  vector<Sentence*> sentences;
+  if ( options.doQuoteDetection ){
+    sentences = doc.sentenceParts();
+  }
+  else {
+    sentences = doc.sentences();
+  }
+  size_t numS = sentences.size();
+  if ( numS > 0 ) { //process sentences
+    if  (options.debugFlag > 0) {
+      *Log(theErrLog) << "found " << numS
+		      << " sentence(s) in document." << endl;
+    }
+    for ( size_t i = 0; i < numS; ++i ) {
+      //NOTE- full sentences are passed (which may span multiple lines) (MvG)
+      bool showParse = TestSentence( sentences[i], timers );
+      if ( options.doParse && !showParse ){
+	*Log(theErrLog) << "WARNING!" << endl;
+	*Log(theErrLog) << "Sentence " << i+1
+			<< " isn't parsed because it contains more tokens then set with the --max-parser-tokens="
+			<< options.maxParserTokens << " option." << endl;
+      }
+    }
+  }
+  else {
+    if  (options.debugFlag > 0){
+      *Log(theErrLog) << "No sentences found in document. " << endl;
+    }
+  }
+
+  timers.frogTimer.stop();
+  if ( !hidetimers ){
+    *Log(theErrLog) << "tokenisation took:  " << timers.tokTimer << endl;
+    *Log(theErrLog) << "CGN tagging took:   " << timers.tagTimer << endl;
+    if ( options.doIOB){
+      *Log(theErrLog) << "IOB chunking took:  " << timers.iobTimer << endl;
+    }
+    if ( options.doNER){
+      *Log(theErrLog) << "NER took:           " << timers.nerTimer << endl;
+    }
+    if ( options.doMorph ){
+      *Log(theErrLog) << "MBMA took:          " << timers.mbmaTimer << endl;
+    }
+    if ( options.doLemma ){
+      *Log(theErrLog) << "Mblem took:         " << timers.mblemTimer << endl;
+    }
+    if ( options.doMwu ){
+      *Log(theErrLog) << "MWU resolving took: " << timers.mwuTimer << endl;
+    }
+    if ( options.doParse ){
+      *Log(theErrLog) << "Parsing (prepare) took: " << timers.prepareTimer << endl;
+      *Log(theErrLog) << "Parsing (pairs)   took: " << timers.pairsTimer << endl;
+      *Log(theErrLog) << "Parsing (rels)    took: " << timers.relsTimer << endl;
+      *Log(theErrLog) << "Parsing (dir)     took: " << timers.dirTimer << endl;
+      *Log(theErrLog) << "Parsing (csi)     took: " << timers.csiTimer << endl;
+      *Log(theErrLog) << "Parsing (total)   took: " << timers.parseTimer << endl;
+    }
+   *Log(theErrLog) << "Frogging in total took: " << timers.frogTimer << endl;
+  }
+  return;
+}
+
+void FrogAPI::FrogFile( const string& infilename,
+			ostream &os,
+			const string& xmlOutF ) {
+  // stuff the whole input into one FoLiA document.
+  // This is not a good idea on the long term, I think (agreed [proycon] )
+  string xmlOutFile = xmlOutF;
+  if ( options.doXMLin && !xmlOutFile.empty() ){
+    if ( match_back( infilename, ".gz" ) ){
+      if ( !match_back( xmlOutFile, ".gz" ) )
+	xmlOutFile += ".gz";
+    }
+    else if ( match_back( infilename, ".bz2" ) ){
+      if ( !match_back( xmlOutFile, ".bz2" ) )
+	xmlOutFile += ".bz2";
+    }
+  }
+  if ( options.doXMLin ){
+    Document doc;
+    try {
+      doc.readFromFile( infilename );
+    }
+    catch ( exception &e ){
+      *Log(theErrLog) << "retrieving FoLiA from '" << infilename << "' failed with exception:" << endl;
+      cerr << e.what() << endl;
+      return;
+    }
+    timers.reset();
+    timers.tokTimer.start();
+    tokenizer->tokenize( doc );
+    timers.tokTimer.stop();
+    FrogDoc( doc );
+    if ( !xmlOutFile.empty() ){
+      doc.save( xmlOutFile, options.doKanon );
+      *Log(theErrLog) << "resulting FoLiA doc saved in " << xmlOutFile << endl;
+    }
+    showResults( os, doc );
+  }
+  else {
+    ifstream IN( infilename );
+    timers.reset();
+    timers.tokTimer.start();
+    Document *doc = tokenizer->tokenize( IN );
+    timers.tokTimer.stop();
+    FrogDoc( *doc );
+    if ( !xmlOutFile.empty() ){
+      doc->save( xmlOutFile, options.doKanon );
+      *Log(theErrLog) << "resulting FoLiA doc saved in " << xmlOutFile << endl;
+    }
+    showResults( os, *doc );
+    delete doc;
+  }
+}
diff --git a/src/Makefile.am b/src/Makefile.am
index 8ce3e31..4d0ac69 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,21 +1,21 @@
-# $Id: Makefile.am 17436 2014-07-09 13:13:35Z sloot $
-# $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/src/Makefile.am $
-
 AM_CPPFLAGS = -I at top_srcdir@/include
-AM_CXXFLAGS = -DSYSCONF_PATH=\"$(SYSCONFDIR)\" -DPYTHONDIR=\"$(PYTHONDIR)\" -std=c++0x
-bin_PROGRAMS = frog mbma mblem
+AM_CXXFLAGS = -DSYSCONF_PATH=\"$(SYSCONFDIR)\" -std=c++0x # -Weffc++
+bin_PROGRAMS = frog mbma mblem ner
 
 frog_SOURCES = Frog.cxx
 mbma_SOURCES = mbma_prog.cxx
 mblem_SOURCES = mblem_prog.cxx
+ner_SOURCES = ner_prog.cxx
 
 LDADD = libfrog.la
 lib_LTLIBRARIES = libfrog.la
 libfrog_la_LDFLAGS = -version-info 1:0:0
 
-libfrog_la_SOURCES = mbma_mod.cxx mblem_mod.cxx \
+libfrog_la_SOURCES = FrogAPI.cxx \
+	mbma_rule.cxx mbma_mod.cxx mbma_brackets.cxx clex.cxx \
+	mblem_mod.cxx csidp.cxx ckyparser.cxx \
 	Frog-util.cxx mwu_chunker_mod.cxx Parser.cxx \
-	cgn_tagger_mod.cxx iob_tagger_mod.cxx ner_tagger_mod.cxx \
+	pos_tagger_mod.cxx cgn_tagger_mod.cxx iob_tagger_mod.cxx ner_tagger_mod.cxx \
 	ucto_tokenizer_mod.cxx
 
 
diff --git a/src/Makefile.in b/src/Makefile.in
index 6f8a0fd..b8b69a7 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,12 +14,19 @@
 
 @SET_MAKE@
 
-# $Id: Makefile.am 17436 2014-07-09 13:13:35Z sloot $
-# $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/src/Makefile.am $
-
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -82,21 +89,18 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-bin_PROGRAMS = frog$(EXEEXT) mbma$(EXEEXT) mblem$(EXEEXT)
+bin_PROGRAMS = frog$(EXEEXT) mbma$(EXEEXT) mblem$(EXEEXT) ner$(EXEEXT)
 subdir = src
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-	$(top_srcdir)/depcomp $(top_srcdir)/test-driver
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ac_python_devel.m4 \
-	$(top_srcdir)/m4/ax_icu_check.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_icu_check.m4 \
 	$(top_srcdir)/m4/ax_lib_readline.m4 \
 	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-	$(top_srcdir)/m4/openmp.m4 $(top_srcdir)/m4/pkg.m4 \
-	$(top_srcdir)/configure.ac
+	$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -131,9 +135,11 @@ am__uninstall_files_from_dir = { \
 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)"
 LTLIBRARIES = $(lib_LTLIBRARIES)
 libfrog_la_LIBADD =
-am_libfrog_la_OBJECTS = mbma_mod.lo mblem_mod.lo Frog-util.lo \
-	mwu_chunker_mod.lo Parser.lo cgn_tagger_mod.lo \
-	iob_tagger_mod.lo ner_tagger_mod.lo ucto_tokenizer_mod.lo
+am_libfrog_la_OBJECTS = FrogAPI.lo mbma_rule.lo mbma_mod.lo \
+	mbma_brackets.lo clex.lo mblem_mod.lo csidp.lo ckyparser.lo \
+	Frog-util.lo mwu_chunker_mod.lo Parser.lo pos_tagger_mod.lo \
+	cgn_tagger_mod.lo iob_tagger_mod.lo ner_tagger_mod.lo \
+	ucto_tokenizer_mod.lo
 libfrog_la_OBJECTS = $(am_libfrog_la_OBJECTS)
 AM_V_lt = $(am__v_lt_ at AM_V@)
 am__v_lt_ = $(am__v_lt_ at AM_DEFAULT_V@)
@@ -155,6 +161,10 @@ am_mbma_OBJECTS = mbma_prog.$(OBJEXT)
 mbma_OBJECTS = $(am_mbma_OBJECTS)
 mbma_LDADD = $(LDADD)
 mbma_DEPENDENCIES = libfrog.la
+am_ner_OBJECTS = ner_prog.$(OBJEXT)
+ner_OBJECTS = $(am_ner_OBJECTS)
+ner_LDADD = $(LDADD)
+ner_DEPENDENCIES = libfrog.la
 AM_V_P = $(am__v_P_ at AM_V@)
 am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
 am__v_P_0 = false
@@ -190,9 +200,9 @@ am__v_CXXLD_ = $(am__v_CXXLD_ at AM_DEFAULT_V@)
 am__v_CXXLD_0 = @echo "  CXXLD   " $@;
 am__v_CXXLD_1 = 
 SOURCES = $(libfrog_la_SOURCES) $(frog_SOURCES) $(mblem_SOURCES) \
-	$(mbma_SOURCES)
+	$(mbma_SOURCES) $(ner_SOURCES)
 DIST_SOURCES = $(libfrog_la_SOURCES) $(frog_SOURCES) $(mblem_SOURCES) \
-	$(mbma_SOURCES)
+	$(mbma_SOURCES) $(ner_SOURCES)
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -394,6 +404,8 @@ TEST_LOGS = $(am__test_logs2:.test.log=.log)
 TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
 TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
 	$(TEST_LOG_FLAGS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
+	$(top_srcdir)/test-driver
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -446,6 +458,7 @@ LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -453,6 +466,7 @@ NM = @NM@
 NMEDIT = @NMEDIT@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@
 OTOOL = @OTOOL@
 OTOOL64 = @OTOOL64@
 PACKAGE = @PACKAGE@
@@ -469,17 +483,6 @@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
-PYTHON = @PYTHON@
-PYTHONDIR = @PYTHONDIR@
-PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
-PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
-PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@
-PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
-PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
-PYTHON_PLATFORM = @PYTHON_PLATFORM@
-PYTHON_PREFIX = @PYTHON_PREFIX@
-PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
-PYTHON_VERSION = @PYTHON_VERSION@
 RANLIB = @RANLIB@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
@@ -517,6 +520,8 @@ dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 folia_CFLAGS = @folia_CFLAGS@
 folia_LIBS = @folia_LIBS@
+frogdata_CFLAGS = @frogdata_CFLAGS@
+frogdata_LIBS = @frogdata_LIBS@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
@@ -537,13 +542,10 @@ mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
 pkgconfigpath = @pkgconfigpath@
-pkgpyexecdir = @pkgpyexecdir@
-pkgpythondir = @pkgpythondir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
-pyexecdir = @pyexecdir@
-pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -553,24 +555,25 @@ ticcutils_CFLAGS = @ticcutils_CFLAGS@
 ticcutils_LIBS = @ticcutils_LIBS@
 timbl_CFLAGS = @timbl_CFLAGS@
 timbl_LIBS = @timbl_LIBS@
-timblserver_CFLAGS = @timblserver_CFLAGS@
-timblserver_LIBS = @timblserver_LIBS@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 ucto_CFLAGS = @ucto_CFLAGS@
 ucto_LIBS = @ucto_LIBS@
 AM_CPPFLAGS = -I at top_srcdir@/include
-AM_CXXFLAGS = -DSYSCONF_PATH=\"$(SYSCONFDIR)\" -DPYTHONDIR=\"$(PYTHONDIR)\" -std=c++0x
+AM_CXXFLAGS = -DSYSCONF_PATH=\"$(SYSCONFDIR)\" -std=c++0x # -Weffc++
 frog_SOURCES = Frog.cxx
 mbma_SOURCES = mbma_prog.cxx
 mblem_SOURCES = mblem_prog.cxx
+ner_SOURCES = ner_prog.cxx
 LDADD = libfrog.la
 lib_LTLIBRARIES = libfrog.la
 libfrog_la_LDFLAGS = -version-info 1:0:0
-libfrog_la_SOURCES = mbma_mod.cxx mblem_mod.cxx \
+libfrog_la_SOURCES = FrogAPI.cxx \
+	mbma_rule.cxx mbma_mod.cxx mbma_brackets.cxx clex.cxx \
+	mblem_mod.cxx csidp.cxx ckyparser.cxx \
 	Frog-util.cxx mwu_chunker_mod.cxx Parser.cxx \
-	cgn_tagger_mod.cxx iob_tagger_mod.cxx ner_tagger_mod.cxx \
+	pos_tagger_mod.cxx cgn_tagger_mod.cxx iob_tagger_mod.cxx ner_tagger_mod.cxx \
 	ucto_tokenizer_mod.cxx
 
 TESTS = tst.sh
@@ -592,7 +595,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu src/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -710,6 +712,10 @@ mbma$(EXEEXT): $(mbma_OBJECTS) $(mbma_DEPENDENCIES) $(EXTRA_mbma_DEPENDENCIES)
 	@rm -f mbma$(EXEEXT)
 	$(AM_V_CXXLD)$(CXXLINK) $(mbma_OBJECTS) $(mbma_LDADD) $(LIBS)
 
+ner$(EXEEXT): $(ner_OBJECTS) $(ner_DEPENDENCIES) $(EXTRA_ner_DEPENDENCIES) 
+	@rm -f ner$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(ner_OBJECTS) $(ner_LDADD) $(LIBS)
+
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
 
@@ -718,15 +724,23 @@ distclean-compile:
 
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Frog-util.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Frog.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/FrogAPI.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Parser.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cgn_tagger_mod.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ckyparser.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/clex.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/csidp.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/iob_tagger_mod.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mblem_mod.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mblem_prog.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mbma_brackets.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mbma_mod.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mbma_prog.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mbma_rule.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mwu_chunker_mod.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ner_prog.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ner_tagger_mod.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pos_tagger_mod.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ucto_tokenizer_mod.Plo at am__quote@
 
 .cxx.o:
@@ -838,7 +852,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
 	if test -n "$$am__remaking_logs"; then \
 	  echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
 	       "recursion detected" >&2; \
-	else \
+	elif test -n "$$redo_logs"; then \
 	  am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
 	fi; \
 	if $(am__make_dryrun); then :; else \
@@ -1134,6 +1148,8 @@ uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES
 	recheck tags tags-am uninstall uninstall-am \
 	uninstall-binPROGRAMS uninstall-libLTLIBRARIES
 
+.PRECIOUS: Makefile
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/src/Parser.cxx b/src/Parser.cxx
index b247344..66fb6e5 100644
--- a/src/Parser.cxx
+++ b/src/Parser.cxx
@@ -1,14 +1,13 @@
+/* ex: set tabstop=8 expandtab: */
 /*
-  $Id: Parser.cxx 17489 2014-08-07 08:42:59Z sloot $
-  $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/src/Parser.cxx $
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
 
-  Copyright (c) 2006 - 2014
-  Tilburg University
+  This file is part of frog:
 
-  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for Dutch
-  Version 0.04
-
-  This file is part of frog.
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
 
   frog is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -24,12 +23,12 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
   For questions and suggestions, see:
-      http://ilk.uvt.nl/software.html
+      https://github.com/LanguageMachines/frog/issues
   or send mail to:
-      timbl at uvt.nl
+      lamasoftware (at ) science.ru.nl
+
 */
 
-#include "Python.h"
 #include <sys/types.h>
 #include <unistd.h>
 #include <cstdlib>
@@ -38,82 +37,19 @@
 #include <fstream>
 
 #include "config.h"
+#include "ticcutils/Configuration.h"
 #include "timbl/TimblAPI.h"
+#include "ucto/unicode.h"
 #include "frog/Frog.h"
-#include "ticcutils/Configuration.h"
 #include "frog/Parser.h"
+#include "frog/csidp.h"
 
 using namespace std;
-using namespace TiCC;
 using namespace folia;
 
-PythonInterface::PythonInterface( ) {
-  Py_OptimizeFlag = 1; // enable optimisation (-O) mode
-  Py_Initialize();
+using TiCC::operator<<;
 
-  PyObject* ourpath = PyString_FromString( PYTHONDIR );
-  if ( ourpath != 0 ){
-    PyObject *sys_path = PySys_GetObject( (char*)("path"));
-    if (sys_path != NULL ){
-      PyList_Append(sys_path, ourpath);
-    }
-    else
-      sys_path = ourpath;
-  }
-  PyObject *im = 0;
-  try {
-    im = PyImport_ImportModule( "frog.csidp" );
-  }
-  catch( exception const & ){
-    PyErr_Print();
-    im = 0;
-  }
-  PyErr_Clear();
-  if ( !im ){
-    try {
-      im = PyImport_ImportModule( "csidp" );
-    }
-    catch( exception const & ){
-      PyErr_Print();
-      exit(1);
-    }
-  }
-  if ( im ){
-    module.assign( im );
-    PyObject *mf = PyObject_GetAttrString(module, "main");
-    if ( mf )
-      mainFunction.assign( mf );
-    else {
-      PyErr_Print();
-      exit(1);
-    }
-  }
-  else {
-    PyErr_Print();
-    exit(1);
-  }
-}
-
-PythonInterface::~PythonInterface() {
-  Py_Finalize();
-}
-
-void PythonInterface::parse( const string& depFile,
-			     const string& modFile,
-			     const string& dirFile,
-			     const string& maxDist,
-			     const string& inputFile,
-			     const string& outputFile ) {
-
-  PyObjectRef tmp = PyObject_CallFunction(mainFunction,
-					  (char *)"[s, s, s, s, s, s, s, s, s, s, s]",
-					  "--dep", depFile.c_str(),
-					  "--mod", modFile.c_str(),
-					  "--dir", dirFile.c_str(),
-					  "-m", maxDist.c_str(),
-					  "--out", outputFile.c_str(),
-					  inputFile.c_str() );
-}
+#define LOG *TiCC::Log(parseLog)
 
 TiCC::Timer prepareTimer;
 TiCC::Timer relsTimer;
@@ -134,68 +70,64 @@ ostream& operator<<( ostream& os, const parseData& pd ){
   os << "pd heads " << pd.heads << endl;
   os << "pd mods " << pd.mods << endl;
   os << "pd mwus ";
-  for ( size_t i=0; i < pd.mwus.size(); ++i ){
-    for ( size_t j=0; j < pd.mwus[i].size(); ++j )
-      os << pd.mwus[i][j]->id();
+  for ( const auto& mw : pd.mwus ){
+    for ( const auto& w : mw ){
+      os << w->id();
+    }
     os << endl;
   }
   return os;
 }
 
-void Parser::createParserFile( const parseData& pd ){
-  const vector<string>& words = pd.words;
-  const vector<string>& heads = pd.heads;
-  const vector<string>& mods = pd.mods;
-
-  ofstream anaFile( fileName.c_str() );
-  if ( anaFile ){
-    for( size_t i = 0; i < words.size(); ++i ){
-      anaFile << i+1 << "\t" << words[i] << "\t" << "*" << "\t" << heads[i]
-	      << "\t" << heads[i] << "\t" << mods[i] << "\t"<< "0"
-	      << "\t" << "_" << "\t" << "_" << "\t" << "_" << endl;
-    }
-  }
-  else {
-    cerr << "unable to create a parser file " << fileName << endl;
-    exit( EXIT_FAILURE );
-  }
-}
-
-bool Parser::init( const Configuration& configuration ){
+bool Parser::init( const TiCC::Configuration& configuration ){
+  filter = 0;
   string pairsFileName;
-  string pairsOptions = "-a1 +D +vdb+di";
+  string pairsOptions = "-a1 +D -G0 +vdb+di";
   string dirFileName;
-  string dirOptions = "-a1 +D +vdb+di";
+  string dirOptions = "-a1 +D -G0 +vdb+di";
   string relsFileName;
-  string relsOptions = "-a1 +D +vdb+di";
-  PI = new PythonInterface();
-  parseLog = new LogStream( theErrLog );
-  parseLog->addmessage("parser-");
+  string relsOptions = "-a1 +D -G0 +vdb+di";
   maxDepSpanS = "20";
   maxDepSpan = 20;
   bool problem = false;
-  *Log(parseLog) << "initiating parser ... " << endl;
+  LOG << "initiating parser ... " << endl;
   string cDir = configuration.configDir();
   string val = configuration.lookUp( "version", "parser" );
   if ( val.empty() ){
     version = "1.0";
   }
-  else
+  else {
     version = val;
+  }
   val = configuration.lookUp( "set", "parser" );
   if ( val.empty() ){
-    tagset = "http://ilk.uvt.nl/folia/sets/frog-depparse-nl";
+    dep_tagset = "http://ilk.uvt.nl/folia/sets/frog-depparse-nl";
+  }
+  else {
+    dep_tagset = val;
   }
-  else
-    tagset = val;
-
   val = configuration.lookUp( "set", "tagger" );
   if ( val.empty() ){
-    cgn_tagset = "http://ilk.uvt.nl/folia/sets/frog-mbpos-cgn";
+    POS_tagset = "http://ilk.uvt.nl/folia/sets/frog-mbpos-cgn";
+  }
+  else {
+    POS_tagset = val;
+  }
+  val = configuration.lookUp( "set", "mwu" );
+  if ( val.empty() ){
+    MWU_tagset = "http://ilk.uvt.nl/folia/sets/frog-mwu-nl";
+  }
+  else {
+    MWU_tagset = val;
+  }
+  string charFile = configuration.lookUp( "char_filter_file", "tagger" );
+  if ( charFile.empty() )
+    charFile = configuration.lookUp( "char_filter_file" );
+  if ( !charFile.empty() ){
+    charFile = prefix( configuration.configDir(), charFile );
+    filter = new Tokenizer::UnicodeFilter();
+    filter->fill( charFile );
   }
-  else
-    cgn_tagset = val;
-
   val = configuration.lookUp( "maxDepSpan", "parser" );
   if ( !val.empty() ){
     size_t gs = TiCC::stringTo<size_t>( val );
@@ -204,88 +136,83 @@ bool Parser::init( const Configuration& configuration ){
       maxDepSpan = gs;
     }
     else {
-      *Log(parseLog) << "invalid maxDepSPan value in config file" << endl;
-      *Log(parseLog) << "keeping default " << maxDepSpan << endl;
+      LOG << "invalid maxDepSpan value in config file" << endl;
+      LOG << "keeping default " << maxDepSpan << endl;
       problem = true;
     }
   }
-  val = configuration.lookUp( "keepIntermediateFiles", "parser" );
-  if ( val == "true" ){
-    keepIntermediate = true;
-  }
-  else if ( !val.empty() )
-    *Log(parseLog) << "invalid 'keepIntermediateFiles' option: " << val << endl;
   val = configuration.lookUp( "pairsFile", "parser" );
-  if ( !val.empty() )
+  if ( !val.empty() ){
     pairsFileName = prefix( cDir, val );
+  }
   else {
-    *Log(parseLog) << "missing pairsFile option" << endl;
+    LOG << "missing pairsFile option" << endl;
     problem = true;
   }
   val = configuration.lookUp( "pairsOptions", "parser" );
-  if ( !val.empty() )
+  if ( !val.empty() ){
     pairsOptions = val;
-  else {
-    *Log(parseLog) << "missing pairsOptions option" << endl;
-    problem = true;
   }
   val = configuration.lookUp( "dirFile", "parser" );
-  if ( !val.empty() )
+  if ( !val.empty() ){
     dirFileName = prefix( cDir, val );
+  }
   else {
-    *Log(parseLog) << "missing dirFile option" << endl;
+    LOG << "missing dirFile option" << endl;
     problem = true;
   }
   val = configuration.lookUp( "dirOptions", "parser" );
   if ( !val.empty() ){
     dirOptions = val;
   }
-  else {
-    *Log(parseLog) << "missing dirOptions option" << endl;
-    problem = true;
-  }
   val = configuration.lookUp( "relsFile", "parser" );
-  if ( !val.empty() )
+  if ( !val.empty() ){
     relsFileName = prefix( cDir, val );
+  }
   else {
-    *Log(parseLog) << "missing relsFile option" << endl;
+    LOG << "missing relsFile option" << endl;
     problem = true;
   }
   val = configuration.lookUp( "relsOptions", "parser" );
   if ( !val.empty() ){
     relsOptions = val;
   }
-  else {
-    *Log(parseLog) << "missing relsOptions option" << endl;
-    problem = true;
-  }
-  if ( problem )
+  if ( problem ) {
     return false;
+  }
 
   bool happy = true;
   pairs = new Timbl::TimblAPI( pairsOptions );
   if ( pairs->Valid() ){
-    *Log(parseLog) << "reading " <<  pairsFileName << endl;
+    LOG << "reading " <<  pairsFileName << endl;
     happy = pairs->GetInstanceBase( pairsFileName );
   }
-  else
-    *Log(parseLog) << "creating Timbl for pairs failed:" << pairsOptions << endl;
+  else {
+    LOG << "creating Timbl for pairs failed:"
+		   << pairsOptions << endl;
+    happy = false;
+  }
   if ( happy ){
     dir = new Timbl::TimblAPI( dirOptions );
     if ( dir->Valid() ){
-      *Log(parseLog) << "reading " <<  dirFileName << endl;
+      LOG << "reading " <<  dirFileName << endl;
       happy = dir->GetInstanceBase( dirFileName );
     }
-    else
-      *Log(parseLog) << "creating Timbl for dir failed:" << dirOptions << endl;
+    else {
+      LOG << "creating Timbl for dir failed:" << dirOptions << endl;
+      happy = false;
+    }
     if ( happy ){
       rels = new Timbl::TimblAPI( relsOptions );
       if ( rels->Valid() ){
-	*Log(parseLog) << "reading " <<  relsFileName << endl;
+	LOG << "reading " <<  relsFileName << endl;
 	happy = rels->GetInstanceBase( relsFileName );
       }
-      else
-	*Log(parseLog) << "creating Timbl for rels failed:" << relsOptions << endl;
+      else {
+	LOG << "creating Timbl for rels failed:"
+		       << relsOptions << endl;
+	happy = false;
+      }
     }
   }
   isInit = happy;
@@ -296,14 +223,15 @@ Parser::~Parser(){
   delete rels;
   delete dir;
   delete pairs;
-  delete PI;
+  delete parseLog;
+  delete filter;
 }
 
 static vector<Word *> lookup( Word *word,
 			      const vector<Entity*>& entities ){
   vector<Word*> vec;
-  for ( size_t p=0; p < entities.size(); ++p ){
-    vec = entities[p]->select<Word>();
+  for ( const auto& ent : entities ){
+    vec = ent->select<Word>();
     if ( !vec.empty() ){
       if ( vec[0]->id() == word->id() ) {
 	// cerr << "found " << vec << endl;
@@ -315,489 +243,604 @@ static vector<Word *> lookup( Word *word,
   return vec;
 }
 
-void Parser::createPairs( const parseData& pd ){
+vector<string> Parser::createPairInstances( const parseData& pd ){
+  vector<string> instances;
   const vector<string>& words = pd.words;
   const vector<string>& heads = pd.heads;
   const vector<string>& mods = pd.mods;
-  string pFile = fileName + ".pairs.inst";
-  remove( pFile.c_str() );
-  ofstream ps( pFile.c_str() );
-  if ( ps ){
-    if ( words.size() == 1 ){
-      ps << "__ " << words[0] << " __"
-	 << " ROOT ROOT ROOT __ " << heads[0]
-	 << " __ ROOT ROOT ROOT "
-	 << words[0] << "^ROOT ROOT ROOT ROOT^"
-	 << heads[0]
-	 << " _" << endl;
+  if ( words.size() == 1 ){
+    string inst =
+      "__ " + words[0] + " __ ROOT ROOT ROOT __ " + heads[0]
+      + " __ ROOT ROOT ROOT "+ words[0] +"^ROOT ROOT ROOT ROOT^"
+      + heads[0] + " _";
+    instances.push_back( inst );
+  }
+  else {
+    for ( size_t i=0 ; i < words.size(); ++i ){
+      string word_1, word0, word1;
+      string tag_1, tag0, tag1;
+      string mods0;
+      if ( i == 0 ){
+	word_1 = "__";
+	tag_1 = "__";
+      }
+      else {
+	word_1 = words[i-1];
+	tag_1 = heads[i-1];
+      }
+      word0 = words[i];
+      tag0 = heads[i];
+      mods0 = mods[i];
+      if ( i == words.size() - 1 ){
+	word1 = "__";
+	tag1 = "__";
+      }
+      else {
+	word1 = words[i+1];
+	tag1 = heads[i+1];
+      }
+      string inst = word_1 + " " + word0 + " " + word1
+	+ " ROOT ROOT ROOT " + tag_1 + " "
+	+ tag0 + " " + tag1 + " ROOT ROOT ROOT " + tag0
+	+ "^ROOT ROOT ROOT ROOT^" + mods0 + " _";
+      instances.push_back( inst );
     }
-    else {
-      for ( size_t i=0 ; i < words.size(); ++i ){
-	string word_1, word0, word1;
-	string tag_1, tag0, tag1;
-	string mods0;
-	if ( i == 0 ){
-	  word_1 = "__";
-	  tag_1 = "__";
+    //
+    for ( size_t wPos=0; wPos < words.size(); ++wPos ){
+      string w_word_1, w_word0, w_word1;
+      string w_tag_1, w_tag0, w_tag1;
+      string w_mods0;
+      if ( wPos == 0 ){
+	w_word_1 = "__";
+	w_tag_1 = "__";
+      }
+      else {
+	w_word_1 = words[wPos-1];
+	w_tag_1 = heads[wPos-1];
+      }
+      w_word0 = words[wPos];
+      w_tag0 = heads[wPos];
+      w_mods0 = mods[wPos];
+      if ( wPos == words.size()-1 ){
+	w_word1 = "__";
+	w_tag1 = "__";
+      }
+      else {
+	w_word1 = words[wPos+1];
+	w_tag1 = heads[wPos+1];
+      }
+      for ( size_t pos=0; pos < words.size(); ++pos ){
+	if ( pos > wPos + maxDepSpan ){
+	  break;
+	}
+	if ( pos == wPos ){
+	  continue;
+	}
+	if ( pos + maxDepSpan < wPos ){
+	  continue;
+	}
+	string inst = w_word_1 + " " + w_word0 + " " + w_word1;
+
+	if ( pos == 0 ){
+	  inst += " __";
 	}
 	else {
-	  word_1 = words[i-1];
-	  tag_1 = heads[i-1];
+	  inst += " " + words[pos-1];
 	}
-	word0 = words[i];
-	tag0 = heads[i];
-	mods0 = mods[i];
-	if ( i == words.size() - 1 ){
-	  word1 = "__";
-	  tag1 = "__";
+	if ( pos < words.size() ){
+	  inst += " " + words[pos];
 	}
 	else {
-	  word1 = words[i+1];
-	  tag1 = heads[i+1];
+	  inst += " __";
 	}
-	ps << word_1 << " " << word0 << " " << word1
-	   << " ROOT ROOT ROOT "
-	   << tag_1 << " " << tag0 << " " << tag1
-	   << " ROOT ROOT ROOT "
-	   << tag0 << "^ROOT ROOT ROOT ROOT^" << mods0
-	   << " _" << endl;
-      }
-      //
-      for ( size_t wPos=0; wPos < words.size(); ++wPos ){
-	string w_word_1, w_word0, w_word1;
-	string w_tag_1, w_tag0, w_tag1;
-	string w_mods0;
-	if ( wPos == 0 ){
-	  w_word_1 = "__";
-	  w_tag_1 = "__";
+	if ( pos < words.size()-1 ){
+	  inst += " " + words[pos+1];
+	}
+	else {
+	  inst += " __";
+	}
+	inst += " " + w_tag_1 + " " + w_tag0 + " " + w_tag1;
+	if ( pos == 0 ){
+	  inst += " __";
+	}
+	else {
+	  inst += " " + heads[pos-1];
+	}
+	if ( pos < words.size() ){
+	  inst += " " + heads[pos];
+	}
+	else {
+	  inst += " __";
+	}
+	if ( pos < words.size()-1 ){
+	  inst += " " + heads[pos+1];
 	}
 	else {
-	  w_word_1 = words[wPos-1];
-	  w_tag_1 = heads[wPos-1];
+	  inst += " __";
 	}
-	w_word0 = words[wPos];
-	w_tag0 = heads[wPos];
-	w_mods0 = mods[wPos];
-	if ( wPos == words.size()-1 ){
-	  w_word1 = "__";
-	  w_tag1 = "__";
+
+	inst += " " + w_tag0 + "^";
+	if ( pos < words.size() ){
+	  inst += heads[pos];
 	}
 	else {
-	  w_word1 = words[wPos+1];
-	  w_tag1 = heads[wPos+1];
+	  inst += "__";
+	}
+
+	if ( wPos > pos ){
+	  inst += " LEFT " + TiCC::toString( wPos - pos );
 	}
-	for ( size_t pos=0; pos < words.size(); ++pos ){
-	  //	  os << wPos << "-" << pos << " ";
-	  if ( pos > wPos + maxDepSpan )
-	    break;
-	  if ( wPos == pos )
-	    continue;
-	  if ( wPos > maxDepSpan + pos )
-	    continue;
-
-	  ps << w_word_1;
-	  ps << " " << w_word0;
-	  ps << " " << w_word1;
-
-	  if ( pos == 0 )
-	    ps << " __";
-	  else
-	    ps << " " << words[pos-1];
-	  if ( pos < words.size() )
-	    ps << " " << words[pos];
-	  else
-	    ps << " __";
-	  if ( pos < words.size()-1 )
-	    ps << " " << words[pos+1];
-	  else
-	    ps << " __";
-	  ps << " " << w_tag_1;
-	  ps << " " << w_tag0;
-	  ps << " " << w_tag1;
-	  if ( pos == 0 )
-	    ps << " __";
-	  else
-	    ps << " " << heads[pos-1];
-	  if ( pos < words.size() )
-	    ps << " " << heads[pos];
-	  else
-	    ps << " __";
-	  if ( pos < words.size()-1 )
-	    ps << " " << heads[pos+1];
-	  else
-	    ps << " __";
-
-	  ps << " " << w_tag0 << "^";
-	  if ( pos < words.size() )
-	    ps << heads[pos];
-	  else
-	    ps << "__";
-
-	  if ( wPos > pos )
-	    ps << " LEFT " << wPos - pos;
-	  else
-	    ps << " RIGHT " << pos - wPos;
-	  if ( pos >= words.size() )
-	    ps << " __";
-	  else
-	    ps << " " << mods[pos];
-	  ps << "^" << w_mods0;
-	  ps << " __" << endl;
+	else {
+	  inst += " RIGHT "+ TiCC::toString( pos - wPos );
+	}
+	if ( pos >= words.size() ){
+	  inst += " __";
+	}
+	else {
+	  inst += " " + mods[pos];
 	}
+	inst += "^" + w_mods0 + " __";
+	instances.push_back( inst );
       }
     }
   }
+  return instances;
 }
 
-void Parser::createRelDir( const parseData& pd ){
+vector<string> Parser::createDirInstances( const parseData& pd ){
+  vector<string> d_instances;
   const vector<string>& words = pd.words;
   const vector<string>& heads = pd.heads;
   const vector<string>& mods = pd.mods;
 
-  string word_2, word_1, word0, word1, word2;
-  string tag_2, tag_1, tag0, tag1, tag2;
-  string mod_2, mod_1, mod0, mod1, mod2;
-  string dFile = fileName + ".dir.inst";
-  remove( dFile.c_str() );
-  ofstream ds( dFile.c_str() );
-  string rFile = fileName + ".rels.inst";
-  remove( rFile.c_str() );
-  ofstream rs( rFile.c_str() );
-  if ( ds && rs ){
-    if ( words.size() == 1 ){
-      word0 = words[0];
-      tag0 = heads[0];
-      mod0 = mods[0];
-      ds << "__ __";
-      ds << " " << word0;
-      ds << " __ __ __ __";
-      ds << " " << tag0;
-      ds << " __ __ __ __";
-      ds << " " << word0 << "^" << tag0;
-      ds << " __ __ __^" << tag0;
-      ds << " " << tag0 << "^__";
-      ds << " __";
-      ds << " " << mod0;
-      ds << " __ ROOT" << endl;
-      //
-      rs << "__ __";
-      rs << " " << word0;
-      rs << " __ __";
-      rs << " " << mod0;
-      rs << " __ __";
-      rs << " " << tag0;
-      rs << " __ __";
-      rs << " __^" << tag0;
-      rs << " " << tag0 << "^__";
-      rs << " __^__^" << tag0;
-      rs << " " << tag0 << "^__^__";
-      rs << " __" << endl;
-    }
-    else if ( words.size() == 2 ){
-      word0 = words[0];
-      tag0 = heads[0];
-      mod0 = mods[0];
-      word1 = words[1];
-      tag1 = heads[1];
-      mod1 = mods[1];
-      ds << "__ __";
-      ds << " " << word0;
-      ds << " " << word1;
-      ds << " __ __ __";
-      ds << " " << tag0;
-      ds << " " << tag1;
-      ds << " __ __ __";
-      ds << " " << word0 << "^" << tag0;
-      ds << " " << word1 << "^" << tag1;
-      ds << " __ __^" << tag0;
-      ds << " " << tag0 << "^" << tag1;
-      ds << " __";
-      ds << " " << mod0;
-      ds << " " << mod1;
-      ds << " ROOT" << endl;
-      ds << "__";
-      ds << " " << word0;
-      ds << " " << word1;
-      ds << " __ __ __";
-      ds << " " << tag0;
-      ds << " " << tag1;
-      ds << " __ __ __";
-      ds << " " << word0 << "^" << tag0;
-      ds << " " << word1 << "^" << tag1;
-      ds << " __ __";
-      ds << " " << tag0 << "^" << tag1;
-      ds << " " << tag1 << "^__";
-      ds << " " << mod0;
-      ds << " " << mod1;
-      ds << " __";
-      ds << " ROOT" << endl;
-      //
-      rs << "__ __";
-      rs << " " << word0;
-      rs << " " << word1;
-      rs << " __";
-      rs << " " << mod0;
-      rs << " __ __";
-      rs << " " << tag0;
-      rs << " " << tag1;
-      rs << " __";
-      rs << " __^" << tag0;
-      rs << " " << tag0 << "^" << tag1;
-      rs << " __^__^" << tag0;
-      rs << " " << tag0 << "^" << tag1 << "^__";
-      rs << " __" << endl;
-      rs << "__";
-      rs << " " << word0;
-      rs << " " << word1;
-      rs << " __ __";
-      rs << " " << mod1;
-      rs << " __";
-      rs << " " << tag0;
-      rs << " " << tag1;
-      rs << " __ __";
-      rs << " " << tag0 << "^" << tag1;
-      rs << " " << tag1 << "^__";
-      rs << " __^" << tag0 << "^" << tag1;
-      rs << " " << tag1 << "^__^__";
-      rs << " __" << endl;
-    }
-    else if ( words.size() == 3 ) {
-      word0 = words[0];
-      tag0 = heads[0];
-      mod0 = mods[0];
-      word1 = words[1];
-      tag1 = heads[1];
-      mod1 = mods[1];
-      word2 = words[2];
-      tag2 = heads[2];
-      mod2 = mods[2];
-      ds << "__ __";
-      ds << " " << word0;
-      ds << " " << word1;
-      ds << " " << word2;
-      ds << " __ __";
-      ds << " " << tag0;
-      ds << " " << tag1;
-      ds << " " << tag2;
-      ds << " __ __";
-      ds << " " << word0 << "^" << tag0;
-      ds << " " << word1 << "^" << tag1;
-      ds << " " << word2 << "^" << tag2;
-      ds << " __^" << tag0;
-      ds << " " << tag0 << "^" << tag1;
-      ds << " __";
-      ds << " " << mod0;
-      ds << " " << mod1;
-      ds << " ROOT" << endl;
-      ds << "__";
-      ds << " " << word0;
-      ds << " " << word1;
-      ds << " " << word2;
-      ds << " __ __";
-      ds << " " << tag0;
-      ds << " " << tag1;
-      ds << " " << tag2;
-      ds << " __ __";
-      ds << " " << word0 << "^" << tag0;
-      ds << " " << word1 << "^" << tag1;
-      ds << " " << word2 << "^" << tag2;
-      ds << " __";
-      ds << " " << tag0 << "^" << tag1;
-      ds << " " << tag1 << "^" << tag2;
-      ds << " " << mod0;
-      ds << " " << mod1;
-      ds << " " << mod2;
-      ds << " ROOT" << endl;
-      ds << word0;
-      ds << " " << word1;
-      ds << " " << word2;
-      ds << " __ __";
-      ds << " " << tag0;
-      ds << " " << tag1;
-      ds << " " << tag2;
-      ds << " __ __";
-      ds << " " << word0 << "^" << tag0;
-      ds << " " << word1 << "^" << tag1;
-      ds << " " << word2 << "^" << tag2;
-      ds << " __ __";
-      ds << " " << tag1 << "^" << tag2;
-      ds << " " << tag2 << "^__";
-      ds << " " << mod1;
-      ds << " " << mod2;
-      ds << " __";
-      ds << " ROOT" << endl;
-      //
-      rs << "__ __";
-      rs << " " << word0;
-      rs << " " << word1;
-      rs << " " << word2;
-      rs << " " << mod0;
-      rs << " __ __";
-      rs << " " << tag0;
-      rs << " " << tag1;
-      rs << " " << tag2;
-      rs << " __^" << tag0;
-      rs << " " << tag0 << "^" << tag1;
-      rs << " __^__^" << tag0;
-      rs << " " << tag0 << "^" << tag1 << "^" << tag2;
-      rs << " __" << endl;
-      rs << "__";
-      rs << " " << word0;
-      rs << " " << word1;
-      rs << " " << word2;
-      rs << " __";
-      rs << " " << mod1;
-      rs << " __";
-      rs << " " << tag0;
-      rs << " " << tag1;
-      rs << " " << tag2;
-      rs << " __";
-      rs << " " << tag0 << "^" << tag1;
-      rs << " " << tag1 << "^" << tag2;
-      rs << " __^" << tag0 << "^" << tag1;
-      rs << " " << tag1 << "^" << tag2 << "^__";
-      rs << " __" << endl;
-      rs << word0;
-      rs << " " << word1;
-      rs << " " << word2;
-      rs << " __ __";
-      rs << " " << mod2;
-      rs << " " << tag0;
-      rs << " " << tag1;
-      rs << " " << tag2;
-      rs << " __ __";
-      rs << " " << tag1 << "^" << tag2;
-      rs << " " << tag2 << "^__";
-      rs << " " << tag0 << "^" << tag1 << "^" << tag2;
-      rs << " " << tag2 << "^__^__";
-      rs << " __" << endl;
+  if ( words.size() == 1 ){
+    string word0 = words[0];
+    string tag0 = heads[0];
+    string mod0 = mods[0];
+    string inst = "__ __ " + word0 + " __ __ __ __ " + tag0
+      + " __ __ __ __ " + word0 + "^" + tag0
+      + " __ __ __^" + tag0 + " " + tag0 +"^__ __ " + mod0
+      + " __ ROOT";
+    d_instances.push_back( inst );
+  }
+  else if ( words.size() == 2 ){
+    string word0 = words[0];
+    string tag0 = heads[0];
+    string mod0 = mods[0];
+    string word1 = words[1];
+    string tag1 = heads[1];
+    string mod1 = mods[1];
+    string inst = string("__ __")
+      + " " + word0
+      + " " + word1
+      + " __ __ __"
+      + " " + tag0
+      + " " + tag1
+      + " __ __ __"
+      + " " + word0 + "^" + tag0
+      + " " + word1 + "^" + tag1
+      + " __ __^" + tag0
+      + " " + tag0 + "^" + tag1
+      + " __"
+      + " " + mod0
+      + " " + mod1
+      + " ROOT";
+    d_instances.push_back( inst );
+    inst = string("__")
+      + " " + word0
+      + " " + word1
+      + " __ __ __"
+      + " " + tag0
+      + " " + tag1
+      + " __ __ __"
+      + " " + word0 + "^" + tag0
+      + " " + word1 + "^" + tag1
+      + " __ __"
+      + " " + tag0 + "^" + tag1
+      + " " + tag1 + "^__"
+      + " " + mod0
+      + " " + mod1
+      + " __"
+      + " ROOT";
+    d_instances.push_back( inst );
+  }
+  else if ( words.size() == 3 ) {
+    string word0 = words[0];
+    string tag0 = heads[0];
+    string mod0 = mods[0];
+    string word1 = words[1];
+    string tag1 = heads[1];
+    string mod1 = mods[1];
+    string word2 = words[2];
+    string tag2 = heads[2];
+    string mod2 = mods[2];
+    string inst = string("__ __")
+      + " " + word0
+      + " " + word1
+      + " " + word2
+      + " __ __"
+      + " " + tag0
+      + " " + tag1
+      + " " + tag2
+      + " __ __"
+      + " " + word0 + "^" + tag0
+      + " " + word1 + "^" + tag1
+      + " " + word2 + "^" + tag2
+      + " __^" + tag0
+      + " " + tag0 + "^" + tag1
+      + " __"
+      + " " + mod0
+      + " " + mod1
+      + " ROOT";
+    d_instances.push_back( inst );
+    inst = string("__")
+      + " " + word0
+      + " " + word1
+      + " " + word2
+      + " __ __"
+      + " " + tag0
+      + " " + tag1
+      + " " + tag2
+      + " __ __"
+      + " " + word0 + "^" + tag0
+      + " " + word1 + "^" + tag1
+      + " " + word2 + "^" + tag2
+      + " __"
+      + " " + tag0 + "^" + tag1
+      + " " + tag1 + "^" + tag2
+      + " " + mod0
+      + " " + mod1
+      + " " + mod2
+      + " ROOT";
+    d_instances.push_back( inst );
+    inst = word0
+      + " " + word1
+      + " " + word2
+      + " __ __"
+      + " " + tag0
+      + " " + tag1
+      + " " + tag2
+      + " __ __"
+      + " " + word0 + "^" + tag0
+      + " " + word1 + "^" + tag1
+      + " " + word2 + "^" + tag2
+      + " __ __"
+      + " " + tag1 + "^" + tag2
+      + " " + tag2 + "^__"
+      + " " + mod1
+      + " " + mod2
+      + " __"
+      + " ROOT";
+    d_instances.push_back( inst );
+  }
+  else {
+    for ( size_t i=0 ; i < words.size(); ++i ){
+      string word_0, word_1, word_2;
+      string tag_0, tag_1, tag_2;
+      string mod_0, mod_1, mod_2;
+      if ( i == 0 ){
+	word_2 = "__";
+	tag_2 = "__";
+	mod_2 = "__";
+	word_1 = "__";
+	tag_1 = "__";
+	mod_1 = "__";
+      }
+      else if ( i == 1 ){
+	word_2 = "__";
+	tag_2 = "__";
+	mod_2 = "__";
+	word_1 = words[i-1];
+	tag_1 = heads[i-1];
+	mod_1 = mods[i-1];
+      }
+      else {
+	word_2 = words[i-2];
+	tag_2 = heads[i-2];
+	mod_2 = mods[i-2];
+	word_1 = words[i-1];
+	tag_1 = heads[i-1];
+	mod_1 = mods[i-1];
+      }
+      string word0 = words[i];
+      string word1, word2;
+      string tag0 = heads[i];
+      string tag1, tag2;
+      string mod0 = mods[i];
+      string mod1, mod2;
+      if ( i < words.size() - 2 ){
+	word1 = words[i+1];
+	tag1 = heads[i+1];
+	mod1 = mods[i+1];
+	word2 = words[i+2];
+	tag2 = heads[i+2];
+	mod2 = mods[i+2];
+      }
+      else if ( i == words.size() - 2 ){
+	word1 = words[i+1];
+	tag1 = heads[i+1];
+	mod1 = mods[i+1];
+	word2 = "__";
+	tag2 = "__";
+	mod2 = "__";
+      }
+      else {
+	word1 = "__";
+	tag1 = "__";
+	mod1 = "__";
+	word2 = "__";
+	tag2 = "__";
+	mod2 = "__";
+      }
+      string inst = word_2
+	+ " " + word_1
+	+ " " + word0
+	+ " " + word1
+	+ " " + word2
+	+ " " + tag_2
+	+ " " + tag_1
+	+ " " + tag0
+	+ " " + tag1
+	+ " " + tag2
+	+ " " + word_2 + "^" + tag_2
+	+ " " + word_1 + "^" + tag_1
+	+ " " + word0 + "^" + tag0
+	+ " " + word1 + "^" + tag1
+	+ " " + word2 + "^" + tag2
+	+ " " + tag_1 + "^" + tag0
+	+ " " + tag0 + "^" + tag1
+	+ " " + mod_1
+	+ " " + mod0
+	+ " " + mod1
+	+ " ROOT";
+      d_instances.push_back( inst );
     }
-    else {
-      for ( size_t i=0 ; i < words.size(); ++i ){
-	if ( i == 0 ){
-	  word_2 = "__";
-	  tag_2 = "__";
-	  mod_2 = "__";
-	  word_1 = "__";
-	  tag_1 = "__";
-	  mod_1 = "__";
-	}
-	else if ( i == 1 ){
-	  word_2 = "__";
-	  tag_2 = "__";
-	  mod_2 = "__";
-	  word_1 = words[i-1];
-	  tag_1 = heads[i-1];
-	  mod_1 = mods[i-1];
-	}
-	else {
-	  word_2 = words[i-2];
-	  tag_2 = heads[i-2];
-	  mod_2 = mods[i-2];
-	  word_1 = words[i-1];
-	  tag_1 = heads[i-1];
-	  mod_1 = mods[i-1];
-	}
-	word0 = words[i];
-	tag0 = heads[i];
-	mod0 = mods[i];
-	if ( i < words.size() - 2 ){
-	  word1 = words[i+1];
-	  tag1 = heads[i+1];
-	  mod1 = mods[i+1];
-	  word2 = words[i+2];
-	  tag2 = heads[i+2];
-	  mod2 = mods[i+2];
-	}
-	else if ( i == words.size() - 2 ){
-	  word1 = words[i+1];
-	  tag1 = heads[i+1];
-	  mod1 = mods[i+1];
-	  word2 = "__";
-	  tag2 = "__";
-	  mod2 = "__";
-	}
-	else {
-	  word1 = "__";
-	  tag1 = "__";
-	  mod1 = "__";
-	  word2 = "__";
-	  tag2 = "__";
-	  mod2 = "__";
-	}
-	ds << word_2;
-	ds << " " << word_1;
-	ds << " " << word0;
-	ds << " " << word1;
-	ds << " " << word2;
-	ds << " " << tag_2;
-	ds << " " << tag_1;
-	ds << " " << tag0;
-	ds << " " << tag1;
-	ds << " " << tag2;
-	ds << " " << word_2 << "^" << tag_2;
-	ds << " " << word_1 << "^" << tag_1;
-	ds << " " << word0 << "^" << tag0;
-	ds << " " << word1 << "^" << tag1;
-	ds << " " << word2 << "^" << tag2;
-	ds << " " << tag_1 << "^" << tag0;
-	ds << " " << tag0 << "^" << tag1;
-	ds << " " << mod_1;
-	ds << " " << mod0;
-	ds << " " << mod1;
-	ds << " ROOT" << endl;
-	//
-	rs << word_2;
-	rs << " " << word_1;
-	rs << " " << word0;
-	rs << " " << word1;
-	rs << " " << word2;
-	rs << " " << mod0;
-	rs << " " << tag_2;
-	rs << " " << tag_1;
-	rs << " " << tag0;
-	rs << " " << tag1;
-	rs << " " << tag2;
-	rs << " " << tag_1 << "^" << tag0;
-	rs << " " << tag0 << "^" << tag1;
-	rs << " " << tag_2 << "^" << tag_1 << "^" << tag0;
-	rs << " " << tag0 << "^" << tag1 << "^" << tag2;
-	rs << " __" << endl;
+  }
+  return d_instances;
+}
+
+vector<string> Parser::createRelInstances( const parseData& pd ){
+  vector<string> r_instances;
+  const vector<string>& words = pd.words;
+  const vector<string>& heads = pd.heads;
+  const vector<string>& mods = pd.mods;
+
+  if ( words.size() == 1 ){
+    string word0 = words[0];
+    string tag0 = heads[0];
+    string mod0 = mods[0];
+    string inst = "__ __ " + word0 + " __ __ " + mod0
+      + " __ __ "  + tag0 + " __ __ __^" + tag0
+      + " " + tag0 + "^__ __^__^" + tag0
+      + " " + tag0 + "^__^__ __";
+    r_instances.push_back( inst );
+  }
+  else if ( words.size() == 2 ){
+    string word0 = words[0];
+    string tag0 = heads[0];
+    string mod0 = mods[0];
+    string word1 = words[1];
+    string tag1 = heads[1];
+    string mod1 = mods[1];
+    //
+    string inst = string("__ __")
+      + " " + word0
+      + " " + word1
+      + " __"
+      + " " + mod0
+      + " __ __"
+      + " " + tag0
+      + " " + tag1
+      + " __"
+      + " __^" + tag0
+      + " " + tag0 + "^" + tag1
+      + " __^__^" + tag0
+      + " " + tag0 + "^" + tag1 + "^__"
+      + " __";
+    r_instances.push_back( inst );
+    inst = string("__")
+      + " " + word0
+      + " " + word1
+      + " __ __"
+      + " " + mod1
+      + " __"
+      + " " + tag0
+      + " " + tag1
+      + " __ __"
+      + " " + tag0 + "^" + tag1
+      + " " + tag1 + "^__"
+      + " __^" + tag0 + "^" + tag1
+      + " " + tag1 + "^__^__"
+      + " __";
+    r_instances.push_back( inst );
+  }
+  else if ( words.size() == 3 ) {
+    string word0 = words[0];
+    string tag0 = heads[0];
+    string mod0 = mods[0];
+    string word1 = words[1];
+    string tag1 = heads[1];
+    string mod1 = mods[1];
+    string word2 = words[2];
+    string tag2 = heads[2];
+    string mod2 = mods[2];
+    //
+    string inst = string("__ __")
+      + " " + word0
+      + " " + word1
+      + " " + word2
+      + " " + mod0
+      + " __ __"
+      + " " + tag0
+      + " " + tag1
+      + " " + tag2
+      + " __^" + tag0
+      + " " + tag0 + "^" + tag1
+      + " __^__^" + tag0
+      + " " + tag0 + "^" + tag1 + "^" + tag2
+      + " __";
+    r_instances.push_back( inst );
+    inst = string("__")
+      + " " + word0
+      + " " + word1
+      + " " + word2
+      + " __"
+      + " " + mod1
+      + " __"
+      + " " + tag0
+      + " " + tag1
+      + " " + tag2
+      + " __"
+      + " " + tag0 + "^" + tag1
+      + " " + tag1 + "^" + tag2
+      + " __^" + tag0 + "^" + tag1
+      + " " + tag1 + "^" + tag2 + "^__"
+      + " __";
+    r_instances.push_back( inst );
+    inst = word0
+      + " " + word1
+      + " " + word2
+      + " __ __"
+      + " " + mod2
+      + " " + tag0
+      + " " + tag1
+      + " " + tag2
+      + " __ __"
+      + " " + tag1 + "^" + tag2
+      + " " + tag2 + "^__"
+      + " " + tag0 + "^" + tag1 + "^" + tag2
+      + " " + tag2 + "^__^__"
+      + " __";
+    r_instances.push_back( inst );
+  }
+  else {
+    for ( size_t i=0 ; i < words.size(); ++i ){
+      string word_0, word_1, word_2;
+      string tag_0, tag_1, tag_2;
+      string mod_0, mod_1, mod_2;
+      if ( i == 0 ){
+	word_2 = "__";
+	tag_2 = "__";
+	mod_2 = "__";
+	word_1 = "__";
+	tag_1 = "__";
+	mod_1 = "__";
+      }
+      else if ( i == 1 ){
+	word_2 = "__";
+	tag_2 = "__";
+	mod_2 = "__";
+	word_1 = words[i-1];
+	tag_1 = heads[i-1];
+	mod_1 = mods[i-1];
+      }
+      else {
+	word_2 = words[i-2];
+	tag_2 = heads[i-2];
+	mod_2 = mods[i-2];
+	word_1 = words[i-1];
+	tag_1 = heads[i-1];
+	mod_1 = mods[i-1];
+      }
+      string word0 = words[i];
+      string word1, word2;
+      string tag0 = heads[i];
+      string tag1, tag2;
+      string mod0 = mods[i];
+      string mod1, mod2;
+      if ( i < words.size() - 2 ){
+	word1 = words[i+1];
+	tag1 = heads[i+1];
+	mod1 = mods[i+1];
+	word2 = words[i+2];
+	tag2 = heads[i+2];
+	mod2 = mods[i+2];
       }
+      else if ( i == words.size() - 2 ){
+	word1 = words[i+1];
+	tag1 = heads[i+1];
+	mod1 = mods[i+1];
+	word2 = "__";
+	tag2 = "__";
+	mod2 = "__";
+      }
+      else {
+	word1 = "__";
+	tag1 = "__";
+	mod1 = "__";
+	word2 = "__";
+	tag2 = "__";
+	mod2 = "__";
+      }
+      //
+      string inst = word_2
+	+ " " + word_1
+	+ " " + word0
+	+ " " + word1
+	+ " " + word2
+	+ " " + mod0
+	+ " " + tag_2
+	+ " " + tag_1
+	+ " " + tag0
+	+ " " + tag1
+	+ " " + tag2
+	+ " " + tag_1 + "^" + tag0
+	+ " " + tag0 + "^" + tag1
+	+ " " + tag_2 + "^" + tag_1 + "^" + tag0
+	+ " " + tag0 + "^" + tag1 + "^" + tag2
+	+ " __";
+      r_instances.push_back( inst );
     }
   }
+  return r_instances;
 }
 
+
 void Parser::addDeclaration( Document& doc ) const {
-  doc.declare( AnnotationType::DEPENDENCY, tagset,
-	       "annotator='frog-depparse-" + version
-	       + "', annotatortype='auto'");
+#pragma omp critical(foliaupdate)
+  {
+    doc.declare( AnnotationType::DEPENDENCY, dep_tagset,
+		 "annotator='frog-depparse-" + version
+		 + "', annotatortype='auto'");
+  }
 }
 
-void Parser::prepareParse( const vector<Word *>& fwords,
-			   const string& setname,
-			   parseData& pd ) {
-  pd.clear();
-  Sentence *sent = fwords[0]->sentence();
-  vector<Entity*> entities = sent->select<Entity>(setname);
-  for( size_t i=0; i < fwords.size(); ++i ){
+parseData Parser::prepareParse( const vector<Word *>& fwords ){
+  parseData pd;
+  Sentence *sent = 0;
+  vector<Entity*> entities;
+#pragma omp critical(foliaupdate)
+  {
+    sent = fwords[0]->sentence();
+    entities = sent->select<Entity>(MWU_tagset);
+  }
+  for ( size_t i=0; i < fwords.size(); ++i ){
     Word *word = fwords[i];
-    vector<Word*> mwu = lookup( word, entities );
-    if ( !mwu.empty() ){
+    vector<Word*> mwuv = lookup( word, entities );
+    if ( !mwuv.empty() ){
       string multi_word;
       string head;
       string mod;
-      for ( size_t p=0; p < mwu.size(); ++p ){
-	multi_word += mwu[p]->str();
-	PosAnnotation *postag = mwu[p]->annotation<PosAnnotation>( cgn_tagset );
+      for ( const auto& mwu : mwuv ){
+	UnicodeString tmp;
+#pragma omp critical(foliaupdate)
+	{
+	  tmp = mwu->text();
+	}
+	if ( filter )
+	  tmp = filter->filter( tmp );
+	string ms = UnicodeToUTF8( tmp );
+	multi_word += ms;
+	PosAnnotation *postag = mwu->annotation<PosAnnotation>( POS_tagset );
 	head += postag->feat("head");
-	vector<folia::Feature*> feats = postag->select<folia::Feature>();
-	for ( size_t j=0; j < feats.size(); ++j ){
-	  mod += feats[j]->cls();
-	  if ( j < feats.size()-1 )
+	vector<Feature*> feats = postag->select<Feature>();
+	for ( const auto& feat : feats ){
+	  mod += feat->cls();
+	  if ( &feat != &feats.back() ){
 	    mod += "|";
+	  }
 	}
-	if ( p < mwu.size() -1 ){
+	if ( &mwu != &mwuv.back() ){
 	  multi_word += "_";
 	  head += "_";
 	  mod += "_";
@@ -806,23 +849,33 @@ void Parser::prepareParse( const vector<Word *>& fwords,
       pd.words.push_back( multi_word );
       pd.heads.push_back( head );
       pd.mods.push_back( mod );
-      pd.mwus.push_back( mwu );
-      i += mwu.size()-1;
+      pd.mwus.push_back( mwuv );
+      i += mwuv.size()-1;
     }
     else {
-      pd.words.push_back( word->str() );
-      PosAnnotation *postag = word->annotation<PosAnnotation>( cgn_tagset );
+      UnicodeString tmp;
+#pragma omp critical(foliaupdate)
+      {
+	tmp = word->text();
+      }
+      if ( filter )
+	tmp = filter->filter( tmp );
+      string ms = UnicodeToUTF8( tmp );
+      pd.words.push_back( ms );
+      PosAnnotation *postag = word->annotation<PosAnnotation>( POS_tagset );
       string head = postag->feat("head");
       pd.heads.push_back( head );
       string mod;
-      vector<folia::Feature*> feats = postag->select<folia::Feature>();
-      if ( feats.size() == 0 )
+      vector<Feature*> feats = postag->select<Feature>();
+      if ( feats.empty() ){
 	mod = "__";
+      }
       else {
-	for ( size_t j=0; j < feats.size(); ++j ){
-	  mod += feats[j]->cls();
-	  if ( j < feats.size()-1 )
+	for ( const auto& feat : feats ){
+	  mod += feat->cls();
+	  if ( &feat != &feats.back() ){
 	    mod += "|";
+	  }
 	}
       }
       pd.mods.push_back( mod );
@@ -831,46 +884,19 @@ void Parser::prepareParse( const vector<Word *>& fwords,
       pd.mwus.push_back( vec );
     }
   }
-
-  createParserFile( pd );
-
-#pragma omp parallel sections
-  {
-#pragma omp section
-    {
-      createPairs( pd );
-    }
-#pragma omp section
-    {
-      createRelDir( pd );
-    }
-  }
+  return pd;
 }
 
-void appendParseResult( const vector<Word *>& words,
-			parseData& pd,
-			istream& is ){
-  string line;
-  int cnt=0;
-  vector<int> nums;
-  vector<string> roles;
-  while ( getline( is, line ) ){
-    vector<string> parts;
-    int num = TiCC::split_at( line, parts, " " );
-    if ( num > 7 ){
-      if ( TiCC::stringTo<int>( parts[0] ) != cnt+1 ){
-	*Log(theErrLog) << "confused! " << endl;
-	*Log(theErrLog) << "got line '" << line << "'" << endl;
-      }
-      nums.push_back( TiCC::stringTo<int>(parts[6]) );
-      roles.push_back( parts[7] );
-    }
-    ++cnt;
-  }
+void appendResult( const vector<Word *>& words,
+		   parseData& pd,
+		   const string& tagset,
+		   const vector<int>& nums,
+		   const vector<string>& roles ){
   Sentence *sent = words[0]->sentence();
   KWargs args;
   args["generate_id"] = sent->id();
-  DependenciesLayer *dl = new DependenciesLayer(sent->doc(),args);
+  args["set"] = tagset;
+  DependenciesLayer *dl = new DependenciesLayer( args, sent->doc() );
 #pragma omp critical(foliaupdate)
   {
     sent->append( dl );
@@ -880,18 +906,19 @@ void appendParseResult( const vector<Word *>& words,
       KWargs args;
       args["generate_id"] = dl->id();
       args["class"] = roles[i];
+      args["set"] = tagset;
 #pragma omp critical(foliaupdate)
       {
-	Dependency *d = new Dependency( sent->doc(), args );
+	Dependency *d = new Dependency( args, sent->doc() );
 	dl->append( d );
-	Headwords *dh = new Headwords();
-	for ( size_t j=0; j < pd.mwus[nums[i]-1].size(); ++ j ){
-	  dh->append( pd.mwus[nums[i]-1][j] );
+	Headspan *dh = new Headspan();
+	for ( const auto& wrd : pd.mwus[nums[i]-1] ){
+	  dh->append( wrd );
 	}
 	d->append( dh );
 	DependencyDependent *dd = new DependencyDependent();
-	for ( size_t j=0; j < pd.mwus[i].size(); ++ j ){
-	  dd->append( pd.mwus[i][j] );
+	for ( const auto& it : pd.mwus[i] ){
+	  dd->append( it );
 	}
 	d->append( dd );
       }
@@ -899,88 +926,79 @@ void appendParseResult( const vector<Word *>& words,
   }
 }
 
+void appendParseResult( const vector<Word *>& words,
+			parseData& pd,
+			const string& tagset,
+			const vector<parsrel>& res ){
+  vector<int> nums;
+  vector<string> roles;
+  for ( const auto& it : res ){
+    nums.push_back( it.head );
+    roles.push_back( it.deprel );
+  }
+  appendResult( words, pd, tagset, nums, roles );
+}
+
+void timbl( Timbl::TimblAPI* tim,
+	    const vector<string>& instances,
+	    vector<timbl_result>& results ){
+  results.clear();
+  for ( const auto& inst : instances ){
+    const Timbl::ValueDistribution *db;
+    const Timbl::TargetValue *tv = tim->Classify( inst, db );
+    results.push_back( timbl_result( tv->Name(), db->Confidence(tv), db ) );
+  }
+}
 
-void Parser::Parse( const vector<Word*>& words, const string& mwuSet,
-		    const string& tmpDirName, TimerBlock& timers ){
-  pid_t pid = getpid();
-  string pids = toString( pid );
-  fileName = tmpDirName+"csi."+pids;
+void Parser::Parse( const vector<Word*>& words,
+		    TimerBlock& timers ){
   timers.parseTimer.start();
   if ( !isInit ){
-    *Log(parseLog) << "Parser is not initialized!" << endl;
+    LOG << "Parser is not initialized!" << endl;
     exit(1);
   }
   if ( words.empty() ){
-    *Log(parseLog) << "unable to parse an analisis without words" << endl;
+    LOG << "unable to parse an analisis without words" << endl;
     return;
   }
-  string resFileName = fileName + ".result";
-  string pairsInName = fileName +".pairs.inst";
-  string pairsOutName = fileName +".pairs.out";
-  string dirInName = fileName + ".dir.inst";
-  string dirOutName = fileName + ".dir.out";
-  string relsInName = fileName + ".rels.inst";
-  string relsOutName = fileName + ".rels.out";
-  remove( resFileName.c_str() );
   timers.prepareTimer.start();
-  parseData pd;
-  prepareParse( words, mwuSet, pd );
+  parseData pd = prepareParse( words );
   timers.prepareTimer.stop();
+  vector<timbl_result> p_results;
+  vector<timbl_result> d_results;
+  vector<timbl_result> r_results;
 #pragma omp parallel sections
   {
 #pragma omp section
-    {
-      remove( pairsOutName.c_str() );
-      timers.pairsTimer.start();
-      pairs->Test( pairsInName, pairsOutName );
-      timers.pairsTimer.stop();
-    }
+      {
+	timers.pairsTimer.start();
+	vector<string> instances = createPairInstances( pd );
+	timbl( pairs, instances, p_results );
+	timers.pairsTimer.stop();
+      }
 #pragma omp section
-    {
-      remove( dirOutName.c_str() );
-      timers.dirTimer.start();
-      dir->Test( dirInName, dirOutName );
-      timers.dirTimer.stop();
-    }
+      {
+	timers.dirTimer.start();
+	vector<string> instances = createDirInstances( pd );
+	timbl( dir, instances, d_results );
+	timers.dirTimer.stop();
+      }
 #pragma omp section
-    {
-      remove( relsOutName.c_str() );
-      timers.relsTimer.start();
-      rels->Test( relsInName, relsOutName );
-      timers.relsTimer.stop();
-    }
+      {
+	timers.relsTimer.start();
+	vector<string> instances = createRelInstances( pd );
+	timbl( rels, instances, r_results );
+	timers.relsTimer.stop();
+      }
   }
+
   timers.csiTimer.start();
-  try {
-    PI->parse( pairsOutName,
-	       relsOutName,
-	       dirOutName,
-	       maxDepSpanS,
-	       fileName,
-	       resFileName );
-    if ( PyErr_Occurred() )
-      PyErr_Print();
-  }
-  catch( exception const & ){
-    PyErr_Print();
-  }
+  vector<parsrel> res = parse( p_results,
+			       r_results,
+			       d_results,
+			       pd.words.size(),
+			       maxDepSpan );
   timers.csiTimer.stop();
-  ifstream resFile( resFileName.c_str() );
-  if ( resFile ){
-    appendParseResult( words, pd, resFile );
-  }
-  else
-    *Log(parseLog) << "couldn't open results file: " << resFileName << endl;
-
-  if ( !keepIntermediate ){
-    remove( fileName.c_str() );
-    remove( resFileName.c_str() );
-    remove( pairsOutName.c_str() );
-    remove( dirOutName.c_str() );
-    remove( relsOutName.c_str() );
-    remove( pairsInName.c_str() );
-    remove( dirInName.c_str() );
-    remove( relsInName.c_str() );
-  }
+  appendParseResult( words, pd, dep_tagset, res );
   timers.parseTimer.stop();
 }
diff --git a/src/cgn_tagger_mod.cxx b/src/cgn_tagger_mod.cxx
index 8449ba8..e618274 100644
--- a/src/cgn_tagger_mod.cxx
+++ b/src/cgn_tagger_mod.cxx
@@ -1,13 +1,13 @@
+/* ex: set tabstop=8 expandtab: */
 /*
-  $Id: cgn_tagger_mod.cxx 17485 2014-08-06 14:10:15Z sloot $
-  $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/src/cgn_tagger_mod.cxx $
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
 
-  Copyright (c) 2006 - 2014
-  Tilburg University
+  This file is part of frog:
 
-  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for Dutch
-
-  This file is part of frog
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
 
   frog is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -23,9 +23,10 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
   For questions and suggestions, see:
-      http://ilk.uvt.nl/software.html
+      https://github.com/LanguageMachines/frog/issues
   or send mail to:
-      timbl at uvt.nl
+      lamasoftware (at ) science.ru.nl
+
 */
 
 #include "mbt/MbtAPI.h"
@@ -35,23 +36,10 @@
 
 using namespace std;
 using namespace folia;
+using namespace TiCC;
+using namespace Tagger;
 
-CGNTagger::CGNTagger(){
-  tagger = 0;
-  filter = 0;
-  cgnLog = new LogStream( theErrLog, "cgn-tagger-" );
-}
-
-CGNTagger::~CGNTagger(){
-  delete tagger;
-  delete filter;
-  delete cgnLog;
-}
-
-static multimap<string,string> cgnSubSets;
-static multimap<string,string> cgnConstraints;
-
-void fillSubSetTable(){
+void CGNTagger::fillSubSetTable(){
   // should become a config file!
   cgnSubSets.insert( make_pair("soort", "ntype" ));
   cgnSubSets.insert( make_pair("eigen", "ntype" ));
@@ -178,80 +166,25 @@ void fillSubSetTable(){
 
 
 bool CGNTagger::init( const Configuration& config ){
-  string val = config.lookUp( "debug", "tagger" );
-  if ( val.empty() ){
-    val = config.lookUp( "debug" );
-  }
-  if ( !val.empty() ){
-    debug = TiCC::stringTo<int>( val );
-  }
-  switch ( debug ){
-  case 0:
-  case 1:
-    break;
-  case 2:
-  case 3:
-  case 4:
-    cgnLog->setlevel(LogDebug);
-    break;
-  case 5:
-  case 6:
-  case 7:
-    cgnLog->setlevel(LogHeavy);
-    break;
-  default:
-    cgnLog->setlevel(LogExtreme);
-  }
-  if ( tagger != 0 ){
-    *Log(cgnLog) << "CGNTagger is already initialized!" << endl;
-    return false;
-  }
-  val = config.lookUp( "settings", "tagger" );
-  if ( val.empty() ){
-    *Log(cgnLog) << "Unable to find settings for Tagger" << endl;
-    return false;
-  }
-  string settings;
-  if ( val[0] == '/' ) // an absolute path
-    settings = val;
-  else
-    settings =  config.configDir() + val;
-
-  val = config.lookUp( "version", "tagger" );
-  if ( val.empty() ){
-    version = "1.0";
-  }
-  else
-    version = val;
-  val = config.lookUp( "set", "tagger" );
-  if ( val.empty() ){
-    tagset = "http://ilk.uvt.nl/folia/sets/frog-mbpos-cgn";
-  }
-  else
-    tagset = val;
-  fillSubSetTable();
-  string charFile = config.lookUp( "char_filter_file", "tagger" );
-  if ( charFile.empty() )
-    charFile = config.lookUp( "char_filter_file" );
-  if ( !charFile.empty() ){
-    charFile = prefix( config.configDir(), charFile );
-    filter = new Tokenizer::UnicodeFilter();
-    filter->fill( charFile );
-  }
-  string init = "-s " + settings + " -vcf";
-  tagger = new MbtAPI( init, *cgnLog );
-  return tagger->isInit();
+  if ( debug )
+    *Log(tag_log) << "INIT CGN Tagger." << endl;
+  if ( POSTagger::init( config ) ){
+    fillSubSetTable();
+    if ( debug )
+      *Log(tag_log) << "DONE CGN Tagger." << endl;
+    return true;
+  }
+  return false;
 }
 
-string getSubSet( const string& val, const string& head ){
-  typedef multimap<string,string>::const_iterator mm_iter;
-  mm_iter it = cgnSubSets.find( val );
+string CGNTagger::getSubSet( const string& val, const string& head ){
+  auto it = cgnSubSets.find( val );
   if ( it == cgnSubSets.end() )
     throw folia::ValueError( "unknown cgn subset for class: '" + val + "'" );
   string result;
   while ( it != cgnSubSets.upper_bound(val) ){
     result = it->second;
-    mm_iter cit = cgnConstraints.find( result );
+    auto cit = cgnConstraints.find( result );
     if ( cit == cgnConstraints.end() ){
       // no constraints on this value
       return result;
@@ -271,123 +204,43 @@ string getSubSet( const string& val, const string& head ){
 			   "' whithin the constraints for '" + head + "'" );
 }
 
-void CGNTagger::addTag( Word *word, const string& inputTag, double confidence ){
-  string cgnTag = inputTag;
-  string mainTag;
-  string tagPartS;
-  string ucto_class = word->cls();
-  if ( debug )
-    *Log(cgnLog) << "ucto class= " << ucto_class << " cgnTag=" << cgnTag << endl;
-  if ( ucto_class == "PUNCTUATION"
-       && ( cgnTag.find("SPEC(") != string::npos
-	    || cgnTag.find("LET") != string::npos ) ){
-    mainTag = "LET";
-    tagPartS = "";
-    cgnTag = "LET()";
-    confidence = 1.0;
-  }
-  else if ( ucto_class == "ABBREVIATION-KNOWN" ){
-    mainTag = "SPEC";
-    tagPartS = "afk";
-    cgnTag = "SPEC(afk)";
-    confidence = 1.0;
-  }
-  else if ( ucto_class == "SMILEY" ||
-	    ucto_class == "REVERSE-SMILEY" ||
-	    ucto_class == "EMOTICON" ||
-	    ucto_class.find("URL") == 0 ||
-	    ucto_class == "E-MAIL" ){
-    mainTag = "SPEC";
-    tagPartS = "symb";
-    cgnTag = "SPEC(symb)";
-    confidence = 1.0;
-  }
-  else {
-    string::size_type openH = cgnTag.find( '(' );
-    string::size_type closeH = cgnTag.find( ')' );
-    if ( openH == string::npos || closeH == string::npos ){
-      *Log(theErrLog) << "tagger_mod: main tag without subparts: impossible: " << cgnTag << endl;
-      exit(-1);
-    }
-    mainTag = cgnTag.substr( 0, openH );
-    if ( mainTag == "SPEC" )
-      confidence = 1.0;
-    tagPartS = cgnTag.substr( openH+1, closeH-openH-1 );
-  }
-  KWargs args;
-  args["set"]  = tagset;
-  args["head"] = mainTag;
-  args["cls"]  = cgnTag;
-  args["confidence"]= toString(confidence);
-  folia::FoliaElement *pos = 0;
-#pragma omp critical(foliaupdate)
-  {
-    pos = word->addPosAnnotation( args );
-  }
-  vector<string> tagParts;
-  size_t numParts = TiCC::split_at( tagPartS, tagParts, "," );
-  for ( size_t i=0; i < numParts; ++i ){
+void CGNTagger::post_process( const vector<Word *>& words ){
+  for ( auto const& word : words ){
+    PosAnnotation *postag = word->annotation<PosAnnotation>( );
+    string cls = postag->cls();
+    vector<string> parts;
+    TiCC::split_at_first_of( cls, parts, "()" );
+    string head = parts[0];
     KWargs args;
+    args["class"]  = head;
     args["set"]    = tagset;
-    args["subset"] = getSubSet( tagParts[i], mainTag );
-    args["cls"]    = tagParts[i];
+    folia::Feature *feat = new folia::HeadFeature( args );
+    postag->append( feat );
+    if ( head == "SPEC" ){
+      postag->confidence(1.0);
+    }
+    if ( parts.size() > 1 ){
+      vector<string> tagParts;
+      TiCC::split_at( parts[1], tagParts, "," );
+      for ( auto const& part : tagParts ){
+	KWargs args;
+	args["set"]    = tagset;
+	args["subset"] = getSubSet( part, head );
+	args["class"]  = part;
 #pragma omp critical(foliaupdate)
-    {
-      folia::Feature *feat = new folia::Feature( args );
-      pos->append( feat );
+	{
+	  folia::Feature *feat = new folia::Feature( args );
+	  postag->append( feat );
+	}
+      }
     }
   }
 }
 
-void CGNTagger::addDeclaration( Document& doc ) const {
-  doc.declare( AnnotationType::POS, tagset,
-	       "annotator='frog-mbpos-" + version
-	       + "', annotatortype='auto', datetime='" + getTime() + "'");
-}
-
-vector<TagResult> CGNTagger::tagLine( const string& line ){
-  if ( tagger )
-    return tagger->TagLine(line);
-  else
-    throw runtime_error( "CGNTagger is not initialized" );
-}
-
 void CGNTagger::Classify( const vector<Word*>& swords ){
-  if ( !swords.empty() ) {
-    string sentence; // the tagger needs the whole sentence
-    for ( size_t w = 0; w < swords.size(); ++w ) {
-      UnicodeString word = swords[w]->text();
-      if ( filter )
-	word = filter->filter( word );
-      sentence += UnicodeToUTF8(word);
-      if ( w < swords.size()-1 )
-	sentence += " ";
-    }
-    if (debug)
-      *Log(cgnLog) << "CGN tagger in: " << sentence << endl;
-    vector<TagResult> tagv = tagger->TagLine(sentence);
-    if ( tagv.size() != swords.size() ){
-      *Log(cgnLog) << "mismatch between number of <w> tags and the tagger result." << endl;
-      *Log(cgnLog) << "words according to <w> tags: " << endl;
-      for ( size_t w = 0; w < swords.size(); ++w ) {
-	*Log(cgnLog) << "w[" << w << "]= " << swords[w]->str() << endl;
-      }
-      *Log(cgnLog) << "words according to CGN tagger: " << endl;
-      for ( size_t i=0; i < tagv.size(); ++i ){
-	*Log(cgnLog) << "word[" << i << "]=" << tagv[i].word() << endl;
-      }
-      throw runtime_error( "CGN tagger is confused" );
-    }
-    if ( debug ){
-      *Log(cgnLog) << "CGN tagger out: " << endl;
-      for ( size_t i=0; i < tagv.size(); ++i ){
-	*Log(cgnLog) << "[" << i << "] : word=" << tagv[i].word()
-		     << " tag=" << tagv[i].assignedTag()
-		     << " confidence=" << tagv[i].confidence() << endl;
-      }
-    }
-    for ( size_t i=0; i < tagv.size(); ++i ){
-      addTag( swords[i], tagv[i].assignedTag(), tagv[i].confidence() );
-    }
+  POSTagger::Classify( swords );
+  if ( debug ){
+    *Log(tag_log) << "POS Classify done:" << endl;
   }
+  post_process( swords );
 }
diff --git a/src/ckyparser.cxx b/src/ckyparser.cxx
new file mode 100644
index 0000000..cb73645
--- /dev/null
+++ b/src/ckyparser.cxx
@@ -0,0 +1,303 @@
+/* ex: set tabstop=8 expandtab: */
+/*
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
+
+  This file is part of frog:
+
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
+
+  frog 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.
+
+  frog 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/>.
+
+  For questions and suggestions, see:
+      https://github.com/LanguageMachines/frog/issues
+  or send mail to:
+      lamasoftware (at ) science.ru.nl
+
+*/
+#include <iostream>
+#include <vector>
+#include <map>
+#include <string>
+
+#include "ticcutils/PrettyPrint.h"
+#include "frog/ckyparser.h"
+
+using namespace std;
+
+ostream& operator<<( ostream& os, const Constraint* c ){
+  if ( c ){
+    c->put( os );
+  }
+  else
+    os << "None";
+  return os;
+}
+
+ostream& operator<<( ostream& os, const Constraint& c ){
+  return os << &c;
+}
+
+void HasIncomingRel::put( ostream& os ) const {
+  Constraint::put( os );
+  os << " incoming rel=" << relType;
+}
+
+
+void HasDependency::put( ostream& os ) const {
+  Constraint::put( os );
+  os << " dependency rel=" << relType << " head=" << headType;
+}
+
+void DependencyDirection::put( ostream & os ) const {
+  Constraint::put( os );
+  os << " direction=" << " " << direction;
+}
+
+
+CKYParser::CKYParser( size_t num, const vector<const Constraint*>& constraints ):
+  numTokens(num)
+{
+  inDepConstraints.resize( numTokens + 1 );
+  outDepConstraints.resize( numTokens + 1 );
+  edgeConstraints.resize( numTokens + 1 );
+  for ( auto& it : edgeConstraints ){
+    it.resize( numTokens + 1 );
+  }
+  chart.resize( numTokens +1 );
+  for ( auto& it : chart ){
+    it.resize( numTokens + 1 );
+  }
+  for ( const auto& constraint : constraints ){
+    addConstraint( constraint );
+  }
+
+}
+
+
+void CKYParser::addConstraint( const Constraint *c ){
+  switch ( c->type() ){
+  case Constraint::Incoming:
+    inDepConstraints[c->tIndex()].push_back( c );
+    break;
+  case Constraint::Dependency:
+    edgeConstraints[c->tIndex()][c->hIndex()].push_back( c );
+    break;
+  case Constraint::Direction:
+    outDepConstraints[c->tIndex()].push_back( c );
+    break;
+  default:
+    cerr << "UNSUPPORTED constraint type" << endl;
+    abort();
+  }
+}
+
+string CKYParser::bestEdge( const SubTree& leftSubtree,
+			    const SubTree& rightSubtree,
+			    size_t headIndex, size_t depIndex,
+			    set<const Constraint*>& bestConstraints,
+			    double& bestScore ){
+  bestConstraints.clear();
+  //  cerr << "BESTEDGE " << headIndex << " <> " << depIndex << endl;
+  if ( headIndex == 0 ){
+    bestScore = 0.0;
+    for ( auto const& constraint : outDepConstraints[depIndex] ){
+      //      cerr << "CHECK " << constraint << endl;
+      if ( constraint->direct() == dirType::ROOT ){
+	//	cerr << "head outdep matched " << constraint << endl;
+	bestScore = constraint->wght();
+	bestConstraints.insert( constraint );
+      }
+    }
+    string label = "ROOT";
+    for ( auto const& constraint : edgeConstraints[depIndex][0] ){
+      //      cerr << "head edge matched " << constraint << endl;
+      bestScore += constraint->wght();
+      bestConstraints.insert( constraint );
+      label = constraint->rel();
+    }
+    //    cerr << "best HEAD==>" << label << " " << bestScore << " " << bestConstraints << endl;
+    return label;
+  }
+  bestScore = -0.5;
+  string bestLabel = "None";
+  for( auto const& edgeConstraint : edgeConstraints[depIndex][headIndex] ){
+    double my_score = edgeConstraint->wght();
+    string my_label = edgeConstraint->rel();
+    set<const Constraint *> my_constraints;
+    my_constraints.insert( edgeConstraint );
+    for( const auto& constraint : inDepConstraints[headIndex] ){
+      if ( constraint->rel() == my_label &&
+	   leftSubtree.satisfiedConstraints.find( constraint ) == leftSubtree.satisfiedConstraints.end() &&
+	   rightSubtree.satisfiedConstraints.find( constraint ) == rightSubtree.satisfiedConstraints.end() ){
+	//	cerr << "inDep matched: " << constraint << endl;
+	my_score += constraint->wght();
+	my_constraints.insert(constraint);
+      }
+    }
+    for( const auto& constraint : outDepConstraints[depIndex] ){
+      if ( ( ( constraint->direct() == LEFT &&
+	       headIndex < depIndex )
+	     ||
+	     ( constraint->direct() == RIGHT &&
+	       headIndex > depIndex ) )
+	   && leftSubtree.satisfiedConstraints.find( constraint ) == leftSubtree.satisfiedConstraints.end()
+	   && rightSubtree.satisfiedConstraints.find( constraint ) == rightSubtree.satisfiedConstraints.end() ){
+	//	cerr << "outdep matched: " << constraint << endl;
+	my_score += constraint->wght();
+	my_constraints.insert(constraint);
+      }
+    }
+    if ( my_score > bestScore ){
+      bestScore = my_score;
+      bestLabel = my_label;
+      bestConstraints = std::move(my_constraints);
+      //      cerr << "UPDATE BEst " << bestLabel << " " << bestScore << " " << bestConstraints << endl;
+    }
+  }
+  //  cerr << "GRAND TOTAL " << bestLabel << " " << bestScore << " " << bestConstraints << endl;
+  return bestLabel;
+}
+
+void CKYParser::parse(){
+  for ( size_t k=1; k < numTokens + 2; ++k ){
+    for( size_t s=0; s < numTokens + 1 - k; ++s ){
+      size_t t = s + k;
+      double bestScore = -10E45;
+      int bestI = -1;
+      string bestL = "__";
+      set<const Constraint*> bestConstraints;
+      for( size_t r = s; r < t; ++r ){
+	double edgeScore = -0.5;
+	set<const Constraint*> constraints;
+	string label = bestEdge( chart[s][r].r_True,
+				 chart[r+1][t].l_True,
+				 t, s, constraints, edgeScore );
+	//	cerr << "STEP 1 BEST EDGE==> " << label << " ( " << edgeScore << ")" << endl;
+	double score = chart[s][r].r_True.score() + chart[r+1][t].l_True.score() + edgeScore;
+	if ( score > bestScore ){
+	  bestScore = score;
+	  bestI = r;
+	  bestL = label;
+	  bestConstraints = std::move(constraints);
+	}
+      }
+      //      cerr << "STEP 1 ADD: " << bestScore <<"-" << bestI << "-" << bestL << endl;
+      chart[s][t].l_False = SubTree( bestScore, bestI, bestL );
+      chart[s][t].l_False.satisfiedConstraints.insert( chart[s][bestI].r_True.satisfiedConstraints.begin(), chart[s][bestI].r_True.satisfiedConstraints.end() );
+      chart[s][t].l_False.satisfiedConstraints.insert( chart[bestI+1][t].l_True.satisfiedConstraints.begin(), chart[bestI+1][t].l_True.satisfiedConstraints.end() );
+      chart[s][t].l_False.satisfiedConstraints.insert( bestConstraints.begin(), bestConstraints.end() );
+
+      bestScore = -10E45;
+      bestI = -1;
+      bestL = "__";
+      bestConstraints.clear();
+      for ( size_t r = s; r < t; ++r ){
+	double edgeScore = -0.5;
+	set<const Constraint*> constraints;
+	string label = bestEdge( chart[s][r].r_True,
+				 chart[r+1][t].l_True,
+				 s, t, constraints, edgeScore );
+	//	cerr << "STEP 2 BEST EDGE==> " << label << " ( " << edgeScore << ")" << endl;
+	double score = chart[s][r].r_True.score() + chart[r+1][t].l_True.score() + edgeScore;
+	if ( score > bestScore ){
+	  bestScore = score;
+	  bestI = r;
+	  bestL = label;
+	  bestConstraints = std::move(constraints);
+	}
+      }
+
+      //      cerr << "STEP 2 ADD: " << bestScore <<"-" << bestI << "-" << bestL << endl;
+      chart[s][t].r_False = SubTree( bestScore, bestI, bestL );
+      chart[s][t].r_False.satisfiedConstraints.insert( chart[s][bestI].r_True.satisfiedConstraints.begin(), chart[s][bestI].r_True.satisfiedConstraints.end() );
+      chart[s][t].r_False.satisfiedConstraints.insert( chart[bestI+1][t].l_True.satisfiedConstraints.begin(), chart[bestI+1][t].l_True.satisfiedConstraints.end() );
+      chart[s][t].r_False.satisfiedConstraints.insert( bestConstraints.begin(), bestConstraints.end() );
+
+      bestI = -1;
+      bestL = "";
+      bestScore = -10E45;
+      for ( size_t r = s; r < t; ++r ){
+	double score = chart[s][r].l_True.score() + chart[r][t].l_False.score();
+	if ( score > bestScore ){
+	  bestScore = score;
+	  bestI = r;
+	}
+      }
+      //      cerr << "STEP 3 ADD: " << bestScore <<"-" << bestI << "-" << bestL << endl;
+      chart[s][t].l_True = SubTree( bestScore, bestI, bestL );
+      chart[s][t].l_True.satisfiedConstraints.insert( chart[s][bestI].l_True.satisfiedConstraints.begin(), chart[s][bestI].l_True.satisfiedConstraints.end() );
+      chart[s][t].l_True.satisfiedConstraints.insert( chart[bestI][t].l_False.satisfiedConstraints.begin(), chart[bestI][t].l_False.satisfiedConstraints.end() );
+
+      bestI = -1;
+      bestL = "";
+      bestScore = -10E45;
+      for ( size_t r = s+1; r < t+1; ++r ){
+	double score = chart[s][r].r_False.score() + chart[r][t].r_True.score();
+	if ( score > bestScore ){
+	  bestScore = score;
+	  bestI = r;
+	}
+      }
+
+      //      cerr << "STEP 4 ADD: " << bestScore <<"-" << bestI << "-" << bestL << endl;
+      chart[s][t].r_True = SubTree( bestScore, bestI, bestL );
+      chart[s][t].r_True.satisfiedConstraints.insert( chart[s][bestI].r_False.satisfiedConstraints.begin(), chart[s][bestI].r_False.satisfiedConstraints.end() );
+      chart[s][t].r_True.satisfiedConstraints.insert( chart[bestI][t].r_True.satisfiedConstraints.begin(), chart[bestI][t].r_True.satisfiedConstraints.end() );
+
+    }
+  }
+}
+
+
+void CKYParser::leftIncomplete( int s, int t, vector<parsrel>& pr ){
+  int r = chart[s][t].l_False.r();
+  string label = chart[s][t].l_False.edgeLabel();
+  if ( r >=0 ){
+    pr[s - 1].deprel = label;
+    pr[s - 1].head = t;
+    rightComplete( s, r, pr );
+    leftComplete( r + 1, t, pr );
+  }
+}
+
+void CKYParser::rightIncomplete( int s, int t, vector<parsrel>& pr ){
+  int r = chart[s][t].r_False.r();
+  string label = chart[s][t].r_False.edgeLabel();
+  if ( r >= 0 ) {
+    pr[t - 1].deprel = label;
+    pr[t - 1].head = s;
+    rightComplete( s, r, pr );
+    leftComplete( r + 1, t, pr );
+  }
+}
+
+
+void CKYParser::leftComplete( int s, int t, vector<parsrel>& pr ){
+  int r = chart[s][t].l_True.r();
+  if ( r >= 0 ){
+    leftComplete( s, r, pr );
+    leftIncomplete( r, t, pr );
+  }
+}
+
+void CKYParser::rightComplete( int s, int t, vector<parsrel>& pr ){
+  int r = chart[s][t].r_True.r();
+  if ( r >= 0 ){
+    rightIncomplete( s, r, pr );
+    rightComplete( r, t, pr );
+  }
+}
diff --git a/src/clex.cxx b/src/clex.cxx
new file mode 100644
index 0000000..981efdb
--- /dev/null
+++ b/src/clex.cxx
@@ -0,0 +1,221 @@
+/* ex: set tabstop=8 expandtab: */
+/*
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
+
+  This file is part of frog:
+
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
+
+  frog 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.
+
+  frog 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/>.
+
+  For questions and suggestions, see:
+      https://github.com/LanguageMachines/frog/issues
+  or send mail to:
+      lamasoftware (at ) science.ru.nl
+
+*/
+
+#include <string>
+#include <map>
+#include "frog/clex.h"
+
+using namespace std;
+
+namespace CLEX {
+  map<CLEX::Type,string> tagNames = {
+    {CLEX::N, "noun" },
+    {CLEX::A, "adjective"},
+    {CLEX::Q, "quantifier-numeral"},
+    {CLEX::V, "verb"},
+    {CLEX::D, "article"},
+    {CLEX::O, "pronoun"},
+    {CLEX::B, "adverb"},
+    {CLEX::P, "preposition"},
+    {CLEX::C, "conjunction"},
+    {CLEX::I, "interjection"},
+    {CLEX::X, "unanalysed"},
+    {CLEX::Z, "expression-part"},
+    {CLEX::PN, "proper-noun"},
+    {CLEX::AFFIX, "affix"},
+    {CLEX::XAFFIX,"x-affix"},
+    {CLEX::NEUTRAL, "neutral"},
+    {CLEX::UNASS, "unassigned"}
+  };
+
+  map<char,string> iNames = {
+    // the inflection names
+    {'X', ""},
+    {'s', "separated"},
+    {'e', "singular"},
+    {'m', "plural"},
+    {'d', "diminutive"},
+    {'G', "genitive"},
+    {'D', "dative"},
+    {'P', "positive"},
+    {'C', "comparative"},
+    {'S', "superlative"},
+    {'E', "suffix-e"},
+    {'i', "infinitive"},
+    {'p', "participle"},
+    {'t', "present-tense"},
+    {'v', "past-tense"},
+    {'1', "1st-person-verb"},
+    {'2', "2nd-person-verb"},
+    {'3', "3rd-person-verb"},
+    {'I', "inversed"},
+    {'g', "imperative"},
+    {'a', "subjunctive"},
+  };
+
+  Type toCLEX( const string& s ){
+    if ( s == "N" )
+      return N;
+    else if ( s == "A" )
+      return A;
+    else if ( s == "Q" )
+      return Q;
+    else if ( s == "V" )
+      return V;
+    else if ( s == "D" )
+      return D;
+    else if ( s == "O" )
+      return O;
+    else if ( s == "B" )
+      return B;
+    else if ( s == "P" )
+      return P;
+    else if ( s == "C" )
+      return C;
+    else if ( s == "I" )
+      return I;
+    else if ( s == "X" )
+      return X;
+    else if ( s == "Z" )
+      return Z;
+    else if ( s == "PN" )
+      return PN;
+    else if ( s == "*" )
+      return AFFIX;
+    else if ( s == "x" )
+      return XAFFIX;
+    else if ( s == "0" )
+      return NEUTRAL;
+    else
+      return UNASS;
+  }
+
+  Type toCLEX( const char c ){
+    string s;
+    s += c;
+    return toCLEX(s);
+  }
+
+  string toString( const Type& t ){
+    switch ( t ){
+    case N:
+      return "N";
+    case A:
+      return "A";
+    case Q:
+      return "Q";
+    case V:
+      return "V";
+    case D:
+      return "D";
+    case O:
+      return "O";
+    case B:
+      return "B";
+    case P:
+      return "P";
+    case C:
+      return "C";
+    case I:
+      return "I";
+    case X:
+      return "X";
+    case Z:
+      return "Z";
+    case PN:
+      return "PN";
+    case AFFIX:
+      return "*";
+    case XAFFIX:
+      return "x";
+    case NEUTRAL:
+      return "0";
+    default:
+      return "/";
+    }
+  }
+
+  bool isBasicClass( const Type& t ){
+    switch ( t ){
+    case N:
+    case A:
+    case Q:
+    case V:
+    case D:
+    case O:
+    case B:
+    case P:
+    case C:
+    case I:
+    case X:
+    case Z:
+      return true;
+    default:
+      return false;
+    }
+  }
+
+  Type select_tag( const char ch ){
+    Type result = CLEX::UNASS;
+    switch( ch ){
+    case 'm':
+    case 'e':
+    case 'd':
+    case 'G':
+    case 'D':
+      result = N;
+      break;
+    case 'P':
+    case 'C':
+    case 'S':
+    case 'E':
+      result = A;
+      break;
+    case 'i':
+    case 'p':
+    case 't':
+    case 'v':
+    case 'g':
+    case 'a':
+      result = V;
+      break;
+    default:
+      break;
+    }
+    return result;
+  }
+
+}
+
+ostream& operator<<( ostream& os, const CLEX::Type& t ){
+  os << toString( t );
+  return os;
+}
diff --git a/src/csidp.cxx b/src/csidp.cxx
new file mode 100644
index 0000000..50f9e65
--- /dev/null
+++ b/src/csidp.cxx
@@ -0,0 +1,158 @@
+/* ex: set tabstop=8 expandtab: */
+/*
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
+
+  This file is part of frog:
+
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
+
+  frog 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.
+
+  frog 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/>.
+
+  For questions and suggestions, see:
+      https://github.com/LanguageMachines/frog/issues
+  or send mail to:
+      lamasoftware (at ) science.ru.nl
+
+*/
+#include <iostream>
+#include <fstream>
+#include <string>
+#include <vector>
+#include <map>
+
+#include "ticcutils/StringOps.h"
+#include "ticcutils/PrettyPrint.h"
+#include "frog/csidp.h"
+
+using namespace std;
+
+void split_dist( const vector< pair<string,double>>& dist,
+		 map<string,double>& result ){
+  result.clear();
+  for( const auto& it : dist ){
+    double d = it.second;
+    vector<string> tags;
+    TiCC::split_at( it.first, tags, "|" );
+    for( const auto& t : tags ){
+      result[t] += d;
+    }
+  }
+}
+
+vector<const Constraint*> formulateWCSP( const vector<timbl_result>& d_res,
+				   const vector<timbl_result>& r_res,
+				   const vector<timbl_result>& p_res,
+				   size_t sent_len,
+				   size_t maxDist ){
+  vector<const Constraint*> constraints;
+  vector<timbl_result>::const_iterator pit = p_res.begin();
+  for ( size_t dependent_id = 1;
+	dependent_id <= sent_len;
+	++dependent_id ){
+    int headId = 0;
+    string top_class = pit->cls();
+    double conf = pit->confidence();
+    ++pit;
+    //    cerr << "class=" << top_class << " met conf " << conf << endl;
+    if ( top_class != "__" ){
+      constraints.push_back(new HasDependency(dependent_id,headId,top_class,conf));
+    }
+  }
+
+  for ( size_t dependent_id = 1;
+	dependent_id <= sent_len;
+	++dependent_id ) {
+    for ( size_t headId = 1;
+	  headId <= sent_len;
+	  ++headId ){
+      size_t diff = ( headId > dependent_id ) ? headId - dependent_id : dependent_id - headId;
+      if ( diff != 0 && diff <= maxDist ){
+	string line;
+	if ( pit == p_res.end() ){
+	  cerr << "OEPS p_res leeg? " << endl;
+	  break;
+	}
+	string top_class = pit->cls();
+	double conf = pit->confidence();
+	++pit;
+	//	cerr << "class=" << top_class << " met conf " << conf << endl;
+	if ( top_class != "__" ){
+	  constraints.push_back( new HasDependency(dependent_id,headId,top_class,conf));
+	}
+      }
+    }
+  }
+
+  vector<timbl_result>::const_iterator dit = d_res.begin();
+  vector<timbl_result>::const_iterator rit = r_res.begin();
+  for ( size_t token_id = 1;
+	token_id <= sent_len;
+	++token_id ) {
+    for ( auto const& d : dit->dist() ){
+      constraints.push_back( new DependencyDirection( token_id, d.first, d.second ) );
+    }
+    ++dit;
+
+    for ( size_t rel_id = 1;
+	  rel_id <= sent_len;
+	  ++rel_id ) {
+      if ( rit == r_res.end() ){
+	break;
+      }
+      string top_class = rit->cls();
+      if ( top_class != "__" ){
+	map<string,double> splits;
+	split_dist( rit->dist(), splits );
+	vector<string> clss;
+	TiCC::split_at( top_class, clss, "|" );
+	for( const auto& rel : clss ){
+	  constraints.push_back( new HasIncomingRel( rel_id, rel, splits[rel] ) );
+	}
+      }
+      ++rit;
+    }
+  }
+  return constraints;
+}
+
+timbl_result::timbl_result( const string& cls,
+			    double conf,
+			    const Timbl::ValueDistribution* vd ):
+  _cls(cls), _confidence(conf) {
+  Timbl::ValueDistribution::dist_iterator it = vd->begin();
+  while ( it != vd->end() ){
+    _dist.push_back( make_pair(it->second->Value()->Name(),it->second->Weight()) );
+    ++it;
+  }
+}
+
+vector<parsrel> parse( const vector<timbl_result>& p_res,
+		       const vector<timbl_result>& r_res,
+		       const vector<timbl_result>& d_res,
+		       size_t parse_size,
+		       int maxDist ){
+  vector<const Constraint*> constraints
+    = formulateWCSP( d_res, r_res, p_res, parse_size, maxDist );
+  CKYParser parser( parse_size, constraints );
+  parser.parse();
+  vector<parsrel> result( parse_size );
+  parser.rightComplete(0, parse_size, result );
+  for ( const auto& constraint : constraints ){
+    delete constraint;
+  }
+  return result;
+}
diff --git a/src/iob_tagger_mod.cxx b/src/iob_tagger_mod.cxx
index 43b5a44..ff7ebd3 100644
--- a/src/iob_tagger_mod.cxx
+++ b/src/iob_tagger_mod.cxx
@@ -1,13 +1,13 @@
+/* ex: set tabstop=8 expandtab: */
 /*
-  $Id: iob_tagger_mod.cxx 17487 2014-08-06 14:55:31Z sloot $
-  $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/src/iob_tagger_mod.cxx $
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
 
-  Copyright (c) 2006 - 2014
-  Tilburg University
+  This file is part of frog:
 
-  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for Dutch
-
-  This file is part of frog
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
 
   frog is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -23,26 +23,32 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
   For questions and suggestions, see:
-      http://ilk.uvt.nl/software.html
+      https://github.com/LanguageMachines/frog/issues
   or send mail to:
-      timbl at uvt.nl
+      lamasoftware (at ) science.ru.nl
+
 */
 
 #include "mbt/MbtAPI.h"
 #include "frog/Frog.h"
+#include "ucto/unicode.h"
 #include "frog/iob_tagger_mod.h"
 
 using namespace std;
 using namespace folia;
+using namespace TiCC;
+using namespace Tagger;
 
-IOBTagger::IOBTagger(){
+IOBTagger::IOBTagger(TiCC::LogStream * logstream){
   tagger = 0;
-  iobLog = new LogStream( theErrLog, "iob-" );
+  iobLog = new LogStream( logstream, "iob-" );
+  filter = 0;
 }
 
 IOBTagger::~IOBTagger(){
   delete tagger;
   delete iobLog;
+  delete filter;
 }
 
 bool IOBTagger::init( const Configuration& config ){
@@ -72,8 +78,9 @@ bool IOBTagger::init( const Configuration& config ){
   default:
     iobLog->setlevel(LogExtreme);
   }
-  if (debug)
+  if (debug) {
     *Log(iobLog) << "IOB Chunker Init" << endl;
+  }
   if ( tagger != 0 ){
     *Log(iobLog) << "IOBTagger is already initialized!" << endl;
     return false;
@@ -84,24 +91,36 @@ bool IOBTagger::init( const Configuration& config ){
     return false;
   }
   string settings;
-  if ( val[0] == '/' ) // an absolute path
+  if ( val[0] == '/' ) {
+    // an absolute path
     settings = val;
-  else
+  }
+  else {
     settings = config.configDir() + val;
+  }
 
   val = config.lookUp( "version", "IOB" );
   if ( val.empty() ){
     version = "1.0";
   }
-  else
+  else {
     version = val;
+  }
   val = config.lookUp( "set", "IOB" );
   if ( val.empty() ){
     tagset = "http://ilk.uvt.nl/folia/sets/frog-chunker-nl";
   }
-  else
+  else {
     tagset = val;
-
+  }
+  string charFile = config.lookUp( "char_filter_file", "IOB" );
+  if ( charFile.empty() )
+    charFile = config.lookUp( "char_filter_file" );
+  if ( !charFile.empty() ){
+    charFile = prefix( config.configDir(), charFile );
+    filter = new Tokenizer::UnicodeFilter();
+    filter->fill( charFile );
+  }
   string init = "-s " + settings + " -vcf";
   tagger = new MbtAPI( init, *iobLog );
   return tagger->isInit();
@@ -112,8 +131,8 @@ void IOBTagger::addChunk( ChunkingLayer *chunks,
 			  const vector<double>& confs,
 			  const string& IOB ){
   double conf = 1;
-  for ( size_t i=0; i < confs.size(); ++i )
-    conf *= confs[i];
+  for ( auto const& val : confs )
+    conf *= val;
   KWargs args;
   args["class"] = IOB;
   args["set"] = tagset;
@@ -123,7 +142,7 @@ void IOBTagger::addChunk( ChunkingLayer *chunks,
 #pragma omp critical(foliaupdate)
   {
     try {
-      chunk = new Chunk( chunks->doc(), args );
+      chunk = new Chunk( args, chunks->doc() );
       chunks->append( chunk );
     }
     catch ( exception& e ){
@@ -131,12 +150,13 @@ void IOBTagger::addChunk( ChunkingLayer *chunks,
       exit( EXIT_FAILURE );
     }
   }
-  for ( size_t i=0; i < words.size(); ++i ){
-    if ( words[i]->isinstance(PlaceHolder_t) )
+  for ( const auto& word : words ){
+    if ( word->isinstance(PlaceHolder_t) ){
       continue;
+    }
 #pragma omp critical(foliaupdate)
     {
-      chunk->append( words[i] );
+      chunk->append( word );
     }
   }
 }
@@ -144,19 +164,21 @@ void IOBTagger::addChunk( ChunkingLayer *chunks,
 void IOBTagger::addIOBTags( const vector<Word*>& words,
 			    const vector<string>& tags,
 			    const vector<double>& confs ){
-  if ( words.empty() )
+  if ( words.empty() ){
     return;
+  }
   ChunkingLayer *el = 0;
 #pragma omp critical(foliaupdate)
   {
     Sentence *sent = words[0]->sentence();
     try {
-      el = sent->annotation<ChunkingLayer>();
+      el = sent->annotation<ChunkingLayer>(tagset);
     }
     catch(...){
       KWargs args;
       args["generate_id"] = sent->id();
-      el = new ChunkingLayer(sent->doc(),args);
+      args["set"] = tagset;
+      el = new ChunkingLayer( args, sent->doc() );
       sent->append( el );
     }
   }
@@ -164,8 +186,9 @@ void IOBTagger::addIOBTags( const vector<Word*>& words,
   vector<double> dstack;
   string curIOB;
   for ( size_t i=0; i < tags.size(); ++i ){
-    if (debug)
+    if (debug){
       *Log(iobLog) << "tag = " << tags[i] << endl;
+    }
     vector<string> tagwords;
     size_t num_words = TiCC::split_at( tags[i], tagwords, "_" );
     if ( num_words != 2 ){
@@ -173,8 +196,9 @@ void IOBTagger::addIOBTags( const vector<Word*>& words,
       exit( EXIT_FAILURE );
     }
     vector<string> iob;
-    if (debug)
+    if (debug){
       *Log(iobLog) << "IOB = " << tagwords[1] << endl;
+    }
     if ( tagwords[1] == "O" ){
       if ( !stack.empty() ){
 	if (debug) {
@@ -226,24 +250,34 @@ void IOBTagger::addIOBTags( const vector<Word*>& words,
 }
 
 void IOBTagger::addDeclaration( Document& doc ) const {
-  doc.declare( AnnotationType::CHUNKING,
-	       tagset,
-	       "annotator='frog-chunker-" + version
-	       + "', annotatortype='auto', datetime='" + getTime() + "'");
+#pragma omp critical(foliaupdate)
+  {
+    doc.declare( AnnotationType::CHUNKING,
+		 tagset,
+		 "annotator='frog-chunker-" + version
+		 + "', annotatortype='auto', datetime='" + getTime() + "'");
+  }
 }
 
 void IOBTagger::Classify( const vector<Word *>& swords ){
   if ( !swords.empty() ) {
-    vector<string> words;
     string sentence; // the tagger needs the whole sentence
-    for ( size_t w = 0; w < swords.size(); ++w ) {
-      sentence += swords[w]->str();
-      words.push_back( swords[w]->str() );
-      if ( w < swords.size()-1 )
+    for ( const auto& sword : swords ){
+      UnicodeString word;
+#pragma omp critical(foliaupdate)
+      {
+	word = sword->text();
+      }
+      if ( filter )
+	word = filter->filter( word );
+      sentence += UnicodeToUTF8(word);
+      if ( &sword != &swords.back() ){
 	sentence += " ";
+      }
     }
-    if (debug)
+    if (debug){
       *Log(iobLog) << "IOB in: " << sentence << endl;
+    }
     vector<TagResult> tagv = tagger->TagLine(sentence);
     if ( tagv.size() != swords.size() ){
       throw runtime_error( "IOB tagger is confused" );
@@ -258,10 +292,19 @@ void IOBTagger::Classify( const vector<Word *>& swords ){
     }
     vector<double> conf;
     vector<string> tags;
-    for ( size_t i=0; i < tagv.size(); ++i ){
-      tags.push_back( tagv[i].assignedTag() );
-      conf.push_back( tagv[i].confidence() );
+    for ( const auto& tag : tagv ){
+      tags.push_back( tag.assignedTag() );
+      conf.push_back( tag.confidence() );
     }
     addIOBTags( swords, tags, conf );
   }
 }
+
+string IOBTagger::set_eos_mark( const string& eos ){
+  if ( tagger ){
+    return tagger->set_eos_mark(eos);
+  }
+  else {
+    throw runtime_error( "IOBTagger is not initialized" );
+  }
+}
diff --git a/src/mblem_mod.cxx b/src/mblem_mod.cxx
old mode 100755
new mode 100644
index a605f63..3ec3e68
--- a/src/mblem_mod.cxx
+++ b/src/mblem_mod.cxx
@@ -1,11 +1,13 @@
+/* ex: set tabstop=8 expandtab: */
 /*
-  $Id: mblem_mod.cxx 17436 2014-07-09 13:13:35Z sloot $
-  $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/src/mblem_mod.cxx $
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
 
-  Copyright (c) 2006 - 2014
-  Tilburg University
+  This file is part of frog:
 
-  This file is part of frog.
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
 
   frog is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -21,9 +23,10 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
   For questions and suggestions, see:
-      http://ilk.uvt.nl/software.html
+      https://github.com/LanguageMachines/frog/issues
   or send mail to:
-      timbl at uvt.nl
+      lamasoftware (at ) science.ru.nl
+
 */
 
 #include <cstdlib>
@@ -41,35 +44,38 @@ using namespace std;
 using namespace TiCC;
 using namespace folia;
 
-Mblem::Mblem(): myLex(0),punctuation( "?...,:;\\'`(){}[]%#+-_=/!" ),
-		history(20), debug(0) {
-  mblemLog = new LogStream( theErrLog, "mblem" );
+Mblem::Mblem( LogStream *logstream ):
+  myLex(0),
+  punctuation( "?...,:;\\'`(){}[]%#+-_=/!" ),
+  history(20),
+  debug(0),
+  keep_case( false ),
+  filter(0)
+{
+  mblemLog = new LogStream( logstream, "mblem" );
 }
 
-void Mblem::read_transtable( const string& tableName ) {
-  ifstream bron( tableName.c_str() );
-  if ( !bron ) {
-    *Log(mblemLog) << "translation table file '" << tableName
-		    << "' appears to be missing." << endl;
-    exit(1);
+bool Mblem::fill_ts_map( const string& file ){
+  ifstream is( file );
+  if ( !is ){
+    *Log(mblemLog) << "Unable to open file: '" << file << "'" << endl;
+    return false;
   }
-  while( bron ){
-    string className;
-    string classCode;
-    bron >> className;
-    bron >> ws;
-    bron >> classCode;
-    if ( classMap.find( classCode ) == classMap.end() ){
-      // stupid HACK to only accept first occurence
-      // multiple occurences is a NO NO i think
-      classMap[classCode] = className;
+  string line;
+  while ( getline( is, line ) ){
+    if ( line.empty() || line[0] == '#' )
+      continue;
+    vector<string> parts;
+    if ( TiCC::split( line, parts ) != 3 ){
+      *Log(mblemLog) << "invalid line in: '" << file << "' (expected 3 parts)" << endl;
+      return false;
     }
-    // else {
-    //   *Log(mblemLog) << "multiple entry " << className << " " << classCode << " in translation table file: " << tableName  << " (Ignored) " << endl;
-    // }
-    bron >> ws;
+    token_strip_map[parts[0]].insert( make_pair( parts[1], TiCC::stringTo<int>( parts[2] ) ) );
+  }
+  if ( debug ){
+    *Log(mblemLog) << "read token strip rules from: '" << file << "'" << endl;
   }
-  return;
+  return true;
 }
 
 bool Mblem::init( const Configuration& config ) {
@@ -97,15 +103,16 @@ bool Mblem::init( const Configuration& config ) {
 
   val = config.lookUp( "set", "tagger" );
   if ( val.empty() ){
-    cgn_tagset = "http://ilk.uvt.nl/folia/sets/frog-mbpos-cgn";
+    POS_tagset = "http://ilk.uvt.nl/folia/sets/frog-mbpos-cgn";
   }
   else
-    cgn_tagset = val;
+    POS_tagset = val;
 
   string transName = config.lookUp( "transFile", "mblem" );
   if ( !transName.empty() ){
     transName = prefix( config.configDir(), transName );
-    read_transtable( transName );
+    cerr << "usage of a mblem transFile is no longer needed!" << endl;
+    cerr << "skipping : " << transName << endl;
   }
   string treeName = config.lookUp( "treeFile", "mblem"  );
   if ( treeName.empty() )
@@ -121,6 +128,27 @@ bool Mblem::init( const Configuration& config ) {
     filter->fill( charFile );
   }
 
+  string tokenStripFile = config.lookUp( "token_strip_file", "mblem" );
+  if ( !tokenStripFile.empty() ){
+    tokenStripFile = prefix( config.configDir(), tokenStripFile );
+    if ( !fill_ts_map( tokenStripFile ) )
+      return false;
+  }
+
+  string one_one_tagS = config.lookUp( "one_one_tags", "mblem" );
+  if ( !one_one_tagS.empty() ){
+    vector<string> tags;
+    TiCC::split_at( one_one_tagS, tags, "," );
+    for ( auto const& t : tags ){
+      one_one_tags.insert( t );
+    }
+  }
+
+  string par = config.lookUp( "keep_case", "mblem" );
+  if ( !par.empty() ){
+    keep_case = stringTo<bool>( par );
+  }
+
   string opts = config.lookUp( "timblOpts", "mblem" );
   if ( opts.empty() )
     opts = "-a1";
@@ -133,6 +161,7 @@ bool Mblem::init( const Configuration& config ) {
 
 Mblem::~Mblem(){
   //    *Log(mblemLog) << "cleaning up MBLEM stuff" << endl;
+  delete filter;
   delete myLex;
   myLex = 0;
   delete mblemLog;
@@ -161,71 +190,38 @@ string Mblem::make_instance( const UnicodeString& in ) {
   return result;
 }
 
-bool similar( const string& tag, const string& lookuptag,
-	      const string& CGNentry ){
-  return tag.find( CGNentry ) != string::npos &&
-    lookuptag.find( CGNentry ) != string::npos ;
-}
-
-bool isSimilar( const string& tag, const string& cgnTag ){
-  // Dutch CGN constraints
-  return
-    tag == cgnTag ||
-    similar( tag, cgnTag, "hulpofkopp" ) ||
-    similar( tag, cgnTag, "neut,zelfst" ) ||
-    similar( tag, cgnTag, "rang,bep,zelfst,onverv" ) ||
-    similar( tag, cgnTag, "stell,onverv" ) ||
-    similar( tag, cgnTag, "hoofd,prenom" ) ||
-    similar( tag, cgnTag, "soort,ev" ) ||
-    similar( tag, cgnTag, "ev,neut" ) ||
-    similar( tag, cgnTag, "inf" ) ||
-    similar( tag, cgnTag, "zelfst" ) ||
-    similar( tag, cgnTag, "voorinf" ) ||
-    similar( tag, cgnTag, "verldw,onverv" ) ||
-    similar( tag, cgnTag, "ott,3,ev" ) ||
-    similar( tag, cgnTag, "ott,2,ev" ) ||
-    similar( tag, cgnTag, "ott,1,ev" ) ||
-    similar( tag, cgnTag, "ott,1of2of3,mv" ) ||
-    similar( tag, cgnTag, "ott,1of2of3,ev" ) ||
-    similar( tag, cgnTag, "ovt,1of2of3,mv" ) ||
-    similar( tag, cgnTag, "ovt,1of2of3,ev" ) ||
-    similar( tag, cgnTag, "ovt,3,ev" ) ||
-    similar( tag, cgnTag, "ovt,2,ev" ) ||
-    similar( tag, cgnTag, "ovt,1,ev" );
-}
-
-void Mblem::addLemma( FoliaElement *word, const string& cls ){
+void Mblem::addLemma( Word *word, const string& cls ){
   KWargs args;
   args["set"]=tagset;
-  args["cls"]=cls;
-#pragma omp critical(foliaupdate)
-  {
-    word->addLemmaAnnotation( args );
-  }
-}
-
-void Mblem::addAltLemma( Word *word, const string& cls ){
-  Alternative *alt = new Alternative();
+  args["class"]=cls;
 #pragma omp critical(foliaupdate)
   {
-    word->append( alt );
+    try {
+      word->addLemmaAnnotation( args );
+    }
+    catch( const exception& e ){
+      *Log(mblemLog) << e.what() << " addLemma failed." << endl;
+      exit(EXIT_FAILURE);
+    }
   }
-  addLemma( alt, cls );
 }
 
 void Mblem::filterTag( const string& postag ){
-  vector<mblemData>::iterator it = mblemResult.begin();
+  auto it = mblemResult.begin();
   while( it != mblemResult.end() ){
-    if ( isSimilar( postag, it->getTag() ) ){
-      if ( debug )
-	*Log(mblemLog) << "compare cgn-tag " << postag << " with "
-		       << it->getTag() << " similar! " << endl;
+    string tag = it->getTag();
+    if ( postag == tag ){
+      if ( debug ){
+	*Log(mblemLog) << "compare cgn-tag " << postag << " with mblem-tag " << tag
+		       << "\n\t==> identical tags"  << endl;
+      }
       ++it;
     }
     else {
-      if ( debug )
-	*Log(mblemLog) << "compare cgn-tag " << postag << " with "
-		       << it->getTag() << " NOT similar! " << endl;
+      if ( debug ){
+	*Log(mblemLog) << "compare cgn-tag " << postag << " with mblem-tag " << tag
+		       << "\n\t==> different tags" << endl;
+      }
       it = mblemResult.erase(it);
     }
   }
@@ -234,10 +230,10 @@ void Mblem::filterTag( const string& postag ){
 }
 
 void Mblem::makeUnique( ){
-  vector<mblemData>::iterator it = mblemResult.begin();
+  auto it = mblemResult.begin();
   while( it != mblemResult.end() ){
     string lemma = it->getLemma();
-    vector<mblemData>::iterator it2 = it+1;
+    auto it2 = it+1;
     while( it2 != mblemResult.end() ){
       if (debug)
 	*Log(mblemLog) << "compare lemma " << lemma << " with " << it2->getLemma() << " ";
@@ -256,9 +252,9 @@ void Mblem::makeUnique( ){
   }
   if (debug){
     *Log(mblemLog) << "final result after filter and unique" << endl;
-    for( size_t index=0; index < mblemResult.size(); ++index ){
-      *Log(mblemLog) << "lemma alt: " << mblemResult[index].getLemma()
-		     << "\ttag alt: " << mblemResult[index].getTag() << endl;
+    for ( const auto& mbr : mblemResult ){
+      *Log(mblemLog) << "lemma alt: " << mbr.getLemma()
+		     << "\ttag alt: " << mbr.getTag() << endl;
     }
   }
 }
@@ -270,77 +266,74 @@ void Mblem::getFoLiAResult( Word *word, const UnicodeString& uWord ){
     addLemma( word, result );
   }
   else {
-    bool first = true;
-    vector<mblemData>::iterator it = mblemResult.begin();
-    while( it != mblemResult.end() ){
-      string result = it->getLemma();
-      if ( first ){
-	addLemma( word, result );
-	first = false;
-      }
-      else {
-	// there are more matching lemmas. add them as alternatives
-	addAltLemma( word, result );
-      }
-      ++it;
+    for ( auto const& it : mblemResult ){
+      string result = it.getLemma();
+      addLemma( word, result );
     }
   }
 }
 
 
 void Mblem::addDeclaration( Document& doc ) const {
-  doc.declare( AnnotationType::LEMMA,
-	       tagset,
-	       "annotator='frog-mblem-" + version
-	       + "', annotatortype='auto', datetime='" + getTime() + "'");
+#pragma omp critical (foliaupdate)
+  {
+    doc.declare( AnnotationType::LEMMA,
+		 tagset,
+		 "annotator='frog-mblem-" + version
+		 + "', annotatortype='auto', datetime='" + getTime() + "'");
+  }
 }
 
 void Mblem::Classify( Word *sword ){
   if ( sword->isinstance(PlaceHolder_t ) )
     return;
-  UnicodeString word;
-  string tag;
+  UnicodeString uword;
   string pos;
   string token_class;
 #pragma omp critical(foliaupdate)
   {
-    word = sword->text();
+    uword = sword->text();
     pos = sword->pos();
     token_class = sword->cls();
-    tag = sword->annotation<PosAnnotation>( cgn_tagset )->feat("head");
   }
   if (debug)
-    *Log(mblemLog) << "Classify " << word << "(" << pos << ") ["
+    *Log(mblemLog) << "Classify " << uword << "(" << pos << ") ["
 		   << token_class << "]" << endl;
+
   if ( filter )
-    word = filter->filter( word );
-  if ( tag == "LET" ){
-    addLemma( sword, UnicodeToUTF8(word) );
+    uword = filter->filter( uword );
+
+  if ( token_class == "ABBREVIATION" ){
+    // We dont handle ABBREVIATION's so just take the word as such
+    string word = UnicodeToUTF8(uword);
+    addLemma( sword, word );
     return;
   }
-  else if ( tag == "SPEC" ){
-    if ( pos.find("eigen") != string::npos ){
-      // SPEC(deeleigen) might contain suffixes
-      if ( token_class == "QUOTE-SUFFIX" ){
-	addLemma( sword, UnicodeToUTF8(UnicodeString( word, 0, word.length()-1)));
-      }
-      else if ( token_class == "WORD-WITHSUFFIX" ){
-	addLemma( sword, UnicodeToUTF8(UnicodeString( word, 0, word.length()-2)));
-      }
-      else {
-	addLemma( sword, UnicodeToUTF8(word) );      return;
-      }
+  auto const& it1 = token_strip_map.find( pos );
+  if ( it1 != token_strip_map.end() ){
+    // some tag/tokenizer_class combinations are special
+    // we have to strip a few letters to get a lemma
+    auto const& it2 = it1->second.find( token_class );
+    if ( it2 != it1->second.end() ){
+      uword = UnicodeString( uword, 0, uword.length() - it2->second );
+      string word = UnicodeToUTF8(uword);
+      addLemma( sword, word );
+      return;
     }
-    else
-      addLemma( sword, UnicodeToUTF8(word) );
+  }
+  if ( one_one_tags.find(pos) != one_one_tags.end() ){
+    // some tags are just taken as such
+    string word = UnicodeToUTF8(uword);
+    addLemma( sword, word );
     return;
   }
-  if ( tag != "SPEC")
-    word.toLower();
-  Classify( word );
+  if ( !keep_case ){
+    uword.toLower();
+  }
+  Classify( uword );
   filterTag( pos );
   makeUnique();
-  getFoLiAResult( sword, word );
+  getFoLiAResult( sword, uword );
 }
 
 void Mblem::Classify( const UnicodeString& uWord ){
@@ -378,19 +371,23 @@ void Mblem::Classify( const UnicodeString& uWord ){
       UnicodeString insstr;
       UnicodeString delstr;
       UnicodeString prefix;
-      for ( size_t l=1; l < edits.size(); ++l ) {
-	switch ( edits[l][0] ){
+      for ( const auto& edit : edits ){
+	if ( edit == edits.front() ){
+	  continue;
+	}
+	switch ( edit[0] ){
 	case 'P':
-	  prefix = UTF8ToUnicode( edits[l].substr( 1 ) );
+	  prefix = UTF8ToUnicode( edit.substr( 1 ) );
 	  break;
 	case 'I':
-	  insstr = UTF8ToUnicode( edits[l].substr( 1 ) );
+	  insstr = UTF8ToUnicode( edit.substr( 1 ) );
 	  break;
 	case 'D':
-	  delstr =  UTF8ToUnicode( edits[l].substr( 1 ) );
+	  delstr =  UTF8ToUnicode( edit.substr( 1 ) );
 	  break;
 	default:
-	  *Log(mblemLog) << "Error: strange value in editstring: " << edits[l] << endl;
+	  *Log(mblemLog) << "Error: strange value in editstring: " << edit
+			 << endl;
 	}
       }
       if (debug){
@@ -453,7 +450,7 @@ void Mblem::Classify( const UnicodeString& uWord ){
     }
     if ( !classMap.empty() ){
       // translate TAG(number) stuf back to CGN things
-      map<string,string>::const_iterator it = classMap.find(restag);
+      auto const& it = classMap.find(restag);
       if ( debug )
 	*Log(mblemLog) << "looking up " << restag << endl;
       if ( it != classMap.end() ){
@@ -470,19 +467,20 @@ void Mblem::Classify( const UnicodeString& uWord ){
     mblemResult.push_back( mblemData( UnicodeToUTF8(lemma), restag ) );
   } // while
   if ( debug ) {
-    *Log(mblemLog) << "stored lemma and tag options: " << mblemResult.size() << " lemma's and " << mblemResult.size() << " tags:" << endl;
-    for( size_t index=0; index < mblemResult.size(); ++index ){
-      *Log(mblemLog) << "lemma alt: " << mblemResult[index].getLemma()
-		     << "\ttag alt: " << mblemResult[index].getTag() << endl;
+    *Log(mblemLog) << "stored lemma and tag options: " << mblemResult.size()
+		   << " lemma's and " << mblemResult.size() << " tags:" << endl;
+    for ( const auto& mbr : mblemResult ){
+      *Log(mblemLog) << "lemma alt: " << mbr.getLemma()
+		     << "\ttag alt: " << mbr.getTag() << endl;
     }
   }
 }
 
 vector<pair<string,string> > Mblem::getResult() const {
   vector<pair<string,string> > result;
-  for ( size_t i=0; i < mblemResult.size(); ++i ){
-    result.push_back( make_pair( mblemResult[i].getLemma(),
-				 mblemResult[i].getTag() ) );
+  for ( const auto& mbr : mblemResult ){
+    result.push_back( make_pair( mbr.getLemma(),
+				 mbr.getTag() ) );
   }
   return result;
 }
diff --git a/src/mblem_prog.cxx b/src/mblem_prog.cxx
index 4cf525c..a50fc43 100644
--- a/src/mblem_prog.cxx
+++ b/src/mblem_prog.cxx
@@ -1,13 +1,13 @@
+/* ex: set tabstop=8 expandtab: */
 /*
-  $Id:$
-  $URL:$
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
 
-  Copyright (c) 2006 - 2014
-  Tilburg University
+  This file is part of frog:
 
-  A Morphological-Analyzer for Dutch
-
-  This file is part of frog
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
 
   frog is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -23,11 +23,11 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
   For questions and suggestions, see:
-      http://ilk.uvt.nl/software.html
+      https://github.com/LanguageMachines/frog/issues
   or send mail to:
-      timbl at uvt.nl
-*/
+      lamasoftware (at ) science.ru.nl
 
+*/
 
 #include <string>
 #include <iostream>
@@ -37,9 +37,10 @@
 #include <map>
 
 #include "config.h"
-#include "timbl/TimblAPI.h"
 #include "ticcutils/LogStream.h"
 #include "ticcutils/Configuration.h"
+#include "ticcutils/CommandLine.h"
+#include "ticcutils/PrettyPrint.h"
 #include "libfolia/folia.h"
 #include "frog/ucto_tokenizer_mod.h"
 #include "frog/cgn_tagger_mod.h"
@@ -47,27 +48,30 @@
 
 using namespace std;
 using namespace Timbl;
+using namespace TiCC;
+using namespace Tagger;
 
 LogStream my_default_log( cerr, "", StampMessage ); // fall-back
 LogStream *theErrLog = &my_default_log;  // fill the externals
 
-string TestFileName;
-string ProgName;
-bool doAll = false;
+vector<string> fileNames;
+bool useTagger = true;
+bool useTokenizer = true;
 
 Configuration configuration;
 static string configDir = string(SYSCONF_PATH) + "/" + PACKAGE + "/";
 static string configFileName = configDir + "frog.cfg";
 
-static UctoTokenizer tokenizer;
-static CGNTagger tagger;
+static UctoTokenizer tokenizer(theErrLog);
+static CGNTagger tagger(theErrLog);
 
 void usage( ) {
   cout << endl << "mblem [options] testfile" << endl
        << "Options:n" << endl;
   cout << "\t============= INPUT MODE (mandatory, choose one) ========================\n"
        << "\t -t <testfile>    Run mblem on this file\n"
-       << "\t -a               give ALL result. Not just the chosen one(s)\n"
+       << "\t --notokenizer    Don't use a tokenizer, so assume all text is tokenized already.\n"
+       << "\t --notagger       Don't use a tagger to disambiguate, so give ALL variants.\n"
        << "\t -c <filename>    Set configuration file (default " << configFileName << ")\n"
        << "\t============= OTHER OPTIONS ============================================\n"
        << "\t -h. give some help.\n"
@@ -75,26 +79,20 @@ void usage( ) {
        << "\t -d <debug level>    (for more verbosity)\n";
 }
 
-static Mblem myMblem;
+static Mblem myMblem(theErrLog);
 
-bool parse_args( TimblOpts& Opts ) {
+bool parse_args( TiCC::CL_Options& Opts ) {
   cerr << "start " << Opts << endl;
-  string value;
-  bool mood;
-  if ( Opts.Find('V', value, mood ) ||
-       Opts.Find("version", value, mood ) ){
+  if ( Opts.is_present('V') || Opts.is_present("version" ) ){
     // we already did show what we wanted.
     exit( EXIT_SUCCESS );
   }
-  if ( Opts.Find ('h', value, mood)) {
+  if ( Opts.is_present ('h') ) {
     usage();
     exit( EXIT_SUCCESS );
   };
   // is a config file specified?
-  if ( Opts.Find( 'c',  value, mood ) ) {
-    configFileName = value;
-    Opts.Delete( 'c' );
-  };
+  Opts.extract( 'c', configFileName );
 
   if ( configuration.fill( configFileName ) ){
     cerr << "config read from: " << configFileName << endl;
@@ -106,38 +104,29 @@ bool parse_args( TimblOpts& Opts ) {
   }
 
   // debug opts
-  if ( Opts.Find ('d', value, mood)) {
+  string value;
+  if ( Opts.extract( 'd', value ) ) {
     int debug = 0;
     if ( !TiCC::stringTo<int>( value, debug ) ){
       cerr << "-d value should be an integer" << endl;
       return false;
     }
     configuration.setatt( "debug", value, "mblem" );
-    Opts.Delete('d');
   };
 
-  if ( Opts.Find( 't', value, mood )) {
-    TestFileName = value;
-    ifstream is( value.c_str() );
+  if ( Opts.extract( 't', value ) ){
+    ifstream is( value );
     if ( !is ){
       cerr << "input stream " << value << " is not readable" << endl;
       return false;
     }
-    Opts.Delete('t');
+    fileNames.push_back( value );
   }
-  else if ( Opts.Find( '?', value, mood )) {
-    TestFileName = value;
-    ifstream is( value.c_str() );
-    if ( !is ){
-      cerr << "input stream " << value << " is not readable" << endl;
-      return false;
-    }
-    Opts.Delete('?');
-  };
-  if ( Opts.Find( 'a', value, mood )) {
-    doAll = true;
-    Opts.Delete('t');
+  else {
+    fileNames = Opts.getMassOpts();
   };
+  useTagger = !Opts.is_present( "notagger" );
+  useTokenizer = !Opts.is_present( "notokenizer" );
   return true;
 }
 
@@ -149,13 +138,17 @@ bool init(){
     cerr << "MBLEM Initialization failed." << endl;
     return false;
   }
-  if ( !tokenizer.init( configuration, "", false ) ){
-    cerr << "UCTO Initialization failed." << endl;
-    return false;
+  if ( useTokenizer ){
+    if ( !tokenizer.init( configuration ) ){
+      cerr << "UCTO Initialization failed." << endl;
+      return false;
+    }
   }
-  if ( !tagger.init( configuration ) ){
-    cerr << "CGN Initialization failed." << endl;
-    return false;
+  if ( useTagger ){
+    if ( !tagger.init( configuration ) ){
+      cerr << "Tagger Initialization failed." << endl;
+      return false;
+    }
   }
   cerr << "Initialization done." << endl;
   return true;
@@ -164,22 +157,43 @@ bool init(){
 void Test( istream& in ){
   string line;
   while ( getline( in, line ) ){
-    vector<string> sentences = tokenizer.tokenize( line );
-    for ( size_t s=0; s < sentences.size(); ++s ){
-      vector<TagResult> tagv = tagger.tagLine(sentences[s]);
-      for ( size_t w=0; w < tagv.size(); ++w ){
-	UnicodeString uWord = folia::UTF8ToUnicode(tagv[w].word());
-	myMblem.Classify( uWord );
-	if ( !doAll )
-	  myMblem.filterTag( tagv[w].assignedTag() );
-	vector<pair<string,string> > res = myMblem.getResult();
-	cout << tagv[w].word() << " {" << tagv[w].assignedTag() << "}\t";
-	for ( size_t i=0; i < res.size(); ++i ){
-	  cout << res[i].first << "[" << res[i].second << "]";
-	  if ( i < res.size()-1 )
-	    cout << "/";
+    vector<string> sentences;
+    if ( useTokenizer ){
+      sentences = tokenizer.tokenize( line );
+    }
+    else {
+      sentences.push_back( line );
+    }
+    for ( auto const& s : sentences ){
+      if ( useTagger ){
+	vector<TagResult> tagrv = tagger.tagLine( s );
+	for ( const auto& tr : tagrv ){
+	  UnicodeString uWord = folia::UTF8ToUnicode(tr.word());
+	  myMblem.Classify( uWord );
+	  myMblem.filterTag( tr.assignedTag() );
+	  vector<pair<string,string> > res = myMblem.getResult();
+	  string line = tr.word() + " {" + tr.assignedTag() + "}\t";
+	  for ( const auto& p : res ){
+	    line += p.first + "[" + p.second + "]/";
+	  }
+	  line.erase(line.length()-1);
+	  cout << line << endl;
+	}
+      }
+      else {
+	vector<string> parts;
+	TiCC::split( s, parts );
+	for ( const auto& w : parts ){
+	  UnicodeString uWord = folia::UTF8ToUnicode(w);
+	  myMblem.Classify( uWord );
+	  vector<pair<string,string> > res = myMblem.getResult();
+	  string line = w + "\t";
+	  for ( const auto& p : res ){
+	    line += p.first + "[" + p.second + "]/";
+	  }
+	  line.erase(line.length()-1);
+	  cout << line << endl;
 	}
-	cout << endl;
       }
       cout << "<utt>" << endl << endl;
     }
@@ -191,33 +205,38 @@ void Test( istream& in ){
 
 int main(int argc, char *argv[]) {
   std::ios_base::sync_with_stdio(false);
-  cerr << "mblem " << VERSION << " (c) ILK 1998 - 2014" << endl;
-  cerr << "Induction of Linguistic Knowledge Research Group, Tilburg University" << endl;
-  ProgName = argv[0];
+  cerr << "mblem " << VERSION << " (c) CLTS, ILK 2014 - 2016" << endl;
+  cerr << "CLST  - Centre for Language and Speech Technology,"
+       << "Radboud University" << endl
+       << "ILK   - Induction of Linguistic Knowledge Research Group,"
+       << "Tilburg University" << endl;
+  TiCC::CL_Options Opts("c:t:hVd:", "version,notagger,notokenizer");
+  try {
+    Opts.init(argc, argv);
+  }
+  catch ( const exception& e ){
+    cerr << "fatal error: " << e.what() << endl;
+    return EXIT_FAILURE;
+  }
   cerr << "based on [" << Timbl::VersionName() << "]" << endl;
   cerr << "configdir: " << configDir << endl;
-  try {
-    TimblOpts Opts(argc, argv);
-    if ( parse_args(Opts) ){
-      if (  !init() ){
-	cerr << "terminated." << endl;
-	return EXIT_FAILURE;
-      }
-      ifstream in(TestFileName.c_str() );
+  if ( parse_args(Opts) ){
+    if (  !init() ){
+      cerr << "terminated." << endl;
+      return EXIT_FAILURE;
+    }
+    for ( const auto& TestFileName : fileNames ){
+      ifstream in(TestFileName);
       if ( in.good() ){
 	Test( in );
       }
       else {
 	cerr << "unable to open: " << TestFileName << endl;
-	return EXIT_FAILURE;
+	continue;
       }
     }
-    else {
-      return EXIT_FAILURE;
-    }
   }
-  catch ( const exception& e ){
-    cerr << "fatal error: " << e.what() << endl;
+  else {
     return EXIT_FAILURE;
   }
   return EXIT_SUCCESS;
diff --git a/src/mbma_brackets.cxx b/src/mbma_brackets.cxx
new file mode 100644
index 0000000..48b7943
--- /dev/null
+++ b/src/mbma_brackets.cxx
@@ -0,0 +1,1077 @@
+/* ex: set tabstop=8 expandtab: */
+/*
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
+
+  This file is part of frog:
+
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
+
+  frog 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.
+
+  frog 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/>.
+
+  For questions and suggestions, see:
+      https://github.com/LanguageMachines/frog/issues
+  or send mail to:
+      lamasoftware (at ) science.ru.nl
+
+*/
+
+#include <string>
+#include <vector>
+#include <list>
+#include <iostream>
+#include "ucto/unicode.h"
+#include "ticcutils/Configuration.h"
+#include "ticcutils/LogStream.h"
+#include "ticcutils/StringOps.h"
+#include "ticcutils/PrettyPrint.h"
+#include "libfolia/folia.h"
+#include "frog/clex.h"
+#include "frog/mbma_rule.h"
+#include "frog/mbma_mod.h"
+#include "frog/mbma_brackets.h"
+
+using namespace std;
+using namespace TiCC;
+using namespace folia;
+
+string toString( const Compound::Type& ct ){
+  switch ( ct ){
+  case Compound::Type::NN:
+    return "NN";
+  case Compound::Type::NA:
+    return "NA";
+  case Compound::Type::NB:
+    return "NB";
+  case Compound::Type::NP:
+    return "NP";
+  case Compound::Type::NV:
+    return "NV";
+  case Compound::Type::AN:
+    return "AN";
+  case Compound::Type::AA:
+    return "AA";
+  case Compound::Type::AB:
+    return "AB";
+  case Compound::Type::AP:
+    return "AP";
+  case Compound::Type::AV:
+    return "AV";
+  case Compound::Type::BN:
+    return "BN";
+  case Compound::Type::BA:
+    return "BA";
+  case Compound::Type::BB:
+    return "BB";
+  case Compound::Type::BP:
+    return "BP";
+  case Compound::Type::BV:
+    return "BV";
+  case Compound::Type::PN:
+    return "PN";
+  case Compound::Type::PA:
+    return "PA";
+  case Compound::Type::PB:
+    return "PB";
+  case Compound::Type::PP:
+    return "PP";
+  case Compound::Type::PV:
+    return "PV";
+  case Compound::Type::VN:
+    return "VN";
+  case Compound::Type::VA:
+    return "VA";
+  case Compound::Type::VB:
+    return "VB";
+  case Compound::Type::VP:
+    return "VP";
+  case Compound::Type::VV:
+    return "VV";
+  case Compound::Type::NONE:
+    return "none";
+  }
+  return "DEADLY";
+}
+
+ostream& operator<<( ostream& os, const Compound::Type& ct ){
+  os << toString( ct );
+  return os;
+}
+
+string toString( const Status& st ){
+  switch ( st ){
+  case Status::INFO:
+    return "info";
+  case Status::STEM:
+    return "stem";
+  case Status::PARTICLE:
+    return "particle";
+  case Status::PARTICIPLE:
+    return "participle";
+  case Status::COMPLEX:
+    return "complex";
+  case Status::INFLECTION:
+    return "inflection";
+  case Status::DERIVATIONAL:
+    return "derivational";
+  case Status::FAILED:
+    return "failed";
+  default:
+    return "nostat";
+  }
+}
+
+ostream& operator<<( ostream& os, const Status& st ){
+  os << toString( st );
+  return os;
+}
+
+BracketLeaf::BracketLeaf( const RulePart& p, int flag ):
+  BaseBracket(p.ResultClass, p.RightHand, flag),
+  morph(p.morpheme )
+{
+  ifpos = -1;
+  if ( !p.inflect.empty() ){
+    inflect = p.inflect;
+    if ( p.ResultClass == CLEX::UNASS ){
+      _status = Status::INFLECTION;
+    }
+    else {
+      _status = Status::INFO;
+    }
+  }
+  else if ( RightHand.size() == 0 ){
+    orig = toString( cls );
+    if ( ( p.ResultClass == CLEX::N
+	   || p.ResultClass == CLEX::V
+	   || p.ResultClass == CLEX::A )
+	 &&
+	 ( morph == "be" || morph == "ge" || morph == "ver" || morph == "ex" ) ){
+      _status = Status::PARTICLE;
+    }
+    else {
+      _status = Status::STEM;
+    }
+  }
+  else {
+    orig = toString( cls );
+    orig += "_";
+    for ( size_t i = 0; i < RightHand.size(); ++i ){
+      orig += toString(RightHand[i]);
+      if ( RightHand[i] == CLEX::AFFIX ){
+	ifpos = i;
+      }
+    }
+    if ( morph == "be" || morph == "ge" || morph == "ver" || morph == "ex" ){
+      _status = Status::PARTICIPLE;
+    }
+    else {
+      _status = Status::DERIVATIONAL;
+    }
+  }
+}
+
+BracketLeaf::BracketLeaf( CLEX::Type t, const UnicodeString& us, int flag ):
+  BaseBracket( t, vector<CLEX::Type>(), flag ),
+  morph( us )
+{
+  ifpos = -1;
+  orig = toString( t );
+  _status = Status::STEM;
+}
+
+BracketNest::BracketNest( CLEX::Type t,
+			  Compound::Type c,
+			  int flag ): BaseBracket( t, flag ){
+  _status = Status::COMPLEX;
+  _compound = c;
+}
+
+BaseBracket *BracketNest::append( BaseBracket *t ){
+  parts.push_back( t );
+  return this;
+}
+
+BracketNest::~BracketNest(){
+  for ( auto const& it : parts ){
+    delete it;
+  }
+}
+
+UnicodeString BaseBracket::put( bool full ) const {
+  UnicodeString result = "[err?]";
+  if ( full ){
+    UnicodeString s = UTF8ToUnicode(toString(cls));
+    result += s;
+  }
+  return result;
+}
+
+UnicodeString BracketLeaf::put( bool full ) const {
+  UnicodeString result;
+  if ( !morph.isEmpty() ){
+    result += "[";
+    result += morph;
+    result += "]";
+  }
+  if ( full ){
+    if ( orig.empty() ){
+      result += UTF8ToUnicode(inflect);
+    }
+    else {
+      result += UTF8ToUnicode(orig);
+    }
+  }
+  return result;
+}
+
+UnicodeString BracketNest::put( bool full ) const {
+  UnicodeString result = "[ ";
+  for ( auto const& it : parts ){
+    UnicodeString m = it->put( full );
+    if ( !m.isEmpty() ){
+      result +=  m + " ";
+    }
+  }
+  result += "]";
+  if ( full ){
+    if ( cls != CLEX::UNASS ){
+      result += UTF8ToUnicode(toString(cls));
+    }
+    if ( _compound != Compound::Type::NONE ){
+      result += " " + UTF8ToUnicode(toString(_compound)) + "-compound";
+    }
+  }
+  return result;
+}
+
+ostream& operator<< ( ostream& os, const BaseBracket& c ){
+  os << c.put();
+  return os;
+}
+
+ostream& operator<< ( ostream& os, const BaseBracket *c ){
+  if ( c ){
+    os << c->put();
+  }
+  else {
+    os << "[EMPTY]";
+  }
+  return os;
+}
+
+void prettyP( ostream& os, const list<BaseBracket*>& v ){
+  os << "[";
+  for ( auto const& it : v ){
+    os << it << " ";
+  }
+  os << "]";
+}
+
+bool BracketNest::testMatch( list<BaseBracket*>& result,
+			     const list<BaseBracket*>::iterator& rpos,
+			     list<BaseBracket*>::iterator& bpos ){
+  if ( debugFlag > 5 ){
+    cerr << "test MATCH " << endl;
+  }
+  bpos = result.end();
+  size_t len = (*rpos)->RightHand.size();
+  if ( len == 0 || len > result.size() ){
+    if ( debugFlag > 5 ){
+      cerr << "test MATCH FAIL (no RHS or RHS > result)" << endl;
+    }
+    return false;
+  }
+  size_t fpos = (*rpos)->infixpos();
+  if ( debugFlag > 5 ){
+    cerr << "test MATCH, fpos=" << fpos << " en len=" << len << endl;
+  }
+  list<BaseBracket*>::iterator it = rpos;
+  while ( fpos > 0 ){
+    --fpos;
+    --it;
+  }
+  size_t j = 0;
+  bpos = it;
+  for (; j < len && it != result.end(); ++j, ++it ){
+    if ( debugFlag > 5 ){
+      cerr << "test MATCH vergelijk " << *it << " met " << (*rpos)->RightHand[j] << endl;
+    }
+    if ( (*rpos)->RightHand[j] == CLEX::XAFFIX){
+      continue;
+    }
+    else if ( (*rpos)->RightHand[j] == CLEX::AFFIX){
+      continue;
+    }
+    else if ( (*rpos)->RightHand[j] != (*it)->tag() ){
+      if ( debugFlag > 5 ){
+	cerr << "test MATCH FAIL (" << (*rpos)->RightHand[j]
+	     << " != " << (*it)->tag() << ")" << endl;
+      }
+      (*rpos)->set_status(Status::FAILED);
+      bpos = it;
+      return false;
+    }
+  }
+  if ( j < len ){
+    if ( debugFlag > 5 ){
+      cerr << "test MATCH FAIL (j < len)" << endl;
+    }
+    bpos = result.end();
+    return false;
+  }
+  if ( debugFlag > 5 ){
+    cerr << "test MATCH OK" << endl;
+  }
+  return true;
+}
+
+Compound::Type construct( const CLEX::Type tag1, const CLEX::Type tag2 ){
+  Compound::Type compound = Compound::Type::NONE;
+  switch ( tag1 ){
+  case CLEX::N:
+    switch( tag2 ){
+    case CLEX::N: compound = Compound::Type::NN;
+      break;
+    case CLEX::A: compound = Compound::Type::NA;
+      break;
+    case CLEX::B: compound = Compound::Type::NB;
+      break;
+    case CLEX::P: compound = Compound::Type::NP;
+      break;
+    case CLEX::V: compound = Compound::Type::NV;
+      break;
+    default:
+      break;
+    }
+    break;
+  case CLEX::A:
+    switch( tag2 ){
+    case CLEX::N: compound = Compound::Type::AN;
+      break;
+    case CLEX::A: compound = Compound::Type::AA;
+      break;
+    case CLEX::B: compound = Compound::Type::AB;
+      break;
+    case CLEX::P: compound = Compound::Type::AP;
+      break;
+    case CLEX::V: compound = Compound::Type::AV;
+      break;
+    default:
+      break;
+    }
+    break;
+  case CLEX::B:
+    switch( tag2 ){
+    case CLEX::N: compound = Compound::Type::BN;
+      break;
+    case CLEX::A: compound = Compound::Type::BA;
+      break;
+    case CLEX::B: compound = Compound::Type::BB;
+      break;
+    case CLEX::P: compound = Compound::Type::BP;
+      break;
+    case CLEX::V: compound = Compound::Type::BV;
+      break;
+    default:
+      break;
+    }
+    break;
+  case CLEX::P:
+    switch( tag2 ){
+    case CLEX::N: compound = Compound::Type::PN;
+      break;
+    case CLEX::A: compound = Compound::Type::PA;
+      break;
+    case CLEX::B: compound = Compound::Type::PB;
+      break;
+    case CLEX::P: compound = Compound::Type::PP;
+      break;
+    case CLEX::V: compound = Compound::Type::PV;
+      break;
+    default:
+      break;
+    }
+    break;
+  case CLEX::V:
+    switch( tag2 ){
+    case CLEX::N: compound = Compound::Type::VN;
+      break;
+    case CLEX::A: compound = Compound::Type::VA;
+      break;
+    case CLEX::B: compound = Compound::Type::VB;
+      break;
+    case CLEX::P: compound = Compound::Type::VP;
+      break;
+    case CLEX::V: compound = Compound::Type::VV;
+      break;
+    default:
+      break;
+    }
+    break;
+  default:
+    break;
+  }
+  return compound;
+}
+
+Compound::Type BracketNest::getCompoundType(){
+  if ( debugFlag > 5 ){
+    cerr << "get compoundType: " << this << endl;
+    cerr << "#parts: " << parts.size() << endl;
+  }
+  Compound::Type compound = Compound::Type::NONE;
+  if ( parts.size() == 1 ){
+    auto part = *parts.begin();
+    compound = part->getCompoundType();
+  }
+  else if ( parts.size() == 2 ){
+    auto it = parts.begin();
+    CLEX::Type tag1 = (*it)->tag();
+    Compound::Type cp1 = (*it)->compound();
+    Status st1 = (*it)->status();
+    CLEX::Type tag2 = (*++it)->tag();
+    Compound::Type cp2 = (*it)->compound();
+    Status st2 = (*it)->status();
+    if ( debugFlag > 5 ){
+      cerr << "tag1 :" << tag1 << " stat1: " << st1 << " cp1: " << cp1 << endl;
+      cerr << "tag2 :" << tag2 << " stat2: " << st2 << " cp2: " << cp2 << endl;
+    }
+    if ( st1 != Status::FAILED
+	 && st2 != Status::FAILED ){
+      if ( tag1 == CLEX::N
+	   && st1 != Status::PARTICLE
+	   && st1 != Status::PARTICIPLE ){
+	if ( st2 == Status::STEM ){
+	  compound = construct( tag1, tag2 );
+	}
+	else if ( st2 == Status::DERIVATIONAL
+		  || st2 == Status::INFO
+		  || st2 == Status::INFLECTION ){
+	  compound = cp1;
+	}
+      }
+      else if ( tag1 == CLEX::A
+		&& st1 != Status::PARTICLE
+		&& st1 != Status::PARTICIPLE ){
+	if ( st2 == Status::STEM ){
+	  compound = construct( tag1, tag2 );
+	}
+	else if ( st2 == Status::DERIVATIONAL
+		  || st2 == Status::INFO
+		  || st2 == Status::INFLECTION ){
+	  compound = cp1;
+	}
+      }
+      else if ( tag1 == CLEX::B ){
+	if ( st2 == Status::STEM ){
+	  compound = construct( tag1, tag2 );
+	}
+      }
+      else if ( tag1 == CLEX::P ){
+	if ( st2 == Status::STEM ){
+	  compound = construct( tag1, tag2 );
+	}
+	else if ( tag2 == CLEX::NEUTRAL || tag2 == CLEX::UNASS ){
+	  compound = cp1;
+	}
+      }
+      else if ( tag1 == CLEX::V
+		&& st1 != Status::PARTICLE
+		&& st1 != Status::PARTICIPLE ){
+	if ( st1 == Status::DERIVATIONAL ){
+	  compound = cp2;
+	}
+	else if ( st2 == Status::STEM ){
+	  compound = construct( tag1, tag2 );
+	}
+      }
+    }
+  }
+  else if ( parts.size() > 2 ){
+    auto it = parts.begin();
+    Compound::Type cp1 = (*it)->compound();
+    CLEX::Type tag1 = (*it)->tag();
+    Status st1 = (*it)->status();
+    CLEX::Type tag2 = (*++it)->tag();
+    Status st2 = (*it)->status();
+    CLEX::Type tag3 = (*++it)->tag();
+    Status st3 = (*it)->status();
+    if ( debugFlag > 5 ){
+      cerr << "tag1 :" << tag1 << " stat1: " << st1 << endl;
+      cerr << "tag2 :" << tag2 << " stat2: " << st2 << endl;
+      cerr << "tag3 :" << tag3 << " stat3: " << st3 << endl;
+    }
+    if ( st1 != Status::FAILED
+	 && st2 != Status::FAILED
+	 && st3 != Status::FAILED
+	 && st1 != Status::PARTICLE
+	 && st1 != Status::PARTICIPLE ){
+      if ( tag1 == CLEX::N ){
+	if ( st2 == Status::STEM &&
+	     ( st3 == Status::INFLECTION || tag3 == CLEX::NEUTRAL ) ){
+	  compound = construct( tag1, tag2 );
+	}
+	else if ( st1 == Status::STEM || st1 == Status::COMPLEX ){
+	  if ( (tag2 == CLEX::N &&
+		( st2 == Status::STEM || st2 == Status::COMPLEX ) )
+	       && (tag3 == CLEX::NEUTRAL || st3 == Status::INFLECTION ) ) {
+	    compound = Compound::Type::NN;
+	  }
+	  else if ( ( tag2 == CLEX::A &&
+		      ( st2 == Status::STEM || st2 == Status::COMPLEX ) )
+		    && ( tag3 == CLEX::A && st3 == Status::DERIVATIONAL ) ){
+	    compound = Compound::Type::NA;
+	  }
+	  else if ( st2 == Status::DERIVATIONAL && tag3 == CLEX::NEUTRAL ){
+	    compound = cp1;
+	  }
+	  else if ( st2 == Status::DERIVATIONAL && tag3 == CLEX::N ){
+	    compound = Compound::Type::NN;
+	  }
+	}
+	else {
+	  if ( tag2 == CLEX::N && tag3 == CLEX::N ){
+	    compound = Compound::Type::NN;
+	  }
+	}
+      }
+      else if ( tag1 == CLEX::A ){
+	if ( st2 == Status::STEM &&
+	     ( st3 == Status::INFLECTION || tag3 == CLEX::NEUTRAL ) ){
+	  compound = construct( tag1, tag2 );
+	}
+	else if ( st1 == Status::STEM || st1 == Status::COMPLEX ){
+	  if ( tag2 == CLEX::N
+	       && ( tag3 == CLEX::NEUTRAL ||  tag3 == CLEX::UNASS ) ){
+	    compound = Compound::Type::AN;
+	  }
+	  else if ( tag2 == CLEX::A
+		    && ( tag3 == CLEX::NEUTRAL ||  tag3 == CLEX::UNASS ) ){
+	    compound = Compound::Type::AA;
+	  }
+	  else if ( st2 == Status::INFLECTION && st3 == Status::INFLECTION ){
+	    compound = cp1;
+	  }
+	}
+      }
+      else if ( tag1 == CLEX::P ){
+	if ( st2 == Status::STEM &&
+	     ( st3 == Status::INFLECTION || tag3 == CLEX::NEUTRAL ) ){
+	  compound = construct( tag1, tag2 );
+	}
+	else if ( tag3 == CLEX::NEUTRAL ){
+	  compound = construct( tag1, tag2 );
+	}
+	else if ( st3 == Status::DERIVATIONAL ){
+	  compound = construct( tag1, tag3 );
+	}
+      }
+      else if ( tag1 == CLEX::B && st1 == Status::STEM ){
+      	if ( st2 == Status::STEM &&
+	     ( st3 == Status::INFLECTION || tag3 == CLEX::NEUTRAL ) ){
+	  compound = construct( tag1, tag2 );
+	}
+      }
+      else if ( tag1 == CLEX::V ){
+      	if ( st2 == Status::STEM &&
+	     ( st3 == Status::INFLECTION || tag3 == CLEX::NEUTRAL ) ){
+	  compound = construct( tag1, tag2 );
+	}
+      }
+    }
+  }
+  if ( debugFlag > 5 ){
+    cerr << "   ASSIGNED :" << compound << endl;
+  }
+  _compound = compound;
+  return compound;
+}
+
+Morpheme *BracketLeaf::createMorpheme( Document *doc ) const {
+  string desc;
+  int cnt = 0;
+  return createMorpheme( doc, desc, cnt );
+}
+
+Morpheme *BracketLeaf::createMorpheme( Document *doc,
+				       string& desc,
+				       int& cnt ) const {
+  Morpheme *result = 0;
+  desc.clear();
+  if ( _status == Status::COMPLEX ){
+    abort();
+  }
+  if ( _status == Status::STEM ){
+    KWargs args;
+    args["set"] = Mbma::mbma_tagset;
+    args["class"] = "stem";
+    result = new Morpheme( args, doc );
+    args.clear();
+    string out = UnicodeToUTF8(morph);
+    if ( out.empty() ){
+      throw logic_error( "stem has empty morpheme" );
+    }
+    args["value"] = out;
+    TextContent *t = new TextContent( args );
+#pragma omp critical(foliaupdate)
+    {
+      result->append( t );
+    }
+    ++cnt;
+    args.clear();
+    args["set"] = Mbma::clex_tagset;
+    args["class"] = toString( tag() );
+#pragma omp critical(foliaupdate)
+    {
+      result->addPosAnnotation( args );
+    }
+    desc = "[" + out + "]" + CLEX::get_tDescr( tag() ); // spread the word upwards!
+  }
+  if ( _status == Status::PARTICLE ){
+    KWargs args;
+    args["set"] = Mbma::mbma_tagset;
+    args["class"] = "particle";
+    result = new Morpheme( args, doc );
+    args.clear();
+    string out = UnicodeToUTF8(morph);
+    if ( out.empty() ){
+      throw logic_error( "particle has empty morpheme" );
+    }
+    args["value"] = out;
+    TextContent *t = new TextContent( args );
+#pragma omp critical(foliaupdate)
+    {
+      result->append( t );
+    }
+    ++cnt;
+    args.clear();
+    args["set"] = Mbma::clex_tagset;
+    args["class"] = toString( tag() );
+#pragma omp critical(foliaupdate)
+    {
+      result->addPosAnnotation( args );
+    }
+    desc = "[" + out + "]"; // spread the word upwards! maybe add 'part' ??
+  }
+  else if ( _status == Status::INFLECTION ){
+    KWargs args;
+    args["class"] = "affix";
+    args["set"] = Mbma::mbma_tagset;
+    result = new Morpheme( args, doc );
+    args.clear();
+    string out = UnicodeToUTF8(morph);
+    if ( out.empty() ){
+      out = inflect;
+    }
+    else {
+      desc = "[" + out + "]";
+    }
+    if ( out.empty() ){
+      throw logic_error( "Inflection and morpheme empty" );
+    }
+    args["value"] = out;
+    TextContent *t = new TextContent( args );
+#pragma omp critical(foliaupdate)
+    {
+      result->append( t );
+    }
+    ++cnt;
+    args.clear();
+    args["subset"] = "inflection";
+    for ( const auto& inf : inflect ){
+      if ( inf != '/' ){
+	string d = CLEX::get_iDescr(inf);
+	args["class"] = d;
+	desc += "/" + d;
+	folia::Feature *feat = new folia::Feature( args );
+#pragma omp critical(foliaupdate)
+	{
+	  result->append( feat );
+	}
+      }
+    }
+  }
+  else if ( _status == Status::DERIVATIONAL
+	    || _status == Status::PARTICIPLE
+	    || _status == Status::FAILED ){
+    KWargs args;
+    args["class"] = "derivational";
+    args["set"] = Mbma::mbma_tagset;
+    result = new Morpheme( args, doc );
+    args.clear();
+    string out = UnicodeToUTF8(morph);
+    if ( out.empty() ){
+      cerr << "problem: " << this << endl;
+      throw logic_error( "Derivation with empty morpheme" );
+    }
+    args["value"] = out;
+    TextContent *t = new TextContent( args );
+#pragma omp critical(foliaupdate)
+    {
+      result->append( t );
+    }
+    ++cnt;
+    desc = "[" + out + "]"; // pass it up!
+    // if ( _status == Status::PARTICIPLE )
+    //   desc += "part";
+    for ( const auto& inf : inflect ){
+      if ( inf != '/' ){
+	string d = CLEX::get_iDescr( inf );
+	desc += "/" + d;
+      }
+    }
+    args.clear();
+    args["subset"] = "structure";
+    args["class"]  = desc;
+#pragma omp critical(foliaupdate)
+    {
+      folia::Feature *feat = new folia::Feature( args );
+      result->append( feat );
+    }
+    args.clear();
+    args["set"] = Mbma::clex_tagset;
+    args["class"] = orig;
+#pragma omp critical(foliaupdate)
+    {
+      result->addPosAnnotation( args );
+    }
+  }
+  else if ( _status == Status::INFO ){
+    KWargs args;
+    args["class"] = "inflection";
+    args["set"] = Mbma::mbma_tagset;
+    result = new Morpheme( args, doc );
+    args.clear();
+    args["subset"] = "inflection";
+    for ( const auto& inf : inflect ){
+      if ( inf != '/' ){
+	string d = CLEX::get_iDescr( inf );
+	desc += "/" + d;
+	args["class"] = d;
+	folia::Feature *feat = new folia::Feature( args );
+#pragma omp critical(foliaupdate)
+	{
+	  result->append( feat );
+	}
+      }
+    }
+  }
+  return result;
+}
+
+Morpheme *BracketNest::createMorpheme( Document *doc ) const {
+  string desc;
+  int cnt = 0;
+  return createMorpheme( doc, desc, cnt );
+}
+
+Morpheme *BracketNest::createMorpheme( Document *doc,
+				       string& desc,
+				       int& cnt ) const {
+  KWargs args;
+  args["class"] = "complex";
+  args["set"] = Mbma::mbma_tagset;
+  Morpheme *result = new Morpheme( args, doc );
+  string mor;
+  cnt = 0;
+  desc.clear();
+  vector<Morpheme*> stack;
+  for ( auto const& it : parts ){
+    string deeper_desc;
+    int deep_cnt = 0;
+    Morpheme *m = it->createMorpheme( doc,
+				      deeper_desc,
+				      deep_cnt );
+    if ( m ){
+      desc += deeper_desc;
+      cnt += deep_cnt;
+      stack.push_back( m );
+    }
+  }
+  if ( cnt > 1 ){
+    desc = "[" + desc + "]" + CLEX::get_tDescr( tag() );
+  }
+  cnt = 1;
+  args.clear();
+  args["subset"] = "structure";
+  args["class"]  = desc;
+#pragma omp critical(foliaupdate)
+  {
+    folia::Feature *feat = new folia::Feature( args );
+    result->append( feat );
+  }
+  args.clear();
+  args["set"] = Mbma::clex_tagset;
+  args["class"] = toString( tag() );
+  PosAnnotation *pos = 0;
+#pragma omp critical(foliaupdate)
+  {
+    pos = result->addPosAnnotation( args );
+  }
+  Compound::Type ct = compound();
+  if ( ct != Compound::Type::NONE ){
+    args.clear();
+    args["subset"] = "compound";
+    args["class"]  = toString(ct);
+#pragma omp critical(foliaupdate)
+    {
+      folia::Feature *feat = new folia::Feature( args );
+      pos->append( feat );
+    }
+  }
+#pragma omp critical(foliaupdate)
+  for ( const auto& s : stack ){
+    result->append( s );
+  }
+  return result;
+}
+
+list<BaseBracket*>::iterator BracketNest::resolveAffix( list<BaseBracket*>& result,
+							const list<BaseBracket*>::iterator& rpos ){
+  if ( debugFlag > 5 ){
+    cerr << "resolve affix" << endl;
+  }
+  list<BaseBracket*>::iterator bit;
+  bool matched = testMatch( result, rpos, bit );
+  if ( matched ){
+    if ( debugFlag > 5 ){
+      cerr << "OK een match" << endl;
+    }
+    size_t len = (*rpos)->RightHand.size();
+    if ( len == result.size() ){
+      // the rule matches exact what we have.
+      // leave it
+      list<BaseBracket*>::iterator it = rpos;
+      return ++it;
+    }
+    else {
+      list<BaseBracket*>::iterator it = bit--;
+      BracketNest *tmp
+	= new BracketNest( (*rpos)->tag(), Compound::Type::NONE, debugFlag );
+      for ( size_t j = 0; j < len; ++j ){
+	tmp->append( *it );
+	if ( debugFlag > 5 ){
+	  cerr << "erase " << *it << endl;
+	}
+	it = result.erase(it);
+      }
+      if ( debugFlag > 5 ){
+	cerr << "new node:" << tmp << endl;
+      }
+      _compound = tmp->getCompoundType();
+      result.insert( ++bit, tmp );
+      return bit;
+    }
+  }
+  else {
+    // the affix derivation failed.
+    // we should try to start at the next node
+    bit = rpos;
+    return ++bit;
+  }
+}
+
+void BracketNest::resolveNouns( ){
+  if ( debugFlag > 5 ){
+    cerr << "resolve NOUNS in:" << this << endl;
+  }
+  list<BaseBracket*>::iterator it = parts.begin();
+  list<BaseBracket*>::iterator prev = it++;
+  while ( it != parts.end() ){
+    if ( (*prev)->tag() == CLEX::N && (*prev)->RightHand.size() == 0
+	 && ( (*it)->tag() == CLEX::N && (*it)->status() == Status::STEM )
+	 && (*it)->RightHand.size() == 0 ){
+      BaseBracket *tmp
+	= new BracketNest( CLEX::N, Compound::Type::NN, debugFlag );
+      tmp->append( *prev );
+      tmp->append( *it );
+      if ( debugFlag > 5 ){
+	cerr << "current result:" << parts << endl;
+	cerr << "new node:" << tmp << endl;
+	cerr << "erase " << *prev << endl;
+      }
+      prev = parts.erase(prev);
+      if ( debugFlag > 5 ){
+	cerr << "erase " << *prev << endl;
+      }
+      prev = parts.erase(prev);
+      prev = parts.insert( prev, tmp );
+      if ( debugFlag > 5 ){
+	cerr << "current result:" << parts << endl;
+      }
+      it = prev;
+      ++it;
+    }
+    else {
+      prev = it++;
+    }
+  }
+  if ( debugFlag > 5 ){
+    cerr << "resolve NOUNS result:" << this << endl;
+  }
+}
+
+void BracketNest::resolveLead( ){
+  list<BaseBracket*>::iterator it = parts.begin();
+  while ( it != parts.end() ){
+    // search for rules with a * at the begin
+    if ( debugFlag > 5 ){
+      cerr << "search leading *: bekijk: " << *it << endl;
+    }
+    if ( (*it)->isNested() ){
+      if ( debugFlag > 5 ){
+	cerr << "nested! " << endl;
+      }
+      (*it)->resolveLead();
+      ++it;
+    }
+    else {
+      if ( (*it)->infixpos() == 0 ){
+	it = resolveAffix( parts, it );
+      }
+      else {
+	++it;
+      }
+    }
+  }
+}
+
+void BracketNest::resolveTail(){
+  list<BaseBracket *>::iterator it = parts.begin();
+  while ( it != parts.end() ){
+    // search for rules with a * at the end
+    if ( debugFlag > 5 ){
+      cerr << "search trailing *: bekijk: " << *it << endl;
+    }
+    if ( (*it)->isNested() ){
+      if ( debugFlag > 5 ){
+	cerr << "nested! " << endl;
+      }
+      (*it)->resolveTail();
+      ++it;
+    }
+    else {
+      size_t len = (*it)->RightHand.size();
+      if ( (*it)->infixpos() > 0
+	   && (*it)->infixpos() == signed(len)-1 ){
+	if ( debugFlag > 5 ){
+	  cerr << "found trailing * " << *it << endl;
+	  cerr << "infixpos=" << (*it)->infixpos() << endl;
+	  cerr << "len=" << len << endl;
+	}
+	it = resolveAffix( parts, it );
+      }
+      else {
+	++it;
+      }
+    }
+  }
+}
+
+void BracketNest::resolveMiddle(){
+  list<BaseBracket*>::iterator it = parts.begin();
+  while ( it != parts.end() ){
+    // now search for other rules with a * in the middle
+    if ( debugFlag > 5 ){
+      cerr << "hoofd infix loop bekijk: " << *it << endl;
+    }
+    if ( (*it)->isNested() ){
+      if ( debugFlag > 5 ){
+	cerr << "nested! " << endl;
+      }
+      (*it)->resolveMiddle( );
+      ++it;
+    }
+    else {
+      size_t len = (*it)->RightHand.size();
+      if ( (*it)->infixpos() > 0
+	   && (*it)->infixpos() < signed(len)-1 ){
+	it = resolveAffix( parts, it );
+      }
+      else {
+	++it;
+      }
+    }
+  }
+}
+
+void BracketNest::clearEmptyNodes(){
+  // remove all nodes that don't have a morpheme or an inlection
+  if ( debugFlag > 5 ){
+    cerr << "clear emptyNodes: " << this << endl;
+  }
+  list<BaseBracket*> out;
+  list<BaseBracket*>::iterator it = parts.begin();
+  while ( it != parts.end() ){
+    if ( debugFlag > 5 ){
+      cerr << "loop clear emptyNodes : " << *it << endl;
+    }
+    if ( (*it)->isNested() ){
+      if ( debugFlag > 5 ){
+	cerr << "nested! " << endl;
+      }
+      (*it)->clearEmptyNodes( );
+      out.push_back( *it );
+    }
+    else {
+      if ( (*it)->morpheme().isEmpty() &&
+	   (*it)->inflection().empty() ){
+	// skip
+      }
+      else {
+	out.push_back( *it );
+      }
+    }
+    ++it;
+  }
+  parts.swap( out );
+  if ( debugFlag > 5 ){
+    cerr << "RESULT clear emptyNodes: " << this << endl;
+  }
+}
+
+CLEX::Type BracketNest::getFinalTag() {
+  // cerr << "get Final Tag from: " << this << endl;
+  CLEX::Type result_cls = CLEX::UNASS;
+  auto it = parts.rbegin();
+  while ( it != parts.rend() ){
+    //    cerr << "bekijk: " << *it << endl;
+    if ( (*it)->isNested()
+	 || ( (*it)->inflection().empty()
+	      && !(*it)->morpheme().isEmpty() ) ){
+      result_cls = (*it)->tag();
+      //      cerr << "maybe tag = " << result_cls << endl;
+      if ( result_cls != CLEX::P ){
+	auto it2 = it;
+	++it2;
+	if ( it2 != parts.rend() ){
+	  //	  cerr << "bekijk ook " << *it2 << endl;
+	  if ( (*it2)->infixpos() == 0 ){
+	    result_cls = (*it2)->tag();
+	  }
+	}
+	// in case of P we hope for better
+	// in case of a X_*Y rule we need X
+	break;
+      }
+    }
+    ++it;
+  }
+  //  cerr << "final tag = " << result_cls << endl;
+  cls = result_cls;
+  return cls;
+}
diff --git a/src/mbma_mod.cxx b/src/mbma_mod.cxx
old mode 100755
new mode 100644
index 22b77cf..9235596
--- a/src/mbma_mod.cxx
+++ b/src/mbma_mod.cxx
@@ -1,11 +1,13 @@
+/* ex: set tabstop=8 expandtab: */
 /*
-  $Id: mbma_mod.cxx 17460 2014-07-16 15:29:20Z sloot $
-  $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/src/mbma_mod.cxx $
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
 
-  Copyright (c) 2006 - 2014
-  Tilburg University
+  This file is part of frog:
 
-  This file is part of frog.
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
 
   frog is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -21,18 +23,20 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
   For questions and suggestions, see:
-      http://ilk.uvt.nl/software.html
+      https://github.com/LanguageMachines/frog/issues
   or send mail to:
-      timbl at uvt.nl
+      lamasoftware (at ) science.ru.nl
+
 */
 
 #include <cstdlib>
 #include <string>
 #include <set>
 #include <iostream>
+#include <algorithm>
 #include <fstream>
 #include <sstream>
-#include <timbl/TimblAPI.h>
+#include "timbl/TimblAPI.h"
 
 #include "ucto/unicode.h"
 #include "ticcutils/Configuration.h"
@@ -46,11 +50,24 @@ using namespace TiCC;
 const long int LEFT =  6; // left context
 const long int RIGHT = 6; // right context
 
-Mbma::Mbma(): MTreeFilename( "dm.igtree" ), MTree(0),
-	      transliterator(0), filter(0), doDaring(false) {
-  mbmaLog = new LogStream( theErrLog, "mbma-" );
+#define LOG *Log(mbmaLog)
+
+Mbma::Mbma(LogStream * logstream):
+  MTreeFilename( "dm.igtree" ),
+  MTree(0),
+  transliterator(0),
+  filter(0),
+  doDeepMorph(false)
+{
+  mbmaLog = new LogStream( logstream, "mbma-" );
 }
 
+// define the statics
+map<string,string> Mbma::TAGconv;
+string Mbma::mbma_tagset = "http://ilk.uvt.nl/folia/sets/frog-mbma-nl";
+string Mbma::cgn_tagset  = "http://ilk.uvt.nl/folia/sets/frog-mbpos-cgn";
+string Mbma::clex_tagset = "http://ilk.uvt.nl/folia/sets/frog-mbpos-clex";
+
 Mbma::~Mbma() {
   cleanUp();
   delete transliterator;
@@ -58,231 +75,38 @@ Mbma::~Mbma() {
   delete mbmaLog;
 }
 
-namespace CLEX {
-
-  Type toCLEX( const string& s ){
-    if ( s == "N" )
-      return N;
-    else if ( s == "A" )
-      return A;
-    else if ( s == "Q" )
-      return Q;
-    else if ( s == "V" )
-      return V;
-    else if ( s == "D" )
-      return D;
-    else if ( s == "O" )
-      return O;
-    else if ( s == "B" )
-      return B;
-    else if ( s == "P" )
-      return P;
-    else if ( s == "Y" )
-      return Y;
-    else if ( s == "I" )
-      return I;
-    else if ( s == "X" )
-      return X;
-    else if ( s == "Z" )
-      return Z;
-    else if ( s == "PN" )
-      return PN;
-    else if ( s == "*" )
-      return AFFIX;
-    else if ( s == "x" )
-      return XAFFIX;
-    else if ( s == "0" )
-      return NEUTRAL;
-    else
-      return UNASS;
-  }
-
-  Type toCLEX( const char c ){
-    string s;
-    s += c;
-    return toCLEX(s);
-  }
-
-  string toLongString( const Type& t ){
-    switch ( t ){
-    case N:
-      return "noun";
-    case A:
-      return "adjective";
-    case Q:
-      return "quantifier/numeral";
-    case V:
-      return "verb";
-    case D:
-      return "article";
-    case O:
-      return "pronoun";
-    case B:
-      return "adverb";
-    case P:
-      return "preposition";
-    case Y:
-      return "conjunction";
-    case I:
-      return "interjection";
-    case X:
-      return "unanalysed";
-    case Z:
-      return "expression part";
-    case PN:
-      return "proper noun";
-    case AFFIX:
-      return "affix";
-    case XAFFIX:
-      return "x affix";
-    case NEUTRAL:
-      return "0";
-    default:
-      return "UNASS";
-    }
-  }
-
-  string toString( const Type& t ){
-    switch ( t ){
-    case N:
-      return "N";
-    case A:
-      return "A";
-    case Q:
-      return "Q";
-    case V:
-      return "V";
-    case D:
-      return "D";
-    case O:
-      return "O";
-    case B:
-      return "B";
-    case P:
-      return "P";
-    case Y:
-      return "Y";
-    case I:
-      return "I";
-    case X:
-      return "X";
-    case Z:
-      return "Z";
-    case PN:
-      return "PN";
-    case AFFIX:
-      return "*";
-    case XAFFIX:
-      return "x";
-    case NEUTRAL:
-      return "0";
-    default:
-      return "/";
-    }
-  }
-
-  bool isBasicClass( const Type& t ){
-    const string basictags = "NAQVDOBPYIXZ";
-    switch ( t ){
-    case N:
-    case A:
-    case Q:
-    case V:
-    case D:
-    case O:
-    case B:
-    case P:
-    case Y:
-    case I:
-    case X:
-    case Z:
-      return true;
-    default:
-      return false;
-    }
-  }
-
-}
-
-ostream& operator<<( ostream& os, const CLEX::Type t ){
-  os << toString( t );
-  return os;
-}
-
-void Mbma::fillMaps() {
-  //
-  // this could be done from a configfile
-  //
-  // first the CELEX POS tag names
-  //
-  tagNames[CLEX::N] = "noun";
-  tagNames[CLEX::A] = "adjective";
-  tagNames[CLEX::Q] = "quantifier/numeral";
-  tagNames[CLEX::V] = "verb";
-  tagNames[CLEX::D] = "article";
-  tagNames[CLEX::O] = "pronoun";
-  tagNames[CLEX::B] = "adverb";
-  tagNames[CLEX::P] = "preposition";
-  tagNames[CLEX::Y] = "conjunction";
-  tagNames[CLEX::I] = "interjection";
-  tagNames[CLEX::X] = "unanalysed";
-  tagNames[CLEX::Z] = "expression part";
-  tagNames[CLEX::PN] = "proper noun";
-  //
-  // now the inflections
-  iNames['X'] = "";
-  iNames['s'] = "separated";
-  iNames['e'] = "singular";
-  iNames['m'] = "plural";
-  iNames['d'] = "diminutive";
-  iNames['G'] = "genitive";
-  iNames['D'] = "dative";
-  iNames['P'] = "positive";
-  iNames['C'] = "comparative";
-  iNames['S'] = "superlative";
-  iNames['E'] = "suffix-e";
-  iNames['i'] = "infinitive";
-  iNames['p'] = "participle";
-  iNames['t'] = "present tense";
-  iNames['v'] = "past tense";
-  iNames['1'] = "1st person";
-  iNames['2'] = "2nd person";
-  iNames['3'] = "3rd person";
-  iNames['I'] = "inversed";
-  iNames['g'] = "imperative";
-  iNames['a'] = "subjunctive";
-}
 
-// BJ: dirty hack with fixed everything to read in tag correspondences
-void Mbma::init_cgn( const string& dir ) {
-  string line;
-  string fn = dir + "cgntags.main";
-  ifstream tc( fn.c_str() );
+void Mbma::init_cgn( const string& main, const string& sub ) {
+  ifstream tc( main );
   if ( tc ){
+    string line;
     while( getline( tc, line) ) {
       vector<string> tmp;
       size_t num = split_at(line, tmp, " ");
       if ( num < 2 ){
-	*Log(mbmaLog) << "splitting '" << line << "' failed" << endl;
+	LOG << "splitting '" << line << "' failed" << endl;
 	throw ( runtime_error("panic") );
       }
       TAGconv.insert( make_pair( tmp[0], tmp[1] ) );
     }
   }
-  else
-    throw ( runtime_error( "unable to open:" + fn ) );
-  fn = dir + "cgntags.sub";
-  ifstream tc1( fn.c_str() );
+  else {
+    throw ( runtime_error( "unable to open:" + sub ) );
+  }
+  ifstream tc1( sub );
   if ( tc1 ){
+    string line;
     while( getline(tc1, line) ) {
       vector<string> tmp;
       size_t num = split_at(line, tmp, " ");
-      if ( num == 2 )
+      if ( num == 2 ){
 	TAGconv.insert( make_pair( tmp[0], tmp[1] ) );
+      }
     }
   }
-  else
-    throw ( runtime_error( "unable to open:" + fn ) );
+  else {
+    throw ( runtime_error( "unable to open:" + sub ) );
+  }
 }
 
 Transliterator *Mbma::init_trans( ){
@@ -296,9 +120,8 @@ Transliterator *Mbma::init_trans( ){
   return t;
 }
 
-
 bool Mbma::init( const Configuration& config ) {
-  *Log(mbmaLog) << "Initiating morphological analyzer..." << endl;
+  LOG << "Initiating morphological analyzer..." << endl;
   debugFlag = 0;
   string val = config.lookUp( "debug", "mbma" );
   if ( val.empty() ){
@@ -307,50 +130,65 @@ bool Mbma::init( const Configuration& config ) {
   if ( !val.empty() ){
     debugFlag = TiCC::stringTo<int>( val );
   }
-  val = config.lookUp( "daring", "mbma" );
-  if ( !val.empty() )
-    doDaring = TiCC::stringTo<bool>( val );
+  val = config.lookUp( "deep-morph", "mbma" );
+  if ( !val.empty() ){
+    doDeepMorph = TiCC::stringTo<bool>( val );
+  }
   val = config.lookUp( "version", "mbma" );
   if ( val.empty() ){
     version = "1.0";
   }
-  else
+  else {
     version = val;
+  }
   val = config.lookUp( "set", "mbma" );
-  if ( val.empty() ){
-    tagset = "http://ilk.uvt.nl/folia/sets/frog-mbma-nl";
+  if ( !val.empty() ){
+    mbma_tagset = val;
   }
-  else
-    tagset = val;
 
   val = config.lookUp( "set", "tagger" );
+  if ( !val.empty() ){
+    cgn_tagset = val;
+  }
+  val = config.lookUp( "clex_set", "mbma" );
+  if ( !val.empty() ){
+    clex_tagset = val;
+  }
+  string cgn_clex_main;
+  val = config.lookUp( "cgn_clex_main", "mbma" );
   if ( val.empty() ){
-    cgn_tagset = "http://ilk.uvt.nl/folia/sets/frog-mbpos-cgn";
+    cgn_clex_main = "cgntags.main";
   }
-  else
-    cgn_tagset = val;
+  else {
+    cgn_clex_main = val;
+  }
+  cgn_clex_main = prefix( config.configDir(), cgn_clex_main );
 
-  val = config.lookUp( "clex_set", "mbma" );
+  string cgn_clex_sub;
+  val = config.lookUp( "cgn_clex_sub", "mbma" );
   if ( val.empty() ){
-    clex_tagset = "http://ilk.uvt.nl/folia/sets/frog-mbpos-clex";
+    cgn_clex_sub = "cgntags.sub";
   }
-  else
-    clex_tagset = val;
+  else {
+    cgn_clex_sub = val;
+  }
+  cgn_clex_sub = prefix( config.configDir(), cgn_clex_sub );
+  init_cgn( cgn_clex_main, cgn_clex_sub );
 
   string charFile = config.lookUp( "char_filter_file", "mbma" );
-  if ( charFile.empty() )
+  if ( charFile.empty() ){
     charFile = config.lookUp( "char_filter_file" );
+  }
   if ( !charFile.empty() ){
     charFile = prefix( config.configDir(), charFile );
     filter = new Tokenizer::UnicodeFilter();
     filter->fill( charFile );
   }
   string tfName = config.lookUp( "treeFile", "mbma" );
-  if ( tfName.empty() )
+  if ( tfName.empty() ){
     tfName = "mbma.igtree";
+  }
   MTreeFilename = prefix( config.configDir(), tfName );
-  fillMaps();
-  init_cgn( config.configDir() );
   string dof = config.lookUp( "filter_diacritics", "mbma" );
   if ( !dof.empty() ){
     bool b = stringTo<bool>( dof );
@@ -360,15 +198,16 @@ bool Mbma::init( const Configuration& config ) {
   }
   //Read in (igtree) data
   string opts = config.lookUp( "timblOpts", "mbma" );
-  if ( opts.empty() )
+  if ( opts.empty() ){
     opts = "-a1";
+  }
   opts += " +vs -vf"; // make Timbl run quietly
   MTree = new Timbl::TimblAPI(opts);
   return MTree->GetInstanceBase(MTreeFilename);
 }
 
 void Mbma::cleanUp(){
-  // *Log(mbmaLog) << "cleaning up MBMA stuff " << endl;
+  // LOG << "cleaning up MBMA stuff " << endl;
   delete MTree;
   MTree = 0;
   clearAnalysis();
@@ -376,946 +215,50 @@ void Mbma::cleanUp(){
 
 vector<string> Mbma::make_instances( const UnicodeString& word ){
   vector<string> insts;
-  for( long i=0; i < word.length(); ++i ) {
-    if (debugFlag > 10)
-      *Log(mbmaLog) << "itt #:" << i << endl;
-    UnicodeString inst;
-    for ( long j=i ; j <= i + RIGHT + LEFT; ++j ) {
-      if (debugFlag > 10)
-	*Log(mbmaLog) << " " << j-LEFT << ": ";
-      if ( j < LEFT || j >= word.length()+LEFT )
-	inst += '_';
-      else {
-	if (word[j-LEFT] == ',' )
-	  inst += 'C';
-	else
-	  inst += word[j-LEFT];
-      }
-      inst += ",";
-      if (debugFlag > 10)
-	*Log(mbmaLog) << " : " << inst << endl;
-    }
-    inst += "?";
-    insts.push_back( UnicodeToUTF8(inst) );
-    // store res
-  }
-  return insts;
-}
-
-bool RulePart::isBasic() const {
-  return isBasicClass( ResultClass );
-}
-
-ostream& operator<<( ostream& os, const RulePart& r ){
-  if ( r.ResultClass == CLEX::UNASS &&
-       r.inflect.empty() ){
-    os << "INVALID! No result node, AND no inflection" << endl;
-  }
-  else {
-    os << r.uchar << " - ";
-    for ( size_t i = 0; i < r.RightHand.size(); ++i ){
-      os << r.RightHand[i];
-      if ( i < r.RightHand.size()-1 ){
-	os << "+";
-      }
-    }
-    if ( !r.RightHand.empty() ){
-      os << " ==> ";
-    }
-    os << r.ResultClass << " ";
-    if ( !r.inflect.empty() ){
-      os << " INFLECTION: " << r.inflect;
-    }
-  }
-  if ( r.fixpos >= 0 )
-    os << " affix at pos: " << r.fixpos;
-  if ( r.xfixpos >= 0 )
-    os << " x-affix at pos: " << r.xfixpos;
-  if ( !r.ins.isEmpty() )
-    os << " insert='" << r.ins << "'";
-  if ( !r.del.isEmpty() )
-    os << " delete='" << r.del << "'";
-  if ( !r.morpheme.isEmpty() )
-    os << " morpheme ='" << r.morpheme << "'";
-  return os;
-}
-
-ostream& operator<<( ostream& os, const RulePart *r ){
-  return os << *r;
-}
-
-void RulePart::get_ins_del( const string& edit ){
-  if (edit[0]=='D') { // delete operation
-    string s = edit.substr(1);
-    ins = UTF8ToUnicode( s );
-  }
-  else if ( edit[0]=='I') {  //insert operation
-    string s = edit.substr(1);
-    del = UTF8ToUnicode( s );
-  }
-  else if ( edit[0]=='R') { // replace operation
-    string::size_type pos = edit.find( ">" );
-    string s = edit.substr( 1, pos-1 );
-    ins = UTF8ToUnicode( s );
-    s = edit.substr( pos+1 );
-    del = UTF8ToUnicode( s );
-  }
-}
-
-RulePart::RulePart( const string& rs, const UChar kar ):
-  ResultClass(CLEX::UNASS),
-  uchar(kar),
-  fixpos(-1),
-  xfixpos(-1),
-  participle(false)
-{
-  //  cerr << "extract RulePart:" << rs << endl;
-  string edit;
-  string s = rs;
-  string::size_type ppos = rs.find("+");
-  if ( ppos != string::npos ){
-    // some edit info is available
-    string::size_type spos = rs.find("/");
-    if ( spos != string::npos ){
-      // inflection too
-      inflect = rs.substr( spos+1 );
-      //    cerr << "inflect = " << inflect << endl;
-      edit = rs.substr( ppos+1, spos-ppos-1 );
-    }
-    else {
-      edit = rs.substr( ppos+1 );
-    }
-    //    cerr << "EDIT = " << edit << endl;
-    get_ins_del( edit );
-    s = rs.substr(0, ppos );
-    participle = ( s.find( 'p' ) != string::npos ) &&
-      ( del == "ge" || del == "be" );
-  }
-  string::size_type pos = s.find("_");
-  if ( pos != string::npos ){
-    ResultClass = CLEX::toCLEX( s[0] );
-    // a rewrite RulePart
-    if ( pos != 1 ){
-      cerr << "Surprise! _ on a strange position:" << pos << " in " << s << endl;
-    }
-    else {
-      string rhs = s.substr( pos+1 );
-      //      cerr << "RHS = " << rhs << endl;
-      string::size_type spos = rhs.find("/");
-      if ( spos != string::npos ){
-	// inflection too
-	inflect = rhs.substr( spos+1 );
-	// cerr << "inflect = " << inflect << endl;
-	rhs = rhs.substr( 0, spos );
-      }
-      //      cerr << "RHS = " << rhs << endl;
-      RightHand.resize( rhs.size() );
-      for ( size_t i = 0; i < rhs.size(); ++i ){
-	CLEX::Type tag = CLEX::toCLEX( rhs[i] );
-	if ( tag == CLEX::UNASS ){
-	  cerr << "Unhandled class in rhs=" << rhs << endl;
-	  continue;
-	}
-	else {
-	  //	  cerr << "found tag '" << tag << "' in " << rhs << endl;
-	  RightHand[i] = tag;
-	  if ( tag == CLEX::AFFIX ){
-	    fixpos = i;
-	  }
-	  if ( tag == CLEX::XAFFIX ){
-	    xfixpos = i;
-	  }
-	}
-      }
-    }
-  }
-  else {
-    //    cerr << "normal RulePart " << s << endl;
-    CLEX::Type tag = CLEX::toCLEX( s[0] );
-    string::size_type pos = s.find("/");
-    if ( pos != string::npos ){
-      // some inflextion
-      if ( tag != CLEX::UNASS ){
-	// cases like 0/e 0/te2I
-	ResultClass = tag;
-	inflect = s.substr(pos+1);
-      }
-      else {
-	//  E/P
-	inflect = s;
-      }
-      //      cerr << "inflect =" << inflect << endl;
-    }
-    else if ( tag != CLEX::UNASS ){
-      // dull case
-      ResultClass = tag;
-    }
-    else {
-      // m
-      inflect = s;
-      //	cerr << "inflect =" << inflect << endl;
-    }
-  }
-}
-
-Rule::Rule( const vector<string>& parts,
-	    const UnicodeString& s,
-	    int flag ): debugFlag( flag ){
-  for ( size_t k=0; k < parts.size(); ++k ) {
-    string this_class = parts[k];
-    RulePart cur( this_class, s[k] );
-    rules.push_back( cur );
-  }
-}
-
-ostream& operator<<( ostream& os, const Rule& r ){
-  os << "MBMA rule:" << endl;
-  for ( size_t k=0; k < r.rules.size(); ++k ) {
-    os << "\t" << r.rules[k] << endl;
-  }
-  return os;
-}
-
-ostream& operator<<( ostream& os, const Rule *r ){
-  if ( r )
-    os << *r << endl;
-  else
-    os << "Empty MBMA rule" << endl;
-  return os;
-}
-
-void Rule::reduceZeroNodes(){
-  vector<RulePart> out;
-  for ( size_t k=0; k < rules.size(); ++k ) {
-    if ( rules[k].ResultClass == CLEX::NEUTRAL
-	 && rules[k].morpheme.isEmpty()
-	 && rules[k].inflect.empty() ){
-    }
-    else {
-      out.push_back(rules[k]);
-    }
-  }
-  rules.swap( out );
-}
-
-vector<string> Rule::extract_morphemes() const {
-  vector<string> morphemes;
-  vector<RulePart>::const_iterator it = rules.begin();
-  while ( it != rules.end() ) {
-    UnicodeString morpheme = it->morpheme;
-    if ( !morpheme.isEmpty() ){
-      morphemes.push_back( UnicodeToUTF8(morpheme) );
-    }
-    ++it;
-  }
-  return morphemes;
-}
-
-CLEX::Type select_tag( const char ch ){
-  CLEX::Type result = CLEX::UNASS;
-  switch( ch ){
-  case 'm':
-  case 'e':
-  case 'd':
-  case 'G':
-  case 'D':
-    result = CLEX::N;
-  break;
-  case 'P':
-  case 'C':
-  case 'S':
-  case 'E':
-    result = CLEX::A;
-  break;
-  case 'i':
-  case 'p':
-  case 't':
-  case 'v':
-  case 'g':
-  case 'a':
-    result = CLEX::V;
-  break;
-  default:
-    break;
-  }
-  return result;
-}
-
-
-void Mbma::resolve_inflections( Rule& rule ){
-  // resolve all clearly resolvable implicit selections of inflectional tags
-  // We take ONLY the first 'hint' of the inflection to find a new CLEX Type
-  // When applicable, we replace the class from the rule
-  for ( size_t i = 1; i < rule.rules.size(); ++i ){
-    string inf = rule.rules[i].inflect;
-    if ( !inf.empty() && !rule.rules[i].participle ){
-      // it is an inflection tag
-      if (debugFlag){
-	*Log(mbmaLog) << " inflection: >" << inf << "<" << endl;
-      }
-      // given the specific selections of certain inflections,
-      //    select a tag!
-      CLEX::Type new_tag = select_tag( inf[0] );
-
-      // apply the change. Remember, the idea is that an inflection is
-      // far more certain of the tag of its predecessing morpheme than
-      // the morpheme itself.
-      // This is not always the case, but it works
-      if ( new_tag != CLEX::UNASS ) {
-	if ( debugFlag  ){
-	  *Log(mbmaLog) << inf[0] << " selects " << new_tag << endl;
-	}
-	// go back to the previous morpheme
-	size_t k = i-1;
-	//	  *Log(mbmaLog) << "een terug is " << rule.rules[k].ResultClass << endl;
-	if ( rule.rules[k].isBasic() ){
-	  // now see if we can replace this class for a better one
-	  if ( rule.rules[k].ResultClass == CLEX::PN &&
-	       new_tag == CLEX::N ){
-	    if ( debugFlag  ){
-	      *Log(mbmaLog) << "Don't replace PN by N" << endl;
-	    }
-	  }
-	  else {
-	    if ( debugFlag  ){
-	      *Log(mbmaLog) << " replace " << rule.rules[k].ResultClass
-			    << " by " << new_tag << endl;
-	    }
-	    rule.rules[k].ResultClass = new_tag;
-	  }
-	  return;
-	}
-      }
-    }
-  }
-}
-
-BracketLeaf::BracketLeaf( const RulePart& p, int flag ):
-  BaseBracket(p.ResultClass, p.RightHand, flag),
-  morph(p.morpheme )
-{
-  ifpos = -1;
-  if ( !p.inflect.empty() ){
-    inflect = p.inflect;
-    if ( p.ResultClass == CLEX::UNASS ){
-      status = INFLECTION;
-    }
-    else {
-      status = INFO;
-    }
-  }
-  else if ( RightHand.size() == 0 ){
-    orig = toString( cls );
-    status = STEM;
-  }
-  else {
-    orig = toString( cls );
-    orig += "_";
-    for ( size_t i = 0; i < RightHand.size(); ++i ){
-      orig += toString(RightHand[i]);
-      if ( RightHand[i] == CLEX::AFFIX )
-	ifpos = i;
-    }
-    status = DERIVATIONAL;
-  }
-}
-
-BracketLeaf::BracketLeaf( CLEX::Type t, const UnicodeString& us, int flag ):
-  BaseBracket( t, vector<CLEX::Type>(), flag ),
-  morph( us )
-{
-  ifpos = -1;
-  orig = toString( t );
-  status = STEM;
-}
-
-BracketNest::~BracketNest(){
-  for ( list<BaseBracket*>::const_iterator it = parts.begin();
-	it != parts.end();
-	++it ){
-    delete *it;
-  }
-}
-
-UnicodeString BaseBracket::put( bool noclass ) const {
-  UnicodeString result = "[err?]";
-  if ( !noclass ){
-    UnicodeString s = UTF8ToUnicode(toString(cls));
-    result += s;
-  }
-  return result;
-}
-
-UnicodeString BracketLeaf::put( bool noclass ) const {
-  UnicodeString result = "[";
-  result += morph;
-  result += "]";
-  if ( !noclass ){
-    if ( orig.empty() )
-      result += UTF8ToUnicode(inflect);
-    else
-      result += UTF8ToUnicode(orig);
-  }
-  return result;
-}
-
-UnicodeString BracketNest::put( bool noclass ) const {
-  UnicodeString result = "[ ";
-  for ( list<BaseBracket*>::const_iterator it = parts.begin();
-	it != parts.end();
-	++it ){
-    result +=(*it)->put(noclass) + " ";
-  }
-  result += "]";
-  if ( !noclass ){
-    if ( cls != CLEX::UNASS )
-      result += UTF8ToUnicode(toString(cls));
-  }
-  return result;
-}
-
-ostream& operator<< ( ostream& os, const BaseBracket& c ){
-  os << c.put();
-  return os;
-}
-
-ostream& operator<< ( ostream& os, const BaseBracket *c ){
-  if ( c ){
-    os << c->put();
-  }
-  else {
-    os << "[EMPTY]";
-  }
-  return os;
-}
-
-UnicodeString BracketNest::deepmorphemes() const{
-  UnicodeString res;
-  for ( list<BaseBracket*>::const_iterator it = parts.begin();
-	it != parts.end();
-	++it ){
-    res += (*it)->deepmorphemes();
-  }
-  return res;
-}
-
-void prettyP( ostream& os, const list<BaseBracket*>& v ){
-  os << "[";
-  for ( list<BaseBracket*>::const_iterator it = v.begin();
-	it != v.end();
-	++it ){
-    os << *it << " ";
-  }
-  os << "]";
-}
-
-bool BracketNest::testMatch( list<BaseBracket*>& result,
-			     const list<BaseBracket*>::iterator& rpos,
-			     list<BaseBracket*>::iterator& bpos ){
-  if ( debugFlag > 5 ){
-    cerr << "test MATCH " << endl;
-  }
-  bpos = result.end();
-  size_t len = (*rpos)->RightHand.size();
-  if ( len == 0 || len > result.size() ){
-    if ( debugFlag > 5 ){
-      cerr << "test MATCH FAIL (no RHS or RHS > result)" << endl;
-    }
-    return false;
-  }
-  size_t fpos = (*rpos)->infixpos();
-  if ( debugFlag > 5 ){
-    cerr << "test MATCH, fpos=" << fpos << " en len=" << len << endl;
-  }
-  list<BaseBracket*>::iterator it = rpos;
-  while ( fpos > 0 ){
-    --fpos;
-    --it;
-  }
-  size_t j = 0;
-  bpos = it;
-  for (; j < len && it != result.end(); ++j, ++it ){
-    if ( debugFlag > 5 ){
-      cerr << "test MATCH vergelijk " << *it << " met " << (*rpos)->RightHand[j] << endl;
-    }
-    if ( (*rpos)->RightHand[j] == CLEX::XAFFIX)
-      continue;
-    else if ( (*rpos)->RightHand[j] == CLEX::AFFIX)
-      continue;
-    else if ( (*rpos)->RightHand[j] != (*it)->tag() ){
-      if ( debugFlag > 5 ){
-	cerr << "test MATCH FAIL (" << (*rpos)->RightHand[j]
-	     << " != " << (*it)->tag() << ")" << endl;
-      }
-      bpos = it;
-      return false;
-    }
-  }
-  if ( j < len ){
-    if ( debugFlag > 5 ){
-      cerr << "test MATCH FAIL (j < len)" << endl;
-    }
-    bpos = result.end();
-    return false;
-  }
-  if ( debugFlag > 5 ){
-    cerr << "test MATCH OK" << endl;
-  }
-  return true;
-}
-
-
-list<BaseBracket*>::iterator BracketNest::resolveAffix( list<BaseBracket*>& result,
-							const list<BaseBracket*>::iterator& rpos ){
-  if ( debugFlag > 5 ){
-    cerr << "resolve affix" << endl;
-  }
-  list<BaseBracket*>::iterator bit;
-  bool matched = testMatch( result, rpos, bit );
-  if ( matched ){
-    if ( debugFlag > 5 ){
-      cerr << "OK een match" << endl;
-    }
-    size_t len = (*rpos)->RightHand.size();
-    if ( len == result.size() ){
-      // the rule matches exact what we have.
-      // leave it
-      list<BaseBracket*>::iterator it = rpos;
-      return ++it;
-    }
-    else {
-      list<BaseBracket*>::iterator it = bit--;
-      BaseBracket *tmp = new BracketNest( (*rpos)->tag(), debugFlag );
-      for ( size_t j = 0; j < len; ++j ){
-	tmp->append( *it );
-	if ( debugFlag > 5 ){
-	  cerr << "erase " << *it << endl;
-	}
-	it = result.erase(it);
-      }
-      if ( debugFlag > 5 ){
-	cerr << "new node:" << tmp << endl;
-      }
-      result.insert( ++bit, tmp );
-      return bit;
-    }
-  }
-  else {
-    // the affix derivation failed.
-    if ( bit == result.end() ){
-      // no hacks yet
-      bit = rpos;
-      return ++bit;
-    }
-    list<BaseBracket*>::iterator it = rpos;
-    if ( debugFlag > 5 ){
-      cerr << "it = " << *it << endl;
-      cerr << "bit = " << *bit << endl;
-    }
-    if ( (*bit)->RightHand.size() > 1 ){
-      if ( debugFlag > 5 ){
-	cerr << "undo splitup case 1" << endl;
-      }
-      // We 'undo' the splitup and construct a leaf with the combined morphemes
-      UnicodeString mor;
-      CLEX::Type tag = (*it)->tag();
-      while ( it != result.end() ){
-	if ( (*it)->inflection() != "" && tag != CLEX::UNASS ){
-	  // so we DO continue when there is inflection and NO tag (like 'pt')
-	  // in : N,0,0,0,pt,0,Q_Q*,0,0,0,0,0/m
-	  break;
-	}
-	if ( debugFlag > 5 ){
-	  cerr << "append:" << *it << endl;
-	}
-	mor += (*it)->morpheme();
-	tag = (*it)->tag(); // remember the 'last' tag
-	if ( debugFlag > 5 ){
-	  cerr << "erase " << *it << endl;
-	}
-	it = result.erase(it);
-      }
-      BaseBracket *tmp = new BracketLeaf( tag, mor, debugFlag );
-      if ( debugFlag > 5 ){
-	cerr << "new node: " << tmp << endl;
-      }
-      result.insert( it, tmp );
-      if ( debugFlag > 5 ){
-	cerr << "result = " << result << endl;
-      }
-      return ++it;
-    }
-    else {
-      if ( debugFlag > 5 ){
-	cerr << "undo splitup case 2" << endl;
-      }
-      // We 'undo' the splitup and construct a leaf with the combined morphemes
-      UnicodeString mor;
-      CLEX::Type tag = (*bit)->tag();
-      ++it;
-      if (  bit == it ){
-	if ( debugFlag > 5 ){
-	  cerr << "escape with result = " << result << endl;
-	}
-	return ++bit;
-      }
-      while ( bit != it ){
-	if ( debugFlag > 5 ){
-	  cerr << "loop :" << *bit << endl;
-	}
-	if ( (*bit)->inflection() != "" && tag != CLEX::UNASS ){
-	  // so we DO continue when there is inflection and NO tag (like 'pt')
-	  // in : N,0,0,0,pt,0,Q_Q*,0,0,0,0,0/m
-	  break;
-	}
-	if ( debugFlag > 5 ){
-	  cerr << "append:" << *bit << " morpheme=" <<  (*bit)->deepmorphemes() << endl;
-	}
-	mor += (*bit)->deepmorphemes();
-	tag = (*bit)->tag(); // remember the 'last' tag
-	if ( debugFlag > 5 ){
-	  cerr << "erase " << *bit << endl;
-	}
-	bit = result.erase(bit);
-      }
-      BaseBracket *tmp = new BracketLeaf( tag, mor, debugFlag );
-      if ( debugFlag > 5 ){
-	cerr << "new node: " << tmp << endl;
-      }
-      result.insert( it, tmp );
-      if ( debugFlag > 5 ){
-	cerr << "result = " << result << endl;
-      }
-      return ++bit;
-    }
-  }
-}
-
-void BracketNest::resolveNouns( ){
-  if ( debugFlag > 5 ){
-    cerr << "resolve NOUNS in:" << this << endl;
-  }
-  list<BaseBracket*>::iterator it = parts.begin();
-  list<BaseBracket*>::iterator prev = it++;
-  while ( it != parts.end() ){
-    if ( (*prev)->tag() == CLEX::N && (*prev)->RightHand.size() == 0
-	 && (*it)->tag() == CLEX::N && (*it)->RightHand.size() == 0 ){
-      BaseBracket *tmp = new BracketNest( CLEX::N, debugFlag );
-      tmp->append( *prev );
-      tmp->append( *it );
-      if ( debugFlag > 5 ){
-	cerr << "current result:" << parts << endl;
-	cerr << "new node:" << tmp << endl;
-	cerr << "erase " << *prev << endl;
-      }
-      prev = parts.erase(prev);
-      if ( debugFlag > 5 ){
-	cerr << "erase " << *prev << endl;
-      }
-      prev = parts.erase(prev);
-      prev = parts.insert( prev, tmp );
-      if ( debugFlag > 5 ){
-	cerr << "current result:" << parts << endl;
-      }
-      it = prev;
-      ++it;
-    }
-    else {
-      prev = it++;
-    }
-  }
-  if ( debugFlag > 5 ){
-    cerr << "resolve NOUNS result:" << this << endl;
-  }
-}
-
-void BracketNest::resolveLead( ){
-  list<BaseBracket*>::iterator it = parts.begin();
-  while ( it != parts.end() ){
-    // search for rules with a * at the begin
-    if ( debugFlag > 5 ){
-      cerr << "search leading *: bekijk: " << *it << endl;
-    }
-    if ( (*it)->isNested() ){
-      if ( debugFlag > 5 ){
-	cerr << "nested! " << endl;
-      }
-      (*it)->resolveLead();
-      ++it;
-    }
-    else {
-      if ( (*it)->infixpos() == 0 ){
-	it = resolveAffix( parts, it );
-      }
-      else {
-	++it;
-      }
-    }
-  }
-}
-
-void BracketNest::resolveTail(){
-  list<BaseBracket *>::iterator it = parts.begin();
-  while ( it != parts.end() ){
-    // search for rules with a * at the end
-    if ( debugFlag > 5 ){
-      cerr << "search trailing *: bekijk: " << *it << endl;
-    }
-    if ( (*it)->isNested() ){
-      if ( debugFlag > 5 ){
-	cerr << "nested! " << endl;
-      }
-      (*it)->resolveTail();
-      ++it;
-    }
-    else {
-      size_t len = (*it)->RightHand.size();
-      if ( (*it)->infixpos() > 0
-	   && (*it)->infixpos() == signed(len)-1 ){
-	if ( debugFlag > 5 ){
-	  cerr << "found trailing * " << *it << endl;
-	  cerr << "infixpos=" << (*it)->infixpos() << endl;
-	  cerr << "len=" << len << endl;
-	}
-	it = resolveAffix( parts, it );
-      }
-      else {
-	++it;
-      }
-    }
-  }
-}
-
-void BracketNest::resolveMiddle(){
-  list<BaseBracket*>::iterator it = parts.begin();
-  while ( it != parts.end() ){
-    // now search for other rules with a * in the middle
-    if ( debugFlag > 5 ){
-      cerr << "hoofd infix loop bekijk: " << *it << endl;
-    }
-    if ( (*it)->isNested() ){
-      if ( debugFlag > 5 ){
-	cerr << "nested! " << endl;
-      }
-      (*it)->resolveMiddle( );
-      ++it;
-    }
-    else {
-      size_t len = (*it)->RightHand.size();
-      if ( (*it)->infixpos() > 0
-	   && (*it)->infixpos() < signed(len)-1 ){
-	it = resolveAffix( parts, it );
-      }
-      else {
-	++it;
-      }
-    }
-  }
-}
-
-CLEX::Type BracketNest::getFinalTag() {
-  // cerr << "get Final Tag from: " << this << endl;
-  cls = CLEX::X;
-  list<BaseBracket*>::const_reverse_iterator it = parts.rbegin();
-  while ( it != parts.rend() ){
-    // cerr << "bekijk: " << *it << endl;
-    if ( (*it)->isNested()
-	 || ( (*it)->inflection().empty()
-	      && !(*it)->morpheme().isEmpty() ) ){
-      cls = (*it)->tag();
-      // cerr << "final tag = " << cls << endl;
-      break;
-    }
-    ++it;
-  }
-  //  cerr << "final tag = X " << endl;
-  return cls;
-}
-
-BracketNest *Rule::resolveBrackets( bool daring, CLEX::Type& tag  ) {
-  if ( debugFlag > 5 ){
-    cerr << "check rule for bracketing: " << this << endl;
-  }
-  BracketNest *brackets = new BracketNest( CLEX::UNASS, debugFlag );
-  for ( size_t k=0; k < rules.size(); ++k ) {
-    // fill a flat result;
-    BracketLeaf *tmp = new BracketLeaf( rules[k], debugFlag );
-    if ( tmp->stat() == STEM && tmp->morpheme().isEmpty() ){
-      delete tmp;
-    }
-    else {
-      brackets->append( tmp );
-    }
-  }
-  if ( debugFlag > 5 ){
-    cerr << "STEP 1:" << brackets << endl;
-  }
-  if ( daring ){
-    brackets->resolveNouns( );
-    if ( debugFlag > 5 ){
-      cerr << "STEP 2:" << brackets << endl;
-    }
-    brackets->resolveLead( );
-    if ( debugFlag > 5 ){
-      cerr << "STEP 3:" << brackets << endl;
-    }
-    brackets->resolveTail( );
-    if ( debugFlag > 5 ){
-      cerr << "STEP 4:" << brackets << endl;
-    }
-    brackets->resolveMiddle();
-  }
-  tag = brackets->getFinalTag();
-  if ( debugFlag > 5 ){
-    cerr << "Final Bracketing:" << brackets << endl;
-  }
-  return brackets;
-}
-
-bool Mbma::performEdits( Rule& rule ){
-  if ( debugFlag){
-    *Log(mbmaLog) << "FOUND rule " << rule << endl;
-  }
-  RulePart *last = 0;
-  for ( size_t k=0; k < rule.rules.size(); ++k ) {
-    RulePart *cur = &rule.rules[k];
-    if ( last == 0 )
-      last = cur;
-    if ( debugFlag){
-      *Log(mbmaLog) << "edit::act=" << cur << endl;
-    }
-    if ( !cur->del.isEmpty() && cur->ins != "eer" ){
-      // sanity check
-      for ( int j=0; j < cur->del.length(); ++j ){
-	if ( rule.rules[k+j].uchar != cur->del[j] ){
-	  UnicodeString tmp(cur->del[j]);
-	  *Log(mbmaLog) << "Hmm: deleting " << cur->del << " is impossible. ("
-			<< rule.rules[k+j].uchar << " != " << tmp
-			<< ")." << endl;
-	  *Log(mbmaLog) << "Reject rule: " << rule << endl;
-	  return false;
-	}
-      }
+  insts.reserve( word.length() );
+  for ( long i=0; i < word.length(); ++i ) {
+    if (debugFlag > 10){
+      LOG << "itt #:" << i << endl;
     }
-    if ( !cur->participle ){
-      for ( int j=0; j < cur->del.length(); ++j ){
-	rule.rules[k+j].uchar = "";
+    UnicodeString inst;
+    for ( long j=i ; j <= i + RIGHT + LEFT; ++j ) {
+      if (debugFlag > 10){
+	LOG << " " << j-LEFT << ": ";
       }
-    }
-
-    bool inserted = false;
-    bool e_except = false;
-    if ( cur->isBasic() ){
-      // encountering real POS tag
-      // start a new morpheme, BUT: inserts are appended to the previous one
-      // except for Replace edits, exception on that again: "eer" inserts
-      if ( debugFlag ){
-	*Log(mbmaLog) << "FOUND a basic tag " << cur->ResultClass << endl;
+      if ( j < LEFT || j >= word.length()+LEFT ){
+	inst += '_';
       }
-      if ( cur->del.isEmpty() || cur->ins == "eer" ){
-	if ( !cur->del.isEmpty() && cur->ins == "eer" ){
-	  if ( debugFlag > 5 ){
-	    *Log(mbmaLog) << "special 'eer' exception." << endl;
-	    *Log(mbmaLog) << rule << endl;
-	  }
-	}
-	if ( cur->ins == "ere" ){
-	  if ( debugFlag > 5 ){
-	    *Log(mbmaLog) << "special 'ere' exception." << endl;
-	    *Log(mbmaLog) << rule << endl;
-	  }
-	  // strange exception
-	  last->morpheme += "er";
-	  e_except = true;
+      else {
+	if (word[j-LEFT] == ',' ){
+	  inst += 'C';
 	}
 	else {
-	  last->morpheme += cur->ins;
+	  inst += word[j-LEFT];
 	}
-	inserted = true;
       }
-      last = cur;
-    }
-    else if ( cur->ResultClass != CLEX::NEUTRAL && !cur->inflect.empty() ){
-      // non 0 inflection starts a new morheme
-      last = cur;
-    }
-    if ( !inserted ){
-      // insert the deletestring :-)
-      last->morpheme += cur->ins;
-    }
-    if ( e_except ) {
-      // fix exception
-      last->morpheme += "e";
-    }
-    last->morpheme += cur->uchar; // might be empty because of deletion
-  }
-  if ( debugFlag ){
-    *Log(mbmaLog) << "edited rule " << rule << endl;
-  }
-  return true;
-}
-
-MBMAana::MBMAana( const Rule& r, bool daring ): rule(r) {
-  CLEX::Type Tag;
-  brackets = rule.resolveBrackets( daring, Tag );
-  infl = rule.getCleanInflect();
-  map<CLEX::Type,string>::const_iterator tit = tagNames.find( Tag );
-  if ( tit == tagNames.end() ){
-    // unknown tag
-    tag = toString(CLEX::X);
-    description = "unknown";
-  }
-  else {
-    tag = toString(Tag);
-    description = tit->second;
-  }
-}
-
-string Rule::getCleanInflect() const {
-  // get the FIRST inflection and clean it up by extracting only
-  //  known inflection names
-  vector<RulePart>::const_iterator it = rules.begin();
-  while ( it != rules.end() ) {
-    if ( !it->inflect.empty() ){
-      //      cerr << "x inflect:'" << it->inflect << "'" << endl;
-      string inflect;
-      for ( size_t i=0; i< it->inflect.length(); ++i ) {
-	if ( it->inflect[i] != '/' ){
-	  // check if it is a known inflection
-	  //	    cerr << "x bekijk [" << it->inflect[i] << "]" << endl;
-	  map<char,string>::const_iterator csIt = iNames.find(it->inflect[i]);
-	  if ( csIt == iNames.end() ){
-	    // cerr << "added unknown inflection X" << endl;
-	    inflect += "X";
-	  }
-	  else {
-	    // cerr << "added known inflection " << csIt->first
-	    // 	 << " (" << csIt->second << ")" << endl;
-	    inflect += it->inflect[i];
-	  }
-	}
+      inst += ",";
+      if (debugFlag > 10){
+	LOG << " : " << inst << endl;
       }
-      //      cerr << "cleaned inflection " << inflect << endl;
-      return inflect;
     }
-    ++it;
+    inst += "?";
+    insts.push_back( UnicodeToUTF8(inst) );
   }
-  return "";
+  return insts;
 }
 
-#define OLD_STEP
-
-#ifdef OLD_STEP
 string find_class( unsigned int step,
 		   const vector<string>& classes,
 		   unsigned int nranal ){
   string result = classes[0];
   if ( nranal > 1 ){
     if ( classes.size() > 1 ){
-      if ( classes.size() > step )
+      if ( classes.size() > step ){
 	result = classes[step];
-      else
+      }
+      else {
 	result = "0";
+      }
     }
   }
   return result;
@@ -1326,152 +269,110 @@ vector<vector<string> > generate_all_perms( const vector<string>& classes ){
   // and store every part in a vector of string vectors
   int largest_anal=1;
   vector<vector<string> > classParts;
-  classParts.resize( classes.size() );
-  for ( unsigned int j=0; j< classes.size(); ++j ){
+  classParts.reserve( classes.size() );
+  for ( const auto& cl : classes ){
     vector<string> parts;
-    int num = split_at( classes[j], parts, "|" );
+    int num = split_at( cl, parts, "|" );
     if ( num > 0 ){
-      classParts[j] = parts;
-      if ( num > largest_anal )
+      classParts.push_back( parts );
+      if ( num > largest_anal ){
 	largest_anal = num;
+      }
     }
     else {
       // only one, create a dummy
       vector<string> dummy;
-      dummy.push_back( classes[j] );
-      classParts[j] = dummy;
+      dummy.push_back( cl );
+      classParts.push_back( dummy );
     }
   }
   //
   // now expand the result
   vector<vector<string> > result;
+  result.reserve( largest_anal );
   for ( int step=0; step < largest_anal; ++step ){
-    vector<string> item(classParts.size());
-    for ( size_t k=0; k < classParts.size(); ++k ) {
-      item[k] = find_class( step, classParts[k], largest_anal );
+    vector<string> item;
+    for ( const auto& cp : classParts ){
+      item.push_back( find_class( step, cp, largest_anal ) );
     }
     result.push_back( item );
   }
   return result;
 }
-#else
 
-bool next_perm( vector< vector<string>::const_iterator >& its,
-		const vector<vector<string> >& parts ){
-  for ( size_t i=0; i < parts.size(); ++i ){
-    ++its[i];
-    if ( its[i] == parts[i].end() ){
-      if ( i == parts.size() -1 )
-	return false;
-      its[i] = parts[i].begin();
-    }
-    else
-      return true;
+void Mbma::clearAnalysis(){
+  for ( const auto& a: analysis ){
+    delete a;
   }
-  return false;
+  analysis.clear();
 }
 
-vector<vector<string> > generate_all_perms( const vector<string>& classes ){
-
-  // determine all alternative analyses
-  // store every part in a vector of string vectors
-  vector<vector<string> > classParts;
-  classParts.resize( classes.size() );
-  for ( unsigned int j=0; j< classes.size(); ++j ){
-    vector<string> parts;
-    int num = split_at( classes[j], parts, "|" );
-    if ( num > 0 ){
-      classParts[j] = parts;
+Rule* Mbma::matchRule( const std::vector<std::string>& ana,
+		       const UnicodeString& word ){
+  Rule *rule = new Rule( ana, word, mbmaLog, debugFlag );
+  if ( rule->performEdits() ){
+    rule->reduceZeroNodes();
+    if ( debugFlag ){
+      LOG << "after reduction: " << rule << endl;
     }
-    else {
-      // only one, create a dummy
-      vector<string> dummy;
-      dummy.push_back( classes[j] );
-      classParts[j] = dummy;
+    rule->resolve_inflections();
+    if ( debugFlag ){
+      LOG << "after resolving: " << rule << endl;
     }
-  }
-  //
-  // now expand
-  vector< vector<string>::const_iterator > its( classParts.size() );
-  for ( size_t i=0; i<classParts.size(); ++i ){
-    its[i] = classParts[i].begin();
-  }
-  vector<vector<string> > result;
-  bool more = true;
-  while ( more ){
-    vector<string> item(classParts.size());
-    for( size_t j=0; j< classParts.size(); ++j ){
-      item[j] = *its[j];
+    rule->resolveBrackets( doDeepMorph );
+    rule->getCleanInflect();
+    if ( debugFlag ){
+      LOG << "1 added Inflection: " << rule << endl;
     }
-    result.push_back( item );
-    more = next_perm( its, classParts );
+    return rule;
   }
-  return result;
-}
-#endif
-
-void Mbma::clearAnalysis(){
-  for ( size_t i=0; i < analysis.size(); ++i ){
-    delete analysis[i];
+  else {
+    if ( debugFlag ){
+      LOG << "rejected rule: " << rule << endl;
+    }
+    delete rule;
+    return 0;
   }
-  analysis.clear();
 }
 
-void Mbma::execute( const UnicodeString& word,
-		    const vector<string>& classes ){
-  clearAnalysis();
+vector<Rule*> Mbma::execute( const UnicodeString& word,
+			     const vector<string>& classes ){
   vector<vector<string> > allParts = generate_all_perms( classes );
   if ( debugFlag ){
     string out = "alternatives: word=" + UnicodeToUTF8(word) + ", classes=<";
-    for ( size_t i=0; i < classes.size(); ++i )
-      out += classes[i] + ",";
+    for ( const auto& cls : classes ){
+      out += cls + ",";
+    }
     out += ">";
-    *Log(mbmaLog) << out << endl;
-    *Log(mbmaLog) << "allParts : " << allParts << endl;
+    LOG << out << endl;
+    LOG << "allParts : " << allParts << endl;
   }
 
+  vector<Rule*> accepted;
   // now loop over all the analysis
-  for ( unsigned int step=0; step < allParts.size(); ++step ) {
-    Rule rule( allParts[step], word, debugFlag );
-    if ( performEdits( rule ) ){
-      rule.reduceZeroNodes();
-      if ( debugFlag ){
-	*Log(mbmaLog) << "after reduction: " << rule << endl;
-      }
-      resolve_inflections( rule );
-      if ( debugFlag ){
-	*Log(mbmaLog) << "after resolving: " << rule << endl;
-      }
-      MBMAana *tmp = new MBMAana( rule, doDaring );
-      if ( debugFlag ){
-	*Log(mbmaLog) << "1 added Inflection: " << tmp << endl;
-      }
-      analysis.push_back( tmp );
-    }
-    else if ( debugFlag ){
-      *Log(mbmaLog) << "rejected rule: " << rule << endl;
+  for ( auto const& ana : allParts ){
+    Rule *rule = matchRule( ana, word );
+    if ( rule ){
+      accepted.push_back( rule );
     }
   }
-}
-
-void Mbma::addAltMorph( Word *word,
-			const vector<string>& morphs ) const {
-  Alternative *alt = new Alternative();
-  MorphologyLayer *ml = new MorphologyLayer();
-#pragma omp critical(foliaupdate)
-  {
-    alt->append( ml );
-    word->append( alt );
-  }
-  addMorph( ml, morphs );
+  return accepted;
 }
 
 void Mbma::addMorph( Word *word,
 		     const vector<string>& morphs ) const {
-  MorphologyLayer *ml = new MorphologyLayer();
+  KWargs args;
+  args["set"] = mbma_tagset;
+  MorphologyLayer *ml;
 #pragma omp critical(foliaupdate)
   {
-    word->append( ml );
+    try {
+      ml = word->addMorphologyLayer( args );
+    }
+    catch( const exception& e ){
+      LOG << e.what() << " addMorph failed." << endl;
+      exit(EXIT_FAILURE);
+    }
   }
   addMorph( ml, morphs );
 }
@@ -1479,33 +380,69 @@ void Mbma::addMorph( Word *word,
 void Mbma::addBracketMorph( Word *word,
 			    const string& wrd,
 			    const string& tag ) const {
-  //  *Log(mbmaLog) << "addBracketMorph(" << wrd << "," << tag << ")" << endl;
-  MorphologyLayer *ml = new MorphologyLayer();
+  if (debugFlag){
+    LOG << "addBracketMorph(" << wrd << "," << tag << ")" << endl;
+  }
+  string celex_tag = tag;
+  string head = tag;
+  if ( head == "LET" || head == "SPEC" ){
+    head.clear();
+  }
+  else if ( head == "X" ) {
+    // unanalysed, so trust the TAGGER
 #pragma omp critical(foliaupdate)
-  {
-    word->append( ml );
+    {
+      const auto pos = word->annotation<PosAnnotation>( cgn_tagset );
+      head = pos->feat("head");
+    }
+    if (debugFlag){
+      LOG << "head was X, tagger gives :" << head << endl;
+    }
+    const auto tagIt = TAGconv.find( head );
+    if ( tagIt == TAGconv.end() ) {
+      // this should never happen
+      throw ValueError( "unknown head feature '" + head + "'" );
+    }
+    celex_tag = tagIt->second;
+    head = CLEX::get_tDescr(CLEX::toCLEX(tagIt->second));
+    if (debugFlag){
+      LOG << "replaced X by: " << head << endl;
+    }
   }
+
   KWargs args;
+  args["set"] = mbma_tagset;
+  MorphologyLayer *ml;
+#pragma omp critical(foliaupdate)
+  {
+    try {
+      ml = word->addMorphologyLayer( args );
+    }
+    catch( const exception& e ){
+      LOG << e.what() << " addBracketMorph failed." << endl;
+      exit(EXIT_FAILURE);
+    }
+  }
   args["class"] = "stem";
-  Morpheme *result = new Morpheme( word->doc(), args );
+  Morpheme *result = new Morpheme( args, word->doc() );
   args.clear();
   args["value"] = wrd;
-  args["offset"] = "0";
   TextContent *t = new TextContent( args );
 #pragma omp critical(foliaupdate)
   {
     result->append( t );
   }
   args.clear();
-  args["value"] =  "[" + wrd + "]";
-  Description *d = new Description( args );
+  args["subset"] = "structure";
+  args["class"]  = "[" + wrd + "]" + head;
 #pragma omp critical(foliaupdate)
   {
-    result->append( d );
+    folia::Feature *feat = new folia::Feature( args );
+    result->append( feat );
   }
   args.clear();
   args["set"] = clex_tagset;
-  args["cls"] = tag;
+  args["class"] = celex_tag;
 #pragma omp critical(foliaupdate)
   {
     result->addPosAnnotation( args );
@@ -1517,253 +454,54 @@ void Mbma::addBracketMorph( Word *word,
 }
 
 void Mbma::addBracketMorph( Word *word,
+			    const string& orig_word,
 			    const BracketNest *brackets ) const {
-  MorphologyLayer *ml = new MorphologyLayer();
+  KWargs args;
+  args["set"] = mbma_tagset;
+  MorphologyLayer *ml;
 #pragma omp critical(foliaupdate)
   {
-    word->append( ml );
-  }
-  Morpheme *m = brackets->createMorpheme( word->doc(), clex_tagset );
-  if ( m ){
-#pragma omp critical(foliaupdate)
-    {
-      ml->append( m );
+    try {
+      ml = word->addMorphologyLayer( args );
     }
-  }
-}
-
-void Mbma::addAltBracketMorph( Word *word,
-			       const BracketNest *brackets ) const {
-  Alternative *alt = new Alternative();
-  MorphologyLayer *ml = new MorphologyLayer();
-#pragma omp critical(foliaupdate)
-  {
-    alt->append( ml );
-    word->append( alt );
-  }
-  Morpheme *m = brackets->createMorpheme( word->doc(), clex_tagset );
-  if ( m ){
-#pragma omp critical(foliaupdate)
-    {
-      ml->append( m );
+    catch( const exception& e ){
+      LOG << e.what() << " addBracketMorph failed." << endl;
+      exit(EXIT_FAILURE);
     }
   }
-}
-
-Morpheme *BracketLeaf::createMorpheme( Document *doc,
-				       const string& tagset ) const {
-  string desc;
-  int offset = 0;
-  return createMorpheme( doc, tagset, offset, desc );
-}
-
-Morpheme *BracketLeaf::createMorpheme( Document *doc,
-				       const string& tagset,
-				       int& offset,
-				       string& desc ) const {
-  Morpheme *result = 0;
-  desc.clear();
-  if ( status == STEM ){
-    KWargs args;
-    args["class"] = "stem";
-    result = new Morpheme( doc, args );
-    args.clear();
-    string out = UnicodeToUTF8(morph);
-    args["value"] = out;
-    args["offset"] = toString(offset);
-    offset += out.length();
-    TextContent *t = new TextContent( args );
-#pragma omp critical(foliaupdate)
-    {
-      result->append( t );
-    }
-    args.clear();
-    desc = "[" + out + "]";
-    args["value"] = desc;
-    Description *d = new Description( args );
-#pragma omp critical(foliaupdate)
-    {
-      result->append( d );
-    }
-    args.clear();
-    args["set"]  = tagset;
-    args["cls"] = toString( tag() );
-#pragma omp critical(foliaupdate)
-    {
-      result->addPosAnnotation( args );
-    }
+  Morpheme *m = 0;
+  try {
+    m = brackets->createMorpheme( word->doc() );
   }
-  else if ( status == INFLECTION ){
-    KWargs args;
-    args["class"] = "inflection";
-    result = new Morpheme( doc, args );
-    args.clear();
-    string out = UnicodeToUTF8(morph);
-    if ( out.empty() )
-      out = inflect;
-    else
-      desc = "[" + out + "]";
-    args["value"] = out;
-    args["offset"] = toString(offset);
-    TextContent *t = new TextContent( args );
-    offset += out.length();
-#pragma omp critical(foliaupdate)
-    {
-      result->append( t );
-    }
-    args.clear();
-    string inf_desc;
-    for ( size_t i=0; i < inflect.size(); ++i ){
-      string d = iNames[inflect[i]];
-      if ( i > 0 )
-	inf_desc += ", ";
-      inf_desc += d;
-    }
-    args.clear();
-    args["value"] = inf_desc;
-    Description *d = new Description( args );
-#pragma omp critical(foliaupdate)
-    {
-      result->append( d );
-    }
+  catch( const exception& e ){
+    cerr << "createMorpheme failed: " << e.what() << endl;
+    exit(1);
   }
-  else if ( status == DERIVATIONAL ){
-    KWargs args;
-    args["class"] = "derivational";
-    result = new Morpheme( doc, args );
+  if ( m ){
     args.clear();
-    string out = UnicodeToUTF8(morph);
-    args["value"] = out;
-    args["offset"] = toString(offset);
+    args["value"] = orig_word;
     TextContent *t = new TextContent( args );
-    offset += out.length();
-#pragma omp critical(foliaupdate)
-    {
-      result->append( t );
-    }
-    args.clear();
-    desc = "[" + out + "]";
-    args["value"] = desc;
-    Description *d = new Description( args );
-#pragma omp critical(foliaupdate)
-    {
-      result->append( d );
-    }
-    args.clear();
-    args["set"]  = tagset;
-    args["cls"]  = orig;
-#pragma omp critical(foliaupdate)
-    {
-      result->addPosAnnotation( args );
-    }
-  }
-  else {
-    KWargs args;
-    args["class"] = "inflection";
-    result = new Morpheme( doc, args );
-    string inf_desc;
-    for ( size_t i=0; i < inflect.size(); ++i ){
-      string d = iNames[inflect[i]];
-      if ( i > 0 )
-	inf_desc += ", ";
-      inf_desc += d;
-    }
-    args.clear();
-    args["value"] = inf_desc;
-    Description *d = new Description( args );
 #pragma omp critical(foliaupdate)
     {
-      result->append( d );
-    }
-  }
-  return result;
-}
-
-Morpheme *BracketNest::createMorpheme( Document *doc,
-				       const string& tagset ) const {
-  string desc;
-  int offset = 0;
-  return createMorpheme( doc, tagset, offset, desc );
-}
-
-Morpheme *BracketNest::createMorpheme( Document *doc,
-				       const string& tagset,
-				       int& of,
-				       string& desc ) const {
-  KWargs args;
-  args["class"] = "complex";
-  Morpheme *result = new Morpheme( doc, args );
-  list<BaseBracket*>::const_iterator it = parts.begin();
-  string mor;
-  int cnt = 0;
-  desc.clear();
-  vector<Morpheme*> stack;
-  int offset = 0;
-  while ( it != parts.end() ){
-    string deeper_desc;
-    Morpheme *m = (*it)->createMorpheme( doc, tagset, offset, deeper_desc );
-    if ( m ){
-      string tmp;
-      try {
-	tmp = m->str();
-      }
-      catch (...){
-      };
-      if ( !tmp.empty() ){
-	mor += tmp;
-	desc += deeper_desc;
-	++cnt;
-      }
-      stack.push_back( m );
+      m->append( t );
+      ml->append( m );
     }
-    ++it;
-  }
-  args.clear();
-  args["value"] = mor;
-  args["offset"] = toString(of);
-  of += offset;
-  TextContent *t = new TextContent( args );
-#pragma omp critical(foliaupdate)
-  {
-    result->append( t );
-  }
-  args.clear();
-  if ( cnt > 1 )
-    desc = "[" + desc + "]";
-  args["value"] = desc;
-  Description *d = new Description( args );
-#pragma omp critical(foliaupdate)
-  {
-    result->append( d );
-  }
-  args.clear();
-  args["set"]  = tagset;
-  args["cls"]  = toString( tag() );
-#pragma omp critical(foliaupdate)
-  {
-    result->addPosAnnotation( args );
   }
-#pragma omp critical(foliaupdate)
-  for ( size_t i=0; i < stack.size(); ++i ){
-    result->append( stack[i] );
-  }
-  return result;
 }
 
 void Mbma::addMorph( MorphologyLayer *ml,
 		     const vector<string>& morphs ) const {
-  int offset = 0;
-  for ( size_t p=0; p < morphs.size(); ++p ){
-    Morpheme *m = new Morpheme();
+  for ( const auto& mor : morphs ){
+    KWargs args;
+    args["set"] = mbma_tagset;
+    Morpheme *m = new Morpheme( args, ml->doc() );
 #pragma omp critical(foliaupdate)
     {
       ml->append( m );
     }
-    KWargs args;
-    args["value"] = morphs[p];
-    args["offset"] = toString(offset);
+    args.clear();
+    args["value"] = mor;
     TextContent *t = new TextContent( args );
-    offset += morphs[p].length();
 #pragma omp critical(foliaupdate)
     {
       m->append( t );
@@ -1771,52 +509,87 @@ void Mbma::addMorph( MorphologyLayer *ml,
   }
 }
 
-void Mbma::filterTag( const string& head,  const vector<string>& feats ){
+bool mbmacmp( Rule *m1, Rule *m2 ){
+  return m1->getKey(false).length() > m2->getKey(false).length();
+}
+
+void Mbma::filterHeadTag( const string& head ){
   // first we select only the matching heads
   if (debugFlag){
-    *Log(mbmaLog) << "filter with tag, head: " << head
-		  << " feats: " << feats << endl;
-    *Log(mbmaLog) << "filter:start, analysis is:" << endl;
-    int i=1;
-    for(vector<MBMAana*>::const_iterator it=analysis.begin(); it != analysis.end(); it++)
-      *Log(mbmaLog) << i++ << " - " << *it << endl;
+    LOG << "filter with head: " << head << endl;
+    LOG << "filter: analysis is:" << endl;
+    int i=0;
+    for ( const auto& it : analysis ){
+      LOG << ++i << " - " << it << endl;
+    }
   }
   map<string,string>::const_iterator tagIt = TAGconv.find( head );
   if ( tagIt == TAGconv.end() ) {
     // this should never happen
     throw ValueError( "unknown head feature '" + head + "'" );
   }
+  string celex_tag = tagIt->second;
   if (debugFlag){
-    *Log(mbmaLog) << "#matches: " << tagIt->first << " " << tagIt->second << endl;
+    LOG << "#matches: CGN:" << head << " CELEX " << celex_tag << endl;
   }
-  vector<MBMAana*>::iterator ait = analysis.begin();
+  auto ait = analysis.begin();
   while ( ait != analysis.end() ){
-    string tagI = (*ait)->getTag();
-    if ( tagIt->second == tagI || ( tagIt->second == "N" && tagI == "PN" ) ){
-      if (debugFlag)
-	*Log(mbmaLog) << "comparing " << tagIt->second << " with "
-		      << tagI << " (OK)" << endl;
-      ait++;
+    string mbma_tag = CLEX::toString((*ait)->tag);
+    if ( celex_tag == mbma_tag ){
+      if (debugFlag){
+	LOG << "comparing " << celex_tag << " with "
+		      << mbma_tag << " (OK)" << endl;
+      }
+      (*ait)->confidence = 1.0;
+      ++ait;
+    }
+    else if ( celex_tag == "N" && mbma_tag == "PN" ){
+      if (debugFlag){
+	LOG << "comparing " << celex_tag << " with "
+		      << mbma_tag << " (OK)" << endl;
+      }
+      (*ait)->confidence = 1.0;
+      ++ait;
+    }
+    else if ( ( celex_tag == "B" && mbma_tag == "A" )
+	      || ( celex_tag == "A" && mbma_tag == "B" ) ){
+      if (debugFlag){
+	LOG << "comparing " << celex_tag << " with "
+		      << mbma_tag << " (OK)" << endl;
+      }
+      (*ait)->confidence = 0.8;
+      ++ait;
+    }
+    else if ( celex_tag == "A" && mbma_tag == "V" ){
+      if (debugFlag){
+	LOG << "comparing " << celex_tag << " with "
+		      << mbma_tag << " (OK)" << endl;
+      }
+      (*ait)->confidence = 0.5;
+      ++ait;
     }
     else {
-      if (debugFlag)
-	*Log(mbmaLog) << "comparing " << tagIt->second << " with "
-		      << tagI << " (rejected)" << endl;
+      if (debugFlag){
+	LOG << "comparing " << celex_tag << " with "
+		      << mbma_tag << " (rejected)" << endl;
+      }
       delete *ait;
       ait = analysis.erase( ait );
     }
   }
   if (debugFlag){
-    *Log(mbmaLog) << "filter: analysis after first step" << endl;
-    int i=1;
-    for(vector<MBMAana*>::const_iterator it=analysis.begin(); it != analysis.end(); it++)
-      *Log(mbmaLog) << i++ << " - " << *it << endl;
+    LOG << "filter: analysis after head filter:" << endl;
+    int i=0;
+    for ( const auto& it : analysis ){
+      LOG << ++i << " - " << it << endl;
+    }
   }
+}
 
+void Mbma::filterSubTags( const vector<string>& feats ){
   if ( analysis.size() < 1 ){
     if (debugFlag ){
-      *Log(mbmaLog) << "analysis has size: " << analysis.size()
-		    << " so skip next filter" << endl;
+      LOG << "analysis is empty so skip next filter" << endl;
     }
     return;
   }
@@ -1826,92 +599,125 @@ void Mbma::filterTag( const string& head,  const vector<string>& feats ){
   // find best match
   // loop through all subfeatures of the tag
   // and match with inflections from each m
-  set<MBMAana *> bestMatches;
+  set<Rule *> bestMatches;
   int max_count = 0;
-  for ( size_t q=0; q < analysis.size(); ++q ) {
+  for ( const auto& q : analysis ){
     int match_count = 0;
-    string inflection = analysis[q]->getInflection();
+    string inflection = q->inflection;
+    if ( inflection.empty() ){
+      bestMatches.insert(q);
+      continue;
+    }
     if (debugFlag){
-      *Log(mbmaLog) << "matching " << inflection << " with " << feats << endl;
+      LOG << "matching " << inflection << " with " << feats << endl;
     }
-    for ( size_t u=0; u < feats.size(); ++u ) {
-      map<string,string>::const_iterator conv_tag_p = TAGconv.find(feats[u]);
+    for ( const auto& feat : feats ){
+      map<string,string>::const_iterator conv_tag_p = TAGconv.find( feat );
       if (conv_tag_p != TAGconv.end()) {
 	string c = conv_tag_p->second;
 	if (debugFlag){
-	  *Log(mbmaLog) << "found " << feats[u] << " ==> " << c << endl;
+	  LOG << "found " << feat << " ==> " << c << endl;
 	}
 	if ( inflection.find( c ) != string::npos ){
 	  if (debugFlag){
-	    *Log(mbmaLog) << "it is in the inflection " << endl;
+	    LOG << "it is in the inflection " << endl;
 	  }
 	  match_count++;
 	}
       }
     }
     if (debugFlag)
-      *Log(mbmaLog) << "score: " << match_count << " max was " << max_count << endl;
+      LOG << "score: " << match_count << " max was " << max_count << endl;
     if (match_count >= max_count) {
       if (match_count > max_count) {
 	max_count = match_count;
 	bestMatches.clear();
       }
-      bestMatches.insert(analysis[q]);
+      bestMatches.insert(q);
+    }
+  }
+  //
+  // now filter on confidence:
+  //
+  if ( debugFlag ){
+    LOG << "filter: best matches before sort on confidence:" << endl;
+    int i=0;
+    for ( const auto& it : bestMatches ){
+      LOG << ++i << " - " << it << endl;
     }
+    LOG << "" << endl;
   }
-  // so now we have "the" best matches.
-  // Weed the rest
-  vector<MBMAana*> res;
-  set<MBMAana*>::const_iterator bit = bestMatches.begin();
-  while ( bit != bestMatches.end() ){
-    res.push_back( *bit );
-    ++bit;
+  double best_conf = -0.1;
+  set<Rule*> highConf;
+  for ( const auto& it : bestMatches ){
+    if ( it->confidence >= best_conf ){
+      if ( it->confidence > best_conf ){
+	best_conf = it->confidence;
+	highConf.clear();
+      }
+      highConf.insert( it );
+    }
   }
-  if (debugFlag){
-    *Log(mbmaLog) << "filter: analysis after second step" << endl;
-    int i=1;
-    for(vector<MBMAana*>::const_iterator it=res.begin(); it != res.end(); it++)
-      *Log(mbmaLog) << i++ << " - " <<  *it << endl;
-    *Log(mbmaLog) << "start looking for doubles" << endl;
+  // now we can remove all analysis that aren't in the set.
+  auto it = analysis.begin();
+  while ( it != analysis.end() ){
+    if ( highConf.find( *it ) == highConf.end() ){
+      delete *it;
+      it = analysis.erase( it );
+    }
+    else {
+      ++it;
+    }
   }
+
   //
-  // but now we still might have doubles
+  // we still might have doubles. (different Rule's yielding the same result)
+  // reduce these
   //
-  map<string, MBMAana*> unique;
-  vector<MBMAana*>::iterator it=res.begin();
-  while (  it != res.end() ){
-    string tmp;
-    if ( doDaring ){
-      stringstream ss;
-      ss << (*it)->getBrackets() << endl;
-      tmp = ss.str();
+  map<UnicodeString, Rule*> unique;
+  for ( const auto& ait : highConf ){
+    UnicodeString tmp = ait->getKey( doDeepMorph );
+    unique[tmp] = ait;
+  }
+  // so now we have map of 'equal' analysis.
+  // create a set for revers lookup.
+  set<Rule*> uniqueAna;
+  for ( auto const& uit : unique ){
+    uniqueAna.insert( uit.second );
+  }
+  // now we can remove all analysis that aren't in that set.
+  it = analysis.begin();
+  while ( it != analysis.end() ){
+    if ( uniqueAna.find( *it ) == uniqueAna.end() ){
+      delete *it;
+      it = analysis.erase( it );
     }
     else {
-      vector<string> v = (*it)->getMorph();
-      // create an unique key
-      for ( size_t p=0; p < v.size(); ++p ) {
-	tmp += v[p] + "+";
-      }
+      ++it;
     }
-    unique[tmp] = *it;
-    ++it;
   }
-  vector<MBMAana*> result;
-  map<string, MBMAana*>::const_iterator uit=unique.begin();
-  while ( uit != unique.end() ){
-    result.push_back( uit->second );
-    if (debugFlag){
-      *Log(mbmaLog) << "Final Bracketing: " << uit->second->getBrackets() << endl;
+  if ( debugFlag ){
+    LOG << "filter: analysis before sort on length:" << endl;
+    int i=0;
+    for ( const auto& it : analysis ){
+      LOG << ++i << " - " << it << " " << it->getKey(false)
+		    << " (" << it->getKey(false).length() << ")" << endl;
     }
-    ++uit;
+    LOG << "" << endl;
   }
-  analysis = result;
-  if (debugFlag){
-    *Log(mbmaLog) << "filter: definitive analysis:" << endl;
-    int i=1;
-    for(vector<MBMAana*>::const_iterator it=analysis.begin(); it != analysis.end(); it++)
-      *Log(mbmaLog) << i++ << " - " << *it << endl;
-    *Log(mbmaLog) << "done filtering" << endl;
+  // Now we have a small list of unique and differtent analysis.
+  // We assume the 'longest' analysis to be the best.
+  // So we prefer '[ge][maak][t]' over '[gemaak][t]'
+  // Therefor we sort on (unicode) string length
+  sort( analysis.begin(), analysis.end(), mbmacmp );
+
+  if ( debugFlag){
+    LOG << "filter: definitive analysis:" << endl;
+    int i=0;
+    for ( auto const& it : analysis ){
+      LOG << ++i << " - " << it << endl;
+    }
+    LOG << "done filtering" << endl;
   }
   return;
 }
@@ -1920,11 +726,11 @@ void Mbma::getFoLiAResult( Word *fword, const UnicodeString& uword ) const {
   if ( analysis.size() == 0 ){
     // fallback option: use the word and pretend it's a morpheme ;-)
     if ( debugFlag ){
-      *Log(mbmaLog) << "no matches found, use the word instead: "
+      LOG << "no matches found, use the word instead: "
 		    << uword << endl;
     }
-    if ( doDaring ){
-      addBracketMorph( fword, UnicodeToUTF8(uword), "UNK" );
+    if ( doDeepMorph ){
+      addBracketMorph( fword, UnicodeToUTF8(uword), "X" );
     }
     else {
       vector<string> tmp;
@@ -1933,33 +739,28 @@ void Mbma::getFoLiAResult( Word *fword, const UnicodeString& uword ) const {
     }
   }
   else {
-    vector<MBMAana*>::const_iterator sit = analysis.begin();
-    while( sit != analysis.end() ){
-      if ( sit == analysis.begin() ){
-	if ( doDaring )
-	  addBracketMorph( fword, (*sit)->getBrackets() );
-	else
-	  addMorph( fword, (*sit)->getMorph() );
+    for ( auto const& sit : analysis ){
+      if ( doDeepMorph ){
+	addBracketMorph( fword, UnicodeToUTF8(uword), sit->brackets );
       }
       else {
-	if ( doDaring )
-	  addAltBracketMorph( fword, (*sit)->getBrackets() );
-	else
-	  addAltMorph( fword, (*sit)->getMorph() );
+	addMorph( fword, sit->extract_morphemes() );
       }
-      ++sit;
     }
   }
 }
 
 void Mbma::addDeclaration( Document& doc ) const {
-  doc.declare( AnnotationType::MORPHOLOGICAL, tagset,
-	       "annotator='frog-mbma-" +  version +
-	       + "', annotatortype='auto', datetime='" + getTime() + "'");
-  if ( doDaring ){
-    doc.declare( AnnotationType::POS, clex_tagset,
+#pragma omp critical(foliaupdate)
+  {
+    doc.declare( AnnotationType::MORPHOLOGICAL, mbma_tagset,
 		 "annotator='frog-mbma-" +  version +
 		 + "', annotatortype='auto', datetime='" + getTime() + "'");
+    if ( doDeepMorph ){
+      doc.declare( AnnotationType::POS, clex_tagset,
+		   "annotator='frog-mbma-" +  version +
+		   + "', annotatortype='auto', datetime='" + getTime() + "'");
+    }
   }
 }
 
@@ -1969,13 +770,15 @@ UnicodeString Mbma::filterDiacritics( const UnicodeString& in ) const {
     transliterator->transliterate( result );
     return result;
   }
-  else
+  else {
     return in;
+  }
 }
 
 void Mbma::Classify( Word* sword ){
-  if ( sword->isinstance(PlaceHolder_t) )
+  if ( sword->isinstance(PlaceHolder_t) ){
     return;
+  }
   UnicodeString uWord;
   PosAnnotation *pos;
   string head;
@@ -1987,15 +790,18 @@ void Mbma::Classify( Word* sword ){
     head = pos->feat("head");
     token_class = sword->cls();
   }
-  if (debugFlag)
-    *Log(mbmaLog) << "Classify " << uWord << "(" << pos << ") ["
+  if (debugFlag ){
+    LOG << "Classify " << uWord << "(" << pos << ") ["
 		  << token_class << "]" << endl;
-  if ( filter )
+  }
+  if ( filter ){
     uWord = filter->filter( uWord );
-  if ( head == "LET" || head == "SPEC" ){
+  }
+  if ( head == "LET" || head == "SPEC" || token_class == "ABBREVIATION" ){
     // take over the letter/word 'as-is'.
+    //  also ABBREVIATION's aren't handled bij mbma-rules
     string word = UnicodeToUTF8( uWord );
-    if ( doDaring ){
+    if ( doDeepMorph ){
       addBracketMorph( sword, word, head );
     }
     else {
@@ -2006,77 +812,57 @@ void Mbma::Classify( Word* sword ){
   }
   else {
     UnicodeString lWord = uWord;
-    if ( head != "SPEC" )
+    if ( head != "SPEC" ){
       lWord.toLower();
+    }
     Classify( lWord );
     vector<string> featVals;
 #pragma omp critical(foliaupdate)
     {
       vector<folia::Feature*> feats = pos->select<folia::Feature>();
-      for ( size_t i = 0; i < feats.size(); ++i )
-	featVals.push_back( feats[i]->cls() );
+      featVals.reserve( feats.size() );
+      for ( const auto& feat : feats )
+	featVals.push_back( feat->cls() );
     }
-    filterTag( head, featVals );
+    filterHeadTag( head );
+    filterSubTags( featVals );
     getFoLiAResult( sword, lWord );
   }
 }
 
 void Mbma::Classify( const UnicodeString& word ){
+  clearAnalysis();
   UnicodeString uWord = filterDiacritics( word );
   vector<string> insts = make_instances( uWord );
   vector<string> classes;
-  for( size_t i=0; i < insts.size(); ++i ) {
+  classes.reserve( insts.size() );
+  int i = 0;
+  for ( auto const& inst : insts ) {
     string ans;
-    MTree->Classify( insts[i], ans );
+    MTree->Classify( inst, ans );
     if ( debugFlag ){
-      *Log(mbmaLog) << "itt #" << i << " " << insts[i] << " ==> " << ans
+      LOG << "itt #" << i+1 << " " << insts[i] << " ==> " << ans
 		    << ", depth=" << MTree->matchDepth() << endl;
+      ++i;
     }
     classes.push_back( ans);
   }
 
   // fix for 1st char class ==0
-  if ( classes[0] == "0" )
+  if ( classes[0] == "0" ){
     classes[0] = "X";
-  execute( uWord, classes );
+  }
+  analysis = execute( uWord, classes );
 }
 
-vector<vector<string> > Mbma::getResult() const {
-  vector<vector<string> > result;
-  for (vector<MBMAana*>::const_iterator it=analysis.begin();
-       it != analysis.end();
-       it++ ){
-    if ( doDaring ){
-      stringstream ss;
-      ss << (*it)->getBrackets()->put( true ) << endl;
-      vector<string> mors;
-      mors.push_back( ss.str() );
-      result.push_back( mors );
-    }
-    else {
-      vector<string> mors = (*it)->getMorph();
-      if ( debugFlag ){
-	*Log(mbmaLog) << "Morphs " << mors << endl;
-      }
-      result.push_back( mors );
-    }
+vector<string> Mbma::getResult() const {
+  vector<string> result;
+  for ( const auto& it : analysis ){
+    string tmp = it->morpheme_string( doDeepMorph );
+    result.push_back( tmp );
   }
   if ( debugFlag ){
-    *Log(mbmaLog) << "result of morph analyses: " << result << endl;
+    LOG << "result of morph analyses: " << result << endl;
   }
   return result;
 }
-
-ostream& operator<< ( ostream& os, const MBMAana& a ){
-  os << "tag: " << a.tag << " infl:" << a.infl << " morhemes: "
-     << a.rule.extract_morphemes() << " description: " << a.description;
-  return os;
-}
-
-ostream& operator<< ( ostream& os, const MBMAana *a ){
-  if ( a )
-    os << *a;
-  else
-    os << "no-mbma";
-  return os;
-}
diff --git a/src/mbma_prog.cxx b/src/mbma_prog.cxx
index da62381..845f833 100644
--- a/src/mbma_prog.cxx
+++ b/src/mbma_prog.cxx
@@ -1,13 +1,13 @@
+/* ex: set tabstop=8 expandtab: */
 /*
-  $Id:$
-  $URL:$
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
 
-  Copyright (c) 2006 - 2014
-  Tilburg University
+  This file is part of frog:
 
-  A Morphological-Analyzer for Dutch
-
-  This file is part of frog
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
 
   frog is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -23,11 +23,11 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
   For questions and suggestions, see:
-      http://ilk.uvt.nl/software.html
+      https://github.com/LanguageMachines/frog/issues
   or send mail to:
-      timbl at uvt.nl
-*/
+      lamasoftware (at ) science.ru.nl
 
+*/
 
 #include <string>
 #include <iostream>
@@ -37,9 +37,10 @@
 #include <map>
 
 #include "config.h"
-#include "timbl/TimblAPI.h"
 #include "ticcutils/LogStream.h"
 #include "ticcutils/Configuration.h"
+#include "ticcutils/CommandLine.h"
+#include "ticcutils/PrettyPrint.h"
 #include "libfolia/folia.h"
 #include "frog/ucto_tokenizer_mod.h"
 #include "frog/cgn_tagger_mod.h"
@@ -47,20 +48,22 @@
 
 using namespace std;
 using namespace Timbl;
+using namespace TiCC;
+using namespace Tagger;
 
 LogStream my_default_log( cerr, "", StampMessage ); // fall-back
 LogStream *theErrLog = &my_default_log;  // fill the externals
 
-string TestFileName;
-string ProgName;
-bool doAll = false;
+vector<string> fileNames;
+bool useTagger = true;
+bool useTokenizer = true;
 
 Configuration configuration;
 static string configDir = string(SYSCONF_PATH) + "/" + PACKAGE + "/";
 static string configFileName = configDir + "frog.cfg";
 
-static UctoTokenizer tokenizer;
-static CGNTagger tagger;
+static UctoTokenizer tokenizer(theErrLog);
+static CGNTagger tagger(theErrLog);
 
 void usage( ) {
   cout << endl << "Options:\n";
@@ -70,30 +73,23 @@ void usage( ) {
        << "\t============= OTHER OPTIONS ============================================\n"
        << "\t -h. give some help.\n"
        << "\t -V or --version .   Show version info.\n"
-       << "\t --daring=<true|false>. Default false\n"
+       << "\t --deep-morph. Deliver structured output. Default false\n"
        << "\t -d <debug level>    (for more verbosity)\n";
 }
 
-static Mbma myMbma;
+static Mbma myMbma(theErrLog);
 
-bool parse_args( TimblOpts& Opts ) {
-  string value;
-  bool mood;
-  if ( Opts.Find('V', value, mood ) ||
-       Opts.Find("version", value, mood ) ){
+bool parse_args( TiCC::CL_Options& Opts ) {
+  if ( Opts.is_present( 'V' ) || Opts.is_present("version") ){
     // we already did show what we wanted.
     exit( EXIT_SUCCESS );
   }
-  if ( Opts.Find ('h', value, mood)) {
+  if ( Opts.is_present('h') ){
     usage();
     exit( EXIT_SUCCESS );
   };
   // is a config file specified?
-  if ( Opts.Find( 'c',  value, mood ) ) {
-    configFileName = value;
-    Opts.Delete( 'c' );
-  };
-
+  Opts.extract( 'c', configFileName );
   if ( configuration.fill( configFileName ) ){
     cerr << "config read from: " << configFileName << endl;
   }
@@ -102,36 +98,32 @@ bool parse_args( TimblOpts& Opts ) {
     cerr << "did you correctly install the frogdata package?" << endl;
     return false;
   }
-
+  string value;
   // debug opts
-  if ( Opts.Find ('d', value, mood)) {
+  if ( Opts.extract('d', value ) ){
     int debug = 0;
     if ( !TiCC::stringTo<int>( value, debug ) ){
       cerr << "-d value should be an integer" << endl;
       return false;
     }
     configuration.setatt( "debug", value, "mbma" );
-    Opts.Delete('d');
   };
 
-  if ( Opts.Find( 't', value, mood )) {
-    TestFileName = value;
-    ifstream is( value.c_str() );
+  if ( Opts.extract( 't', value ) ){
+    ifstream is( value );
     if ( !is ){
       cerr << "input stream " << value << " is not readable" << endl;
       return false;
     }
-    Opts.Delete('t');
-  };
-  if ( Opts.Find( 'a', value, mood )) {
-    doAll = true;
-    Opts.Delete('a');
-  };
-  if ( Opts.Find( "daring", value, mood )) {
-    if ( value.empty() )
-      value = "1";
-    configuration.setatt( "daring", value, "mbma" );
-    Opts.Delete("daring");
+    fileNames.push_back( value );
+  }
+  else {
+    fileNames = Opts.getMassOpts();
+  }
+  useTagger = !Opts.extract( "notagger" );
+  useTokenizer = !Opts.extract( "notokenizer" );
+  if ( Opts.extract( "deep-morph" ) ){
+    configuration.setatt( "deep-morph", "1", "mbma" );
   };
   return true;
 }
@@ -144,13 +136,17 @@ bool init(){
     cerr << "MBMA Initialization failed." << endl;
     return false;
   }
-  if ( !tokenizer.init( configuration, "", false ) ){
-    cerr << "UCTO Initialization failed." << endl;
-    return false;
+  if ( useTokenizer ){
+    if ( !tokenizer.init( configuration ) ){
+      cerr << "UCTO Initialization failed." << endl;
+      return false;
+    }
   }
-  if ( !tagger.init( configuration ) ){
-    cerr << "CGN Initialization failed." << endl;
-    return false;
+  if ( useTagger ){
+    if ( !tagger.init( configuration ) ){
+      cerr << "CGN Initialization failed." << endl;
+      return false;
+    }
   }
   cerr << "Initialization done." << endl;
   return true;
@@ -160,41 +156,68 @@ void Test( istream& in ){
   string line;
   while ( getline( in, line ) ){
     line = TiCC::trim( line );
-    if ( line.empty() )
+    if ( line.empty() ){
       continue;
+    }
     cerr << "processing: " << line << endl;
-    vector<string> sentences = tokenizer.tokenize( line );
-    for ( size_t s=0; s < sentences.size(); ++s ){
-      vector<TagResult> tagv = tagger.tagLine(sentences[s]);
-      for ( size_t w=0; w < tagv.size(); ++w ){
-	UnicodeString uWord = folia::UTF8ToUnicode(tagv[w].word());
-	vector<string> v;
-	size_t num = TiCC::split_at_first_of( tagv[w].assignedTag(),
-					      v, "(,)" );
-	if ( num < 1 ){
-	  throw runtime_error( "error: tag not in right format " );
+    vector<string> sentences;
+    if ( useTokenizer ){
+      sentences = tokenizer.tokenize( line );
+    }
+    else {
+      sentences.push_back( line );
+    }
+    for ( auto const& s : sentences ){
+      if ( useTagger ){
+	vector<TagResult> tagv = tagger.tagLine( s );
+	for ( const auto& tr : tagv ){
+	  UnicodeString uWord = folia::UTF8ToUnicode( tr.word() );
+	  vector<string> v;
+	  size_t num = TiCC::split_at_first_of( tr.assignedTag(),
+						v, "(,)" );
+	  if ( num < 1 ){
+	    throw runtime_error( "error: tag not in right format " );
+	  }
+	  string head = v[0];
+	  if ( head != "SPEC" ){
+	    uWord.toLower();
+	  }
+	  myMbma.Classify( uWord );
+	  myMbma.filterHeadTag( head );
+	  myMbma.filterSubTags( v );
+	  vector<string> res = myMbma.getResult();
+	  cout << tr.word() << " {" << tr.assignedTag() << "}\t";
+	  if ( res.size() == 0 ){
+	    cout << "[" << uWord << "]";
+	  }
+	  else {
+	    for ( const auto& r : res ){
+	      cout << r;
+	      if ( &r != &res.back() ){
+		cout << "/";
+	      }
+	    }
+	  }
+	  cout << endl;
 	}
-	string head = v[0];
-	if ( head != "SPEC" )
+      }
+      else {
+	vector<string> parts;
+	TiCC::split( s, parts );
+	for ( auto const& w : parts ){
+	  UnicodeString uWord = folia::UTF8ToUnicode(w);
 	  uWord.toLower();
-	myMbma.Classify( uWord );
-	if ( !doAll ){
-	  v.erase(v.begin());
-	  myMbma.filterTag( head, v );
-	}
-	vector<vector<string> > res = myMbma.getResult();
-	cout << tagv[w].word() << " {" << tagv[w].assignedTag() << "}\t";
-	if ( res.size() == 0 ){
-	  cout << "[" << uWord << "]";
-	}
-	else {
-	  for ( size_t i=0; i < res.size(); ++i ){
-	    cout << res[i];
-	    if ( i < res.size()-1 )
-	      cout << "/";
+	  myMbma.Classify( uWord );
+	  vector<string> res = myMbma.getResult();
+	  string line = w + "\t";
+	  for ( auto const& r : res ){
+	    line += r;
+	    if ( &r != &res.back() ){
+	      line += "/";
+	    }
 	  }
+	  cout << line << endl;
 	}
-	cout << endl;
       }
       cout << "<utt>" << endl << endl;
     }
@@ -206,19 +229,28 @@ void Test( istream& in ){
 
 int main(int argc, char *argv[]) {
   std::ios_base::sync_with_stdio(false);
-  cerr << "mbma " << VERSION << " (c) ILK 1998 - 2014" << endl;
-  cerr << "Induction of Linguistic Knowledge Research Group, Tilburg University" << endl;
-  ProgName = argv[0];
+  cerr << "mbma " << VERSION << " (c) CLTS, ILK 2014 - 2016" << endl;
+  cerr << "CLST  - Centre for Language and Speech Technology,"
+       << "Radboud University" << endl
+       << "ILK   - Induction of Linguistic Knowledge Research Group,"
+       << "Tilburg University" << endl;
+  TiCC::CL_Options Opts("Vt:d:hc:","deep-morph,version,notagger,notokenizer");
+  try {
+    Opts.init(argc, argv);
+  }
+  catch ( const exception& e ){
+    cerr << "fatal error: " << e.what() << endl;
+    return EXIT_FAILURE;
+  }
   cerr << "based on [" << Timbl::VersionName() << "]" << endl;
   cerr << "configdir: " << configDir << endl;
-  try {
-    TimblOpts Opts(argc, argv);
-    if ( parse_args(Opts) ){
-      if (  !init() ){
-	cerr << "terminated." << endl;
-	return EXIT_FAILURE;
-      }
-      ifstream in(TestFileName.c_str() );
+  if ( parse_args(Opts) ){
+    if (  !init() ){
+      cerr << "terminated." << endl;
+      return EXIT_FAILURE;
+    }
+    for ( const auto& TestFileName : fileNames ){
+      ifstream in(TestFileName);
       if ( in.good() ){
 	cerr << "Processing: " << TestFileName << endl;
 	Test( in );
@@ -228,12 +260,8 @@ int main(int argc, char *argv[]) {
 	return EXIT_FAILURE;
       }
     }
-    else {
-      return EXIT_FAILURE;
-    }
   }
-  catch ( const exception& e ){
-    cerr << "fatal error: " << e.what() << endl;
+  else {
     return EXIT_FAILURE;
   }
   return EXIT_SUCCESS;
diff --git a/src/mbma_rule.cxx b/src/mbma_rule.cxx
new file mode 100644
index 0000000..fe832d0
--- /dev/null
+++ b/src/mbma_rule.cxx
@@ -0,0 +1,563 @@
+/* ex: set tabstop=8 expandtab: */
+/*
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
+
+  This file is part of frog:
+
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
+
+  frog 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.
+
+  frog 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/>.
+
+  For questions and suggestions, see:
+      https://github.com/LanguageMachines/frog/issues
+  or send mail to:
+      lamasoftware (at ) science.ru.nl
+
+*/
+
+#include <string>
+#include <vector>
+#include <list>
+#include <iostream>
+#include "ticcutils/LogStream.h"
+#include "ticcutils/StringOps.h"
+#include "ticcutils/PrettyPrint.h"
+#include "libfolia/folia.h"
+#include "frog/clex.h"
+#include "frog/mbma_brackets.h"
+#include "frog/mbma_rule.h"
+
+using namespace std;
+using namespace folia;
+using TiCC::operator<<;
+
+bool RulePart::isBasic() const {
+  return isBasicClass( ResultClass );
+}
+
+ostream& operator<<( ostream& os, const RulePart& r ){
+  if ( r.ResultClass == CLEX::UNASS &&
+       r.inflect.empty() ){
+    os << "INVALID! No result node, AND no inflection" << endl;
+  }
+  else {
+    os << r.uchar << " - ";
+    for ( const auto& rh : r.RightHand ){
+      os << rh;
+      if ( &rh < &r.RightHand.back() ){
+	os << "+";
+      }
+    }
+    if ( !r.RightHand.empty() ){
+      os << " ==> ";
+    }
+    os << r.ResultClass << " ";
+    if ( !r.inflect.empty() ){
+      os << " INFLECTION: " << r.inflect;
+    }
+  }
+  if ( r.fixpos >= 0 ){
+    os << " affix at pos: " << r.fixpos;
+  }
+  if ( r.xfixpos >= 0 ){
+    os << " x-affix at pos: " << r.xfixpos;
+  }
+  if ( !r.ins.isEmpty() ){
+    os << " insert='" << r.ins << "'";
+  }
+  if ( !r.del.isEmpty() ){
+    os << " delete='" << r.del << "'";
+  }
+  if ( !r.morpheme.isEmpty() ){
+    os << " morpheme ='" << r.morpheme << "'";
+  }
+  return os;
+}
+
+ostream& operator<<( ostream& os, const RulePart *r ){
+  return os << *r;
+}
+
+void RulePart::get_ins_del( const string& edit ){
+  if (edit[0]=='D') { // delete operation
+    string s = edit.substr(1);
+    ins = UTF8ToUnicode( s );
+  }
+  else if ( edit[0]=='I') {  //insert operation
+    string s = edit.substr(1);
+    del = UTF8ToUnicode( s );
+  }
+  else if ( edit[0]=='R') { // replace operation
+    string::size_type pos = edit.find( ">" );
+    string s = edit.substr( 1, pos-1 );
+    ins = UTF8ToUnicode( s );
+    s = edit.substr( pos+1 );
+    del = UTF8ToUnicode( s );
+  }
+}
+
+RulePart::RulePart( const string& rs, const UChar kar, bool first ):
+  ResultClass(CLEX::UNASS),
+  uchar(kar),
+  fixpos(-1),
+  xfixpos(-1),
+  participle(false)
+{
+  //  cerr << "extract RulePart:" << rs << endl;
+  string edit;
+  string s = rs;
+  string::size_type ppos = rs.find("+");
+  if ( ppos != string::npos ){
+    // some edit info is available
+    string::size_type spos = rs.find("/");
+    if ( spos != string::npos ){
+      // inflection too
+      inflect = rs.substr( spos+1 );
+      //    cerr << "inflect = " << inflect << endl;
+      edit = rs.substr( ppos+1, spos-ppos-1 );
+    }
+    else {
+      edit = rs.substr( ppos+1 );
+    }
+    //    cerr << "EDIT = " << edit << endl;
+    get_ins_del( edit );
+    s = rs.substr(0, ppos );
+    participle = ( s.find( "pv" ) != string::npos ) &&
+      ( del == "ge" );
+  }
+  string::size_type pos = s.find("_");
+  if ( pos != string::npos ){
+    ResultClass = CLEX::toCLEX( s[0] );
+    // a rewrite RulePart
+    if ( pos != 1 ){
+      cerr << "Surprise! _ on a strange position:" << pos << " in " << s << endl;
+    }
+    else {
+      string rhs = s.substr( pos+1 );
+      //      cerr << "RHS = " << rhs << endl;
+      string::size_type spos = rhs.find("/");
+      if ( spos != string::npos ){
+	// inflection too
+	inflect = rhs.substr( spos+1 );
+	// cerr << "inflect = " << inflect << endl;
+	rhs = rhs.substr( 0, spos );
+      }
+      //      cerr << "RHS = " << rhs << endl;
+      RightHand.resize( rhs.size() );
+      for ( size_t i = 0; i < rhs.size(); ++i ){
+	CLEX::Type tag = CLEX::toCLEX( rhs[i] );
+	if ( tag == CLEX::UNASS ){
+	  cerr << "Unhandled class in rhs=" << rhs << endl;
+	  continue;
+	}
+	else {
+	  //	  cerr << "found tag '" << tag << "' in " << rhs << endl;
+	  RightHand[i] = tag;
+	  if ( tag == CLEX::AFFIX ){
+	    fixpos = i;
+	  }
+	  if ( tag == CLEX::XAFFIX ){
+	    xfixpos = i;
+	  }
+	}
+      }
+    }
+  }
+  else {
+    //    cerr << "normal RulePart " << s << endl;
+    CLEX::Type tag0 = CLEX::toCLEX( s[0] );
+    if ( !first && tag0 == CLEX::C ){
+      // special case: a C tag can only be at first postition
+      // otherwise it is a C inflection!
+      inflect = "C";
+      //      cerr << "inflect =" << inflect << endl;
+    }
+    else {
+      string::size_type pos = s.find("/");
+      CLEX::Type tag = CLEX::toCLEX( s );
+      if ( pos != string::npos ){
+	// some inflection
+	string ts = s.substr(0, pos );
+	//	cerr << "ts=" << ts << endl;
+	tag = CLEX::toCLEX( ts );
+	if ( tag0 != CLEX::UNASS ){
+	  // cases like 0/e 0/te2I
+	  ResultClass = tag;
+	  inflect = s.substr(pos+1);
+	}
+	else {
+	  //  E/P
+	  inflect = s;
+	}
+	//	cerr << "inflect =" << inflect << endl;
+      }
+      else if ( tag != CLEX::UNASS ){
+	// dull case
+	ResultClass = tag;
+      }
+      else {
+	// m
+	inflect = s;
+	//	cerr << "inflect =" << inflect << endl;
+      }
+    }
+  }
+}
+
+Rule::Rule( const vector<string>& parts,
+	    const UnicodeString& s,
+	    TiCC::LogStream* ls,
+	    int flag ):
+  debugFlag( flag ),
+  tag(CLEX::UNASS),
+  orig_word(s),
+  compound( Compound::Type::NONE ),
+  brackets(0),
+  myLog(ls),
+  confidence(0.0)
+{
+  for ( size_t k=0; k < parts.size(); ++k ) {
+    string this_class = parts[k];
+    RulePart cur( this_class, s[k], k==0 );
+    rules.push_back( cur );
+  }
+}
+
+Rule::~Rule(){
+  delete brackets;
+}
+
+ostream& operator<<( ostream& os, const Rule& r ){
+  os << "MBMA rule (" << r.orig_word << "):" << endl;
+  for ( const auto& rule : r.rules ){
+    os << "\t" << rule << endl;
+  }
+  os << "tag: " << r.tag << " infl:" << r.inflection << " morhemes: "
+     << r.extract_morphemes() << " description: " << r.description
+     << " confidence: " << r.confidence;
+  if ( r.compound != Compound::Type::NONE ){
+    os << " (" << r.compound << "-compound)"<< endl;
+  }
+  return os;
+}
+
+ostream& operator<<( ostream& os, const Rule *r ){
+  if ( r ){
+    os << *r << endl;
+  }
+  else {
+    os << "Empty MBMA rule" << endl;
+  }
+  return os;
+}
+
+void Rule::reduceZeroNodes(){
+  vector<RulePart> out;
+  for ( auto const& r : rules ){
+    if ( ( r.ResultClass == CLEX::NEUTRAL
+	   || r.fixpos == 1 )
+	 && r.morpheme.isEmpty()
+	 && r.inflect.empty() ){
+      // skip
+    }
+    else {
+      out.push_back(r);
+    }
+  }
+  rules.swap( out );
+}
+
+vector<string> Rule::extract_morphemes( ) const {
+  vector<string> morphemes;
+  morphemes.reserve( rules.size() );
+  for ( const auto& it : rules ){
+    UnicodeString morpheme = it.morpheme;
+    if ( !morpheme.isEmpty() ){
+      morphemes.push_back( UnicodeToUTF8(morpheme) );
+    }
+  }
+  return morphemes;
+}
+
+string Rule::morpheme_string( bool structured ) const {
+  string result;
+  if ( structured ){
+    UnicodeString us = brackets->put(false);
+    result = UnicodeToUTF8( us );
+  }
+  else {
+    vector<string> vec = extract_morphemes();
+    for ( const auto& m : vec ){
+      result += "[" + m + "]";
+    }
+  }
+  return result;
+}
+
+bool Rule::performEdits(){
+  if ( debugFlag ){
+    *TiCC::Log(myLog) << "FOUND rule " << this << endl;
+  }
+  RulePart *last = 0;
+  for ( size_t k=0; k < rules.size(); ++k ) {
+    RulePart *cur = &rules[k];
+    if ( last == 0 ){
+      last = cur;
+    }
+    if ( debugFlag){
+      *TiCC::Log(myLog) << "edit::act=" << cur << endl;
+    }
+    bool is_replace = false;
+    if ( !cur->del.isEmpty() ){
+      // sanity check
+      for ( int j=0; j < cur->del.length(); ++j ){
+	if ( (k + j) < rules.size() ){
+	  if ( rules[k+j].uchar != cur->del[j] ){
+	    UnicodeString tmp(cur->del[j]);
+	    *TiCC::Log(myLog) << "Hmm: deleting " << cur->del << " is impossible. ("
+			      << rules[k+j].uchar << " != " << tmp
+			      << ")." << endl;
+	    *TiCC::Log(myLog) << "Reject rule: " << this << endl;
+	    return false;
+	  }
+	}
+	else {
+	  UnicodeString tmp(cur->del[j]);
+	  *TiCC::Log(myLog) << "Hmm: deleting " << cur->del
+			    << " is impossible. (beyond end of the rule)"
+			    << endl;
+	  *TiCC::Log(myLog) << "Reject rule: " << this << endl;
+	  return false;
+	}
+      }
+      is_replace = !cur->ins.isEmpty();
+    }
+    if ( !cur->participle ){
+      for ( int j=0; j < cur->del.length(); ++j ){
+	rules[k+j].uchar = "";
+	// so perform the deletion on this and subsequent nodes
+      }
+    }
+
+    bool inserted = false;
+    UnicodeString part; // store to-be-inserted particles here!
+    if ( cur->isBasic() ){
+      // encountering real POS tag
+      // start a new morpheme, BUT: inserts are appended to the previous one
+      // except in case of Replace edits
+      if ( debugFlag ){
+	*TiCC::Log(myLog) << "FOUND a basic tag " << cur->ResultClass << endl;
+      }
+      if ( !is_replace ){
+	if ( cur->ins == "ge" ){
+	  // save particle, to add it to the NEXT node!
+	  part = cur->ins;
+	}
+	else {
+	  last->morpheme += cur->ins;
+	}
+	inserted = true;
+      }
+      last = cur;
+    }
+    else if ( cur->ResultClass != CLEX::NEUTRAL ){
+      // non 0 inflection starts a new morheme
+      last = cur;
+    }
+    if ( !inserted ){
+      // insert the deletestring :-)
+      if ( debugFlag ){
+	*TiCC::Log(myLog) << "add to morpheme: " << cur->ins << endl;
+      }
+      last->morpheme += cur->ins;
+    }
+    else if ( !part.isEmpty() ){
+      if ( debugFlag ){
+	*TiCC::Log(myLog) << "a part to add: " << part << endl;
+      }
+      last->morpheme += part;
+      part.remove();
+    }
+    last->morpheme += cur->uchar; // might be empty because of deletion
+  }
+  if ( debugFlag ){
+    *TiCC::Log(myLog) << "edited rule " << this << endl;
+  }
+  return true;
+}
+
+
+void Rule::resolve_inflections(){
+  // resolve all clearly resolvable implicit selections of inflectional tags
+  // We take ONLY the first 'hint' of the inflection to find a new CLEX Type
+  // When applicable, we replace the class from the rule
+  for ( size_t i = 1; i < rules.size(); ++i ){
+    string inf = rules[i].inflect;
+    if ( !inf.empty() && !rules[i].participle ){
+      // it is an inflection tag
+      if (debugFlag){
+	*TiCC::Log(myLog) << " inflection: >" << inf << "<" << endl;
+      }
+      // given the specific selections of certain inflections,
+      //    select a tag!
+      CLEX::Type new_tag = CLEX::select_tag( inf[0] );
+
+      // apply the change. Remember, the idea is that an inflection is
+      // far more certain of the tag of its predecessing morpheme than
+      // the morpheme itself.
+      // This is not always the case, but it works
+      if ( new_tag != CLEX::UNASS ) {
+	if ( debugFlag  ){
+	  *TiCC::Log(myLog) << inf[0] << " selects " << new_tag << endl;
+	}
+	// go back to the previous morpheme
+	for( size_t k=i-1; k+1 > 0; --k ){
+	  //	  *TiCC::Log(myLog) << "een terug is " << rules[k].ResultClass << endl;
+	  if ( rules[k].isBasic() &&
+	       rules[k].ResultClass != CLEX::P ){
+	    // only nodes that can get inflected (and unanalysed too)
+	    // now see if we can replace this class for a better one
+	    if ( rules[k].ResultClass == CLEX::PN &&
+		 new_tag == CLEX::N ){
+	      if ( debugFlag  ){
+		*TiCC::Log(myLog) << "Don't replace PN by N" << endl;
+	      }
+	    }
+	    else {
+	      if ( debugFlag  ){
+		*TiCC::Log(myLog) << " replace " << rules[k].ResultClass
+				  << " by " << new_tag << endl;
+	      }
+	      rules[k].ResultClass = new_tag;
+	    }
+	    return;
+	  }
+	}
+      }
+    }
+  }
+}
+
+UnicodeString Rule::getKey( bool deep ){
+  if ( sortkey.isEmpty() ){
+    UnicodeString tmp;
+    if ( deep ){
+      stringstream ss;
+      ss << brackets << endl;
+      tmp = UTF8ToUnicode(ss.str());
+    }
+    else {
+      vector<string> morphs = extract_morphemes();
+      // create an unique string
+      for ( auto const& mor : morphs ){
+	tmp += UTF8ToUnicode(mor) + "++";
+      }
+    }
+    sortkey = tmp;
+  }
+  return sortkey;
+}
+
+void Rule::getCleanInflect() {
+  // get the last inflection and clean it up by extracting only
+  //  known inflection names
+  if ( debugFlag > 5 ){
+    *TiCC::Log(myLog) << "getCleanInflect: " << this << endl;
+  }
+  inflection = "";
+  auto it = rules.rbegin();
+  while ( it != rules.rend() ){
+    RulePart rule = *it;
+    if ( debugFlag > 5 ){
+      *TiCC::Log(myLog) << rule << endl;
+    }
+    if ( !rule.inflect.empty() ){
+      if ( debugFlag > 5 ){
+	*TiCC::Log(myLog) << "x inflect:'" << rule.inflect << "'" << endl;
+      }
+      string inflect;
+      for ( auto const& i : rule.inflect ){
+	if ( i != '/' ){
+	  // check if it is a known inflection
+	  if ( debugFlag > 5 ){
+	    *TiCC::Log(myLog) << "x bekijk [" << i << "]" << endl;
+	  }
+	  string inf = CLEX::get_iDescr(i);
+	  if ( inf.empty() ){
+	    *TiCC::Log(myLog) << "added unknown inflection X" << endl;
+	    inflect += "X";
+	  }
+	  else {
+	    if ( debugFlag > 5 ){
+	      *TiCC::Log(myLog) << "added known inflection " << i
+				<< " (" << inf << ")" << endl;
+	    }
+	    inflect += i;
+	  }
+	}
+      }
+      if ( debugFlag > 5 ){
+	*TiCC::Log(myLog) << "cleaned inflection " << inflect << endl;
+      }
+      inflection = inflect;
+      return;
+    }
+    ++it;
+  }
+}
+
+void Rule::resolveBrackets( bool deep ) {
+  if ( debugFlag > 5 ){
+    *TiCC::Log(myLog) << "check rule for bracketing: " << this << endl;
+  }
+  brackets = new BracketNest( CLEX::UNASS, Compound::Type::NONE, debugFlag );
+  for ( auto const& rule : rules ){
+    // fill a flat result;
+    BracketLeaf *tmp = new BracketLeaf( rule, debugFlag );
+    if ( tmp->status() == Status::STEM && tmp->morpheme().isEmpty() ){
+      delete tmp;
+    }
+    else {
+      brackets->append( tmp );
+    }
+  }
+  if ( debugFlag > 5 ){
+    *TiCC::Log(myLog) << "STEP 1:" << brackets << endl;
+  }
+  if ( deep ){
+    brackets->resolveNouns( );
+    if ( debugFlag > 5 ){
+      *TiCC::Log(myLog) << "STEP 2:" << brackets << endl;
+    }
+    brackets->resolveLead( );
+    if ( debugFlag > 5 ){
+      *TiCC::Log(myLog) << "STEP 3:" << brackets << endl;
+    }
+    brackets->resolveTail( );
+    if ( debugFlag > 5 ){
+      *TiCC::Log(myLog) << "STEP 4:" << brackets << endl;
+    }
+    brackets->resolveMiddle();
+    brackets->clearEmptyNodes();
+  }
+  compound = brackets->getCompoundType();
+  tag = brackets->getFinalTag();
+  description = get_tDescr( tag );
+  if ( debugFlag > 4 ){
+    *TiCC::Log(myLog) << "Final Bracketing:" << brackets << " with tag=" << tag << endl;
+  }
+}
diff --git a/src/mwu_chunker_mod.cxx b/src/mwu_chunker_mod.cxx
old mode 100755
new mode 100644
index 0dc5089..6e14341
--- a/src/mwu_chunker_mod.cxx
+++ b/src/mwu_chunker_mod.cxx
@@ -1,11 +1,13 @@
+/* ex: set tabstop=8 expandtab: */
 /*
-  $Id: mwu_chunker_mod.cxx 17486 2014-08-06 14:47:38Z sloot $
-  $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/src/mwu_chunker_mod.cxx $
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
 
-  Copyright (c) 2006 - 2014
-  Tilburg University
+  This file is part of frog:
 
-  This file is part of frog.
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
 
   frog is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -21,9 +23,10 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
   For questions and suggestions, see:
-      http://ilk.uvt.nl/software.html
+      https://github.com/LanguageMachines/frog/issues
   or send mail to:
-      timbl at uvt.nl
+      lamasoftware (at ) science.ru.nl
+
 */
 
 #include <iostream>
@@ -37,27 +40,22 @@
 #include "timbl/TimblAPI.h"
 
 #include "frog/Frog.h" // defines etc.
+#include "ucto/unicode.h"
 #include "frog/mwu_chunker_mod.h"
 
 using namespace std;
 using namespace TiCC;
 using namespace folia;
 
-mwuAna::mwuAna( Word *fwrd ){
+mwuAna::mwuAna( Word *fwrd, const string& txt, const string& glue_tag ){
   spec = false;
-  word = fwrd->str();
+  word = txt;
   string tag;
 #pragma omp critical(foliaupdate)
   {
-    tag = fwrd->annotation<PosAnnotation>()->feat("head");
-  }
-  if ( tag == "SPEC" ){
-#pragma omp critical(foliaupdate)
-    {
-      vector<folia::Feature*> feats = fwrd->select<folia::Feature>( );
-      spec = ( feats.size() == 1 && feats[0]->cls() == "deeleigen" );
-    }
+    tag = fwrd->annotation<PosAnnotation>()->cls();
   }
+  spec = ( tag == glue_tag );
   fwords.push_back( fwrd );
 }
 
@@ -74,7 +72,7 @@ EntitiesLayer *mwuAna::addEntity( const std::string& tagset,
       {
 	KWargs args;
 	args["generate_id"] = sent->id();
-	el = new EntitiesLayer(sent->doc(),args);
+	el = new EntitiesLayer( args, sent->doc() );
 	sent->append( el );
       }
     }
@@ -84,43 +82,53 @@ EntitiesLayer *mwuAna::addEntity( const std::string& tagset,
     Entity *e=0;
 #pragma omp critical(foliaupdate)
     {
-      e = new Entity( el->doc(), args );
+      e = new Entity( args, el->doc() );
       el->append( e );
     }
-    for ( size_t p=0; p < fwords.size(); ++p ){
+    for ( const auto& fw : fwords ){
 #pragma omp critical(foliaupdate)
       {
-	e->append( fwords[p] );
+	e->append( fw );
       }
     }
   }
   return el;
 }
 
-Mwu::Mwu(){
-  mwuLog = new LogStream( theErrLog, "mwu-" );
+Mwu::Mwu(LogStream * logstream){
+  mwuLog = new LogStream( logstream, "mwu-" );
+  filter = 0;
 }
 
 Mwu::~Mwu(){
   reset();
   delete mwuLog;
+  delete filter;
 }
 
 void Mwu::reset(){
-  for( size_t i=0; i< mWords.size(); ++i ){
-    delete mWords[i];
+  for ( const auto& it : mWords ){
+    delete it;
   }
   mWords.clear();
 }
 
 void Mwu::add( Word *word ){
-  mWords.push_back( new mwuAna( word ) );
+  UnicodeString tmp;
+#pragma omp critical(foliaupdate)
+  {
+    tmp = word->text();
+  }
+  if ( filter )
+    tmp = filter->filter( tmp );
+  string txt = UnicodeToUTF8( tmp );
+  mWords.push_back( new mwuAna( word, txt, glue_tag ) );
 }
 
 
 bool Mwu::read_mwus( const string& fname) {
   *Log(mwuLog) << "read mwus " + fname << endl;
-  ifstream mwufile(fname.c_str(), ios::in);
+  ifstream mwufile(fname, ios::in);
   if(mwufile.bad()){
     return false;
   }
@@ -165,38 +173,58 @@ bool Mwu::init( const Configuration& config ) {
   if ( val.empty() ){
     version = "1.0";
   }
-  else
+  else {
     version = val;
+  }
   val = config.lookUp( "set", "mwu" );
   if ( val.empty() ){
-    tagset = "http://ilk.uvt.nl/folia/sets/frog-mwu-nl";
+    mwu_tagset = "http://ilk.uvt.nl/folia/sets/frog-mwu-nl";
+  }
+  else {
+    mwu_tagset = val;
+  }
+  string charFile = config.lookUp( "char_filter_file", "tagger" );
+  if ( charFile.empty() )
+    charFile = config.lookUp( "char_filter_file" );
+  if ( !charFile.empty() ){
+    charFile = prefix( config.configDir(), charFile );
+    filter = new Tokenizer::UnicodeFilter();
+    filter->fill( charFile );
+  }
+  val = config.lookUp( "gluetag", "mwu" );
+  if ( val.empty() ){
+    glue_tag = "SPEC(deeleigen)";
+  }
+  else {
+    glue_tag = val;
   }
-  else
-    tagset = val;
 
   return true;
 }
 
-ostream &operator <<( ostream& os,
-		      const Mwu& mwu ){
-  for( size_t i = 0; i < mwu.mWords.size(); ++i )
+ostream &operator<<( ostream& os, const Mwu& mwu ){
+  for ( size_t i = 0; i < mwu.mWords.size(); ++i )
     os << i+1 << "\t" << mwu.mWords[i]->getWord() << endl;
   return os;
 }
 
 void Mwu::addDeclaration( Document& doc ) const {
-  doc.declare( AnnotationType::ENTITY,
-	       tagset,
-	       "annotator='frog-mwu-" + version
-	       + "', annotatortype='auto', datetime='" + getTime() + "'");
+#pragma omp critical(foliaupdate)
+  {
+    doc.declare( AnnotationType::ENTITY,
+		 mwu_tagset,
+		 "annotator='frog-mwu-" + version
+		 + "', annotatortype='auto', datetime='" + getTime() + "'");
+  }
 }
 
 void Mwu::Classify( const vector<Word*>& words ){
-  if ( words.empty() )
+  if ( words.empty() ){
     return;
+  }
   reset();
-  for ( size_t i=0; i < words.size(); ++i ){
-    add( words[i] );
+  for ( const auto& word : words ){
+    add( word );
   }
   Classify();
   EntitiesLayer *el = 0;
@@ -205,20 +233,21 @@ void Mwu::Classify( const vector<Word*>& words ){
   {
     sent = words[0]->sentence();
   }
-  for( size_t i = 0; i < mWords.size(); ++i ){
-    el = mWords[i]->addEntity( tagset, sent, el );
+  for ( const auto& mword : mWords ){
+    el = mword->addEntity( mwu_tagset, sent, el );
   }
 }
 
 void Mwu::Classify(){
-  if ( debug )
+  if ( debug ) {
     *Log(mwuLog) << "Starting mwu Classify" << endl;
+  }
   mymap2::iterator best_match;
   size_t matchLength = 0;
   size_t max = mWords.size();
 
-  // add all current sequences of SPEC(deeleigen) words to MWUs
-  for( size_t i=0; i < max-1; ++i ) {
+  // add all current sequences of the glue_tag words to MWUs
+  for ( size_t i=0; i < max-1; ++i ) {
     if ( mWords[i]->isSpec() && mWords[i+1]->isSpec() ) {
       vector<string> newmwu;
       while ( i < max && mWords[i]->isSpec() ){
@@ -231,34 +260,41 @@ void Mwu::Classify(){
     }
   }
   size_t i;
-  for( i = 0; i < max; i++) {
+  for ( i = 0; i < max; i++) {
     string word = mWords[i]->getWord();
-    if ( debug )
+    if ( debug ){
       *Log(mwuLog) << "checking word[" << i <<"]: " << word << endl;
-    pair<mymap2::iterator, mymap2::iterator> matches = MWUs.equal_range(word);
+    }
+    //    pair<mymap2::iterator, mymap2::iterator> matches = MWUs.equal_range(word);
+    const auto matches = MWUs.equal_range(word);
     if ( matches.first != MWUs.end() ) {
       //match
-      mymap2::iterator current_match = matches.first;
+      auto current_match = matches.first;
       if (  debug  ) {
 	*Log(mwuLog) << "MWU: match found!\t" << current_match->first << endl;
       }
-      while(current_match != matches.second && current_match != MWUs.end()) {
+      while( current_match != matches.second
+	     && current_match != MWUs.end() ){
 	vector<string> match = current_match->second;
 	size_t max_match = match.size();
 	size_t j = 0;
-	if ( debug )
+	if ( debug ){
 	  *Log(mwuLog) << "checking " << max_match << " matches:" << endl;
-	for(; i + j + 1 < max && j < max_match; j++) {
+	}
+	for (; i + j + 1 < max && j < max_match; j++) {
 	  if ( match[j] != mWords[i+j+1]->getWord() ) {
-	    if ( debug )
+	    if ( debug ){
 	      *Log(mwuLog) << "match " << j <<" (" << match[j]
-		   << ") doesn't match with word " << i+ j + 1
+			   << ") doesn't match with word " << i+ j + 1
 			   << " (" << mWords[i+j + 1]->getWord() <<")" << endl;
+	    }
 	    // mismatch in jth word of current mwu
 	    break;
 	  }
-	  else if ( debug )
-	    *Log(mwuLog) << " matched " <<  mWords[i+j+1]->getWord() << " j=" << j << endl;
+	  else if ( debug ){
+	    *Log(mwuLog) << " matched " <<  mWords[i+j+1]->getWord()
+			 << " j=" << j << endl;
+	  }
 
 	}
 	if (j == max_match && j > matchLength ){
@@ -271,14 +307,16 @@ void Mwu::Classify(){
       if( debug ){
 	if (matchLength >0 ) {
 	  *Log(mwuLog) << "MWU: found match starting with " << (*best_match).first << endl;
-	} else {
+	}
+	else {
 	  *Log(mwuLog) <<"MWU: no match" << endl;
 	}
       }
       // we found a matching mwu, break out of loop thru sentence,
       // do useful stuff, and recurse to find more mwus
-      if (matchLength > 0 )
+      if ( matchLength > 0 ){
 	break;
+      }
     } //match found
     else {
       if( debug )
@@ -287,11 +325,13 @@ void Mwu::Classify(){
   } //for (i < max)
   if (matchLength > 0 ) {
     //concat
-    if ( debug )
+    if ( debug ){
       *Log(mwuLog) << "mwu found, processing" << endl;
+    }
     for ( size_t j = 1; j <= matchLength; ++j) {
-      if ( debug )
+      if ( debug ){
 	*Log(mwuLog) << "concat " << mWords[i+j]->getWord() << endl;
+      }
       mWords[i]->merge( mWords[i+j] );
     }
     vector<mwuAna*>::iterator anatmp1 = mWords.begin() + i;
diff --git a/src/mblem_prog.cxx b/src/ner_prog.cxx
similarity index 54%
copy from src/mblem_prog.cxx
copy to src/ner_prog.cxx
index 4cf525c..92390cc 100644
--- a/src/mblem_prog.cxx
+++ b/src/ner_prog.cxx
@@ -1,13 +1,13 @@
+/* ex: set tabstop=8 expandtab: */
 /*
-  $Id:$
-  $URL:$
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
 
-  Copyright (c) 2006 - 2014
-  Tilburg University
+  This file is part of frog:
 
-  A Morphological-Analyzer for Dutch
-
-  This file is part of frog
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
 
   frog is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -23,11 +23,11 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
   For questions and suggestions, see:
-      http://ilk.uvt.nl/software.html
+      https://github.com/LanguageMachines/frog/issues
   or send mail to:
-      timbl at uvt.nl
-*/
+      lamasoftware (at ) science.ru.nl
 
+*/
 
 #include <string>
 #include <iostream>
@@ -37,37 +37,35 @@
 #include <map>
 
 #include "config.h"
-#include "timbl/TimblAPI.h"
 #include "ticcutils/LogStream.h"
 #include "ticcutils/Configuration.h"
+#include "ticcutils/CommandLine.h"
+#include "ticcutils/PrettyPrint.h"
 #include "libfolia/folia.h"
 #include "frog/ucto_tokenizer_mod.h"
-#include "frog/cgn_tagger_mod.h"
-#include "frog/mblem_mod.h"
+#include "mbt/MbtAPI.h"
+#include "frog/ner_tagger_mod.h"
 
 using namespace std;
 using namespace Timbl;
+using namespace TiCC;
+using namespace Tagger;
 
 LogStream my_default_log( cerr, "", StampMessage ); // fall-back
 LogStream *theErrLog = &my_default_log;  // fill the externals
 
-string TestFileName;
-string ProgName;
-bool doAll = false;
+vector<string> fileNames;
 
 Configuration configuration;
 static string configDir = string(SYSCONF_PATH) + "/" + PACKAGE + "/";
 static string configFileName = configDir + "frog.cfg";
 
-static UctoTokenizer tokenizer;
-static CGNTagger tagger;
+static UctoTokenizer tokenizer(theErrLog);
 
 void usage( ) {
-  cout << endl << "mblem [options] testfile" << endl
-       << "Options:n" << endl;
+  cout << endl << "Options:\n";
   cout << "\t============= INPUT MODE (mandatory, choose one) ========================\n"
-       << "\t -t <testfile>    Run mblem on this file\n"
-       << "\t -a               give ALL result. Not just the chosen one(s)\n"
+       << "\t -t <testfile>          Run NER on this file\n"
        << "\t -c <filename>    Set configuration file (default " << configFileName << ")\n"
        << "\t============= OTHER OPTIONS ============================================\n"
        << "\t -h. give some help.\n"
@@ -75,27 +73,19 @@ void usage( ) {
        << "\t -d <debug level>    (for more verbosity)\n";
 }
 
-static Mblem myMblem;
+static NERTagger tagger(theErrLog);
 
-bool parse_args( TimblOpts& Opts ) {
-  cerr << "start " << Opts << endl;
-  string value;
-  bool mood;
-  if ( Opts.Find('V', value, mood ) ||
-       Opts.Find("version", value, mood ) ){
+bool parse_args( TiCC::CL_Options& Opts ) {
+  if ( Opts.is_present( 'V' ) || Opts.is_present("version") ){
     // we already did show what we wanted.
     exit( EXIT_SUCCESS );
   }
-  if ( Opts.Find ('h', value, mood)) {
+  if ( Opts.is_present('h') ){
     usage();
     exit( EXIT_SUCCESS );
   };
   // is a config file specified?
-  if ( Opts.Find( 'c',  value, mood ) ) {
-    configFileName = value;
-    Opts.Delete( 'c' );
-  };
-
+  Opts.extract( 'c', configFileName );
   if ( configuration.fill( configFileName ) ){
     cerr << "config read from: " << configFileName << endl;
   }
@@ -104,40 +94,28 @@ bool parse_args( TimblOpts& Opts ) {
     cerr << "did you correctly install the frogdata package?" << endl;
     return false;
   }
-
+  string value;
   // debug opts
-  if ( Opts.Find ('d', value, mood)) {
+  if ( Opts.extract('d', value ) ){
     int debug = 0;
     if ( !TiCC::stringTo<int>( value, debug ) ){
       cerr << "-d value should be an integer" << endl;
       return false;
     }
-    configuration.setatt( "debug", value, "mblem" );
-    Opts.Delete('d');
+    configuration.setatt( "debug", value, "NER" );
   };
 
-  if ( Opts.Find( 't', value, mood )) {
-    TestFileName = value;
-    ifstream is( value.c_str() );
+  if ( Opts.extract( 't', value ) ){
+    ifstream is( value );
     if ( !is ){
       cerr << "input stream " << value << " is not readable" << endl;
       return false;
     }
-    Opts.Delete('t');
+    fileNames.push_back( value );
+  }
+  else {
+    fileNames = Opts.getMassOpts();
   }
-  else if ( Opts.Find( '?', value, mood )) {
-    TestFileName = value;
-    ifstream is( value.c_str() );
-    if ( !is ){
-      cerr << "input stream " << value << " is not readable" << endl;
-      return false;
-    }
-    Opts.Delete('?');
-  };
-  if ( Opts.Find( 'a', value, mood )) {
-    doAll = true;
-    Opts.Delete('t');
-  };
   return true;
 }
 
@@ -145,16 +123,12 @@ bool init(){
   // for some modules init can take a long time
   // so first make sure it will not fail on some trivialities
   //
-  if ( !myMblem.init( configuration ) ){
-    cerr << "MBLEM Initialization failed." << endl;
-    return false;
-  }
-  if ( !tokenizer.init( configuration, "", false ) ){
+  if ( !tokenizer.init( configuration ) ){
     cerr << "UCTO Initialization failed." << endl;
     return false;
   }
   if ( !tagger.init( configuration ) ){
-    cerr << "CGN Initialization failed." << endl;
+    cerr << "NER Initialization failed." << endl;
     return false;
   }
   cerr << "Initialization done." << endl;
@@ -163,48 +137,47 @@ bool init(){
 
 void Test( istream& in ){
   string line;
-  while ( getline( in, line ) ){
-    vector<string> sentences = tokenizer.tokenize( line );
-    for ( size_t s=0; s < sentences.size(); ++s ){
-      vector<TagResult> tagv = tagger.tagLine(sentences[s]);
-      for ( size_t w=0; w < tagv.size(); ++w ){
-	UnicodeString uWord = folia::UTF8ToUnicode(tagv[w].word());
-	myMblem.Classify( uWord );
-	if ( !doAll )
-	  myMblem.filterTag( tagv[w].assignedTag() );
-	vector<pair<string,string> > res = myMblem.getResult();
-	cout << tagv[w].word() << " {" << tagv[w].assignedTag() << "}\t";
-	for ( size_t i=0; i < res.size(); ++i ){
-	  cout << res[i].first << "[" << res[i].second << "]";
-	  if ( i < res.size()-1 )
-	    cout << "/";
-	}
-	cout << endl;
-      }
-      cout << "<utt>" << endl << endl;
+  while ( in.good() ){
+    string sentence = tokenizer.tokenizeStream( in );
+    if ( sentence.empty() ){
+      break;
+    }
+    cout << "processing: " << sentence << endl;
+    vector<TagResult> tagv = tagger.tagLine(sentence);
+    for ( const auto& tr : tagv ){
+      cout << tr.word() << "\t" << tr.assignedTag() << endl;
     }
-    cout << endl;
+    cout << "<utt>" << endl << endl;
   }
-  return;
 }
 
 
 int main(int argc, char *argv[]) {
   std::ios_base::sync_with_stdio(false);
-  cerr << "mblem " << VERSION << " (c) ILK 1998 - 2014" << endl;
-  cerr << "Induction of Linguistic Knowledge Research Group, Tilburg University" << endl;
-  ProgName = argv[0];
+  cerr << "ner " << VERSION << " (c) CLTS, ILK 2014 - 2016" << endl;
+  cerr << "CLST  - Centre for Language and Speech Technology,"
+       << "Radboud University" << endl
+       << "ILK   - Induction of Linguistic Knowledge Research Group,"
+       << "Tilburg University" << endl;
+  TiCC::CL_Options Opts("Vt:d:hc:","version");
+  try {
+    Opts.init(argc, argv);
+  }
+  catch ( const exception& e ){
+    cerr << "fatal error: " << e.what() << endl;
+    return EXIT_FAILURE;
+  }
   cerr << "based on [" << Timbl::VersionName() << "]" << endl;
   cerr << "configdir: " << configDir << endl;
-  try {
-    TimblOpts Opts(argc, argv);
-    if ( parse_args(Opts) ){
-      if (  !init() ){
-	cerr << "terminated." << endl;
-	return EXIT_FAILURE;
-      }
-      ifstream in(TestFileName.c_str() );
+  if ( parse_args(Opts) ){
+    if (  !init() ){
+      cerr << "terminated." << endl;
+      return EXIT_FAILURE;
+    }
+    for ( const auto& TestFileName : fileNames ){
+      ifstream in(TestFileName);
       if ( in.good() ){
+	cerr << "Processing: " << TestFileName << endl;
 	Test( in );
       }
       else {
@@ -212,12 +185,8 @@ int main(int argc, char *argv[]) {
 	return EXIT_FAILURE;
       }
     }
-    else {
-      return EXIT_FAILURE;
-    }
   }
-  catch ( const exception& e ){
-    cerr << "fatal error: " << e.what() << endl;
+  else {
     return EXIT_FAILURE;
   }
   return EXIT_SUCCESS;
diff --git a/src/ner_tagger_mod.cxx b/src/ner_tagger_mod.cxx
index 56dc9b9..58dd2d4 100644
--- a/src/ner_tagger_mod.cxx
+++ b/src/ner_tagger_mod.cxx
@@ -1,13 +1,13 @@
+/* ex: set tabstop=8 expandtab: */
 /*
-  $Id: ner_tagger_mod.cxx 17486 2014-08-06 14:47:38Z sloot $
-  $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/src/ner_tagger_mod.cxx $
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
 
-  Copyright (c) 2006 - 2014
-  Tilburg University
+  This file is part of frog:
 
-  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for Dutch
-
-  This file is part of frog
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
 
   frog is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -23,29 +23,40 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
   For questions and suggestions, see:
-      http://ilk.uvt.nl/software.html
+      https://github.com/LanguageMachines/frog/issues
   or send mail to:
-      timbl at uvt.nl
+      lamasoftware (at ) science.ru.nl
+
 */
 
 #include "mbt/MbtAPI.h"
 #include "frog/Frog.h"
+#include "ucto/unicode.h"
 #include "frog/ner_tagger_mod.h"
 
 using namespace std;
 using namespace folia;
+using namespace TiCC;
+using namespace Tagger;
+
+const int KNOWN_NERS_SIZE = 10;
+
 
-NERTagger::NERTagger(){
+NERTagger::NERTagger(TiCC::LogStream * logstream){
   tagger = 0;
-  nerLog = new LogStream( theErrLog, "ner-" );
+  filter = 0;
+  nerLog = new LogStream( logstream, "ner-" );
+  known_ners.resize( KNOWN_NERS_SIZE+1 );
 }
 
 NERTagger::~NERTagger(){
   delete tagger;
   delete nerLog;
+  delete filter;
 }
 
 bool NERTagger::init( const Configuration& config ){
+  debug = 0;
   string val = config.lookUp( "debug", "NER" );
   if ( val.empty() ){
     val = config.lookUp( "debug" );
@@ -71,8 +82,9 @@ bool NERTagger::init( const Configuration& config ){
   default:
     nerLog->setlevel(LogExtreme);
   }
-  if (debug)
+  if (debug){
     *Log(nerLog) << "NER Tagger Init" << endl;
+  }
   if ( tagger != 0 ){
     *Log(nerLog) << "NER Tagger is already initialized!" << endl;
     return false;
@@ -83,52 +95,229 @@ bool NERTagger::init( const Configuration& config ){
     return false;
   }
   string settings;
-  if ( val[0] == '/' ) // an absolute path
+  if ( val[0] == '/' ){
+    // an absolute path
     settings = val;
-  else
+  }
+  else {
     settings = config.configDir() + val;
-
+  }
   val = config.lookUp( "version", "NER" );
   if ( val.empty() ){
     version = "1.0";
   }
-  else
+  else {
     version = val;
+  }
   val = config.lookUp( "set", "NER" );
   if ( val.empty() ){
     tagset = "http://ilk.uvt.nl/folia/sets/frog-ner-nl";
   }
-  else
+  else {
     tagset = val;
+  }
+  string charFile = config.lookUp( "char_filter_file", "NER" );
+  if ( charFile.empty() )
+    charFile = config.lookUp( "char_filter_file" );
+  if ( !charFile.empty() ){
+    charFile = prefix( config.configDir(), charFile );
+    filter = new Tokenizer::UnicodeFilter();
+    filter->fill( charFile );
+  }
+  val = config.lookUp( "known_ners", "NER" );
+  if ( !val.empty() ){
+    string file_name;
+    if ( val[0] == '/' ) {
+      // an absolute path
+      file_name = val;
+    }
+    else {
+      file_name = config.configDir() + val;
+    }
+    if ( !fill_known_ners( file_name ) ){
+      *Log(nerLog) << "Unable to fill known NER's from file: '" << file_name << "'" << endl;
+      return false;
+    }
+  }
 
   string init = "-s " + settings + " -vcf";
   tagger = new MbtAPI( init, *nerLog );
   return tagger->isInit();
 }
 
-static void addEntity( EntitiesLayer *entities,
+bool NERTagger::fill_known_ners( const string& file_name ){
+  ifstream is( file_name );
+  if ( !is ){
+    return false;
+  }
+  string line;
+  while ( getline( is, line ) ){
+    if ( line.empty() || line[0] == '#' ){
+      continue;
+    }
+    vector<string> parts;
+    if ( TiCC::split_at( line, parts, "\t" ) != 2 ){
+      *Log(nerLog) << "expected 2 TAB-separated parts in line: '" << line << "'" << endl;
+      return false;
+    }
+    line = parts[0];
+    string ner_value = parts[1];
+    size_t num = TiCC::split( line, parts );
+    if ( num < 1 || num > KNOWN_NERS_SIZE ){
+      *Log(nerLog) << "expected 1 to " << KNOWN_NERS_SIZE
+		   << " SPACE-separated parts in line: '" << line
+		   << "'" << endl;
+      return false;
+    }
+    line = "";
+    for ( const auto& part : parts ){
+      line += part;
+      if ( &part != &parts.back() ){
+	line += " ";
+      }
+    }
+    known_ners[num][line] = ner_value;
+  }
+  return true;
+}
+
+size_t count_sp( const string& sentence, string::size_type pos ){
+  int sp = 0;
+  for ( string::size_type i=0; i < pos; ++i ){
+    if ( sentence[i] == ' ' ){
+      ++sp;
+    }
+  }
+  return sp;
+}
+
+void NERTagger::handle_known_ners( const vector<string>& words,
+				   vector<string>& tags ){
+  if ( debug ){
+    *Log(nerLog) << "search for known NER's" << endl;
+  }
+  string sentence = " ";
+  for ( const auto& w : words ){
+    sentence += w + " ";
+  }
+  // so sentence starts AND ends with a space!
+  if ( debug ){
+    *Log(nerLog) << "Sentence = " << sentence << endl;
+  }
+  for ( size_t i = KNOWN_NERS_SIZE; i > 0; --i ){
+    auto const& mp = known_ners[i];
+    if ( mp.empty() ){
+      continue;
+    }
+    for( auto const& it : mp ){
+      string blub = " " + it.first + " ";
+      string::size_type pos = sentence.find( blub );
+      while ( pos != string::npos ){
+	size_t sp = count_sp( sentence, pos );
+	if ( debug ){
+	  *Log(nerLog) << "matched '" << it.first << "' to '"
+		       << sentence << "' at position " << sp
+		       << " : " << it.second << endl;
+	}
+	bool safe = true;
+	for ( size_t j=0; j < i && safe; ++j ){
+	  safe = ( tags[sp+j] == "O" );
+	}
+	if ( safe ){
+	  // we can safely change the tag (don't trample upon hits of longer known ners!)
+	  tags[sp] = "B-" + it.second;
+	  for ( size_t j=1; j < i; ++j ){
+	    tags[sp+j] = "I-" + it.second;
+	  }
+	}
+	pos = sentence.find( blub, pos + blub.length() );
+      }
+    }
+  }
+}
+
+void NERTagger::merge( const vector<string>& ktags, vector<string>& tags,
+		       vector<double>& conf ){
+  if ( debug ){
+    using TiCC::operator<<;
+    *Log(nerLog) << "merge " << ktags << endl
+		 << "with  " << tags << endl;
+  }
+  for ( size_t i=0; i < ktags.size(); ++i ){
+    if ( ktags[i] == "O" ){
+      if ( i > 0 && ktags[i-1] != "O" ){
+	// so we did some merging.  check that we aren't in the middle of some tag now
+	size_t j = i;
+	while ( j < tags.size() && tags[j][0] == 'I' ) {
+	  tags[j] = "O";
+	  ++j;
+	}
+      }
+      continue;
+    }
+    else if ( ktags[i][0] == 'B' ){
+      // maybe we landed in the middel of some tag.
+      if ( tags[i][0] == 'I' ){
+	//indeed, so erase it backwards
+	size_t j = i;
+	while ( tags[j][0] == 'I' ){
+	  tags[j] = "O";
+	  --j;
+	}
+	tags[j] = "O";
+      }
+      // now copy
+      tags[i] = ktags[i];
+      conf[i] = 1.0;
+    }
+    else {
+      tags[i] = ktags[i];
+      conf[i] = 1.0;
+    }
+  }
+  if ( debug ){
+    *Log(nerLog) << "Merge gave " << tags << endl;
+  }
+}
+
+static void addEntity( Sentence *sent,
 		       const string& tagset,
 		       const vector<Word*>& words,
 		       const vector<double>& confs,
 		       const string& NER ){
-  double c = 1;
-  for ( size_t i=0; i < confs.size(); ++i )
-    c *= confs[i];
+  EntitiesLayer *el = 0;
+#pragma omp critical(foliaupdate)
+  {
+    try {
+      el = sent->annotation<EntitiesLayer>();
+    }
+    catch(...){
+      KWargs args;
+      args["generate_id"] = sent->id();
+      el = new EntitiesLayer( args, sent->doc() );
+      sent->append( el );
+    }
+  }
+  double c = 0;
+  for ( auto const& val : confs ){
+    c += val;
+  }
+  c /= confs.size();
   KWargs args;
   args["class"] = NER;
   args["confidence"] =  toString(c);
   args["set"] = tagset;
-  args["generate_id"] = entities->id();
+  args["generate_id"] = el->id();
   Entity *e = 0;
 #pragma omp critical(foliaupdate)
   {
-    e = new Entity(entities->doc(), args);
-    entities->append( e );
+    e = new Entity( args, el->doc() );
+    el->append( e );
   }
-  for ( size_t i=0; i < words.size(); ++i ){
+  for ( const auto& word : words ){
 #pragma omp critical(foliaupdate)
     {
-      e->append( words[i] );
+      e->append( word );
     }
   }
 }
@@ -136,37 +325,27 @@ static void addEntity( EntitiesLayer *entities,
 void NERTagger::addNERTags( const vector<Word*>& words,
 			    const vector<string>& tags,
 			    const vector<double>& confs ){
-  if ( words.empty() )
+  if ( words.empty() ) {
     return;
-  EntitiesLayer *el = 0;
-#pragma omp critical(foliaupdate)
-  {
-    Sentence *sent = words[0]->sentence();
-    try {
-      el = sent->annotation<EntitiesLayer>();
-    }
-    catch(...){
-      KWargs args;
-      args["generate_id"] = sent->id();
-      el = new EntitiesLayer(sent->doc(),args);
-      sent->append( el );
-    }
   }
+  Sentence *sent = words[0]->sentence();
   vector<Word*> stack;
   vector<double> dstack;
   string curNER;
   for ( size_t i=0; i < tags.size(); ++i ){
-    if (debug)
+    if (debug){
       *Log(nerLog) << "NER = " << tags[i] << endl;
+    }
     vector<string> ner;
     if ( tags[i] == "O" ){
       if ( !stack.empty() ){
 	if (debug) {
 	  *Log(nerLog) << "O spit out " << curNER << endl;
 	  using TiCC::operator<<;
-	  *Log(nerLog) << "spit out " << stack << endl;
+	  *Log(nerLog) << "ners  " << stack << endl;
+	  *Log(nerLog) << "confs " << dstack << endl;
 	}
-	addEntity( el, tagset, stack, dstack, curNER );
+	addEntity( sent, tagset, stack, dstack, curNER );
 	dstack.clear();
 	stack.clear();
       }
@@ -190,7 +369,7 @@ void NERTagger::addNERTags( const vector<Word*>& words,
 	  using TiCC::operator<<;
 	  *Log(nerLog) << "spit out " << stack << endl;
 	}
-	addEntity( el, tagset, stack, dstack, curNER );
+	addEntity( sent, tagset, stack, dstack, curNER );
 	dstack.clear();
 	stack.clear();
       }
@@ -205,32 +384,54 @@ void NERTagger::addNERTags( const vector<Word*>& words,
       using TiCC::operator<<;
       *Log(nerLog) << "spit out " << stack << endl;
     }
-    addEntity( el, tagset, stack, dstack, curNER );
+    addEntity( sent, tagset, stack, dstack, curNER );
   }
 }
 
 void NERTagger::addDeclaration( Document& doc ) const {
-  doc.declare( AnnotationType::ENTITY,
-	       tagset,
-	       "annotator='frog-ner-" + version
-	       + "', annotatortype='auto', datetime='" + getTime() + "'");
+#pragma omp critical(foliaupdate)
+  {
+    doc.declare( AnnotationType::ENTITY,
+		 tagset,
+		 "annotator='frog-ner-" + version
+		 + "', annotatortype='auto', datetime='" + getTime() + "'");
+  }
 }
 
 void NERTagger::Classify( const vector<Word *>& swords ){
   if ( !swords.empty() ) {
     vector<string> words;
     string sentence; // the tagger needs the whole sentence
-    for ( size_t w = 0; w < swords.size(); ++w ) {
-      sentence += swords[w]->str();
-      words.push_back( swords[w]->str() );
-      if ( w < swords.size()-1 )
+    for ( const auto& sw : swords ){
+      UnicodeString word;
+#pragma omp critical(foliaupdate)
+      {
+	word = sw->text();
+      }
+      if ( filter )
+	word = filter->filter( word );
+      sentence += UnicodeToUTF8(word);
+      words.push_back( UnicodeToUTF8(word) );
+      if ( &sw != &swords.back() ){
 	sentence += " ";
+      }
     }
-    if (debug)
+    if (debug){
       *Log(nerLog) << "NER in: " << sentence << endl;
+    }
     vector<TagResult> tagv = tagger->TagLine(sentence);
     if ( tagv.size() != swords.size() ){
-      throw runtime_error( "NER tagger is confused" );
+      string out;
+      for ( const auto& val : tagv ){
+	out += val.word() + "//" + val.assignedTag() + " ";
+      }
+      if ( debug ){
+	*Log(nerLog) << "NER tagger is confused" << endl;
+	*Log(nerLog) << "sentences was: '" << sentence << "'" << endl;
+	*Log(nerLog) << "but tagged:" << endl;
+	*Log(nerLog) << out << endl;
+      }
+      throw runtime_error( "NER failed: '" + sentence + "' ==> '" + out + "'" );
     }
     if ( debug ){
       *Log(nerLog) << "NER tagger out: " << endl;
@@ -242,10 +443,27 @@ void NERTagger::Classify( const vector<Word *>& swords ){
     }
     vector<double> conf;
     vector<string> tags;
-    for ( size_t i=0; i < tagv.size(); ++i ){
-      tags.push_back( tagv[i].assignedTag() );
-      conf.push_back( tagv[i].confidence() );
+    for ( const auto& tag : tagv ){
+      tags.push_back( tag.assignedTag() );
+      conf.push_back( tag.confidence() );
     }
+    vector<string> ktags( tagv.size(), "O" );
+    handle_known_ners( words, ktags );
+    merge( ktags, tags, conf );
     addNERTags( swords, tags, conf );
   }
 }
+
+vector<TagResult> NERTagger::tagLine( const string& line ){
+  if ( tagger ){
+    return tagger->TagLine(line);
+  }
+  throw runtime_error( "NERTagger is not initialized" );
+}
+
+string NERTagger::set_eos_mark( const string& eos ){
+  if ( tagger ){
+    return tagger->set_eos_mark(eos);
+  }
+  throw runtime_error( "NERTagger is not initialized" );
+}
diff --git a/src/pos_tagger_mod.cxx b/src/pos_tagger_mod.cxx
new file mode 100644
index 0000000..6c2e07b
--- /dev/null
+++ b/src/pos_tagger_mod.cxx
@@ -0,0 +1,277 @@
+/* ex: set tabstop=8 expandtab: */
+/*
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
+
+  This file is part of frog:
+
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
+
+  frog 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.
+
+  frog 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/>.
+
+  For questions and suggestions, see:
+      https://github.com/LanguageMachines/frog/issues
+  or send mail to:
+      lamasoftware (at ) science.ru.nl
+
+*/
+
+#include "mbt/MbtAPI.h"
+#include "ucto/unicode.h"
+#include "frog/Frog.h"
+#include "frog/ucto_tokenizer_mod.h"
+#include "frog/pos_tagger_mod.h"
+
+using namespace std;
+using namespace folia;
+using namespace TiCC;
+using namespace Tagger;
+
+
+#define LOG *Log(tag_log)
+
+POSTagger::POSTagger(TiCC::LogStream * logstream){
+  debug = 0;
+  tagger = 0;
+  filter = 0;
+  tag_log = new LogStream( logstream, "pos-tagger-" );
+}
+
+POSTagger::~POSTagger(){
+  delete tagger;
+  delete filter;
+  delete tag_log;
+}
+
+bool fill_set( const string& file, set<string>& st ){
+  ifstream is( file );
+  if ( !is ){
+    return false;
+  }
+  string line;
+  while( getline( is, line ) ){
+    if ( line.empty() || line[0] == '#' )
+      continue;
+    line = TiCC::trim( line );
+    st.insert( line );
+  }
+  return true;
+}
+
+bool POSTagger::fill_map( const string& file, map<string,string>& mp ){
+  ifstream is( file );
+  if ( !is ){
+    return false;
+  }
+  string line;
+  while( getline( is, line ) ){
+    if ( line.empty() || line[0] == '#' )
+      continue;
+    vector<string> parts;
+    size_t num = TiCC::split_at( line, parts, "\t" );
+    if ( num != 2 ){
+      LOG << "invalid entry in '" << file << "'" << endl;
+      LOG << "expected 2 tab-separated values, but got: '"
+		   << line << "'" << endl;
+      return false;
+    }
+    mp[ parts[0] ] = parts[1];
+  }
+  return true;
+}
+
+bool POSTagger::init( const Configuration& config ){
+  debug = 0;
+  string val = config.lookUp( "debug", "tagger" );
+  if ( val.empty() ){
+    val = config.lookUp( "debug" );
+  }
+  if ( !val.empty() ){
+    debug = TiCC::stringTo<int>( val );
+  }
+  switch ( debug ){
+  case 0:
+  case 1:
+    break;
+  case 2:
+  case 3:
+  case 4:
+    tag_log->setlevel(LogDebug);
+    break;
+  case 5:
+  case 6:
+  case 7:
+    tag_log->setlevel(LogHeavy);
+    break;
+  default:
+    tag_log->setlevel(LogExtreme);
+  }
+  if ( tagger != 0 ){
+    LOG << "POS-Tagger is already initialized!" << endl;
+    return false;
+  }
+  val = config.lookUp( "settings", "tagger" );
+  if ( val.empty() ){
+    LOG << "Unable to find settings for Tagger" << endl;
+    return false;
+  }
+  string settings;
+  if ( val[0] == '/' ) // an absolute path
+    settings = val;
+  else
+    settings =  config.configDir() + val;
+
+  val = config.lookUp( "version", "tagger" );
+  if ( val.empty() ){
+    version = "1.0";
+  }
+  else
+    version = val;
+  val = config.lookUp( "set", "tagger" );
+  if ( val.empty() ){
+    LOG << "missing set declaration in config" << endl;
+    exit(EXIT_FAILURE);
+  }
+  else {
+    tagset = val;
+  }
+  string charFile = config.lookUp( "char_filter_file", "tagger" );
+  if ( charFile.empty() )
+    charFile = config.lookUp( "char_filter_file" );
+  if ( !charFile.empty() ){
+    charFile = prefix( config.configDir(), charFile );
+    filter = new Tokenizer::UnicodeFilter();
+    filter->fill( charFile );
+  }
+  string tokFile = config.lookUp( "token_trans_file", "tagger" );
+  if ( tokFile.empty() )
+    tokFile = config.lookUp( "token_trans_file" );
+  if ( !tokFile.empty() ){
+    tokFile = prefix( config.configDir(), tokFile );
+    if ( !fill_map( tokFile, token_tag_map ) ){
+      LOG << "failed to load a token translation file from: '"
+		   << tokFile << "'"<< endl;
+      exit(EXIT_FAILURE);
+    }
+  }
+  string tagsFile = config.lookUp( "tags_file", "tagger" );
+  if ( tagsFile.empty() )
+    tagsFile = config.lookUp( "tags_file" );
+  if ( !tagsFile.empty() ){
+    tagsFile = prefix( config.configDir(), tagsFile );
+    if ( !fill_set( tagsFile, valid_tags ) ){
+      LOG << "failed to load a tags file from: '"
+		   << tagsFile << "'"<< endl;
+      exit(EXIT_FAILURE);
+    }
+  }
+  string init = "-s " + settings + " -vcf";
+  tagger = new MbtAPI( init, *tag_log );
+  return tagger->isInit();
+}
+
+void POSTagger::addTag( Word *word, const string& inputTag, double confidence ){
+  string pos_tag = inputTag;
+  string ucto_class = word->cls();
+  if ( debug ){
+    LOG << "lookup ucto class= " << ucto_class << endl;
+  }
+  auto const tt = token_tag_map.find( ucto_class );
+  if ( tt != token_tag_map.end() ){
+    if ( debug ){
+      LOG << "found translation ucto class= " << ucto_class
+	  << " to POS-Tag=" << tt->second << endl;
+    }
+    pos_tag = tt->second;
+    confidence = 1.0;
+  }
+  KWargs args;
+  args["set"]  = tagset;
+  args["class"]  = pos_tag;
+  args["confidence"]= toString(confidence);
+#pragma omp critical(foliaupdate)
+  {
+    word->addPosAnnotation( args );
+  }
+}
+
+void POSTagger::addDeclaration( Document& doc ) const {
+#pragma omp critical(foliaupdate)
+  {
+    doc.declare( AnnotationType::POS, tagset,
+		 "annotator='frog-mbpos-" + version
+		 + "', annotatortype='auto', datetime='" + getTime() + "'");
+  }
+}
+
+vector<TagResult> POSTagger::tagLine( const string& line ){
+  if ( tagger )
+    return tagger->TagLine(line);
+  else
+    throw runtime_error( "POSTagger is not initialized" );
+}
+
+string POSTagger::set_eos_mark( const std::string& eos ){
+  if ( tagger )
+    return tagger->set_eos_mark( eos );
+  else
+    throw runtime_error( "POSTagger is not initialized" );
+}
+
+void POSTagger::Classify( const vector<Word*>& swords ){
+  if ( !swords.empty() ) {
+    string sentence; // the tagger needs the whole sentence
+    for ( size_t w = 0; w < swords.size(); ++w ) {
+      UnicodeString word;
+#pragma omp critical(foliaupdate)
+      {
+	word = swords[w]->text();
+      }
+      if ( filter )
+	word = filter->filter( word );
+      sentence += UnicodeToUTF8(word);
+      if ( w < swords.size()-1 )
+	sentence += " ";
+    }
+    if (debug){
+      LOG << "POS tagger in: " << sentence << endl;
+    }
+    vector<TagResult> tagv = tagger->TagLine(sentence);
+    if ( tagv.size() != swords.size() ){
+      LOG << "mismatch between number of <w> tags and the tagger result." << endl;
+      LOG << "words according to <w> tags: " << endl;
+      for ( size_t w = 0; w < swords.size(); ++w ) {
+	LOG << "w[" << w << "]= " << swords[w]->str() << endl;
+      }
+      LOG << "words according to POS tagger: " << endl;
+      for ( size_t i=0; i < tagv.size(); ++i ){
+	LOG << "word[" << i << "]=" << tagv[i].word() << endl;
+      }
+      throw runtime_error( "POS tagger is confused" );
+    }
+    if ( debug ){
+      LOG << "POS tagger out: " << endl;
+      for ( size_t i=0; i < tagv.size(); ++i ){
+	LOG << "[" << i << "] : word=" << tagv[i].word()
+	    << " tag=" << tagv[i].assignedTag()
+	    << " confidence=" << tagv[i].confidence() << endl;
+      }
+    }
+    for ( size_t i=0; i < tagv.size(); ++i ){
+      addTag( swords[i], tagv[i].assignedTag(), tagv[i].confidence() );
+    }
+  }
+}
diff --git a/src/ucto_tokenizer_mod.cxx b/src/ucto_tokenizer_mod.cxx
index 1ab003c..bd10e24 100644
--- a/src/ucto_tokenizer_mod.cxx
+++ b/src/ucto_tokenizer_mod.cxx
@@ -1,13 +1,13 @@
+/* ex: set tabstop=8 expandtab: */
 /*
-  $Id: ucto_tokenizer_mod.cxx 17436 2014-07-09 13:13:35Z sloot $
-  $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/src/ucto_tokenizer_mod.cxx $
+  Copyright (c) 2006 - 2016
+  CLST  - Radboud University
+  ILK   - Tilburg University
 
-  Copyright (c) 2006 - 2014
-  Tilburg University
+  This file is part of frog:
 
-  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for Dutch
-
-  This file is part of frog
+  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
+  several languages
 
   frog is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -23,9 +23,10 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
   For questions and suggestions, see:
-      http://ilk.uvt.nl/software.html
+      https://github.com/LanguageMachines/frog/issues
   or send mail to:
-      timbl at uvt.nl
+      lamasoftware (at ) science.ru.nl
+
 */
 
 #include <map>
@@ -33,19 +34,32 @@
 #include "timbl/TimblAPI.h"
 #include "frog/Frog.h"
 #include "ticcutils/Configuration.h"
+#include "ticcutils/FileUtils.h"
 #include "frog/ucto_tokenizer_mod.h"
 
 using namespace std;
 using namespace TiCC;
 
-UctoTokenizer::UctoTokenizer() {
+UctoTokenizer::UctoTokenizer(LogStream * logstream) {
   tokenizer = 0;
-  uctoLog = new LogStream( theErrLog, "tok-" );
+  uctoLog = new LogStream( logstream, "tok-" );
+}
+
+string resolve_configdir( const string& rules_name, const string& dir ){
+  if ( TiCC::isFile( rules_name ) ){
+    return rules_name;
+  }
+  string temp = prefix( dir, rules_name );
+  if ( TiCC::isFile( temp ) ){
+    return temp;
+  }
+  // not found. so lets hope ucto can find it!
+  return rules_name;
 }
 
-bool UctoTokenizer::init( const Configuration& config, const string & docid, bool pass ){
+bool UctoTokenizer::init( const Configuration& config ){
   if ( tokenizer )
-    throw runtime_error( "ucto tokenizer is already initalized" );
+    throw runtime_error( "ucto tokenizer is already initialized" );
   tokenizer = new Tokenizer::TokenizerClass();
   tokenizer->setErrorLog( uctoLog );
   int debug = 0;
@@ -55,11 +69,13 @@ bool UctoTokenizer::init( const Configuration& config, const string & docid, boo
   }
   if ( !val.empty() )
     debug = TiCC::stringTo<int>( val );
+  if ( !config.hasSection("tokenizer") ){
+    tokenizer->setPassThru();
+  }
   tokenizer->setDebug( debug );
-  if ( pass ){
+  if ( tokenizer->getPassThru() ){
     // when passthru, we don't further initialize the tokenizer
     // it wil run in minimal mode then.
-    tokenizer->setPassThru( true );
   }
   else {
     string rulesName = config.lookUp( "rulesFile", "tokenizer" );
@@ -68,6 +84,7 @@ bool UctoTokenizer::init( const Configuration& config, const string & docid, boo
       return false;
     }
     else {
+      rulesName = resolve_configdir( rulesName, config.configDir() );
       if ( !tokenizer->init( rulesName ) )
 	return false;
     }
@@ -76,7 +93,7 @@ bool UctoTokenizer::init( const Configuration& config, const string & docid, boo
   tokenizer->setVerbose( false );
   tokenizer->setSentenceDetection( true ); //detection of sentences
   tokenizer->setParagraphDetection( false ); //detection of paragraphs
-  tokenizer->setXMLOutput( true, docid );
+  tokenizer->setXMLOutput( true );
   return true;
 }
 
@@ -86,21 +103,21 @@ void UctoTokenizer::setUttMarker( const string& u ) {
       tokenizer->setEosMarker( u );
   }
   else
-    throw runtime_error( "ucto tokenizer not initalized" );
+    throw runtime_error( "ucto tokenizer not initialized" );
 }
 
 void UctoTokenizer::setSentencePerLineInput( bool b ) {
   if ( tokenizer )
     tokenizer->setSentencePerLineInput( b );
   else
-    throw runtime_error( "ucto tokenizer not initalized" );
+    throw runtime_error( "ucto tokenizer not initialized" );
 }
 
 void UctoTokenizer::setQuoteDetection( bool b ) {
   if ( tokenizer )
     tokenizer->setQuoteDetection( b );
   else
-    throw runtime_error( "ucto tokenizer not initalized" );
+    throw runtime_error( "ucto tokenizer not initialized" );
 }
 
 void UctoTokenizer::setInputEncoding( const std::string & enc ){
@@ -109,7 +126,7 @@ void UctoTokenizer::setInputEncoding( const std::string & enc ){
       tokenizer->setInputEncoding( enc );
   }
   else
-    throw runtime_error( "ucto tokenizer not initalized" );
+    throw runtime_error( "ucto tokenizer not initialized" );
 }
 
 void UctoTokenizer::setTextClass( const std::string& cls ){
@@ -118,7 +135,16 @@ void UctoTokenizer::setTextClass( const std::string& cls ){
       tokenizer->setTextClass( cls );
   }
   else
-    throw runtime_error( "ucto tokenizer not initalized" );
+    throw runtime_error( "ucto tokenizer not initialized" );
+}
+
+void UctoTokenizer::setDocID( const std::string& id ){
+  if ( tokenizer ){
+    if ( !id.empty() )
+      tokenizer->setDocID( id );
+  }
+  else
+    throw runtime_error( "ucto tokenizer not initialized" );
 }
 
 void UctoTokenizer::setInputXml( bool b ){
@@ -126,7 +152,23 @@ void UctoTokenizer::setInputXml( bool b ){
     tokenizer->setXMLInput( b );
   }
   else
-    throw runtime_error( "ucto tokenizer not initalized" );
+    throw runtime_error( "ucto tokenizer not initialized" );
+}
+
+void UctoTokenizer::setPassThru( const bool b ) {
+  if ( tokenizer ){
+    tokenizer->setPassThru( b );
+  }
+  else
+    throw runtime_error( "ucto tokenizer not initialized" );
+}
+
+bool UctoTokenizer::getPassThru() const {
+  if ( tokenizer ){
+    return tokenizer->getPassThru();
+  }
+  else
+    throw runtime_error( "ucto tokenizer not initialized" );
 }
 
 vector<string> UctoTokenizer::tokenize( const string& line ){
@@ -142,20 +184,37 @@ vector<string> UctoTokenizer::tokenize( const string& line ){
     return tokenizer->getSentences();
   }
   else
-    throw runtime_error( "ucto tokenizer not initalized" );
+    throw runtime_error( "ucto tokenizer not initialized" );
 }
 
-folia::Document UctoTokenizer::tokenize( istream& is ){
+string UctoTokenizer::tokenizeStream( istream& is ){
+  if ( tokenizer ){
+    return tokenizer->tokenizeSentenceStream( is );
+  }
+  else
+    throw runtime_error( "ucto tokenizer not initialized" );
+}
+
+folia::Document *UctoTokenizer::tokenize( istream& is ){
   if ( tokenizer )
     return tokenizer->tokenize( is );
   else
-    throw runtime_error( "ucto tokenizer not initalized" );
+    throw runtime_error( "ucto tokenizer not initialized" );
+}
+
+folia::Document *UctoTokenizer::tokenizestring( const string& s){
+  if ( tokenizer) {
+    istringstream is(s);
+    return tokenizer->tokenize( is);
+  }
+  else
+    throw runtime_error( "ucto tokenizer not initialized" );
 }
 
 bool UctoTokenizer::tokenize( folia::Document& doc ){
   if ( tokenizer )
     return tokenizer->tokenize( doc );
   else
-    throw runtime_error( "ucto tokenizer not initalized" );
+    throw runtime_error( "ucto tokenizer not initialized" );
 
 }
diff --git a/test-driver b/test-driver
index d306056..8e575b0 100755
--- a/test-driver
+++ b/test-driver
@@ -3,7 +3,7 @@
 
 scriptversion=2013-07-13.22; # UTC
 
-# Copyright (C) 2011-2013 Free Software Foundation, Inc.
+# Copyright (C) 2011-2014 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -106,11 +106,14 @@ trap "st=143; $do_exit" 15
 # Test script is run here.
 "$@" >$log_file 2>&1
 estatus=$?
+
 if test $enable_hard_errors = no && test $estatus -eq 99; then
-  estatus=1
+  tweaked_estatus=1
+else
+  tweaked_estatus=$estatus
 fi
 
-case $estatus:$expect_failure in
+case $tweaked_estatus:$expect_failure in
   0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
   0:*)   col=$grn res=PASS  recheck=no  gcopy=no;;
   77:*)  col=$blu res=SKIP  recheck=no  gcopy=yes;;
@@ -119,6 +122,12 @@ case $estatus:$expect_failure in
   *:*)   col=$red res=FAIL  recheck=yes gcopy=yes;;
 esac
 
+# Report the test outcome and exit status in the logs, so that one can
+# know whether the test passed or failed simply by looking at the '.log'
+# file, without the need of also peaking into the corresponding '.trs'
+# file (automake bug#11814).
+echo "$res $test_name (exit status: $estatus)" >>$log_file
+
 # Report outcome to console.
 echo "${col}${res}${std}: $test_name"
 
diff --git a/tests/Makefile.am b/tests/Makefile.am
index eacd15f..2e133f3 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,4 +1,4 @@
-# $Id: Makefile.am 13537 2011-11-10 14:36:15Z sloot $
-# $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/tests/Makefile.am $
+# $Id$
+# $URL$
 
 EXTRA_DIST = tst.txt tst.ok
diff --git a/tests/Makefile.in b/tests/Makefile.in
index b4d3d23..eb79c0c 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,10 +14,20 @@
 
 @SET_MAKE@
 
-# $Id: Makefile.am 13537 2011-11-10 14:36:15Z sloot $
-# $URL: https://ilk.uvt.nl/svn/sources/Frog/trunk/tests/Makefile.am $
+# $Id$
+# $URL$
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,18 +91,16 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = tests
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ac_python_devel.m4 \
-	$(top_srcdir)/m4/ax_icu_check.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_icu_check.m4 \
 	$(top_srcdir)/m4/ax_lib_readline.m4 \
 	$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-	$(top_srcdir)/m4/openmp.m4 $(top_srcdir)/m4/pkg.m4 \
-	$(top_srcdir)/configure.ac
+	$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -117,6 +125,7 @@ am__can_run_installinfo = \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -169,6 +178,7 @@ LIBTOOL = @LIBTOOL@
 LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAKEINFO = @MAKEINFO@
 MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
@@ -176,6 +186,7 @@ NM = @NM@
 NMEDIT = @NMEDIT@
 OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@
 OTOOL = @OTOOL@
 OTOOL64 = @OTOOL64@
 PACKAGE = @PACKAGE@
@@ -192,17 +203,6 @@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
-PYTHON = @PYTHON@
-PYTHONDIR = @PYTHONDIR@
-PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
-PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
-PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@
-PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
-PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
-PYTHON_PLATFORM = @PYTHON_PLATFORM@
-PYTHON_PREFIX = @PYTHON_PREFIX@
-PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
-PYTHON_VERSION = @PYTHON_VERSION@
 RANLIB = @RANLIB@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
@@ -240,6 +240,8 @@ dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 folia_CFLAGS = @folia_CFLAGS@
 folia_LIBS = @folia_LIBS@
+frogdata_CFLAGS = @frogdata_CFLAGS@
+frogdata_LIBS = @frogdata_LIBS@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
@@ -260,13 +262,10 @@ mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
 pkgconfigpath = @pkgconfigpath@
-pkgpyexecdir = @pkgpyexecdir@
-pkgpythondir = @pkgpythondir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
-pyexecdir = @pyexecdir@
-pythondir = @pythondir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
@@ -276,8 +275,6 @@ ticcutils_CFLAGS = @ticcutils_CFLAGS@
 ticcutils_LIBS = @ticcutils_LIBS@
 timbl_CFLAGS = @timbl_CFLAGS@
 timbl_LIBS = @timbl_LIBS@
-timblserver_CFLAGS = @timblserver_CFLAGS@
-timblserver_LIBS = @timblserver_LIBS@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
@@ -299,7 +296,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --gnu tests/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -474,6 +470,8 @@ uninstall-am:
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/frog.git



More information about the debian-science-commits mailing list