Locked History Actions

attachment:patches-r150-4.diff of PANTERA

Attachment 'patches-r150-4.diff'

Download

   1 Index: third_party/morfeusz/Makefile.am
   2 ===================================================================
   3 --- third_party/morfeusz/Makefile.am.orig	2010-08-10 18:11:58.000000000 +0200
   4 +++ third_party/morfeusz/Makefile.am	2012-07-04 11:15:13.500186560 +0200
   5 @@ -1,10 +1,10 @@
   6  install-exec-local:
   7 -	$(INSTALL_PROGRAM) -D lib/libmorfeusz.so.0.6 $(pkglibdir)/libmorfeusz.so.0.6
   8 -	$(LN_S) -f libmorfeusz.so.0.6 $(pkglibdir)/libmorfeusz.so.0
   9 -	$(LN_S) -f libmorfeusz.so.0.6 $(pkglibdir)/libmorfeusz.so
  10 +#	$(INSTALL_PROGRAM) -D lib/libmorfeusz.so.0.6 $(pkglibdir)/libmorfeusz.so.0.6
  11 +#	$(LN_S) -f libmorfeusz.so.0.6 $(pkglibdir)/libmorfeusz.so.0
  12 +#	$(LN_S) -f libmorfeusz.so.0.6 $(pkglibdir)/libmorfeusz.so
  13  
  14  uninstall-local:
  15 -	rm -f $(pkglibdir)/libmorfeusz.so
  16 -	rm -f $(pkglibdir)/libmorfeusz.so.0
  17 -	rm -f $(pkglibdir)/libmorfeusz.so.0.6
  18 +#	rm -f $(pkglibdir)/libmorfeusz.so
  19 +#	rm -f $(pkglibdir)/libmorfeusz.so.0
  20 +#	rm -f $(pkglibdir)/libmorfeusz.so.0.6
  21  
  22 Index: src/pantera.cpp
  23 ===================================================================
  24 --- src/pantera.cpp.orig	2011-11-21 17:25:45.000000000 +0100
  25 +++ src/pantera.cpp	2012-07-04 11:26:38.940173323 +0200
  26 @@ -35,7 +35,7 @@
  27  #include "pantera_rules.h"
  28  
  29  #ifndef DEFAULT_TAGSET
  30 -#define DEFAULT_TAGSET "ipipan"
  31 +#define DEFAULT_TAGSET "nkjp"
  32  #endif
  33  
  34  #ifndef DEFAULT_ENGINE
  35 @@ -80,9 +80,9 @@
  36  
  37      if (fs::is_regular_file(path)) {
  38          if (path.filename() == "text_structure.xml") {
  39 -            candidates.push_back(make_pair(path.file_string(), "nkjp-text"));
  40 +            candidates.push_back(make_pair(path.string(), "nkjp-text"));
  41          } else if (path.filename() == "morph.xml") {
  42 -            candidates.push_back(make_pair(path.file_string(),
  43 +            candidates.push_back(make_pair(path.string(),
  44                          "ipipan-morph"));
  45          } else if (path.extension() == ".xml") {
  46              fs::ifstream stream(path);
  47 @@ -91,13 +91,13 @@
  48                  char line[1024];
  49                  stream.getline(line, sizeof(line));
  50                  if (!strncmp(pattern, line, strlen(pattern))) {
  51 -                    candidates.push_back(make_pair(path.file_string(),
  52 +                    candidates.push_back(make_pair(path.string(),
  53                                  "ipipan-morph"));
  54                      break;
  55                  }
  56              }
  57          } else if (path.extension() == ".txt" && specified_directly) {
  58 -            candidates.push_back(make_pair(path.file_string(),
  59 +            candidates.push_back(make_pair(path.string(),
  60                          "plaintext"));
  61          }
  62      } else if (fs::is_directory(path)) {
  63 @@ -137,7 +137,7 @@
  64          type) {
  65      vector<fs::path> ret;
  66      if (type == "ipipan-morph") {
  67 -        ret.push_back(input_path.file_string() + ".disamb");
  68 +        ret.push_back(input_path.string() + ".disamb");
  69      } else if (type == "nkjp-text" || type == "plaintext") {
  70          string segm_filename = "ann_segmentation.xml";
  71          string morph_filename = "ann_morphosyntax.xml";
  72 @@ -160,31 +160,33 @@
  73  boost::scoped_ptr<Lexer<MyLexeme> > lexer;
  74  
  75  static void preprocess_file(const fs::path& path, const string& type,
  76 -        const Tagset* tagset, vector<MyLexeme>& text, bool only_lex = false) {
  77 +        const Tagset* tagset, vector<MyLexeme>& text, const bool only_lex = false,
  78 +        const bool ignoreSentsInsideSegment = false) {
  79      fs::ifstream data_stream(path);
  80      lexer.reset(make_lexer(type, data_stream));
  81  
  82      // 1. Parser.
  83 -    print_status("LEXER", path.file_string());
  84 +    print_status("LEXER", path.string());
  85      text.clear();
  86      lexer->setQuiet(options.count("verbose") == 0);
  87      lexer->parseStreamToVector(text, &tagset);
  88  
  89      if (only_lex)
  90          return;
  91 -
  92      // 2. Sentencer.
  93      if (options.count("no-sentencer") == 0) {
  94 -        print_status("SENTENCER", path.file_string());
  95 -        static LibSegmentSentencer<MyLexeme> sentencer;
  96 -        text = sentencer.addSentenceDelimiters(text);
  97 +        print_status("SENTENCER", path.string());
  98 +        static LibSegmentSentencer<MyLexeme> sentencer(ignoreSentsInsideSegment);
  99 +        string sentencerRulesFile = options.count("sentencer-rules") != 0 
 100 +            ? options["sentencer-rules"].as<string>()
 101 +            : "";
 102 +        text = sentencer.addSentenceDelimiters(text, sentencerRulesFile);
 103      }
 104  
 105      // 3. Morphological analyzer.
 106      if (options.count("no-morph") == 0) {
 107  
 108 -        static MorfeuszAnalyzer<MyLexeme> morfeusz(tagset,
 109 -                options.count("no-guesser") == 0);
 110 +        static MorfeuszAnalyzer<MyLexeme> morfeusz(tagset);
 111          static PolishSegmDisambiguator<MyLexeme> segm_disamb;
 112          static bool first_time = true;
 113  
 114 @@ -195,15 +197,19 @@
 115  
 116              if (options.count("morph-dict")) {
 117                  BOOST_FOREACH(const string& filename,
 118 -                        options["morph-dict"].as<vector<string> >())
 119 -                    morfeusz.loadMorphDict(filename);
 120 +                        options["morph-dict"].as<vector<string> >()) {
 121 +                    ifstream stream(filename.c_str());
 122 +                    stream.exceptions(ifstream::badbit);
 123 +                    morfeusz.loadMorphDict(stream);
 124 +                }
 125              }
 126          }
 127  
 128 -        print_status("MORPH", path.file_string());
 129 -        text = morfeusz.analyzeText(text);
 130 +        print_status("MORPH", path.string());
 131 +        bool use_odgadywacz = options.count("no-guesser") == 0;
 132 +        text = morfeusz.analyzeText(text, use_odgadywacz);
 133  
 134 -        print_status("SEGM-DISAMB", path.file_string());
 135 +        print_status("SEGM-DISAMB", path.string());
 136          segm_disamb.disambiguateSegmentation(text);
 137      }
 138  }
 139 @@ -211,7 +217,7 @@
 140  static void postprocess_file(const fs::path& path, string type,
 141          const vector<fs::path> output_paths, const Tagset* tagset,
 142          vector<MyLexeme>& text) {
 143 -    print_status("WRITER", path.file_string());
 144 +    print_status("WRITER", path.string());
 145  
 146      string output_format = options["output-format"].as<string>();
 147      if (output_format == "xces")
 148 @@ -226,7 +232,7 @@
 149                      % output_format));
 150  
 151      if (type == "ipipan-morph" || type == "ipipan-disamb") {
 152 -        ofstream rewrite_out((path.file_string() + ".disamb").c_str());
 153 +        ofstream rewrite_out((path.string() + ".disamb").c_str());
 154          IpiPanWriter<MyLexeme> writer(rewrite_out, type == "ipipan-morph");
 155          writer.writeVectorToStream(tagset, text);
 156      } else if (type == "nkjp-text" || type == "plaintext") {
 157 @@ -333,6 +339,8 @@
 158          ("morph-dict,d", po::value<vector<string> >(),
 159           "extra morphological dictionaries, see documentation "
 160           "on the project page for format examples.")
 161 +        ("sentencer-rules,s", po::value<string>(), "path to sentencer rules file (in SRX format)")
 162 +        ("ignore-sents-inside-segment", "ignore sentence delimiters inside segment (instead of splitting the segment)")
 163          ("nkjp-tool-name", po::value<string>()->default_value("pantera"),
 164           "the name of the tool to use when producing NKJP XML output "
 165           "(default is 'pantera').")
 166 @@ -451,7 +459,7 @@
 167              BOOST_FOREACH(const input_pair_type& input_pair, training_files) {
 168                  vector<MyLexeme> text;
 169                  preprocess_file(input_pair.first, input_pair.second, tagset,
 170 -                        text, true);
 171 +                        text, true, options.count("ignore-sents-inside-segments") != 0);
 172                  all_text.insert(all_text.end(), text.begin(), text.end());
 173              }
 174  
 175 @@ -485,7 +493,7 @@
 176                  fs::ofstream data_ostream(engine_path, ios::out);
 177                  boost::archive::text_oarchive engine_oarchive(data_ostream);
 178                  engine_oarchive << engine;
 179 -                data_stream.close();
 180 +                data_ostream.close();
 181  
 182                  cerr << endl;
 183                  cerr << "The engine has been converted to a newer file format."
 184 @@ -553,7 +561,7 @@
 185                      input_pair.second);
 186  
 187              vector<MyLexeme> text;
 188 -            preprocess_file(input_pair.first, input_pair.second, tagset, text);
 189 +            preprocess_file(input_pair.first, input_pair.second, tagset, text, false);
 190              progress.set(done += 0.3);
 191              progress_left -= 0.3;
 192  
 193 Index: src/nlpcommon/libsegmentsentencer.h
 194 ===================================================================
 195 --- src/nlpcommon/libsegmentsentencer.h.orig	2011-01-20 22:28:22.000000000 +0100
 196 +++ src/nlpcommon/libsegmentsentencer.h	2012-07-04 11:26:38.784173324 +0200
 197 @@ -11,6 +11,12 @@
 198  #include <istream>
 199  #include <vector>
 200  #include <algorithm>
 201 +#include <string>
 202 +#include <iostream>
 203 +#include <sstream>
 204 +
 205 +#include <boost/algorithm/string.hpp>
 206 +#include <boost/foreach.hpp>
 207  
 208  #include <nlpcommon/sentencer.h>
 209  #include <nlpcommon/lexeme.h>
 210 @@ -20,166 +26,288 @@
 211  #include <nlpcommon/_pstream.h>
 212  #include <nlpcommon/util.h>
 213  
 214 +#include <TaggingOptions.h>
 215 +
 216  #ifndef SEGMENT_PATH
 217  #error SEGMENT_PATH should be defined automatically by build system
 218  #endif
 219  
 220 +#define DEFAULT_SEGMENT_RULES "segment.srx"
 221 +
 222  namespace NLPCommon {
 223  
 224  using namespace redi;
 225  
 226  template<class Lexeme = DefaultLexeme>
 227 -class LibSegmentSentencer : public Sentencer<Lexeme>
 228 -{
 229 +class LibSegmentSentencer: public Sentencer<Lexeme> {
 230 +public:
 231 +    //~ typedef typename vector<Lexeme>::iterator LexemsIterator;
 232  private:
 233      string segment_exec;
 234 +    bool ignoreSentsInsideSegment;
 235      pstream ps;
 236  
 237 -public:
 238 -    LibSegmentSentencer()
 239 -        : Sentencer<Lexeme>(),
 240 -          segment_exec(find_with_path(SEGMENT_PATH, "segment_batch").file_string())
 241 -    {
 242 +    std::string getCurrentChunk(
 243 +            const std::string& response,
 244 +            const int response_position,
 245 +            const std::string& utf8_orth) {
 246 +        string res = response.substr(
 247 +                                response_position,
 248 +                                std::min(response.length() - response_position, utf8_orth.length()));
 249 +        int currPos = response_position + res.length();
 250 +        while (chunkWithoutSentenceDelimiters(res).length() < utf8_orth.length()
 251 +                && currPos < response.length()) {
 252 +            res += response[currPos];
 253 +            currPos++;
 254 +        }
 255 +        return res;
 256      }
 257  
 258 -    virtual ~LibSegmentSentencer() { }
 259 -
 260 -    vector<Lexeme> addSentenceDelimiters(const vector<Lexeme>& text) {
 261 -        int len = text.size();
 262 -        vector<Lexeme> out;
 263 +    std::string chunkWithoutSentenceDelimiters(const std::string& chunk) {
 264 +        std::string res = chunk;
 265 +        res.erase(std::remove(res.begin(), res.end(), '\0'), res.end());
 266 +        return res;
 267 +    }
 268 +    
 269 +    void splitChunk(vector<string>& res, const string& chunk) {
 270 +        std::stringstream currStream;
 271 +        bool addedCurrStream;
 272 +        BOOST_FOREACH( char c, chunk ) {
 273 +            addedCurrStream = false;
 274 +            if (c == '\0') {
 275 +                res.push_back(currStream.str());
 276 +                currStream.str("");
 277 +                addedCurrStream = true;
 278 +            }
 279 +            else {
 280 +                currStream << c;
 281 +            }
 282 +        }
 283 +        if (!addedCurrStream) {
 284 +            res.push_back(currStream.str());
 285 +        }
 286 +    }
 287  
 288 +    std::vector<Lexeme> splitSegmentIntoSents(const Lexeme& lex, const std::string& currChunk) {
 289 +        std::vector<Lexeme> res;
 290 +        std::vector<std::string> delimitedChunks;
 291 +        splitChunk(delimitedChunks, currChunk);
 292 +        //~ std::cerr << "currChunk.length()=" << currChunk.length() << " delimitedChunks.size()=" << delimitedChunks.size() << std::endl;
 293 +        bool isFirst = true;
 294 +        BOOST_FOREACH( std::string chunk, delimitedChunks ) {
 295 +            if (!isFirst) {
 296 +                res.push_back(Lexeme(Lexeme::END_OF_SENTENCE));
 297 +                res.push_back(Lexeme(Lexeme::START_OF_SENTENCE));
 298 +                res.push_back(Lexeme(Lexeme::NO_SPACE));
 299 +            }
 300 +            Lexeme currLex(Lexeme::SEGMENT);
 301 +            currLex.setUtf8Orth(chunk);
 302 +            res.push_back(currLex);
 303 +            isFirst = false;
 304 +        }
 305 +        return res;
 306 +    }
 307 +    
 308 +    void runSegmentSubprocess(const string& rulesPath) {
 309          if (!ps.is_open()) {
 310 -            vector<string> args;
 311 +            vector < string > args;
 312              args.push_back(segment_exec);
 313              args.push_back("--null-delimiter");
 314 +            args.push_back("-l");
 315 +            args.push_back("pl");
 316 +            args.push_back("-s");
 317 +            args.push_back(rulesPath);
 318 +
 319              ps.open(segment_exec, args,
 320 -                    pstreams::pstdin|pstreams::pstdout|pstreams::pstderr);
 321 +                    pstreams::pstdin | pstreams::pstdout | pstreams::pstderr);
 322              if (!ps.is_open()) {
 323 -                throw Exception("Cannot execute 'segment_batch' excutable "
 324 -                        "with path '" SEGMENT_PATH "')");
 325 +                throw Exception("Cannot execute 'segment_batch' excutable with path '" SEGMENT_PATH "')");
 326 +            }
 327 +        }
 328 +    }
 329 +    
 330 +    int rewriteNonParagraphLexems(const vector<Lexeme>& text, int textIdx, vector<Lexeme>& out) {
 331 +        Lexeme lex = text[textIdx];
 332 +        while (textIdx < text.size() && lex.getType() != Lexeme::START_OF_PARAGRAPH) {
 333 +            out.push_back(lex);
 334 +            this->advanceProgress();
 335 +            
 336 +            textIdx++;
 337 +            lex = text[textIdx];
 338 +        }
 339 +        return textIdx;
 340 +    }
 341 +    
 342 +    int getOneParagraph(const vector<Lexeme>& text, const int currTextIdx, vector<Lexeme>& paragraph) {
 343 +        int textIdx = currTextIdx;
 344 +        assert(textIdx < text.size());
 345 +        assert(text[textIdx].getType() == Lexeme::START_OF_PARAGRAPH);
 346 +        bool stop = false;
 347 +        while (textIdx < text.size() && !stop) {
 348 +            Lexeme lex = text[textIdx];
 349 +            paragraph.push_back(lex);
 350 +            if (lex.getType() == Lexeme::END_OF_PARAGRAPH) {
 351 +                stop = true;
 352              }
 353 +            textIdx++;
 354 +        }
 355 +        return textIdx;
 356 +    }
 357 +    
 358 +    void feedSentencerWithParagraph(const vector<Lexeme>& paragraph) {
 359 +        bool no_space = true;
 360 +        BOOST_FOREACH( Lexeme lex, paragraph ) {
 361 +            if (lex.getType() == Lexeme::NO_SPACE) {
 362 +                no_space = true;
 363 +            } 
 364 +            else if (lex.getType() == Lexeme::SEGMENT) {
 365 +                if (!no_space)
 366 +                    ps << ' ';
 367 +                ps << lex.getUtf8Orth();
 368 +                no_space = false;
 369 +            }
 370 +        }
 371 +        ps << '\n';
 372 +        ps.flush();
 373 +    }
 374 +    
 375 +    void readSentencerResponse(string& response) {
 376 +        if (!getline(ps.out(), response))
 377 +            throw Exception("No response returned by 'segment_batch' executable");
 378 +    }
 379 +    
 380 +    int handleSpacesAndNewSentMarks(const bool no_space, const bool first_sentence, const string& response, int response_position, vector<Lexeme>& out) {
 381 +        
 382 +        bool was_space_before_newsent = false;
 383 +        
 384 +        // handle space before new sentence
 385 +        if (response[response_position] == ' '
 386 +                && response[response_position + 1] == '\0') {
 387 +            was_space_before_newsent = true;
 388 +            response_position++;
 389          }
 390 +        
 391 +        // handle new sentence
 392 +        if (response[response_position] == '\0') {
 393 +            if (!first_sentence) {
 394 +                out.push_back(Lexeme(Lexeme::END_OF_SENTENCE));
 395 +            }
 396 +            out.push_back(Lexeme(Lexeme::START_OF_SENTENCE));
 397  
 398 -        try {
 399 -            int i = -1, j;
 400 -            for (;;) {
 401 -                // Rewrite everything which is out of paragraphs.
 402 -                for (i++; i < len; i++) {
 403 -                    const Lexeme& lex = text[i];
 404 +            response_position++;
 405 +        }
 406 +        
 407 +        // handle regular space
 408 +        if (!no_space && !was_space_before_newsent) {
 409 +            if (response[response_position] != ' ') {
 410 +                throw Exception(
 411 +                    boost::str(boost::format(
 412 +                        "Expected space not found in "
 413 +                        "output of segment_batch. "
 414 +                        "(Response there: '%1%')")
 415 +                    % response.substr(response_position)));
 416 +            }
 417 +            response_position++;
 418 +        }
 419 +        
 420 +        return response_position;
 421 +    }
 422 +    
 423 +    int handleCurrentToken(const Lexeme& lex, const string& response, int response_position, vector<Lexeme>& out) {
 424 +        string utf8_orth = lex.getUtf8Orth();
 425 +        string currChunk = getCurrentChunk(response, response_position, utf8_orth);
 426 +        if (currChunk == utf8_orth) {
 427 +            response_position += utf8_orth.length();
 428 +            out.push_back(lex);
 429 +        }
 430 +        else if (chunkWithoutSentenceDelimiters(currChunk) == utf8_orth) {
 431 +            if (ignoreSentsInsideSegment) {
 432 +                std::cerr << "WARN: ignoring sentence delimiters in segment '" << currChunk << "'." << std::endl;
 433 +                out.push_back(lex);
 434 +                response_position += currChunk.length();
 435 +            }
 436 +            else {
 437 +                std::cerr << "WARN: adding sentence delimiters into segment '" << currChunk << "'." << std::endl;
 438 +                BOOST_FOREACH( Lexeme lex, splitSegmentIntoSents(lex, currChunk)) {
 439 +                    //~ if (lex.getType() == Lexeme::SEGMENT)
 440 +                        //~ std::cerr << "WARN: adding " << lex.getUtf8Orth() << std::endl;
 441                      out.push_back(lex);
 442 -                    this->advanceProgress();
 443 -                    if (lex.getType() == Lexeme::START_OF_PARAGRAPH)
 444 -                        break;
 445                  }
 446 -
 447 -                if (i == len)
 448 -                    break;
 449 -
 450 -                // Feed the sentencer with the paragraph.
 451 -                bool no_space = true;
 452 -                for (j = i; j < len; j++) {
 453 -                    const Lexeme& lex = text[j];
 454 -                    if (lex.getType() == Lexeme::END_OF_PARAGRAPH) {
 455 -                        break;
 456 -                    } else if (lex.getType() == Lexeme::NO_SPACE) {
 457 -                        no_space = true;
 458 -                    } else if (lex.getType() == Lexeme::SEGMENT) {
 459 -                        if (!no_space)
 460 -                            ps << ' ';
 461 -                        ps << lex.getUtf8Orth();
 462 -                        no_space = false;
 463 -                    }
 464 -                }
 465 -                ps << '\n';
 466 -
 467 -                // Read response.
 468 -                ps.flush();
 469 -                std::string response;
 470 -                if (!getline(ps.out(), response)) {
 471 -                    std::cerr << "RESP: " << response << std::endl;
 472 -                    throw Exception("No response returned by 'segment_batch'"
 473 -                            " executable");
 474 -                }
 475 -
 476 -
 477 -                // Read back and insert sentence delimiters.
 478 -                bool first_sentence = true;
 479 -                int response_position = 0;
 480 +                response_position += currChunk.length();
 481 +            }
 482 +        }
 483 +        else {
 484 +            throw Exception(boost::str(boost::format(
 485 +                        "Expected word '%1%' not found in"
 486 +                        "output of segment_batch. "
 487 +                        "(Response there: '%2%')")
 488 +                        % utf8_orth
 489 +                        % response.substr(response_position)));
 490 +        }
 491 +        
 492 +        return response_position;
 493 +    }
 494 +    
 495 +    void parseSentencerResponse(const vector<Lexeme>& paragraph, const string& response, vector<Lexeme>& out) {
 496 +        bool no_space = true;
 497 +        bool first_sentence = true;
 498 +        int response_position = 0;
 499 +        BOOST_FOREACH( Lexeme lex, paragraph ) {
 500 +            if (lex.getType() == Lexeme::NO_SPACE) {
 501                  no_space = true;
 502 -                for (j = i + 1; j < len; j++) {
 503 -                    const Lexeme& lex = text[j];
 504 -                    if (lex.getType() == Lexeme::END_OF_PARAGRAPH) {
 505 -                        break;
 506 -                    } else if (lex.getType() == Lexeme::NO_SPACE) {
 507 -                        out.push_back(lex);
 508 -                        no_space = true;
 509 -                    } else if (lex.getType() == Lexeme::SEGMENT) {
 510 -                        const std::string& utf8_orth = lex.getUtf8Orth();
 511 -
 512 -                        if (response[response_position] == '\0') {
 513 -                            // New sentence starts here.
 514 -                            if (first_sentence) {
 515 -                                first_sentence = false;
 516 -                            } else {
 517 -                                out.push_back(Lexeme(Lexeme::END_OF_SENTENCE));
 518 -                            }
 519 -                            out.push_back(Lexeme(Lexeme::START_OF_SENTENCE));
 520 -
 521 -                            response_position++;
 522 -                        }
 523 -
 524 -                        // std::cerr << "response_pos " << response_position
 525 -                        //     << " len " << response.length() << " utf8_orth '" <<
 526 -                        //     utf8_orth << "' no_space " << (no_space ? "Y" : "N")
 527 -                        //     << std::endl;
 528 -
 529 -                        if (!no_space) {
 530 -                            if (response[response_position] != ' ') {
 531 -                                throw Exception(boost::str(boost::format(
 532 -                                                "Expected space not found in "
 533 -                                                "output of segment_batch. "
 534 -                                                "(Response there: '%1%')")
 535 -                                            % response.substr(response_position)));
 536 -                            }
 537 -                            response_position++;
 538 -                        }
 539 -
 540 -                        if (response.substr(response_position,
 541 -                                    std::min(response.length() - response_position,
 542 -                                        utf8_orth.length()))
 543 -                                != utf8_orth) {
 544 -                            std::cerr << "BAD " << utf8_orth << std::endl <<
 545 -                                        response.substr(response_position) << std::endl;
 546 -                            throw Exception(boost::str(boost::format(
 547 -                                            "Expected word '%1%' not found in "
 548 -                                            "output of segment_batch. "
 549 -                                            "(Response there: '%2%')")
 550 -                                        % utf8_orth
 551 -                                        % response.substr(response_position)));
 552 -                        }
 553 -
 554 -                        response_position += utf8_orth.length();
 555 -                        out.push_back(lex);
 556 -                        no_space = false;
 557 -                    } else {
 558 -                        out.push_back(lex);
 559 -                    }
 560 -                    this->advanceProgress();
 561 -                }
 562 -
 563 -                if (!first_sentence)
 564 -                    out.push_back(Lexeme(Lexeme::END_OF_SENTENCE));
 565 -                out.push_back(Lexeme(Lexeme::END_OF_PARAGRAPH));
 566 -
 567 -                i = j;
 568 +                out.push_back(lex);
 569 +            }
 570 +            else if (lex.getType() == Lexeme::SEGMENT) {
 571 +                //~ std::cerr << "segment " << lex.getUtf8Orth() << std::endl;
 572 +                response_position = handleSpacesAndNewSentMarks(no_space, first_sentence, response, response_position, out);
 573 +                //~ std::cerr << "handled spaces and new sent marks " << response_position << std::endl;
 574 +                response_position = handleCurrentToken(lex, response, response_position, out);
 575 +                //~ std::cerr << "handled token itself " << response_position << std::endl;
 576 +                no_space = false;
 577 +                first_sentence = false;
 578              }
 579 +            else
 580 +                out.push_back(lex);
 581 +        }
 582 +    }
 583 +    
 584 +    int doOneParagraph(const vector<Lexeme>& text, int textIdx, vector<Lexeme>& out) {
 585 +        vector<Lexeme> paragraph;
 586 +        string response;
 587 +        textIdx = getOneParagraph(text, textIdx, paragraph);
 588 +        feedSentencerWithParagraph(paragraph);
 589 +        readSentencerResponse(response);
 590 +        parseSentencerResponse(paragraph, response, out);
 591 +        return textIdx;
 592 +    }
 593  
 594 -            return out;
 595 -        } catch (...) {
 596 -            ps.rdbuf()->kill(SIGKILL);
 597 -            ps.close();
 598 -            throw;
 599 +public:
 600 +
 601 +    LibSegmentSentencer(const bool ignoreSentsInsideSegment = false) :
 602 +            Sentencer<Lexeme>(), 
 603 +            segment_exec(find_with_path(SEGMENT_PATH, "segment_batch").string()), 
 604 +            ignoreSentsInsideSegment(ignoreSentsInsideSegment) {}
 605 +
 606 +    virtual ~LibSegmentSentencer() {
 607 +    }
 608 +    
 609 +    vector<Lexeme> addSentenceDelimiters(const vector<Lexeme>& text, const string& sentencerRules) {
 610 +        vector<Lexeme> res;
 611 +        
 612 +        string rulesPath = sentencerRules.empty() 
 613 +                ? find_with_path(SEGMENT_PATH, DEFAULT_SEGMENT_RULES).string()
 614 +                : sentencerRules;
 615 +        runSegmentSubprocess(rulesPath);
 616 +        
 617 +        int textIdx = 0;
 618 +        
 619 +        while (textIdx < text.size()) {
 620 +            textIdx = rewriteNonParagraphLexems(text, textIdx, res);
 621 +            if (textIdx < text.size())
 622 +                textIdx = doOneParagraph(text, textIdx, res);
 623          }
 624 +        
 625 +        return res;
 626      }
 627  };
 628  
 629 Index: libpantera.pc.in
 630 ===================================================================
 631 --- libpantera.pc.in.orig	2011-06-08 22:20:59.000000000 +0200
 632 +++ libpantera.pc.in	2012-07-04 11:15:13.500186560 +0200
 633 @@ -9,6 +9,6 @@
 634  Requires:
 635  Version: @PACKAGE_VERSION@
 636  Libs: -L${pkglibdir} -lcorpus -lnlpcommon -lmorfeusz @BOOST_LDFLAGS@ @BOOST_SERIALIZATION_LIB@ @BOOST_REGEX_LIB@ @BOOST_PROGRAM_OPTIONS_LIB@ @BOOST_SYSTEM_LIB@ @BOOST_FILESYSTEM_LIB@ @BOOST_IOSTREAMS_LIB@ @BOOST_MPI_LIB@ @ICU_LIBS@ @LIBICONV@ -lpantera
 637 -Cflags: 
 638 +Cflags: @OPENMP_CXXFLAGS@
 639  
 640  
 641 Index: src/Makefile.am
 642 ===================================================================
 643 --- src/Makefile.am.orig	2011-06-08 21:25:58.000000000 +0200
 644 +++ src/Makefile.am	2012-07-04 16:28:02.691824049 +0200
 645 @@ -1,6 +1,6 @@
 646  AM_CXXFLAGS = @BOOST_CPPFLAGS@ @OPENMP_CXXFLAGS@ @MORFEUSZ_CFLAGS@ \
 647  	-I../third_party/TaKIPI18/Linux/Corpus \
 648 -	-DSEGMENT_PATH=\"$(libexecdir)/$(PACKAGE):@abs_top_srcdir@/third_party/segment\" \
 649 +	-DSEGMENT_PATH=\"$(libexecdir)/$(PACKAGE):$(pkgdatadir):@abs_top_srcdir@/third_party/segment\" \
 650  	-DENGINES_PATH=\"$(pkgdatadir)/engines:@abs_top_srcdir@/engines\"
 651  
 652  SUBDIRS = nlpcommon
 653 @@ -35,17 +35,18 @@
 654  
 655  clean-local:
 656  	+make -C ../third_party/TaKIPI18/Linux/bin clean
 657 +	rm -rf ../third_party/TaKIPI18/Linux/bin/*
 658  
 659  install-exec-local: ../third_party/TaKIPI18/Linux/bin/Corpus/libcorpus.so
 660 -	$(INSTALL_PROGRAM) -D ../third_party/TaKIPI18/Linux/bin/Corpus/libcorpus.so $(pkglibdir)/libcorpus.so
 661 +	$(INSTALL_PROGRAM) -D ../third_party/TaKIPI18/Linux/bin/Corpus/libcorpus.so $(DESTDIR)$(pkglibdir)/libcorpus.so.1
 662 +	ln -s libcorpus.so.1 $(DESTDIR)$(pkglibdir)/libcorpus.so
 663  
 664  GLOBAL_LINK_FLAGS = -Wl,-rpath -Wl,$(pkglibdir)
 665  
 666  LIBCORPUS_LINK_FLAGS = -L../third_party/TaKIPI18/Linux/bin/Corpus \
 667 -					   -Wl,-rpath -Wl,@abs_top_srcdir@/third_party/TaKIPI18/Linux/bin/Corpus \
 668  					   -lcorpus
 669  
 670 -LIBMORFEUSZ_LINK_FLAGS = -Wl,-rpath -Wl,@abs_top_srcdir@/third_party/morfeusz/lib
 671 +LIBMORFEUSZ_LINK_FLAGS = 
 672  
 673  BUILT_SOURCES = rules/c1.m4h
 674  
 675 @@ -59,46 +60,71 @@
 676  	rules/a.h rules/c1.m4h rules/p1.h rules/p2.h \
 677  	rules/impl.h rules/make.h brillengine.h \
 678  	brillexeme.h unigram.h rules.h pantera_rules.h \
 679 -	pantera.h
 680 +	pantera.h TaggingOptions.h
 681  pantera_CXXFLAGS = $(AM_CXXFLAGS)
 682 -pantera_LDFLAGS = @BOOST_LDFLAGS@ @BOOST_SERIALIZATION_LIB@ \
 683 -				   @BOOST_REGEX_LIB@ @BOOST_PROGRAM_OPTIONS_LIB@ \
 684 +pantera_LDFLAGS = $(LIBCORPUS_LINK_FLAGS) $(GLOBAL_LINK_FLAGS) $(LIBMORFEUSZ_LINK_FLAGS) \
 685 +				   @BOOST_LDFLAGS@ 
 686 +
 687 +pantera_LDADD = nlpcommon/libnlpcommon.la \
 688 +				../third_party/TaKIPI18/Linux/bin/Corpus/libcorpus.so \
 689 +				   @BOOST_SERIALIZATION_LIB@ \
 690 +				   @BOOST_PROGRAM_OPTIONS_LIB@ \
 691  				   @BOOST_SYSTEM_LIB@ @BOOST_FILESYSTEM_LIB@ \
 692  				   @BOOST_IOSTREAMS_LIB@ \
 693  				   @BOOST_MPI_LIB@ @ICU_LIBS@ @LIBICONV@ \
 694 -				   @MORFEUSZ_LIBS@ $(LIBCORPUS_LINK_FLAGS) \
 695 -				   $(GLOBAL_LINK_FLAGS) $(LIBMORFEUSZ_LINK_FLAGS)
 696 -pantera_LDADD = nlpcommon/libnlpcommon.la \
 697 -				../third_party/TaKIPI18/Linux/bin/Corpus/libcorpus.so
 698 +				   @MORFEUSZ_LIBS@ @BOOST_REGEX_LIB@
 699 +
 700 +
 701 +
 702 +libpantera_la_SOURCES = wrapper.cpp pantera_rules.cpp TaggingOptions.cpp
 703 +include_HEADERS = wrapper.h TaggingOptions.h
 704  
 705 -libpantera_la_SOURCES = wrapper.cpp pantera_rules.cpp
 706 -include_HEADERS = wrapper.h
 707 +libpantera_la_LDFLAGS = $(LIBCORPUS_LINK_FLAGS) $(GLOBAL_LINK_FLAGS) $(LIBMORFEUSZ_LINK_FLAGS) \
 708 +				   @BOOST_LDFLAGS@ 
 709 +
 710 +libpantera_la_LIBADD = ../third_party/TaKIPI18/Linux/bin/Corpus/libcorpus.so \
 711 +				   @BOOST_SERIALIZATION_LIB@ \
 712 +				   @BOOST_PROGRAM_OPTIONS_LIB@ \
 713 +				   @BOOST_SYSTEM_LIB@ @BOOST_FILESYSTEM_LIB@ \
 714 +				   @BOOST_IOSTREAMS_LIB@ \
 715 +				   @BOOST_MPI_LIB@ @ICU_LIBS@ @LIBICONV@ \
 716 +				   @MORFEUSZ_LIBS@ @BOOST_REGEX_LIB@
 717  
 718  wrapper_test_SOURCES = wrapper_test.cpp \
 719  	rules/a.h rules/c1.m4h rules/p1.h rules/p2.h \
 720  	rules/impl.h rules/make.h brillengine.h \
 721  	brillexeme.h unigram.h rules.h pantera_rules.h \
 722 -	pantera.h
 723 -wrapper_test_LDFLAGS = @BOOST_LDFLAGS@ @BOOST_SERIALIZATION_LIB@ \
 724 -				   @BOOST_REGEX_LIB@ @BOOST_PROGRAM_OPTIONS_LIB@ \
 725 +	pantera.h TaggingOptions.h
 726 +wrapper_test_LDFLAGS =  $(LIBCORPUS_LINK_FLAGS) $(GLOBAL_LINK_FLAGS) $(LIBMORFEUSZ_LINK_FLAGS) \
 727 +				   @BOOST_LDFLAGS@
 728 +
 729 +
 730 +wrapper_test_LDADD = libpantera.la nlpcommon/libnlpcommon.la \
 731 +				../third_party/TaKIPI18/Linux/bin/Corpus/libcorpus.so \
 732 +				   @BOOST_SERIALIZATION_LIB@ \
 733 +				   @BOOST_PROGRAM_OPTIONS_LIB@ \
 734  				   @BOOST_SYSTEM_LIB@ @BOOST_FILESYSTEM_LIB@ \
 735  				   @BOOST_IOSTREAMS_LIB@ \
 736  				   @BOOST_MPI_LIB@ @ICU_LIBS@ @LIBICONV@ \
 737 -				   @MORFEUSZ_LIBS@ $(LIBCORPUS_LINK_FLAGS) \
 738 -				   $(GLOBAL_LINK_FLAGS) $(LIBMORFEUSZ_LINK_FLAGS)
 739 -wrapper_test_LDADD = libpantera.la nlpcommon/libnlpcommon.la \
 740 -				../third_party/TaKIPI18/Linux/bin/Corpus/libcorpus.so
 741 +				   @MORFEUSZ_LIBS@ @BOOST_REGEX_LIB@
 742 +
 743 +
 744  
 745  pantera_eval_SOURCES = eval.cpp
 746 -pantera_eval_LDFLAGS = @BOOST_LDFLAGS@ @BOOST_SERIALIZATION_LIB@ \
 747 -				   @BOOST_REGEX_LIB@ @BOOST_PROGRAM_OPTIONS_LIB@ \
 748 +pantera_eval_LDFLAGS =  $(LIBCORPUS_LINK_FLAGS) $(GLOBAL_LINK_FLAGS) $(LIBMORFEUSZ_LINK_FLAGS) \
 749 +				   @BOOST_LDFLAGS@
 750 +
 751 +pantera_eval_LDADD = libpantera.la nlpcommon/libnlpcommon.la \
 752 +				../third_party/TaKIPI18/Linux/bin/Corpus/libcorpus.so \
 753 +				   @BOOST_SERIALIZATION_LIB@ \
 754 +				   @BOOST_PROGRAM_OPTIONS_LIB@ \
 755  				   @BOOST_SYSTEM_LIB@ @BOOST_FILESYSTEM_LIB@ \
 756  				   @BOOST_IOSTREAMS_LIB@ \
 757  				   @BOOST_MPI_LIB@ @ICU_LIBS@ @LIBICONV@ \
 758 -				   @MORFEUSZ_LIBS@ $(LIBCORPUS_LINK_FLAGS) \
 759 -				   $(GLOBAL_LINK_FLAGS) $(LIBMORFEUSZ_LINK_FLAGS)
 760 -pantera_eval_LDADD = libpantera.la nlpcommon/libnlpcommon.la \
 761 -				../third_party/TaKIPI18/Linux/bin/Corpus/libcorpus.so
 762 +				   @MORFEUSZ_LIBS@ @BOOST_REGEX_LIB@
 763 +
 764 +
 765 +
 766  
 767  #eval_SOURCES = eval.cpp
 768  #eval_LDFLAGS = @BOOST_LDFLAGS@ @BOOST_REGEX_LIB@ \
 769 Index: src/rules/c1.m4h
 770 ===================================================================
 771 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
 772 +++ src/rules/c1.m4h	2012-07-04 11:15:13.504186560 +0200
 773 @@ -0,0 +1,813 @@
 774 +
 775 +
 776 +
 777 +
 778 +
 779 +
 780 +
 781 +
 782 +
 783 +
 784 +
 785 +
 786 +
 787 +
 788 +
 789 +
 790 +
 791 +
 792 +
 793 +
 794 +
 795 +
 796 +#define TAGSET (this->tagsets[Phase])
 797 +
 798 +#define ISNULL(offset) (text[index + (offset)].chosen_tag[Phase] == Lexeme::tag_type::getNullTag())
 799 +#define POSNUM(offset) (text[index + (offset)].chosen_tag[Phase].getPos())
 800 +#define ORTH(offset) (text[index + (offset)].getOrth())
 801 +#define POS(offset) (TAGSET->getPartOfSpeech(POSNUM(offset)))
 802 +#define DEFPOS(name, offset) const PartOfSpeech* name = ISNULL(offset) ? NULL : POS(offset);
 803 +
 804 +#define FORCAT(name, name_idx, offset) \
 805 +    BOOST_FOREACH(const Category* name, POS(offset)->getCategories()) { \
 806 +        int name_idx = TAGSET->getCategoryIndex(name);
 807 +#define NEXTCAT \
 808 +    }
 809 +
 810 +#define VALUE(offset, cat_idx) \
 811 +    (text[index + offset].chosen_tag[Phase].getValue(cat_idx))
 812 +
 813 +#define C(cat_num) \
 814 +    (p.params.categories[cat_num] == (uint8_t)-1 ? "pos" : \
 815 +     TAGSET->getCategory(p.params.categories[cat_num])->getName().c_str())
 816 +#define P(p_num) \
 817 +     TAGSET->getPartOfSpeech(p.params.pos[p_num])->getName().c_str()
 818 +#define V(cat_num, v_num) \
 819 +    (p.params.categories[cat_num] == (uint8_t)-1 ? \
 820 +     P(v_num) :\
 821 +     TAGSET->getCategory(p.params.categories[cat_num])->getValue( \
 822 +        p.params.values[v_num]).c_str())
 823 +
 824 +static inline bool match_prefix(const wstring& string, const wchar_t* pattern, int len) {
 825 +    if (string.length() < len)
 826 +        return false;
 827 +    for (int i = 0; i < len; i++)
 828 +        if (string[i] != pattern[i])
 829 +            return false;
 830 +    return true;
 831 +}
 832 +
 833 +static inline bool match_suffix(const wstring& string, const wchar_t* pattern, int len) {
 834 +    size_t slen = string.length();
 835 +    if (slen < len)
 836 +        return false;
 837 +    for (int i = 0; i < len; i++)
 838 +        if (string[slen - len + i] != pattern[i])
 839 +            return false;
 840 +    return true;
 841 +}
 842 +
 843 +static inline bool copy_prefix(const wstring& string, wchar_t* pattern, int len) {
 844 +    if (string.length() < len)
 845 +        return false;
 846 +    for (int i = 0; i < len; i++)
 847 +        pattern[i] = string[i];
 848 +    return true;
 849 +}
 850 +
 851 +static inline bool copy_suffix(const wstring& string, wchar_t* pattern, int len) {
 852 +    size_t slen = string.length();
 853 +    if (slen < len)
 854 +        return false;
 855 +    for (int i = 0; i < len; i++)
 856 +        pattern[i] = string[slen - len + i];
 857 +    return true;
 858 +}
 859 +
 860 +static wstring orth_match_repr(bool match_nearby, const wchar_t* pattern, int prefix_len,
 861 +        int suffix_len) {
 862 +    wchar_t wbuf[STR_SIZE];
 863 +    int plen = std::max(prefix_len, suffix_len);
 864 +    wmemcpy(wbuf, pattern, plen);
 865 +    wbuf[plen] = L'\0';
 866 +    if (!prefix_len && !suffix_len)
 867 +        return L"";
 868 +    return boost::str(boost::wformat(L" AND %hs %hs (%d chars) with '%ls'")
 869 +        % (match_nearby ? "nearby segment" : "T[0]")
 870 +        % (prefix_len > 0 ? "starts" : "ends")
 871 +        % plen
 872 +        % wbuf);
 873 +}
 874 +
 875 +static wstring history_match_repr(bool use_history, int rule_number) {
 876 +    if (!use_history)
 877 +        return L"";
 878 +    if (rule_number == 0)
 879 +        return L" AND T[0] was not changed";
 880 +    return boost::str(boost::wformat(L" AND T[0] was changed by rule %d in phase %d")
 881 +        % (rule_number % 10000) % (rule_number / 10000));
 882 +}
 883 +
 884 +
 885 +
 886 +
 887 +
 888 +
 889 +
 890 +
 891 +template<class Lexeme, int Phase, int Offset1, bool AlwaysPos = false, bool MatchNearbyOrth = false,
 892 +    int PrefixLen = 0, int SuffixLen = 0,
 893 +    bool UseHistory = false>
 894 +
 895 +class Nearby1CatPredicateTemplate : public PredicateTemplate<Lexeme>
 896 +{
 897 +public:
 898 +    Nearby1CatPredicateTemplate(const vector<const Tagset*> tagsets) : PredicateTemplate<Lexeme>(tagsets) { }
 899 +
 900 +
 901 +
 902 +    
 903 +    void findMatchingPredicates(vector<Predicate<Lexeme> >& v,
 904 +                                                          vector<Lexeme>& text,
 905 +                                                          int index) {
 906 +        assert(PrefixLen == 0 || SuffixLen == 0);
 907 +
 908 +        if (ISNULL(0)) return;
 909 +
 910 +        Predicate<Lexeme> p = Predicate<Lexeme>(this);
 911 +        p.params.pos[0] = POSNUM(0);
 912 +        if (UseHistory)
 913 +            p.params.rule_number = text[index].last_matched_rule;
 914 +        if (!MatchNearbyOrth && !copy_prefix(ORTH(0), p.params.chars, PrefixLen))
 915 +            return;
 916 +        if (!MatchNearbyOrth && !copy_suffix(ORTH(0), p.params.chars, SuffixLen))
 917 +            return;
 918 +        
 919 +
 920 +            DEFPOS(pos1, Offset1);
 921 +        
 922 +
 923 +        FORCAT(cat, c, 0) {
 924 +            p.params.categories[0] = c;
 925 +            p.params.values[0] = VALUE(0, c);
 926 +            
 927 +do { 
 928 +                if (pos1 && pos1->hasCategory(cat)) {
 929 +                    p.params.values[1] = VALUE(Offset1, c);
 930 +                    if (AlwaysPos)
 931 +                        p.params.pos[1] = POSNUM(Offset1);
 932 +                    if ((PrefixLen || SuffixLen) && MatchNearbyOrth) {
 933 +                        if (!copy_prefix(ORTH(Offset1), p.params.chars, PrefixLen))
 934 +                            break;
 935 +                        if (!copy_suffix(ORTH(Offset1), p.params.chars, SuffixLen))
 936 +                            break;
 937 +                    }
 938 +                    v.push_back(p);
 939 +                }
 940 +             } while(0);
 941 +
 942 +        } NEXTCAT
 943 +
 944 +        p.params.categories[0] = -1;
 945 +        p.params.values[0] = -1;
 946 +        p.params.values[1] = -1;
 947 +        
 948 +do { 
 949 +            if (pos1) {
 950 +                p.params.pos[1] = POSNUM(Offset1);
 951 +                if ((PrefixLen || SuffixLen) && MatchNearbyOrth) {
 952 +                    if (!copy_prefix(ORTH(Offset1), p.params.chars, PrefixLen))
 953 +                        break;
 954 +                    if (!copy_suffix(ORTH(Offset1), p.params.chars, SuffixLen))
 955 +                        break;
 956 +                }
 957 +                v.push_back(p);
 958 +            }
 959 +         } while(0);
 960 +
 961 +    }
 962 +
 963 +    
 964 +    bool predicateMatches(const Predicate<Lexeme>& p,
 965 +                vector<Lexeme>& text, int index) {
 966 +        if (p.params.pos[0] != POSNUM(0))
 967 +            return false;
 968 +        if (UseHistory && text[index].last_matched_rule != p.params.rule_number)
 969 +            return false;
 970 +        if (PrefixLen || SuffixLen) {
 971 +            if (!MatchNearbyOrth && !match_prefix(ORTH(0), p.params.chars, PrefixLen))
 972 +                return false;
 973 +            if (!MatchNearbyOrth && !match_suffix(ORTH(0), p.params.chars, SuffixLen))
 974 +                return false;
 975 +        }
 976 +        int c = p.params.categories[0];
 977 +        if (c == (uint8_t)-1) {
 978 +            return (
 979 +(!ISNULL(Offset1) && p.params.pos[1] == POSNUM(Offset1)
 980 +                && (!MatchNearbyOrth || (match_prefix(ORTH(Offset1), p.params.chars, PrefixLen)
 981 +                                      && match_suffix(ORTH(Offset1), p.params.chars, SuffixLen)))
 982 +            )
 983 +);
 984 +        } else {
 985 +            return (
 986 +(!ISNULL(Offset1) && p.params.values[1] == VALUE(Offset1, c) && (!AlwaysPos || p.params.pos[1] == POSNUM(Offset1))
 987 +                && (!MatchNearbyOrth || (match_prefix(ORTH(Offset1), p.params.chars, PrefixLen)
 988 +                                      && match_suffix(ORTH(Offset1), p.params.chars, SuffixLen)))
 989 +            )
 990 +)
 991 +                    && p.params.values[0] == VALUE(0, c);
 992 +        }
 993 +    }
 994 +
 995 +    
 996 +    wstring predicateAsWString(const Predicate<Lexeme>& p) {
 997 +        wchar_t str[STR_SIZE];
 998 +        swprintf(str, STR_SIZE, L"(" 
 999 +L"T[%d]|pos,%hs = %hs,%hs"
1000 + L") AND T[0]|pos,%hs = %hs,%hs%ls%ls",
1001 +Offset1,C(0),AlwaysPos ? P(1) : "*",V(0, 1),
1002 +
1003 +             C(0),P(0),V(0, 0),orth_match_repr(MatchNearbyOrth, p.params.chars, PrefixLen, SuffixLen).c_str(),history_match_repr(UseHistory, p.params.rule_number).c_str());
1004 +        return wstring(str);
1005 +    }
1006 +
1007 +    
1008 +    bool usesCategory0() {
1009 +        return true;
1010 +    }
1011 +
1012 +
1013 +};
1014 +
1015 +
1016 +
1017 +
1018 +
1019 +template<class Lexeme, int Phase, int Offset1, int Offset2, bool AlwaysPos = false, bool MatchNearbyOrth = false,
1020 +    int PrefixLen = 0, int SuffixLen = 0,
1021 +    bool UseHistory = false>
1022 +
1023 +class Nearby2CatPredicateTemplate : public PredicateTemplate<Lexeme>
1024 +{
1025 +public:
1026 +    Nearby2CatPredicateTemplate(const vector<const Tagset*> tagsets) : PredicateTemplate<Lexeme>(tagsets) { }
1027 +
1028 +
1029 +
1030 +    
1031 +    void findMatchingPredicates(vector<Predicate<Lexeme> >& v,
1032 +                                                          vector<Lexeme>& text,
1033 +                                                          int index) {
1034 +        assert(PrefixLen == 0 || SuffixLen == 0);
1035 +
1036 +        if (ISNULL(0)) return;
1037 +
1038 +        Predicate<Lexeme> p = Predicate<Lexeme>(this);
1039 +        p.params.pos[0] = POSNUM(0);
1040 +        if (UseHistory)
1041 +            p.params.rule_number = text[index].last_matched_rule;
1042 +        if (!MatchNearbyOrth && !copy_prefix(ORTH(0), p.params.chars, PrefixLen))
1043 +            return;
1044 +        if (!MatchNearbyOrth && !copy_suffix(ORTH(0), p.params.chars, SuffixLen))
1045 +            return;
1046 +        
1047 +
1048 +            DEFPOS(pos1, Offset1);
1049 +        
1050 +            DEFPOS(pos2, Offset2);
1051 +        
1052 +
1053 +        FORCAT(cat, c, 0) {
1054 +            p.params.categories[0] = c;
1055 +            p.params.values[0] = VALUE(0, c);
1056 +            
1057 +do { 
1058 +                if (pos1 && pos1->hasCategory(cat)) {
1059 +                    p.params.values[1] = VALUE(Offset1, c);
1060 +                    if (AlwaysPos)
1061 +                        p.params.pos[1] = POSNUM(Offset1);
1062 +                    if ((PrefixLen || SuffixLen) && MatchNearbyOrth) {
1063 +                        if (!copy_prefix(ORTH(Offset1), p.params.chars, PrefixLen))
1064 +                            break;
1065 +                        if (!copy_suffix(ORTH(Offset1), p.params.chars, SuffixLen))
1066 +                            break;
1067 +                    }
1068 +                    v.push_back(p);
1069 +                }
1070 +             } while(0);do { 
1071 +                if (pos2 && pos2->hasCategory(cat)) {
1072 +                    p.params.values[1] = VALUE(Offset2, c);
1073 +                    if (AlwaysPos)
1074 +                        p.params.pos[1] = POSNUM(Offset2);
1075 +                    if ((PrefixLen || SuffixLen) && MatchNearbyOrth) {
1076 +                        if (!copy_prefix(ORTH(Offset2), p.params.chars, PrefixLen))
1077 +                            break;
1078 +                        if (!copy_suffix(ORTH(Offset2), p.params.chars, SuffixLen))
1079 +                            break;
1080 +                    }
1081 +                    v.push_back(p);
1082 +                }
1083 +             } while(0);
1084 +
1085 +        } NEXTCAT
1086 +
1087 +        p.params.categories[0] = -1;
1088 +        p.params.values[0] = -1;
1089 +        p.params.values[1] = -1;
1090 +        
1091 +do { 
1092 +            if (pos1) {
1093 +                p.params.pos[1] = POSNUM(Offset1);
1094 +                if ((PrefixLen || SuffixLen) && MatchNearbyOrth) {
1095 +                    if (!copy_prefix(ORTH(Offset1), p.params.chars, PrefixLen))
1096 +                        break;
1097 +                    if (!copy_suffix(ORTH(Offset1), p.params.chars, SuffixLen))
1098 +                        break;
1099 +                }
1100 +                v.push_back(p);
1101 +            }
1102 +         } while(0);do { 
1103 +            if (pos2) {
1104 +                p.params.pos[1] = POSNUM(Offset2);
1105 +                if ((PrefixLen || SuffixLen) && MatchNearbyOrth) {
1106 +                    if (!copy_prefix(ORTH(Offset2), p.params.chars, PrefixLen))
1107 +                        break;
1108 +                    if (!copy_suffix(ORTH(Offset2), p.params.chars, SuffixLen))
1109 +                        break;
1110 +                }
1111 +                v.push_back(p);
1112 +            }
1113 +         } while(0);
1114 +
1115 +    }
1116 +
1117 +    
1118 +    bool predicateMatches(const Predicate<Lexeme>& p,
1119 +                vector<Lexeme>& text, int index) {
1120 +        if (p.params.pos[0] != POSNUM(0))
1121 +            return false;
1122 +        if (UseHistory && text[index].last_matched_rule != p.params.rule_number)
1123 +            return false;
1124 +        if (PrefixLen || SuffixLen) {
1125 +            if (!MatchNearbyOrth && !match_prefix(ORTH(0), p.params.chars, PrefixLen))
1126 +                return false;
1127 +            if (!MatchNearbyOrth && !match_suffix(ORTH(0), p.params.chars, SuffixLen))
1128 +                return false;
1129 +        }
1130 +        int c = p.params.categories[0];
1131 +        if (c == (uint8_t)-1) {
1132 +            return (
1133 +(!ISNULL(Offset1) && p.params.pos[1] == POSNUM(Offset1)
1134 +                && (!MatchNearbyOrth || (match_prefix(ORTH(Offset1), p.params.chars, PrefixLen)
1135 +                                      && match_suffix(ORTH(Offset1), p.params.chars, SuffixLen)))
1136 +            )||(!ISNULL(Offset2) && p.params.pos[1] == POSNUM(Offset2)
1137 +                && (!MatchNearbyOrth || (match_prefix(ORTH(Offset2), p.params.chars, PrefixLen)
1138 +                                      && match_suffix(ORTH(Offset2), p.params.chars, SuffixLen)))
1139 +            )
1140 +);
1141 +        } else {
1142 +            return (
1143 +(!ISNULL(Offset1) && p.params.values[1] == VALUE(Offset1, c) && (!AlwaysPos || p.params.pos[1] == POSNUM(Offset1))
1144 +                && (!MatchNearbyOrth || (match_prefix(ORTH(Offset1), p.params.chars, PrefixLen)
1145 +                                      && match_suffix(ORTH(Offset1), p.params.chars, SuffixLen)))
1146 +            )||(!ISNULL(Offset2) && p.params.values[1] == VALUE(Offset2, c) && (!AlwaysPos || p.params.pos[1] == POSNUM(Offset2))
1147 +                && (!MatchNearbyOrth || (match_prefix(ORTH(Offset2), p.params.chars, PrefixLen)
1148 +                                      && match_suffix(ORTH(Offset2), p.params.chars, SuffixLen)))
1149 +            )
1150 +)
1151 +                    && p.params.values[0] == VALUE(0, c);
1152 +        }
1153 +    }
1154 +
1155 +    
1156 +    wstring predicateAsWString(const Predicate<Lexeme>& p) {
1157 +        wchar_t str[STR_SIZE];
1158 +        swprintf(str, STR_SIZE, L"(" 
1159 +L"T[%d]|pos,%hs = %hs,%hs"L" OR "L"T[%d]|pos,%hs = %hs,%hs"
1160 + L") AND T[0]|pos,%hs = %hs,%hs%ls%ls",
1161 +Offset1,C(0),AlwaysPos ? P(1) : "*",V(0, 1),Offset2,C(0),AlwaysPos ? P(1) : "*",V(0, 1),
1162 +
1163 +             C(0),P(0),V(0, 0),orth_match_repr(MatchNearbyOrth, p.params.chars, PrefixLen, SuffixLen).c_str(),history_match_repr(UseHistory, p.params.rule_number).c_str());
1164 +        return wstring(str);
1165 +    }
1166 +
1167 +    
1168 +    bool usesCategory0() {
1169 +        return true;
1170 +    }
1171 +
1172 +
1173 +};
1174 +
1175 +
1176 +
1177 +
1178 +
1179 +template<class Lexeme, int Phase, int Offset1, int Offset2, int Offset3, bool AlwaysPos = false, bool MatchNearbyOrth = false,
1180 +    int PrefixLen = 0, int SuffixLen = 0,
1181 +    bool UseHistory = false>
1182 +
1183 +class Nearby3CatPredicateTemplate : public PredicateTemplate<Lexeme>
1184 +{
1185 +public:
1186 +    Nearby3CatPredicateTemplate(const vector<const Tagset*> tagsets) : PredicateTemplate<Lexeme>(tagsets) { }
1187 +
1188 +
1189 +
1190 +    
1191 +    void findMatchingPredicates(vector<Predicate<Lexeme> >& v,
1192 +                                                          vector<Lexeme>& text,
1193 +                                                          int index) {
1194 +        assert(PrefixLen == 0 || SuffixLen == 0);
1195 +
1196 +        if (ISNULL(0)) return;
1197 +
1198 +        Predicate<Lexeme> p = Predicate<Lexeme>(this);
1199 +        p.params.pos[0] = POSNUM(0);
1200 +        if (UseHistory)
1201 +            p.params.rule_number = text[index].last_matched_rule;
1202 +        if (!MatchNearbyOrth && !copy_prefix(ORTH(0), p.params.chars, PrefixLen))
1203 +            return;
1204 +        if (!MatchNearbyOrth && !copy_suffix(ORTH(0), p.params.chars, SuffixLen))
1205 +            return;
1206 +        
1207 +
1208 +            DEFPOS(pos1, Offset1);
1209 +        
1210 +            DEFPOS(pos2, Offset2);
1211 +        
1212 +            DEFPOS(pos3, Offset3);
1213 +        
1214 +
1215 +        FORCAT(cat, c, 0) {
1216 +            p.params.categories[0] = c;
1217 +            p.params.values[0] = VALUE(0, c);
1218 +            
1219 +do { 
1220 +                if (pos1 && pos1->hasCategory(cat)) {
1221 +                    p.params.values[1] = VALUE(Offset1, c);
1222 +                    if (AlwaysPos)
1223 +                        p.params.pos[1] = POSNUM(Offset1);
1224 +                    if ((PrefixLen || SuffixLen) && MatchNearbyOrth) {
1225 +                        if (!copy_prefix(ORTH(Offset1), p.params.chars, PrefixLen))
1226 +                            break;
1227 +                        if (!copy_suffix(ORTH(Offset1), p.params.chars, SuffixLen))
1228 +                            break;
1229 +                    }
1230 +                    v.push_back(p);
1231 +                }
1232 +             } while(0);do { 
1233 +                if (pos2 && pos2->hasCategory(cat)) {
1234 +                    p.params.values[1] = VALUE(Offset2, c);
1235 +                    if (AlwaysPos)
1236 +                        p.params.pos[1] = POSNUM(Offset2);
1237 +                    if ((PrefixLen || SuffixLen) && MatchNearbyOrth) {
1238 +                        if (!copy_prefix(ORTH(Offset2), p.params.chars, PrefixLen))
1239 +                            break;
1240 +                        if (!copy_suffix(ORTH(Offset2), p.params.chars, SuffixLen))
1241 +                            break;
1242 +                    }
1243 +                    v.push_back(p);
1244 +                }
1245 +             } while(0);do { 
1246 +                if (pos3 && pos3->hasCategory(cat)) {
1247 +                    p.params.values[1] = VALUE(Offset3, c);
1248 +                    if (AlwaysPos)
1249 +                        p.params.pos[1] = POSNUM(Offset3);
1250 +                    if ((PrefixLen || SuffixLen) && MatchNearbyOrth) {
1251 +                        if (!copy_prefix(ORTH(Offset3), p.params.chars, PrefixLen))
1252 +                            break;
1253 +                        if (!copy_suffix(ORTH(Offset3), p.params.chars, SuffixLen))
1254 +                            break;
1255 +                    }
1256 +                    v.push_back(p);
1257 +                }
1258 +             } while(0);
1259 +
1260 +        } NEXTCAT
1261 +
1262 +        p.params.categories[0] = -1;
1263 +        p.params.values[0] = -1;
1264 +        p.params.values[1] = -1;
1265 +        
1266 +do { 
1267 +            if (pos1) {
1268 +                p.params.pos[1] = POSNUM(Offset1);
1269 +                if ((PrefixLen || SuffixLen) && MatchNearbyOrth) {
1270 +                    if (!copy_prefix(ORTH(Offset1), p.params.chars, PrefixLen))
1271 +                        break;
1272 +                    if (!copy_suffix(ORTH(Offset1), p.params.chars, SuffixLen))
1273 +                        break;
1274 +                }
1275 +                v.push_back(p);
1276 +            }
1277 +         } while(0);do { 
1278 +            if (pos2) {
1279 +                p.params.pos[1] = POSNUM(Offset2);
1280 +                if ((PrefixLen || SuffixLen) && MatchNearbyOrth) {
1281 +                    if (!copy_prefix(ORTH(Offset2), p.params.chars, PrefixLen))
1282 +                        break;
1283 +                    if (!copy_suffix(ORTH(Offset2), p.params.chars, SuffixLen))
1284 +                        break;
1285 +                }
1286 +                v.push_back(p);
1287 +            }
1288 +         } while(0);do { 
1289 +            if (pos3) {
1290 +                p.params.pos[1] = POSNUM(Offset3);
1291 +                if ((PrefixLen || SuffixLen) && MatchNearbyOrth) {
1292 +                    if (!copy_prefix(ORTH(Offset3), p.params.chars, PrefixLen))
1293 +                        break;
1294 +                    if (!copy_suffix(ORTH(Offset3), p.params.chars, SuffixLen))
1295 +                        break;
1296 +                }
1297 +                v.push_back(p);
1298 +            }
1299 +         } while(0);
1300 +
1301 +    }
1302 +
1303 +    
1304 +    bool predicateMatches(const Predicate<Lexeme>& p,
1305 +                vector<Lexeme>& text, int index) {
1306 +        if (p.params.pos[0] != POSNUM(0))
1307 +            return false;
1308 +        if (UseHistory && text[index].last_matched_rule != p.params.rule_number)
1309 +            return false;
1310 +        if (PrefixLen || SuffixLen) {
1311 +            if (!MatchNearbyOrth && !match_prefix(ORTH(0), p.params.chars, PrefixLen))
1312 +                return false;
1313 +            if (!MatchNearbyOrth && !match_suffix(ORTH(0), p.params.chars, SuffixLen))
1314 +                return false;
1315 +        }
1316 +        int c = p.params.categories[0];
1317 +        if (c == (uint8_t)-1) {
1318 +            return (
1319 +(!ISNULL(Offset1) && p.params.pos[1] == POSNUM(Offset1)
1320 +                && (!MatchNearbyOrth || (match_prefix(ORTH(Offset1), p.params.chars, PrefixLen)
1321 +                                      && match_suffix(ORTH(Offset1), p.params.chars, SuffixLen)))
1322 +            )||(!ISNULL(Offset2) && p.params.pos[1] == POSNUM(Offset2)
1323 +                && (!MatchNearbyOrth || (match_prefix(ORTH(Offset2), p.params.chars, PrefixLen)
1324 +                                      && match_suffix(ORTH(Offset2), p.params.chars, SuffixLen)))
1325 +            )||(!ISNULL(Offset3) && p.params.pos[1] == POSNUM(Offset3)
1326 +                && (!MatchNearbyOrth || (match_prefix(ORTH(Offset3), p.params.chars, PrefixLen)
1327 +                                      && match_suffix(ORTH(Offset3), p.params.chars, SuffixLen)))
1328 +            )
1329 +);
1330 +        } else {
1331 +            return (
1332 +(!ISNULL(Offset1) && p.params.values[1] == VALUE(Offset1, c) && (!AlwaysPos || p.params.pos[1] == POSNUM(Offset1))
1333 +                && (!MatchNearbyOrth || (match_prefix(ORTH(Offset1), p.params.chars, PrefixLen)
1334 +                                      && match_suffix(ORTH(Offset1), p.params.chars, SuffixLen)))
1335 +            )||(!ISNULL(Offset2) && p.params.values[1] == VALUE(Offset2, c) && (!AlwaysPos || p.params.pos[1] == POSNUM(Offset2))
1336 +                && (!MatchNearbyOrth || (match_prefix(ORTH(Offset2), p.params.chars, PrefixLen)
1337 +                                      && match_suffix(ORTH(Offset2), p.params.chars, SuffixLen)))
1338 +            )||(!ISNULL(Offset3) && p.params.values[1] == VALUE(Offset3, c) && (!AlwaysPos || p.params.pos[1] == POSNUM(Offset3))
1339 +                && (!MatchNearbyOrth || (match_prefix(ORTH(Offset3), p.params.chars, PrefixLen)
1340 +                                      && match_suffix(ORTH(Offset3), p.params.chars, SuffixLen)))
1341 +            )
1342 +)
1343 +                    && p.params.values[0] == VALUE(0, c);
1344 +        }
1345 +    }
1346 +
1347 +    
1348 +    wstring predicateAsWString(const Predicate<Lexeme>& p) {
1349 +        wchar_t str[STR_SIZE];
1350 +        swprintf(str, STR_SIZE, L"(" 
1351 +L"T[%d]|pos,%hs = %hs,%hs"L" OR "L"T[%d]|pos,%hs = %hs,%hs"L" OR "L"T[%d]|pos,%hs = %hs,%hs"
1352 + L") AND T[0]|pos,%hs = %hs,%hs%ls%ls",
1353 +Offset1,C(0),AlwaysPos ? P(1) : "*",V(0, 1),Offset2,C(0),AlwaysPos ? P(1) : "*",V(0, 1),Offset3,C(0),AlwaysPos ? P(1) : "*",V(0, 1),
1354 +
1355 +             C(0),P(0),V(0, 0),orth_match_repr(MatchNearbyOrth, p.params.chars, PrefixLen, SuffixLen).c_str(),history_match_repr(UseHistory, p.params.rule_number).c_str());
1356 +        return wstring(str);
1357 +    }
1358 +
1359 +    
1360 +    bool usesCategory0() {
1361 +        return true;
1362 +    }
1363 +
1364 +
1365 +};
1366 +
1367 +
1368 +
1369 +
1370 +
1371 +template<class Lexeme, int Phase, int Offset1, int Offset2, bool AlwaysPos = false>
1372 +
1373 +class NearbyExact2CatPredicateTemplate : public PredicateTemplate<Lexeme>
1374 +{
1375 +public:
1376 +    NearbyExact2CatPredicateTemplate(const vector<const Tagset*> tagsets) : PredicateTemplate<Lexeme>(tagsets) { }
1377 +
1378 +
1379 +
1380 +    
1381 +    void findMatchingPredicates(vector<Predicate<Lexeme> >& v,
1382 +                                                          vector<Lexeme>& text,
1383 +                                                          int index) {
1384 +        Predicate<Lexeme> p = Predicate<Lexeme>(this);
1385 +        p.params.pos[0] = POSNUM(0);
1386 +        
1387 +
1388 +            DEFPOS(pos1, Offset1);
1389 +        
1390 +            DEFPOS(pos2, Offset2);
1391 +        
1392 +
1393 +        FORCAT(cat, c, 0) {
1394 +            p.params.categories[0] = c;
1395 +            p.params.values[0] = VALUE(0, c);
1396 +            
1397 +
1398 +                if (!(pos1 && pos1->hasCategory(cat)))
1399 +                    continue;
1400 +            
1401 +                if (!(pos2 && pos2->hasCategory(cat)))
1402 +                    continue;
1403 +            
1404 +
1405 +            
1406 +
1407 +                p.params.values[1] = VALUE(Offset1, c);
1408 +                if (AlwaysPos)
1409 +                    p.params.pos[1] = POSNUM(Offset1);
1410 +            
1411 +                p.params.values[2] = VALUE(Offset2, c);
1412 +                if (AlwaysPos)
1413 +                    p.params.pos[2] = POSNUM(Offset2);
1414 +            
1415 +
1416 +            v.push_back(p);
1417 +        } NEXTCAT
1418 +
1419 +        p.params.categories[0] = -1;
1420 +        p.params.values[0] = -1;
1421 +        
1422 +
1423 +            if (!pos1)
1424 +                return;
1425 +            p.params.values[1] = -1;
1426 +            p.params.pos[1] = POSNUM(Offset1);
1427 +        
1428 +            if (!pos2)
1429 +                return;
1430 +            p.params.values[2] = -1;
1431 +            p.params.pos[2] = POSNUM(Offset2);
1432 +        
1433 +
1434 +        v.push_back(p);
1435 +    }
1436 +
1437 +    
1438 +    bool predicateMatches(const Predicate<Lexeme>& p,
1439 +                vector<Lexeme>& text, int index) {
1440 +        if (p.params.pos[0] != POSNUM(0))
1441 +            return false;
1442 +        int c = p.params.categories[0];
1443 +        if (c == (uint8_t)-1) {
1444 +            return (
1445 +(!ISNULL(Offset1) && p.params.pos[1] == POSNUM(Offset1))&&(!ISNULL(Offset2) && p.params.pos[2] == POSNUM(Offset2))
1446 +);
1447 +        } else {
1448 +            return (
1449 +(!ISNULL(Offset1) && p.params.values[1] == VALUE(Offset1, c) && (!AlwaysPos || p.params.pos[1] == POSNUM(Offset1)))&&(!ISNULL(Offset2) && p.params.values[2] == VALUE(Offset2, c) && (!AlwaysPos || p.params.pos[2] == POSNUM(Offset2)))
1450 +)
1451 +                    && p.params.values[0] == VALUE(0, c);
1452 +        }
1453 +    }
1454 +
1455 +    
1456 +    wstring predicateAsWString(const Predicate<Lexeme>& p) {
1457 +        wchar_t str[STR_SIZE];
1458 +        swprintf(str, STR_SIZE, 
1459 +L"T[%d]|pos,%hs = %hs,%hs"L" AND "L"T[%d]|pos,%hs = %hs,%hs"
1460 + L" AND T[0]|pos = %hs AND T[0]|%hs = %hs",
1461 +Offset1,C(0),AlwaysPos ? P(1) : "*",V(0, 1),Offset2,C(0),AlwaysPos ? P(2) : "*",V(0, 2),
1462 +
1463 +            P(0),C(0),V(0, 0));
1464 +        return wstring(str);
1465 +    }
1466 +
1467 +    
1468 +    bool usesCategory0() {
1469 +        return true;
1470 +    }
1471 +
1472 +
1473 +};
1474 +
1475 +
1476 +
1477 +template<class Lexeme, int Phase>
1478 +class CCaseCatPredicateTemplate : public PredicateTemplate<Lexeme>
1479 +{
1480 +public:
1481 +CCaseCatPredicateTemplate(const vector<const Tagset*> tagsets) : PredicateTemplate<Lexeme>(tagsets) { }
1482 +
1483 +void findMatchingPredicates(vector<Predicate<Lexeme> >& v,
1484 +                                                      vector<Lexeme>& text,
1485 +                                                      int index) {
1486 +
1487 +    if (text[index].getOrth()[0] >= 'A' && text[index].getOrth()[0] <= 'Z') {
1488 +        Predicate<Lexeme> p = Predicate<Lexeme>(this);
1489 +        p.params.tags[0] = text[index].chosen_tag[Phase];
1490 +        v.push_back(p);
1491 +    }
1492 +}
1493 +bool predicateMatches(const Predicate<Lexeme>& p,
1494 +            vector<Lexeme>& text, int index) {
1495 +    return (p.params.tags[0] == text[index].chosen_tag[Phase]
1496 +            && text[index].getOrth()[0] >= 'A' && text[index].getOrth()[0] <= 'Z');
1497 +}
1498 +wstring predicateAsWString(const Predicate<Lexeme>& p) {
1499 +
1500 +    char str[STR_SIZE];
1501 +    sprintf(str, "T[0] = %s AND ORTH[0] starts with capital letter", T(tags[0]));
1502 +    return ascii_to_wstring(str);
1503 +}
1504 +};
1505 +
1506 +template<class Lexeme, int Phase>
1507 +class Prefix2CatPredicateTemplate : public PredicateTemplate<Lexeme>
1508 +{
1509 +public:
1510 +Prefix2CatPredicateTemplate(const vector<const Tagset*> tagsets) : PredicateTemplate<Lexeme>(tagsets) { }
1511 +
1512 +void findMatchingPredicates(vector<Predicate<Lexeme> >& v,
1513 +                                                      vector<Lexeme>& text,
1514 +                                                      int index) {
1515 +
1516 +    const string& orth = text[index].getOrth();
1517 +    int len = orth.length();
1518 +    if (len >= 2) {
1519 +        Predicate<Lexeme> p = Predicate<Lexeme>(this);
1520 +        p.params.tags[0] = text[index].chosen_tag[Phase];
1521 +        p.params.chars[0] = orth[0];
1522 +        p.params.chars[1] = orth[1];
1523 +        v.push_back(p);
1524 +    }
1525 +}
1526 +bool predicateMatches(const Predicate<Lexeme>& p,
1527 +            vector<Lexeme>& text, int index) {
1528 +    const string& orth = text[index].getOrth();
1529 +    int len = orth.length();
1530 +    return (len >= 2 && p.params.tags[0] == text[index].chosen_tag[Phase]
1531 +            && orth[0] == p.params.chars[0]
1532 +            && orth[1] == p.params.chars[1]);
1533 +}
1534 +wstring predicateAsWString(const Predicate<Lexeme>& p) {
1535 +    wchar_t str[STR_SIZE];
1536 +    swprintf(str, STR_SIZE, L"T[0] = %hs AND ORTH starts with '%lc%lc'", T(tags[0]), p.params.chars[0], p.params.chars[1]);
1537 +    return wstring(str);
1538 +}
1539 +};
1540 +
1541 +template<class Lexeme, int Phase>
1542 +class Suffix2CatPredicateTemplate : public PredicateTemplate<Lexeme>
1543 +{
1544 +public:
1545 +Suffix2CatPredicateTemplate(const vector<const Tagset*> tagsets) : PredicateTemplate<Lexeme>(tagsets) { }
1546 +
1547 +void findMatchingPredicates(vector<Predicate<Lexeme> >& v,
1548 +                                                      vector<Lexeme>& text,
1549 +                                                      int index) {
1550 +
1551 +    const string& orth = text[index].getOrth();
1552 +    int len = orth.length();
1553 +    if (len >= 2) {
1554 +        Predicate<Lexeme> p = Predicate<Lexeme>(this);
1555 +        p.params.tags[0] = text[index].chosen_tag[Phase];
1556 +        p.params.chars[0] = orth[len - 2];
1557 +        p.params.chars[1] = orth[len - 1];
1558 +        v.push_back(p);
1559 +    }
1560 +}
1561 +bool predicateMatches(const Predicate<Lexeme>& p,
1562 +            vector<Lexeme>& text, int index) {
1563 +    const string& orth = text[index].getOrth();
1564 +    int len = orth.length();
1565 +    return (len >= 2 && p.params.tags[0] == text[index].chosen_tag[Phase]
1566 +            && orth[len - 2] == p.params.chars[0]
1567 +            && orth[len - 1] == p.params.chars[1]);
1568 +}
1569 +wstring predicateAsWString(const Predicate<Lexeme>& p) {
1570 +    wchar_t str[STR_SIZE];
1571 +    swprintf(str, STR_SIZE, L"T[0] = %hs AND ORTH ends with '%lc%lc'", T(tags[0]), p.params.chars[0], p.params.chars[1]);
1572 +    return wstring(str);
1573 +}
1574 +};
1575 +
1576 +
1577 +
1578 +#undef TAGSET
1579 +#undef POS
1580 +#undef DEFPOS
1581 +#undef FORCAT
1582 +#undef NEXTCAT
1583 +#undef VALUE
1584 +#undef C
1585 +#undef V
1586 +
1587 Index: src/eval.cpp
1588 ===================================================================
1589 --- src/eval.cpp.orig	2010-06-03 23:39:46.000000000 +0200
1590 +++ src/eval.cpp	2012-07-04 11:15:13.528186561 +0200
1591 @@ -27,6 +27,13 @@
1592  using namespace std;
1593  using namespace NLPCommon;
1594  
1595 +// XXX bo jest jako extern w nlpcommon/util.h
1596 +boost::program_options::variables_map options;
1597 +
1598 +// XXX bo nie chcemy, by sie wywalało przez MPI
1599 +boost::mpi::environment env;
1600 +boost::mpi::communicator world;
1601 +
1602  typedef Lexeme<Tag> MyLexeme;
1603  
1604  TaggingErrorsCollector<MyLexeme>* errors_collector;
1605 Index: aclocal/ltversion.m4
1606 ===================================================================
1607 --- aclocal/ltversion.m4.orig	2010-10-02 22:51:03.000000000 +0200
1608 +++ aclocal/ltversion.m4	2012-07-04 16:29:47.407822027 +0200
1609 @@ -7,17 +7,17 @@
1610  # unlimited permission to copy and/or distribute it, with or without
1611  # modifications, as long as this notice is preserved.
1612  
1613 -# Generated from ltversion.in.
1614 +# @configure_input@
1615  
1616 -# serial 3175 ltversion.m4
1617 +# serial 3337 ltversion.m4
1618  # This file is part of GNU Libtool
1619  
1620 -m4_define([LT_PACKAGE_VERSION], [2.2.10])
1621 -m4_define([LT_PACKAGE_REVISION], [1.3175])
1622 +m4_define([LT_PACKAGE_VERSION], [2.4.2])
1623 +m4_define([LT_PACKAGE_REVISION], [1.3337])
1624  
1625  AC_DEFUN([LTVERSION_VERSION],
1626 -[macro_version='2.2.10'
1627 -macro_revision='1.3175'
1628 +[macro_version='2.4.2'
1629 +macro_revision='1.3337'
1630  _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
1631  _LT_DECL(, macro_revision, 0)
1632  ])
1633 Index: ltmain.sh
1634 ===================================================================
1635 --- ltmain.sh.orig	2010-10-02 22:51:24.000000000 +0200
1636 +++ ltmain.sh	2012-07-04 16:29:47.207822032 +0200
1637 @@ -1,10 +1,9 @@
1638 -# Generated from ltmain.m4sh.
1639  
1640 -# libtool (GNU libtool) 2.2.10
1641 +# libtool (GNU libtool) 2.4.2
1642  # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
1643  
1644  # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
1645 -# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
1646 +# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
1647  # This is free software; see the source for copying conditions.  There is NO
1648  # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1649  
1650 @@ -42,6 +41,7 @@
1651  #       --quiet, --silent    don't print informational messages
1652  #       --no-quiet, --no-silent
1653  #                            print informational messages (default)
1654 +#       --no-warn            don't display warning messages
1655  #       --tag=TAG            use configuration variables from tag TAG
1656  #   -v, --verbose            print more informational messages than default
1657  #       --no-verbose         don't print the extra informational messages
1658 @@ -70,17 +70,19 @@
1659  #         compiler:		$LTCC
1660  #         compiler flags:		$LTCFLAGS
1661  #         linker:		$LD (gnu? $with_gnu_ld)
1662 -#         $progname:	(GNU libtool) 2.2.10
1663 +#         $progname:	(GNU libtool) 2.4.2 Debian-2.4.2-1ubuntu1
1664  #         automake:	$automake_version
1665  #         autoconf:	$autoconf_version
1666  #
1667  # Report bugs to <bug-libtool@gnu.org>.
1668 +# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
1669 +# General help using GNU software: <http://www.gnu.org/gethelp/>.
1670  
1671  PROGRAM=libtool
1672  PACKAGE=libtool
1673 -VERSION=2.2.10
1674 +VERSION="2.4.2 Debian-2.4.2-1ubuntu1"
1675  TIMESTAMP=""
1676 -package_revision=1.3175
1677 +package_revision=1.3337
1678  
1679  # Be Bourne compatible
1680  if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
1681 @@ -135,15 +137,10 @@
1682  
1683  : ${CP="cp -f"}
1684  test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
1685 -: ${EGREP="grep -E"}
1686 -: ${FGREP="grep -F"}
1687 -: ${GREP="grep"}
1688 -: ${LN_S="ln -s"}
1689  : ${MAKE="make"}
1690  : ${MKDIR="mkdir"}
1691  : ${MV="mv -f"}
1692  : ${RM="rm -f"}
1693 -: ${SED="sed"}
1694  : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
1695  : ${Xsed="$SED -e 1s/^X//"}
1696  
1697 @@ -163,6 +160,27 @@
1698  dirname="s,/[^/]*$,,"
1699  basename="s,^.*/,,"
1700  
1701 +# func_dirname file append nondir_replacement
1702 +# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
1703 +# otherwise set result to NONDIR_REPLACEMENT.
1704 +func_dirname ()
1705 +{
1706 +    func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
1707 +    if test "X$func_dirname_result" = "X${1}"; then
1708 +      func_dirname_result="${3}"
1709 +    else
1710 +      func_dirname_result="$func_dirname_result${2}"
1711 +    fi
1712 +} # func_dirname may be replaced by extended shell implementation
1713 +
1714 +
1715 +# func_basename file
1716 +func_basename ()
1717 +{
1718 +    func_basename_result=`$ECHO "${1}" | $SED "$basename"`
1719 +} # func_basename may be replaced by extended shell implementation
1720 +
1721 +
1722  # func_dirname_and_basename file append nondir_replacement
1723  # perform func_basename and func_dirname in a single function
1724  # call:
1725 @@ -177,17 +195,31 @@
1726  # those functions but instead duplicate the functionality here.
1727  func_dirname_and_basename ()
1728  {
1729 -  # Extract subdirectory from the argument.
1730 -  func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
1731 -  if test "X$func_dirname_result" = "X${1}"; then
1732 -    func_dirname_result="${3}"
1733 -  else
1734 -    func_dirname_result="$func_dirname_result${2}"
1735 -  fi
1736 -  func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
1737 -}
1738 +    # Extract subdirectory from the argument.
1739 +    func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
1740 +    if test "X$func_dirname_result" = "X${1}"; then
1741 +      func_dirname_result="${3}"
1742 +    else
1743 +      func_dirname_result="$func_dirname_result${2}"
1744 +    fi
1745 +    func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
1746 +} # func_dirname_and_basename may be replaced by extended shell implementation
1747 +
1748 +
1749 +# func_stripname prefix suffix name
1750 +# strip PREFIX and SUFFIX off of NAME.
1751 +# PREFIX and SUFFIX must not contain globbing or regex special
1752 +# characters, hashes, percent signs, but SUFFIX may contain a leading
1753 +# dot (in which case that matches only a dot).
1754 +# func_strip_suffix prefix name
1755 +func_stripname ()
1756 +{
1757 +    case ${2} in
1758 +      .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
1759 +      *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
1760 +    esac
1761 +} # func_stripname may be replaced by extended shell implementation
1762  
1763 -# Generated shell functions inserted here.
1764  
1765  # These SED scripts presuppose an absolute path with a trailing slash.
1766  pathcar='s,^/\([^/]*\).*$,\1,'
1767 @@ -351,7 +383,7 @@
1768       ;;
1769    *)
1770       save_IFS="$IFS"
1771 -     IFS=:
1772 +     IFS=${PATH_SEPARATOR-:}
1773       for progdir in $PATH; do
1774         IFS="$save_IFS"
1775         test -x "$progdir/$progname" && break
1776 @@ -370,6 +402,15 @@
1777  # Same as above, but do not quote variable references.
1778  double_quote_subst='s/\(["`\\]\)/\\\1/g'
1779  
1780 +# Sed substitution that turns a string into a regex matching for the
1781 +# string literally.
1782 +sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
1783 +
1784 +# Sed substitution that converts a w32 file name or path
1785 +# which contains forward slashes, into one that contains
1786 +# (escaped) backslashes.  A very naive implementation.
1787 +lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
1788 +
1789  # Re-`\' parameter expansions in output of double_quote_subst that were
1790  # `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
1791  # in input to double_quote_subst, that '$' was protected from expansion.
1792 @@ -398,7 +439,7 @@
1793  # name if it has been set yet.
1794  func_echo ()
1795  {
1796 -    $ECHO "$progname${mode+: }$mode: $*"
1797 +    $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
1798  }
1799  
1800  # func_verbose arg...
1801 @@ -424,14 +465,14 @@
1802  # Echo program name prefixed message to standard error.
1803  func_error ()
1804  {
1805 -    $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
1806 +    $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
1807  }
1808  
1809  # func_warning arg...
1810  # Echo program name prefixed warning message to standard error.
1811  func_warning ()
1812  {
1813 -    $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
1814 +    $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
1815  
1816      # bash bug again:
1817      :
1818 @@ -650,11 +691,30 @@
1819      fi
1820  }
1821  
1822 +# func_tr_sh
1823 +# Turn $1 into a string suitable for a shell variable name.
1824 +# Result is stored in $func_tr_sh_result.  All characters
1825 +# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
1826 +# if $1 begins with a digit, a '_' is prepended as well.
1827 +func_tr_sh ()
1828 +{
1829 +  case $1 in
1830 +  [0-9]* | *[!a-zA-Z0-9_]*)
1831 +    func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
1832 +    ;;
1833 +  * )
1834 +    func_tr_sh_result=$1
1835 +    ;;
1836 +  esac
1837 +}
1838 +
1839  
1840  # func_version
1841  # Echo version message to standard output and exit.
1842  func_version ()
1843  {
1844 +    $opt_debug
1845 +
1846      $SED -n '/(C)/!b go
1847  	:more
1848  	/\./!{
1849 @@ -676,6 +736,8 @@
1850  # Echo short help message to standard output and exit.
1851  func_usage ()
1852  {
1853 +    $opt_debug
1854 +
1855      $SED -n '/^# Usage:/,/^#  *.*--help/ {
1856          s/^# //
1857  	s/^# *$//
1858 @@ -692,7 +754,10 @@
1859  # unless 'noexit' is passed as argument.
1860  func_help ()
1861  {
1862 +    $opt_debug
1863 +
1864      $SED -n '/^# Usage:/,/# Report bugs to/ {
1865 +	:print
1866          s/^# //
1867  	s/^# *$//
1868  	s*\$progname*'$progname'*
1869 @@ -702,10 +767,14 @@
1870  	s*\$LTCFLAGS*'"$LTCFLAGS"'*
1871  	s*\$LD*'"$LD"'*
1872  	s/\$with_gnu_ld/'"$with_gnu_ld"'/
1873 -	s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
1874 -	s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
1875 +	s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
1876 +	s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
1877  	p
1878 -     }' < "$progpath"
1879 +	d
1880 +     }
1881 +     /^# .* home page:/b print
1882 +     /^# General help using/b print
1883 +     ' < "$progpath"
1884      ret=$?
1885      if test -z "$1"; then
1886        exit $ret
1887 @@ -717,12 +786,39 @@
1888  # exit_cmd.
1889  func_missing_arg ()
1890  {
1891 +    $opt_debug
1892 +
1893      func_error "missing argument for $1."
1894      exit_cmd=exit
1895  }
1896  
1897 -exit_cmd=:
1898  
1899 +# func_split_short_opt shortopt
1900 +# Set func_split_short_opt_name and func_split_short_opt_arg shell
1901 +# variables after splitting SHORTOPT after the 2nd character.
1902 +func_split_short_opt ()
1903 +{
1904 +    my_sed_short_opt='1s/^\(..\).*$/\1/;q'
1905 +    my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
1906 +
1907 +    func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
1908 +    func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
1909 +} # func_split_short_opt may be replaced by extended shell implementation
1910 +
1911 +
1912 +# func_split_long_opt longopt
1913 +# Set func_split_long_opt_name and func_split_long_opt_arg shell
1914 +# variables after splitting LONGOPT at the `=' sign.
1915 +func_split_long_opt ()
1916 +{
1917 +    my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
1918 +    my_sed_long_arg='1s/^--[^=]*=//'
1919 +
1920 +    func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
1921 +    func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
1922 +} # func_split_long_opt may be replaced by extended shell implementation
1923 +
1924 +exit_cmd=:
1925  
1926  
1927  
1928 @@ -732,25 +828,64 @@
1929  magic_exe="%%%MAGIC EXE variable%%%"
1930  
1931  # Global variables.
1932 -# $mode is unset
1933  nonopt=
1934 -execute_dlfiles=
1935  preserve_args=
1936  lo2o="s/\\.lo\$/.${objext}/"
1937  o2lo="s/\\.${objext}\$/.lo/"
1938  extracted_archives=
1939  extracted_serial=0
1940  
1941 -opt_dry_run=false
1942 -opt_duplicate_deps=false
1943 -opt_silent=false
1944 -opt_debug=:
1945 -
1946  # If this variable is set in any of the actions, the command in it
1947  # will be execed at the end.  This prevents here-documents from being
1948  # left over by shells.
1949  exec_cmd=
1950  
1951 +# func_append var value
1952 +# Append VALUE to the end of shell variable VAR.
1953 +func_append ()
1954 +{
1955 +    eval "${1}=\$${1}\${2}"
1956 +} # func_append may be replaced by extended shell implementation
1957 +
1958 +# func_append_quoted var value
1959 +# Quote VALUE and append to the end of shell variable VAR, separated
1960 +# by a space.
1961 +func_append_quoted ()
1962 +{
1963 +    func_quote_for_eval "${2}"
1964 +    eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
1965 +} # func_append_quoted may be replaced by extended shell implementation
1966 +
1967 +
1968 +# func_arith arithmetic-term...
1969 +func_arith ()
1970 +{
1971 +    func_arith_result=`expr "${@}"`
1972 +} # func_arith may be replaced by extended shell implementation
1973 +
1974 +
1975 +# func_len string
1976 +# STRING may not start with a hyphen.
1977 +func_len ()
1978 +{
1979 +    func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
1980 +} # func_len may be replaced by extended shell implementation
1981 +
1982 +
1983 +# func_lo2o object
1984 +func_lo2o ()
1985 +{
1986 +    func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
1987 +} # func_lo2o may be replaced by extended shell implementation
1988 +
1989 +
1990 +# func_xform libobj-or-source
1991 +func_xform ()
1992 +{
1993 +    func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
1994 +} # func_xform may be replaced by extended shell implementation
1995 +
1996 +
1997  # func_fatal_configuration arg...
1998  # Echo program name prefixed message to standard error, followed by
1999  # a configuration failure hint, and exit.
2000 @@ -840,129 +975,209 @@
2001    esac
2002  }
2003  
2004 -# Parse options once, thoroughly.  This comes as soon as possible in
2005 -# the script to make things like `libtool --version' happen quickly.
2006 +# func_check_version_match
2007 +# Ensure that we are using m4 macros, and libtool script from the same
2008 +# release of libtool.
2009 +func_check_version_match ()
2010  {
2011 +  if test "$package_revision" != "$macro_revision"; then
2012 +    if test "$VERSION" != "$macro_version"; then
2013 +      if test -z "$macro_version"; then
2014 +        cat >&2 <<_LT_EOF
2015 +$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
2016 +$progname: definition of this LT_INIT comes from an older release.
2017 +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
2018 +$progname: and run autoconf again.
2019 +_LT_EOF
2020 +      else
2021 +        cat >&2 <<_LT_EOF
2022 +$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
2023 +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
2024 +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
2025 +$progname: and run autoconf again.
2026 +_LT_EOF
2027 +      fi
2028 +    else
2029 +      cat >&2 <<_LT_EOF
2030 +$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
2031 +$progname: but the definition of this LT_INIT comes from revision $macro_revision.
2032 +$progname: You should recreate aclocal.m4 with macros from revision $package_revision
2033 +$progname: of $PACKAGE $VERSION and run autoconf again.
2034 +_LT_EOF
2035 +    fi
2036 +
2037 +    exit $EXIT_MISMATCH
2038 +  fi
2039 +}
2040 +
2041 +
2042 +# Shorthand for --mode=foo, only valid as the first argument
2043 +case $1 in
2044 +clean|clea|cle|cl)
2045 +  shift; set dummy --mode clean ${1+"$@"}; shift
2046 +  ;;
2047 +compile|compil|compi|comp|com|co|c)
2048 +  shift; set dummy --mode compile ${1+"$@"}; shift
2049 +  ;;
2050 +execute|execut|execu|exec|exe|ex|e)
2051 +  shift; set dummy --mode execute ${1+"$@"}; shift
2052 +  ;;
2053 +finish|finis|fini|fin|fi|f)
2054 +  shift; set dummy --mode finish ${1+"$@"}; shift
2055 +  ;;
2056 +install|instal|insta|inst|ins|in|i)
2057 +  shift; set dummy --mode install ${1+"$@"}; shift
2058 +  ;;
2059 +link|lin|li|l)
2060 +  shift; set dummy --mode link ${1+"$@"}; shift
2061 +  ;;
2062 +uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
2063 +  shift; set dummy --mode uninstall ${1+"$@"}; shift
2064 +  ;;
2065 +esac
2066 +
2067 +
2068 +
2069 +# Option defaults:
2070 +opt_debug=:
2071 +opt_dry_run=false
2072 +opt_config=false
2073 +opt_preserve_dup_deps=false
2074 +opt_features=false
2075 +opt_finish=false
2076 +opt_help=false
2077 +opt_help_all=false
2078 +opt_silent=:
2079 +opt_warning=:
2080 +opt_verbose=:
2081 +opt_silent=false
2082 +opt_verbose=false
2083  
2084 -  # Shorthand for --mode=foo, only valid as the first argument
2085 -  case $1 in
2086 -  clean|clea|cle|cl)
2087 -    shift; set dummy --mode clean ${1+"$@"}; shift
2088 -    ;;
2089 -  compile|compil|compi|comp|com|co|c)
2090 -    shift; set dummy --mode compile ${1+"$@"}; shift
2091 -    ;;
2092 -  execute|execut|execu|exec|exe|ex|e)
2093 -    shift; set dummy --mode execute ${1+"$@"}; shift
2094 -    ;;
2095 -  finish|finis|fini|fin|fi|f)
2096 -    shift; set dummy --mode finish ${1+"$@"}; shift
2097 -    ;;
2098 -  install|instal|insta|inst|ins|in|i)
2099 -    shift; set dummy --mode install ${1+"$@"}; shift
2100 -    ;;
2101 -  link|lin|li|l)
2102 -    shift; set dummy --mode link ${1+"$@"}; shift
2103 -    ;;
2104 -  uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
2105 -    shift; set dummy --mode uninstall ${1+"$@"}; shift
2106 -    ;;
2107 -  esac
2108  
2109 -  # Parse non-mode specific arguments:
2110 -  while test "$#" -gt 0; do
2111 +# Parse options once, thoroughly.  This comes as soon as possible in the
2112 +# script to make things like `--version' happen as quickly as we can.
2113 +{
2114 +  # this just eases exit handling
2115 +  while test $# -gt 0; do
2116      opt="$1"
2117      shift
2118 -
2119      case $opt in
2120 -      --config)		func_config					;;
2121 -
2122 -      --debug)		preserve_args="$preserve_args $opt"
2123 +      --debug|-x)	opt_debug='set -x'
2124  			func_echo "enabling shell trace mode"
2125 -			opt_debug='set -x'
2126  			$opt_debug
2127  			;;
2128 -
2129 -      -dlopen)		test "$#" -eq 0 && func_missing_arg "$opt" && break
2130 -			execute_dlfiles="$execute_dlfiles $1"
2131 -			shift
2132 +      --dry-run|--dryrun|-n)
2133 +			opt_dry_run=:
2134  			;;
2135 -
2136 -      --dry-run | -n)	opt_dry_run=:					;;
2137 -      --features)       func_features					;;
2138 -      --finish)		mode="finish"					;;
2139 -
2140 -      --mode)		test "$#" -eq 0 && func_missing_arg "$opt" && break
2141 -			case $1 in
2142 -			  # Valid mode arguments:
2143 -			  clean)	;;
2144 -			  compile)	;;
2145 -			  execute)	;;
2146 -			  finish)	;;
2147 -			  install)	;;
2148 -			  link)		;;
2149 -			  relink)	;;
2150 -			  uninstall)	;;
2151 -
2152 -			  # Catch anything else as an error
2153 -			  *) func_error "invalid argument for $opt"
2154 -			     exit_cmd=exit
2155 -			     break
2156 -			     ;;
2157 -		        esac
2158 -
2159 -			mode="$1"
2160 +      --config)
2161 +			opt_config=:
2162 +func_config
2163 +			;;
2164 +      --dlopen|-dlopen)
2165 +			optarg="$1"
2166 +			opt_dlopen="${opt_dlopen+$opt_dlopen
2167 +}$optarg"
2168  			shift
2169  			;;
2170 -
2171        --preserve-dup-deps)
2172 -			opt_duplicate_deps=:				;;
2173 -
2174 -      --quiet|--silent)	preserve_args="$preserve_args $opt"
2175 -			opt_silent=:
2176 -			opt_verbose=false
2177 +			opt_preserve_dup_deps=:
2178  			;;
2179 -
2180 -      --no-quiet|--no-silent)
2181 -			preserve_args="$preserve_args $opt"
2182 -			opt_silent=false
2183 +      --features)
2184 +			opt_features=:
2185 +func_features
2186  			;;
2187 -
2188 -      --verbose| -v)	preserve_args="$preserve_args $opt"
2189 +      --finish)
2190 +			opt_finish=:
2191 +set dummy --mode finish ${1+"$@"}; shift
2192 +			;;
2193 +      --help)
2194 +			opt_help=:
2195 +			;;
2196 +      --help-all)
2197 +			opt_help_all=:
2198 +opt_help=': help-all'
2199 +			;;
2200 +      --mode)
2201 +			test $# = 0 && func_missing_arg $opt && break
2202 +			optarg="$1"
2203 +			opt_mode="$optarg"
2204 +case $optarg in
2205 +  # Valid mode arguments:
2206 +  clean|compile|execute|finish|install|link|relink|uninstall) ;;
2207 +
2208 +  # Catch anything else as an error
2209 +  *) func_error "invalid argument for $opt"
2210 +     exit_cmd=exit
2211 +     break
2212 +     ;;
2213 +esac
2214 +			shift
2215 +			;;
2216 +      --no-silent|--no-quiet)
2217  			opt_silent=false
2218 -			opt_verbose=:
2219 +func_append preserve_args " $opt"
2220  			;;
2221 -
2222 -      --no-verbose)	preserve_args="$preserve_args $opt"
2223 +      --no-warning|--no-warn)
2224 +			opt_warning=false
2225 +func_append preserve_args " $opt"
2226 +			;;
2227 +      --no-verbose)
2228  			opt_verbose=false
2229 +func_append preserve_args " $opt"
2230  			;;
2231 -
2232 -      --tag)		test "$#" -eq 0 && func_missing_arg "$opt" && break
2233 -			preserve_args="$preserve_args $opt $1"
2234 -			func_enable_tag "$1"	# tagname is set here
2235 +      --silent|--quiet)
2236 +			opt_silent=:
2237 +func_append preserve_args " $opt"
2238 +        opt_verbose=false
2239 +			;;
2240 +      --verbose|-v)
2241 +			opt_verbose=:
2242 +func_append preserve_args " $opt"
2243 +opt_silent=false
2244 +			;;
2245 +      --tag)
2246 +			test $# = 0 && func_missing_arg $opt && break
2247 +			optarg="$1"
2248 +			opt_tag="$optarg"
2249 +func_append preserve_args " $opt $optarg"
2250 +func_enable_tag "$optarg"
2251  			shift
2252  			;;
2253  
2254 +      -\?|-h)		func_usage				;;
2255 +      --help)		func_help				;;
2256 +      --version)	func_version				;;
2257 +
2258        # Separate optargs to long options:
2259 -      -dlopen=*|--mode=*|--tag=*)
2260 -			func_opt_split "$opt"
2261 -			set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
2262 +      --*=*)
2263 +			func_split_long_opt "$opt"
2264 +			set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
2265  			shift
2266  			;;
2267  
2268 -      -\?|-h)		func_usage					;;
2269 -      --help)		opt_help=:					;;
2270 -      --help-all)	opt_help=': help-all'				;;
2271 -      --version)	func_version					;;
2272 -
2273 -      -*)		func_fatal_help "unrecognized option \`$opt'"	;;
2274 -
2275 -      *)		nonopt="$opt"
2276 -			break
2277 +      # Separate non-argument short options:
2278 +      -\?*|-h*|-n*|-v*)
2279 +			func_split_short_opt "$opt"
2280 +			set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
2281 +			shift
2282  			;;
2283 +
2284 +      --)		break					;;
2285 +      -*)		func_fatal_help "unrecognized option \`$opt'" ;;
2286 +      *)		set dummy "$opt" ${1+"$@"};	shift; break  ;;
2287      esac
2288    done
2289  
2290 +  # Validate options:
2291 +
2292 +  # save first non-option argument
2293 +  if test "$#" -gt 0; then
2294 +    nonopt="$opt"
2295 +    shift
2296 +  fi
2297 +
2298 +  # preserve --debug
2299 +  test "$opt_debug" = : || func_append preserve_args " --debug"
2300  
2301    case $host in
2302      *cygwin* | *mingw* | *pw32* | *cegcc*)
2303 @@ -970,82 +1185,44 @@
2304        opt_duplicate_compiler_generated_deps=:
2305        ;;
2306      *)
2307 -      opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
2308 +      opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
2309        ;;
2310    esac
2311  
2312 -  # Having warned about all mis-specified options, bail out if
2313 -  # anything was wrong.
2314 -  $exit_cmd $EXIT_FAILURE
2315 -}
2316 +  $opt_help || {
2317 +    # Sanity checks first:
2318 +    func_check_version_match
2319  
2320 -# func_check_version_match
2321 -# Ensure that we are using m4 macros, and libtool script from the same
2322 -# release of libtool.
2323 -func_check_version_match ()
2324 -{
2325 -  if test "$package_revision" != "$macro_revision"; then
2326 -    if test "$VERSION" != "$macro_version"; then
2327 -      if test -z "$macro_version"; then
2328 -        cat >&2 <<_LT_EOF
2329 -$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
2330 -$progname: definition of this LT_INIT comes from an older release.
2331 -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
2332 -$progname: and run autoconf again.
2333 -_LT_EOF
2334 -      else
2335 -        cat >&2 <<_LT_EOF
2336 -$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
2337 -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
2338 -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
2339 -$progname: and run autoconf again.
2340 -_LT_EOF
2341 -      fi
2342 -    else
2343 -      cat >&2 <<_LT_EOF
2344 -$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
2345 -$progname: but the definition of this LT_INIT comes from revision $macro_revision.
2346 -$progname: You should recreate aclocal.m4 with macros from revision $package_revision
2347 -$progname: of $PACKAGE $VERSION and run autoconf again.
2348 -_LT_EOF
2349 +    if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
2350 +      func_fatal_configuration "not configured to build any kind of library"
2351      fi
2352  
2353 -    exit $EXIT_MISMATCH
2354 -  fi
2355 -}
2356 -
2357 -
2358 -## ----------- ##
2359 -##    Main.    ##
2360 -## ----------- ##
2361 +    # Darwin sucks
2362 +    eval std_shrext=\"$shrext_cmds\"
2363  
2364 -$opt_help || {
2365 -  # Sanity checks first:
2366 -  func_check_version_match
2367 -
2368 -  if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
2369 -    func_fatal_configuration "not configured to build any kind of library"
2370 -  fi
2371 +    # Only execute mode is allowed to have -dlopen flags.
2372 +    if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
2373 +      func_error "unrecognized option \`-dlopen'"
2374 +      $ECHO "$help" 1>&2
2375 +      exit $EXIT_FAILURE
2376 +    fi
2377  
2378 -  test -z "$mode" && func_fatal_error "error: you must specify a MODE."
2379 +    # Change the help message to a mode-specific one.
2380 +    generic_help="$help"
2381 +    help="Try \`$progname --help --mode=$opt_mode' for more information."
2382 +  }
2383  
2384  
2385 -  # Darwin sucks
2386 -  eval std_shrext=\"$shrext_cmds\"
2387 +  # Bail if the options were screwed
2388 +  $exit_cmd $EXIT_FAILURE
2389 +}
2390  
2391  
2392 -  # Only execute mode is allowed to have -dlopen flags.
2393 -  if test -n "$execute_dlfiles" && test "$mode" != execute; then
2394 -    func_error "unrecognized option \`-dlopen'"
2395 -    $ECHO "$help" 1>&2
2396 -    exit $EXIT_FAILURE
2397 -  fi
2398  
2399 -  # Change the help message to a mode-specific one.
2400 -  generic_help="$help"
2401 -  help="Try \`$progname --help --mode=$mode' for more information."
2402 -}
2403  
2404 +## ----------- ##
2405 +##    Main.    ##
2406 +## ----------- ##
2407  
2408  # func_lalib_p file
2409  # True iff FILE is a libtool `.la' library or `.lo' object file.
2410 @@ -1110,12 +1287,9 @@
2411  # temporary ltwrapper_script.
2412  func_ltwrapper_scriptname ()
2413  {
2414 -    func_ltwrapper_scriptname_result=""
2415 -    if func_ltwrapper_executable_p "$1"; then
2416 -	func_dirname_and_basename "$1" "" "."
2417 -	func_stripname '' '.exe' "$func_basename_result"
2418 -	func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
2419 -    fi
2420 +    func_dirname_and_basename "$1" "" "."
2421 +    func_stripname '' '.exe' "$func_basename_result"
2422 +    func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
2423  }
2424  
2425  # func_ltwrapper_p file
2426 @@ -1161,6 +1335,37 @@
2427  }
2428  
2429  
2430 +# func_resolve_sysroot PATH
2431 +# Replace a leading = in PATH with a sysroot.  Store the result into
2432 +# func_resolve_sysroot_result
2433 +func_resolve_sysroot ()
2434 +{
2435 +  func_resolve_sysroot_result=$1
2436 +  case $func_resolve_sysroot_result in
2437 +  =*)
2438 +    func_stripname '=' '' "$func_resolve_sysroot_result"
2439 +    func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
2440 +    ;;
2441 +  esac
2442 +}
2443 +
2444 +# func_replace_sysroot PATH
2445 +# If PATH begins with the sysroot, replace it with = and
2446 +# store the result into func_replace_sysroot_result.
2447 +func_replace_sysroot ()
2448 +{
2449 +  case "$lt_sysroot:$1" in
2450 +  ?*:"$lt_sysroot"*)
2451 +    func_stripname "$lt_sysroot" '' "$1"
2452 +    func_replace_sysroot_result="=$func_stripname_result"
2453 +    ;;
2454 +  *)
2455 +    # Including no sysroot.
2456 +    func_replace_sysroot_result=$1
2457 +    ;;
2458 +  esac
2459 +}
2460 +
2461  # func_infer_tag arg
2462  # Infer tagged configuration to use if any are available and
2463  # if one wasn't chosen via the "--tag" command line option.
2464 @@ -1173,8 +1378,7 @@
2465      if test -n "$available_tags" && test -z "$tagname"; then
2466        CC_quoted=
2467        for arg in $CC; do
2468 -        func_quote_for_eval "$arg"
2469 -	CC_quoted="$CC_quoted $func_quote_for_eval_result"
2470 +	func_append_quoted CC_quoted "$arg"
2471        done
2472        CC_expanded=`func_echo_all $CC`
2473        CC_quoted_expanded=`func_echo_all $CC_quoted`
2474 @@ -1193,8 +1397,7 @@
2475  	    CC_quoted=
2476  	    for arg in $CC; do
2477  	      # Double-quote args containing other shell metacharacters.
2478 -	      func_quote_for_eval "$arg"
2479 -	      CC_quoted="$CC_quoted $func_quote_for_eval_result"
2480 +	      func_append_quoted CC_quoted "$arg"
2481  	    done
2482  	    CC_expanded=`func_echo_all $CC`
2483  	    CC_quoted_expanded=`func_echo_all $CC_quoted`
2484 @@ -1244,24 +1447,504 @@
2485        write_oldobj=none
2486      fi
2487  
2488 -    $opt_dry_run || {
2489 -      cat >${write_libobj}T <<EOF
2490 -# $write_libobj - a libtool object file
2491 -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
2492 -#
2493 -# Please DO NOT delete this file!
2494 -# It is necessary for linking the library.
2495 +    $opt_dry_run || {
2496 +      cat >${write_libobj}T <<EOF
2497 +# $write_libobj - a libtool object file
2498 +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
2499 +#
2500 +# Please DO NOT delete this file!
2501 +# It is necessary for linking the library.
2502 +
2503 +# Name of the PIC object.
2504 +pic_object=$write_lobj
2505 +
2506 +# Name of the non-PIC object
2507 +non_pic_object=$write_oldobj
2508 +
2509 +EOF
2510 +      $MV "${write_libobj}T" "${write_libobj}"
2511 +    }
2512 +}
2513 +
2514 +
2515 +##################################################
2516 +# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
2517 +##################################################
2518 +
2519 +# func_convert_core_file_wine_to_w32 ARG
2520 +# Helper function used by file name conversion functions when $build is *nix,
2521 +# and $host is mingw, cygwin, or some other w32 environment. Relies on a
2522 +# correctly configured wine environment available, with the winepath program
2523 +# in $build's $PATH.
2524 +#
2525 +# ARG is the $build file name to be converted to w32 format.
2526 +# Result is available in $func_convert_core_file_wine_to_w32_result, and will
2527 +# be empty on error (or when ARG is empty)
2528 +func_convert_core_file_wine_to_w32 ()
2529 +{
2530 +  $opt_debug
2531 +  func_convert_core_file_wine_to_w32_result="$1"
2532 +  if test -n "$1"; then
2533 +    # Unfortunately, winepath does not exit with a non-zero error code, so we
2534 +    # are forced to check the contents of stdout. On the other hand, if the
2535 +    # command is not found, the shell will set an exit code of 127 and print
2536 +    # *an error message* to stdout. So we must check for both error code of
2537 +    # zero AND non-empty stdout, which explains the odd construction:
2538 +    func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
2539 +    if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
2540 +      func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
2541 +        $SED -e "$lt_sed_naive_backslashify"`
2542 +    else
2543 +      func_convert_core_file_wine_to_w32_result=
2544 +    fi
2545 +  fi
2546 +}
2547 +# end: func_convert_core_file_wine_to_w32
2548 +
2549 +
2550 +# func_convert_core_path_wine_to_w32 ARG
2551 +# Helper function used by path conversion functions when $build is *nix, and
2552 +# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
2553 +# configured wine environment available, with the winepath program in $build's
2554 +# $PATH. Assumes ARG has no leading or trailing path separator characters.
2555 +#
2556 +# ARG is path to be converted from $build format to win32.
2557 +# Result is available in $func_convert_core_path_wine_to_w32_result.
2558 +# Unconvertible file (directory) names in ARG are skipped; if no directory names
2559 +# are convertible, then the result may be empty.
2560 +func_convert_core_path_wine_to_w32 ()
2561 +{
2562 +  $opt_debug
2563 +  # unfortunately, winepath doesn't convert paths, only file names
2564 +  func_convert_core_path_wine_to_w32_result=""
2565 +  if test -n "$1"; then
2566 +    oldIFS=$IFS
2567 +    IFS=:
2568 +    for func_convert_core_path_wine_to_w32_f in $1; do
2569 +      IFS=$oldIFS
2570 +      func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
2571 +      if test -n "$func_convert_core_file_wine_to_w32_result" ; then
2572 +        if test -z "$func_convert_core_path_wine_to_w32_result"; then
2573 +          func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
2574 +        else
2575 +          func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
2576 +        fi
2577 +      fi
2578 +    done
2579 +    IFS=$oldIFS
2580 +  fi
2581 +}
2582 +# end: func_convert_core_path_wine_to_w32
2583 +
2584 +
2585 +# func_cygpath ARGS...
2586 +# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
2587 +# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
2588 +# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
2589 +# (2), returns the Cygwin file name or path in func_cygpath_result (input
2590 +# file name or path is assumed to be in w32 format, as previously converted
2591 +# from $build's *nix or MSYS format). In case (3), returns the w32 file name
2592 +# or path in func_cygpath_result (input file name or path is assumed to be in
2593 +# Cygwin format). Returns an empty string on error.
2594 +#
2595 +# ARGS are passed to cygpath, with the last one being the file name or path to
2596 +# be converted.
2597 +#
2598 +# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
2599 +# environment variable; do not put it in $PATH.
2600 +func_cygpath ()
2601 +{
2602 +  $opt_debug
2603 +  if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
2604 +    func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
2605 +    if test "$?" -ne 0; then
2606 +      # on failure, ensure result is empty
2607 +      func_cygpath_result=
2608 +    fi
2609 +  else
2610 +    func_cygpath_result=
2611 +    func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
2612 +  fi
2613 +}
2614 +#end: func_cygpath
2615 +
2616 +
2617 +# func_convert_core_msys_to_w32 ARG
2618 +# Convert file name or path ARG from MSYS format to w32 format.  Return
2619 +# result in func_convert_core_msys_to_w32_result.
2620 +func_convert_core_msys_to_w32 ()
2621 +{
2622 +  $opt_debug
2623 +  # awkward: cmd appends spaces to result
2624 +  func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
2625 +    $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
2626 +}
2627 +#end: func_convert_core_msys_to_w32
2628 +
2629 +
2630 +# func_convert_file_check ARG1 ARG2
2631 +# Verify that ARG1 (a file name in $build format) was converted to $host
2632 +# format in ARG2. Otherwise, emit an error message, but continue (resetting
2633 +# func_to_host_file_result to ARG1).
2634 +func_convert_file_check ()
2635 +{
2636 +  $opt_debug
2637 +  if test -z "$2" && test -n "$1" ; then
2638 +    func_error "Could not determine host file name corresponding to"
2639 +    func_error "  \`$1'"
2640 +    func_error "Continuing, but uninstalled executables may not work."
2641 +    # Fallback:
2642 +    func_to_host_file_result="$1"
2643 +  fi
2644 +}
2645 +# end func_convert_file_check
2646 +
2647 +
2648 +# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
2649 +# Verify that FROM_PATH (a path in $build format) was converted to $host
2650 +# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
2651 +# func_to_host_file_result to a simplistic fallback value (see below).
2652 +func_convert_path_check ()
2653 +{
2654 +  $opt_debug
2655 +  if test -z "$4" && test -n "$3"; then
2656 +    func_error "Could not determine the host path corresponding to"
2657 +    func_error "  \`$3'"
2658 +    func_error "Continuing, but uninstalled executables may not work."
2659 +    # Fallback.  This is a deliberately simplistic "conversion" and
2660 +    # should not be "improved".  See libtool.info.
2661 +    if test "x$1" != "x$2"; then
2662 +      lt_replace_pathsep_chars="s|$1|$2|g"
2663 +      func_to_host_path_result=`echo "$3" |
2664 +        $SED -e "$lt_replace_pathsep_chars"`
2665 +    else
2666 +      func_to_host_path_result="$3"
2667 +    fi
2668 +  fi
2669 +}
2670 +# end func_convert_path_check
2671 +
2672 +
2673 +# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
2674 +# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
2675 +# and appending REPL if ORIG matches BACKPAT.
2676 +func_convert_path_front_back_pathsep ()
2677 +{
2678 +  $opt_debug
2679 +  case $4 in
2680 +  $1 ) func_to_host_path_result="$3$func_to_host_path_result"
2681 +    ;;
2682 +  esac
2683 +  case $4 in
2684 +  $2 ) func_append func_to_host_path_result "$3"
2685 +    ;;
2686 +  esac
2687 +}
2688 +# end func_convert_path_front_back_pathsep
2689 +
2690 +
2691 +##################################################
2692 +# $build to $host FILE NAME CONVERSION FUNCTIONS #
2693 +##################################################
2694 +# invoked via `$to_host_file_cmd ARG'
2695 +#
2696 +# In each case, ARG is the path to be converted from $build to $host format.
2697 +# Result will be available in $func_to_host_file_result.
2698 +
2699 +
2700 +# func_to_host_file ARG
2701 +# Converts the file name ARG from $build format to $host format. Return result
2702 +# in func_to_host_file_result.
2703 +func_to_host_file ()
2704 +{
2705 +  $opt_debug
2706 +  $to_host_file_cmd "$1"
2707 +}
2708 +# end func_to_host_file
2709 +
2710 +
2711 +# func_to_tool_file ARG LAZY
2712 +# converts the file name ARG from $build format to toolchain format. Return
2713 +# result in func_to_tool_file_result.  If the conversion in use is listed
2714 +# in (the comma separated) LAZY, no conversion takes place.
2715 +func_to_tool_file ()
2716 +{
2717 +  $opt_debug
2718 +  case ,$2, in
2719 +    *,"$to_tool_file_cmd",*)
2720 +      func_to_tool_file_result=$1
2721 +      ;;
2722 +    *)
2723 +      $to_tool_file_cmd "$1"
2724 +      func_to_tool_file_result=$func_to_host_file_result
2725 +      ;;
2726 +  esac
2727 +}
2728 +# end func_to_tool_file
2729 +
2730 +
2731 +# func_convert_file_noop ARG
2732 +# Copy ARG to func_to_host_file_result.
2733 +func_convert_file_noop ()
2734 +{
2735 +  func_to_host_file_result="$1"
2736 +}
2737 +# end func_convert_file_noop
2738 +
2739 +
2740 +# func_convert_file_msys_to_w32 ARG
2741 +# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
2742 +# conversion to w32 is not available inside the cwrapper.  Returns result in
2743 +# func_to_host_file_result.
2744 +func_convert_file_msys_to_w32 ()
2745 +{
2746 +  $opt_debug
2747 +  func_to_host_file_result="$1"
2748 +  if test -n "$1"; then
2749 +    func_convert_core_msys_to_w32 "$1"
2750 +    func_to_host_file_result="$func_convert_core_msys_to_w32_result"
2751 +  fi
2752 +  func_convert_file_check "$1" "$func_to_host_file_result"
2753 +}
2754 +# end func_convert_file_msys_to_w32
2755 +
2756 +
2757 +# func_convert_file_cygwin_to_w32 ARG
2758 +# Convert file name ARG from Cygwin to w32 format.  Returns result in
2759 +# func_to_host_file_result.
2760 +func_convert_file_cygwin_to_w32 ()
2761 +{
2762 +  $opt_debug
2763 +  func_to_host_file_result="$1"
2764 +  if test -n "$1"; then
2765 +    # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
2766 +    # LT_CYGPATH in this case.
2767 +    func_to_host_file_result=`cygpath -m "$1"`
2768 +  fi
2769 +  func_convert_file_check "$1" "$func_to_host_file_result"
2770 +}
2771 +# end func_convert_file_cygwin_to_w32
2772 +
2773 +
2774 +# func_convert_file_nix_to_w32 ARG
2775 +# Convert file name ARG from *nix to w32 format.  Requires a wine environment
2776 +# and a working winepath. Returns result in func_to_host_file_result.
2777 +func_convert_file_nix_to_w32 ()
2778 +{
2779 +  $opt_debug
2780 +  func_to_host_file_result="$1"
2781 +  if test -n "$1"; then
2782 +    func_convert_core_file_wine_to_w32 "$1"
2783 +    func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
2784 +  fi
2785 +  func_convert_file_check "$1" "$func_to_host_file_result"
2786 +}
2787 +# end func_convert_file_nix_to_w32
2788 +
2789 +
2790 +# func_convert_file_msys_to_cygwin ARG
2791 +# Convert file name ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.
2792 +# Returns result in func_to_host_file_result.
2793 +func_convert_file_msys_to_cygwin ()
2794 +{
2795 +  $opt_debug
2796 +  func_to_host_file_result="$1"
2797 +  if test -n "$1"; then
2798 +    func_convert_core_msys_to_w32 "$1"
2799 +    func_cygpath -u "$func_convert_core_msys_to_w32_result"
2800 +    func_to_host_file_result="$func_cygpath_result"
2801 +  fi
2802 +  func_convert_file_check "$1" "$func_to_host_file_result"
2803 +}
2804 +# end func_convert_file_msys_to_cygwin
2805 +
2806 +
2807 +# func_convert_file_nix_to_cygwin ARG
2808 +# Convert file name ARG from *nix to Cygwin format.  Requires Cygwin installed
2809 +# in a wine environment, working winepath, and LT_CYGPATH set.  Returns result
2810 +# in func_to_host_file_result.
2811 +func_convert_file_nix_to_cygwin ()
2812 +{
2813 +  $opt_debug
2814 +  func_to_host_file_result="$1"
2815 +  if test -n "$1"; then
2816 +    # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
2817 +    func_convert_core_file_wine_to_w32 "$1"
2818 +    func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
2819 +    func_to_host_file_result="$func_cygpath_result"
2820 +  fi
2821 +  func_convert_file_check "$1" "$func_to_host_file_result"
2822 +}
2823 +# end func_convert_file_nix_to_cygwin
2824 +
2825 +
2826 +#############################################
2827 +# $build to $host PATH CONVERSION FUNCTIONS #
2828 +#############################################
2829 +# invoked via `$to_host_path_cmd ARG'
2830 +#
2831 +# In each case, ARG is the path to be converted from $build to $host format.
2832 +# The result will be available in $func_to_host_path_result.
2833 +#
2834 +# Path separators are also converted from $build format to $host format.  If
2835 +# ARG begins or ends with a path separator character, it is preserved (but
2836 +# converted to $host format) on output.
2837 +#
2838 +# All path conversion functions are named using the following convention:
2839 +#   file name conversion function    : func_convert_file_X_to_Y ()
2840 +#   path conversion function         : func_convert_path_X_to_Y ()
2841 +# where, for any given $build/$host combination the 'X_to_Y' value is the
2842 +# same.  If conversion functions are added for new $build/$host combinations,
2843 +# the two new functions must follow this pattern, or func_init_to_host_path_cmd
2844 +# will break.
2845 +
2846 +
2847 +# func_init_to_host_path_cmd
2848 +# Ensures that function "pointer" variable $to_host_path_cmd is set to the
2849 +# appropriate value, based on the value of $to_host_file_cmd.
2850 +to_host_path_cmd=
2851 +func_init_to_host_path_cmd ()
2852 +{
2853 +  $opt_debug
2854 +  if test -z "$to_host_path_cmd"; then
2855 +    func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
2856 +    to_host_path_cmd="func_convert_path_${func_stripname_result}"
2857 +  fi
2858 +}
2859 +
2860 +
2861 +# func_to_host_path ARG
2862 +# Converts the path ARG from $build format to $host format. Return result
2863 +# in func_to_host_path_result.
2864 +func_to_host_path ()
2865 +{
2866 +  $opt_debug
2867 +  func_init_to_host_path_cmd
2868 +  $to_host_path_cmd "$1"
2869 +}
2870 +# end func_to_host_path
2871 +
2872 +
2873 +# func_convert_path_noop ARG
2874 +# Copy ARG to func_to_host_path_result.
2875 +func_convert_path_noop ()
2876 +{
2877 +  func_to_host_path_result="$1"
2878 +}
2879 +# end func_convert_path_noop
2880 +
2881 +
2882 +# func_convert_path_msys_to_w32 ARG
2883 +# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
2884 +# conversion to w32 is not available inside the cwrapper.  Returns result in
2885 +# func_to_host_path_result.
2886 +func_convert_path_msys_to_w32 ()
2887 +{
2888 +  $opt_debug
2889 +  func_to_host_path_result="$1"
2890 +  if test -n "$1"; then
2891 +    # Remove leading and trailing path separator characters from ARG.  MSYS
2892 +    # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
2893 +    # and winepath ignores them completely.
2894 +    func_stripname : : "$1"
2895 +    func_to_host_path_tmp1=$func_stripname_result
2896 +    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
2897 +    func_to_host_path_result="$func_convert_core_msys_to_w32_result"
2898 +    func_convert_path_check : ";" \
2899 +      "$func_to_host_path_tmp1" "$func_to_host_path_result"
2900 +    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
2901 +  fi
2902 +}
2903 +# end func_convert_path_msys_to_w32
2904 +
2905 +
2906 +# func_convert_path_cygwin_to_w32 ARG
2907 +# Convert path ARG from Cygwin to w32 format.  Returns result in
2908 +# func_to_host_file_result.
2909 +func_convert_path_cygwin_to_w32 ()
2910 +{
2911 +  $opt_debug
2912 +  func_to_host_path_result="$1"
2913 +  if test -n "$1"; then
2914 +    # See func_convert_path_msys_to_w32:
2915 +    func_stripname : : "$1"
2916 +    func_to_host_path_tmp1=$func_stripname_result
2917 +    func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
2918 +    func_convert_path_check : ";" \
2919 +      "$func_to_host_path_tmp1" "$func_to_host_path_result"
2920 +    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
2921 +  fi
2922 +}
2923 +# end func_convert_path_cygwin_to_w32
2924 +
2925  
2926 -# Name of the PIC object.
2927 -pic_object=$write_lobj
2928 +# func_convert_path_nix_to_w32 ARG
2929 +# Convert path ARG from *nix to w32 format.  Requires a wine environment and
2930 +# a working winepath.  Returns result in func_to_host_file_result.
2931 +func_convert_path_nix_to_w32 ()
2932 +{
2933 +  $opt_debug
2934 +  func_to_host_path_result="$1"
2935 +  if test -n "$1"; then
2936 +    # See func_convert_path_msys_to_w32:
2937 +    func_stripname : : "$1"
2938 +    func_to_host_path_tmp1=$func_stripname_result
2939 +    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
2940 +    func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
2941 +    func_convert_path_check : ";" \
2942 +      "$func_to_host_path_tmp1" "$func_to_host_path_result"
2943 +    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
2944 +  fi
2945 +}
2946 +# end func_convert_path_nix_to_w32
2947  
2948 -# Name of the non-PIC object
2949 -non_pic_object=$write_oldobj
2950  
2951 -EOF
2952 -      $MV "${write_libobj}T" "${write_libobj}"
2953 -    }
2954 +# func_convert_path_msys_to_cygwin ARG
2955 +# Convert path ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.
2956 +# Returns result in func_to_host_file_result.
2957 +func_convert_path_msys_to_cygwin ()
2958 +{
2959 +  $opt_debug
2960 +  func_to_host_path_result="$1"
2961 +  if test -n "$1"; then
2962 +    # See func_convert_path_msys_to_w32:
2963 +    func_stripname : : "$1"
2964 +    func_to_host_path_tmp1=$func_stripname_result
2965 +    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
2966 +    func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
2967 +    func_to_host_path_result="$func_cygpath_result"
2968 +    func_convert_path_check : : \
2969 +      "$func_to_host_path_tmp1" "$func_to_host_path_result"
2970 +    func_convert_path_front_back_pathsep ":*" "*:" : "$1"
2971 +  fi
2972 +}
2973 +# end func_convert_path_msys_to_cygwin
2974 +
2975 +
2976 +# func_convert_path_nix_to_cygwin ARG
2977 +# Convert path ARG from *nix to Cygwin format.  Requires Cygwin installed in a
2978 +# a wine environment, working winepath, and LT_CYGPATH set.  Returns result in
2979 +# func_to_host_file_result.
2980 +func_convert_path_nix_to_cygwin ()
2981 +{
2982 +  $opt_debug
2983 +  func_to_host_path_result="$1"
2984 +  if test -n "$1"; then
2985 +    # Remove leading and trailing path separator characters from
2986 +    # ARG. msys behavior is inconsistent here, cygpath turns them
2987 +    # into '.;' and ';.', and winepath ignores them completely.
2988 +    func_stripname : : "$1"
2989 +    func_to_host_path_tmp1=$func_stripname_result
2990 +    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
2991 +    func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
2992 +    func_to_host_path_result="$func_cygpath_result"
2993 +    func_convert_path_check : : \
2994 +      "$func_to_host_path_tmp1" "$func_to_host_path_result"
2995 +    func_convert_path_front_back_pathsep ":*" "*:" : "$1"
2996 +  fi
2997  }
2998 +# end func_convert_path_nix_to_cygwin
2999 +
3000  
3001  # func_mode_compile arg...
3002  func_mode_compile ()
3003 @@ -1303,12 +1986,12 @@
3004  	  ;;
3005  
3006  	-pie | -fpie | -fPIE)
3007 -          pie_flag="$pie_flag $arg"
3008 +          func_append pie_flag " $arg"
3009  	  continue
3010  	  ;;
3011  
3012  	-shared | -static | -prefer-pic | -prefer-non-pic)
3013 -	  later="$later $arg"
3014 +	  func_append later " $arg"
3015  	  continue
3016  	  ;;
3017  
3018 @@ -1329,15 +2012,14 @@
3019  	  save_ifs="$IFS"; IFS=','
3020  	  for arg in $args; do
3021  	    IFS="$save_ifs"
3022 -	    func_quote_for_eval "$arg"
3023 -	    lastarg="$lastarg $func_quote_for_eval_result"
3024 +	    func_append_quoted lastarg "$arg"
3025  	  done
3026  	  IFS="$save_ifs"
3027  	  func_stripname ' ' '' "$lastarg"
3028  	  lastarg=$func_stripname_result
3029  
3030  	  # Add the arguments to base_compile.
3031 -	  base_compile="$base_compile $lastarg"
3032 +	  func_append base_compile " $lastarg"
3033  	  continue
3034  	  ;;
3035  
3036 @@ -1353,8 +2035,7 @@
3037        esac    #  case $arg_mode
3038  
3039        # Aesthetically quote the previous argument.
3040 -      func_quote_for_eval "$lastarg"
3041 -      base_compile="$base_compile $func_quote_for_eval_result"
3042 +      func_append_quoted base_compile "$lastarg"
3043      done # for arg
3044  
3045      case $arg_mode in
3046 @@ -1379,7 +2060,7 @@
3047      *.[cCFSifmso] | \
3048      *.ada | *.adb | *.ads | *.asm | \
3049      *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
3050 -    *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
3051 +    *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
3052        func_xform "$libobj"
3053        libobj=$func_xform_result
3054        ;;
3055 @@ -1485,17 +2166,16 @@
3056  	$opt_dry_run || $RM $removelist
3057  	exit $EXIT_FAILURE
3058        fi
3059 -      removelist="$removelist $output_obj"
3060 +      func_append removelist " $output_obj"
3061        $ECHO "$srcfile" > "$lockfile"
3062      fi
3063  
3064      $opt_dry_run || $RM $removelist
3065 -    removelist="$removelist $lockfile"
3066 +    func_append removelist " $lockfile"
3067      trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
3068  
3069 -    if test -n "$fix_srcfile_path"; then
3070 -      eval srcfile=\"$fix_srcfile_path\"
3071 -    fi
3072 +    func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
3073 +    srcfile=$func_to_tool_file_result
3074      func_quote_for_eval "$srcfile"
3075      qsrcfile=$func_quote_for_eval_result
3076  
3077 @@ -1515,7 +2195,7 @@
3078  
3079        if test -z "$output_obj"; then
3080  	# Place PIC objects in $objdir
3081 -	command="$command -o $lobj"
3082 +	func_append command " -o $lobj"
3083        fi
3084  
3085        func_show_eval_locale "$command"	\
3086 @@ -1562,11 +2242,11 @@
3087  	command="$base_compile $qsrcfile $pic_flag"
3088        fi
3089        if test "$compiler_c_o" = yes; then
3090 -	command="$command -o $obj"
3091 +	func_append command " -o $obj"
3092        fi
3093  
3094        # Suppress compiler output if we already did a PIC compilation.
3095 -      command="$command$suppress_output"
3096 +      func_append command "$suppress_output"
3097        func_show_eval_locale "$command" \
3098          '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
3099  
3100 @@ -1611,13 +2291,13 @@
3101  }
3102  
3103  $opt_help || {
3104 -  test "$mode" = compile && func_mode_compile ${1+"$@"}
3105 +  test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
3106  }
3107  
3108  func_mode_help ()
3109  {
3110      # We need to display help for each of the modes.
3111 -    case $mode in
3112 +    case $opt_mode in
3113        "")
3114          # Generic help is extracted from the usage comments
3115          # at the start of this file.
3116 @@ -1793,7 +2473,7 @@
3117          ;;
3118  
3119        *)
3120 -        func_fatal_help "invalid operation mode \`$mode'"
3121 +        func_fatal_help "invalid operation mode \`$opt_mode'"
3122          ;;
3123      esac
3124  
3125 @@ -1808,13 +2488,13 @@
3126    else
3127      {
3128        func_help noexit
3129 -      for mode in compile link execute install finish uninstall clean; do
3130 +      for opt_mode in compile link execute install finish uninstall clean; do
3131  	func_mode_help
3132        done
3133      } | sed -n '1p; 2,$s/^Usage:/  or: /p'
3134      {
3135        func_help noexit
3136 -      for mode in compile link execute install finish uninstall clean; do
3137 +      for opt_mode in compile link execute install finish uninstall clean; do
3138  	echo
3139  	func_mode_help
3140        done
3141 @@ -1843,13 +2523,16 @@
3142        func_fatal_help "you must specify a COMMAND"
3143  
3144      # Handle -dlopen flags immediately.
3145 -    for file in $execute_dlfiles; do
3146 +    for file in $opt_dlopen; do
3147        test -f "$file" \
3148  	|| func_fatal_help "\`$file' is not a file"
3149  
3150        dir=
3151        case $file in
3152        *.la)
3153 +	func_resolve_sysroot "$file"
3154 +	file=$func_resolve_sysroot_result
3155 +
3156  	# Check to see that this really is a libtool archive.
3157  	func_lalib_unsafe_p "$file" \
3158  	  || func_fatal_help "\`$lib' is not a valid libtool archive"
3159 @@ -1871,7 +2554,7 @@
3160  	dir="$func_dirname_result"
3161  
3162  	if test -f "$dir/$objdir/$dlname"; then
3163 -	  dir="$dir/$objdir"
3164 +	  func_append dir "/$objdir"
3165  	else
3166  	  if test ! -f "$dir/$dlname"; then
3167  	    func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
3168 @@ -1928,8 +2611,7 @@
3169  	;;
3170        esac
3171        # Quote arguments (to preserve shell metacharacters).
3172 -      func_quote_for_eval "$file"
3173 -      args="$args $func_quote_for_eval_result"
3174 +      func_append_quoted args "$file"
3175      done
3176  
3177      if test "X$opt_dry_run" = Xfalse; then
3178 @@ -1961,22 +2643,59 @@
3179      fi
3180  }
3181  
3182 -test "$mode" = execute && func_mode_execute ${1+"$@"}
3183 +test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
3184  
3185  
3186  # func_mode_finish arg...
3187  func_mode_finish ()
3188  {
3189      $opt_debug
3190 -    libdirs="$nonopt"
3191 +    libs=
3192 +    libdirs=
3193      admincmds=
3194  
3195 -    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
3196 -      for dir
3197 -      do
3198 -	libdirs="$libdirs $dir"
3199 -      done
3200 +    for opt in "$nonopt" ${1+"$@"}
3201 +    do
3202 +      if test -d "$opt"; then
3203 +	func_append libdirs " $opt"
3204 +
3205 +      elif test -f "$opt"; then
3206 +	if func_lalib_unsafe_p "$opt"; then
3207 +	  func_append libs " $opt"
3208 +	else
3209 +	  func_warning "\`$opt' is not a valid libtool archive"
3210 +	fi
3211 +
3212 +      else
3213 +	func_fatal_error "invalid argument \`$opt'"
3214 +      fi
3215 +    done
3216 +
3217 +    if test -n "$libs"; then
3218 +      if test -n "$lt_sysroot"; then
3219 +        sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
3220 +        sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
3221 +      else
3222 +        sysroot_cmd=
3223 +      fi
3224 +
3225 +      # Remove sysroot references
3226 +      if $opt_dry_run; then
3227 +        for lib in $libs; do
3228 +          echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
3229 +        done
3230 +      else
3231 +        tmpdir=`func_mktempdir`
3232 +        for lib in $libs; do
3233 +	  sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
3234 +	    > $tmpdir/tmp-la
3235 +	  mv -f $tmpdir/tmp-la $lib
3236 +	done
3237 +        ${RM}r "$tmpdir"
3238 +      fi
3239 +    fi
3240  
3241 +    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
3242        for libdir in $libdirs; do
3243  	if test -n "$finish_cmds"; then
3244  	  # Do each command in the finish commands.
3245 @@ -1986,7 +2705,7 @@
3246  	if test -n "$finish_eval"; then
3247  	  # Do the single finish_eval.
3248  	  eval cmds=\"$finish_eval\"
3249 -	  $opt_dry_run || eval "$cmds" || admincmds="$admincmds
3250 +	  $opt_dry_run || eval "$cmds" || func_append admincmds "
3251         $cmds"
3252  	fi
3253        done
3254 @@ -1995,53 +2714,55 @@
3255      # Exit here if they wanted silent mode.
3256      $opt_silent && exit $EXIT_SUCCESS
3257  
3258 -    echo "----------------------------------------------------------------------"
3259 -    echo "Libraries have been installed in:"
3260 -    for libdir in $libdirs; do
3261 -      $ECHO "   $libdir"
3262 -    done
3263 -    echo
3264 -    echo "If you ever happen to want to link against installed libraries"
3265 -    echo "in a given directory, LIBDIR, you must either use libtool, and"
3266 -    echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
3267 -    echo "flag during linking and do at least one of the following:"
3268 -    if test -n "$shlibpath_var"; then
3269 -      echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
3270 -      echo "     during execution"
3271 -    fi
3272 -    if test -n "$runpath_var"; then
3273 -      echo "   - add LIBDIR to the \`$runpath_var' environment variable"
3274 -      echo "     during linking"
3275 -    fi
3276 -    if test -n "$hardcode_libdir_flag_spec"; then
3277 -      libdir=LIBDIR
3278 -      eval flag=\"$hardcode_libdir_flag_spec\"
3279 +    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
3280 +      echo "----------------------------------------------------------------------"
3281 +      echo "Libraries have been installed in:"
3282 +      for libdir in $libdirs; do
3283 +	$ECHO "   $libdir"
3284 +      done
3285 +      echo
3286 +      echo "If you ever happen to want to link against installed libraries"
3287 +      echo "in a given directory, LIBDIR, you must either use libtool, and"
3288 +      echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
3289 +      echo "flag during linking and do at least one of the following:"
3290 +      if test -n "$shlibpath_var"; then
3291 +	echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
3292 +	echo "     during execution"
3293 +      fi
3294 +      if test -n "$runpath_var"; then
3295 +	echo "   - add LIBDIR to the \`$runpath_var' environment variable"
3296 +	echo "     during linking"
3297 +      fi
3298 +      if test -n "$hardcode_libdir_flag_spec"; then
3299 +	libdir=LIBDIR
3300 +	eval flag=\"$hardcode_libdir_flag_spec\"
3301  
3302 -      $ECHO "   - use the \`$flag' linker flag"
3303 -    fi
3304 -    if test -n "$admincmds"; then
3305 -      $ECHO "   - have your system administrator run these commands:$admincmds"
3306 -    fi
3307 -    if test -f /etc/ld.so.conf; then
3308 -      echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
3309 -    fi
3310 -    echo
3311 +	$ECHO "   - use the \`$flag' linker flag"
3312 +      fi
3313 +      if test -n "$admincmds"; then
3314 +	$ECHO "   - have your system administrator run these commands:$admincmds"
3315 +      fi
3316 +      if test -f /etc/ld.so.conf; then
3317 +	echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
3318 +      fi
3319 +      echo
3320  
3321 -    echo "See any operating system documentation about shared libraries for"
3322 -    case $host in
3323 -      solaris2.[6789]|solaris2.1[0-9])
3324 -        echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
3325 -	echo "pages."
3326 -	;;
3327 -      *)
3328 -        echo "more information, such as the ld(1) and ld.so(8) manual pages."
3329 -        ;;
3330 -    esac
3331 -    echo "----------------------------------------------------------------------"
3332 +      echo "See any operating system documentation about shared libraries for"
3333 +      case $host in
3334 +	solaris2.[6789]|solaris2.1[0-9])
3335 +	  echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
3336 +	  echo "pages."
3337 +	  ;;
3338 +	*)
3339 +	  echo "more information, such as the ld(1) and ld.so(8) manual pages."
3340 +	  ;;
3341 +      esac
3342 +      echo "----------------------------------------------------------------------"
3343 +    fi
3344      exit $EXIT_SUCCESS
3345  }
3346  
3347 -test "$mode" = finish && func_mode_finish ${1+"$@"}
3348 +test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
3349  
3350  
3351  # func_mode_install arg...
3352 @@ -2066,7 +2787,7 @@
3353      # The real first argument should be the name of the installation program.
3354      # Aesthetically quote it.
3355      func_quote_for_eval "$arg"
3356 -    install_prog="$install_prog$func_quote_for_eval_result"
3357 +    func_append install_prog "$func_quote_for_eval_result"
3358      install_shared_prog=$install_prog
3359      case " $install_prog " in
3360        *[\\\ /]cp\ *) install_cp=: ;;
3361 @@ -2086,7 +2807,7 @@
3362      do
3363        arg2=
3364        if test -n "$dest"; then
3365 -	files="$files $dest"
3366 +	func_append files " $dest"
3367  	dest=$arg
3368  	continue
3369        fi
3370 @@ -2124,11 +2845,11 @@
3371  
3372        # Aesthetically quote the argument.
3373        func_quote_for_eval "$arg"
3374 -      install_prog="$install_prog $func_quote_for_eval_result"
3375 +      func_append install_prog " $func_quote_for_eval_result"
3376        if test -n "$arg2"; then
3377  	func_quote_for_eval "$arg2"
3378        fi
3379 -      install_shared_prog="$install_shared_prog $func_quote_for_eval_result"
3380 +      func_append install_shared_prog " $func_quote_for_eval_result"
3381      done
3382  
3383      test -z "$install_prog" && \
3384 @@ -2140,7 +2861,7 @@
3385      if test -n "$install_override_mode" && $no_mode; then
3386        if $install_cp; then :; else
3387  	func_quote_for_eval "$install_override_mode"
3388 -	install_shared_prog="$install_shared_prog -m $func_quote_for_eval_result"
3389 +	func_append install_shared_prog " -m $func_quote_for_eval_result"
3390        fi
3391      fi
3392  
3393 @@ -2198,10 +2919,13 @@
3394        case $file in
3395        *.$libext)
3396  	# Do the static libraries later.
3397 -	staticlibs="$staticlibs $file"
3398 +	func_append staticlibs " $file"
3399  	;;
3400  
3401        *.la)
3402 +	func_resolve_sysroot "$file"
3403 +	file=$func_resolve_sysroot_result
3404 +
3405  	# Check to see that this really is a libtool archive.
3406  	func_lalib_unsafe_p "$file" \
3407  	  || func_fatal_help "\`$file' is not a valid libtool archive"
3408 @@ -2215,19 +2939,19 @@
3409  	if test "X$destdir" = "X$libdir"; then
3410  	  case "$current_libdirs " in
3411  	  *" $libdir "*) ;;
3412 -	  *) current_libdirs="$current_libdirs $libdir" ;;
3413 +	  *) func_append current_libdirs " $libdir" ;;
3414  	  esac
3415  	else
3416  	  # Note the libdir as a future libdir.
3417  	  case "$future_libdirs " in
3418  	  *" $libdir "*) ;;
3419 -	  *) future_libdirs="$future_libdirs $libdir" ;;
3420 +	  *) func_append future_libdirs " $libdir" ;;
3421  	  esac
3422  	fi
3423  
3424  	func_dirname "$file" "/" ""
3425  	dir="$func_dirname_result"
3426 -	dir="$dir$objdir"
3427 +	func_append dir "$objdir"
3428  
3429  	if test -n "$relink_command"; then
3430  	  # Determine the prefix the user has applied to our future dir.
3431 @@ -2304,7 +3028,7 @@
3432  	func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
3433  
3434  	# Maybe install the static library, too.
3435 -	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
3436 +	test -n "$old_library" && func_append staticlibs " $dir/$old_library"
3437  	;;
3438  
3439        *.lo)
3440 @@ -2478,11 +3202,13 @@
3441  
3442        # Set up the ranlib parameters.
3443        oldlib="$destdir/$name"
3444 +      func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
3445 +      tool_oldlib=$func_to_tool_file_result
3446  
3447        func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
3448  
3449        if test -n "$stripme" && test -n "$old_striplib"; then
3450 -	func_show_eval "$old_striplib $oldlib" 'exit $?'
3451 +	func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
3452        fi
3453  
3454        # Do each command in the postinstall commands.
3455 @@ -2501,7 +3227,7 @@
3456      fi
3457  }
3458  
3459 -test "$mode" = install && func_mode_install ${1+"$@"}
3460 +test "$opt_mode" = install && func_mode_install ${1+"$@"}
3461  
3462  
3463  # func_generate_dlsyms outputname originator pic_p
3464 @@ -2548,6 +3274,18 @@
3465  #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
3466  #endif
3467  
3468 +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
3469 +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3470 +/* DATA imports from DLLs on WIN32 con't be const, because runtime
3471 +   relocations are performed -- see ld's documentation on pseudo-relocs.  */
3472 +# define LT_DLSYM_CONST
3473 +#elif defined(__osf__)
3474 +/* This system does not cope well with relocations in const data.  */
3475 +# define LT_DLSYM_CONST
3476 +#else
3477 +# define LT_DLSYM_CONST const
3478 +#endif
3479 +
3480  /* External symbol declarations for the compiler. */\
3481  "
3482  
3483 @@ -2559,8 +3297,9 @@
3484  	  # Add our own program objects to the symbol list.
3485  	  progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
3486  	  for progfile in $progfiles; do
3487 -	    func_verbose "extracting global C symbols from \`$progfile'"
3488 -	    $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
3489 +	    func_to_tool_file "$progfile" func_convert_file_msys_to_w32
3490 +	    func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
3491 +	    $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
3492  	  done
3493  
3494  	  if test -n "$exclude_expsyms"; then
3495 @@ -2609,10 +3348,52 @@
3496  	  func_verbose "extracting global C symbols from \`$dlprefile'"
3497  	  func_basename "$dlprefile"
3498  	  name="$func_basename_result"
3499 -	  $opt_dry_run || {
3500 -	    eval '$ECHO ": $name " >> "$nlist"'
3501 -	    eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
3502 -	  }
3503 +          case $host in
3504 +	    *cygwin* | *mingw* | *cegcc* )
3505 +	      # if an import library, we need to obtain dlname
3506 +	      if func_win32_import_lib_p "$dlprefile"; then
3507 +	        func_tr_sh "$dlprefile"
3508 +	        eval "curr_lafile=\$libfile_$func_tr_sh_result"
3509 +	        dlprefile_dlbasename=""
3510 +	        if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
3511 +	          # Use subshell, to avoid clobbering current variable values
3512 +	          dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
3513 +	          if test -n "$dlprefile_dlname" ; then
3514 +	            func_basename "$dlprefile_dlname"
3515 +	            dlprefile_dlbasename="$func_basename_result"
3516 +	          else
3517 +	            # no lafile. user explicitly requested -dlpreopen <import library>.
3518 +	            $sharedlib_from_linklib_cmd "$dlprefile"
3519 +	            dlprefile_dlbasename=$sharedlib_from_linklib_result
3520 +	          fi
3521 +	        fi
3522 +	        $opt_dry_run || {
3523 +	          if test -n "$dlprefile_dlbasename" ; then
3524 +	            eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
3525 +	          else
3526 +	            func_warning "Could not compute DLL name from $name"
3527 +	            eval '$ECHO ": $name " >> "$nlist"'
3528 +	          fi
3529 +	          func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3530 +	          eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
3531 +	            $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
3532 +	        }
3533 +	      else # not an import lib
3534 +	        $opt_dry_run || {
3535 +	          eval '$ECHO ": $name " >> "$nlist"'
3536 +	          func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3537 +	          eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
3538 +	        }
3539 +	      fi
3540 +	    ;;
3541 +	    *)
3542 +	      $opt_dry_run || {
3543 +	        eval '$ECHO ": $name " >> "$nlist"'
3544 +	        func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3545 +	        eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
3546 +	      }
3547 +	    ;;
3548 +          esac
3549  	done
3550  
3551  	$opt_dry_run || {
3552 @@ -2650,26 +3431,9 @@
3553    const char *name;
3554    void *address;
3555  } lt_dlsymlist;
3556 -"
3557 -	  case $host in
3558 -	  *cygwin* | *mingw* | *cegcc* )
3559 -	    echo >> "$output_objdir/$my_dlsyms" "\
3560 -/* DATA imports from DLLs on WIN32 con't be const, because
3561 -   runtime relocations are performed -- see ld's documentation
3562 -   on pseudo-relocs.  */"
3563 -	    lt_dlsym_const= ;;
3564 -	  *osf5*)
3565 -	    echo >> "$output_objdir/$my_dlsyms" "\
3566 -/* This system does not cope well with relocations in const data */"
3567 -	    lt_dlsym_const= ;;
3568 -	  *)
3569 -	    lt_dlsym_const=const ;;
3570 -	  esac
3571 -
3572 -	  echo >> "$output_objdir/$my_dlsyms" "\
3573 -extern $lt_dlsym_const lt_dlsymlist
3574 +extern LT_DLSYM_CONST lt_dlsymlist
3575  lt_${my_prefix}_LTX_preloaded_symbols[];
3576 -$lt_dlsym_const lt_dlsymlist
3577 +LT_DLSYM_CONST lt_dlsymlist
3578  lt_${my_prefix}_LTX_preloaded_symbols[] =
3579  {\
3580    { \"$my_originator\", (void *) 0 },"
3581 @@ -2709,7 +3473,7 @@
3582  	  # linked before any other PIC object.  But we must not use
3583  	  # pic_flag when linking with -static.  The problem exists in
3584  	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
3585 -	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
3586 +	  *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
3587  	    pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
3588  	  *-*-hpux*)
3589  	    pic_flag_for_symtable=" $pic_flag"  ;;
3590 @@ -2725,7 +3489,7 @@
3591  	for arg in $LTCFLAGS; do
3592  	  case $arg in
3593  	  -pie | -fpie | -fPIE) ;;
3594 -	  *) symtab_cflags="$symtab_cflags $arg" ;;
3595 +	  *) func_append symtab_cflags " $arg" ;;
3596  	  esac
3597  	done
3598  
3599 @@ -2788,7 +3552,8 @@
3600      # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
3601      if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
3602         $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
3603 -      win32_nmres=`eval $NM -f posix -A $1 |
3604 +      func_to_tool_file "$1" func_convert_file_msys_to_w32
3605 +      win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
3606  	$SED -n -e '
3607  	    1,100{
3608  		/ I /{
3609 @@ -2817,6 +3582,131 @@
3610    $ECHO "$win32_libid_type"
3611  }
3612  
3613 +# func_cygming_dll_for_implib ARG
3614 +#
3615 +# Platform-specific function to extract the
3616 +# name of the DLL associated with the specified
3617 +# import library ARG.
3618 +# Invoked by eval'ing the libtool variable
3619 +#    $sharedlib_from_linklib_cmd
3620 +# Result is available in the variable
3621 +#    $sharedlib_from_linklib_result
3622 +func_cygming_dll_for_implib ()
3623 +{
3624 +  $opt_debug
3625 +  sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
3626 +}
3627 +
3628 +# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
3629 +#
3630 +# The is the core of a fallback implementation of a
3631 +# platform-specific function to extract the name of the
3632 +# DLL associated with the specified import library LIBNAME.
3633 +#
3634 +# SECTION_NAME is either .idata$6 or .idata$7, depending
3635 +# on the platform and compiler that created the implib.
3636 +#
3637 +# Echos the name of the DLL associated with the
3638 +# specified import library.
3639 +func_cygming_dll_for_implib_fallback_core ()
3640 +{
3641 +  $opt_debug
3642 +  match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
3643 +  $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
3644 +    $SED '/^Contents of section '"$match_literal"':/{
3645 +      # Place marker at beginning of archive member dllname section
3646 +      s/.*/====MARK====/
3647 +      p
3648 +      d
3649 +    }
3650 +    # These lines can sometimes be longer than 43 characters, but
3651 +    # are always uninteresting
3652 +    /:[	 ]*file format pe[i]\{,1\}-/d
3653 +    /^In archive [^:]*:/d
3654 +    # Ensure marker is printed
3655 +    /^====MARK====/p
3656 +    # Remove all lines with less than 43 characters
3657 +    /^.\{43\}/!d
3658 +    # From remaining lines, remove first 43 characters
3659 +    s/^.\{43\}//' |
3660 +    $SED -n '
3661 +      # Join marker and all lines until next marker into a single line
3662 +      /^====MARK====/ b para
3663 +      H
3664 +      $ b para
3665 +      b
3666 +      :para
3667 +      x
3668 +      s/\n//g
3669 +      # Remove the marker
3670 +      s/^====MARK====//
3671 +      # Remove trailing dots and whitespace
3672 +      s/[\. \t]*$//
3673 +      # Print
3674 +      /./p' |
3675 +    # we now have a list, one entry per line, of the stringified
3676 +    # contents of the appropriate section of all members of the
3677 +    # archive which possess that section. Heuristic: eliminate
3678 +    # all those which have a first or second character that is
3679 +    # a '.' (that is, objdump's representation of an unprintable
3680 +    # character.) This should work for all archives with less than
3681 +    # 0x302f exports -- but will fail for DLLs whose name actually
3682 +    # begins with a literal '.' or a single character followed by
3683 +    # a '.'.
3684 +    #
3685 +    # Of those that remain, print the first one.
3686 +    $SED -e '/^\./d;/^.\./d;q'
3687 +}
3688 +
3689 +# func_cygming_gnu_implib_p ARG
3690 +# This predicate returns with zero status (TRUE) if
3691 +# ARG is a GNU/binutils-style import library. Returns
3692 +# with nonzero status (FALSE) otherwise.
3693 +func_cygming_gnu_implib_p ()
3694 +{
3695 +  $opt_debug
3696 +  func_to_tool_file "$1" func_convert_file_msys_to_w32
3697 +  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)$'`
3698 +  test -n "$func_cygming_gnu_implib_tmp"
3699 +}
3700 +
3701 +# func_cygming_ms_implib_p ARG
3702 +# This predicate returns with zero status (TRUE) if
3703 +# ARG is an MS-style import library. Returns
3704 +# with nonzero status (FALSE) otherwise.
3705 +func_cygming_ms_implib_p ()
3706 +{
3707 +  $opt_debug
3708 +  func_to_tool_file "$1" func_convert_file_msys_to_w32
3709 +  func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
3710 +  test -n "$func_cygming_ms_implib_tmp"
3711 +}
3712 +
3713 +# func_cygming_dll_for_implib_fallback ARG
3714 +# Platform-specific function to extract the
3715 +# name of the DLL associated with the specified
3716 +# import library ARG.
3717 +#
3718 +# This fallback implementation is for use when $DLLTOOL
3719 +# does not support the --identify-strict option.
3720 +# Invoked by eval'ing the libtool variable
3721 +#    $sharedlib_from_linklib_cmd
3722 +# Result is available in the variable
3723 +#    $sharedlib_from_linklib_result
3724 +func_cygming_dll_for_implib_fallback ()
3725 +{
3726 +  $opt_debug
3727 +  if func_cygming_gnu_implib_p "$1" ; then
3728 +    # binutils import library
3729 +    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
3730 +  elif func_cygming_ms_implib_p "$1" ; then
3731 +    # ms-generated import library
3732 +    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
3733 +  else
3734 +    # unknown
3735 +    sharedlib_from_linklib_result=""
3736 +  fi
3737 +}
3738  
3739  
3740  # func_extract_an_archive dir oldlib
3741 @@ -3095,14 +3985,17 @@
3742  # launches target application with the remaining arguments.
3743  func_exec_program ()
3744  {
3745 -  for lt_wr_arg
3746 -  do
3747 -    case \$lt_wr_arg in
3748 -    --lt-*) ;;
3749 -    *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
3750 -    esac
3751 -    shift
3752 -  done
3753 +  case \" \$* \" in
3754 +  *\\ --lt-*)
3755 +    for lt_wr_arg
3756 +    do
3757 +      case \$lt_wr_arg in
3758 +      --lt-*) ;;
3759 +      *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
3760 +      esac
3761 +      shift
3762 +    done ;;
3763 +  esac
3764    func_exec_program_core \${1+\"\$@\"}
3765  }
3766  
3767 @@ -3195,6 +4088,18 @@
3768  
3769    if test -f \"\$progdir/\$program\"; then"
3770  
3771 +	# fixup the dll searchpath if we need to.
3772 +	#
3773 +	# Fix the DLL searchpath if we need to.  Do this before prepending
3774 +	# to shlibpath, because on Windows, both are PATH and uninstalled
3775 +	# libraries must come first.
3776 +	if test -n "$dllsearchpath"; then
3777 +	  $ECHO "\
3778 +    # Add the dll search path components to the executable PATH
3779 +    PATH=$dllsearchpath:\$PATH
3780 +"
3781 +	fi
3782 +
3783  	# Export our shlibpath_var if we have one.
3784  	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
3785  	  $ECHO "\
3786 @@ -3209,14 +4114,6 @@
3787  "
3788  	fi
3789  
3790 -	# fixup the dll searchpath if we need to.
3791 -	if test -n "$dllsearchpath"; then
3792 -	  $ECHO "\
3793 -    # Add the dll search path components to the executable PATH
3794 -    PATH=$dllsearchpath:\$PATH
3795 -"
3796 -	fi
3797 -
3798  	$ECHO "\
3799      if test \"\$libtool_execute_magic\" != \"$magic\"; then
3800        # Run the actual program with our arguments.
3801 @@ -3234,166 +4131,6 @@
3802  }
3803  
3804  
3805 -# func_to_host_path arg
3806 -#
3807 -# Convert paths to host format when used with build tools.
3808 -# Intended for use with "native" mingw (where libtool itself
3809 -# is running under the msys shell), or in the following cross-
3810 -# build environments:
3811 -#    $build          $host
3812 -#    mingw (msys)    mingw  [e.g. native]
3813 -#    cygwin          mingw
3814 -#    *nix + wine     mingw
3815 -# where wine is equipped with the `winepath' executable.
3816 -# In the native mingw case, the (msys) shell automatically
3817 -# converts paths for any non-msys applications it launches,
3818 -# but that facility isn't available from inside the cwrapper.
3819 -# Similar accommodations are necessary for $host mingw and
3820 -# $build cygwin.  Calling this function does no harm for other
3821 -# $host/$build combinations not listed above.
3822 -#
3823 -# ARG is the path (on $build) that should be converted to
3824 -# the proper representation for $host. The result is stored
3825 -# in $func_to_host_path_result.
3826 -func_to_host_path ()
3827 -{
3828 -  func_to_host_path_result="$1"
3829 -  if test -n "$1"; then
3830 -    case $host in
3831 -      *mingw* )
3832 -        lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
3833 -        case $build in
3834 -          *mingw* ) # actually, msys
3835 -            # awkward: cmd appends spaces to result
3836 -            func_to_host_path_result=`( cmd //c echo "$1" ) 2>/dev/null |
3837 -              $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
3838 -            ;;
3839 -          *cygwin* )
3840 -            func_to_host_path_result=`cygpath -w "$1" |
3841 -	      $SED -e "$lt_sed_naive_backslashify"`
3842 -            ;;
3843 -          * )
3844 -            # Unfortunately, winepath does not exit with a non-zero
3845 -            # error code, so we are forced to check the contents of
3846 -            # stdout. On the other hand, if the command is not
3847 -            # found, the shell will set an exit code of 127 and print
3848 -            # *an error message* to stdout. So we must check for both
3849 -            # error code of zero AND non-empty stdout, which explains
3850 -            # the odd construction:
3851 -            func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
3852 -            if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
3853 -              func_to_host_path_result=`$ECHO "$func_to_host_path_tmp1" |
3854 -                $SED -e "$lt_sed_naive_backslashify"`
3855 -            else
3856 -              # Allow warning below.
3857 -              func_to_host_path_result=
3858 -            fi
3859 -            ;;
3860 -        esac
3861 -        if test -z "$func_to_host_path_result" ; then
3862 -          func_error "Could not determine host path corresponding to"
3863 -          func_error "  \`$1'"
3864 -          func_error "Continuing, but uninstalled executables may not work."
3865 -          # Fallback:
3866 -          func_to_host_path_result="$1"
3867 -        fi
3868 -        ;;
3869 -    esac
3870 -  fi
3871 -}
3872 -# end: func_to_host_path
3873 -
3874 -# func_to_host_pathlist arg
3875 -#
3876 -# Convert pathlists to host format when used with build tools.
3877 -# See func_to_host_path(), above. This function supports the
3878 -# following $build/$host combinations (but does no harm for
3879 -# combinations not listed here):
3880 -#    $build          $host
3881 -#    mingw (msys)    mingw  [e.g. native]
3882 -#    cygwin          mingw
3883 -#    *nix + wine     mingw
3884 -#
3885 -# Path separators are also converted from $build format to
3886 -# $host format. If ARG begins or ends with a path separator
3887 -# character, it is preserved (but converted to $host format)
3888 -# on output.
3889 -#
3890 -# ARG is a pathlist (on $build) that should be converted to
3891 -# the proper representation on $host. The result is stored
3892 -# in $func_to_host_pathlist_result.
3893 -func_to_host_pathlist ()
3894 -{
3895 -  func_to_host_pathlist_result="$1"
3896 -  if test -n "$1"; then
3897 -    case $host in
3898 -      *mingw* )
3899 -        lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
3900 -        # Remove leading and trailing path separator characters from
3901 -        # ARG. msys behavior is inconsistent here, cygpath turns them
3902 -        # into '.;' and ';.', and winepath ignores them completely.
3903 -	func_stripname : : "$1"
3904 -        func_to_host_pathlist_tmp1=$func_stripname_result
3905 -        case $build in
3906 -          *mingw* ) # Actually, msys.
3907 -            # Awkward: cmd appends spaces to result.
3908 -            func_to_host_pathlist_result=`
3909 -	      ( cmd //c echo "$func_to_host_pathlist_tmp1" ) 2>/dev/null |
3910 -	      $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
3911 -            ;;
3912 -          *cygwin* )
3913 -            func_to_host_pathlist_result=`cygpath -w -p "$func_to_host_pathlist_tmp1" |
3914 -              $SED -e "$lt_sed_naive_backslashify"`
3915 -            ;;
3916 -          * )
3917 -            # unfortunately, winepath doesn't convert pathlists
3918 -            func_to_host_pathlist_result=""
3919 -            func_to_host_pathlist_oldIFS=$IFS
3920 -            IFS=:
3921 -            for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
3922 -              IFS=$func_to_host_pathlist_oldIFS
3923 -              if test -n "$func_to_host_pathlist_f" ; then
3924 -                func_to_host_path "$func_to_host_pathlist_f"
3925 -                if test -n "$func_to_host_path_result" ; then
3926 -                  if test -z "$func_to_host_pathlist_result" ; then
3927 -                    func_to_host_pathlist_result="$func_to_host_path_result"
3928 -                  else
3929 -                    func_append func_to_host_pathlist_result ";$func_to_host_path_result"
3930 -                  fi
3931 -                fi
3932 -              fi
3933 -            done
3934 -            IFS=$func_to_host_pathlist_oldIFS
3935 -            ;;
3936 -        esac
3937 -        if test -z "$func_to_host_pathlist_result"; then
3938 -          func_error "Could not determine the host path(s) corresponding to"
3939 -          func_error "  \`$1'"
3940 -          func_error "Continuing, but uninstalled executables may not work."
3941 -          # Fallback. This may break if $1 contains DOS-style drive
3942 -          # specifications. The fix is not to complicate the expression
3943 -          # below, but for the user to provide a working wine installation
3944 -          # with winepath so that path translation in the cross-to-mingw
3945 -          # case works properly.
3946 -          lt_replace_pathsep_nix_to_dos="s|:|;|g"
3947 -          func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
3948 -            $SED -e "$lt_replace_pathsep_nix_to_dos"`
3949 -        fi
3950 -        # Now, add the leading and trailing path separators back
3951 -        case "$1" in
3952 -          :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
3953 -            ;;
3954 -        esac
3955 -        case "$1" in
3956 -          *: ) func_append func_to_host_pathlist_result ";"
3957 -            ;;
3958 -        esac
3959 -        ;;
3960 -    esac
3961 -  fi
3962 -}
3963 -# end: func_to_host_pathlist
3964 -
3965  # func_emit_cwrapperexe_src
3966  # emit the source code for a wrapper executable on stdout
3967  # Must ONLY be called from within func_mode_link because
3968 @@ -3563,14 +4300,14 @@
3969  EOF
3970  
3971  	    cat <<EOF
3972 -const char * MAGIC_EXE = "$magic_exe";
3973 +volatile const char * MAGIC_EXE = "$magic_exe";
3974  const char * LIB_PATH_VARNAME = "$shlibpath_var";
3975  EOF
3976  
3977  	    if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
3978 -              func_to_host_pathlist "$temp_rpath"
3979 +              func_to_host_path "$temp_rpath"
3980  	      cat <<EOF
3981 -const char * LIB_PATH_VALUE   = "$func_to_host_pathlist_result";
3982 +const char * LIB_PATH_VALUE   = "$func_to_host_path_result";
3983  EOF
3984  	    else
3985  	      cat <<"EOF"
3986 @@ -3579,10 +4316,10 @@
3987  	    fi
3988  
3989  	    if test -n "$dllsearchpath"; then
3990 -              func_to_host_pathlist "$dllsearchpath:"
3991 +              func_to_host_path "$dllsearchpath:"
3992  	      cat <<EOF
3993  const char * EXE_PATH_VARNAME = "PATH";
3994 -const char * EXE_PATH_VALUE   = "$func_to_host_pathlist_result";
3995 +const char * EXE_PATH_VALUE   = "$func_to_host_path_result";
3996  EOF
3997  	    else
3998  	      cat <<"EOF"
3999 @@ -3765,8 +4502,12 @@
4000  
4001    lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
4002    lt_setenv ("DUALCASE", "1");  /* for MSK sh */
4003 -  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
4004 +  /* Update the DLL searchpath.  EXE_PATH_VALUE ($dllsearchpath) must
4005 +     be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
4006 +     because on Windows, both *_VARNAMEs are PATH but uninstalled
4007 +     libraries must come first. */
4008    lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
4009 +  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
4010  
4011    lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
4012  		  nonnull (lt_argv_zero));
4013 @@ -4322,9 +5063,15 @@
4014  {
4015  EOF
4016  	    func_emit_wrapper yes |
4017 -              $SED -e 's/\([\\"]\)/\\\1/g' \
4018 -	           -e 's/^/  fputs ("/' -e 's/$/\\n", f);/'
4019 -
4020 +	      $SED -n -e '
4021 +s/^\(.\{79\}\)\(..*\)/\1\
4022 +\2/
4023 +h
4024 +s/\([\\"]\)/\\\1/g
4025 +s/$/\\n/
4026 +s/\([^\n]*\).*/  fputs ("\1", f);/p
4027 +g
4028 +D'
4029              cat <<"EOF"
4030  }
4031  EOF
4032 @@ -4515,9 +5262,9 @@
4033  	    ;;
4034  	  *)
4035  	    if test "$prev" = dlfiles; then
4036 -	      dlfiles="$dlfiles $arg"
4037 +	      func_append dlfiles " $arg"
4038  	    else
4039 -	      dlprefiles="$dlprefiles $arg"
4040 +	      func_append dlprefiles " $arg"
4041  	    fi
4042  	    prev=
4043  	    continue
4044 @@ -4541,7 +5288,7 @@
4045  	    *-*-darwin*)
4046  	      case "$deplibs " in
4047  		*" $qarg.ltframework "*) ;;
4048 -		*) deplibs="$deplibs $qarg.ltframework" # this is fixed later
4049 +		*) func_append deplibs " $qarg.ltframework" # this is fixed later
4050  		   ;;
4051  	      esac
4052  	      ;;
4053 @@ -4560,7 +5307,7 @@
4054  	    moreargs=
4055  	    for fil in `cat "$save_arg"`
4056  	    do
4057 -#	      moreargs="$moreargs $fil"
4058 +#	      func_append moreargs " $fil"
4059  	      arg=$fil
4060  	      # A libtool-controlled object.
4061  
4062 @@ -4589,7 +5336,7 @@
4063  
4064  		  if test "$prev" = dlfiles; then
4065  		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
4066 -		      dlfiles="$dlfiles $pic_object"
4067 +		      func_append dlfiles " $pic_object"
4068  		      prev=
4069  		      continue
4070  		    else
4071 @@ -4601,7 +5348,7 @@
4072  		  # CHECK ME:  I think I busted this.  -Ossama
4073  		  if test "$prev" = dlprefiles; then
4074  		    # Preload the old-style object.
4075 -		    dlprefiles="$dlprefiles $pic_object"
4076 +		    func_append dlprefiles " $pic_object"
4077  		    prev=
4078  		  fi
4079  
4080 @@ -4671,12 +5418,12 @@
4081  	  if test "$prev" = rpath; then
4082  	    case "$rpath " in
4083  	    *" $arg "*) ;;
4084 -	    *) rpath="$rpath $arg" ;;
4085 +	    *) func_append rpath " $arg" ;;
4086  	    esac
4087  	  else
4088  	    case "$xrpath " in
4089  	    *" $arg "*) ;;
4090 -	    *) xrpath="$xrpath $arg" ;;
4091 +	    *) func_append xrpath " $arg" ;;
4092  	    esac
4093  	  fi
4094  	  prev=
4095 @@ -4688,28 +5435,28 @@
4096  	  continue
4097  	  ;;
4098  	weak)
4099 -	  weak_libs="$weak_libs $arg"
4100 +	  func_append weak_libs " $arg"
4101  	  prev=
4102  	  continue
4103  	  ;;
4104  	xcclinker)
4105 -	  linker_flags="$linker_flags $qarg"
4106 -	  compiler_flags="$compiler_flags $qarg"
4107 +	  func_append linker_flags " $qarg"
4108 +	  func_append compiler_flags " $qarg"
4109  	  prev=
4110  	  func_append compile_command " $qarg"
4111  	  func_append finalize_command " $qarg"
4112  	  continue
4113  	  ;;
4114  	xcompiler)
4115 -	  compiler_flags="$compiler_flags $qarg"
4116 +	  func_append compiler_flags " $qarg"
4117  	  prev=
4118  	  func_append compile_command " $qarg"
4119  	  func_append finalize_command " $qarg"
4120  	  continue
4121  	  ;;
4122  	xlinker)
4123 -	  linker_flags="$linker_flags $qarg"
4124 -	  compiler_flags="$compiler_flags $wl$qarg"
4125 +	  func_append linker_flags " $qarg"
4126 +	  func_append compiler_flags " $wl$qarg"
4127  	  prev=
4128  	  func_append compile_command " $wl$qarg"
4129  	  func_append finalize_command " $wl$qarg"
4130 @@ -4800,15 +5547,16 @@
4131  	;;
4132  
4133        -L*)
4134 -	func_stripname '-L' '' "$arg"
4135 -	dir=$func_stripname_result
4136 -	if test -z "$dir"; then
4137 +	func_stripname "-L" '' "$arg"
4138 +	if test -z "$func_stripname_result"; then
4139  	  if test "$#" -gt 0; then
4140  	    func_fatal_error "require no space between \`-L' and \`$1'"
4141  	  else
4142  	    func_fatal_error "need path for \`-L' option"
4143  	  fi
4144  	fi
4145 +	func_resolve_sysroot "$func_stripname_result"
4146 +	dir=$func_resolve_sysroot_result
4147  	# We need an absolute path.
4148  	case $dir in
4149  	[\\/]* | [A-Za-z]:[\\/]*) ;;
4150 @@ -4820,10 +5568,16 @@
4151  	  ;;
4152  	esac
4153  	case "$deplibs " in
4154 -	*" -L$dir "*) ;;
4155 +	*" -L$dir "* | *" $arg "*)
4156 +	  # Will only happen for absolute or sysroot arguments
4157 +	  ;;
4158  	*)
4159 -	  deplibs="$deplibs -L$dir"
4160 -	  lib_search_path="$lib_search_path $dir"
4161 +	  # Preserve sysroot, but never include relative directories
4162 +	  case $dir in
4163 +	    [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
4164 +	    *) func_append deplibs " -L$dir" ;;
4165 +	  esac
4166 +	  func_append lib_search_path " $dir"
4167  	  ;;
4168  	esac
4169  	case $host in
4170 @@ -4832,12 +5586,12 @@
4171  	  case :$dllsearchpath: in
4172  	  *":$dir:"*) ;;
4173  	  ::) dllsearchpath=$dir;;
4174 -	  *) dllsearchpath="$dllsearchpath:$dir";;
4175 +	  *) func_append dllsearchpath ":$dir";;
4176  	  esac
4177  	  case :$dllsearchpath: in
4178  	  *":$testbindir:"*) ;;
4179  	  ::) dllsearchpath=$testbindir;;
4180 -	  *) dllsearchpath="$dllsearchpath:$testbindir";;
4181 +	  *) func_append dllsearchpath ":$testbindir";;
4182  	  esac
4183  	  ;;
4184  	esac
4185 @@ -4861,7 +5615,7 @@
4186  	    ;;
4187  	  *-*-rhapsody* | *-*-darwin1.[012])
4188  	    # Rhapsody C and math libraries are in the System framework
4189 -	    deplibs="$deplibs System.ltframework"
4190 +	    func_append deplibs " System.ltframework"
4191  	    continue
4192  	    ;;
4193  	  *-*-sco3.2v5* | *-*-sco5v6*)
4194 @@ -4881,7 +5635,7 @@
4195  	   ;;
4196  	 esac
4197  	fi
4198 -	deplibs="$deplibs $arg"
4199 +	func_append deplibs " $arg"
4200  	continue
4201  	;;
4202  
4203 @@ -4893,21 +5647,22 @@
4204        # Tru64 UNIX uses -model [arg] to determine the layout of C++
4205        # classes, name mangling, and exception handling.
4206        # Darwin uses the -arch flag to determine output architecture.
4207 -      -model|-arch|-isysroot)
4208 -	compiler_flags="$compiler_flags $arg"
4209 +      -model|-arch|-isysroot|--sysroot)
4210 +	func_append compiler_flags " $arg"
4211  	func_append compile_command " $arg"
4212  	func_append finalize_command " $arg"
4213  	prev=xcompiler
4214  	continue
4215  	;;
4216  
4217 -      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
4218 -	compiler_flags="$compiler_flags $arg"
4219 +      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
4220 +      |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
4221 +	func_append compiler_flags " $arg"
4222  	func_append compile_command " $arg"
4223  	func_append finalize_command " $arg"
4224  	case "$new_inherited_linker_flags " in
4225  	    *" $arg "*) ;;
4226 -	    * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
4227 +	    * ) func_append new_inherited_linker_flags " $arg" ;;
4228  	esac
4229  	continue
4230  	;;
4231 @@ -4974,13 +5729,17 @@
4232  	# We need an absolute path.
4233  	case $dir in
4234  	[\\/]* | [A-Za-z]:[\\/]*) ;;
4235 +	=*)
4236 +	  func_stripname '=' '' "$dir"
4237 +	  dir=$lt_sysroot$func_stripname_result
4238 +	  ;;
4239  	*)
4240  	  func_fatal_error "only absolute run-paths are allowed"
4241  	  ;;
4242  	esac
4243  	case "$xrpath " in
4244  	*" $dir "*) ;;
4245 -	*) xrpath="$xrpath $dir" ;;
4246 +	*) func_append xrpath " $dir" ;;
4247  	esac
4248  	continue
4249  	;;
4250 @@ -5033,8 +5792,8 @@
4251  	for flag in $args; do
4252  	  IFS="$save_ifs"
4253            func_quote_for_eval "$flag"
4254 -	  arg="$arg $func_quote_for_eval_result"
4255 -	  compiler_flags="$compiler_flags $func_quote_for_eval_result"
4256 +	  func_append arg " $func_quote_for_eval_result"
4257 +	  func_append compiler_flags " $func_quote_for_eval_result"
4258  	done
4259  	IFS="$save_ifs"
4260  	func_stripname ' ' '' "$arg"
4261 @@ -5049,9 +5808,9 @@
4262  	for flag in $args; do
4263  	  IFS="$save_ifs"
4264            func_quote_for_eval "$flag"
4265 -	  arg="$arg $wl$func_quote_for_eval_result"
4266 -	  compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
4267 -	  linker_flags="$linker_flags $func_quote_for_eval_result"
4268 +	  func_append arg " $wl$func_quote_for_eval_result"
4269 +	  func_append compiler_flags " $wl$func_quote_for_eval_result"
4270 +	  func_append linker_flags " $func_quote_for_eval_result"
4271  	done
4272  	IFS="$save_ifs"
4273  	func_stripname ' ' '' "$arg"
4274 @@ -5090,13 +5849,16 @@
4275        # -p, -pg, --coverage, -fprofile-*  profiling flags for GCC
4276        # @file                GCC response files
4277        # -tp=*                Portland pgcc target processor selection
4278 +      # --sysroot=*          for sysroot support
4279 +      # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
4280        -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
4281 -      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*)
4282 +      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
4283 +      -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
4284          func_quote_for_eval "$arg"
4285  	arg="$func_quote_for_eval_result"
4286          func_append compile_command " $arg"
4287          func_append finalize_command " $arg"
4288 -        compiler_flags="$compiler_flags $arg"
4289 +        func_append compiler_flags " $arg"
4290          continue
4291          ;;
4292  
4293 @@ -5108,7 +5870,7 @@
4294  
4295        *.$objext)
4296  	# A standard object.
4297 -	objs="$objs $arg"
4298 +	func_append objs " $arg"
4299  	;;
4300  
4301        *.lo)
4302 @@ -5139,7 +5901,7 @@
4303  
4304  	    if test "$prev" = dlfiles; then
4305  	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
4306 -		dlfiles="$dlfiles $pic_object"
4307 +		func_append dlfiles " $pic_object"
4308  		prev=
4309  		continue
4310  	      else
4311 @@ -5151,7 +5913,7 @@
4312  	    # CHECK ME:  I think I busted this.  -Ossama
4313  	    if test "$prev" = dlprefiles; then
4314  	      # Preload the old-style object.
4315 -	      dlprefiles="$dlprefiles $pic_object"
4316 +	      func_append dlprefiles " $pic_object"
4317  	      prev=
4318  	    fi
4319  
4320 @@ -5196,24 +5958,25 @@
4321  
4322        *.$libext)
4323  	# An archive.
4324 -	deplibs="$deplibs $arg"
4325 -	old_deplibs="$old_deplibs $arg"
4326 +	func_append deplibs " $arg"
4327 +	func_append old_deplibs " $arg"
4328  	continue
4329  	;;
4330  
4331        *.la)
4332  	# A libtool-controlled library.
4333  
4334 +	func_resolve_sysroot "$arg"
4335  	if test "$prev" = dlfiles; then
4336  	  # This library was specified with -dlopen.
4337 -	  dlfiles="$dlfiles $arg"
4338 +	  func_append dlfiles " $func_resolve_sysroot_result"
4339  	  prev=
4340  	elif test "$prev" = dlprefiles; then
4341  	  # The library was specified with -dlpreopen.
4342 -	  dlprefiles="$dlprefiles $arg"
4343 +	  func_append dlprefiles " $func_resolve_sysroot_result"
4344  	  prev=
4345  	else
4346 -	  deplibs="$deplibs $arg"
4347 +	  func_append deplibs " $func_resolve_sysroot_result"
4348  	fi
4349  	continue
4350  	;;
4351 @@ -5260,6 +6023,8 @@
4352  
4353      func_dirname "$output" "/" ""
4354      output_objdir="$func_dirname_result$objdir"
4355 +    func_to_tool_file "$output_objdir/"
4356 +    tool_output_objdir=$func_to_tool_file_result
4357      # Create the object directory.
4358      func_mkdir_p "$output_objdir"
4359  
4360 @@ -5280,12 +6045,12 @@
4361      # Find all interdependent deplibs by searching for libraries
4362      # that are linked more than once (e.g. -la -lb -la)
4363      for deplib in $deplibs; do
4364 -      if $opt_duplicate_deps ; then
4365 +      if $opt_preserve_dup_deps ; then
4366  	case "$libs " in
4367 -	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
4368 +	*" $deplib "*) func_append specialdeplibs " $deplib" ;;
4369  	esac
4370        fi
4371 -      libs="$libs $deplib"
4372 +      func_append libs " $deplib"
4373      done
4374  
4375      if test "$linkmode" = lib; then
4376 @@ -5298,9 +6063,9 @@
4377        if $opt_duplicate_compiler_generated_deps; then
4378  	for pre_post_dep in $predeps $postdeps; do
4379  	  case "$pre_post_deps " in
4380 -	  *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
4381 +	  *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
4382  	  esac
4383 -	  pre_post_deps="$pre_post_deps $pre_post_dep"
4384 +	  func_append pre_post_deps " $pre_post_dep"
4385  	done
4386        fi
4387        pre_post_deps=
4388 @@ -5359,7 +6124,10 @@
4389  	case $pass in
4390  	dlopen) libs="$dlfiles" ;;
4391  	dlpreopen) libs="$dlprefiles" ;;
4392 -	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
4393 +	link)
4394 +	  libs="$deplibs %DEPLIBS%"
4395 +	  test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
4396 +	  ;;
4397  	esac
4398        fi
4399        if test "$linkmode,$pass" = "lib,dlpreopen"; then
4400 @@ -5367,8 +6135,9 @@
4401  	for lib in $dlprefiles; do
4402  	  # Ignore non-libtool-libs
4403  	  dependency_libs=
4404 +	  func_resolve_sysroot "$lib"
4405  	  case $lib in
4406 -	  *.la)	func_source "$lib" ;;
4407 +	  *.la)	func_source "$func_resolve_sysroot_result" ;;
4408  	  esac
4409  
4410  	  # Collect preopened libtool deplibs, except any this library
4411 @@ -5378,7 +6147,7 @@
4412              deplib_base=$func_basename_result
4413  	    case " $weak_libs " in
4414  	    *" $deplib_base "*) ;;
4415 -	    *) deplibs="$deplibs $deplib" ;;
4416 +	    *) func_append deplibs " $deplib" ;;
4417  	    esac
4418  	  done
4419  	done
4420 @@ -5394,16 +6163,17 @@
4421  	lib=
4422  	found=no
4423  	case $deplib in
4424 -	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
4425 +	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
4426 +        |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
4427  	  if test "$linkmode,$pass" = "prog,link"; then
4428  	    compile_deplibs="$deplib $compile_deplibs"
4429  	    finalize_deplibs="$deplib $finalize_deplibs"
4430  	  else
4431 -	    compiler_flags="$compiler_flags $deplib"
4432 +	    func_append compiler_flags " $deplib"
4433  	    if test "$linkmode" = lib ; then
4434  		case "$new_inherited_linker_flags " in
4435  		    *" $deplib "*) ;;
4436 -		    * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
4437 +		    * ) func_append new_inherited_linker_flags " $deplib" ;;
4438  		esac
4439  	    fi
4440  	  fi
4441 @@ -5488,7 +6258,7 @@
4442  	    if test "$linkmode" = lib ; then
4443  		case "$new_inherited_linker_flags " in
4444  		    *" $deplib "*) ;;
4445 -		    * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
4446 +		    * ) func_append new_inherited_linker_flags " $deplib" ;;
4447  		esac
4448  	    fi
4449  	  fi
4450 @@ -5501,7 +6271,8 @@
4451  	    test "$pass" = conv && continue
4452  	    newdependency_libs="$deplib $newdependency_libs"
4453  	    func_stripname '-L' '' "$deplib"
4454 -	    newlib_search_path="$newlib_search_path $func_stripname_result"
4455 +	    func_resolve_sysroot "$func_stripname_result"
4456 +	    func_append newlib_search_path " $func_resolve_sysroot_result"
4457  	    ;;
4458  	  prog)
4459  	    if test "$pass" = conv; then
4460 @@ -5515,7 +6286,8 @@
4461  	      finalize_deplibs="$deplib $finalize_deplibs"
4462  	    fi
4463  	    func_stripname '-L' '' "$deplib"
4464 -	    newlib_search_path="$newlib_search_path $func_stripname_result"
4465 +	    func_resolve_sysroot "$func_stripname_result"
4466 +	    func_append newlib_search_path " $func_resolve_sysroot_result"
4467  	    ;;
4468  	  *)
4469  	    func_warning "\`-L' is ignored for archives/objects"
4470 @@ -5526,17 +6298,21 @@
4471  	-R*)
4472  	  if test "$pass" = link; then
4473  	    func_stripname '-R' '' "$deplib"
4474 -	    dir=$func_stripname_result
4475 +	    func_resolve_sysroot "$func_stripname_result"
4476 +	    dir=$func_resolve_sysroot_result
4477  	    # Make sure the xrpath contains only unique directories.
4478  	    case "$xrpath " in
4479  	    *" $dir "*) ;;
4480 -	    *) xrpath="$xrpath $dir" ;;
4481 +	    *) func_append xrpath " $dir" ;;
4482  	    esac
4483  	  fi
4484  	  deplibs="$deplib $deplibs"
4485  	  continue
4486  	  ;;
4487 -	*.la) lib="$deplib" ;;
4488 +	*.la)
4489 +	  func_resolve_sysroot "$deplib"
4490 +	  lib=$func_resolve_sysroot_result
4491 +	  ;;
4492  	*.$libext)
4493  	  if test "$pass" = conv; then
4494  	    deplibs="$deplib $deplibs"
4495 @@ -5599,11 +6375,11 @@
4496  	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
4497  	      # If there is no dlopen support or we're linking statically,
4498  	      # we need to preload.
4499 -	      newdlprefiles="$newdlprefiles $deplib"
4500 +	      func_append newdlprefiles " $deplib"
4501  	      compile_deplibs="$deplib $compile_deplibs"
4502  	      finalize_deplibs="$deplib $finalize_deplibs"
4503  	    else
4504 -	      newdlfiles="$newdlfiles $deplib"
4505 +	      func_append newdlfiles " $deplib"
4506  	    fi
4507  	  fi
4508  	  continue
4509 @@ -5649,7 +6425,7 @@
4510  	  for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
4511  	    case " $new_inherited_linker_flags " in
4512  	      *" $tmp_inherited_linker_flag "*) ;;
4513 -	      *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
4514 +	      *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
4515  	    esac
4516  	  done
4517  	fi
4518 @@ -5657,8 +6433,8 @@
4519  	if test "$linkmode,$pass" = "lib,link" ||
4520  	   test "$linkmode,$pass" = "prog,scan" ||
4521  	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
4522 -	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
4523 -	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
4524 +	  test -n "$dlopen" && func_append dlfiles " $dlopen"
4525 +	  test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
4526  	fi
4527  
4528  	if test "$pass" = conv; then
4529 @@ -5669,30 +6445,36 @@
4530  	      func_fatal_error "cannot find name of link library for \`$lib'"
4531  	    fi
4532  	    # It is a libtool convenience library, so add in its objects.
4533 -	    convenience="$convenience $ladir/$objdir/$old_library"
4534 -	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
4535 +	    func_append convenience " $ladir/$objdir/$old_library"
4536 +	    func_append old_convenience " $ladir/$objdir/$old_library"
4537 +	    tmp_libs=
4538 +	    for deplib in $dependency_libs; do
4539 +	      deplibs="$deplib $deplibs"
4540 +	      if $opt_preserve_dup_deps ; then
4541 +		case "$tmp_libs " in
4542 +		*" $deplib "*) func_append specialdeplibs " $deplib" ;;
4543 +		esac
4544 +	      fi
4545 +	      func_append tmp_libs " $deplib"
4546 +	    done
4547  	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
4548  	    func_fatal_error "\`$lib' is not a convenience library"
4549  	  fi
4550 -	  tmp_libs=
4551 -	  for deplib in $dependency_libs; do
4552 -	    deplibs="$deplib $deplibs"
4553 -	    if $opt_duplicate_deps ; then
4554 -	      case "$tmp_libs " in
4555 -	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
4556 -	      esac
4557 -	    fi
4558 -	    tmp_libs="$tmp_libs $deplib"
4559 -	  done
4560  	  continue
4561  	fi # $pass = conv
4562  
4563  
4564  	# Get the name of the library we link against.
4565  	linklib=
4566 -	for l in $old_library $library_names; do
4567 -	  linklib="$l"
4568 -	done
4569 +	if test -n "$old_library" &&
4570 +	   { test "$prefer_static_libs" = yes ||
4571 +	     test "$prefer_static_libs,$installed" = "built,no"; }; then
4572 +	  linklib=$old_library
4573 +	else
4574 +	  for l in $old_library $library_names; do
4575 +	    linklib="$l"
4576 +	  done
4577 +	fi
4578  	if test -z "$linklib"; then
4579  	  func_fatal_error "cannot find name of link library for \`$lib'"
4580  	fi
4581 @@ -5709,9 +6491,9 @@
4582  	    # statically, we need to preload.  We also need to preload any
4583  	    # dependent libraries so libltdl's deplib preloader doesn't
4584  	    # bomb out in the load deplibs phase.
4585 -	    dlprefiles="$dlprefiles $lib $dependency_libs"
4586 +	    func_append dlprefiles " $lib $dependency_libs"
4587  	  else
4588 -	    newdlfiles="$newdlfiles $lib"
4589 +	    func_append newdlfiles " $lib"
4590  	  fi
4591  	  continue
4592  	fi # $pass = dlopen
4593 @@ -5733,14 +6515,14 @@
4594  
4595  	# Find the relevant object directory and library name.
4596  	if test "X$installed" = Xyes; then
4597 -	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
4598 +	  if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
4599  	    func_warning "library \`$lib' was moved."
4600  	    dir="$ladir"
4601  	    absdir="$abs_ladir"
4602  	    libdir="$abs_ladir"
4603  	  else
4604 -	    dir="$libdir"
4605 -	    absdir="$libdir"
4606 +	    dir="$lt_sysroot$libdir"
4607 +	    absdir="$lt_sysroot$libdir"
4608  	  fi
4609  	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
4610  	else
4611 @@ -5748,12 +6530,12 @@
4612  	    dir="$ladir"
4613  	    absdir="$abs_ladir"
4614  	    # Remove this search path later
4615 -	    notinst_path="$notinst_path $abs_ladir"
4616 +	    func_append notinst_path " $abs_ladir"
4617  	  else
4618  	    dir="$ladir/$objdir"
4619  	    absdir="$abs_ladir/$objdir"
4620  	    # Remove this search path later
4621 -	    notinst_path="$notinst_path $abs_ladir"
4622 +	    func_append notinst_path " $abs_ladir"
4623  	  fi
4624  	fi # $installed = yes
4625  	func_stripname 'lib' '.la' "$laname"
4626 @@ -5764,20 +6546,46 @@
4627  	  if test -z "$libdir" && test "$linkmode" = prog; then
4628  	    func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
4629  	  fi
4630 -	  # Prefer using a static library (so that no silly _DYNAMIC symbols
4631 -	  # are required to link).
4632 -	  if test -n "$old_library"; then
4633 -	    newdlprefiles="$newdlprefiles $dir/$old_library"
4634 -	    # Keep a list of preopened convenience libraries to check
4635 -	    # that they are being used correctly in the link pass.
4636 -	    test -z "$libdir" && \
4637 -		dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
4638 -	  # Otherwise, use the dlname, so that lt_dlopen finds it.
4639 -	  elif test -n "$dlname"; then
4640 -	    newdlprefiles="$newdlprefiles $dir/$dlname"
4641 -	  else
4642 -	    newdlprefiles="$newdlprefiles $dir/$linklib"
4643 -	  fi
4644 +	  case "$host" in
4645 +	    # special handling for platforms with PE-DLLs.
4646 +	    *cygwin* | *mingw* | *cegcc* )
4647 +	      # Linker will automatically link against shared library if both
4648 +	      # static and shared are present.  Therefore, ensure we extract
4649 +	      # symbols from the import library if a shared library is present
4650 +	      # (otherwise, the dlopen module name will be incorrect).  We do
4651 +	      # this by putting the import library name into $newdlprefiles.
4652 +	      # We recover the dlopen module name by 'saving' the la file
4653 +	      # name in a special purpose variable, and (later) extracting the
4654 +	      # dlname from the la file.
4655 +	      if test -n "$dlname"; then
4656 +	        func_tr_sh "$dir/$linklib"
4657 +	        eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
4658 +	        func_append newdlprefiles " $dir/$linklib"
4659 +	      else
4660 +	        func_append newdlprefiles " $dir/$old_library"
4661 +	        # Keep a list of preopened convenience libraries to check
4662 +	        # that they are being used correctly in the link pass.
4663 +	        test -z "$libdir" && \
4664 +	          func_append dlpreconveniencelibs " $dir/$old_library"
4665 +	      fi
4666 +	    ;;
4667 +	    * )
4668 +	      # Prefer using a static library (so that no silly _DYNAMIC symbols
4669 +	      # are required to link).
4670 +	      if test -n "$old_library"; then
4671 +	        func_append newdlprefiles " $dir/$old_library"
4672 +	        # Keep a list of preopened convenience libraries to check
4673 +	        # that they are being used correctly in the link pass.
4674 +	        test -z "$libdir" && \
4675 +	          func_append dlpreconveniencelibs " $dir/$old_library"
4676 +	      # Otherwise, use the dlname, so that lt_dlopen finds it.
4677 +	      elif test -n "$dlname"; then
4678 +	        func_append newdlprefiles " $dir/$dlname"
4679 +	      else
4680 +	        func_append newdlprefiles " $dir/$linklib"
4681 +	      fi
4682 +	    ;;
4683 +	  esac
4684  	fi # $pass = dlpreopen
4685  
4686  	if test -z "$libdir"; then
4687 @@ -5795,7 +6603,7 @@
4688  
4689  
4690  	if test "$linkmode" = prog && test "$pass" != link; then
4691 -	  newlib_search_path="$newlib_search_path $ladir"
4692 +	  func_append newlib_search_path " $ladir"
4693  	  deplibs="$lib $deplibs"
4694  
4695  	  linkalldeplibs=no
4696 @@ -5808,7 +6616,8 @@
4697  	  for deplib in $dependency_libs; do
4698  	    case $deplib in
4699  	    -L*) func_stripname '-L' '' "$deplib"
4700 -	         newlib_search_path="$newlib_search_path $func_stripname_result"
4701 +	         func_resolve_sysroot "$func_stripname_result"
4702 +	         func_append newlib_search_path " $func_resolve_sysroot_result"
4703  		 ;;
4704  	    esac
4705  	    # Need to link against all dependency_libs?
4706 @@ -5819,12 +6628,12 @@
4707  	      # or/and link against static libraries
4708  	      newdependency_libs="$deplib $newdependency_libs"
4709  	    fi
4710 -	    if $opt_duplicate_deps ; then
4711 +	    if $opt_preserve_dup_deps ; then
4712  	      case "$tmp_libs " in
4713 -	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
4714 +	      *" $deplib "*) func_append specialdeplibs " $deplib" ;;
4715  	      esac
4716  	    fi
4717 -	    tmp_libs="$tmp_libs $deplib"
4718 +	    func_append tmp_libs " $deplib"
4719  	  done # for deplib
4720  	  continue
4721  	fi # $linkmode = prog...
4722 @@ -5839,7 +6648,7 @@
4723  	      # Make sure the rpath contains only unique directories.
4724  	      case "$temp_rpath:" in
4725  	      *"$absdir:"*) ;;
4726 -	      *) temp_rpath="$temp_rpath$absdir:" ;;
4727 +	      *) func_append temp_rpath "$absdir:" ;;
4728  	      esac
4729  	    fi
4730  
4731 @@ -5851,7 +6660,7 @@
4732  	    *)
4733  	      case "$compile_rpath " in
4734  	      *" $absdir "*) ;;
4735 -	      *) compile_rpath="$compile_rpath $absdir"
4736 +	      *) func_append compile_rpath " $absdir" ;;
4737  	      esac
4738  	      ;;
4739  	    esac
4740 @@ -5860,7 +6669,7 @@
4741  	    *)
4742  	      case "$finalize_rpath " in
4743  	      *" $libdir "*) ;;
4744 -	      *) finalize_rpath="$finalize_rpath $libdir"
4745 +	      *) func_append finalize_rpath " $libdir" ;;
4746  	      esac
4747  	      ;;
4748  	    esac
4749 @@ -5885,12 +6694,12 @@
4750  	  case $host in
4751  	  *cygwin* | *mingw* | *cegcc*)
4752  	      # No point in relinking DLLs because paths are not encoded
4753 -	      notinst_deplibs="$notinst_deplibs $lib"
4754 +	      func_append notinst_deplibs " $lib"
4755  	      need_relink=no
4756  	    ;;
4757  	  *)
4758  	    if test "$installed" = no; then
4759 -	      notinst_deplibs="$notinst_deplibs $lib"
4760 +	      func_append notinst_deplibs " $lib"
4761  	      need_relink=yes
4762  	    fi
4763  	    ;;
4764 @@ -5925,7 +6734,7 @@
4765  	    *)
4766  	      case "$compile_rpath " in
4767  	      *" $absdir "*) ;;
4768 -	      *) compile_rpath="$compile_rpath $absdir"
4769 +	      *) func_append compile_rpath " $absdir" ;;
4770  	      esac
4771  	      ;;
4772  	    esac
4773 @@ -5934,7 +6743,7 @@
4774  	    *)
4775  	      case "$finalize_rpath " in
4776  	      *" $libdir "*) ;;
4777 -	      *) finalize_rpath="$finalize_rpath $libdir"
4778 +	      *) func_append finalize_rpath " $libdir" ;;
4779  	      esac
4780  	      ;;
4781  	    esac
4782 @@ -5988,7 +6797,7 @@
4783  	    linklib=$newlib
4784  	  fi # test -n "$old_archive_from_expsyms_cmds"
4785  
4786 -	  if test "$linkmode" = prog || test "$mode" != relink; then
4787 +	  if test "$linkmode" = prog || test "$opt_mode" != relink; then
4788  	    add_shlibpath=
4789  	    add_dir=
4790  	    add=
4791 @@ -6039,12 +6848,12 @@
4792  	         test "$hardcode_direct_absolute" = no; then
4793  		add="$dir/$linklib"
4794  	      elif test "$hardcode_minus_L" = yes; then
4795 -		add_dir="-L$dir"
4796 +		add_dir="-L$absdir"
4797  		# Try looking first in the location we're being installed to.
4798  		if test -n "$inst_prefix_dir"; then
4799  		  case $libdir in
4800  		    [\\/]*)
4801 -		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
4802 +		      func_append add_dir " -L$inst_prefix_dir$libdir"
4803  		      ;;
4804  		  esac
4805  		fi
4806 @@ -6066,7 +6875,7 @@
4807  	    if test -n "$add_shlibpath"; then
4808  	      case :$compile_shlibpath: in
4809  	      *":$add_shlibpath:"*) ;;
4810 -	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
4811 +	      *) func_append compile_shlibpath "$add_shlibpath:" ;;
4812  	      esac
4813  	    fi
4814  	    if test "$linkmode" = prog; then
4815 @@ -6080,15 +6889,14 @@
4816  		 test "$hardcode_shlibpath_var" = yes; then
4817  		case :$finalize_shlibpath: in
4818  		*":$libdir:"*) ;;
4819 -		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
4820 +		*) func_append finalize_shlibpath "$libdir:" ;;
4821  		esac
4822  	      fi
4823  	    fi
4824  	  fi
4825  
4826 -	  if test "$linkmode" = prog || test "$mode" = relink; then
4827 +	  if test "$linkmode" = prog || test "$opt_mode" = relink; then
4828  	    add_shlibpath=
4829 -	    add_prefix_dir=
4830  	    add_dir=
4831  	    add=
4832  	    # Finalize command for both is simple: just hardcode it.
4833 @@ -6101,7 +6909,7 @@
4834  	    elif test "$hardcode_shlibpath_var" = yes; then
4835  	      case :$finalize_shlibpath: in
4836  	      *":$libdir:"*) ;;
4837 -	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
4838 +	      *) func_append finalize_shlibpath "$libdir:" ;;
4839  	      esac
4840  	      add="-l$name"
4841  	    elif test "$hardcode_automatic" = yes; then
4842 @@ -6118,29 +6926,17 @@
4843  	      if test -n "$inst_prefix_dir"; then
4844  		case $libdir in
4845  		  [\\/]*)
4846 -		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
4847 +		    func_append add_dir " -L$inst_prefix_dir$libdir"
4848  		    ;;
4849  		esac
4850  	      fi
4851  	      add="-l$name"
4852  	    fi
4853  
4854 -	    if test -n "$inst_prefix_dir"; then
4855 -	      case "$libdir" in
4856 -	      [\\/]*)
4857 -		add_prefix_dir="-L$inst_prefix_dir$libdir"
4858 -		;;
4859 -	      esac
4860 -	    fi
4861 -
4862 -	    # add_prefix_dir must be appended instead, otherwise it can
4863 -	    # possibly be overrided by any hardcoded -L/... path in deplibs
4864  	    if test "$linkmode" = prog; then
4865 -	      test -n "$add_prefix_dir" && finalize_deplibs="$finalize_deplibs $add_prefix_dir"
4866  	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
4867  	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
4868  	    else
4869 -	      test -n "$add_prefix_dir" && deplibs="$deplibs $add_prefix_dir"
4870  	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
4871  	      test -n "$add" && deplibs="$add $deplibs"
4872  	    fi
4873 @@ -6207,27 +7003,33 @@
4874  	           temp_xrpath=$func_stripname_result
4875  		   case " $xrpath " in
4876  		   *" $temp_xrpath "*) ;;
4877 -		   *) xrpath="$xrpath $temp_xrpath";;
4878 +		   *) func_append xrpath " $temp_xrpath";;
4879  		   esac;;
4880 -	      *) temp_deplibs="$temp_deplibs $libdir";;
4881 +	      *) func_append temp_deplibs " $libdir";;
4882  	      esac
4883  	    done
4884  	    dependency_libs="$temp_deplibs"
4885  	  fi
4886  
4887 -	  newlib_search_path="$newlib_search_path $absdir"
4888 +	  func_append newlib_search_path " $absdir"
4889  	  # Link against this library
4890  	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
4891  	  # ... and its dependency_libs
4892  	  tmp_libs=
4893  	  for deplib in $dependency_libs; do
4894  	    newdependency_libs="$deplib $newdependency_libs"
4895 -	    if $opt_duplicate_deps ; then
4896 +	    case $deplib in
4897 +              -L*) func_stripname '-L' '' "$deplib"
4898 +                   func_resolve_sysroot "$func_stripname_result";;
4899 +              *) func_resolve_sysroot "$deplib" ;;
4900 +            esac
4901 +	    if $opt_preserve_dup_deps ; then
4902  	      case "$tmp_libs " in
4903 -	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
4904 +	      *" $func_resolve_sysroot_result "*)
4905 +                func_append specialdeplibs " $func_resolve_sysroot_result" ;;
4906  	      esac
4907  	    fi
4908 -	    tmp_libs="$tmp_libs $deplib"
4909 +	    func_append tmp_libs " $func_resolve_sysroot_result"
4910  	  done
4911  
4912  	  if test "$link_all_deplibs" != no; then
4913 @@ -6237,8 +7039,10 @@
4914  	      case $deplib in
4915  	      -L*) path="$deplib" ;;
4916  	      *.la)
4917 +	        func_resolve_sysroot "$deplib"
4918 +	        deplib=$func_resolve_sysroot_result
4919  	        func_dirname "$deplib" "" "."
4920 -		dir="$func_dirname_result"
4921 +		dir=$func_dirname_result
4922  		# We need an absolute path.
4923  		case $dir in
4924  		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
4925 @@ -6265,8 +7069,8 @@
4926                        if test -z "$darwin_install_name"; then
4927                            darwin_install_name=`${OTOOL64} -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`
4928                        fi
4929 -		      compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
4930 -		      linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
4931 +		      func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
4932 +		      func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
4933  		      path=
4934  		    fi
4935  		  fi
4936 @@ -6316,7 +7120,7 @@
4937  	  for dir in $newlib_search_path; do
4938  	    case "$lib_search_path " in
4939  	    *" $dir "*) ;;
4940 -	    *) lib_search_path="$lib_search_path $dir" ;;
4941 +	    *) func_append lib_search_path " $dir" ;;
4942  	    esac
4943  	  done
4944  	  newlib_search_path=
4945 @@ -6374,10 +7178,10 @@
4946  	    -L*)
4947  	      case " $tmp_libs " in
4948  	      *" $deplib "*) ;;
4949 -	      *) tmp_libs="$tmp_libs $deplib" ;;
4950 +	      *) func_append tmp_libs " $deplib" ;;
4951  	      esac
4952  	      ;;
4953 -	    *) tmp_libs="$tmp_libs $deplib" ;;
4954 +	    *) func_append tmp_libs " $deplib" ;;
4955  	    esac
4956  	  done
4957  	  eval $var=\"$tmp_libs\"
4958 @@ -6393,7 +7197,7 @@
4959  	  ;;
4960  	esac
4961  	if test -n "$i" ; then
4962 -	  tmp_libs="$tmp_libs $i"
4963 +	  func_append tmp_libs " $i"
4964  	fi
4965        done
4966        dependency_libs=$tmp_libs
4967 @@ -6434,7 +7238,7 @@
4968        # Now set the variables for building old libraries.
4969        build_libtool_libs=no
4970        oldlibs="$output"
4971 -      objs="$objs$old_deplibs"
4972 +      func_append objs "$old_deplibs"
4973        ;;
4974  
4975      lib)
4976 @@ -6470,7 +7274,7 @@
4977  	  echo
4978  	  $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
4979  	  $ECHO "*** objects $objs is not portable!"
4980 -	  libobjs="$libobjs $objs"
4981 +	  func_append libobjs " $objs"
4982  	fi
4983        fi
4984  
4985 @@ -6529,6 +7333,7 @@
4986  	  # which has an extra 1 added just for fun
4987  	  #
4988  	  case $version_type in
4989 +	  # correct linux to gnu/linux during the next big refactor
4990  	  darwin|linux|osf|windows|none)
4991  	    func_arith $number_major + $number_minor
4992  	    current=$func_arith_result
4993 @@ -6547,6 +7352,9 @@
4994  	    revision="$number_minor"
4995  	    lt_irix_increment=no
4996  	    ;;
4997 +	  *)
4998 +	    func_fatal_configuration "$modename: unknown library version type \`$version_type'"
4999 +	    ;;
5000  	  esac
5001  	  ;;
5002  	no)
5003 @@ -6645,7 +7453,7 @@
5004  	  versuffix="$major.$revision"
5005  	  ;;
5006  
5007 -	linux)
5008 +	linux) # correct to gnu/linux during the next big refactor
5009  	  func_arith $current - $age
5010  	  major=.$func_arith_result
5011  	  versuffix="$major.$age.$revision"
5012 @@ -6668,7 +7476,7 @@
5013  	  done
5014  
5015  	  # Make executables depend on our current version.
5016 -	  verstring="$verstring:${current}.0"
5017 +	  func_append verstring ":${current}.0"
5018  	  ;;
5019  
5020  	qnx)
5021 @@ -6736,10 +7544,10 @@
5022        fi
5023  
5024        func_generate_dlsyms "$libname" "$libname" "yes"
5025 -      libobjs="$libobjs $symfileobj"
5026 +      func_append libobjs " $symfileobj"
5027        test "X$libobjs" = "X " && libobjs=
5028  
5029 -      if test "$mode" != relink; then
5030 +      if test "$opt_mode" != relink; then
5031  	# Remove our outputs, but don't remove object files since they
5032  	# may have been created when compiling PIC objects.
5033  	removelist=
5034 @@ -6755,7 +7563,7 @@
5035  		   continue
5036  		 fi
5037  	       fi
5038 -	       removelist="$removelist $p"
5039 +	       func_append removelist " $p"
5040  	       ;;
5041  	    *) ;;
5042  	  esac
5043 @@ -6766,7 +7574,7 @@
5044  
5045        # Now set the variables for building old libraries.
5046        if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
5047 -	oldlibs="$oldlibs $output_objdir/$libname.$libext"
5048 +	func_append oldlibs " $output_objdir/$libname.$libext"
5049  
5050  	# Transform .lo files to .o files.
5051  	oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
5052 @@ -6783,10 +7591,11 @@
5053  	# If the user specified any rpath flags, then add them.
5054  	temp_xrpath=
5055  	for libdir in $xrpath; do
5056 -	  temp_xrpath="$temp_xrpath -R$libdir"
5057 +	  func_replace_sysroot "$libdir"
5058 +	  func_append temp_xrpath " -R$func_replace_sysroot_result"
5059  	  case "$finalize_rpath " in
5060  	  *" $libdir "*) ;;
5061 -	  *) finalize_rpath="$finalize_rpath $libdir" ;;
5062 +	  *) func_append finalize_rpath " $libdir" ;;
5063  	  esac
5064  	done
5065  	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
5066 @@ -6800,7 +7609,7 @@
5067        for lib in $old_dlfiles; do
5068  	case " $dlprefiles $dlfiles " in
5069  	*" $lib "*) ;;
5070 -	*) dlfiles="$dlfiles $lib" ;;
5071 +	*) func_append dlfiles " $lib" ;;
5072  	esac
5073        done
5074  
5075 @@ -6810,7 +7619,7 @@
5076        for lib in $old_dlprefiles; do
5077  	case "$dlprefiles " in
5078  	*" $lib "*) ;;
5079 -	*) dlprefiles="$dlprefiles $lib" ;;
5080 +	*) func_append dlprefiles " $lib" ;;
5081  	esac
5082        done
5083  
5084 @@ -6822,7 +7631,7 @@
5085  	    ;;
5086  	  *-*-rhapsody* | *-*-darwin1.[012])
5087  	    # Rhapsody C library is in the System framework
5088 -	    deplibs="$deplibs System.ltframework"
5089 +	    func_append deplibs " System.ltframework"
5090  	    ;;
5091  	  *-*-netbsd*)
5092  	    # Don't link with libc until the a.out ld.so is fixed.
5093 @@ -6839,7 +7648,7 @@
5094  	  *)
5095  	    # Add libc to deplibs on all other systems if necessary.
5096  	    if test "$build_libtool_need_lc" = "yes"; then
5097 -	      deplibs="$deplibs -lc"
5098 +	      func_append deplibs " -lc"
5099  	    fi
5100  	    ;;
5101  	  esac
5102 @@ -6888,7 +7697,7 @@
5103  		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
5104  		  case " $predeps $postdeps " in
5105  		  *" $i "*)
5106 -		    newdeplibs="$newdeplibs $i"
5107 +		    func_append newdeplibs " $i"
5108  		    i=""
5109  		    ;;
5110  		  esac
5111 @@ -6899,7 +7708,7 @@
5112  		  set dummy $deplib_matches; shift
5113  		  deplib_match=$1
5114  		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
5115 -		    newdeplibs="$newdeplibs $i"
5116 +		    func_append newdeplibs " $i"
5117  		  else
5118  		    droppeddeps=yes
5119  		    echo
5120 @@ -6913,7 +7722,7 @@
5121  		fi
5122  		;;
5123  	      *)
5124 -		newdeplibs="$newdeplibs $i"
5125 +		func_append newdeplibs " $i"
5126  		;;
5127  	      esac
5128  	    done
5129 @@ -6931,7 +7740,7 @@
5130  		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
5131  		    case " $predeps $postdeps " in
5132  		    *" $i "*)
5133 -		      newdeplibs="$newdeplibs $i"
5134 +		      func_append newdeplibs " $i"
5135  		      i=""
5136  		      ;;
5137  		    esac
5138 @@ -6942,7 +7751,7 @@
5139  		    set dummy $deplib_matches; shift
5140  		    deplib_match=$1
5141  		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
5142 -		      newdeplibs="$newdeplibs $i"
5143 +		      func_append newdeplibs " $i"
5144  		    else
5145  		      droppeddeps=yes
5146  		      echo
5147 @@ -6964,7 +7773,7 @@
5148  		fi
5149  		;;
5150  	      *)
5151 -		newdeplibs="$newdeplibs $i"
5152 +		func_append newdeplibs " $i"
5153  		;;
5154  	      esac
5155  	    done
5156 @@ -6981,15 +7790,27 @@
5157  	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
5158  		case " $predeps $postdeps " in
5159  		*" $a_deplib "*)
5160 -		  newdeplibs="$newdeplibs $a_deplib"
5161 +		  func_append newdeplibs " $a_deplib"
5162  		  a_deplib=""
5163  		  ;;
5164  		esac
5165  	      fi
5166  	      if test -n "$a_deplib" ; then
5167  		libname=`eval "\\$ECHO \"$libname_spec\""`
5168 +		if test -n "$file_magic_glob"; then
5169 +		  libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
5170 +		else
5171 +		  libnameglob=$libname
5172 +		fi
5173 +		test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
5174  		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
5175 -		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
5176 +		  if test "$want_nocaseglob" = yes; then
5177 +		    shopt -s nocaseglob
5178 +		    potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
5179 +		    $nocaseglob
5180 +		  else
5181 +		    potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
5182 +		  fi
5183  		  for potent_lib in $potential_libs; do
5184  		      # Follow soft links.
5185  		      if ls -lLd "$potent_lib" 2>/dev/null |
5186 @@ -7012,7 +7833,7 @@
5187  		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
5188  			 $SED -e 10q |
5189  			 $EGREP "$file_magic_regex" > /dev/null; then
5190 -			newdeplibs="$newdeplibs $a_deplib"
5191 +			func_append newdeplibs " $a_deplib"
5192  			a_deplib=""
5193  			break 2
5194  		      fi
5195 @@ -7037,7 +7858,7 @@
5196  	      ;;
5197  	    *)
5198  	      # Add a -L argument.
5199 -	      newdeplibs="$newdeplibs $a_deplib"
5200 +	      func_append newdeplibs " $a_deplib"
5201  	      ;;
5202  	    esac
5203  	  done # Gone through all deplibs.
5204 @@ -7053,7 +7874,7 @@
5205  	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
5206  		case " $predeps $postdeps " in
5207  		*" $a_deplib "*)
5208 -		  newdeplibs="$newdeplibs $a_deplib"
5209 +		  func_append newdeplibs " $a_deplib"
5210  		  a_deplib=""
5211  		  ;;
5212  		esac
5213 @@ -7066,7 +7887,7 @@
5214  		    potlib="$potent_lib" # see symlink-check above in file_magic test
5215  		    if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
5216  		       $EGREP "$match_pattern_regex" > /dev/null; then
5217 -		      newdeplibs="$newdeplibs $a_deplib"
5218 +		      func_append newdeplibs " $a_deplib"
5219  		      a_deplib=""
5220  		      break 2
5221  		    fi
5222 @@ -7091,7 +7912,7 @@
5223  	      ;;
5224  	    *)
5225  	      # Add a -L argument.
5226 -	      newdeplibs="$newdeplibs $a_deplib"
5227 +	      func_append newdeplibs " $a_deplib"
5228  	      ;;
5229  	    esac
5230  	  done # Gone through all deplibs.
5231 @@ -7195,7 +8016,7 @@
5232  	*)
5233  	  case " $deplibs " in
5234  	  *" -L$path/$objdir "*)
5235 -	    new_libs="$new_libs -L$path/$objdir" ;;
5236 +	    func_append new_libs " -L$path/$objdir" ;;
5237  	  esac
5238  	  ;;
5239  	esac
5240 @@ -7205,10 +8026,10 @@
5241  	-L*)
5242  	  case " $new_libs " in
5243  	  *" $deplib "*) ;;
5244 -	  *) new_libs="$new_libs $deplib" ;;
5245 +	  *) func_append new_libs " $deplib" ;;
5246  	  esac
5247  	  ;;
5248 -	*) new_libs="$new_libs $deplib" ;;
5249 +	*) func_append new_libs " $deplib" ;;
5250  	esac
5251        done
5252        deplibs="$new_libs"
5253 @@ -7220,15 +8041,22 @@
5254  
5255        # Test again, we may have decided not to build it any more
5256        if test "$build_libtool_libs" = yes; then
5257 +	# Remove ${wl} instances when linking with ld.
5258 +	# FIXME: should test the right _cmds variable.
5259 +	case $archive_cmds in
5260 +	  *\$LD\ *) wl= ;;
5261 +        esac
5262  	if test "$hardcode_into_libs" = yes; then
5263  	  # Hardcode the library paths
5264  	  hardcode_libdirs=
5265  	  dep_rpath=
5266  	  rpath="$finalize_rpath"
5267 -	  test "$mode" != relink && rpath="$compile_rpath$rpath"
5268 +	  test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
5269  	  for libdir in $rpath; do
5270  	    if test -n "$hardcode_libdir_flag_spec"; then
5271  	      if test -n "$hardcode_libdir_separator"; then
5272 +		func_replace_sysroot "$libdir"
5273 +		libdir=$func_replace_sysroot_result
5274  		if test -z "$hardcode_libdirs"; then
5275  		  hardcode_libdirs="$libdir"
5276  		else
5277 @@ -7237,18 +8065,18 @@
5278  		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
5279  		    ;;
5280  		  *)
5281 -		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
5282 +		    func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
5283  		    ;;
5284  		  esac
5285  		fi
5286  	      else
5287  		eval flag=\"$hardcode_libdir_flag_spec\"
5288 -		dep_rpath="$dep_rpath $flag"
5289 +		func_append dep_rpath " $flag"
5290  	      fi
5291  	    elif test -n "$runpath_var"; then
5292  	      case "$perm_rpath " in
5293  	      *" $libdir "*) ;;
5294 -	      *) perm_rpath="$perm_rpath $libdir" ;;
5295 +	      *) func_append perm_rpath " $libdir" ;;
5296  	      esac
5297  	    fi
5298  	  done
5299 @@ -7256,17 +8084,13 @@
5300  	  if test -n "$hardcode_libdir_separator" &&
5301  	     test -n "$hardcode_libdirs"; then
5302  	    libdir="$hardcode_libdirs"
5303 -	    if test -n "$hardcode_libdir_flag_spec_ld"; then
5304 -	      eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
5305 -	    else
5306 -	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
5307 -	    fi
5308 +	    eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
5309  	  fi
5310  	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
5311  	    # We should set the runpath_var.
5312  	    rpath=
5313  	    for dir in $perm_rpath; do
5314 -	      rpath="$rpath$dir:"
5315 +	      func_append rpath "$dir:"
5316  	    done
5317  	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
5318  	  fi
5319 @@ -7274,7 +8098,7 @@
5320  	fi
5321  
5322  	shlibpath="$finalize_shlibpath"
5323 -	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
5324 +	test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
5325  	if test -n "$shlibpath"; then
5326  	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
5327  	fi
5328 @@ -7300,7 +8124,7 @@
5329  	linknames=
5330  	for link
5331  	do
5332 -	  linknames="$linknames $link"
5333 +	  func_append linknames " $link"
5334  	done
5335  
5336  	# Use standard objects if they are pic
5337 @@ -7311,7 +8135,7 @@
5338  	if test -n "$export_symbols" && test -n "$include_expsyms"; then
5339  	  $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
5340  	  export_symbols="$output_objdir/$libname.uexp"
5341 -	  delfiles="$delfiles $export_symbols"
5342 +	  func_append delfiles " $export_symbols"
5343  	fi
5344  
5345  	orig_export_symbols=
5346 @@ -7342,13 +8166,45 @@
5347  	    $opt_dry_run || $RM $export_symbols
5348  	    cmds=$export_symbols_cmds
5349  	    save_ifs="$IFS"; IFS='~'
5350 -	    for cmd in $cmds; do
5351 +	    for cmd1 in $cmds; do
5352  	      IFS="$save_ifs"
5353 -	      eval cmd=\"$cmd\"
5354 -	      func_len " $cmd"
5355 -	      len=$func_len_result
5356 -	      if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
5357 +	      # Take the normal branch if the nm_file_list_spec branch
5358 +	      # doesn't work or if tool conversion is not needed.
5359 +	      case $nm_file_list_spec~$to_tool_file_cmd in
5360 +		*~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
5361 +		  try_normal_branch=yes
5362 +		  eval cmd=\"$cmd1\"
5363 +		  func_len " $cmd"
5364 +		  len=$func_len_result
5365 +		  ;;
5366 +		*)
5367 +		  try_normal_branch=no
5368 +		  ;;
5369 +	      esac
5370 +	      if test "$try_normal_branch" = yes \
5371 +		 && { test "$len" -lt "$max_cmd_len" \
5372 +		      || test "$max_cmd_len" -le -1; }
5373 +	      then
5374 +		func_show_eval "$cmd" 'exit $?'
5375 +		skipped_export=false
5376 +	      elif test -n "$nm_file_list_spec"; then
5377 +		func_basename "$output"
5378 +		output_la=$func_basename_result
5379 +		save_libobjs=$libobjs
5380 +		save_output=$output
5381 +		output=${output_objdir}/${output_la}.nm
5382 +		func_to_tool_file "$output"
5383 +		libobjs=$nm_file_list_spec$func_to_tool_file_result
5384 +		func_append delfiles " $output"
5385 +		func_verbose "creating $NM input file list: $output"
5386 +		for obj in $save_libobjs; do
5387 +		  func_to_tool_file "$obj"
5388 +		  $ECHO "$func_to_tool_file_result"
5389 +		done > "$output"
5390 +		eval cmd=\"$cmd1\"
5391  		func_show_eval "$cmd" 'exit $?'
5392 +		output=$save_output
5393 +		libobjs=$save_libobjs
5394  		skipped_export=false
5395  	      else
5396  		# The command line is too long to execute in one step.
5397 @@ -7382,7 +8238,7 @@
5398  	  # global variables. join(1) would be nice here, but unfortunately
5399  	  # isn't a blessed tool.
5400  	  $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
5401 -	  delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
5402 +	  func_append delfiles " $export_symbols $output_objdir/$libname.filter"
5403  	  export_symbols=$output_objdir/$libname.def
5404  	  $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
5405  	fi
5406 @@ -7392,7 +8248,7 @@
5407  	  case " $convenience " in
5408  	  *" $test_deplib "*) ;;
5409  	  *)
5410 -	    tmp_deplibs="$tmp_deplibs $test_deplib"
5411 +	    func_append tmp_deplibs " $test_deplib"
5412  	    ;;
5413  	  esac
5414  	done
5415 @@ -7412,21 +8268,21 @@
5416  	    test "X$libobjs" = "X " && libobjs=
5417  	  else
5418  	    gentop="$output_objdir/${outputname}x"
5419 -	    generated="$generated $gentop"
5420 +	    func_append generated " $gentop"
5421  
5422  	    func_extract_archives $gentop $convenience
5423 -	    libobjs="$libobjs $func_extract_archives_result"
5424 +	    func_append libobjs " $func_extract_archives_result"
5425  	    test "X$libobjs" = "X " && libobjs=
5426  	  fi
5427  	fi
5428  
5429  	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
5430  	  eval flag=\"$thread_safe_flag_spec\"
5431 -	  linker_flags="$linker_flags $flag"
5432 +	  func_append linker_flags " $flag"
5433  	fi
5434  
5435  	# Make a backup of the uninstalled library when relinking
5436 -	if test "$mode" = relink; then
5437 +	if test "$opt_mode" = relink; then
5438  	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
5439  	fi
5440  
5441 @@ -7488,10 +8344,13 @@
5442  	    echo 'INPUT (' > $output
5443  	    for obj in $save_libobjs
5444  	    do
5445 -	      $ECHO "$obj" >> $output
5446 +	      func_to_tool_file "$obj"
5447 +	      $ECHO "$func_to_tool_file_result" >> $output
5448  	    done
5449  	    echo ')' >> $output
5450 -	    delfiles="$delfiles $output"
5451 +	    func_append delfiles " $output"
5452 +	    func_to_tool_file "$output"
5453 +	    output=$func_to_tool_file_result
5454  	  elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
5455  	    output=${output_objdir}/${output_la}.lnk
5456  	    func_verbose "creating linker input file list: $output"
5457 @@ -7505,10 +8364,12 @@
5458  	    fi
5459  	    for obj
5460  	    do
5461 -	      $ECHO "$obj" >> $output
5462 +	      func_to_tool_file "$obj"
5463 +	      $ECHO "$func_to_tool_file_result" >> $output
5464  	    done
5465 -	    delfiles="$delfiles $output"
5466 -	    output=$firstobj\"$file_list_spec$output\"
5467 +	    func_append delfiles " $output"
5468 +	    func_to_tool_file "$output"
5469 +	    output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
5470  	  else
5471  	    if test -n "$save_libobjs"; then
5472  	      func_verbose "creating reloadable object files..."
5473 @@ -7559,7 +8420,7 @@
5474  	      if test -n "$last_robj"; then
5475  	        eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
5476  	      fi
5477 -	      delfiles="$delfiles $output"
5478 +	      func_append delfiles " $output"
5479  
5480  	    else
5481  	      output=
5482 @@ -7593,7 +8454,7 @@
5483  		lt_exit=$?
5484  
5485  		# Restore the uninstalled library and exit
5486 -		if test "$mode" = relink; then
5487 +		if test "$opt_mode" = relink; then
5488  		  ( cd "$output_objdir" && \
5489  		    $RM "${realname}T" && \
5490  		    $MV "${realname}U" "$realname" )
5491 @@ -7626,7 +8487,7 @@
5492  	      # global variables. join(1) would be nice here, but unfortunately
5493  	      # isn't a blessed tool.
5494  	      $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
5495 -	      delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
5496 +	      func_append delfiles " $export_symbols $output_objdir/$libname.filter"
5497  	      export_symbols=$output_objdir/$libname.def
5498  	      $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
5499  	    fi
5500 @@ -7667,10 +8528,10 @@
5501  	# Add any objects from preloaded convenience libraries
5502  	if test -n "$dlprefiles"; then
5503  	  gentop="$output_objdir/${outputname}x"
5504 -	  generated="$generated $gentop"
5505 +	  func_append generated " $gentop"
5506  
5507  	  func_extract_archives $gentop $dlprefiles
5508 -	  libobjs="$libobjs $func_extract_archives_result"
5509 +	  func_append libobjs " $func_extract_archives_result"
5510  	  test "X$libobjs" = "X " && libobjs=
5511  	fi
5512  
5513 @@ -7686,7 +8547,7 @@
5514  	    lt_exit=$?
5515  
5516  	    # Restore the uninstalled library and exit
5517 -	    if test "$mode" = relink; then
5518 +	    if test "$opt_mode" = relink; then
5519  	      ( cd "$output_objdir" && \
5520  	        $RM "${realname}T" && \
5521  		$MV "${realname}U" "$realname" )
5522 @@ -7698,7 +8559,7 @@
5523  	IFS="$save_ifs"
5524  
5525  	# Restore the uninstalled library and exit
5526 -	if test "$mode" = relink; then
5527 +	if test "$opt_mode" = relink; then
5528  	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
5529  
5530  	  if test -n "$convenience"; then
5531 @@ -7782,13 +8643,16 @@
5532  	  reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
5533  	else
5534  	  gentop="$output_objdir/${obj}x"
5535 -	  generated="$generated $gentop"
5536 +	  func_append generated " $gentop"
5537  
5538  	  func_extract_archives $gentop $convenience
5539  	  reload_conv_objs="$reload_objs $func_extract_archives_result"
5540  	fi
5541        fi
5542  
5543 +      # If we're not building shared, we need to use non_pic_objs
5544 +      test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
5545 +
5546        # Create the old-style object.
5547        reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
5548  
5549 @@ -7862,8 +8726,8 @@
5550  	if test "$tagname" = CXX ; then
5551  	  case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
5552  	    10.[0123])
5553 -	      compile_command="$compile_command ${wl}-bind_at_load"
5554 -	      finalize_command="$finalize_command ${wl}-bind_at_load"
5555 +	      func_append compile_command " ${wl}-bind_at_load"
5556 +	      func_append finalize_command " ${wl}-bind_at_load"
5557  	    ;;
5558  	  esac
5559  	fi
5560 @@ -7883,7 +8747,7 @@
5561  	*)
5562  	  case " $compile_deplibs " in
5563  	  *" -L$path/$objdir "*)
5564 -	    new_libs="$new_libs -L$path/$objdir" ;;
5565 +	    func_append new_libs " -L$path/$objdir" ;;
5566  	  esac
5567  	  ;;
5568  	esac
5569 @@ -7893,17 +8757,17 @@
5570  	-L*)
5571  	  case " $new_libs " in
5572  	  *" $deplib "*) ;;
5573 -	  *) new_libs="$new_libs $deplib" ;;
5574 +	  *) func_append new_libs " $deplib" ;;
5575  	  esac
5576  	  ;;
5577 -	*) new_libs="$new_libs $deplib" ;;
5578 +	*) func_append new_libs " $deplib" ;;
5579  	esac
5580        done
5581        compile_deplibs="$new_libs"
5582  
5583  
5584 -      compile_command="$compile_command $compile_deplibs"
5585 -      finalize_command="$finalize_command $finalize_deplibs"
5586 +      func_append compile_command " $compile_deplibs"
5587 +      func_append finalize_command " $finalize_deplibs"
5588  
5589        if test -n "$rpath$xrpath"; then
5590  	# If the user specified any rpath flags, then add them.
5591 @@ -7911,7 +8775,7 @@
5592  	  # This is the magic to use -rpath.
5593  	  case "$finalize_rpath " in
5594  	  *" $libdir "*) ;;
5595 -	  *) finalize_rpath="$finalize_rpath $libdir" ;;
5596 +	  *) func_append finalize_rpath " $libdir" ;;
5597  	  esac
5598  	done
5599        fi
5600 @@ -7930,18 +8794,18 @@
5601  	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
5602  		;;
5603  	      *)
5604 -		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
5605 +		func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
5606  		;;
5607  	      esac
5608  	    fi
5609  	  else
5610  	    eval flag=\"$hardcode_libdir_flag_spec\"
5611 -	    rpath="$rpath $flag"
5612 +	    func_append rpath " $flag"
5613  	  fi
5614  	elif test -n "$runpath_var"; then
5615  	  case "$perm_rpath " in
5616  	  *" $libdir "*) ;;
5617 -	  *) perm_rpath="$perm_rpath $libdir" ;;
5618 +	  *) func_append perm_rpath " $libdir" ;;
5619  	  esac
5620  	fi
5621  	case $host in
5622 @@ -7950,12 +8814,12 @@
5623  	  case :$dllsearchpath: in
5624  	  *":$libdir:"*) ;;
5625  	  ::) dllsearchpath=$libdir;;
5626 -	  *) dllsearchpath="$dllsearchpath:$libdir";;
5627 +	  *) func_append dllsearchpath ":$libdir";;
5628  	  esac
5629  	  case :$dllsearchpath: in
5630  	  *":$testbindir:"*) ;;
5631  	  ::) dllsearchpath=$testbindir;;
5632 -	  *) dllsearchpath="$dllsearchpath:$testbindir";;
5633 +	  *) func_append dllsearchpath ":$testbindir";;
5634  	  esac
5635  	  ;;
5636  	esac
5637 @@ -7981,18 +8845,18 @@
5638  	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
5639  		;;
5640  	      *)
5641 -		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
5642 +		func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
5643  		;;
5644  	      esac
5645  	    fi
5646  	  else
5647  	    eval flag=\"$hardcode_libdir_flag_spec\"
5648 -	    rpath="$rpath $flag"
5649 +	    func_append rpath " $flag"
5650  	  fi
5651  	elif test -n "$runpath_var"; then
5652  	  case "$finalize_perm_rpath " in
5653  	  *" $libdir "*) ;;
5654 -	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
5655 +	  *) func_append finalize_perm_rpath " $libdir" ;;
5656  	  esac
5657  	fi
5658        done
5659 @@ -8043,6 +8907,12 @@
5660  	exit_status=0
5661  	func_show_eval "$link_command" 'exit_status=$?'
5662  
5663 +	if test -n "$postlink_cmds"; then
5664 +	  func_to_tool_file "$output"
5665 +	  postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
5666 +	  func_execute_cmds "$postlink_cmds" 'exit $?'
5667 +	fi
5668 +
5669  	# Delete the generated files.
5670  	if test -f "$output_objdir/${outputname}S.${objext}"; then
5671  	  func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
5672 @@ -8065,7 +8935,7 @@
5673  	  # We should set the runpath_var.
5674  	  rpath=
5675  	  for dir in $perm_rpath; do
5676 -	    rpath="$rpath$dir:"
5677 +	    func_append rpath "$dir:"
5678  	  done
5679  	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
5680  	fi
5681 @@ -8073,7 +8943,7 @@
5682  	  # We should set the runpath_var.
5683  	  rpath=
5684  	  for dir in $finalize_perm_rpath; do
5685 -	    rpath="$rpath$dir:"
5686 +	    func_append rpath "$dir:"
5687  	  done
5688  	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
5689  	fi
5690 @@ -8088,6 +8958,13 @@
5691  	$opt_dry_run || $RM $output
5692  	# Link the executable and exit
5693  	func_show_eval "$link_command" 'exit $?'
5694 +
5695 +	if test -n "$postlink_cmds"; then
5696 +	  func_to_tool_file "$output"
5697 +	  postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
5698 +	  func_execute_cmds "$postlink_cmds" 'exit $?'
5699 +	fi
5700 +
5701  	exit $EXIT_SUCCESS
5702        fi
5703  
5704 @@ -8121,6 +8998,12 @@
5705  
5706        func_show_eval "$link_command" 'exit $?'
5707  
5708 +      if test -n "$postlink_cmds"; then
5709 +	func_to_tool_file "$output_objdir/$outputname"
5710 +	postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
5711 +	func_execute_cmds "$postlink_cmds" 'exit $?'
5712 +      fi
5713 +
5714        # Now create the wrapper script.
5715        func_verbose "creating $output"
5716  
5717 @@ -8218,7 +9101,7 @@
5718  	else
5719  	  oldobjs="$old_deplibs $non_pic_objects"
5720  	  if test "$preload" = yes && test -f "$symfileobj"; then
5721 -	    oldobjs="$oldobjs $symfileobj"
5722 +	    func_append oldobjs " $symfileobj"
5723  	  fi
5724  	fi
5725  	addlibs="$old_convenience"
5726 @@ -8226,10 +9109,10 @@
5727  
5728        if test -n "$addlibs"; then
5729  	gentop="$output_objdir/${outputname}x"
5730 -	generated="$generated $gentop"
5731 +	func_append generated " $gentop"
5732  
5733  	func_extract_archives $gentop $addlibs
5734 -	oldobjs="$oldobjs $func_extract_archives_result"
5735 +	func_append oldobjs " $func_extract_archives_result"
5736        fi
5737  
5738        # Do each command in the archive commands.
5739 @@ -8240,10 +9123,10 @@
5740  	# Add any objects from preloaded convenience libraries
5741  	if test -n "$dlprefiles"; then
5742  	  gentop="$output_objdir/${outputname}x"
5743 -	  generated="$generated $gentop"
5744 +	  func_append generated " $gentop"
5745  
5746  	  func_extract_archives $gentop $dlprefiles
5747 -	  oldobjs="$oldobjs $func_extract_archives_result"
5748 +	  func_append oldobjs " $func_extract_archives_result"
5749  	fi
5750  
5751  	# POSIX demands no paths to be encoded in archives.  We have
5752 @@ -8261,7 +9144,7 @@
5753  	else
5754  	  echo "copying selected object files to avoid basename conflicts..."
5755  	  gentop="$output_objdir/${outputname}x"
5756 -	  generated="$generated $gentop"
5757 +	  func_append generated " $gentop"
5758  	  func_mkdir_p "$gentop"
5759  	  save_oldobjs=$oldobjs
5760  	  oldobjs=
5761 @@ -8285,18 +9168,30 @@
5762  		esac
5763  	      done
5764  	      func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
5765 -	      oldobjs="$oldobjs $gentop/$newobj"
5766 +	      func_append oldobjs " $gentop/$newobj"
5767  	      ;;
5768 -	    *) oldobjs="$oldobjs $obj" ;;
5769 +	    *) func_append oldobjs " $obj" ;;
5770  	    esac
5771  	  done
5772  	fi
5773 +	func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
5774 +	tool_oldlib=$func_to_tool_file_result
5775  	eval cmds=\"$old_archive_cmds\"
5776  
5777  	func_len " $cmds"
5778  	len=$func_len_result
5779  	if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
5780  	  cmds=$old_archive_cmds
5781 +	elif test -n "$archiver_list_spec"; then
5782 +	  func_verbose "using command file archive linking..."
5783 +	  for obj in $oldobjs
5784 +	  do
5785 +	    func_to_tool_file "$obj"
5786 +	    $ECHO "$func_to_tool_file_result"
5787 +	  done > $output_objdir/$libname.libcmd
5788 +	  func_to_tool_file "$output_objdir/$libname.libcmd"
5789 +	  oldobjs=" $archiver_list_spec$func_to_tool_file_result"
5790 +	  cmds=$old_archive_cmds
5791  	else
5792  	  # the command line is too long to link in one step, link in parts
5793  	  func_verbose "using piecewise archive linking..."
5794 @@ -8390,12 +9285,23 @@
5795  	      *.la)
5796  		func_basename "$deplib"
5797  		name="$func_basename_result"
5798 -		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
5799 +		func_resolve_sysroot "$deplib"
5800 +		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
5801  		test -z "$libdir" && \
5802  		  func_fatal_error "\`$deplib' is not a valid libtool archive"
5803 -		newdependency_libs="$newdependency_libs $libdir/$name"
5804 +		func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
5805 +		;;
5806 +	      -L*)
5807 +		func_stripname -L '' "$deplib"
5808 +		func_replace_sysroot "$func_stripname_result"
5809 +		func_append newdependency_libs " -L$func_replace_sysroot_result"
5810 +		;;
5811 +	      -R*)
5812 +		func_stripname -R '' "$deplib"
5813 +		func_replace_sysroot "$func_stripname_result"
5814 +		func_append newdependency_libs " -R$func_replace_sysroot_result"
5815  		;;
5816 -	      *) newdependency_libs="$newdependency_libs $deplib" ;;
5817 +	      *) func_append newdependency_libs " $deplib" ;;
5818  	      esac
5819  	    done
5820  	    dependency_libs="$newdependency_libs"
5821 @@ -8409,9 +9315,9 @@
5822  		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5823  		test -z "$libdir" && \
5824  		  func_fatal_error "\`$lib' is not a valid libtool archive"
5825 -		newdlfiles="$newdlfiles $libdir/$name"
5826 +		func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
5827  		;;
5828 -	      *) newdlfiles="$newdlfiles $lib" ;;
5829 +	      *) func_append newdlfiles " $lib" ;;
5830  	      esac
5831  	    done
5832  	    dlfiles="$newdlfiles"
5833 @@ -8428,7 +9334,7 @@
5834  		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5835  		test -z "$libdir" && \
5836  		  func_fatal_error "\`$lib' is not a valid libtool archive"
5837 -		newdlprefiles="$newdlprefiles $libdir/$name"
5838 +		func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
5839  		;;
5840  	      esac
5841  	    done
5842 @@ -8440,7 +9346,7 @@
5843  		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
5844  		*) abs=`pwd`"/$lib" ;;
5845  	      esac
5846 -	      newdlfiles="$newdlfiles $abs"
5847 +	      func_append newdlfiles " $abs"
5848  	    done
5849  	    dlfiles="$newdlfiles"
5850  	    newdlprefiles=
5851 @@ -8449,7 +9355,7 @@
5852  		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
5853  		*) abs=`pwd`"/$lib" ;;
5854  	      esac
5855 -	      newdlprefiles="$newdlprefiles $abs"
5856 +	      func_append newdlprefiles " $abs"
5857  	    done
5858  	    dlprefiles="$newdlprefiles"
5859  	  fi
5860 @@ -8534,7 +9440,7 @@
5861      exit $EXIT_SUCCESS
5862  }
5863  
5864 -{ test "$mode" = link || test "$mode" = relink; } &&
5865 +{ test "$opt_mode" = link || test "$opt_mode" = relink; } &&
5866      func_mode_link ${1+"$@"}
5867  
5868  
5869 @@ -8554,9 +9460,9 @@
5870      for arg
5871      do
5872        case $arg in
5873 -      -f) RM="$RM $arg"; rmforce=yes ;;
5874 -      -*) RM="$RM $arg" ;;
5875 -      *) files="$files $arg" ;;
5876 +      -f) func_append RM " $arg"; rmforce=yes ;;
5877 +      -*) func_append RM " $arg" ;;
5878 +      *) func_append files " $arg" ;;
5879        esac
5880      done
5881  
5882 @@ -8565,24 +9471,23 @@
5883  
5884      rmdirs=
5885  
5886 -    origobjdir="$objdir"
5887      for file in $files; do
5888        func_dirname "$file" "" "."
5889        dir="$func_dirname_result"
5890        if test "X$dir" = X.; then
5891 -	objdir="$origobjdir"
5892 +	odir="$objdir"
5893        else
5894 -	objdir="$dir/$origobjdir"
5895 +	odir="$dir/$objdir"
5896        fi
5897        func_basename "$file"
5898        name="$func_basename_result"
5899 -      test "$mode" = uninstall && objdir="$dir"
5900 +      test "$opt_mode" = uninstall && odir="$dir"
5901  
5902 -      # Remember objdir for removal later, being careful to avoid duplicates
5903 -      if test "$mode" = clean; then
5904 +      # Remember odir for removal later, being careful to avoid duplicates
5905 +      if test "$opt_mode" = clean; then
5906  	case " $rmdirs " in
5907 -	  *" $objdir "*) ;;
5908 -	  *) rmdirs="$rmdirs $objdir" ;;
5909 +	  *" $odir "*) ;;
5910 +	  *) func_append rmdirs " $odir" ;;
5911  	esac
5912        fi
5913  
5914 @@ -8608,18 +9513,17 @@
5915  
5916  	  # Delete the libtool libraries and symlinks.
5917  	  for n in $library_names; do
5918 -	    rmfiles="$rmfiles $objdir/$n"
5919 +	    func_append rmfiles " $odir/$n"
5920  	  done
5921 -	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
5922 +	  test -n "$old_library" && func_append rmfiles " $odir/$old_library"
5923  
5924 -	  case "$mode" in
5925 +	  case "$opt_mode" in
5926  	  clean)
5927 -	    case "  $library_names " in
5928 -	    # "  " in the beginning catches empty $dlname
5929 +	    case " $library_names " in
5930  	    *" $dlname "*) ;;
5931 -	    *) rmfiles="$rmfiles $objdir/$dlname" ;;
5932 +	    *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
5933  	    esac
5934 -	    test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
5935 +	    test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
5936  	    ;;
5937  	  uninstall)
5938  	    if test -n "$library_names"; then
5939 @@ -8647,19 +9551,19 @@
5940  	  # Add PIC object to the list of files to remove.
5941  	  if test -n "$pic_object" &&
5942  	     test "$pic_object" != none; then
5943 -	    rmfiles="$rmfiles $dir/$pic_object"
5944 +	    func_append rmfiles " $dir/$pic_object"
5945  	  fi
5946  
5947  	  # Add non-PIC object to the list of files to remove.
5948  	  if test -n "$non_pic_object" &&
5949  	     test "$non_pic_object" != none; then
5950 -	    rmfiles="$rmfiles $dir/$non_pic_object"
5951 +	    func_append rmfiles " $dir/$non_pic_object"
5952  	  fi
5953  	fi
5954  	;;
5955  
5956        *)
5957 -	if test "$mode" = clean ; then
5958 +	if test "$opt_mode" = clean ; then
5959  	  noexename=$name
5960  	  case $file in
5961  	  *.exe)
5962 @@ -8669,7 +9573,7 @@
5963  	    noexename=$func_stripname_result
5964  	    # $file with .exe has already been added to rmfiles,
5965  	    # add $file without .exe
5966 -	    rmfiles="$rmfiles $file"
5967 +	    func_append rmfiles " $file"
5968  	    ;;
5969  	  esac
5970  	  # Do a test to see if this is a libtool program.
5971 @@ -8678,7 +9582,7 @@
5972  	      func_ltwrapper_scriptname "$file"
5973  	      relink_command=
5974  	      func_source $func_ltwrapper_scriptname_result
5975 -	      rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
5976 +	      func_append rmfiles " $func_ltwrapper_scriptname_result"
5977  	    else
5978  	      relink_command=
5979  	      func_source $dir/$noexename
5980 @@ -8686,12 +9590,12 @@
5981  
5982  	    # note $name still contains .exe if it was in $file originally
5983  	    # as does the version of $file that was added into $rmfiles
5984 -	    rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
5985 +	    func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
5986  	    if test "$fast_install" = yes && test -n "$relink_command"; then
5987 -	      rmfiles="$rmfiles $objdir/lt-$name"
5988 +	      func_append rmfiles " $odir/lt-$name"
5989  	    fi
5990  	    if test "X$noexename" != "X$name" ; then
5991 -	      rmfiles="$rmfiles $objdir/lt-${noexename}.c"
5992 +	      func_append rmfiles " $odir/lt-${noexename}.c"
5993  	    fi
5994  	  fi
5995  	fi
5996 @@ -8699,7 +9603,6 @@
5997        esac
5998        func_show_eval "$RM $rmfiles" 'exit_status=1'
5999      done
6000 -    objdir="$origobjdir"
6001  
6002      # Try to remove the ${objdir}s in the directories where we deleted files
6003      for dir in $rmdirs; do
6004 @@ -8711,16 +9614,16 @@
6005      exit $exit_status
6006  }
6007  
6008 -{ test "$mode" = uninstall || test "$mode" = clean; } &&
6009 +{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
6010      func_mode_uninstall ${1+"$@"}
6011  
6012 -test -z "$mode" && {
6013 +test -z "$opt_mode" && {
6014    help="$generic_help"
6015    func_fatal_help "you must specify a MODE"
6016  }
6017  
6018  test -z "$exec_cmd" && \
6019 -  func_fatal_help "invalid operation mode \`$mode'"
6020 +  func_fatal_help "invalid operation mode \`$opt_mode'"
6021  
6022  if test -n "$exec_cmd"; then
6023    eval exec "$exec_cmd"
6024 Index: aclocal/libtool.m4
6025 ===================================================================
6026 --- aclocal/libtool.m4.orig	2010-10-02 22:51:03.000000000 +0200
6027 +++ aclocal/libtool.m4	2012-07-04 16:29:47.243822029 +0200
6028 @@ -1,8 +1,8 @@
6029  # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
6030  #
6031  #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
6032 -#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
6033 -#                 Inc.
6034 +#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
6035 +#                 Foundation, Inc.
6036  #   Written by Gordon Matzigkeit, 1996
6037  #
6038  # This file is free software; the Free Software Foundation gives
6039 @@ -11,8 +11,8 @@
6040  
6041  m4_define([_LT_COPYING], [dnl
6042  #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
6043 -#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
6044 -#                 Inc.
6045 +#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
6046 +#                 Foundation, Inc.
6047  #   Written by Gordon Matzigkeit, 1996
6048  #
6049  #   This file is part of GNU Libtool.
6050 @@ -146,6 +146,8 @@
6051  AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
6052  AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
6053  
6054 +_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
6055 +dnl
6056  _LT_DECL([], [host_alias], [0], [The host system])dnl
6057  _LT_DECL([], [host], [0])dnl
6058  _LT_DECL([], [host_os], [0])dnl
6059 @@ -168,10 +170,13 @@
6060  dnl
6061  m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6062  m4_require([_LT_CHECK_SHELL_FEATURES])dnl
6063 +m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
6064  m4_require([_LT_CMD_RELOAD])dnl
6065  m4_require([_LT_CHECK_MAGIC_METHOD])dnl
6066 +m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
6067  m4_require([_LT_CMD_OLD_ARCHIVE])dnl
6068  m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
6069 +m4_require([_LT_WITH_SYSROOT])dnl
6070  
6071  _LT_CONFIG_LIBTOOL_INIT([
6072  # See if we are running on zsh, and set the options which allow our
6073 @@ -634,7 +639,7 @@
6074  m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
6075  configured by $[0], generated by m4_PACKAGE_STRING.
6076  
6077 -Copyright (C) 2010 Free Software Foundation, Inc.
6078 +Copyright (C) 2011 Free Software Foundation, Inc.
6079  This config.lt script is free software; the Free Software Foundation
6080  gives unlimited permision to copy, distribute and modify it."
6081  
6082 @@ -748,15 +753,12 @@
6083    # if finds mixed CR/LF and LF-only lines.  Since sed operates in
6084    # text mode, it properly converts lines to CR/LF.  This bash problem
6085    # is reportedly fixed, but why not run on old versions too?
6086 -  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
6087 -    || (rm -f "$cfgfile"; exit 1)
6088 -
6089 -  _LT_PROG_XSI_SHELLFNS
6090 +  sed '$q' "$ltmain" >> "$cfgfile" \
6091 +     || (rm -f "$cfgfile"; exit 1)
6092  
6093 -  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
6094 -    || (rm -f "$cfgfile"; exit 1)
6095 +  _LT_PROG_REPLACE_SHELLFNS
6096  
6097 -  mv -f "$cfgfile" "$ofile" ||
6098 +   mv -f "$cfgfile" "$ofile" ||
6099      (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
6100    chmod +x "$ofile"
6101  ],
6102 @@ -801,6 +803,7 @@
6103  m4_case([$1],
6104    [C],			[_LT_LANG(C)],
6105    [C++],		[_LT_LANG(CXX)],
6106 +  [Go],			[_LT_LANG(GO)],
6107    [Java],		[_LT_LANG(GCJ)],
6108    [Fortran 77],		[_LT_LANG(F77)],
6109    [Fortran],		[_LT_LANG(FC)],
6110 @@ -822,6 +825,31 @@
6111  ])# _LT_LANG
6112  
6113  
6114 +m4_ifndef([AC_PROG_GO], [
6115 +############################################################
6116 +# NOTE: This macro has been submitted for inclusion into   #
6117 +#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
6118 +#  a released version of Autoconf we should remove this    #
6119 +#  macro and use it instead.                               #
6120 +############################################################
6121 +m4_defun([AC_PROG_GO],
6122 +[AC_LANG_PUSH(Go)dnl
6123 +AC_ARG_VAR([GOC],     [Go compiler command])dnl
6124 +AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
6125 +_AC_ARG_VAR_LDFLAGS()dnl
6126 +AC_CHECK_TOOL(GOC, gccgo)
6127 +if test -z "$GOC"; then
6128 +  if test -n "$ac_tool_prefix"; then
6129 +    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
6130 +  fi
6131 +fi
6132 +if test -z "$GOC"; then
6133 +  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
6134 +fi
6135 +])#m4_defun
6136 +])#m4_ifndef
6137 +
6138 +
6139  # _LT_LANG_DEFAULT_CONFIG
6140  # -----------------------
6141  m4_defun([_LT_LANG_DEFAULT_CONFIG],
6142 @@ -852,6 +880,10 @@
6143         m4_ifdef([LT_PROG_GCJ],
6144  	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
6145  
6146 +AC_PROVIDE_IFELSE([AC_PROG_GO],
6147 +  [LT_LANG(GO)],
6148 +  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
6149 +
6150  AC_PROVIDE_IFELSE([LT_PROG_RC],
6151    [LT_LANG(RC)],
6152    [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
6153 @@ -954,7 +986,13 @@
6154  	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
6155  	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
6156          _lt_result=$?
6157 -	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
6158 +	# If there is a non-empty error log, and "single_module"
6159 +	# appears in it, assume the flag caused a linker warning
6160 +        if test -s conftest.err && $GREP single_module conftest.err; then
6161 +	  cat conftest.err >&AS_MESSAGE_LOG_FD
6162 +	# Otherwise, if the output was created with a 0 exit code from
6163 +	# the compiler, it worked.
6164 +	elif test -f libconftest.dylib && test $_lt_result -eq 0; then
6165  	  lt_cv_apple_cc_single_mod=yes
6166  	else
6167  	  cat conftest.err >&AS_MESSAGE_LOG_FD
6168 @@ -962,6 +1000,7 @@
6169  	rm -rf libconftest.dylib*
6170  	rm -f conftest.*
6171        fi])
6172 +
6173      AC_CACHE_CHECK([for -exported_symbols_list linker flag],
6174        [lt_cv_ld_exported_symbols_list],
6175        [lt_cv_ld_exported_symbols_list=no
6176 @@ -973,6 +1012,7 @@
6177  	[lt_cv_ld_exported_symbols_list=no])
6178  	LDFLAGS="$save_LDFLAGS"
6179      ])
6180 +
6181      AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
6182        [lt_cv_ld_force_load=no
6183        cat > conftest.c << _LT_EOF
6184 @@ -990,7 +1030,9 @@
6185        echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
6186        $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
6187        _lt_result=$?
6188 -      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
6189 +      if test -s conftest.err && $GREP force_load conftest.err; then
6190 +	cat conftest.err >&AS_MESSAGE_LOG_FD
6191 +      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
6192  	lt_cv_ld_force_load=yes
6193        else
6194  	cat conftest.err >&AS_MESSAGE_LOG_FD
6195 @@ -1035,8 +1077,8 @@
6196  ])
6197  
6198  
6199 -# _LT_DARWIN_LINKER_FEATURES
6200 -# --------------------------
6201 +# _LT_DARWIN_LINKER_FEATURES([TAG])
6202 +# ---------------------------------
6203  # Checks for linker and compiler features on darwin
6204  m4_defun([_LT_DARWIN_LINKER_FEATURES],
6205  [
6206 @@ -1047,6 +1089,8 @@
6207    _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6208    if test "$lt_cv_ld_force_load" = "yes"; then
6209      _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\"`'
6210 +    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
6211 +                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
6212    else
6213      _LT_TAGVAR(whole_archive_flag_spec, $1)=''
6214    fi
6215 @@ -1073,30 +1117,41 @@
6216    fi
6217  ])
6218  
6219 -# _LT_SYS_MODULE_PATH_AIX
6220 -# -----------------------
6221 +# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
6222 +# ----------------------------------
6223  # Links a minimal program and checks the executable
6224  # for the system default hardcoded library path. In most cases,
6225  # this is /usr/lib:/lib, but when the MPI compilers are used
6226  # the location of the communication and MPI libs are included too.
6227  # If we don't find anything, use the default library path according
6228  # to the aix ld manual.
6229 +# Store the results from the different compilers for each TAGNAME.
6230 +# Allow to override them for all tags through lt_cv_aix_libpath.
6231  m4_defun([_LT_SYS_MODULE_PATH_AIX],
6232  [m4_require([_LT_DECL_SED])dnl
6233 -AC_LINK_IFELSE(AC_LANG_PROGRAM,[
6234 -lt_aix_libpath_sed='
6235 -    /Import File Strings/,/^$/ {
6236 -	/^0/ {
6237 -	    s/^0  *\(.*\)$/\1/
6238 -	    p
6239 -	}
6240 -    }'
6241 -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
6242 -# Check for a 64-bit object if we didn't find anything.
6243 -if test -z "$aix_libpath"; then
6244 -  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
6245 -fi],[])
6246 -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
6247 +if test "${lt_cv_aix_libpath+set}" = set; then
6248 +  aix_libpath=$lt_cv_aix_libpath
6249 +else
6250 +  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
6251 +  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
6252 +  lt_aix_libpath_sed='[
6253 +      /Import File Strings/,/^$/ {
6254 +	  /^0/ {
6255 +	      s/^0  *\([^ ]*\) *$/\1/
6256 +	      p
6257 +	  }
6258 +      }]'
6259 +  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
6260 +  # Check for a 64-bit object if we didn't find anything.
6261 +  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
6262 +    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
6263 +  fi],[])
6264 +  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
6265 +    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
6266 +  fi
6267 +  ])
6268 +  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
6269 +fi
6270  ])# _LT_SYS_MODULE_PATH_AIX
6271  
6272  
6273 @@ -1121,7 +1176,7 @@
6274  
6275  AC_MSG_CHECKING([how to print strings])
6276  # Test print first, because it will be a builtin if present.
6277 -if test "X`print -r -- -n 2>/dev/null`" = X-n && \
6278 +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
6279     test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
6280    ECHO='print -r --'
6281  elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
6282 @@ -1165,6 +1220,39 @@
6283  ])# _LT_PROG_ECHO_BACKSLASH
6284  
6285  
6286 +# _LT_WITH_SYSROOT
6287 +# ----------------
6288 +AC_DEFUN([_LT_WITH_SYSROOT],
6289 +[AC_MSG_CHECKING([for sysroot])
6290 +AC_ARG_WITH([sysroot],
6291 +[  --with-sysroot[=DIR] Search for dependent libraries within DIR
6292 +                        (or the compiler's sysroot if not specified).],
6293 +[], [with_sysroot=no])
6294 +
6295 +dnl lt_sysroot will always be passed unquoted.  We quote it here
6296 +dnl in case the user passed a directory name.
6297 +lt_sysroot=
6298 +case ${with_sysroot} in #(
6299 + yes)
6300 +   if test "$GCC" = yes; then
6301 +     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
6302 +   fi
6303 +   ;; #(
6304 + /*)
6305 +   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
6306 +   ;; #(
6307 + no|'')
6308 +   ;; #(
6309 + *)
6310 +   AC_MSG_RESULT([${with_sysroot}])
6311 +   AC_MSG_ERROR([The sysroot must be an absolute path.])
6312 +   ;;
6313 +esac
6314 +
6315 + AC_MSG_RESULT([${lt_sysroot:-no}])
6316 +_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
6317 +[dependent libraries, and in which our libraries should be installed.])])
6318 +
6319  # _LT_ENABLE_LOCK
6320  # ---------------
6321  m4_defun([_LT_ENABLE_LOCK],
6322 @@ -1286,14 +1374,27 @@
6323      CFLAGS="$SAVE_CFLAGS"
6324    fi
6325    ;;
6326 -sparc*-*solaris*)
6327 +*-*solaris*)
6328    # Find out which ABI we are using.
6329    echo 'int i;' > conftest.$ac_ext
6330    if AC_TRY_EVAL(ac_compile); then
6331      case `/usr/bin/file conftest.o` in
6332      *64-bit*)
6333        case $lt_cv_prog_gnu_ld in
6334 -      yes*) LD="${LD-ld} -m elf64_sparc" ;;
6335 +      yes*)
6336 +        case $host in
6337 +        i?86-*-solaris*)
6338 +          LD="${LD-ld} -m elf_x86_64"
6339 +          ;;
6340 +        sparc*-*-solaris*)
6341 +          LD="${LD-ld} -m elf64_sparc"
6342 +          ;;
6343 +        esac
6344 +        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
6345 +        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
6346 +          LD="${LD-ld}_sol2"
6347 +        fi
6348 +        ;;
6349        *)
6350  	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
6351  	  LD="${LD-ld} -64"
6352 @@ -1311,14 +1412,47 @@
6353  ])# _LT_ENABLE_LOCK
6354  
6355  
6356 +# _LT_PROG_AR
6357 +# -----------
6358 +m4_defun([_LT_PROG_AR],
6359 +[AC_CHECK_TOOLS(AR, [ar], false)
6360 +: ${AR=ar}
6361 +: ${AR_FLAGS=cru}
6362 +_LT_DECL([], [AR], [1], [The archiver])
6363 +_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
6364 +
6365 +AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
6366 +  [lt_cv_ar_at_file=no
6367 +   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
6368 +     [echo conftest.$ac_objext > conftest.lst
6369 +      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
6370 +      AC_TRY_EVAL([lt_ar_try])
6371 +      if test "$ac_status" -eq 0; then
6372 +	# Ensure the archiver fails upon bogus file names.
6373 +	rm -f conftest.$ac_objext libconftest.a
6374 +	AC_TRY_EVAL([lt_ar_try])
6375 +	if test "$ac_status" -ne 0; then
6376 +          lt_cv_ar_at_file=@
6377 +        fi
6378 +      fi
6379 +      rm -f conftest.* libconftest.a
6380 +     ])
6381 +  ])
6382 +
6383 +if test "x$lt_cv_ar_at_file" = xno; then
6384 +  archiver_list_spec=
6385 +else
6386 +  archiver_list_spec=$lt_cv_ar_at_file
6387 +fi
6388 +_LT_DECL([], [archiver_list_spec], [1],
6389 +  [How to feed a file listing to the archiver])
6390 +])# _LT_PROG_AR
6391 +
6392 +
6393  # _LT_CMD_OLD_ARCHIVE
6394  # -------------------
6395  m4_defun([_LT_CMD_OLD_ARCHIVE],
6396 -[AC_CHECK_TOOL(AR, ar, false)
6397 -test -z "$AR" && AR=ar
6398 -test -z "$AR_FLAGS" && AR_FLAGS=cru
6399 -_LT_DECL([], [AR], [1], [The archiver])
6400 -_LT_DECL([], [AR_FLAGS], [1])
6401 +[_LT_PROG_AR
6402  
6403  AC_CHECK_TOOL(STRIP, strip, :)
6404  test -z "$STRIP" && STRIP=:
6405 @@ -1337,13 +1471,13 @@
6406  if test -n "$RANLIB"; then
6407    case $host_os in
6408    openbsd*)
6409 -    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
6410 +    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
6411      ;;
6412    *)
6413 -    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
6414 +    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
6415      ;;
6416    esac
6417 -  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
6418 +  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
6419  fi
6420  
6421  case $host_os in
6422 @@ -1523,6 +1657,11 @@
6423      lt_cv_sys_max_cmd_len=196608
6424      ;;
6425  
6426 +  os2*)
6427 +    # The test takes a long time on OS/2.
6428 +    lt_cv_sys_max_cmd_len=8192
6429 +    ;;
6430 +
6431    osf*)
6432      # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
6433      # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
6434 @@ -1562,7 +1701,7 @@
6435        # If test is not a shell built-in, we'll probably end up computing a
6436        # maximum length that is only half of the actual maximum length, but
6437        # we can't tell.
6438 -      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
6439 +      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
6440  	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
6441  	      test $i != 17 # 1/2 MB should be enough
6442        do
6443 @@ -1658,10 +1797,10 @@
6444  /* When -fvisbility=hidden is used, assume the code has been annotated
6445     correspondingly for the symbols needed.  */
6446  #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
6447 -void fnord () __attribute__((visibility("default")));
6448 +int fnord () __attribute__((visibility("default")));
6449  #endif
6450  
6451 -void fnord () { int i=42; }
6452 +int fnord () { return 42; }
6453  int main ()
6454  {
6455    void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6456 @@ -1903,21 +2042,6 @@
6457      AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
6458      need_locks=warn
6459    fi
6460 -  # sanitize
6461 -  new_sys_lib_search_path_spec=
6462 -  for d in $sys_lib_search_path_spec ; do
6463 -    # check if exists
6464 -    if test -d $d -a -x $d ; then
6465 -      # normalize
6466 -      new_d=$(cd $d ; pwd)
6467 -      # uniq
6468 -      if ! echo "$new_sys_lib_search_path_spec" | grep -q -F -e " $new_d " ; then
6469 -        new_sys_lib_search_path_spec="$new_sys_lib_search_path_spec $new_d "
6470 -      fi
6471 -    fi
6472 -  done
6473 -  # compress spaces
6474 -  sys_lib_search_path_spec=`echo "$new_sys_lib_search_path_spec" | $SED -e 's/^ *//g;s/ \+/ /g;s/ $//g'`
6475  else
6476    need_locks=no
6477  fi
6478 @@ -2123,7 +2247,7 @@
6479  
6480  case $host_os in
6481  aix3*)
6482 -  version_type=linux
6483 +  version_type=linux # correct to gnu/linux during the next big refactor
6484    library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
6485    shlibpath_var=LIBPATH
6486  
6487 @@ -2132,7 +2256,7 @@
6488    ;;
6489  
6490  aix[[4-9]]*)
6491 -  version_type=linux
6492 +  version_type=linux # correct to gnu/linux during the next big refactor
6493    need_lib_prefix=no
6494    need_version=no
6495    hardcode_into_libs=yes
6496 @@ -2197,7 +2321,7 @@
6497    ;;
6498  
6499  bsdi[[45]]*)
6500 -  version_type=linux
6501 +  version_type=linux # correct to gnu/linux during the next big refactor
6502    need_version=no
6503    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6504    soname_spec='${libname}${release}${shared_ext}$major'
6505 @@ -2216,8 +2340,9 @@
6506    need_version=no
6507    need_lib_prefix=no
6508  
6509 -  case $GCC,$host_os in
6510 -  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
6511 +  case $GCC,$cc_basename in
6512 +  yes,*)
6513 +    # gcc
6514      library_names_spec='$libname.dll.a'
6515      # DLL is installed to $(libdir)/../bin by postinstall_cmds
6516      postinstall_cmds='base_file=`basename \${file}`~
6517 @@ -2250,13 +2375,71 @@
6518        library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
6519        ;;
6520      esac
6521 +    dynamic_linker='Win32 ld.exe'
6522 +    ;;
6523 +
6524 +  *,cl*)
6525 +    # Native MSVC
6526 +    libname_spec='$name'
6527 +    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
6528 +    library_names_spec='${libname}.dll.lib'
6529 +
6530 +    case $build_os in
6531 +    mingw*)
6532 +      sys_lib_search_path_spec=
6533 +      lt_save_ifs=$IFS
6534 +      IFS=';'
6535 +      for lt_path in $LIB
6536 +      do
6537 +        IFS=$lt_save_ifs
6538 +        # Let DOS variable expansion print the short 8.3 style file name.
6539 +        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
6540 +        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
6541 +      done
6542 +      IFS=$lt_save_ifs
6543 +      # Convert to MSYS style.
6544 +      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
6545 +      ;;
6546 +    cygwin*)
6547 +      # Convert to unix form, then to dos form, then back to unix form
6548 +      # but this time dos style (no spaces!) so that the unix form looks
6549 +      # like /cygdrive/c/PROGRA~1:/cygdr...
6550 +      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
6551 +      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
6552 +      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
6553 +      ;;
6554 +    *)
6555 +      sys_lib_search_path_spec="$LIB"
6556 +      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
6557 +        # It is most probably a Windows format PATH.
6558 +        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
6559 +      else
6560 +        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
6561 +      fi
6562 +      # FIXME: find the short name or the path components, as spaces are
6563 +      # common. (e.g. "Program Files" -> "PROGRA~1")
6564 +      ;;
6565 +    esac
6566 +
6567 +    # DLL is installed to $(libdir)/../bin by postinstall_cmds
6568 +    postinstall_cmds='base_file=`basename \${file}`~
6569 +      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
6570 +      dldir=$destdir/`dirname \$dlpath`~
6571 +      test -d \$dldir || mkdir -p \$dldir~
6572 +      $install_prog $dir/$dlname \$dldir/$dlname'
6573 +    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
6574 +      dlpath=$dir/\$dldll~
6575 +       $RM \$dlpath'
6576 +    shlibpath_overrides_runpath=yes
6577 +    dynamic_linker='Win32 link.exe'
6578      ;;
6579  
6580    *)
6581 +    # Assume MSVC wrapper
6582      library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
6583 +    dynamic_linker='Win32 ld.exe'
6584      ;;
6585    esac
6586 -  dynamic_linker='Win32 ld.exe'
6587    # FIXME: first we should search . and the directory the executable is in
6588    shlibpath_var=PATH
6589    ;;
6590 @@ -2277,7 +2460,7 @@
6591    ;;
6592  
6593  dgux*)
6594 -  version_type=linux
6595 +  version_type=linux # correct to gnu/linux during the next big refactor
6596    need_lib_prefix=no
6597    need_version=no
6598    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
6599 @@ -2285,10 +2468,6 @@
6600    shlibpath_var=LD_LIBRARY_PATH
6601    ;;
6602  
6603 -freebsd1*)
6604 -  dynamic_linker=no
6605 -  ;;
6606 -
6607  freebsd* | dragonfly*)
6608    # DragonFly does not have aout.  When/if they implement a new
6609    # versioning mechanism, adjust this.
6610 @@ -2296,7 +2475,7 @@
6611      objformat=`/usr/bin/objformat`
6612    else
6613      case $host_os in
6614 -    freebsd[[123]]*) objformat=aout ;;
6615 +    freebsd[[23]].*) objformat=aout ;;
6616      *) objformat=elf ;;
6617      esac
6618    fi
6619 @@ -2314,7 +2493,7 @@
6620    esac
6621    shlibpath_var=LD_LIBRARY_PATH
6622    case $host_os in
6623 -  freebsd2*)
6624 +  freebsd2.*)
6625      shlibpath_overrides_runpath=yes
6626      ;;
6627    freebsd3.[[01]]* | freebsdelf3.[[01]]*)
6628 @@ -2334,17 +2513,18 @@
6629    ;;
6630  
6631  gnu*)
6632 -  version_type=linux
6633 +  version_type=linux # correct to gnu/linux during the next big refactor
6634    need_lib_prefix=no
6635    need_version=no
6636    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
6637    soname_spec='${libname}${release}${shared_ext}$major'
6638    shlibpath_var=LD_LIBRARY_PATH
6639 +  shlibpath_overrides_runpath=no
6640    hardcode_into_libs=yes
6641    ;;
6642  
6643  haiku*)
6644 -  version_type=linux
6645 +  version_type=linux # correct to gnu/linux during the next big refactor
6646    need_lib_prefix=no
6647    need_version=no
6648    dynamic_linker="$host_os runtime_loader"
6649 @@ -2405,7 +2585,7 @@
6650    ;;
6651  
6652  interix[[3-9]]*)
6653 -  version_type=linux
6654 +  version_type=linux # correct to gnu/linux during the next big refactor
6655    need_lib_prefix=no
6656    need_version=no
6657    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
6658 @@ -2421,7 +2601,7 @@
6659      nonstopux*) version_type=nonstopux ;;
6660      *)
6661  	if test "$lt_cv_prog_gnu_ld" = yes; then
6662 -		version_type=linux
6663 +		version_type=linux # correct to gnu/linux during the next big refactor
6664  	else
6665  		version_type=irix
6666  	fi ;;
6667 @@ -2458,9 +2638,9 @@
6668    dynamic_linker=no
6669    ;;
6670  
6671 -# This must be Linux ELF.
6672 +# This must be glibc/ELF.
6673  linux* | k*bsd*-gnu | kopensolaris*-gnu)
6674 -  version_type=linux
6675 +  version_type=linux # correct to gnu/linux during the next big refactor
6676    need_lib_prefix=no
6677    need_version=no
6678    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6679 @@ -2502,26 +2682,18 @@
6680    # people can always --disable-shared, the test was removed, and we
6681    # assume the GNU/Linux dynamic linker is in use.
6682    dynamic_linker='GNU/Linux ld.so'
6683 +  ;;
6684  
6685 -  # Find out which ABI we are using (multilib Linux x86_64 hack).
6686 -  libsuff=
6687 -  case "$host_cpu" in
6688 -  x86_64*|s390x*|powerpc64*|sparc64*)
6689 -    echo '[#]line __oline__ "configure"' > conftest.$ac_ext
6690 -    if AC_TRY_EVAL(ac_compile); then
6691 -      case `/usr/bin/file conftest.$ac_objext` in
6692 -      *64-bit*)
6693 -        libsuff=64
6694 -        ;;
6695 -      esac
6696 -    fi
6697 -    rm -rf conftest*
6698 -    ;;
6699 -  *)
6700 -    ;;
6701 -  esac
6702 -  sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
6703 -  sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
6704 +netbsdelf*-gnu)
6705 +  version_type=linux
6706 +  need_lib_prefix=no
6707 +  need_version=no
6708 +  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
6709 +  soname_spec='${libname}${release}${shared_ext}$major'
6710 +  shlibpath_var=LD_LIBRARY_PATH
6711 +  shlibpath_overrides_runpath=no
6712 +  hardcode_into_libs=yes
6713 +  dynamic_linker='NetBSD ld.elf_so'
6714    ;;
6715  
6716  netbsd*)
6717 @@ -2543,7 +2715,7 @@
6718    ;;
6719  
6720  newsos6)
6721 -  version_type=linux
6722 +  version_type=linux # correct to gnu/linux during the next big refactor
6723    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6724    shlibpath_var=LD_LIBRARY_PATH
6725    shlibpath_overrides_runpath=yes
6726 @@ -2612,7 +2784,7 @@
6727    ;;
6728  
6729  solaris*)
6730 -  version_type=linux
6731 +  version_type=linux # correct to gnu/linux during the next big refactor
6732    need_lib_prefix=no
6733    need_version=no
6734    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6735 @@ -2637,7 +2809,7 @@
6736    ;;
6737  
6738  sysv4 | sysv4.3*)
6739 -  version_type=linux
6740 +  version_type=linux # correct to gnu/linux during the next big refactor
6741    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6742    soname_spec='${libname}${release}${shared_ext}$major'
6743    shlibpath_var=LD_LIBRARY_PATH
6744 @@ -2661,7 +2833,7 @@
6745  
6746  sysv4*MP*)
6747    if test -d /usr/nec ;then
6748 -    version_type=linux
6749 +    version_type=linux # correct to gnu/linux during the next big refactor
6750      library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
6751      soname_spec='$libname${shared_ext}.$major'
6752      shlibpath_var=LD_LIBRARY_PATH
6753 @@ -2692,7 +2864,7 @@
6754  
6755  tpf*)
6756    # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
6757 -  version_type=linux
6758 +  version_type=linux # correct to gnu/linux during the next big refactor
6759    need_lib_prefix=no
6760    need_version=no
6761    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6762 @@ -2702,7 +2874,7 @@
6763    ;;
6764  
6765  uts4*)
6766 -  version_type=linux
6767 +  version_type=linux # correct to gnu/linux during the next big refactor
6768    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
6769    soname_spec='${libname}${release}${shared_ext}$major'
6770    shlibpath_var=LD_LIBRARY_PATH
6771 @@ -2980,6 +3152,11 @@
6772  esac
6773  reload_cmds='$LD$reload_flag -o $output$reload_objs'
6774  case $host_os in
6775 +  cygwin* | mingw* | pw32* | cegcc*)
6776 +    if test "$GCC" != yes; then
6777 +      reload_cmds=false
6778 +    fi
6779 +    ;;
6780    darwin*)
6781      if test "$GCC" = yes; then
6782        reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
6783 @@ -3119,12 +3296,12 @@
6784    lt_cv_deplibs_check_method=pass_all
6785    ;;
6786  
6787 -# This must be Linux ELF.
6788 +# This must be glibc/ELF.
6789  linux* | k*bsd*-gnu | kopensolaris*-gnu)
6790    lt_cv_deplibs_check_method=pass_all
6791    ;;
6792  
6793 -netbsd*)
6794 +netbsd* | netbsdelf*-gnu)
6795    if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
6796      lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
6797    else
6798 @@ -3198,6 +3375,21 @@
6799    ;;
6800  esac
6801  ])
6802 +
6803 +file_magic_glob=
6804 +want_nocaseglob=no
6805 +if test "$build" = "$host"; then
6806 +  case $host_os in
6807 +  mingw* | pw32*)
6808 +    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
6809 +      want_nocaseglob=yes
6810 +    else
6811 +      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
6812 +    fi
6813 +    ;;
6814 +  esac
6815 +fi
6816 +
6817  file_magic_cmd=$lt_cv_file_magic_cmd
6818  deplibs_check_method=$lt_cv_deplibs_check_method
6819  test -z "$deplibs_check_method" && deplibs_check_method=unknown
6820 @@ -3205,7 +3397,11 @@
6821  _LT_DECL([], [deplibs_check_method], [1],
6822      [Method to check whether dependent libraries are shared objects])
6823  _LT_DECL([], [file_magic_cmd], [1],
6824 -    [Command to use when deplibs_check_method == "file_magic"])
6825 +    [Command to use when deplibs_check_method = "file_magic"])
6826 +_LT_DECL([], [file_magic_glob], [1],
6827 +    [How to find potential files when deplibs_check_method = "file_magic"])
6828 +_LT_DECL([], [want_nocaseglob], [1],
6829 +    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
6830  ])# _LT_CHECK_MAGIC_METHOD
6831  
6832  
6833 @@ -3308,6 +3504,67 @@
6834  dnl AC_DEFUN([AM_PROG_NM], [])
6835  dnl AC_DEFUN([AC_PROG_NM], [])
6836  
6837 +# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
6838 +# --------------------------------
6839 +# how to determine the name of the shared library
6840 +# associated with a specific link library.
6841 +#  -- PORTME fill in with the dynamic library characteristics
6842 +m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
6843 +[m4_require([_LT_DECL_EGREP])
6844 +m4_require([_LT_DECL_OBJDUMP])
6845 +m4_require([_LT_DECL_DLLTOOL])
6846 +AC_CACHE_CHECK([how to associate runtime and link libraries],
6847 +lt_cv_sharedlib_from_linklib_cmd,
6848 +[lt_cv_sharedlib_from_linklib_cmd='unknown'
6849 +
6850 +case $host_os in
6851 +cygwin* | mingw* | pw32* | cegcc*)
6852 +  # two different shell functions defined in ltmain.sh
6853 +  # decide which to use based on capabilities of $DLLTOOL
6854 +  case `$DLLTOOL --help 2>&1` in
6855 +  *--identify-strict*)
6856 +    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
6857 +    ;;
6858 +  *)
6859 +    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
6860 +    ;;
6861 +  esac
6862 +  ;;
6863 +*)
6864 +  # fallback: assume linklib IS sharedlib
6865 +  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
6866 +  ;;
6867 +esac
6868 +])
6869 +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
6870 +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
6871 +
6872 +_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
6873 +    [Command to associate shared and link libraries])
6874 +])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
6875 +
6876 +
6877 +# _LT_PATH_MANIFEST_TOOL
6878 +# ----------------------
6879 +# locate the manifest tool
6880 +m4_defun([_LT_PATH_MANIFEST_TOOL],
6881 +[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
6882 +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
6883 +AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
6884 +  [lt_cv_path_mainfest_tool=no
6885 +  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
6886 +  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
6887 +  cat conftest.err >&AS_MESSAGE_LOG_FD
6888 +  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
6889 +    lt_cv_path_mainfest_tool=yes
6890 +  fi
6891 +  rm -f conftest*])
6892 +if test "x$lt_cv_path_mainfest_tool" != xyes; then
6893 +  MANIFEST_TOOL=:
6894 +fi
6895 +_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
6896 +])# _LT_PATH_MANIFEST_TOOL
6897 +
6898  
6899  # LT_LIB_M
6900  # --------
6901 @@ -3434,8 +3691,8 @@
6902  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6903  
6904  # Transform an extracted symbol line into symbol name and symbol address
6905 -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
6906 -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'"
6907 +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
6908 +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'"
6909  
6910  # Handle CRLF in mingw tool chain
6911  opt_cr=
6912 @@ -3459,6 +3716,7 @@
6913      # which start with @ or ?.
6914      lt_cv_sys_global_symbol_pipe="$AWK ['"\
6915  "     {last_section=section; section=\$ 3};"\
6916 +"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
6917  "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
6918  "     \$ 0!~/External *\|/{next};"\
6919  "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
6920 @@ -3471,6 +3729,7 @@
6921    else
6922      lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
6923    fi
6924 +  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
6925  
6926    # Check to see that the pipe works correctly.
6927    pipe_works=no
6928 @@ -3504,6 +3763,18 @@
6929        if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
6930  	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
6931  	  cat <<_LT_EOF > conftest.$ac_ext
6932 +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
6933 +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
6934 +/* DATA imports from DLLs on WIN32 con't be const, because runtime
6935 +   relocations are performed -- see ld's documentation on pseudo-relocs.  */
6936 +# define LT@&t@_DLSYM_CONST
6937 +#elif defined(__osf__)
6938 +/* This system does not cope well with relocations in const data.  */
6939 +# define LT@&t@_DLSYM_CONST
6940 +#else
6941 +# define LT@&t@_DLSYM_CONST const
6942 +#endif
6943 +
6944  #ifdef __cplusplus
6945  extern "C" {
6946  #endif
6947 @@ -3515,7 +3786,7 @@
6948  	  cat <<_LT_EOF >> conftest.$ac_ext
6949  
6950  /* The mapping between symbol names and symbols.  */
6951 -const struct {
6952 +LT@&t@_DLSYM_CONST struct {
6953    const char *name;
6954    void       *address;
6955  }
6956 @@ -3541,15 +3812,15 @@
6957  _LT_EOF
6958  	  # Now try linking the two files.
6959  	  mv conftest.$ac_objext conftstm.$ac_objext
6960 -	  lt_save_LIBS="$LIBS"
6961 -	  lt_save_CFLAGS="$CFLAGS"
6962 +	  lt_globsym_save_LIBS=$LIBS
6963 +	  lt_globsym_save_CFLAGS=$CFLAGS
6964  	  LIBS="conftstm.$ac_objext"
6965  	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
6966  	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
6967  	    pipe_works=yes
6968  	  fi
6969 -	  LIBS="$lt_save_LIBS"
6970 -	  CFLAGS="$lt_save_CFLAGS"
6971 +	  LIBS=$lt_globsym_save_LIBS
6972 +	  CFLAGS=$lt_globsym_save_CFLAGS
6973  	else
6974  	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
6975  	fi
6976 @@ -3582,6 +3853,13 @@
6977    AC_MSG_RESULT(ok)
6978  fi
6979  
6980 +# Response file support.
6981 +if test "$lt_cv_nm_interface" = "MS dumpbin"; then
6982 +  nm_file_list_spec='@'
6983 +elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
6984 +  nm_file_list_spec='@'
6985 +fi
6986 +
6987  _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
6988      [Take the output of nm and produce a listing of raw symbols and C names])
6989  _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
6990 @@ -3592,6 +3870,8 @@
6991  _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
6992      [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
6993      [Transform the output of nm in a C name address pair when lib prefix is needed])
6994 +_LT_DECL([], [nm_file_list_spec], [1],
6995 +    [Specify filename containing input files for $NM])
6996  ]) # _LT_CMD_GLOBAL_SYMBOLS
6997  
6998  
6999 @@ -3603,7 +3883,6 @@
7000  _LT_TAGVAR(lt_prog_compiler_pic, $1)=
7001  _LT_TAGVAR(lt_prog_compiler_static, $1)=
7002  
7003 -AC_MSG_CHECKING([for $compiler option to produce PIC])
7004  m4_if([$1], [CXX], [
7005    # C++ specific cases for pic, static, wl, etc.
7006    if test "$GXX" = yes; then
7007 @@ -3708,6 +3987,12 @@
7008  	  ;;
7009  	esac
7010  	;;
7011 +      mingw* | cygwin* | os2* | pw32* | cegcc*)
7012 +	# This hack is so that the source file can tell whether it is being
7013 +	# built for inclusion in a dll (and should export symbols for example).
7014 +	m4_if([$1], [GCJ], [],
7015 +	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
7016 +	;;
7017        dgux*)
7018  	case $cc_basename in
7019  	  ec++*)
7020 @@ -3828,7 +4113,7 @@
7021  	    ;;
7022  	esac
7023  	;;
7024 -      netbsd*)
7025 +      netbsd* | netbsdelf*-gnu)
7026  	;;
7027        *qnx* | *nto*)
7028          # QNX uses GNU C++, but need to define -shared option too, otherwise
7029 @@ -4016,7 +4301,9 @@
7030      case $cc_basename in
7031      nvcc*) # Cuda Compiler Driver 2.2
7032        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
7033 -      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
7034 +      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
7035 +        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
7036 +      fi
7037        ;;
7038      esac
7039    else
7040 @@ -4082,6 +4369,12 @@
7041  	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
7042  	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
7043  	;;
7044 +      nagfor*)
7045 +	# NAG Fortran compiler
7046 +	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
7047 +	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
7048 +	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7049 +	;;
7050        pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
7051          # Portland Group compilers (*not* the Pentium gcc compiler,
7052  	# which looks to be a dead project)
7053 @@ -4102,18 +4395,33 @@
7054  	;;
7055        *)
7056  	case `$CC -V 2>&1 | sed 5q` in
7057 -	*Sun\ F* | *Sun*Fortran*)
7058 +	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
7059  	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
7060  	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7061  	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7062  	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
7063  	  ;;
7064 +	*Sun\ F* | *Sun*Fortran*)
7065 +	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7066 +	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7067 +	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
7068 +	  ;;
7069  	*Sun\ C*)
7070  	  # Sun C 5.9
7071  	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7072  	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7073  	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7074  	  ;;
7075 +        *Intel*\ [[CF]]*Compiler*)
7076 +	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7077 +	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7078 +	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
7079 +	  ;;
7080 +	*Portland\ Group*)
7081 +	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7082 +	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
7083 +	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7084 +	  ;;
7085  	esac
7086  	;;
7087        esac
7088 @@ -4201,9 +4509,11 @@
7089      _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
7090      ;;
7091  esac
7092 -AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
7093 -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
7094 -	[How to pass a linker flag through the compiler])
7095 +
7096 +AC_CACHE_CHECK([for $compiler option to produce PIC],
7097 +  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
7098 +  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
7099 +_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
7100  
7101  #
7102  # Check to make sure the PIC flag actually works.
7103 @@ -4222,6 +4532,8 @@
7104  _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
7105  	[Additional compiler flags for building library objects])
7106  
7107 +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
7108 +	[How to pass a linker flag through the compiler])
7109  #
7110  # Check to make sure the static flag actually works.
7111  #
7112 @@ -4242,6 +4554,7 @@
7113  m4_defun([_LT_LINKER_SHLIBS],
7114  [AC_REQUIRE([LT_PATH_LD])dnl
7115  AC_REQUIRE([LT_PATH_NM])dnl
7116 +m4_require([_LT_PATH_MANIFEST_TOOL])dnl
7117  m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7118  m4_require([_LT_DECL_EGREP])dnl
7119  m4_require([_LT_DECL_SED])dnl
7120 @@ -4250,6 +4563,7 @@
7121  AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7122  m4_if([$1], [CXX], [
7123    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7124 +  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
7125    case $host_os in
7126    aix[[4-9]]*)
7127      # If we're using GNU nm, then we don't want the "-C" option.
7128 @@ -4264,15 +4578,25 @@
7129      ;;
7130    pw32*)
7131      _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
7132 -  ;;
7133 +    ;;
7134    cygwin* | mingw* | cegcc*)
7135 -    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
7136 -  ;;
7137 +    case $cc_basename in
7138 +    cl*)
7139 +      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
7140 +      ;;
7141 +    *)
7142 +      _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'
7143 +      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
7144 +      ;;
7145 +    esac
7146 +    ;;
7147 +  linux* | k*bsd*-gnu | gnu*)
7148 +    _LT_TAGVAR(link_all_deplibs, $1)=no
7149 +    ;;
7150    *)
7151      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7152 -  ;;
7153 +    ;;
7154    esac
7155 -  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
7156  ], [
7157    runpath_var=
7158    _LT_TAGVAR(allow_undefined_flag, $1)=
7159 @@ -4287,7 +4611,6 @@
7160    _LT_TAGVAR(hardcode_direct, $1)=no
7161    _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7162    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7163 -  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7164    _LT_TAGVAR(hardcode_libdir_separator, $1)=
7165    _LT_TAGVAR(hardcode_minus_L, $1)=no
7166    _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7167 @@ -4332,6 +4655,9 @@
7168    openbsd*)
7169      with_gnu_ld=no
7170      ;;
7171 +  linux* | k*bsd*-gnu | gnu*)
7172 +    _LT_TAGVAR(link_all_deplibs, $1)=no
7173 +    ;;
7174    esac
7175  
7176    _LT_TAGVAR(ld_shlibs, $1)=yes
7177 @@ -4440,10 +4766,11 @@
7178        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7179        _LT_TAGVAR(always_export_symbols, $1)=no
7180        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7181 -      _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'
7182 +      _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'
7183 +      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
7184  
7185        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7186 -        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $compiler_flags $deplibs -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7187 +        _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'
7188  	# If the export-symbols file already is a .def file (1st line
7189  	# is EXPORTS), use it as is; otherwise, prepend...
7190  	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7191 @@ -4452,7 +4779,7 @@
7192  	  echo EXPORTS > $output_objdir/$soname.def;
7193  	  cat $export_symbols >> $output_objdir/$soname.def;
7194  	fi~
7195 -	$CC -shared $output_objdir/$soname.def $libobjs $compiler_flags $deplibs -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7196 +	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7197        else
7198  	_LT_TAGVAR(ld_shlibs, $1)=no
7199        fi
7200 @@ -4488,7 +4815,7 @@
7201        if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
7202  	 && test "$tmp_diet" = no
7203        then
7204 -	tmp_addflag=
7205 +	tmp_addflag=' $pic_flag'
7206  	tmp_sharedflag='-shared'
7207  	case $cc_basename,$host_cpu in
7208          pgcc*)				# Portland Group C compiler
7209 @@ -4524,21 +4851,20 @@
7210  	*Sun\ F*)			# Sun Fortran 8.3
7211  	  tmp_sharedflag='-G' ;;
7212  	esac
7213 -	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
7214 +	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7215  
7216          if test "x$supports_anon_versioning" = xyes; then
7217            _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7218  	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7219  	    echo "local: *; };" >> $output_objdir/$libname.ver~
7220 -	    $CC '"$tmp_sharedflag""$tmp_addflag"' $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7221 +	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7222          fi
7223  
7224  	case $cc_basename in
7225  	xlf* | bgf* | bgxlf* | mpixlf*)
7226  	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
7227  	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
7228 -	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7229 -	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
7230 +	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7231  	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
7232  	  if test "x$supports_anon_versioning" = xyes; then
7233  	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7234 @@ -4553,13 +4879,13 @@
7235        fi
7236        ;;
7237  
7238 -    netbsd*)
7239 +    netbsd* | netbsdelf*-gnu)
7240        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7241  	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
7242  	wlarc=
7243        else
7244 -	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
7245 -	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7246 +	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7247 +	_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'
7248        fi
7249        ;;
7250  
7251 @@ -4577,8 +4903,8 @@
7252  
7253  _LT_EOF
7254        elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7255 -	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
7256 -	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7257 +	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7258 +	_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'
7259        else
7260  	_LT_TAGVAR(ld_shlibs, $1)=no
7261        fi
7262 @@ -4624,8 +4950,8 @@
7263  
7264      *)
7265        if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7266 -	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
7267 -	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7268 +	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7269 +	_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'
7270        else
7271  	_LT_TAGVAR(ld_shlibs, $1)=no
7272        fi
7273 @@ -4730,6 +5056,7 @@
7274  	if test "$aix_use_runtimelinking" = yes; then
7275  	  shared_flag="$shared_flag "'${wl}-G'
7276  	fi
7277 +	_LT_TAGVAR(link_all_deplibs, $1)=no
7278        else
7279  	# not using gcc
7280  	if test "$host_cpu" = ia64; then
7281 @@ -4755,7 +5082,7 @@
7282  	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7283          # Determine the default libpath from the value encoded in an
7284          # empty executable.
7285 -        _LT_SYS_MODULE_PATH_AIX
7286 +        _LT_SYS_MODULE_PATH_AIX([$1])
7287          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7288          _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"
7289        else
7290 @@ -4766,7 +5093,7 @@
7291  	else
7292  	 # Determine the default libpath from the value encoded in an
7293  	 # empty executable.
7294 -	 _LT_SYS_MODULE_PATH_AIX
7295 +	 _LT_SYS_MODULE_PATH_AIX([$1])
7296  	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7297  	  # Warning - without using the other run time loading flags,
7298  	  # -berok will link without error, but may produce a broken library.
7299 @@ -4810,20 +5137,64 @@
7300        # Microsoft Visual C++.
7301        # hardcode_libdir_flag_spec is actually meaningless, as there is
7302        # no search path for DLLs.
7303 -      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7304 -      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7305 -      # Tell ltmain to make .lib files, not .a files.
7306 -      libext=lib
7307 -      # Tell ltmain to make .dll files, not .so files.
7308 -      shrext_cmds=".dll"
7309 -      # FIXME: Setting linknames here is a bad hack.
7310 -      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $compiler_flags $libobjs `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
7311 -      # The linker will automatically build a .lib file if we build a DLL.
7312 -      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7313 -      # FIXME: Should let the user specify the lib program.
7314 -      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
7315 -      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
7316 -      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7317 +      case $cc_basename in
7318 +      cl*)
7319 +	# Native MSVC
7320 +	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7321 +	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7322 +	_LT_TAGVAR(always_export_symbols, $1)=yes
7323 +	_LT_TAGVAR(file_list_spec, $1)='@'
7324 +	# Tell ltmain to make .lib files, not .a files.
7325 +	libext=lib
7326 +	# Tell ltmain to make .dll files, not .so files.
7327 +	shrext_cmds=".dll"
7328 +	# FIXME: Setting linknames here is a bad hack.
7329 +	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
7330 +	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7331 +	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
7332 +	  else
7333 +	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
7334 +	  fi~
7335 +	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7336 +	  linknames='
7337 +	# The linker will not automatically build a static lib if we build a DLL.
7338 +	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7339 +	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7340 +	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
7341 +	_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'
7342 +	# Don't use ranlib
7343 +	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7344 +	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7345 +	  lt_tool_outputfile="@TOOL_OUTPUT@"~
7346 +	  case $lt_outputfile in
7347 +	    *.exe|*.EXE) ;;
7348 +	    *)
7349 +	      lt_outputfile="$lt_outputfile.exe"
7350 +	      lt_tool_outputfile="$lt_tool_outputfile.exe"
7351 +	      ;;
7352 +	  esac~
7353 +	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
7354 +	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7355 +	    $RM "$lt_outputfile.manifest";
7356 +	  fi'
7357 +	;;
7358 +      *)
7359 +	# Assume MSVC wrapper
7360 +	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7361 +	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7362 +	# Tell ltmain to make .lib files, not .a files.
7363 +	libext=lib
7364 +	# Tell ltmain to make .dll files, not .so files.
7365 +	shrext_cmds=".dll"
7366 +	# FIXME: Setting linknames here is a bad hack.
7367 +	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
7368 +	# The linker will automatically build a .lib file if we build a DLL.
7369 +	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7370 +	# FIXME: Should let the user specify the lib program.
7371 +	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
7372 +	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7373 +	;;
7374 +      esac
7375        ;;
7376  
7377      darwin* | rhapsody*)
7378 @@ -4836,10 +5207,6 @@
7379        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7380        ;;
7381  
7382 -    freebsd1*)
7383 -      _LT_TAGVAR(ld_shlibs, $1)=no
7384 -      ;;
7385 -
7386      # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7387      # support.  Future versions do this automatically, but an explicit c++rt0.o
7388      # does not break anything, and helps significantly (at the cost of a little
7389 @@ -4852,7 +5219,7 @@
7390        ;;
7391  
7392      # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7393 -    freebsd2*)
7394 +    freebsd2.*)
7395        _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7396        _LT_TAGVAR(hardcode_direct, $1)=yes
7397        _LT_TAGVAR(hardcode_minus_L, $1)=yes
7398 @@ -4861,7 +5228,7 @@
7399  
7400      # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7401      freebsd* | dragonfly*)
7402 -      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $compiler_flags $libobjs $deplibs'
7403 +      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7404        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7405        _LT_TAGVAR(hardcode_direct, $1)=yes
7406        _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7407 @@ -4869,7 +5236,7 @@
7408  
7409      hpux9*)
7410        if test "$GCC" = yes; then
7411 -	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7412 +	_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'
7413        else
7414  	_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'
7415        fi
7416 @@ -4885,13 +5252,12 @@
7417  
7418      hpux10*)
7419        if test "$GCC" = yes && test "$with_gnu_ld" = no; then
7420 -	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7421 +	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7422        else
7423  	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7424        fi
7425        if test "$with_gnu_ld" = no; then
7426  	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7427 -	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
7428  	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7429  	_LT_TAGVAR(hardcode_direct, $1)=yes
7430  	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7431 @@ -4909,10 +5275,10 @@
7432  	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7433  	  ;;
7434  	ia64*)
7435 -	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7436 +	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7437  	  ;;
7438  	*)
7439 -	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7440 +	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7441  	  ;;
7442  	esac
7443        else
7444 @@ -4959,16 +5325,31 @@
7445  
7446      irix5* | irix6* | nonstopux*)
7447        if test "$GCC" = yes; then
7448 -	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7449 +	_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'
7450  	# Try to use the -exported_symbol ld option, if it does not
7451  	# work, assume that -exports_file does not work either and
7452  	# implicitly export all symbols.
7453 -        save_LDFLAGS="$LDFLAGS"
7454 -        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
7455 -        AC_LINK_IFELSE(int foo(void) {},
7456 -          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
7457 -        )
7458 -        LDFLAGS="$save_LDFLAGS"
7459 +	# This should be the same for all languages, so no per-tag cache variable.
7460 +	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
7461 +	  [lt_cv_irix_exported_symbol],
7462 +	  [save_LDFLAGS="$LDFLAGS"
7463 +	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
7464 +	   AC_LINK_IFELSE(
7465 +	     [AC_LANG_SOURCE(
7466 +	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
7467 +			      [C++], [[int foo (void) { return 0; }]],
7468 +			      [Fortran 77], [[
7469 +      subroutine foo
7470 +      end]],
7471 +			      [Fortran], [[
7472 +      subroutine foo
7473 +      end]])])],
7474 +	      [lt_cv_irix_exported_symbol=yes],
7475 +	      [lt_cv_irix_exported_symbol=no])
7476 +           LDFLAGS="$save_LDFLAGS"])
7477 +	if test "$lt_cv_irix_exported_symbol" = yes; then
7478 +          _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'
7479 +	fi
7480        else
7481  	_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'
7482  	_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'
7483 @@ -4980,7 +5361,7 @@
7484        _LT_TAGVAR(link_all_deplibs, $1)=yes
7485        ;;
7486  
7487 -    netbsd*)
7488 +    netbsd* | netbsdelf*-gnu)
7489        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7490  	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
7491        else
7492 @@ -5008,8 +5389,8 @@
7493  	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7494  	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7495  	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7496 -	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $compiler_flags -o $lib $libobjs $deplibs'
7497 -	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $compiler_flags -o $lib $libobjs $deplibs ${wl}-retain-symbols-file,$export_symbols'
7498 +	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7499 +	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7500  	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7501  	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7502  	else
7503 @@ -5053,7 +5434,7 @@
7504      osf4* | osf5*)	# as osf3* with the addition of -msym flag
7505        if test "$GCC" = yes; then
7506  	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7507 -	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7508 +	_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'
7509  	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7510        else
7511  	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7512 @@ -5072,9 +5453,9 @@
7513        _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
7514        if test "$GCC" = yes; then
7515  	wlarc='${wl}'
7516 -	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs'
7517 +	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7518  	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7519 -	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
7520 +	  $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'
7521        else
7522  	case `$CC -V 2>&1` in
7523  	*"Compilers 5.0"*)
7524 @@ -5318,9 +5699,6 @@
7525  _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
7526      [Flag to hardcode $libdir into a binary during linking.
7527      This must work even if $libdir does not exist])
7528 -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
7529 -    [[If ld is used when linking, flag to hardcode $libdir into a binary
7530 -    during linking.  This must work even if $libdir does not exist]])
7531  _LT_TAGDECL([], [hardcode_libdir_separator], [1],
7532      [Whether we need a single "-rpath" flag with a separated argument])
7533  _LT_TAGDECL([], [hardcode_direct], [0],
7534 @@ -5346,8 +5724,6 @@
7535      to runtime path list])
7536  _LT_TAGDECL([], [link_all_deplibs], [0],
7537      [Whether libtool must link a program against all its dependency libraries])
7538 -_LT_TAGDECL([], [fix_srcfile_path], [1],
7539 -    [Fix the shell variable $srcfile for the compiler])
7540  _LT_TAGDECL([], [always_export_symbols], [0],
7541      [Set to "yes" if exported symbols are required])
7542  _LT_TAGDECL([], [export_symbols_cmds], [2],
7543 @@ -5358,6 +5734,8 @@
7544      [Symbols that must always be exported])
7545  _LT_TAGDECL([], [prelink_cmds], [2],
7546      [Commands necessary for linking programs (against libraries) with templates])
7547 +_LT_TAGDECL([], [postlink_cmds], [2],
7548 +    [Commands necessary for finishing linking programs])
7549  _LT_TAGDECL([], [file_list_spec], [1],
7550      [Specify filename containing input files])
7551  dnl FIXME: Not yet implemented
7552 @@ -5459,6 +5837,7 @@
7553  m4_defun([_LT_LANG_CXX_CONFIG],
7554  [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7555  m4_require([_LT_DECL_EGREP])dnl
7556 +m4_require([_LT_PATH_MANIFEST_TOOL])dnl
7557  if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
7558      ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
7559      (test "X$CXX" != "Xg++"))) ; then
7560 @@ -5477,7 +5856,6 @@
7561  _LT_TAGVAR(hardcode_direct, $1)=no
7562  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7563  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7564 -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7565  _LT_TAGVAR(hardcode_libdir_separator, $1)=
7566  _LT_TAGVAR(hardcode_minus_L, $1)=no
7567  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7568 @@ -5520,6 +5898,7 @@
7569  
7570    # Allow CC to be a program name with arguments.
7571    lt_save_CC=$CC
7572 +  lt_save_CFLAGS=$CFLAGS
7573    lt_save_LD=$LD
7574    lt_save_GCC=$GCC
7575    GCC=$GXX
7576 @@ -5537,6 +5916,7 @@
7577    fi
7578    test -z "${LDCXX+set}" || LD=$LDCXX
7579    CC=${CXX-"c++"}
7580 +  CFLAGS=$CXXFLAGS
7581    compiler=$CC
7582    _LT_TAGVAR(compiler, $1)=$CC
7583    _LT_CC_BASENAME([$compiler])
7584 @@ -5558,8 +5938,8 @@
7585        # Check if GNU C++ uses GNU ld as the underlying linker, since the
7586        # archiving commands below assume that GNU ld is being used.
7587        if test "$with_gnu_ld" = yes; then
7588 -        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
7589 -        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7590 +        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7591 +        _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'
7592  
7593          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7594          _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7595 @@ -5585,7 +5965,7 @@
7596          # linker, instead of GNU ld.  If possible, this setting should
7597          # overridden to take advantage of the native linker features on
7598          # the platform it is being used on.
7599 -        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $lib'
7600 +        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7601        fi
7602  
7603        # Commands to make compiler produce verbose output that lists
7604 @@ -5700,7 +6080,7 @@
7605            _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7606            # Determine the default libpath from the value encoded in an empty
7607            # executable.
7608 -          _LT_SYS_MODULE_PATH_AIX
7609 +          _LT_SYS_MODULE_PATH_AIX([$1])
7610            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7611  
7612            _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"
7613 @@ -5712,7 +6092,7 @@
7614            else
7615  	    # Determine the default libpath from the value encoded in an
7616  	    # empty executable.
7617 -	    _LT_SYS_MODULE_PATH_AIX
7618 +	    _LT_SYS_MODULE_PATH_AIX([$1])
7619  	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7620  	    # Warning - without using the other run time loading flags,
7621  	    # -berok will link without error, but may produce a broken library.
7622 @@ -5754,29 +6134,75 @@
7623          ;;
7624  
7625        cygwin* | mingw* | pw32* | cegcc*)
7626 -        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7627 -        # as there is no search path for DLLs.
7628 -        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7629 -        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
7630 -        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7631 -        _LT_TAGVAR(always_export_symbols, $1)=no
7632 -        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7633 -
7634 -        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7635 -          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $compiler_flags $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7636 -          # If the export-symbols file already is a .def file (1st line
7637 -          # is EXPORTS), use it as is; otherwise, prepend...
7638 -          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7639 -	    cp $export_symbols $output_objdir/$soname.def;
7640 -          else
7641 -	    echo EXPORTS > $output_objdir/$soname.def;
7642 -	    cat $export_symbols >> $output_objdir/$soname.def;
7643 -          fi~
7644 -          $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $compiler_flags $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7645 -        else
7646 -          _LT_TAGVAR(ld_shlibs, $1)=no
7647 -        fi
7648 -        ;;
7649 +	case $GXX,$cc_basename in
7650 +	,cl* | no,cl*)
7651 +	  # Native MSVC
7652 +	  # hardcode_libdir_flag_spec is actually meaningless, as there is
7653 +	  # no search path for DLLs.
7654 +	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7655 +	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7656 +	  _LT_TAGVAR(always_export_symbols, $1)=yes
7657 +	  _LT_TAGVAR(file_list_spec, $1)='@'
7658 +	  # Tell ltmain to make .lib files, not .a files.
7659 +	  libext=lib
7660 +	  # Tell ltmain to make .dll files, not .so files.
7661 +	  shrext_cmds=".dll"
7662 +	  # FIXME: Setting linknames here is a bad hack.
7663 +	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
7664 +	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7665 +	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
7666 +	    else
7667 +	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
7668 +	    fi~
7669 +	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7670 +	    linknames='
7671 +	  # The linker will not automatically build a static lib if we build a DLL.
7672 +	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7673 +	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7674 +	  # Don't use ranlib
7675 +	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7676 +	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7677 +	    lt_tool_outputfile="@TOOL_OUTPUT@"~
7678 +	    case $lt_outputfile in
7679 +	      *.exe|*.EXE) ;;
7680 +	      *)
7681 +		lt_outputfile="$lt_outputfile.exe"
7682 +		lt_tool_outputfile="$lt_tool_outputfile.exe"
7683 +		;;
7684 +	    esac~
7685 +	    func_to_tool_file "$lt_outputfile"~
7686 +	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
7687 +	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7688 +	      $RM "$lt_outputfile.manifest";
7689 +	    fi'
7690 +	  ;;
7691 +	*)
7692 +	  # g++
7693 +	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7694 +	  # as there is no search path for DLLs.
7695 +	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7696 +	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
7697 +	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7698 +	  _LT_TAGVAR(always_export_symbols, $1)=no
7699 +	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7700 +
7701 +	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7702 +	    _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'
7703 +	    # If the export-symbols file already is a .def file (1st line
7704 +	    # is EXPORTS), use it as is; otherwise, prepend...
7705 +	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7706 +	      cp $export_symbols $output_objdir/$soname.def;
7707 +	    else
7708 +	      echo EXPORTS > $output_objdir/$soname.def;
7709 +	      cat $export_symbols >> $output_objdir/$soname.def;
7710 +	    fi~
7711 +	    $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'
7712 +	  else
7713 +	    _LT_TAGVAR(ld_shlibs, $1)=no
7714 +	  fi
7715 +	  ;;
7716 +	esac
7717 +	;;
7718        darwin* | rhapsody*)
7719          _LT_DARWIN_LINKER_FEATURES($1)
7720  	;;
7721 @@ -5799,7 +6225,7 @@
7722          esac
7723          ;;
7724  
7725 -      freebsd[[12]]*)
7726 +      freebsd2.*)
7727          # C++ shared libraries reported to be fairly broken before
7728  	# switch to ELF
7729          _LT_TAGVAR(ld_shlibs, $1)=no
7730 @@ -5851,7 +6277,7 @@
7731              ;;
7732            *)
7733              if test "$GXX" = yes; then
7734 -              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7735 +              _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'
7736              else
7737                # FIXME: insert proper C++ library support
7738                _LT_TAGVAR(ld_shlibs, $1)=no
7739 @@ -5922,10 +6348,10 @@
7740  	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7741  	            ;;
7742  	          ia64*)
7743 -	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7744 +	            _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'
7745  	            ;;
7746  	          *)
7747 -	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7748 +	            _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'
7749  	            ;;
7750  	        esac
7751  	      fi
7752 @@ -5966,9 +6392,9 @@
7753            *)
7754  	    if test "$GXX" = yes; then
7755  	      if test "$with_gnu_ld" = no; then
7756 -	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7757 +	        _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'
7758  	      else
7759 -	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
7760 +	        _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'
7761  	      fi
7762  	    fi
7763  	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7764 @@ -5987,8 +6413,8 @@
7765  	    # KCC will only create a shared library if the output file
7766  	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7767  	    # to its proper name (with version) after linking.
7768 -	    _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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
7769 -	    _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 $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
7770 +	    _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'
7771 +	    _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'
7772  	    # Commands to make compiler produce verbose output that lists
7773  	    # what "hidden" libraries, object files and flags are used when
7774  	    # linking a shared library.
7775 @@ -6014,16 +6440,16 @@
7776  	    # earlier do not add the objects themselves.
7777  	    case `$CC -V 2>&1` in
7778  	      *"Version 7."*)
7779 -	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
7780 -		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7781 +	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7782 +		_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'
7783  		;;
7784  	      *)  # Version 8.0 or newer
7785  	        tmp_idyn=
7786  	        case $host_cpu in
7787  		  ia64*) tmp_idyn=' -i_dynamic';;
7788  		esac
7789 -	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
7790 -		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7791 +	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7792 +		_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'
7793  		;;
7794  	    esac
7795  	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7796 @@ -6065,8 +6491,8 @@
7797              ;;
7798  	  cxx*)
7799  	    # Compaq C++
7800 -	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
7801 -	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
7802 +	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7803 +	    _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'
7804  
7805  	    runpath_var=LD_RUN_PATH
7806  	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7807 @@ -6086,12 +6512,12 @@
7808  	    # IBM XL 8.0 on PPC, with GNU ld
7809  	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7810  	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7811 -	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
7812 +	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7813  	    if test "x$supports_anon_versioning" = xyes; then
7814  	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7815  		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7816  		echo "local: *; };" >> $output_objdir/$libname.ver~
7817 -		$CC -qmkshrobj $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7818 +		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7819  	    fi
7820  	    ;;
7821  	  *)
7822 @@ -6170,10 +6596,10 @@
7823  	  _LT_TAGVAR(hardcode_direct, $1)=yes
7824  	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7825  	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7826 -	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $lib'
7827 +	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7828  	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7829  	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7830 -	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-retain-symbols-file,$export_symbols -o $lib'
7831 +	    _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'
7832  	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7833  	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7834  	  fi
7835 @@ -6246,7 +6672,7 @@
7836  	          _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'
7837  		  ;;
7838  	        *)
7839 -	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${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'
7840 +	          _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'
7841  		  ;;
7842  	      esac
7843  
7844 @@ -6333,9 +6759,9 @@
7845  	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7846  	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7847  	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7848 -	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
7849 +	        _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'
7850  	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7851 -		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$RM $lib.exp'
7852 +		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7853  
7854  	        # Commands to make compiler produce verbose output that lists
7855  	        # what "hidden" libraries, object files and flags are used when
7856 @@ -6344,9 +6770,9 @@
7857  	      else
7858  	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
7859  	        # platform.
7860 -	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
7861 +	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7862  	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7863 -		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$RM $lib.exp'
7864 +		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7865  
7866  	        # Commands to make compiler produce verbose output that lists
7867  	        # what "hidden" libraries, object files and flags are used when
7868 @@ -6464,6 +6890,7 @@
7869    fi # test -n "$compiler"
7870  
7871    CC=$lt_save_CC
7872 +  CFLAGS=$lt_save_CFLAGS
7873    LDCXX=$LD
7874    LD=$lt_save_LD
7875    GCC=$lt_save_GCC
7876 @@ -6478,6 +6905,29 @@
7877  ])# _LT_LANG_CXX_CONFIG
7878  
7879  
7880 +# _LT_FUNC_STRIPNAME_CNF
7881 +# ----------------------
7882 +# func_stripname_cnf prefix suffix name
7883 +# strip PREFIX and SUFFIX off of NAME.
7884 +# PREFIX and SUFFIX must not contain globbing or regex special
7885 +# characters, hashes, percent signs, but SUFFIX may contain a leading
7886 +# dot (in which case that matches only a dot).
7887 +#
7888 +# This function is identical to the (non-XSI) version of func_stripname,
7889 +# except this one can be used by m4 code that may be executed by configure,
7890 +# rather than the libtool script.
7891 +m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7892 +AC_REQUIRE([_LT_DECL_SED])
7893 +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7894 +func_stripname_cnf ()
7895 +{
7896 +  case ${2} in
7897 +  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
7898 +  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
7899 +  esac
7900 +} # func_stripname_cnf
7901 +])# _LT_FUNC_STRIPNAME_CNF
7902 +
7903  # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7904  # ---------------------------------
7905  # Figure out "hidden" library dependencies from verbose
7906 @@ -6486,6 +6936,7 @@
7907  # objects, libraries and library flags.
7908  m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7909  [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7910 +AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7911  # Dependencies to place before and after the object being linked:
7912  _LT_TAGVAR(predep_objects, $1)=
7913  _LT_TAGVAR(postdep_objects, $1)=
7914 @@ -6535,7 +6986,20 @@
7915    }
7916  };
7917  _LT_EOF
7918 +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7919 +package foo
7920 +func foo() {
7921 +}
7922 +_LT_EOF
7923  ])
7924 +
7925 +_lt_libdeps_save_CFLAGS=$CFLAGS
7926 +case "$CC $CFLAGS " in #(
7927 +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7928 +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7929 +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7930 +esac
7931 +
7932  dnl Parse the compiler output and extract the necessary
7933  dnl objects, libraries and library flags.
7934  if AC_TRY_EVAL(ac_compile); then
7935 @@ -6547,7 +7011,7 @@
7936    pre_test_object_deps_done=no
7937  
7938    for p in `eval "$output_verbose_link_cmd"`; do
7939 -    case $p in
7940 +    case ${prev}${p} in
7941  
7942      -L* | -R* | -l*)
7943         # Some compilers place space between "-{L,R}" and the path.
7944 @@ -6556,13 +7020,22 @@
7945            test $p = "-R"; then
7946  	 prev=$p
7947  	 continue
7948 -       else
7949 -	 prev=
7950         fi
7951  
7952 +       # Expand the sysroot to ease extracting the directories later.
7953 +       if test -z "$prev"; then
7954 +         case $p in
7955 +         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7956 +         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7957 +         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7958 +         esac
7959 +       fi
7960 +       case $p in
7961 +       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7962 +       esac
7963         if test "$pre_test_object_deps_done" = no; then
7964 -	 case $p in
7965 -	 -L* | -R*)
7966 +	 case ${prev} in
7967 +	 -L | -R)
7968  	   # Internal compiler library paths should come after those
7969  	   # provided the user.  The postdeps already come after the
7970  	   # user supplied libs so there is no need to process them.
7971 @@ -6582,8 +7055,10 @@
7972  	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7973  	 fi
7974         fi
7975 +       prev=
7976         ;;
7977  
7978 +    *.lto.$objext) ;; # Ignore GCC LTO objects
7979      *.$objext)
7980         # This assumes that the test object file only shows up
7981         # once in the compiler output.
7982 @@ -6619,6 +7094,7 @@
7983  fi
7984  
7985  $RM -f confest.$objext
7986 +CFLAGS=$_lt_libdeps_save_CFLAGS
7987  
7988  # PORTME: override above test on systems where it is broken
7989  m4_if([$1], [CXX],
7990 @@ -6718,7 +7194,6 @@
7991  _LT_TAGVAR(hardcode_direct, $1)=no
7992  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7993  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7994 -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7995  _LT_TAGVAR(hardcode_libdir_separator, $1)=
7996  _LT_TAGVAR(hardcode_minus_L, $1)=no
7997  _LT_TAGVAR(hardcode_automatic, $1)=no
7998 @@ -6768,7 +7243,9 @@
7999    # Allow CC to be a program name with arguments.
8000    lt_save_CC="$CC"
8001    lt_save_GCC=$GCC
8002 +  lt_save_CFLAGS=$CFLAGS
8003    CC=${F77-"f77"}
8004 +  CFLAGS=$FFLAGS
8005    compiler=$CC
8006    _LT_TAGVAR(compiler, $1)=$CC
8007    _LT_CC_BASENAME([$compiler])
8008 @@ -6822,6 +7299,7 @@
8009  
8010    GCC=$lt_save_GCC
8011    CC="$lt_save_CC"
8012 +  CFLAGS="$lt_save_CFLAGS"
8013  fi # test "$_lt_disable_F77" != yes
8014  
8015  AC_LANG_POP
8016 @@ -6848,7 +7326,6 @@
8017  _LT_TAGVAR(hardcode_direct, $1)=no
8018  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8019  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8020 -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8021  _LT_TAGVAR(hardcode_libdir_separator, $1)=
8022  _LT_TAGVAR(hardcode_minus_L, $1)=no
8023  _LT_TAGVAR(hardcode_automatic, $1)=no
8024 @@ -6898,7 +7375,9 @@
8025    # Allow CC to be a program name with arguments.
8026    lt_save_CC="$CC"
8027    lt_save_GCC=$GCC
8028 +  lt_save_CFLAGS=$CFLAGS
8029    CC=${FC-"f95"}
8030 +  CFLAGS=$FCFLAGS
8031    compiler=$CC
8032    GCC=$ac_cv_fc_compiler_gnu
8033  
8034 @@ -6954,7 +7433,8 @@
8035    fi # test -n "$compiler"
8036  
8037    GCC=$lt_save_GCC
8038 -  CC="$lt_save_CC"
8039 +  CC=$lt_save_CC
8040 +  CFLAGS=$lt_save_CFLAGS
8041  fi # test "$_lt_disable_FC" != yes
8042  
8043  AC_LANG_POP
8044 @@ -6991,10 +7471,12 @@
8045  _LT_LINKER_BOILERPLATE
8046  
8047  # Allow CC to be a program name with arguments.
8048 -lt_save_CC="$CC"
8049 +lt_save_CC=$CC
8050 +lt_save_CFLAGS=$CFLAGS
8051  lt_save_GCC=$GCC
8052  GCC=yes
8053  CC=${GCJ-"gcj"}
8054 +CFLAGS=$GCJFLAGS
8055  compiler=$CC
8056  _LT_TAGVAR(compiler, $1)=$CC
8057  _LT_TAGVAR(LD, $1)="$LD"
8058 @@ -7025,10 +7507,82 @@
8059  AC_LANG_RESTORE
8060  
8061  GCC=$lt_save_GCC
8062 -CC="$lt_save_CC"
8063 +CC=$lt_save_CC
8064 +CFLAGS=$lt_save_CFLAGS
8065  ])# _LT_LANG_GCJ_CONFIG
8066  
8067  
8068 +# _LT_LANG_GO_CONFIG([TAG])
8069 +# --------------------------
8070 +# Ensure that the configuration variables for the GNU Go compiler
8071 +# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8072 +# to write the compiler configuration to `libtool'.
8073 +m4_defun([_LT_LANG_GO_CONFIG],
8074 +[AC_REQUIRE([LT_PROG_GO])dnl
8075 +AC_LANG_SAVE
8076 +
8077 +# Source file extension for Go test sources.
8078 +ac_ext=go
8079 +
8080 +# Object file extension for compiled Go test sources.
8081 +objext=o
8082 +_LT_TAGVAR(objext, $1)=$objext
8083 +
8084 +# Code to be used in simple compile tests
8085 +lt_simple_compile_test_code="package main; func main() { }"
8086 +
8087 +# Code to be used in simple link tests
8088 +lt_simple_link_test_code='package main; func main() { }'
8089 +
8090 +# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8091 +_LT_TAG_COMPILER
8092 +
8093 +# save warnings/boilerplate of simple test code
8094 +_LT_COMPILER_BOILERPLATE
8095 +_LT_LINKER_BOILERPLATE
8096 +
8097 +# Allow CC to be a program name with arguments.
8098 +lt_save_CC=$CC
8099 +lt_save_CFLAGS=$CFLAGS
8100 +lt_save_GCC=$GCC
8101 +GCC=yes
8102 +CC=${GOC-"gccgo"}
8103 +CFLAGS=$GOFLAGS
8104 +compiler=$CC
8105 +_LT_TAGVAR(compiler, $1)=$CC
8106 +_LT_TAGVAR(LD, $1)="$LD"
8107 +_LT_CC_BASENAME([$compiler])
8108 +
8109 +# Go did not exist at the time GCC didn't implicitly link libc in.
8110 +_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8111 +
8112 +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8113 +_LT_TAGVAR(reload_flag, $1)=$reload_flag
8114 +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8115 +
8116 +## CAVEAT EMPTOR:
8117 +## There is no encapsulation within the following macros, do not change
8118 +## the running order or otherwise move them around unless you know exactly
8119 +## what you are doing...
8120 +if test -n "$compiler"; then
8121 +  _LT_COMPILER_NO_RTTI($1)
8122 +  _LT_COMPILER_PIC($1)
8123 +  _LT_COMPILER_C_O($1)
8124 +  _LT_COMPILER_FILE_LOCKS($1)
8125 +  _LT_LINKER_SHLIBS($1)
8126 +  _LT_LINKER_HARDCODE_LIBPATH($1)
8127 +
8128 +  _LT_CONFIG($1)
8129 +fi
8130 +
8131 +AC_LANG_RESTORE
8132 +
8133 +GCC=$lt_save_GCC
8134 +CC=$lt_save_CC
8135 +CFLAGS=$lt_save_CFLAGS
8136 +])# _LT_LANG_GO_CONFIG
8137 +
8138 +
8139  # _LT_LANG_RC_CONFIG([TAG])
8140  # -------------------------
8141  # Ensure that the configuration variables for the Windows resource compiler
8142 @@ -7060,9 +7614,11 @@
8143  
8144  # Allow CC to be a program name with arguments.
8145  lt_save_CC="$CC"
8146 +lt_save_CFLAGS=$CFLAGS
8147  lt_save_GCC=$GCC
8148  GCC=
8149  CC=${RC-"windres"}
8150 +CFLAGS=
8151  compiler=$CC
8152  _LT_TAGVAR(compiler, $1)=$CC
8153  _LT_CC_BASENAME([$compiler])
8154 @@ -7075,7 +7631,8 @@
8155  
8156  GCC=$lt_save_GCC
8157  AC_LANG_RESTORE
8158 -CC="$lt_save_CC"
8159 +CC=$lt_save_CC
8160 +CFLAGS=$lt_save_CFLAGS
8161  ])# _LT_LANG_RC_CONFIG
8162  
8163  
8164 @@ -7095,6 +7652,13 @@
8165  dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8166  
8167  
8168 +# LT_PROG_GO
8169 +# ----------
8170 +AC_DEFUN([LT_PROG_GO],
8171 +[AC_CHECK_TOOL(GOC, gccgo,)
8172 +])
8173 +
8174 +
8175  # LT_PROG_RC
8176  # ----------
8177  AC_DEFUN([LT_PROG_RC],
8178 @@ -7134,6 +7698,15 @@
8179  AC_SUBST([OBJDUMP])
8180  ])
8181  
8182 +# _LT_DECL_DLLTOOL
8183 +# ----------------
8184 +# Ensure DLLTOOL variable is set.
8185 +m4_defun([_LT_DECL_DLLTOOL],
8186 +[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8187 +test -z "$DLLTOOL" && DLLTOOL=dlltool
8188 +_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8189 +AC_SUBST([DLLTOOL])
8190 +])
8191  
8192  # _LT_DECL_SED
8193  # ------------
8194 @@ -7227,8 +7800,8 @@
8195  # Try some XSI features
8196  xsi_shell=no
8197  ( _lt_dummy="a/b/c"
8198 -  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
8199 -      = c,a/b,, \
8200 +  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
8201 +      = c,a/b,b/c, \
8202      && eval 'test $(( 1 + 1 )) -eq 2 \
8203      && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8204    && xsi_shell=yes
8205 @@ -7267,206 +7840,162 @@
8206  ])# _LT_CHECK_SHELL_FEATURES
8207  
8208  
8209 -# _LT_PROG_XSI_SHELLFNS
8210 -# ---------------------
8211 -# Bourne and XSI compatible variants of some useful shell functions.
8212 -m4_defun([_LT_PROG_XSI_SHELLFNS],
8213 -[case $xsi_shell in
8214 -  yes)
8215 -    cat << \_LT_EOF >> "$cfgfile"
8216 -
8217 -# func_dirname file append nondir_replacement
8218 -# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
8219 -# otherwise set result to NONDIR_REPLACEMENT.
8220 -func_dirname ()
8221 -{
8222 -  case ${1} in
8223 -    */*) func_dirname_result="${1%/*}${2}" ;;
8224 -    *  ) func_dirname_result="${3}" ;;
8225 -  esac
8226 -}
8227 -
8228 -# func_basename file
8229 -func_basename ()
8230 -{
8231 -  func_basename_result="${1##*/}"
8232 -}
8233 -
8234 -# func_dirname_and_basename file append nondir_replacement
8235 -# perform func_basename and func_dirname in a single function
8236 -# call:
8237 -#   dirname:  Compute the dirname of FILE.  If nonempty,
8238 -#             add APPEND to the result, otherwise set result
8239 -#             to NONDIR_REPLACEMENT.
8240 -#             value returned in "$func_dirname_result"
8241 -#   basename: Compute filename of FILE.
8242 -#             value retuned in "$func_basename_result"
8243 -# Implementation must be kept synchronized with func_dirname
8244 -# and func_basename. For efficiency, we do not delegate to
8245 -# those functions but instead duplicate the functionality here.
8246 -func_dirname_and_basename ()
8247 -{
8248 -  case ${1} in
8249 -    */*) func_dirname_result="${1%/*}${2}" ;;
8250 -    *  ) func_dirname_result="${3}" ;;
8251 -  esac
8252 -  func_basename_result="${1##*/}"
8253 -}
8254 -
8255 -# func_stripname prefix suffix name
8256 -# strip PREFIX and SUFFIX off of NAME.
8257 -# PREFIX and SUFFIX must not contain globbing or regex special
8258 -# characters, hashes, percent signs, but SUFFIX may contain a leading
8259 -# dot (in which case that matches only a dot).
8260 -func_stripname ()
8261 -{
8262 -  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8263 -  # positional parameters, so assign one to ordinary parameter first.
8264 -  func_stripname_result=${3}
8265 -  func_stripname_result=${func_stripname_result#"${1}"}
8266 -  func_stripname_result=${func_stripname_result%"${2}"}
8267 -}
8268 -
8269 -# func_opt_split
8270 -func_opt_split ()
8271 -{
8272 -  func_opt_split_opt=${1%%=*}
8273 -  func_opt_split_arg=${1#*=}
8274 -}
8275 -
8276 -# func_lo2o object
8277 -func_lo2o ()
8278 -{
8279 -  case ${1} in
8280 -    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8281 -    *)    func_lo2o_result=${1} ;;
8282 -  esac
8283 -}
8284 -
8285 -# func_xform libobj-or-source
8286 -func_xform ()
8287 -{
8288 -  func_xform_result=${1%.*}.lo
8289 -}
8290 -
8291 -# func_arith arithmetic-term...
8292 -func_arith ()
8293 -{
8294 -  func_arith_result=$(( $[*] ))
8295 -}
8296 -
8297 -# func_len string
8298 -# STRING may not start with a hyphen.
8299 -func_len ()
8300 -{
8301 -  func_len_result=${#1}
8302 -}
8303 -
8304 -_LT_EOF
8305 -    ;;
8306 -  *) # Bourne compatible functions.
8307 -    cat << \_LT_EOF >> "$cfgfile"
8308 -
8309 -# func_dirname file append nondir_replacement
8310 -# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
8311 -# otherwise set result to NONDIR_REPLACEMENT.
8312 -func_dirname ()
8313 -{
8314 -  # Extract subdirectory from the argument.
8315 -  func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
8316 -  if test "X$func_dirname_result" = "X${1}"; then
8317 -    func_dirname_result="${3}"
8318 -  else
8319 -    func_dirname_result="$func_dirname_result${2}"
8320 -  fi
8321 -}
8322 -
8323 -# func_basename file
8324 -func_basename ()
8325 -{
8326 -  func_basename_result=`$ECHO "${1}" | $SED "$basename"`
8327 -}
8328 +# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
8329 +# ------------------------------------------------------
8330 +# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
8331 +# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
8332 +m4_defun([_LT_PROG_FUNCTION_REPLACE],
8333 +[dnl {
8334 +sed -e '/^$1 ()$/,/^} # $1 /c\
8335 +$1 ()\
8336 +{\
8337 +m4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
8338 +} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
8339 +  && mv -f "$cfgfile.tmp" "$cfgfile" \
8340 +    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8341 +test 0 -eq $? || _lt_function_replace_fail=:
8342 +])
8343  
8344 -dnl func_dirname_and_basename
8345 -dnl A portable version of this function is already defined in general.m4sh
8346 -dnl so there is no need for it here.
8347  
8348 -# func_stripname prefix suffix name
8349 -# strip PREFIX and SUFFIX off of NAME.
8350 -# PREFIX and SUFFIX must not contain globbing or regex special
8351 -# characters, hashes, percent signs, but SUFFIX may contain a leading
8352 -# dot (in which case that matches only a dot).
8353 -# func_strip_suffix prefix name
8354 -func_stripname ()
8355 -{
8356 -  case ${2} in
8357 -    .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
8358 -    *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
8359 -  esac
8360 -}
8361 +# _LT_PROG_REPLACE_SHELLFNS
8362 +# -------------------------
8363 +# Replace existing portable implementations of several shell functions with
8364 +# equivalent extended shell implementations where those features are available..
8365 +m4_defun([_LT_PROG_REPLACE_SHELLFNS],
8366 +[if test x"$xsi_shell" = xyes; then
8367 +  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
8368 +    case ${1} in
8369 +      */*) func_dirname_result="${1%/*}${2}" ;;
8370 +      *  ) func_dirname_result="${3}" ;;
8371 +    esac])
8372 +
8373 +  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
8374 +    func_basename_result="${1##*/}"])
8375 +
8376 +  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
8377 +    case ${1} in
8378 +      */*) func_dirname_result="${1%/*}${2}" ;;
8379 +      *  ) func_dirname_result="${3}" ;;
8380 +    esac
8381 +    func_basename_result="${1##*/}"])
8382  
8383 -# sed scripts:
8384 -my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
8385 -my_sed_long_arg='1s/^-[[^=]]*=//'
8386 +  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
8387 +    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8388 +    # positional parameters, so assign one to ordinary parameter first.
8389 +    func_stripname_result=${3}
8390 +    func_stripname_result=${func_stripname_result#"${1}"}
8391 +    func_stripname_result=${func_stripname_result%"${2}"}])
8392 +
8393 +  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
8394 +    func_split_long_opt_name=${1%%=*}
8395 +    func_split_long_opt_arg=${1#*=}])
8396 +
8397 +  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
8398 +    func_split_short_opt_arg=${1#??}
8399 +    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
8400 +
8401 +  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
8402 +    case ${1} in
8403 +      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8404 +      *)    func_lo2o_result=${1} ;;
8405 +    esac])
8406  
8407 -# func_opt_split
8408 -func_opt_split ()
8409 -{
8410 -  func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
8411 -  func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
8412 -}
8413 +  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
8414  
8415 -# func_lo2o object
8416 -func_lo2o ()
8417 -{
8418 -  func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
8419 -}
8420 +  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
8421  
8422 -# func_xform libobj-or-source
8423 -func_xform ()
8424 -{
8425 -  func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'`
8426 -}
8427 +  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
8428 +fi
8429  
8430 -# func_arith arithmetic-term...
8431 -func_arith ()
8432 -{
8433 -  func_arith_result=`expr "$[@]"`
8434 -}
8435 +if test x"$lt_shell_append" = xyes; then
8436 +  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
8437  
8438 -# func_len string
8439 -# STRING may not start with a hyphen.
8440 -func_len ()
8441 -{
8442 -  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
8443 -}
8444 +  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
8445 +    func_quote_for_eval "${2}"
8446 +dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
8447 +    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
8448 +
8449 +  # Save a `func_append' function call where possible by direct use of '+='
8450 +  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
8451 +    && mv -f "$cfgfile.tmp" "$cfgfile" \
8452 +      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8453 +  test 0 -eq $? || _lt_function_replace_fail=:
8454 +else
8455 +  # Save a `func_append' function call even when '+=' is not available
8456 +  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
8457 +    && mv -f "$cfgfile.tmp" "$cfgfile" \
8458 +      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8459 +  test 0 -eq $? || _lt_function_replace_fail=:
8460 +fi
8461  
8462 -_LT_EOF
8463 -esac
8464 +if test x"$_lt_function_replace_fail" = x":"; then
8465 +  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
8466 +fi
8467 +])
8468  
8469 -case $lt_shell_append in
8470 -  yes)
8471 -    cat << \_LT_EOF >> "$cfgfile"
8472 -
8473 -# func_append var value
8474 -# Append VALUE to the end of shell variable VAR.
8475 -func_append ()
8476 -{
8477 -  eval "$[1]+=\$[2]"
8478 -}
8479 -_LT_EOF
8480 +# _LT_PATH_CONVERSION_FUNCTIONS
8481 +# -----------------------------
8482 +# Determine which file name conversion functions should be used by
8483 +# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
8484 +# for certain cross-compile configurations and native mingw.
8485 +m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8486 +[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8487 +AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8488 +AC_MSG_CHECKING([how to convert $build file names to $host format])
8489 +AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8490 +[case $host in
8491 +  *-*-mingw* )
8492 +    case $build in
8493 +      *-*-mingw* ) # actually msys
8494 +        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8495 +        ;;
8496 +      *-*-cygwin* )
8497 +        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8498 +        ;;
8499 +      * ) # otherwise, assume *nix
8500 +        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8501 +        ;;
8502 +    esac
8503      ;;
8504 -  *)
8505 -    cat << \_LT_EOF >> "$cfgfile"
8506 -
8507 -# func_append var value
8508 -# Append VALUE to the end of shell variable VAR.
8509 -func_append ()
8510 -{
8511 -  eval "$[1]=\$$[1]\$[2]"
8512 -}
8513 -
8514 -_LT_EOF
8515 +  *-*-cygwin* )
8516 +    case $build in
8517 +      *-*-mingw* ) # actually msys
8518 +        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8519 +        ;;
8520 +      *-*-cygwin* )
8521 +        lt_cv_to_host_file_cmd=func_convert_file_noop
8522 +        ;;
8523 +      * ) # otherwise, assume *nix
8524 +        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8525 +        ;;
8526 +    esac
8527      ;;
8528 -  esac
8529 +  * ) # unhandled hosts (and "normal" native builds)
8530 +    lt_cv_to_host_file_cmd=func_convert_file_noop
8531 +    ;;
8532 +esac
8533 +])
8534 +to_host_file_cmd=$lt_cv_to_host_file_cmd
8535 +AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8536 +_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8537 +         [0], [convert $build file names to $host format])dnl
8538 +
8539 +AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8540 +AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8541 +[#assume ordinary cross tools, or native build.
8542 +lt_cv_to_tool_file_cmd=func_convert_file_noop
8543 +case $host in
8544 +  *-*-mingw* )
8545 +    case $build in
8546 +      *-*-mingw* ) # actually msys
8547 +        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8548 +        ;;
8549 +    esac
8550 +    ;;
8551 +esac
8552  ])
8553 +to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8554 +AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8555 +_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8556 +         [0], [convert $build files to toolchain format])dnl
8557 +])# _LT_PATH_CONVERSION_FUNCTIONS
8558 Index: .autotools
8559 ===================================================================
8560 --- .autotools.orig	2010-01-04 13:53:05.000000000 +0100
8561 +++ .autotools	2012-07-04 11:15:13.592186558 +0200
8562 @@ -1,43 +1,42 @@
8563  <?xml version="1.0" encoding="UTF-8"?>
8564  <configurations>
8565 -<configuration name="Build (GNU)">
8566 -<option id="no-create" value="false"/>
8567 -<option id="srcdir" value=""/>
8568 -<option id="build" value=""/>
8569 -<option id="enable-maintainer-mode" value="false"/>
8570 -<option id="version" value="false"/>
8571 +<configuration id="org.eclipse.linuxtools.cdt.autotools.core.configuration.build.818114515">
8572 +<option id="configure" value="configure"/>
8573 +<option id="configdir" value=""/>
8574  <option id="cache-file" value=""/>
8575  <option id="help" value="false"/>
8576 -<option id="includedir" value=""/>
8577 -<option id="directories" value="null"/>
8578 -<option id="oldincludedir" value=""/>
8579 -<option id="localstatedir" value=""/>
8580 -<option id="features" value="null"/>
8581 -<option id="configure" value="configure"/>
8582 -<option id="sbindir" value=""/>
8583 -<option id="options" value="null"/>
8584 -<option id="program-suffix" value=""/>
8585 -<option id="platform" value="null"/>
8586 -<option id="program-transform-name" value=""/>
8587 -<option id="sysconfdir" value=""/>
8588 -<option id="program-prefix" value=""/>
8589 +<option id="no-create" value="false"/>
8590 +<option id="quiet" value="false"/>
8591 +<option id="version" value="false"/>
8592  <option id="host" value=""/>
8593 -<option id="autogenOpts" value=""/>
8594 -<option id="filenames" value="null"/>
8595 +<option id="build" value=""/>
8596 +<option id="target" value=""/>
8597 +<option id="prefix" value=""/>
8598  <option id="exec-prefix" value=""/>
8599 -<option id="autogen" value="autogen.sh"/>
8600 -<option id="quiet" value="false"/>
8601 -<option id="mandir" value=""/>
8602  <option id="libdir" value=""/>
8603 -<option id="general" value="null"/>
8604  <option id="bindir" value=""/>
8605 -<option id="libexecdir" value=""/>
8606 -<option id="prefix" value=""/>
8607 -<option id="target" value=""/>
8608 -<option id="sharedstatedir" value=""/>
8609 -<option id="configdir" value=""/>
8610 -<option id="user" value="--with-eclipse"/>
8611 +<option id="sbindir" value=""/>
8612 +<option id="includedir" value=""/>
8613  <option id="datadir" value=""/>
8614 +<option id="sysconfdir" value=""/>
8615  <option id="infodir" value=""/>
8616 +<option id="mandir" value=""/>
8617 +<option id="srcdir" value=""/>
8618 +<option id="localstatedir" value=""/>
8619 +<option id="sharedstatedir" value=""/>
8620 +<option id="libexecdir" value=""/>
8621 +<option id="oldincludedir" value=""/>
8622 +<option id="program-prefix" value=""/>
8623 +<option id="program-suffix" value=""/>
8624 +<option id="program-transform-name" value=""/>
8625 +<option id="enable-maintainer-mode" value="false"/>
8626 +<flag id="CFLAGS">
8627 +<flagvalue id="cflags-debug" value="false"/>
8628 +<flagvalue id="cflags-gprof" value="false"/>
8629 +<flagvalue id="cflags-gcov" value="false"/>
8630 +</flag>
8631 +<option id="user" value="--with-eclipse"/>
8632 +<option id="autogen" value="autogen.sh"/>
8633 +<option id="autogenOpts" value=""/>
8634  </configuration>
8635  </configurations>
8636 Index: src/wrapper.h
8637 ===================================================================
8638 --- src/wrapper.h.orig	2011-06-08 21:25:58.000000000 +0200
8639 +++ src/wrapper.h	2012-07-04 11:26:39.048173321 +0200
8640 @@ -14,28 +14,35 @@
8641  #include <string>
8642  #include <nlpcommon/tag.h>
8643  #include <nlpcommon/lexeme.h>
8644 +#include <TaggingOptions.h>
8645  
8646  namespace Pantera {
8647  
8648  class PanteraWrapper {
8649  public:
8650 -  static PanteraWrapper* createInstance(std::string enginePath, std::string tagsetName);
8651 -  static PanteraWrapper* getInstance();
8652 +	static PanteraWrapper* createInstance(std::string enginePath, std::string tagsetName);
8653 +	static PanteraWrapper* getInstance();
8654  
8655 -	virtual std::vector<NLPCommon::DefaultLexeme> tag(const std::string& text) = 0;
8656  	virtual NLPCommon::Tagset* getTagset();
8657 +	
8658 +	virtual std::vector<NLPCommon::DefaultLexeme> tag(
8659 +		const std::vector<NLPCommon::DefaultLexeme>& lexems,
8660 +		const TaggingOptions& options) = 0;
8661 +	
8662 +	virtual std::vector<NLPCommon::DefaultLexeme> tag(
8663 +		const std::string& text,
8664 +		const TaggingOptions& options) = 0;
8665  
8666 -	virtual std::vector<NLPCommon::DefaultLexeme> tag(const
8667 -      std::vector<NLPCommon::DefaultLexeme>& lexems, bool doSentSplit,
8668 -      bool doMorphAnalysis, bool doSegmentDisamb, bool doTagging) = 0;
8669 +	virtual ~PanteraWrapper() {}
8670  
8671  protected:
8672 -  PanteraWrapper(std::string tagsetName = "");
8673 +	PanteraWrapper(std::string tagsetName = "");
8674  
8675  	NLPCommon::Tagset* tagset;
8676  	std::vector<const NLPCommon::Tagset*> tagsets;
8677  
8678  };
8679 +
8680  }
8681  
8682  #endif /* PANTERAWRAPPER_H_ */
8683 Index: src/concrete_wrapper.h
8684 ===================================================================
8685 --- src/concrete_wrapper.h.orig	2011-06-08 22:20:59.000000000 +0200
8686 +++ src/concrete_wrapper.h	2012-07-04 11:26:38.620173329 +0200
8687 @@ -39,18 +39,23 @@
8688  
8689  class ConcretePanteraWrapper : public PanteraWrapper {
8690  public:
8691 -	virtual std::vector<NLPCommon::DefaultLexeme> tag(const std::string& text);
8692 -
8693  	ConcretePanteraWrapper(string enginePath, string tagsetName);
8694  	virtual ~ConcretePanteraWrapper();
8695 -	virtual std::vector<NLPCommon::DefaultLexeme> tag(const
8696 -      std::vector<NLPCommon::DefaultLexeme>& lexems, bool doSentSplit,
8697 -      bool doMorphAnalysis, bool doSegmentDisamb, bool doTagging);
8698 +	
8699 +	virtual std::vector<NLPCommon::DefaultLexeme> tag(
8700 +		const std::vector<NLPCommon::DefaultLexeme>& lexems,
8701 +		const TaggingOptions& options);
8702 +	
8703 +	virtual std::vector<NLPCommon::DefaultLexeme> tag(
8704 +		const std::string& text,
8705 +		const TaggingOptions& options);
8706  
8707  private:
8708 -  void morphAnalyze(vector<MyLexeme>& lexems);
8709 +  void morphAnalyze(vector<MyLexeme>& lexems, const string& morphDict, const bool useGuesser);
8710    void segmentDisamb(vector<MyLexeme>& lexems);
8711 -
8712 +  
8713 +  void doTag(vector<MyLexeme>& lexems, const TaggingOptions& opts);
8714 +  
8715    MorfeuszAnalyzer<MyLexeme> morfeusz;
8716    PolishSegmDisambiguator<MyLexeme> segm_disamb;
8717    BTagger::BrillEngine<MyLexeme, MyScorer> engine;
8718 Index: src/wrapper_test.cpp
8719 ===================================================================
8720 --- src/wrapper_test.cpp.orig	2010-12-06 10:12:01.000000000 +0100
8721 +++ src/wrapper_test.cpp	2012-07-04 11:26:39.104173318 +0200
8722 @@ -7,15 +7,14 @@
8723  
8724  #include <cstdlib>
8725  #include <nlpcommon/util.h>
8726 -#include "wrapper.h"
8727 +#include <wrapper.h>
8728  
8729  using namespace std;
8730  using namespace Pantera;
8731  
8732  int main(int argc, char** argv) {
8733  	PanteraWrapper* pantera = PanteraWrapper::getInstance();
8734 -	pantera->tag("Ala ma kota.\nMiałem kota.\n\nLecę.");
8735 -	pantera->tag("Zażółć gęślą jaźń.");
8736 +	pantera->tag("Ala ma kota.\n Miałem. \nMiałem kota.\n\nLecę.", TaggingOptions().useGuesser(false).doSegmentDisamb(false));
8737 +	pantera->tag("Zażółć gęślą jaźń.", TaggingOptions());
8738  	return 0;
8739  }
8740 -
8741 Index: src/TaggingOptions.h
8742 ===================================================================
8743 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
8744 +++ src/TaggingOptions.h	2012-07-04 16:28:56.547823009 +0200
8745 @@ -0,0 +1,61 @@
8746 +/* 
8747 + * File:   TaggingOptions.h
8748 + * Author: mlenart
8749 + *
8750 + * Created on 28 maj 2012, 11:53
8751 + */
8752 +
8753 +#ifndef TAGGINGOPTIONS_H
8754 +#define	TAGGINGOPTIONS_H
8755 +
8756 +#include <string>
8757 +#include <istream>
8758 +#include <TaggingOptions.h>
8759 +
8760 +namespace Pantera {
8761 +
8762 +class TaggingOptions {
8763 +	
8764 +public:
8765 +	TaggingOptions();
8766 +	virtual ~TaggingOptions();
8767 +	
8768 +    TaggingOptions& morphDict(std::string morphDict);
8769 +    std::string morphDict() const;
8770 +	
8771 +    TaggingOptions& sentencerRules(std::string segmentRules);
8772 +    std::string sentencerRules() const;
8773 +	
8774 +    TaggingOptions& doTagging(bool doTagging);
8775 +    bool doTagging() const;
8776 +	
8777 +    TaggingOptions& doSegmentDisamb(bool doSegmentDisamb);
8778 +    bool doSegmentDisamb() const;
8779 +	
8780 +    TaggingOptions& doMorphAnalysis(bool doMorphAnalysis);
8781 +    bool doMorphAnalysis() const;
8782 +	
8783 +    TaggingOptions& doSentSplit(bool doSentSplit);
8784 +    bool doSentSplit() const;
8785 +
8786 +    TaggingOptions& useGuesser(bool useGuesser);
8787 +    bool useGuesser() const;
8788 +
8789 +    TaggingOptions& ignoreSentsInsideSegment(const bool ignore);
8790 +    bool ignoreSentsInsideSegment() const;
8791 +	
8792 +private:
8793 +	bool _doSentSplit;
8794 +	bool _doMorphAnalysis;
8795 +	bool _doSegmentDisamb;
8796 +	bool _doTagging;
8797 +	bool _useGuesser;
8798 +	bool _ignoreSentsInsideSegment;
8799 +	
8800 +	std::string _segmentRules;
8801 +	std::string _morphDict;
8802 +};
8803 +}
8804 +
8805 +#endif	/* TAGGINGOPTIONS_H */
8806 +
8807 Index: src/TaggingOptions.cpp
8808 ===================================================================
8809 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
8810 +++ src/TaggingOptions.cpp	2012-07-04 11:26:38.568173331 +0200
8811 @@ -0,0 +1,98 @@
8812 +/* 
8813 + * File:   TaggingOptions.cpp
8814 + * Author: mlenart
8815 + * 
8816 + * Created on 28 maj 2012, 11:53
8817 + */
8818 +
8819 +#include "TaggingOptions.h"
8820 +
8821 +namespace Pantera {
8822 +
8823 +TaggingOptions::TaggingOptions() {
8824 +	_doSentSplit = true;
8825 +	_doMorphAnalysis = true;
8826 +	_doSegmentDisamb = true;
8827 +	_doTagging = true;
8828 +	_useGuesser = false;
8829 +	_segmentRules = "";
8830 +	_morphDict = "";
8831 +	_ignoreSentsInsideSegment = false;
8832 +}
8833 +
8834 +TaggingOptions::~TaggingOptions() {
8835 +}
8836 +
8837 +TaggingOptions& TaggingOptions::morphDict(std::string morphDict) {
8838 +	this->_morphDict = morphDict;
8839 +	return *(this);
8840 +}
8841 +
8842 +std::string TaggingOptions::morphDict() const {
8843 +	return _morphDict;
8844 +}
8845 +
8846 +TaggingOptions& TaggingOptions::sentencerRules(
8847 +		std::string segmentRules) {
8848 +	this->_segmentRules = segmentRules;
8849 +	return *(this);
8850 +}
8851 +
8852 +std::string TaggingOptions::sentencerRules() const {
8853 +	return _segmentRules;
8854 +}
8855 +
8856 +TaggingOptions& TaggingOptions::doTagging(bool doTagging) {
8857 +	this->_doTagging = doTagging;
8858 +	return *(this);
8859 +}
8860 +
8861 +bool TaggingOptions::doTagging() const {
8862 +	return _doTagging;
8863 +}
8864 +
8865 +TaggingOptions& TaggingOptions::doSegmentDisamb(bool doSegmentDisamb) {
8866 +	this->_doSegmentDisamb = doSegmentDisamb;
8867 +	return *(this);
8868 +}
8869 +
8870 +bool TaggingOptions::doSegmentDisamb() const {
8871 +	return _doSegmentDisamb;
8872 +}
8873 +
8874 +TaggingOptions& TaggingOptions::doMorphAnalysis(bool doMorphAnalysis) {
8875 +	this->_doMorphAnalysis = doMorphAnalysis;
8876 +	return *(this);
8877 +}
8878 +
8879 +bool TaggingOptions::doMorphAnalysis() const {
8880 +	return _doMorphAnalysis;
8881 +}
8882 +
8883 +TaggingOptions& TaggingOptions::doSentSplit(bool doSentSplit) {
8884 +	this->_doSentSplit = doSentSplit;
8885 +	return *(this);
8886 +}
8887 +
8888 +bool TaggingOptions::doSentSplit() const {
8889 +	return _doSentSplit;
8890 +}
8891 +
8892 +TaggingOptions& TaggingOptions::useGuesser(bool useGuesser) {
8893 +	this->_useGuesser = useGuesser;
8894 +	return *(this);
8895 +}
8896 +
8897 +bool TaggingOptions::useGuesser() const {
8898 +	return _useGuesser;
8899 +}
8900 +
8901 +TaggingOptions& TaggingOptions::ignoreSentsInsideSegment(const bool ignore) {
8902 +	this->_ignoreSentsInsideSegment = ignore;
8903 +}
8904 +
8905 +bool TaggingOptions::ignoreSentsInsideSegment() const {
8906 +	return this->_ignoreSentsInsideSegment;
8907 +}
8908 +}
8909 +
8910 Index: src/wrapper.cpp
8911 ===================================================================
8912 --- src/wrapper.cpp.orig	2011-06-08 21:25:58.000000000 +0200
8913 +++ src/wrapper.cpp	2012-07-04 11:26:38.992173320 +0200
8914 @@ -2,15 +2,18 @@
8915   * PanteraWrapper.cpp
8916   *
8917   *  Created on: 30-11-2010
8918 - *      Author: lennyn
8919 + *      Author: mlenart
8920   *
8921   *  Modified by: bz
8922   */
8923  
8924  #include "concrete_wrapper.h"
8925 +#include <TaggingOptions.h>
8926  
8927  #include <iostream>
8928  #include <fstream>
8929 +#include <sstream>
8930 +#include <cstdio>
8931  
8932  #include <boost/scoped_ptr.hpp>
8933  #include <boost/filesystem.hpp>
8934 @@ -46,15 +49,14 @@
8935  
8936  static void load_engine_from_archive(
8937  		BTagger::BrillEngine<MyLexeme, MyScorer>& engine, string enginePath) {
8938 -  fs::path engine_path = find_with_path(ENGINES_PATH, enginePath);
8939 +	fs::path engine_path = find_with_path(ENGINES_PATH, enginePath);
8940  	fs::ifstream data_stream(engine_path, ios::in);
8941  	boost::archive::text_iarchive engine_archive(data_stream);
8942 -
8943  	engine_archive >> engine;
8944  }
8945  
8946  static Lexer<MyLexeme>* make_lexer(istream& stream) {
8947 -	return new PlainTextLexer<MyLexeme > (stream);
8948 +	return new PlainTextLexer<MyLexeme>(stream);
8949  }
8950  
8951  static vector<MyLexeme> tokenize(const string& text, const Tagset* tagset) {
8952 @@ -68,16 +70,37 @@
8953  	return lexems;
8954  }
8955  
8956 -static void splitIntoSents(vector<MyLexeme>& lexems) {
8957 -	static LibSegmentSentencer<MyLexeme> sentencer;
8958 -	lexems = sentencer.addSentenceDelimiters(lexems);
8959 +static void writeToFile(const string& fname, const string& data) {
8960 +	ofstream out(fname.c_str());
8961 +	out.exceptions(ofstream::badbit);
8962 +	out << data << endl;
8963  }
8964  
8965 -void ConcretePanteraWrapper::morphAnalyze(vector<MyLexeme>& lexems) {
8966 -	lexems = morfeusz.analyzeText(lexems);
8967 +static void splitIntoSents(vector<MyLexeme>& lexems, const string& rules) {
8968 +	static LibSegmentSentencer<MyLexeme> sentencer;
8969 +	char tmpName[L_tmpnam];
8970 +	tmpnam(tmpName);
8971 +	try {
8972 +		writeToFile(string(tmpName), rules);
8973 +		lexems = sentencer.addSentenceDelimiters(lexems, string(tmpName));
8974 +		remove(tmpName);
8975 +	} catch (...) {
8976 +		remove(tmpName);
8977 +		throw;
8978 +	}
8979 +}
8980 +
8981 +void ConcretePanteraWrapper::morphAnalyze(vector<MyLexeme>& lexems,
8982 +		const string& morphDict, const bool useGuesser) {
8983 +	morfeusz.clearMorphDict();
8984 +	if (!morphDict.empty()) {
8985 +		istringstream stream(morphDict);
8986 +		morfeusz.loadMorphDict(stream);
8987 +	}
8988 +	lexems = morfeusz.analyzeText(lexems, useGuesser);
8989  }
8990  
8991 -void ConcretePanteraWrapper::segmentDisamb(vector<MyLexeme>& lexems){
8992 +void ConcretePanteraWrapper::segmentDisamb(vector<MyLexeme>& lexems) {
8993  	segm_disamb.disambiguateSegmentation(lexems);
8994  }
8995  
8996 @@ -88,19 +111,20 @@
8997  	cerr << out.str() << endl;
8998  }
8999  
9000 -PanteraWrapper::PanteraWrapper(string tagsetName){
9001 -  tagsets = load_tagsets(tagsetName);
9002 -	tagset = const_cast<Tagset*> (tagsets[tagsets.size() - 1]);
9003 +PanteraWrapper::PanteraWrapper(string tagsetName) {
9004 +	tagsets = load_tagsets(tagsetName);
9005 +	tagset = const_cast<Tagset*>(tagsets[tagsets.size() - 1]);
9006  }
9007  
9008 -ConcretePanteraWrapper::ConcretePanteraWrapper(string engineName, string tagsetName) :
9009 -  PanteraWrapper(tagsetName), morfeusz(tagset, true) {
9010 +ConcretePanteraWrapper::ConcretePanteraWrapper(string engineName,
9011 +		string tagsetName) :
9012 +		PanteraWrapper(tagsetName), morfeusz(tagset) {
9013  
9014 -  morfeusz.setQuiet(true);
9015 +	morfeusz.setQuiet(true);
9016  
9017 -  add_phases_to_engine(engine, tagsets, rule_generators);
9018 -  load_engine_from_archive(engine, engineName);
9019 -  engine.setQuiet(true);
9020 +	add_phases_to_engine(engine, tagsets, rule_generators);
9021 +	load_engine_from_archive(engine, engineName);
9022 +	engine.setQuiet(true);
9023  
9024  }
9025  
9026 @@ -108,72 +132,56 @@
9027  }
9028  
9029  PanteraWrapper* PanteraWrapper::getInstance() {
9030 -  static ConcretePanteraWrapper pantera(DEFAULT_ENGINE, DEFAULT_LIB_TAGSET);
9031 -  return &pantera;
9032 +	static ConcretePanteraWrapper pantera(DEFAULT_ENGINE, DEFAULT_LIB_TAGSET);
9033 +	return &pantera;
9034  }
9035  
9036 -PanteraWrapper* PanteraWrapper::createInstance(string enginePath, string tagsetName) {
9037 -  return new ConcretePanteraWrapper(enginePath.empty() ? DEFAULT_ENGINE : enginePath,
9038 -      tagsetName.empty() ? DEFAULT_LIB_TAGSET : tagsetName);
9039 +PanteraWrapper* PanteraWrapper::createInstance(string enginePath,
9040 +		string tagsetName) {
9041 +	return new ConcretePanteraWrapper(
9042 +			enginePath.empty() ? DEFAULT_ENGINE : enginePath,
9043 +			tagsetName.empty() ? DEFAULT_LIB_TAGSET : tagsetName);
9044  }
9045  
9046 -vector<DefaultLexeme> ConcretePanteraWrapper::tag(const string& text) {
9047 -
9048 -	vector < MyLexeme > lexems = tokenize(text, tagset);
9049 -
9050 -//	debug(lexems, tagset);
9051 +vector<DefaultLexeme> ConcretePanteraWrapper::tag(const string& text,
9052 +		const TaggingOptions& options) {
9053  
9054 -	//cerr << "tokenized" << endl;
9055 -	splitIntoSents(lexems);
9056 -	//cerr << "split" << endl;
9057 -	morphAnalyze(lexems);
9058 -
9059 -  segmentDisamb(lexems);
9060 -	//cerr << "morphed" << endl;
9061 -
9062 -	LexemesFilter < MyLexeme > segments_filter(MyLexeme::SEGMENT);
9063 -	lexems = segments_filter.filterText(lexems);
9064 -	//cerr << "filtered" << endl;
9065 -	engine.tagText(lexems);
9066 -	//cerr << "tagged" << endl;
9067 -	lexems = segments_filter.unfilterText(lexems);
9068 -	//cerr << "unfiltered" << endl;
9069 -//	debug(lexems, tagset);
9070 -
9071 -	vector<DefaultLexeme> res(lexems.begin(), lexems.end());
9072 -	return res;
9073 +	vector<MyLexeme> lexems = tokenize(text, tagset);
9074 +	doTag(lexems, options);
9075 +	return vector<DefaultLexeme>(lexems.begin(), lexems.end());
9076  }
9077  
9078  vector<DefaultLexeme> ConcretePanteraWrapper::tag(
9079 -    const std::vector<DefaultLexeme> &lexems_,
9080 -    bool doSentSplit, bool doMorphAnalysis, bool doSegmentDisamb, bool doTagging){
9081 +		const std::vector<DefaultLexeme> &lexems_,
9082 +		const TaggingOptions& options) {
9083  
9084 -  vector<MyLexeme> lexems(lexems_.begin(), lexems_.end());
9085 +	vector<MyLexeme> lexems(lexems_.begin(), lexems_.end());
9086  
9087 -//	debug(lexems, tagset);
9088 -
9089 -  if (doSentSplit)
9090 -    splitIntoSents(lexems);
9091 -
9092 -  if (doMorphAnalysis)
9093 -    morphAnalyze(lexems);
9094 -
9095 -  if (doSegmentDisamb)
9096 -    segmentDisamb(lexems);
9097 -
9098 -  if (!doTagging)
9099 -    return vector<DefaultLexeme>(lexems.begin(), lexems.end());
9100 -
9101 -	LexemesFilter < MyLexeme > segments_filter(MyLexeme::SEGMENT);
9102 -	lexems = segments_filter.filterText(lexems);
9103 -	engine.tagText(lexems);
9104 -	lexems = segments_filter.unfilterText(lexems);
9105 -
9106 -//	debug(lexems, tagset);
9107 +	//	debug(lexems, tagset);
9108 +	this->doTag(lexems, options);
9109  
9110  	return vector<DefaultLexeme>(lexems.begin(), lexems.end());
9111  }
9112  
9113 +void ConcretePanteraWrapper::doTag(vector<MyLexeme>& lexems,
9114 +		const TaggingOptions& options) {
9115 +	if (options.doSentSplit())
9116 +		splitIntoSents(lexems, options.sentencerRules());
9117 +
9118 +	if (options.doMorphAnalysis())
9119 +		morphAnalyze(lexems, options.morphDict(), options.useGuesser());
9120 +
9121 +	if (options.doSegmentDisamb())
9122 +		this->segmentDisamb(lexems);
9123 +
9124 +	if (options.doTagging()) {
9125 +		LexemesFilter<MyLexeme> segments_filter(MyLexeme::SEGMENT);
9126 +		lexems = segments_filter.filterText(lexems);
9127 +		engine.tagText(lexems);
9128 +		lexems = segments_filter.unfilterText(lexems);
9129 +	}
9130 +}
9131 +
9132  Tagset* PanteraWrapper::getTagset() {
9133  	return tagset;
9134  }
9135 Index: src/nlpcommon/morfeusz.h
9136 ===================================================================
9137 --- src/nlpcommon/morfeusz.h.orig	2011-05-24 22:23:52.000000000 +0200
9138 +++ src/nlpcommon/morfeusz.h	2012-07-04 11:26:38.836173325 +0200
9139 @@ -17,7 +17,7 @@
9140  #include <boost/range/iterator_range.hpp>
9141  
9142  #include <iostream>
9143 -#include <fstream>
9144 +#include <istream>
9145  #include <vector>
9146  #include <morfeusz.h>
9147  #include <guesser_api.h>
9148 @@ -73,7 +73,6 @@
9149      const Tagset* odg_tagset;
9150      TagsetConverter<tag_type>* odg_converter;
9151  
9152 -    bool use_odgadywacz;
9153      bool quiet;
9154  
9155      // lowercase form -> vector of (base, tag)
9156 @@ -293,7 +292,7 @@
9157      }
9158  
9159  public:
9160 -    MorfeuszAnalyzer(const Tagset* out_tagset, bool use_odgadywacz = true)
9161 +    MorfeuszAnalyzer(const Tagset* out_tagset)
9162          : out_tagset(out_tagset),
9163            morf_tagset(load_tagset(MORFEUSZ_TAGSET)),
9164            morf_converter(PolishTagsetConverter<tag_type>::getSharedInstance(
9165 @@ -301,7 +300,6 @@
9166            odg_tagset(load_tagset(ODGADYWACZ_TAGSET)),
9167            odg_converter(PolishTagsetConverter<tag_type>::getSharedInstance(
9168                        odg_tagset, out_tagset)),
9169 -          use_odgadywacz(use_odgadywacz),
9170            quiet(false)
9171      {
9172      }
9173 @@ -321,14 +319,14 @@
9174      // 
9175      // Full-line comments starting with # are allowed.
9176      //
9177 -    void loadMorphDict(const string& filename) {
9178 +    void loadMorphDict(std::istream& stream) {
9179          wstring key;
9180          wstring base;
9181          std::vector<std::pair<wstring, string> > interps;
9182  
9183          char line_buffer[1024];
9184 -        ifstream stream(filename.c_str());
9185 -        stream.exceptions(ifstream::badbit);
9186 +//        ifstream stream(filename.c_str());
9187 +//        stream.exceptions(ifstream::badbit);
9188          while (!stream.eof()) {
9189              stream.getline(line_buffer, sizeof(line_buffer));
9190              string line(line_buffer);
9191 @@ -381,7 +379,11 @@
9192          }
9193      }
9194  
9195 -	vector<Lexeme> analyzeText(const vector<Lexeme>& text) {
9196 +    void clearMorphDict() {
9197 +    	morph_dict.clear();
9198 +    }
9199 +
9200 +	vector<Lexeme> analyzeText(const vector<Lexeme>& text, const bool use_odgadywacz) {
9201          vector<Lexeme> ret;
9202          int tidx = -1;
9203  		BOOST_FOREACH(const Lexeme& lex, text) {
9204 Index: src/nlpcommon/sentencer.h
9205 ===================================================================
9206 --- src/nlpcommon/sentencer.h.orig	2010-06-28 06:49:45.000000000 +0200
9207 +++ src/nlpcommon/sentencer.h	2012-07-04 11:26:38.888173322 +0200
9208 @@ -23,7 +23,9 @@
9209      Sentencer() { }
9210      virtual ~Sentencer() { }
9211  
9212 -    virtual vector<Lexeme> addSentenceDelimiters(const vector<Lexeme>& text) = 0;
9213 +    virtual vector<Lexeme> addSentenceDelimiters(
9214 +    		const vector<Lexeme>& text,
9215 +    		const string& sentencerRulesFile) = 0;
9216  };
9217  
9218  } // namespace NLPCommon
9219 Index: third_party/segment/segment.srx
9220 ===================================================================
9221 --- /dev/null	1970-01-01 00:00:00.000000000 +0000
9222 +++ third_party/segment/segment.srx	2012-07-04 11:15:13.596186558 +0200
9223 @@ -0,0 +1,5071 @@
9224 +<?xml version="1.0" encoding="UTF-8"?>
9225 +<srx xmlns="http://www.lisa.org/srx20" xmlns:okpsrx="http://okapi.sf.net/srx-extensions" version="2.0">
9226 +<header segmentsubflows="yes" cascade="yes">
9227 +<formathandle type="start" include="no"></formathandle>
9228 +<formathandle type="end" include="yes"></formathandle>
9229 +<formathandle type="isolated" include="yes"></formathandle>
9230 +<okpsrx:options oneSegmentIncludesAll="no" trimLeadingWhitespaces="no" trimTrailingWhitespaces="no"></okpsrx:options>
9231 +<okpsrx:sample language="pl_two" useMappedRules="no">Ingevolge paragraaf 4.7.4. van het SGR is ...
9232 +Jestem zły, bo... (wpisz własną odpowiedź) drażni mnie krowa.
9233 +Kierownictwo toleruje pracę z konieczności ("Skąd wezmę innego pracownika?") i jest zadowolone. Józek D. (45 l.) T.Love
9234 +Planowany wzrost przychodów najludniejszych gmin w br. będzie o 2 pkt. proc. wyższy od prognozowanej na br. stopy średniorocznej inflacji (15 proc.) natomiast wzrost wydatków przewyższa o 12 pkt. proc. stopę inflacji (co za dziwota! - przyp. red.) i tak dalej.
9235 +Nie jesteś Rosjaninem? - spytał przedstawiciel okręgu. 11.X.2001 (b. dobra gra).
9236 +Temperatura wody w systemie wynosi 30°C.W skład obiegu..
9237 +H. Spiegel i D. Spiegel uczą pacjenta wchodzenia w autohipnozę na s. 112. Koncert pana Sarasetego skrzypka) ze współudziałem p. Schlozera, profesora konserwatorium warszawskiego.
9238 +To jest św. Paweł. W r. 1994 pojechałem do Rygi. To jest parę spraw itd., ale trzeba to załatwić. (Dz. U. Nr 22 poz. 162).
9239 +{0>Utopia.&lt;0}
9240 +Po zakończeniu jego kadencji (pod koniec maja br.) zamierzam ubiegać się o wybór do zarządu. (5 tys.) złotych. Tu jest 5 ww. autorów, np. Józek. Zrobiłem wiele dobrego itd. Współczynniki załamania. On nie. Określone współczynniki załamania itd.Ten proces prowadzi.
9241 +Pochodził z rodziny Roberta E. Po wojnie wyzwolił się. Jerzy W. Urban, doktor psychiatra. Patrz art. 3 ust. 3. To piękne m. st. Warszawa.
9242 +Ik vind dat R. Baars een slechte (!) programmeur is. Als voetballer wordt hij nooit een prof. Maar prof. N.A.W. Th.Ch. Janssen wordt dat wel. Maar of dat zo blijft ... dat weet ik niet. Hij is m.a.w. een beginneling. Ook moet  je rekening houden met af-
9243 +gebroken regels.En soms vergeet je het begin gewoon. "Ik ben gek" zei hij "op voetbal." Of je dat wil horen is niet duidelijk.
9244 +
9245 +U.S. Dist. Judge William G. Bush and Gen. J. Nugent Jr. Dumont, as well as William B. Hartslef Jr. are here. Dr. Jekyll and Mr. Hyde welcome you.
9246 +It [really!] works. This is e.g. Mr. Smith, who talks slowly... And this is another sentence. Leave me alone!, he yelled. I am in the U.S. Army. Charles (Ind.) said he. Let's go to the U. S. A. He won't. Really. On p. 6 there's nothing. Sentence ends here. (Another one). Let's meet at 5 p.m. It was Thursday. I met her at 5 p.m. and went to the movies. There are dogs, cats etc. and you should know it.</okpsrx:sample>
9247 +<okpsrx:rangeRule></okpsrx:rangeRule>
9248 +</header>
9249 +<body>
9250 +<languagerules>
9251 +
9252 +<languagerule languagerulename="Greek">
9253 +<!--κ.λπ. - και λοιπά-->
9254 +<rule break="no">
9255 +<beforebreak>\bκ\.λπ\.\s</beforebreak>
9256 +<afterbreak></afterbreak>
9257 +</rule>
9258 +<!--π.χ. - παραδείγματος χάριν-->
9259 +<rule break="no">
9260 +<beforebreak>\bπ\.χ\.\s</beforebreak>
9261 +<afterbreak></afterbreak>
9262 +</rule>
9263 +<!--months-->
9264 +<rule break="no">
9265 +<beforebreak>\b(Ιαν|Φεβ|Μαρ|Απρ|Μαϊ|Ιουν|Ιουλ|Αυγ|Σεπ|Οκτ|Νοε|Δεκ)\.\s</beforebreak>
9266 +<afterbreak></afterbreak>
9267 +</rule>
9268 +<rule break="yes">
9269 +<beforebreak>[\.!;…][\u00BB\u2019\u201D\u203A"'\p{Pe}\u0002]*\s</beforebreak>
9270 +<afterbreak></afterbreak>
9271 +</rule>
9272 +<rule break="yes">
9273 +<beforebreak>[\.!;…]['"\u00BB\u2019\u201D\u203A\p{Pe}\u0002]*</beforebreak>
9274 +<afterbreak>\p{Lu}[^\p{Lu}]</afterbreak>
9275 +</rule>
9276 +<rule break="yes">
9277 +<beforebreak>\s\p{L}[\.!;…]\s</beforebreak>
9278 +<afterbreak>\p{Lu}\p{Ll}</afterbreak>
9279 +</rule>
9280 +</languagerule>
9281 +
9282 +<languagerule languagerulename="Polish">
9283 +<rule break="no">
9284 +<beforebreak>\badw\.\s</beforebreak>
9285 +<afterbreak></afterbreak>
9286 +</rule>
9287 +<rule break="no">
9288 +<beforebreak>\bafr\.\s</beforebreak>
9289 +<afterbreak></afterbreak>
9290 +</rule>
9291 +<rule break="no">
9292 +<beforebreak>\bakad\.\s</beforebreak>
9293 +<afterbreak></afterbreak>
9294 +</rule>
9295 +<rule break="no">
9296 +<beforebreak>\b[Aa]l\.\s</beforebreak>
9297 +<afterbreak></afterbreak>
9298 +</rule>
9299 +<rule break="no">
9300 +<beforebreak>\bam\.\s</beforebreak>
9301 +<afterbreak></afterbreak>
9302 +</rule>
9303 +<rule break="no">
9304 +<beforebreak>\bamer\.\s</beforebreak>
9305 +<afterbreak></afterbreak>
9306 +</rule>
9307 +<rule break="no">
9308 +<beforebreak>\barch\.\s</beforebreak>
9309 +<afterbreak></afterbreak>
9310 +</rule>
9311 +<rule break="no">
9312 +<beforebreak>\b[Aa]rt\.\s</beforebreak>
9313 +<afterbreak></afterbreak>
9314 +</rule>
9315 +<rule break="no">
9316 +<beforebreak>\bartyst\.\s</beforebreak>
9317 +<afterbreak></afterbreak>
9318 +</rule>
9319 +<rule break="no">
9320 +<beforebreak>\bastr\.\s</beforebreak>
9321 +<afterbreak></afterbreak>
9322 +</rule>
9323 +<rule break="no">
9324 +<beforebreak>\baustr\.\s</beforebreak>
9325 +<afterbreak></afterbreak>
9326 +</rule>
9327 +<rule break="no">
9328 +<beforebreak>\bbałt\.\s</beforebreak>
9329 +<afterbreak></afterbreak>
9330 +</rule>
9331 +<rule break="no">
9332 +<beforebreak>\bbdb\.\s</beforebreak>
9333 +<afterbreak></afterbreak>
9334 +</rule>
9335 +<rule break="no">
9336 +<beforebreak>\bbł\.\s</beforebreak>
9337 +<afterbreak></afterbreak>
9338 +</rule>
9339 +<rule break="no">
9340 +<beforebreak>\bbm\.\s</beforebreak>
9341 +<afterbreak></afterbreak>
9342 +</rule>
9343 +<rule break="no">
9344 +<beforebreak>\bbr\.\p{Pe}?\s</beforebreak>
9345 +<afterbreak></afterbreak>
9346 +</rule>
9347 +<rule break="no">
9348 +<beforebreak>\bbry[gt]\.\s</beforebreak>
9349 +<afterbreak></afterbreak>
9350 +</rule>
9351 +<rule break="no">
9352 +<beforebreak>\bcentr\.\s</beforebreak>
9353 +<afterbreak></afterbreak>
9354 +</rule>
9355 +<rule break="no">
9356 +<beforebreak>\bces\.\s</beforebreak>
9357 +<afterbreak></afterbreak>
9358 +</rule>
9359 +<rule break="no">
9360 +<beforebreak>\bchem\.\s</beforebreak>
9361 +<afterbreak></afterbreak>
9362 +</rule>
9363 +<rule break="no">
9364 +<beforebreak>\bchiń\.\s</beforebreak>
9365 +<afterbreak></afterbreak>
9366 +</rule>
9367 +<rule break="no">
9368 +<beforebreak>\bchir\.\s</beforebreak>
9369 +<afterbreak></afterbreak>
9370 +</rule>
9371 +<rule break="no">
9372 +<beforebreak>\bc\.k\.\s</beforebreak>
9373 +<afterbreak></afterbreak>
9374 +</rule>
9375 +<rule break="no">
9376 +<beforebreak>\bc\.o\.\s</beforebreak>
9377 +<afterbreak></afterbreak>
9378 +</rule>
9379 +<rule break="no">
9380 +<beforebreak>\bcyg\.\s</beforebreak>
9381 +<afterbreak></afterbreak>
9382 +</rule>
9383 +<rule break="no">
9384 +<beforebreak>\bcyw\.\s</beforebreak>
9385 +<afterbreak></afterbreak>
9386 +</rule>
9387 +<rule break="no">
9388 +<beforebreak>\bcyt\.\s</beforebreak>
9389 +<afterbreak></afterbreak>
9390 +</rule>
9391 +<rule break="no">
9392 +<beforebreak>\bczes\.\s</beforebreak>
9393 +<afterbreak></afterbreak>
9394 +</rule>
9395 +<rule break="no">
9396 +<beforebreak>\bczw\.\s</beforebreak>
9397 +<afterbreak></afterbreak>
9398 +</rule>
9399 +<rule break="no">
9400 +<beforebreak>\b[Cc]d\.\s</beforebreak>
9401 +<afterbreak></afterbreak>
9402 +</rule>
9403 +<rule break="no">
9404 +<beforebreak>\bczyt\.\s</beforebreak>
9405 +<afterbreak></afterbreak>
9406 +</rule>
9407 +<rule break="no">
9408 +<beforebreak>\bćw\.\s</beforebreak>
9409 +<afterbreak></afterbreak>
9410 +</rule>
9411 +<rule break="no">
9412 +<beforebreak>\bćwicz\.\s</beforebreak>
9413 +<afterbreak></afterbreak>
9414 +</rule>
9415 +<rule break="no">
9416 +<beforebreak>\bdaw\.\s</beforebreak>
9417 +<afterbreak></afterbreak>
9418 +</rule>
9419 +<rule break="no">
9420 +<beforebreak>\bdcn\.\s</beforebreak>
9421 +<afterbreak></afterbreak>
9422 +</rule>
9423 +<rule break="no">
9424 +<beforebreak>\bdekl\.\s</beforebreak>
9425 +<afterbreak></afterbreak>
9426 +</rule>
9427 +<rule break="no">
9428 +<beforebreak>\bdemokr\.\s</beforebreak>
9429 +<afterbreak></afterbreak>
9430 +</rule>
9431 +<rule break="no">
9432 +<beforebreak>\bdet\.\s</beforebreak>
9433 +<afterbreak></afterbreak>
9434 +</rule>
9435 +<rule break="no">
9436 +<beforebreak>\bdiec\.\s</beforebreak>
9437 +<afterbreak></afterbreak>
9438 +</rule>
9439 +<rule break="no">
9440 +<beforebreak>\bdł\.\s</beforebreak>
9441 +<afterbreak></afterbreak>
9442 +</rule>
9443 +<rule break="no">
9444 +<beforebreak>\bdn\.\s</beforebreak>
9445 +<afterbreak></afterbreak>
9446 +</rule>
9447 +<!--5 dol., dop. red., dot.-->
9448 +<rule break="no">
9449 +<beforebreak>\bdo[tlp]\.\s</beforebreak>
9450 +<afterbreak></afterbreak>
9451 +</rule>
9452 +<rule break="no">
9453 +<beforebreak>\bdost\.\s</beforebreak>
9454 +<afterbreak></afterbreak>
9455 +</rule>
9456 +<rule break="no">
9457 +<beforebreak>\bdosł\.\s</beforebreak>
9458 +<afterbreak></afterbreak>
9459 +</rule>
9460 +<rule break="no">
9461 +<beforebreak>\bh\.c\.\s</beforebreak>
9462 +<afterbreak></afterbreak>
9463 +</rule>
9464 +<rule break="no">
9465 +<beforebreak>\bds\.\s</beforebreak>
9466 +<afterbreak></afterbreak>
9467 +</rule>
9468 +<rule break="no">
9469 +<beforebreak>\bdst\.\s</beforebreak>
9470 +<afterbreak></afterbreak>
9471 +</rule>
9472 +<rule break="no">
9473 +<beforebreak>\bduszp\.\s</beforebreak>
9474 +<afterbreak></afterbreak>
9475 +</rule>
9476 +<rule break="no">
9477 +<beforebreak>\bdypl\.\s</beforebreak>
9478 +<afterbreak></afterbreak>
9479 +</rule>
9480 +<rule break="no">
9481 +<beforebreak>\begz\.\s</beforebreak>
9482 +<afterbreak></afterbreak>
9483 +</rule>
9484 +<rule break="no">
9485 +<beforebreak>\bekol\.\s</beforebreak>
9486 +<afterbreak></afterbreak>
9487 +</rule>
9488 +<rule break="no">
9489 +<beforebreak>\bekon\.\s</beforebreak>
9490 +<afterbreak></afterbreak>
9491 +</rule>
9492 +<rule break="no">
9493 +<beforebreak>\belektr\.\s</beforebreak>
9494 +<afterbreak></afterbreak>
9495 +</rule>
9496 +<rule break="no">
9497 +<beforebreak>\bem\.\s</beforebreak>
9498 +<afterbreak></afterbreak>
9499 +</rule>
9500 +<rule break="no">
9501 +<beforebreak>\bew\.\s</beforebreak>
9502 +<afterbreak></afterbreak>
9503 +</rule>
9504 +<rule break="no">
9505 +<beforebreak>\bfab\.\s</beforebreak>
9506 +<afterbreak></afterbreak>
9507 +</rule>
9508 +<rule break="no">
9509 +<beforebreak>\bfarm\.\s</beforebreak>
9510 +<afterbreak></afterbreak>
9511 +</rule>
9512 +<rule break="no">
9513 +<beforebreak>\bfot\.\s</beforebreak>
9514 +<afterbreak></afterbreak>
9515 +</rule>
9516 +<rule break="no">
9517 +<beforebreak>\bfr\.\s</beforebreak>
9518 +<afterbreak></afterbreak>
9519 +</rule>
9520 +<rule break="no">
9521 +<beforebreak>\bgat\.\s</beforebreak>
9522 +<afterbreak></afterbreak>
9523 +</rule>
9524 +<rule break="no">
9525 +<beforebreak>\bgastr\.\s</beforebreak>
9526 +<afterbreak></afterbreak>
9527 +</rule>
9528 +<rule break="no">
9529 +<beforebreak>\bgeogr\.\s</beforebreak>
9530 +<afterbreak></afterbreak>
9531 +</rule>
9532 +<rule break="no">
9533 +<beforebreak>\bgeol\.\s</beforebreak>
9534 +<afterbreak></afterbreak>
9535 +</rule>
9536 +<rule break="no">
9537 +<beforebreak>\bgimn\.\s</beforebreak>
9538 +<afterbreak></afterbreak>
9539 +</rule>
9540 +<rule break="no">
9541 +<beforebreak>\bgłęb\.\s</beforebreak>
9542 +<afterbreak></afterbreak>
9543 +</rule>
9544 +<rule break="no">
9545 +<beforebreak>\bgm\.\s</beforebreak>
9546 +<afterbreak></afterbreak>
9547 +</rule>
9548 +<rule break="no">
9549 +<beforebreak>\bgodz\.\s</beforebreak>
9550 +<afterbreak></afterbreak>
9551 +</rule>
9552 +<rule break="no">
9553 +<beforebreak>\bgórn\.\s</beforebreak>
9554 +<afterbreak></afterbreak>
9555 +</rule>
9556 +<rule break="no">
9557 +<beforebreak>\bgosp\.\s</beforebreak>
9558 +<afterbreak></afterbreak>
9559 +</rule>
9560 +<rule break="no">
9561 +<beforebreak>\bgr\.\s</beforebreak>
9562 +<afterbreak></afterbreak>
9563 +</rule>
9564 +<rule break="no">
9565 +<beforebreak>\bgram\.\s</beforebreak>
9566 +<afterbreak></afterbreak>
9567 +</rule>
9568 +<rule break="no">
9569 +<beforebreak>\bhist\.\s</beforebreak>
9570 +<afterbreak></afterbreak>
9571 +</rule>
9572 +<rule break="no">
9573 +<beforebreak>\bhiszp\.\s</beforebreak>
9574 +<afterbreak></afterbreak>
9575 +</rule>
9576 +<rule break="no">
9577 +<beforebreak>\b[Hh]r\.\s</beforebreak>
9578 +<afterbreak></afterbreak>
9579 +</rule>
9580 +<rule break="no">
9581 +<beforebreak>\bhot\.\s</beforebreak>
9582 +<afterbreak></afterbreak>
9583 +</rule>
9584 +<rule break="no">
9585 +<beforebreak>\bid\.\s</beforebreak>
9586 +<afterbreak></afterbreak>
9587 +</rule>
9588 +<rule break="no">
9589 +<beforebreak>\bin\.\s</beforebreak>
9590 +<afterbreak></afterbreak>
9591 +</rule>
9592 +<rule break="no">
9593 +<beforebreak>\bim\.\s</beforebreak>
9594 +<afterbreak></afterbreak>
9595 +</rule>
9596 +<rule break="no">
9597 +<beforebreak>\biron\.\s</beforebreak>
9598 +<afterbreak></afterbreak>
9599 +</rule>
9600 +<rule break="no">
9601 +<beforebreak>\bjn\.\s</beforebreak>
9602 +<afterbreak></afterbreak>
9603 +</rule>
9604 +<rule break="no">
9605 +<beforebreak>\bkard\.\s</beforebreak>
9606 +<afterbreak></afterbreak>
9607 +</rule>
9608 +<rule break="no">
9609 +<beforebreak>\bkat\.\s</beforebreak>
9610 +<afterbreak></afterbreak>
9611 +</rule>
9612 +<rule break="no">
9613 +<beforebreak>\bkatol\.\s</beforebreak>
9614 +<afterbreak></afterbreak>
9615 +</rule>
9616 +<rule break="no">
9617 +<beforebreak>\bk\.k\.\s</beforebreak>
9618 +<afterbreak></afterbreak>
9619 +</rule>
9620 +<rule break="no">
9621 +<beforebreak>\bkk\.\s</beforebreak>
9622 +<afterbreak></afterbreak>
9623 +</rule>
9624 +<!--kol., kl.-->
9625 +<rule break="no">
9626 +<beforebreak>\bko?l\.\s</beforebreak>
9627 +<afterbreak></afterbreak>
9628 +</rule>
9629 +<rule break="no">
9630 +<beforebreak>\bk\.p\.a\.\s</beforebreak>
9631 +<afterbreak></afterbreak>
9632 +</rule>
9633 +<rule break="no">
9634 +<beforebreak>\bkpc\.\s</beforebreak>
9635 +<afterbreak></afterbreak>
9636 +</rule>
9637 +<rule break="no">
9638 +<beforebreak>\bk\.p\.c\.\s</beforebreak>
9639 +<afterbreak></afterbreak>
9640 +</rule>
9641 +<rule break="no">
9642 +<beforebreak>\bkpt\.\s</beforebreak>
9643 +<afterbreak></afterbreak>
9644 +</rule>
9645 +<rule break="no">
9646 +<beforebreak>\bkr\.\s</beforebreak>
9647 +<afterbreak></afterbreak>
9648 +</rule>
9649 +<rule break="no">
9650 +<beforebreak>\bk\.r\.\s</beforebreak>
9651 +<afterbreak></afterbreak>
9652 +</rule>
9653 +<rule break="no">
9654 +<beforebreak>\bkrak\.\s</beforebreak>
9655 +<afterbreak></afterbreak>
9656 +</rule>
9657 +<rule break="no">
9658 +<beforebreak>\bk\.r\.o\.\s</beforebreak>
9659 +<afterbreak></afterbreak>
9660 +</rule>
9661 +<rule break="no">
9662 +<beforebreak>\bkryt\.\s</beforebreak>
9663 +<afterbreak></afterbreak>
9664 +</rule>
9665 +<rule break="no">
9666 +<beforebreak>\bkult\.\s</beforebreak>
9667 +<afterbreak></afterbreak>
9668 +</rule>
9669 +<rule break="no">
9670 +<beforebreak>\blaic\.\s</beforebreak>
9671 +<afterbreak></afterbreak>
9672 +</rule>
9673 +<rule break="no">
9674 +<beforebreak>\błac\.\s</beforebreak>
9675 +<afterbreak></afterbreak>
9676 +</rule>
9677 +<rule break="no">
9678 +<beforebreak>\bniem\.\s</beforebreak>
9679 +<afterbreak></afterbreak>
9680 +</rule>
9681 +<rule break="no">
9682 +<beforebreak>\bwoj\.\s</beforebreak>
9683 +<afterbreak></afterbreak>
9684 +</rule>
9685 +<rule break="no">
9686 +<beforebreak>\b[Nn][bp]\.\s</beforebreak>
9687 +<afterbreak></afterbreak>
9688 +</rule>
9689 +<rule break="no">
9690 +<beforebreak>\bpo[lw]\.\s</beforebreak>
9691 +<afterbreak></afterbreak>
9692 +</rule>
9693 +<rule break="no">
9694 +<beforebreak>\bm\.in\.\s</beforebreak>
9695 +<afterbreak></afterbreak>
9696 +</rule>
9697 +<!--pt., ps.-->
9698 +<rule break="no">
9699 +<beforebreak>\b[Pp][ts]\.\s</beforebreak>
9700 +<afterbreak></afterbreak>
9701 +</rule>
9702 +<rule break="no">
9703 +<beforebreak>\bcdn\.\s</beforebreak>
9704 +<afterbreak></afterbreak>
9705 +</rule>
9706 +<rule break="no">
9707 +<beforebreak>\bjw\.\s</beforebreak>
9708 +<afterbreak></afterbreak>
9709 +</rule>
9710 +<rule break="no">
9711 +<beforebreak>\b[Rr]y[cs]\.\s</beforebreak>
9712 +<afterbreak></afterbreak>
9713 +</rule>
9714 +<rule break="no">
9715 +<beforebreak>\btj\.\s</beforebreak>
9716 +<afterbreak></afterbreak>
9717 +</rule>
9718 +<rule break="no">
9719 +<beforebreak>\b[Tt]zw\.\s</beforebreak>
9720 +<afterbreak></afterbreak>
9721 +</rule>
9722 +<rule break="no">
9723 +<beforebreak>\btzn\.\s</beforebreak>
9724 +<afterbreak></afterbreak>
9725 +</rule>
9726 +<rule break="no">
9727 +<beforebreak>\bzob\.\s</beforebreak>
9728 +<afterbreak></afterbreak>
9729 +</rule>
9730 +<rule break="no">
9731 +<beforebreak>\bang\.\s</beforebreak>
9732 +<afterbreak></afterbreak>
9733 +</rule>
9734 +<!--ub. rok i ul. Dobra-->
9735 +<rule break="no">
9736 +<beforebreak>\bu[lb]\.\s?</beforebreak>
9737 +<afterbreak></afterbreak>
9738 +</rule>
9739 +<!--pl., pw., pn.-->
9740 +<rule break="no">
9741 +<beforebreak>\bp[wnl]\.\s</beforebreak>
9742 +<afterbreak></afterbreak>
9743 +</rule>
9744 +<rule break="no">
9745 +<beforebreak>\bal\.\s</beforebreak>
9746 +<afterbreak></afterbreak>
9747 +</rule>
9748 +<rule break="no">
9749 +<beforebreak>\bk\.\s</beforebreak>
9750 +<afterbreak></afterbreak>
9751 +</rule>
9752 +<rule break="no">
9753 +<beforebreak>\bn\.\s</beforebreak>
9754 +<afterbreak></afterbreak>
9755 +</rule>
9756 +<!--ok. 30 proc. lub ok. trzydzieści procent-->
9757 +<rule break="no">
9758 +<beforebreak>\b[Oo]k\.\s</beforebreak>
9759 +<afterbreak>[\p{Ll}\d]</afterbreak>
9760 +</rule>
9761 +<!--Include the incorrect form "tyś." (5 tyś. zł), 4,5tys.-->
9762 +<rule break="no">
9763 +<beforebreak>\b[\d,\.]*ty[sś]\.\p{Pe}?\s</beforebreak>
9764 +<afterbreak></afterbreak>
9765 +</rule>
9766 +<!--nr. 1 (z błędem)-->
9767 +<rule break="no">
9768 +<beforebreak>\b[Nn]r\.\s</beforebreak>
9769 +<afterbreak>\d</afterbreak>
9770 +</rule>
9771 +<!--wł., ww.-->
9772 +<rule break="no">
9773 +<beforebreak>\bw[wł]\.\s</beforebreak>
9774 +<afterbreak></afterbreak>
9775 +</rule>
9776 +<rule break="no">
9777 +<beforebreak>\bur\.\s</beforebreak>
9778 +<afterbreak></afterbreak>
9779 +</rule>
9780 +<rule break="no">
9781 +<beforebreak>\bzm\.\s</beforebreak>
9782 +<afterbreak></afterbreak>
9783 +</rule>
9784 +<rule break="no">
9785 +<beforebreak>\bżyd\.\s</beforebreak>
9786 +<afterbreak></afterbreak>
9787 +</rule>
9788 +<rule break="no">
9789 +<beforebreak>\bżarg\.\s</beforebreak>
9790 +<afterbreak></afterbreak>
9791 +</rule>
9792 +<rule break="no">
9793 +<beforebreak>\bżyw\.\s</beforebreak>
9794 +<afterbreak></afterbreak>
9795 +</rule>
9796 +<rule break="no">
9797 +<beforebreak>\bwył\.\s</beforebreak>
9798 +<afterbreak></afterbreak>
9799 +</rule>
9800 +<rule break="no">
9801 +<beforebreak>\b[bu]p\.\s</beforebreak>
9802 +<afterbreak></afterbreak>
9803 +</rule>
9804 +<rule break="no">
9805 +<beforebreak>\bwyst\.\s</beforebreak>
9806 +<afterbreak></afterbreak>
9807 +</rule>
9808 +<rule break="yes">
9809 +<beforebreak>\b(?iu)mazeł\stow\.\s</beforebreak>
9810 +<afterbreak></afterbreak>
9811 +</rule>
9812 +<rule break="no">
9813 +<beforebreak>\b[Tt]ow\.\s</beforebreak>
9814 +<afterbreak></afterbreak>
9815 +</rule>
9816 +<rule break="no">
9817 +<beforebreak>\bo\.\s</beforebreak>
9818 +<afterbreak></afterbreak>
9819 +</rule>
9820 +<rule break="no">
9821 +<beforebreak>\b([sS]p|st|[Ss]półdz|społ|spółgł|[Ss]to[łw])\.\s</beforebreak>
9822 +<afterbreak></afterbreak>
9823 +</rule>
9824 +<rule break="no">
9825 +<beforebreak>\bzn\.\s</beforebreak>
9826 +<afterbreak></afterbreak>
9827 +</rule>
9828 +<rule break="no">
9829 +<beforebreak>\bzew\.\s</beforebreak>
9830 +<afterbreak></afterbreak>
9831 +</rule>
9832 +<rule break="no">
9833 +<beforebreak>\bzewn\.\s</beforebreak>
9834 +<afterbreak></afterbreak>
9835 +</rule>
9836 +<rule break="no">
9837 +<beforebreak>\bzdr\.\s</beforebreak>
9838 +<afterbreak></afterbreak>
9839 +</rule>
9840 +<rule break="no">
9841 +<beforebreak>\bzazw\.\s</beforebreak>
9842 +<afterbreak></afterbreak>
9843 +</rule>
9844 +<rule break="no">
9845 +<beforebreak>\bzast\.\s</beforebreak>
9846 +<afterbreak></afterbreak>
9847 +</rule>
9848 +<rule break="no">
9849 +<beforebreak>\bzaw\.\s</beforebreak>
9850 +<afterbreak></afterbreak>
9851 +</rule>
9852 +<rule break="no">
9853 +<beforebreak>\bzał\.\s</beforebreak>
9854 +<afterbreak></afterbreak>
9855 +</rule>
9856 +<rule break="no">
9857 +<beforebreak>\bzal\.\s</beforebreak>
9858 +<afterbreak></afterbreak>
9859 +</rule>
9860 +<rule break="no">
9861 +<beforebreak>\bzam\.\s</beforebreak>
9862 +<afterbreak></afterbreak>
9863 +</rule>
9864 +<rule break="no">
9865 +<beforebreak>\bzak\.\s</beforebreak>
9866 +<afterbreak></afterbreak>
9867 +</rule>
9868 +<rule break="no">
9869 +<beforebreak>\bzakł\.\s</beforebreak>
9870 +<afterbreak></afterbreak>
9871 +</rule>
9872 +<rule break="no">
9873 +<beforebreak>\bzagr\.\s</beforebreak>
9874 +<afterbreak></afterbreak>
9875 +</rule>
9876 +<rule break="no">
9877 +<beforebreak>\bzach\.\s</beforebreak>
9878 +<afterbreak></afterbreak>
9879 +</rule>
9880 +<rule break="no">
9881 +<beforebreak>\b[Aa]dw\.\s</beforebreak>
9882 +<afterbreak></afterbreak>
9883 +</rule>
9884 +<rule break="no">
9885 +<beforebreak>\b[Ll]ek\.\s</beforebreak>
9886 +<afterbreak></afterbreak>
9887 +</rule>
9888 +<rule break="no">
9889 +<beforebreak>\bmed\.\s</beforebreak>
9890 +<afterbreak></afterbreak>
9891 +</rule>
9892 +<rule break="no">
9893 +<beforebreak>\b[Mm]ec\.\s</beforebreak>
9894 +<afterbreak></afterbreak>
9895 +</rule>
9896 +<rule break="no">
9897 +<beforebreak>\b[Dd]oc\.\s</beforebreak>
9898 +<afterbreak></afterbreak>
9899 +</rule>
9900 +<!--dyw., dyr.-->
9901 +<rule break="no">
9902 +<beforebreak>\b[Dd]y[wr]\.\s</beforebreak>
9903 +<afterbreak></afterbreak>
9904 +</rule>
9905 +<rule break="no">
9906 +<beforebreak>\b[Ii]nż\.\s</beforebreak>
9907 +<afterbreak></afterbreak>
9908 +</rule>
9909 +<rule break="no">
9910 +<beforebreak>\b(?iu)mgr\.\s</beforebreak>
9911 +<afterbreak></afterbreak>
9912 +</rule>
9913 +<!--dh (druh), dr-->
9914 +<rule break="no">
9915 +<beforebreak>\b[dD][hr]\.\s</beforebreak>
9916 +<afterbreak></afterbreak>
9917 +</rule>
9918 +<!--p. Nowak-->
9919 +<rule break="no">
9920 +<beforebreak>\b[pP]\.\s</beforebreak>
9921 +<afterbreak>\p{Lu}\p{Ll}+</afterbreak>
9922 +</rule>
9923 +<rule break="no">
9924 +<beforebreak>\b[Rr]ed\.\)?\s</beforebreak>
9925 +<afterbreak></afterbreak>
9926 +</rule>
9927 +<rule break="no">
9928 +<beforebreak>\b(?iu)pro[fk]\.\s</beforebreak>
9929 +<afterbreak></afterbreak>
9930 +</rule>
9931 +<rule break="no">
9932 +<beforebreak>\bhab\.\s</beforebreak>
9933 +<afterbreak></afterbreak>
9934 +</rule>
9935 +<rule break="no">
9936 +<beforebreak>\b[Pp]łk\.\s</beforebreak>
9937 +<afterbreak></afterbreak>
9938 +</rule>
9939 +<rule break="no">
9940 +<beforebreak>\b([Nn]a|[Pp]o)dkom\.\s</beforebreak>
9941 +<afterbreak></afterbreak>
9942 +</rule>
9943 +<rule break="no">
9944 +<beforebreak>\b[kK]s\.\s</beforebreak>
9945 +<afterbreak></afterbreak>
9946 +</rule>
9947 +<rule break="no">
9948 +<beforebreak>\b(?iu)gen\.\s</beforebreak>
9949 +<afterbreak></afterbreak>
9950 +</rule>
9951 +<rule break="no">
9952 +<beforebreak>\b(?iu)por\.\s</beforebreak>
9953 +<afterbreak></afterbreak>
9954 +</rule>
9955 +<rule break="no">
9956 +<beforebreak>\b[Rr]eż\.\s</beforebreak>
9957 +<afterbreak></afterbreak>
9958 +</rule>
9959 +<rule break="no">
9960 +<beforebreak>\b[Pp]rzyp\.\s</beforebreak>
9961 +<afterbreak></afterbreak>
9962 +</rule>
9963 +<!--msza św. lub św. Paweł; śp. Jadwiga Jagiełłowa-->
9964 +<rule break="no">
9965 +<beforebreak>\b[śŚ][pwW]\.\s</beforebreak>
9966 +<afterbreak></afterbreak>
9967 +</rule>
9968 +<rule break="no">
9969 +<beforebreak>\betc\.\s</beforebreak>
9970 +<afterbreak>\p{Ll}</afterbreak>
9971 +</rule>
9972 +<!--These can appear at the end of sentence, so watch out for the next letter: it shouldn't be uppercase.-->
9973 +<rule break="no">
9974 +<beforebreak>\bit[dp]\.\s</beforebreak>
9975 +<afterbreak>[„”"]?\p{Ll}</afterbreak>
9976 +</rule>
9977 +<rule break="no">
9978 +<beforebreak>\bproc\.\)?\s</beforebreak>
9979 +<afterbreak>\p{Ll}|\p{Lu}\p{Lu}+</afterbreak>
9980 +</rule>
9981 +<rule break="no">
9982 +<beforebreak>\b[rwn]\.\s</beforebreak>
9983 +<afterbreak>\p{Ll}</afterbreak>
9984 +</rule>
9985 +<rule break="no">
9986 +<beforebreak>\bit[dp]\.\s</beforebreak>
9987 +<afterbreak>\p{Ll}</afterbreak>
9988 +</rule>
9989 +<rule break="no">
9990 +<beforebreak>\bcdn\.\s</beforebreak>
9991 +<afterbreak>\p{Ll}</afterbreak>
9992 +</rule>
9993 +<rule break="no">
9994 +<beforebreak>\b[Ss]zer\.\s</beforebreak>
9995 +<afterbreak></afterbreak>
9996 +</rule>
9997 +<rule break="no">
9998 +<beforebreak>\bjw\.\s</beforebreak>
9999 +<afterbreak>\p{Ll}</afterbreak>
10000 +</rule>
10001 +<rule break="no">
10002 +<beforebreak>\bn\.e\.\s</beforebreak>
10003 +<afterbreak>\p{Ll}</afterbreak>
10004 +</rule>
10005 +<rule break="no">
10006 +<beforebreak>\bw\.\s</beforebreak>
10007 +<afterbreak>\p{Ll}</afterbreak>
10008 +</rule>
10009 +<!--nt., nn.-->
10010 +<rule break="no">
10011 +<beforebreak>\bn[tn]\.\s</beforebreak>
10012 +<afterbreak>\p{Ll}</afterbreak>
10013 +</rule>
10014 +<rule break="no">
10015 +<beforebreak>\b[dm]l\.\s</beforebreak>
10016 +<afterbreak>\p{Ll}</afterbreak>
10017 +</rule>
10018 +<rule break="no">
10019 +<beforebreak>\bdag\.\s</beforebreak>
10020 +<afterbreak>\p{Ll}</afterbreak>
10021 +</rule>
10022 +<rule break="no">
10023 +<beforebreak>\b[cd]?m\.\s</beforebreak>
10024 +<afterbreak>\p{Ll}</afterbreak>
10025 +</rule>
10026 +<rule break="no">
10027 +<beforebreak>\b[Zz][Łł]\.\s</beforebreak>
10028 +<afterbreak>\p{Ll}</afterbreak>
10029 +</rule>
10030 +<rule break="no">
10031 +<beforebreak>\b[Gg][rR]\.\s</beforebreak>
10032 +<afterbreak>\p{Ll}</afterbreak>
10033 +</rule>
10034 +<rule break="no">
10035 +<beforebreak>\b[d]?kg\.\s</beforebreak>
10036 +<afterbreak>\p{Ll}</afterbreak>
10037 +</rule>
10038 +<rule break="no">
10039 +<beforebreak>\bml[nd]\.\s</beforebreak>
10040 +<afterbreak>\p{Ll}</afterbreak>
10041 +</rule>
10042 +<rule break="no">
10043 +<beforebreak>\bnpl\.\s</beforebreak>
10044 +<afterbreak>\p{Ll}</afterbreak>
10045 +</rule>
10046 +<rule break="no">
10047 +<beforebreak>\bpkt\.\s</beforebreak>
10048 +<afterbreak>[\p{Ll}\d]</afterbreak>
10049 +</rule>
10050 +<!--str. 12-->
10051 +<rule break="no">
10052 +<beforebreak>\bstr\.\s</beforebreak>
10053 +<afterbreak>[\p{Ll}\d]</afterbreak>
10054 +</rule>
10055 +<!--tab. 12-->
10056 +<rule break="no">
10057 +<beforebreak>\b[Tt]ab\.\s</beforebreak>
10058 +<afterbreak>[\p{Ll}\d]</afterbreak>
10059 +</rule>
10060 +<rule break="no">
10061 +<beforebreak>\btel\.\s</beforebreak>
10062 +<afterbreak></afterbreak>
10063 +</rule>
10064 +<rule break="no">
10065 +<beforebreak>\b[ptw]g\.\s</beforebreak>
10066 +<afterbreak>\p{Ll}</afterbreak>
10067 +</rule>
10068 +<rule break="no">
10069 +<beforebreak>\bcos\.\s</beforebreak>
10070 +<afterbreak>\p{Ll}</afterbreak>
10071 +</rule>
10072 +<rule break="no">
10073 +<beforebreak>\bcosec\.\s</beforebreak>
10074 +<afterbreak>\p{Ll}</afterbreak>
10075 +</rule>
10076 +<rule break="no">
10077 +<beforebreak>\bsec\.\s</beforebreak>
10078 +<afterbreak>\p{Ll}</afterbreak>
10079 +</rule>
10080 +<rule break="no">
10081 +<beforebreak>\bsin\.\s</beforebreak>
10082 +<afterbreak>\p{Ll}</afterbreak>
10083 +</rule>
10084 +<rule break="no">
10085 +<beforebreak>\brkm\.\s</beforebreak>
10086 +<afterbreak>\p{Ll}</afterbreak>
10087 +</rule>
10088 +<rule break="no">
10089 +<beforebreak>\bust\.\s</beforebreak>
10090 +<afterbreak>\d</afterbreak>
10091 +</rule>
10092 +<rule break="no">
10093 +<beforebreak>\bpar\.\s</beforebreak>
10094 +<afterbreak>\d</afterbreak>
10095 +</rule>
10096 +<!--lit. a, lit. a)-->
10097 +<rule break="no">
10098 +<beforebreak>\blit\.\s</beforebreak>
10099 +<afterbreak>\p{Ll}\p{Pe}?\p{P}?\s</afterbreak>
10100 +</rule>
10101 +<!--od pon. do-->
10102 +<rule break="no">
10103 +<beforebreak>\b[Pp]on\.\s</beforebreak>
10104 +<afterbreak>\p{Ll}</afterbreak>
10105 +</rule>
10106 +<!--od sob. do pt.-->
10107 +<rule break="no">
10108 +<beforebreak>\b[Ss]ob\.\s</beforebreak>
10109 +<afterbreak>\p{Ll}</afterbreak>
10110 +</rule>
10111 +<!--ba! po prostu głupi!-->
10112 +<rule break="no">
10113 +<beforebreak>\bba!\s</beforebreak>
10114 +<afterbreak>\p{Ll}</afterbreak>
10115 +</rule>
10116 +<!--pok. 131, poz. 124-->
10117 +<rule break="no">
10118 +<beforebreak>\bpo[zk]\.\s</beforebreak>
10119 +<afterbreak></afterbreak>
10120 +</rule>
10121 +<!--oo. Dominikanie-->
10122 +<rule break="no">
10123 +<beforebreak>\b[Oo][Oo]\.\s</beforebreak>
10124 +<afterbreak></afterbreak>
10125 +</rule>
10126 +<!--Ludwik Cz. został aresztowany-->
10127 +<rule break="no">
10128 +<beforebreak>\b([CDSR]z|Ch)\.\s</beforebreak>
10129 +<afterbreak>\p{Ll}</afterbreak>
10130 +</rule>
10131 +<!--Na s. 112 jest opis orgii, która odbyła się w r. 2005 wg Janusza S. (l. 45).-->
10132 +<rule break="no">
10133 +<beforebreak>\b[rls]\.\s</beforebreak>
10134 +<afterbreak>[1-9]+</afterbreak>
10135 +</rule>
10136 +<!--i s. Alicji, o s. Rafaeli-->
10137 +<rule break="no">
10138 +<beforebreak>\b[,uoi]\ss\.\s</beforebreak>
10139 +<afterbreak></afterbreak>
10140 +</rule>
10141 +<!--Najśw. Sakrament-->
10142 +<rule break="no">
10143 +<beforebreak>\b[Nn]ajśw\.\s</beforebreak>
10144 +<afterbreak></afterbreak>
10145 +</rule>
10146 +<!--na os. Koziniec-->
10147 +<rule break="no">
10148 +<beforebreak>\b[Nn]a\sos\.\s</beforebreak>
10149 +<afterbreak></afterbreak>
10150 +</rule>
10151 +<!--min. 30 zł lub cena min. od 30 zł-->
10152 +<rule break="no">
10153 +<beforebreak>\bmin\.\s</beforebreak>
10154 +<afterbreak>[\p{Ll}\d]</afterbreak>
10155 +</rule>
10156 +<!--W 1991 r. Józef Stalin nie żył.-->
10157 +<rule break="no">
10158 +<beforebreak>\bW\s\d{4}\sr\.\s</beforebreak>
10159 +<afterbreak>[\p{Lu}-–—„"]</afterbreak>
10160 +</rule>
10161 +<rule break="no">
10162 +<beforebreak>\b\d+\.\s</beforebreak>
10163 +<afterbreak>\p{Ll}|\p{Lu}{2,}</afterbreak>
10164 +</rule>
10165 +<rule break="no">
10166 +<beforebreak>\b\p{L}\.\s</beforebreak>
10167 +<afterbreak>\p{L}\.\s</afterbreak>
10168 +</rule>
10169 +<rule break="no">
10170 +<beforebreak>\b\p{L}\.</beforebreak>
10171 +<afterbreak>\p{L}\.</afterbreak>
10172 +</rule>
10173 +<rule break="no">
10174 +<beforebreak>\.\p{L}+\.\s</beforebreak>
10175 +<afterbreak>\p{Ll}</afterbreak>
10176 +</rule>
10177 +<!--single lowercase chars at the end of sentence except for r, w, n-->
10178 +<rule break="no">
10179 +<beforebreak>[\s\(\[][\p{L}&amp;&amp;[^rwn]]\.\s+</beforebreak>
10180 +<afterbreak>\p{Ll}\p{Ll}|\p{Lu}[\p{Punct}\p{Lu}]</afterbreak>
10181 +</rule>
10182 +<rule break="no">
10183 +<beforebreak>['"„][\.!?…]['"”]\s</beforebreak>
10184 +<afterbreak></afterbreak>
10185 +</rule>
10186 +<rule break="no">
10187 +<beforebreak>["”']\s*</beforebreak>
10188 +<afterbreak>\s*\p{Ll}</afterbreak>
10189 +</rule>
10190 +<rule break="no">
10191 +<beforebreak>[!?]+\p{Pe} </beforebreak>
10192 +<afterbreak>\p{Ll}</afterbreak>
10193 +</rule>
10194 +<rule break="no">
10195 +<beforebreak>[\p{Ps}][!?]+[\p{Pe}] </beforebreak>
10196 +<afterbreak></afterbreak>
10197 +</rule>
10198 +<rule break="no">
10199 +<beforebreak>[\[\(]*\.\.\.[\]\)]* </beforebreak>
10200 +<afterbreak>\p{Ll}</afterbreak>
10201 +</rule>
10202 +<rule break="no">
10203 +<beforebreak>[\[\(]*…[\]\)]* </beforebreak>
10204 +<afterbreak>\p{Ll}</afterbreak>
10205 +</rule>
10206 +<rule break="no">
10207 +<beforebreak>\b\p{Lu}\.\s\p{Lu}\.\s</beforebreak>
10208 +<afterbreak></afterbreak>
10209 +</rule>
10210 +<rule break="no">
10211 +<beforebreak>\b\p{Lu}\.\p{Lu}\.\s</beforebreak>
10212 +<afterbreak></afterbreak>
10213 +</rule>
10214 +<rule break="no">
10215 +<beforebreak>\b\p{Lu}\p{Ll}\.\s?</beforebreak>
10216 +<afterbreak>\p{Lu}[^\p{Lu}]</afterbreak>
10217 +</rule>
10218 +<rule break="no">
10219 +<beforebreak>\.\p{Lu}\p{Ll}\.\s?</beforebreak>
10220 +<afterbreak>\p{Lu}[^\p{Lu}]</afterbreak>
10221 +</rule>
10222 +<rule break="no">
10223 +<beforebreak>\s(?&lt;!\.)[„"\p{Ps}]?[A-Z]\.\s</beforebreak>
10224 +<afterbreak>\p{Ll}|\p{Lu}\p{Ll}\p{Ll}+</afterbreak>
10225 +</rule>
10226 +<rule break="no">
10227 +<beforebreak>^[„"]?[A-ZŚĆŻŹ]\.\s</beforebreak>
10228 +<afterbreak>\p{Ll}|\p{Lu}\p{Ll}\p{Ll}+</afterbreak>
10229 +</rule>
10230 +<!--Józef S. (45 l.)-->
10231 +<rule break="no">
10232 +<beforebreak>\s[A-Z]\.\s</beforebreak>
10233 +<afterbreak>\(\d</afterbreak>
10234 +</rule>
10235 +<rule break="no">
10236 +<beforebreak>\bDz\.\s?U\.\s</beforebreak>
10237 +<afterbreak></afterbreak>
10238 +</rule>
10239 +<!--heuristic: no vowels = abbreviation-->
10240 +<rule break="no">
10241 +<beforebreak>[\p{Ll}&amp;&amp;[^aeouiyęąó]][\p{Ll}&amp;&amp;[^aeouiyęąó]]+\.\s</beforebreak>
10242 +<afterbreak>\p{Ll}+</afterbreak>
10243 +</rule>
10244 +<!--Nie jesteś Rosjaninem? - spytał przedstawiciel okręgu.-->
10245 +<rule break="no">
10246 +<beforebreak>[\.!?…]+['"\p{Pe}\u00BB\u2019\u201D\u203A\u0002]*\s</beforebreak>
10247 +<afterbreak>[\p{Ps}-–—]\s?\p{Ll}</afterbreak>
10248 +</rule>
10249 +<!--This is a text ("with a small remark!") that continues.-->
10250 +<rule break="no">
10251 +<beforebreak>[\.!?…]['"\u00BB\u2019\u201D\u203A\u0002]*\p{Pe}\s</beforebreak>
10252 +<afterbreak>\p{Ll}</afterbreak>
10253 +</rule>
10254 +<rule break="yes">
10255 +<beforebreak>[\.!?…]['"\p{Pe}\u00BB\u2019\u201D\u203A\u0002]*\s</beforebreak>
10256 +<afterbreak></afterbreak>
10257 +</rule>
10258 +<rule break="yes">
10259 +<beforebreak>[\.!?…]['»"”\p{Pe}]*</beforebreak>
10260 +<afterbreak>\p{Lu}[^\p{Lu}\.]</afterbreak>
10261 +</rule>
10262 +<rule break="yes">
10263 +<beforebreak>\s\p{L}[\.!?…]\s</beforebreak>
10264 +<afterbreak>\p{Lu}\p{Ll}</afterbreak>
10265 +</rule>
10266 +</languagerule>
10267 +<languagerule languagerulename="English">
10268 +<rule break="no">
10269 +<beforebreak>\b[nN]o\.\s</beforebreak>
10270 +<afterbreak>\p{N}</afterbreak>
10271 +</rule>
10272 +<rule break="no">
10273 +<beforebreak>\b(pp|[Vv]iz|i\.?\s*e|[Vvol]|[Rr]col|maj|Lt|[Ff]ig|[Ff]igs|[Vv]iz|[Vv]ols|[Aa]pprox|[Ii]ncl|Pres|[Dd]ept|min|max|[Gg]ovt|lb|ft|c\.?\s*f|vs)\.\s</beforebreak>
10274 +<afterbreak>[^\p{Lu}]|I</afterbreak>
10275 +</rule>
10276 +<rule break="no">
10277 +<beforebreak>\b[Ff]igs?\.\s</beforebreak>
10278 +<afterbreak>\p{N}</afterbreak>
10279 +</rule>
10280 +<rule break="no">
10281 +<beforebreak>\be\.g\.\s</beforebreak>
10282 +<afterbreak></afterbreak>
10283 +</rule>
10284 +<rule break="no">
10285 +<beforebreak>\bvs\.\s</beforebreak>
10286 +<afterbreak></afterbreak>
10287 +</rule>
10288 +<rule break="no">
10289 +<beforebreak>\besp\.\s</beforebreak>
10290 +<afterbreak></afterbreak>
10291 +</rule>
10292 +<!--"Etc." can end the sentence, so we check for the uppercase letter after it.-->
10293 +<rule break="no">
10294 +<beforebreak>\b[Ee]tc\.\s</beforebreak>
10295 +<afterbreak>[^p{Lu}]</afterbreak>
10296 +</rule>
10297 +<rule break="no">
10298 +<beforebreak>\bJan\.\s</beforebreak>
10299 +<afterbreak></afterbreak>
10300 +</rule>
10301 +<rule break="no">
10302 +<beforebreak>\bFeb\.\s</beforebreak>
10303 +<afterbreak></afterbreak>
10304 +</rule>
10305 +<rule break="no">
10306 +<beforebreak>\bMar\.\s</beforebreak>
10307 +<afterbreak></afterbreak>
10308 +</rule>
10309 +<rule break="no">
10310 +<beforebreak>\bApr\.\s</beforebreak>
10311 +<afterbreak></afterbreak>
10312 +</rule>
10313 +<rule break="no">
10314 +<beforebreak>\bJun\.\s</beforebreak>
10315 +<afterbreak></afterbreak>
10316 +</rule>
10317 +<rule break="no">
10318 +<beforebreak>\bJul\.\s</beforebreak>
10319 +<afterbreak></afterbreak>
10320 +</rule>
10321 +<rule break="no">
10322 +<beforebreak>\bAug\.\s</beforebreak>
10323 +<afterbreak></afterbreak>
10324 +</rule>
10325 +<rule break="no">
10326 +<beforebreak>\bSept?\.\s</beforebreak>
10327 +<afterbreak></afterbreak>
10328 +</rule>
10329 +<rule break="no">
10330 +<beforebreak>\bOct\.\s</beforebreak>
10331 +<afterbreak></afterbreak>
10332 +</rule>
10333 +<rule break="no">
10334 +<beforebreak>\bNov\.\s</beforebreak>
10335 +<afterbreak></afterbreak>
10336 +</rule>
10337 +<rule break="no">
10338 +<beforebreak>\bDec\.\s</beforebreak>
10339 +<afterbreak></afterbreak>
10340 +</rule>
10341 +<rule break="no">
10342 +<beforebreak>\bPh\.?D\.\s</beforebreak>
10343 +<afterbreak></afterbreak>
10344 +</rule>
10345 +<rule break="no">
10346 +<beforebreak>\bet\b\s\bal\.\s</beforebreak>
10347 +<afterbreak></afterbreak>
10348 +</rule>
10349 +<rule break="no">
10350 +<beforebreak>\b(St|Gen|Hon|Prof|Dr|Mr|Ms|Mrs|[JS]r|Col|Maj|Brig|Sgt|Capt|Cmnd|Sen|Rev|Rep|Revd)\.\s</beforebreak>
10351 +<afterbreak></afterbreak>
10352 +</rule>
10353 +<rule break="no">
10354 +<beforebreak>\b(St|Gen|Hon|Prof|Dr|Mr|Ms|Mrs|[JS]r|Col|Maj|Brig|Sgt|Capt|Cmnd|Sen|Rev|Rep|Revd)\.\s[A-Z]\.\s</beforebreak>
10355 +<afterbreak></afterbreak>
10356 +</rule>
10357 +<rule break="no">
10358 +<beforebreak>\bcf\.\s</beforebreak>
10359 +<afterbreak></afterbreak>
10360 +</rule>
10361 +<rule break="no">
10362 +<beforebreak>\bInc\.\s</beforebreak>
10363 +<afterbreak></afterbreak>
10364 +</rule>
10365 +<rule break="no">
10366 +<beforebreak>\bCorp\.\s</beforebreak>
10367 +<afterbreak></afterbreak>
10368 +</rule>
10369 +<rule break="no">
10370 +<beforebreak>\bBros\.\s</beforebreak>
10371 +<afterbreak></afterbreak>
10372 +</rule>
10373 +<rule break="no">
10374 +<beforebreak>\bDist\.\s</beforebreak>
10375 +<afterbreak></afterbreak>
10376 +</rule>
10377 +<rule break="no">
10378 +<beforebreak>\bCo\.\s</beforebreak>
10379 +<afterbreak></afterbreak>
10380 +</rule>
10381 +<rule break="no">
10382 +<beforebreak>[\[\(]*…[\]\)]* </beforebreak>
10383 +<afterbreak>\p{Ll}</afterbreak>
10384 +</rule>
10385 +<rule break="no">
10386 +<beforebreak>\p{Ps}[!?]+\p{Pe} </beforebreak>
10387 +<afterbreak></afterbreak>
10388 +</rule>
10389 +<rule break="no">
10390 +<beforebreak>[\.!?…]+\p{Pe} </beforebreak>
10391 +<afterbreak>\p{Ll}</afterbreak>
10392 +</rule>
10393 +<rule break="no">
10394 +<beforebreak>["”']\s*</beforebreak>
10395 +<afterbreak>\s*\p{Ll}</afterbreak>
10396 +</rule>
10397 +<rule break="no">
10398 +<beforebreak>['"„][\.!?…]['"”]\s</beforebreak>
10399 +<afterbreak></afterbreak>
10400 +</rule>
10401 +<rule break="no">
10402 +<beforebreak>\b\p{L}\.\s</beforebreak>
10403 +<afterbreak>\p{L}\.\s</afterbreak>
10404 +</rule>
10405 +<rule break="no">
10406 +<beforebreak>\b\p{L}\.</beforebreak>
10407 +<afterbreak>\p{L}\.</afterbreak>
10408 +</rule>
10409 +<rule break="no">
10410 +<beforebreak>[\.\s]\p{L}{1,2}\.\s</beforebreak>
10411 +<afterbreak>[\p{N}\p{Ll}]</afterbreak>
10412 +</rule>
10413 +<rule break="no">
10414 +<beforebreak>[\[\(]*\.\.\.[\]\)]* </beforebreak>
10415 +<afterbreak>[^\p{Lu}]</afterbreak>
10416 +</rule>
10417 +<rule break="no">
10418 +<beforebreak>\b\p{Lu}\.\s\p{Lu}\.\s</beforebreak>
10419 +<afterbreak></afterbreak>
10420 +</rule>
10421 +<rule break="no">
10422 +<beforebreak>\b\p{Lu}\.\p{Lu}\.\s</beforebreak>
10423 +<afterbreak></afterbreak>
10424 +</rule>
10425 +<rule break="no">
10426 +<beforebreak>[^\.]\s[A-Z]\.\s</beforebreak>
10427 +<afterbreak></afterbreak>
10428 +</rule>
10429 +<rule break="yes">
10430 +<beforebreak>[\.!?…][\u00BB\u2019\u201D\u203A"'\p{Pe}\u0002]*\s</beforebreak>
10431 +<afterbreak></afterbreak>
10432 +</rule>
10433 +<rule break="yes">
10434 +<beforebreak>[\.!?…]['"\u00BB\u2019\u201D\u203A\p{Pe}\u0002]*</beforebreak>
10435 +<afterbreak>\p{Lu}[^\p{Lu}]</afterbreak>
10436 +</rule>
10437 +<rule break="yes">
10438 +<beforebreak>\s\p{L}[\.!?…]\s</beforebreak>
10439 +<afterbreak>\p{Lu}\p{Ll}</afterbreak>
10440 +</rule>
10441 +</languagerule>
10442 +<languagerule languagerulename="Romanian">
10443 +<rule break="no">
10444 +<beforebreak>\b\d+\.\s</beforebreak>
10445 +<afterbreak>\p{Ll}|\p{Lu}{2,}</afterbreak>
10446 +</rule>
10447 +<rule break="no">
10448 +<beforebreak>["”']\s*</beforebreak>
10449 +<afterbreak>\s*\p{Ll}</afterbreak>
10450 +</rule>
10451 +<rule break="no">
10452 +<beforebreak>['"„][\.!?…]['"”]\s</beforebreak>
10453 +<afterbreak></afterbreak>
10454 +</rule>
10455 +<rule break="no">
10456 +<beforebreak>\b\p{L}\.\s</beforebreak>
10457 +<afterbreak>\p{L}\.\s</afterbreak>
10458 +</rule>
10459 +<rule break="no">
10460 +<beforebreak>\b\p{L}\.</beforebreak>
10461 +<afterbreak>\p{L}\.</afterbreak>
10462 +</rule>
10463 +<rule break="no">
10464 +<beforebreak>[\.\s]\p{L}{1,2}\.\s</beforebreak>
10465 +<afterbreak>[\p{N}\p{Ll}]</afterbreak>
10466 +</rule>
10467 +<rule break="no">
10468 +<beforebreak>[!?]+\p{Pe} </beforebreak>
10469 +<afterbreak>\p{Ll}</afterbreak>
10470 +</rule>
10471 +<rule break="no">
10472 +<beforebreak>[\p{Ps}][!?]+[\p{Pe}] </beforebreak>
10473 +<afterbreak></afterbreak>
10474 +</rule>
10475 +<rule break="no">
10476 +<beforebreak>[\[\(]*\.\.\.[\]\)]* </beforebreak>
10477 +<afterbreak>[^\p{Lu}]</afterbreak>
10478 +</rule>
10479 +<rule break="yes">
10480 +<beforebreak>\b(etc|șamd)\.\s</beforebreak>
10481 +<afterbreak>[A-Z]</afterbreak>
10482 +</rule>
10483 +<rule break="no">
10484 +<beforebreak>\b(pag|leg|art)\.\s</beforebreak>
10485 +<afterbreak></afterbreak>
10486 +</rule>
10487 +<rule break="no">
10488 +<beforebreak>\b(ian|feb|febr|mar|mart|apr|iun|iul|aug|sep|sept|oct|nov|dec)\.\s</beforebreak>
10489 +<afterbreak>[^\p{Lu}]</afterbreak>
10490 +</rule>
10491 +<rule break="no">
10492 +<beforebreak>\bdpdv\.\s</beforebreak>
10493 +<afterbreak></afterbreak>
10494 +</rule>
10495 +<rule break="no">
10496 +<beforebreak>\b(etc|șamd)\.\s</beforebreak>
10497 +<afterbreak></afterbreak>
10498 +</rule>
10499 +<rule break="no">
10500 +<beforebreak>\b(M)\.</beforebreak>
10501 +<afterbreak>Ap\.N\.\s</afterbreak>
10502 +</rule>
10503 +<rule break="no">
10504 +<beforebreak>\b(M)\.Ap\.</beforebreak>
10505 +<afterbreak>N\.\s</afterbreak>
10506 +</rule>
10507 +<rule break="no">
10508 +<beforebreak>\b([Dd]l|[Dd]-na|[Dd]vs|[Pp]t)\.\s</beforebreak>
10509 +<afterbreak></afterbreak>
10510 +</rule>
10511 +<rule break="no">
10512 +<beforebreak>\b([Dd]l|[Dd]-na|[Dd]vs|[Pp]t)\.\s[A-Z]\.\s</beforebreak>
10513 +<afterbreak></afterbreak>
10514 +</rule>
10515 +<rule break="no">
10516 +<beforebreak>[\[\(]*\.\.\.[\]\)]* </beforebreak>
10517 +<afterbreak>\p{Ll}</afterbreak>
10518 +</rule>
10519 +<rule break="no">
10520 +<beforebreak>[\[\(]*…[\]\)]* </beforebreak>
10521 +<afterbreak>\p{Ll}</afterbreak>
10522 +</rule>
10523 +<rule break="yes">
10524 +<beforebreak>[\.!?…]['"\u00BB\u2019\u201D\u203A\u0002]*\s</beforebreak>
10525 +<afterbreak></afterbreak>
10526 +</rule>
10527 +<rule break="yes">
10528 +<beforebreak>[\.!?…]['»"”\p{Pe}]*</beforebreak>
10529 +<afterbreak>\p{Lu}[^\p{Lu}]</afterbreak>
10530 +</rule>
10531 +<rule break="yes">
10532 +<beforebreak>\s\p{L}[\.!?…]\s</beforebreak>
10533 +<afterbreak>\p{Lu}\p{Ll}</afterbreak>
10534 +</rule>
10535 +</languagerule>
10536 +<languagerule languagerulename="Dutch">
10537 +<rule break="no">
10538 +<beforebreak>\b(Afr|Am|Ar|Br|Cie|Comp|Dhr|Dr|Em|Fa|Kon)\.\s</beforebreak>
10539 +<afterbreak></afterbreak>
10540 +</rule>
10541 +<rule break="no">
10542 +<beforebreak>\b(Mej|Mevr|Mgr|Mw|Ndl|Ned|Nl|No|Secr)\.\s</beforebreak>
10543 +<afterbreak></afterbreak>
10544 +</rule>
10545 +<rule break="no">
10546 +<beforebreak>\b(Sr|St|Ued|Vz|aanh|aanw|aardew|aardr)\.\s</beforebreak>
10547 +<afterbreak></afterbreak>
10548 +</rule>
10549 +<rule break="no">
10550 +<beforebreak>\b(abs|abstr|adj|adm|afb|[Aa]fd|afk|afl)\.\s</beforebreak>
10551 +<afterbreak></afterbreak>
10552 +</rule>
10553 +<rule break="no">
10554 +<beforebreak>\b(al|ald|alg|amb|ambt|anat|antrop|apoth)\.\s</beforebreak>
10555 +<afterbreak></afterbreak>
10556 +</rule>
10557 +<rule break="no">
10558 +<beforebreak>\b(arch|archeol|art|bc|betr|bez|bibl|bijl|bijv)\.\s</beforebreak>
10559 +<afterbreak></afterbreak>
10560 +</rule>
10561 +<rule break="no">
10562 +<beforebreak>\b(bijz|blz|bw|ca|cat|centr|cf|cfr|cmpl)\.\s</beforebreak>
10563 +<afterbreak></afterbreak>
10564 +</rule>
10565 +<rule break="no">
10566 +<beforebreak>\b(conf|ct|dal|derg|dhr|dir|div|dra|drs|ds)\.\s</beforebreak>
10567 +<afterbreak></afterbreak>
10568 +</rule>
10569 +<rule break="no">
10570 +<beforebreak>\b(ed|em|enz|etc|ev|excl|fa|fam|fig|fl|fr.)\.\s</beforebreak>
10571 +<afterbreak></afterbreak>
10572 +</rule>
10573 +<rule break="no">
10574 +<beforebreak>\b(geb|get|gld|id|incl|ing|intern|ir|jhr|jkvr)\.\s</beforebreak>
10575 +<afterbreak></afterbreak>
10576 +</rule>
10577 +<rule break="no">
10578 +<beforebreak>\b(jl|jr|kr|kt|lab|lic|ll|lt|lw|max|mi|min|mld)\.\s</beforebreak>
10579 +<afterbreak></afterbreak>
10580 +</rule>
10581 +<rule break="no">
10582 +<beforebreak>\b(mln|mr|mw|nl|no|nr|nrs|ob|obl|ong|onov|o.a)\.\s</beforebreak>
10583 +<afterbreak></afterbreak>
10584 +</rule>
10585 +<rule break="no">
10586 +<beforebreak>\b(opm|org|ov|pag|par|penn|plm|plv)\.\s</beforebreak>
10587 +<afterbreak></afterbreak>
10588 +</rule>
10589 +<rule break="no">
10590 +<beforebreak>\b(prov|pseud|red|ref|resp|soc|st|tab|tel|tk)\.\s</beforebreak>
10591 +<afterbreak></afterbreak>
10592 +</rule>
10593 +<rule break="no">
10594 +<beforebreak>\b(uitsl|ver|vgl|vnl|vnw|voorz|ww|zat|zg)\.\s</beforebreak>
10595 +<afterbreak></afterbreak>
10596 +</rule>
10597 +<rule break="yes">
10598 +<beforebreak>\b(mm|cm|km|ml|kg|kW|h|mg)\.\s</beforebreak>
10599 +<afterbreak></afterbreak>
10600 +</rule>
10601 +<rule break="no">
10602 +<beforebreak>[\[\(]*…[\]\)]* </beforebreak>
10603 +<afterbreak>\p{Ll}</afterbreak>
10604 +</rule>
10605 +<rule break="no">
10606 +<beforebreak>\p{Ps}[!?]+\p{Pe} </beforebreak>
10607 +<afterbreak></afterbreak>
10608 +</rule>
10609 +<rule break="no">
10610 +<beforebreak>[\.!?…]+\p{Pe} </beforebreak>
10611 +<afterbreak>\p{Ll}</afterbreak>
10612 +</rule>
10613 +<rule break="no">
10614 +<beforebreak>["”']\s*</beforebreak>
10615 +<afterbreak>\s*\p{Ll}</afterbreak>
10616 +</rule>
10617 +<rule break="no">
10618 +<beforebreak>['"„][\.!?…]['"”]\s</beforebreak>
10619 +<afterbreak></afterbreak>
10620 +</rule>
10621 +<rule break="no">
10622 +<beforebreak>\b\p{L}\.\s</beforebreak>
10623 +<afterbreak>\p{L}\.\s</afterbreak>
10624 +</rule>
10625 +<rule break="no">
10626 +<beforebreak>\b\p{L}\.</beforebreak>
10627 +<afterbreak>\p{L}\.</afterbreak>
10628 +</rule>
10629 +<rule break="no">
10630 +<beforebreak>[\.\s]\p{L}{1,2}\.\s</beforebreak>
10631 +<afterbreak>[\p{N}\p{Ll}]</afterbreak>
10632 +</rule>
10633 +<rule break="no">
10634 +<beforebreak>[\[\(]*\.\.\.[\]\)]* </beforebreak>
10635 +<afterbreak>[^\p{Lu}]</afterbreak>
10636 +</rule>
10637 +<rule break="no">
10638 +<beforebreak>\b\p{Lu}\.\s\p{Lu}\.\s</beforebreak>
10639 +<afterbreak></afterbreak>
10640 +</rule>
10641 +<rule break="no">
10642 +<beforebreak>\b\p{Lu}\.\p{Lu}\.\s</beforebreak>
10643 +<afterbreak></afterbreak>
10644 +</rule>
10645 +<rule break="no">
10646 +<beforebreak>[^\.]\s[A-Z]\.\s</beforebreak>
10647 +<afterbreak></afterbreak>
10648 +</rule>
10649 +<rule break="no">
10650 +<beforebreak>\b\p{Lu}\p{Ll}\.\s?</beforebreak>
10651 +<afterbreak>\p{Lu}[^\p{Lu}]</afterbreak>
10652 +</rule>
10653 +<rule break="no">
10654 +<beforebreak>\.\p{Lu}\p{Ll}\.\s?</beforebreak>
10655 +<afterbreak>\p{Lu}[^\p{Lu}]</afterbreak>
10656 +</rule>
10657 +<!--a number with a dot before a lowercase char-->
10658 +<rule break="no">
10659 +<beforebreak>\b\d+\.\s</beforebreak>
10660 +<afterbreak>\p{Ll}|\p{Lu}{2,}</afterbreak>
10661 +</rule>
10662 +<rule break="yes">
10663 +<beforebreak>\been\sprof\.\s</beforebreak>
10664 +<afterbreak>[^\p{Ll}]</afterbreak>
10665 +</rule>
10666 +<rule break="no">
10667 +<beforebreak>\bprof\.\s</beforebreak>
10668 +<afterbreak></afterbreak>
10669 +</rule>
10670 +<rule break="yes">
10671 +<beforebreak>[\.!?…][\u00BB\u2019\u201D\u203A\u00AB\p{Pe}\u0002]*\s</beforebreak>
10672 +<afterbreak></afterbreak>
10673 +</rule>
10674 +<rule break="yes">
10675 +<beforebreak>[\.!?…]['"\u00BB\u2019\u201D\u203A\u00AB\p{Pe}\u0002]*</beforebreak>
10676 +<afterbreak>\p{Lu}[^\p{Lu}]</afterbreak>
10677 +</rule>
10678 +<rule break="yes">
10679 +<beforebreak>\s\p{L}[\.!?…]\s</beforebreak>
10680 +<afterbreak>\p{Lu}\p{Ll}</afterbreak>
10681 +</rule>
10682 +</languagerule>
10683 +<languagerule languagerulename="Slovak">
10684 +<rule break="no">
10685 +<beforebreak>\b(Bc|Mgr|RNDr|PharmDr|PhDr|JUDr|PaedDr|ThDr|Ing|MUDr|MDDr|MVDr|Dr|ThLic|PhD|ArtD|ThDr|Dr|DrSc|CSs|prof)\.\s</beforebreak>
10686 +<afterbreak></afterbreak>
10687 +</rule>
10688 +<rule break="no">
10689 +<beforebreak>\b([Oo]br|[Čč])\.\s</beforebreak>
10690 +<afterbreak>\p{N}</afterbreak>
10691 +</rule>
10692 +<rule break="no">
10693 +<beforebreak>\babl\.\s</beforebreak>
10694 +<afterbreak></afterbreak>
10695 +</rule>
10696 +<rule break="no">
10697 +<beforebreak>\babsol\.\s</beforebreak>
10698 +<afterbreak></afterbreak>
10699 +</rule>
10700 +<rule break="no">
10701 +<beforebreak>\badj\.\s</beforebreak>
10702 +<afterbreak></afterbreak>
10703 +</rule>
10704 +<rule break="no">
10705 +<beforebreak>\badmin\.\s</beforebreak>
10706 +<afterbreak></afterbreak>
10707 +</rule>
10708 +<rule break="no">
10709 +<beforebreak>\b[Aa]dr\.\s</beforebreak>
10710 +<afterbreak></afterbreak>
10711 +</rule>
10712 +<rule break="no">
10713 +<beforebreak>\badv\.\s</beforebreak>
10714 +<afterbreak></afterbreak>
10715 +</rule>
10716 +<rule break="no">
10717 +<beforebreak>\badvok\.\s</beforebreak>
10718 +<afterbreak></afterbreak>
10719 +</rule>
10720 +<rule break="no">
10721 +<beforebreak>\bafr\.\s</beforebreak>
10722 +<afterbreak></afterbreak>
10723 +</rule>
10724 +<rule break="no">
10725 +<beforebreak>\bak\.\s</beforebreak>
10726 +<afterbreak></afterbreak>
10727 +</rule>
10728 +<rule break="no">
10729 +<beforebreak>\bakad\.\s</beforebreak>
10730 +<afterbreak></afterbreak>
10731 +</rule>
10732 +<rule break="no">
10733 +<beforebreak>\bakc\.\s</beforebreak>
10734 +<afterbreak></afterbreak>
10735 +</rule>
10736 +<rule break="no">
10737 +<beforebreak>\bakuz\.\s</beforebreak>
10738 +<afterbreak></afterbreak>
10739 +</rule>
10740 +<rule break="no">
10741 +<beforebreak>\bet\b\s\bal\.\s</beforebreak>
10742 +<afterbreak></afterbreak>
10743 +</rule>
10744 +<rule break="no">
10745 +<beforebreak>\bal\.\s</beforebreak>
10746 +<afterbreak></afterbreak>
10747 +</rule>
10748 +<rule break="no">
10749 +<beforebreak>\balch\.\s</beforebreak>
10750 +<afterbreak></afterbreak>
10751 +</rule>
10752 +<rule break="no">
10753 +<beforebreak>\bamer\.\s</beforebreak>
10754 +<afterbreak></afterbreak>
10755 +</rule>
10756 +<rule break="no">
10757 +<beforebreak>\banat\.\s</beforebreak>
10758 +<afterbreak></afterbreak>
10759 +</rule>
10760 +<rule break="no">
10761 +<beforebreak>\b[Aa]ngl\.\s</beforebreak>
10762 +<afterbreak></afterbreak>
10763 +</rule>
10764 +<rule break="no">
10765 +<beforebreak>\banglosas\.\s</beforebreak>
10766 +<afterbreak></afterbreak>
10767 +</rule>
10768 +<rule break="no">
10769 +<beforebreak>\banorg\.\s</beforebreak>
10770 +<afterbreak></afterbreak>
10771 +</rule>
10772 +<rule break="no">
10773 +<beforebreak>\bap\.\s</beforebreak>
10774 +<afterbreak></afterbreak>
10775 +</rule>
10776 +<rule break="no">
10777 +<beforebreak>\bapod\.\s</beforebreak>
10778 +<afterbreak></afterbreak>
10779 +</rule>
10780 +<rule break="no">
10781 +<beforebreak>\barch\.\s</beforebreak>
10782 +<afterbreak></afterbreak>
10783 +</rule>
10784 +<rule break="no">
10785 +<beforebreak>\barcheol\.\s</beforebreak>
10786 +<afterbreak></afterbreak>
10787 +</rule>
10788 +<rule break="no">
10789 +<beforebreak>\barchit\.\s</beforebreak>
10790 +<afterbreak></afterbreak>
10791 +</rule>
10792 +<rule break="no">
10793 +<beforebreak>\barg\.\s</beforebreak>
10794 +<afterbreak></afterbreak>
10795 +</rule>
10796 +<rule break="no">
10797 +<beforebreak>\bart\.\s</beforebreak>
10798 +<afterbreak></afterbreak>
10799 +</rule>
10800 +<rule break="no">
10801 +<beforebreak>\bastr\.\s</beforebreak>
10802 +<afterbreak></afterbreak>
10803 +</rule>
10804 +<rule break="no">
10805 +<beforebreak>\bastrol\.\s</beforebreak>
10806 +<afterbreak></afterbreak>
10807 +</rule>
10808 +<rule break="no">
10809 +<beforebreak>\bastron\.\s</beforebreak>
10810 +<afterbreak></afterbreak>
10811 +</rule>
10812 +<rule break="no">
10813 +<beforebreak>\batp\.\s</beforebreak>
10814 +<afterbreak></afterbreak>
10815 +</rule>
10816 +<rule break="no">
10817 +<beforebreak>\batď\.\s</beforebreak>
10818 +<afterbreak></afterbreak>
10819 +</rule>
10820 +<rule break="no">
10821 +<beforebreak>\b[Aa]ustr\.\s</beforebreak>
10822 +<afterbreak></afterbreak>
10823 +</rule>
10824 +<rule break="no">
10825 +<beforebreak>\baut\.\s</beforebreak>
10826 +<afterbreak></afterbreak>
10827 +</rule>
10828 +<rule break="no">
10829 +<beforebreak>\b[Bb]elg\.\s</beforebreak>
10830 +<afterbreak></afterbreak>
10831 +</rule>
10832 +<rule break="no">
10833 +<beforebreak>\b[Bb]ibl\.\s</beforebreak>
10834 +<afterbreak></afterbreak>
10835 +</rule>
10836 +<rule break="no">
10837 +<beforebreak>\bbiol\.\s</beforebreak>
10838 +<afterbreak></afterbreak>
10839 +</rule>
10840 +<rule break="no">
10841 +<beforebreak>\bbot\.\s</beforebreak>
10842 +<afterbreak></afterbreak>
10843 +</rule>
10844 +<rule break="no">
10845 +<beforebreak>\bbud\.\s</beforebreak>
10846 +<afterbreak></afterbreak>
10847 +</rule>
10848 +<rule break="no">
10849 +<beforebreak>\bbás\.\s</beforebreak>
10850 +<afterbreak></afterbreak>
10851 +</rule>
10852 +<rule break="no">
10853 +<beforebreak>\bbýv\.\s</beforebreak>
10854 +<afterbreak></afterbreak>
10855 +</rule>
10856 +<rule break="no">
10857 +<beforebreak>\bcest\.\s</beforebreak>
10858 +<afterbreak></afterbreak>
10859 +</rule>
10860 +<rule break="no">
10861 +<beforebreak>\bchem\.\s</beforebreak>
10862 +<afterbreak></afterbreak>
10863 +</rule>
10864 +<rule break="no">
10865 +<beforebreak>\bcirk\.\s</beforebreak>
10866 +<afterbreak></afterbreak>
10867 +</rule>
10868 +<rule break="no">
10869 +<beforebreak>\bcsl\.\s</beforebreak>
10870 +<afterbreak></afterbreak>
10871 +</rule>
10872 +<rule break="no">
10873 +<beforebreak>\b[Čč]s\.\s</beforebreak>
10874 +<afterbreak></afterbreak>
10875 +</rule>
10876 +<rule break="no">
10877 +<beforebreak>\bdat\.\s</beforebreak>
10878 +<afterbreak></afterbreak>
10879 +</rule>
10880 +<rule break="no">
10881 +<beforebreak>\bdep\.\s</beforebreak>
10882 +<afterbreak></afterbreak>
10883 +</rule>
10884 +<rule break="no">
10885 +<beforebreak>\bdet\.\s</beforebreak>
10886 +<afterbreak></afterbreak>
10887 +</rule>
10888 +<rule break="no">
10889 +<beforebreak>\bdial\.\s</beforebreak>
10890 +<afterbreak></afterbreak>
10891 +</rule>
10892 +<rule break="no">
10893 +<beforebreak>\bdiaľ\.\s</beforebreak>
10894 +<afterbreak></afterbreak>
10895 +</rule>
10896 +<rule break="no">
10897 +<beforebreak>\bdipl\.\s</beforebreak>
10898 +<afterbreak></afterbreak>
10899 +</rule>
10900 +<rule break="no">
10901 +<beforebreak>\bdistrib\.\s</beforebreak>
10902 +<afterbreak></afterbreak>
10903 +</rule>
10904 +<rule break="no">
10905 +<beforebreak>\bdokl\.\s</beforebreak>
10906 +<afterbreak></afterbreak>
10907 +</rule>
10908 +<rule break="no">
10909 +<beforebreak>\bdosl\.\s</beforebreak>
10910 +<afterbreak></afterbreak>
10911 +</rule>
10912 +<rule break="no">
10913 +<beforebreak>\bdopr\.\s</beforebreak>
10914 +<afterbreak></afterbreak>
10915 +</rule>
10916 +<rule break="no">
10917 +<beforebreak>\bdram\.\s</beforebreak>
10918 +<afterbreak></afterbreak>
10919 +</rule>
10920 +<rule break="no">
10921 +<beforebreak>\bduš\.\s</beforebreak>
10922 +<afterbreak></afterbreak>
10923 +</rule>
10924 +<rule break="no">
10925 +<beforebreak>\bdv\.\s</beforebreak>
10926 +<afterbreak></afterbreak>
10927 +</rule>
10928 +<rule break="no">
10929 +<beforebreak>\bdvojčl\.\s</beforebreak>
10930 +<afterbreak></afterbreak>
10931 +</rule>
10932 +<rule break="no">
10933 +<beforebreak>\bdór\.\s</beforebreak>
10934 +<afterbreak></afterbreak>
10935 +</rule>
10936 +<rule break="no">
10937 +<beforebreak>\bekol\.\s</beforebreak>
10938 +<afterbreak></afterbreak>
10939 +</rule>
10940 +<rule break="no">
10941 +<beforebreak>\bekon\.\s</beforebreak>
10942 +<afterbreak></afterbreak>
10943 +</rule>
10944 +<rule break="no">
10945 +<beforebreak>\bel\.\s</beforebreak>
10946 +<afterbreak></afterbreak>
10947 +</rule>
10948 +<rule break="no">
10949 +<beforebreak>\belektr\.\s</beforebreak>
10950 +<afterbreak></afterbreak>
10951 +</rule>
10952 +<rule break="no">
10953 +<beforebreak>\belektrotech\.\s</beforebreak>
10954 +<afterbreak></afterbreak>
10955 +</rule>
10956 +<rule break="no">
10957 +<beforebreak>\benerget\.\s</beforebreak>
10958 +<afterbreak></afterbreak>
10959 +</rule>
10960 +<rule break="no">
10961 +<beforebreak>\bepic\.\s</beforebreak>
10962 +<afterbreak></afterbreak>
10963 +</rule>
10964 +<rule break="no">
10965 +<beforebreak>\best\.\s</beforebreak>
10966 +<afterbreak></afterbreak>
10967 +</rule>
10968 +<rule break="no">
10969 +<beforebreak>\betc\.\s</beforebreak>
10970 +<afterbreak></afterbreak>
10971 +</rule>
10972 +<rule break="no">
10973 +<beforebreak>\betonym\.\s</beforebreak>
10974 +<afterbreak></afterbreak>
10975 +</rule>
10976 +<rule break="no">
10977 +<beforebreak>\beufem\.\s</beforebreak>
10978 +<afterbreak></afterbreak>
10979 +</rule>
10980 +<rule break="no">
10981 +<beforebreak>\b[Ee]uróp\.\s</beforebreak>
10982 +<afterbreak></afterbreak>
10983 +</rule>
10984 +<rule break="no">
10985 +<beforebreak>\bev\.\s</beforebreak>
10986 +<afterbreak></afterbreak>
10987 +</rule>
10988 +<rule break="no">
10989 +<beforebreak>\bevid\.\s</beforebreak>
10990 +<afterbreak></afterbreak>
10991 +</rule>
10992 +<rule break="no">
10993 +<beforebreak>\bexpr\.\s</beforebreak>
10994 +<afterbreak></afterbreak>
10995 +</rule>
10996 +<rule break="no">
10997 +<beforebreak>\bfa\.\s</beforebreak>
10998 +<afterbreak></afterbreak>
10999 +</rule>
11000 +<rule break="no">
11001 +<beforebreak>\bfam\.\s</beforebreak>
11002 +<afterbreak></afterbreak>
11003 +</rule>
11004 +<rule break="no">
11005 +<beforebreak>\bfarm\.\s</beforebreak>
11006 +<afterbreak></afterbreak>
11007 +</rule>
11008 +<rule break="no">
11009 +<beforebreak>\bfem\.\s</beforebreak>
11010 +<afterbreak></afterbreak>
11011 +</rule>
11012 +<rule break="no">
11013 +<beforebreak>\bfeud\.\s</beforebreak>
11014 +<afterbreak></afterbreak>
11015 +</rule>
11016 +<rule break="no">
11017 +<beforebreak>\bfil\.\s</beforebreak>
11018 +<afterbreak></afterbreak>
11019 +</rule>
11020 +<rule break="no">
11021 +<beforebreak>\bfilat\.\s</beforebreak>
11022 +<afterbreak></afterbreak>
11023 +</rule>
11024 +<rule break="no">
11025 +<beforebreak>\bfiloz\.\s</beforebreak>
11026 +<afterbreak></afterbreak>
11027 +</rule>
11028 +<rule break="no">
11029 +<beforebreak>\bfi\.\s</beforebreak>
11030 +<afterbreak></afterbreak>
11031 +</rule>
11032 +<rule break="no">
11033 +<beforebreak>\bfon\.\s</beforebreak>
11034 +<afterbreak></afterbreak>
11035 +</rule>
11036 +<rule break="no">
11037 +<beforebreak>\bform\.\s</beforebreak>
11038 +<afterbreak></afterbreak>
11039 +</rule>
11040 +<rule break="no">
11041 +<beforebreak>\bfot\.\s</beforebreak>
11042 +<afterbreak></afterbreak>
11043 +</rule>
11044 +<rule break="no">
11045 +<beforebreak>\b[Ff]r\.\s</beforebreak>
11046 +<afterbreak></afterbreak>
11047 +</rule>
11048 +<rule break="no">
11049 +<beforebreak>\b[Ff]ranc\.\s</beforebreak>
11050 +<afterbreak></afterbreak>
11051 +</rule>
11052 +<rule break="no">
11053 +<beforebreak>\bfraz\.\s</beforebreak>
11054 +<afterbreak></afterbreak>
11055 +</rule>
11056 +<rule break="no">
11057 +<beforebreak>\bfut\.\s</beforebreak>
11058 +<afterbreak></afterbreak>
11059 +</rule>
11060 +<rule break="no">
11061 +<beforebreak>\bfyz\.\s</beforebreak>
11062 +<afterbreak></afterbreak>
11063 +</rule>
11064 +<rule break="no">
11065 +<beforebreak>\bfyziol\.\s</beforebreak>
11066 +<afterbreak></afterbreak>
11067 +</rule>
11068 +<rule break="no">
11069 +<beforebreak>\bgarb\.\s</beforebreak>
11070 +<afterbreak></afterbreak>
11071 +</rule>
11072 +<rule break="no">
11073 +<beforebreak>\bgen\.\s</beforebreak>
11074 +<afterbreak></afterbreak>
11075 +</rule>
11076 +<rule break="no">
11077 +<beforebreak>\bgenet\.\s</beforebreak>
11078 +<afterbreak></afterbreak>
11079 +</rule>
11080 +<rule break="no">
11081 +<beforebreak>\bgenpor\.\s</beforebreak>
11082 +<afterbreak></afterbreak>
11083 +</rule>
11084 +<rule break="no">
11085 +<beforebreak>\bgeod\.\s</beforebreak>
11086 +<afterbreak></afterbreak>
11087 +</rule>
11088 +<rule break="no">
11089 +<beforebreak>\bgeogr\.\s</beforebreak>
11090 +<afterbreak></afterbreak>
11091 +</rule>
11092 +<rule break="no">
11093 +<beforebreak>\bgeol\.\s</beforebreak>
11094 +<afterbreak></afterbreak>
11095 +</rule>
11096 +<rule break="no">
11097 +<beforebreak>\bgeom\.\s</beforebreak>
11098 +<afterbreak></afterbreak>
11099 +</rule>
11100 +<rule break="no">
11101 +<beforebreak>\bgerm\.\s</beforebreak>
11102 +<afterbreak></afterbreak>
11103 +</rule>
11104 +<rule break="no">
11105 +<beforebreak>\b[Gg]r\.\s</beforebreak>
11106 +<afterbreak></afterbreak>
11107 +</rule>
11108 +<rule break="no">
11109 +<beforebreak>\b[Gg]réc\.\s</beforebreak>
11110 +<afterbreak></afterbreak>
11111 +</rule>
11112 +<rule break="no">
11113 +<beforebreak>\bgréckokat\.\s</beforebreak>
11114 +<afterbreak></afterbreak>
11115 +</rule>
11116 +<rule break="no">
11117 +<beforebreak>\bhebr\.\s</beforebreak>
11118 +<afterbreak></afterbreak>
11119 +</rule>
11120 +<rule break="no">
11121 +<beforebreak>\bherald\.\s</beforebreak>
11122 +<afterbreak></afterbreak>
11123 +</rule>
11124 +<rule break="no">
11125 +<beforebreak>\bhist\.\s</beforebreak>
11126 +<afterbreak></afterbreak>
11127 +</rule>
11128 +<rule break="yes">
11129 +<beforebreak>\bhl\.\s</beforebreak>
11130 +<afterbreak></afterbreak>
11131 +</rule>
11132 +<rule break="no">
11133 +<beforebreak>\bhlav\.\s</beforebreak>
11134 +<afterbreak></afterbreak>
11135 +</rule>
11136 +<rule break="no">
11137 +<beforebreak>\bhosp\.\s</beforebreak>
11138 +<afterbreak></afterbreak>
11139 +</rule>
11140 +<rule break="no">
11141 +<beforebreak>\bhromad\.\s</beforebreak>
11142 +<afterbreak></afterbreak>
11143 +</rule>
11144 +<rule break="no">
11145 +<beforebreak>\bhud\.\s</beforebreak>
11146 +<afterbreak></afterbreak>
11147 +</rule>
11148 +<rule break="no">
11149 +<beforebreak>\bhypok\.\s</beforebreak>
11150 +<afterbreak></afterbreak>
11151 +</rule>
11152 +<rule break="no">
11153 +<beforebreak>\bident\.\s</beforebreak>
11154 +<afterbreak></afterbreak>
11155 +</rule>
11156 +<rule break="no">
11157 +<beforebreak>\bi\.?e\.\s</beforebreak>
11158 +<afterbreak></afterbreak>
11159 +</rule>
11160 +<rule break="no">
11161 +<beforebreak>\bident\.\s</beforebreak>
11162 +<afterbreak></afterbreak>
11163 +</rule>
11164 +<rule break="no">
11165 +<beforebreak>\bimp\.\s</beforebreak>
11166 +<afterbreak></afterbreak>
11167 +</rule>
11168 +<rule break="no">
11169 +<beforebreak>\bimpf\.\s</beforebreak>
11170 +<afterbreak></afterbreak>
11171 +</rule>
11172 +<rule break="no">
11173 +<beforebreak>\bindoeur\.\s</beforebreak>
11174 +<afterbreak></afterbreak>
11175 +</rule>
11176 +<rule break="no">
11177 +<beforebreak>\binf\.\s</beforebreak>
11178 +<afterbreak></afterbreak>
11179 +</rule>
11180 +<rule break="no">
11181 +<beforebreak>\binform\.\s</beforebreak>
11182 +<afterbreak></afterbreak>
11183 +</rule>
11184 +<rule break="no">
11185 +<beforebreak>\binstr\.\s</beforebreak>
11186 +<afterbreak></afterbreak>
11187 +</rule>
11188 +<rule break="no">
11189 +<beforebreak>\bint\.\s</beforebreak>
11190 +<afterbreak></afterbreak>
11191 +</rule>
11192 +<rule break="no">
11193 +<beforebreak>\binterj\.\s</beforebreak>
11194 +<afterbreak></afterbreak>
11195 +</rule>
11196 +<rule break="no">
11197 +<beforebreak>\binšt\.\s</beforebreak>
11198 +<afterbreak></afterbreak>
11199 +</rule>
11200 +<rule break="no">
11201 +<beforebreak>\binštr\.\s</beforebreak>
11202 +<afterbreak></afterbreak>
11203 +</rule>
11204 +<rule break="no">
11205 +<beforebreak>\biron\.\s</beforebreak>
11206 +<afterbreak></afterbreak>
11207 +</rule>
11208 +<rule break="no">
11209 +<beforebreak>\b[Jj]ap\.\s</beforebreak>
11210 +<afterbreak></afterbreak>
11211 +</rule>
11212 +<rule break="no">
11213 +<beforebreak>\bjaz\.\s</beforebreak>
11214 +<afterbreak></afterbreak>
11215 +</rule>
11216 +<rule break="no">
11217 +<beforebreak>\bjedn\.\s</beforebreak>
11218 +<afterbreak></afterbreak>
11219 +</rule>
11220 +<rule break="no">
11221 +<beforebreak>\bjuhoamer\.\s</beforebreak>
11222 +<afterbreak></afterbreak>
11223 +</rule>
11224 +<rule break="no">
11225 +<beforebreak>\bjuhových\.\s</beforebreak>
11226 +<afterbreak></afterbreak>
11227 +</rule>
11228 +<rule break="no">
11229 +<beforebreak>\bjuhozáp\.\s</beforebreak>
11230 +<afterbreak></afterbreak>
11231 +</rule>
11232 +<rule break="no">
11233 +<beforebreak>\bjuž\.\s</beforebreak>
11234 +<afterbreak></afterbreak>
11235 +</rule>
11236 +<rule break="no">
11237 +<beforebreak>\b[Kk]anad\.\s</beforebreak>
11238 +<afterbreak></afterbreak>
11239 +</rule>
11240 +<rule break="no">
11241 +<beforebreak>\bkanc\.\s</beforebreak>
11242 +<afterbreak></afterbreak>
11243 +</rule>
11244 +<rule break="no">
11245 +<beforebreak>\bkapit\.\s</beforebreak>
11246 +<afterbreak></afterbreak>
11247 +</rule>
11248 +<rule break="no">
11249 +<beforebreak>\bkpt\.\s</beforebreak>
11250 +<afterbreak></afterbreak>
11251 +</rule>
11252 +<rule break="no">
11253 +<beforebreak>\bkart\.\s</beforebreak>
11254 +<afterbreak></afterbreak>
11255 +</rule>
11256 +<rule break="no">
11257 +<beforebreak>\bkatastr\.\s</beforebreak>
11258 +<afterbreak></afterbreak>
11259 +</rule>
11260 +<rule break="no">
11261 +<beforebreak>\bknih\.\s</beforebreak>
11262 +<afterbreak></afterbreak>
11263 +</rule>
11264 +<rule break="no">
11265 +<beforebreak>\bkniž\.\s</beforebreak>
11266 +<afterbreak></afterbreak>
11267 +</rule>
11268 +<rule break="no">
11269 +<beforebreak>\bkomp\.\s</beforebreak>
11270 +<afterbreak></afterbreak>
11271 +</rule>
11272 +<rule break="no">
11273 +<beforebreak>\bkonj\.\s</beforebreak>
11274 +<afterbreak></afterbreak>
11275 +</rule>
11276 +<rule break="no">
11277 +<beforebreak>\bkonkr\.\s</beforebreak>
11278 +<afterbreak></afterbreak>
11279 +</rule>
11280 +<rule break="no">
11281 +<beforebreak>\bkozmet\.\s</beforebreak>
11282 +<afterbreak></afterbreak>
11283 +</rule>
11284 +<rule break="no">
11285 +<beforebreak>\bkrajč\.\s</beforebreak>
11286 +<afterbreak></afterbreak>
11287 +</rule>
11288 +<rule break="no">
11289 +<beforebreak>\bkresť\.\s</beforebreak>
11290 +<afterbreak></afterbreak>
11291 +</rule>
11292 +<rule break="no">
11293 +<beforebreak>\bkt\.\s</beforebreak>
11294 +<afterbreak></afterbreak>
11295 +</rule>
11296 +<rule break="no">
11297 +<beforebreak>\bkuch\.\s</beforebreak>
11298 +<afterbreak></afterbreak>
11299 +</rule>
11300 +<rule break="no">
11301 +<beforebreak>\blat\.\s</beforebreak>
11302 +<afterbreak></afterbreak>
11303 +</rule>
11304 +<rule break="no">
11305 +<beforebreak>\blatinskoamer\.\s</beforebreak>
11306 +<afterbreak></afterbreak>
11307 +</rule>
11308 +<rule break="no">
11309 +<beforebreak>\blek\.\s</beforebreak>
11310 +<afterbreak></afterbreak>
11311 +</rule>
11312 +<rule break="no">
11313 +<beforebreak>\blex\.\s</beforebreak>
11314 +<afterbreak></afterbreak>
11315 +</rule>
11316 +<rule break="no">
11317 +<beforebreak>\blingv\.\s</beforebreak>
11318 +<afterbreak></afterbreak>
11319 +</rule>
11320 +<rule break="no">
11321 +<beforebreak>\blit\.\s</beforebreak>
11322 +<afterbreak></afterbreak>
11323 +</rule>
11324 +<rule break="no">
11325 +<beforebreak>\blitur\.\s</beforebreak>
11326 +<afterbreak></afterbreak>
11327 +</rule>
11328 +<rule break="no">
11329 +<beforebreak>\blog\.\s</beforebreak>
11330 +<afterbreak></afterbreak>
11331 +</rule>
11332 +<rule break="no">
11333 +<beforebreak>\blok\.\s</beforebreak>
11334 +<afterbreak></afterbreak>
11335 +</rule>
11336 +<rule break="no">
11337 +<beforebreak>\b[Mm]ax\.\s</beforebreak>
11338 +<afterbreak></afterbreak>
11339 +</rule>
11340 +<rule break="no">
11341 +<beforebreak>\b[Mm]aď\.\s</beforebreak>
11342 +<afterbreak></afterbreak>
11343 +</rule>
11344 +<rule break="no">
11345 +<beforebreak>\bmedzinár\.\s</beforebreak>
11346 +<afterbreak></afterbreak>
11347 +</rule>
11348 +<rule break="no">
11349 +<beforebreak>\bmest\.\s</beforebreak>
11350 +<afterbreak></afterbreak>
11351 +</rule>
11352 +<rule break="no">
11353 +<beforebreak>\bmetr\.\s</beforebreak>
11354 +<afterbreak></afterbreak>
11355 +</rule>
11356 +<rule break="no">
11357 +<beforebreak>\b[Mm]il\.\s</beforebreak>
11358 +<afterbreak></afterbreak>
11359 +</rule>
11360 +<rule break="no">
11361 +<beforebreak>\b[Mm]in\.\s</beforebreak>
11362 +<afterbreak></afterbreak>
11363 +</rule>
11364 +<rule break="no">
11365 +<beforebreak>\bminer\.\s</beforebreak>
11366 +<afterbreak></afterbreak>
11367 +</rule>
11368 +<rule break="no">
11369 +<beforebreak>\bml\.\s</beforebreak>
11370 +<afterbreak></afterbreak>
11371 +</rule>
11372 +<rule break="no">
11373 +<beforebreak>\bmld\.\s</beforebreak>
11374 +<afterbreak></afterbreak>
11375 +</rule>
11376 +<rule break="no">
11377 +<beforebreak>\bmn\.\s</beforebreak>
11378 +<afterbreak></afterbreak>
11379 +</rule>
11380 +<rule break="no">
11381 +<beforebreak>\bmod\.\s</beforebreak>
11382 +<afterbreak></afterbreak>
11383 +</rule>
11384 +<rule break="no">
11385 +<beforebreak>\bmytol\.\s</beforebreak>
11386 +<afterbreak></afterbreak>
11387 +</rule>
11388 +<rule break="no">
11389 +<beforebreak>\bnapr\.\s</beforebreak>
11390 +<afterbreak></afterbreak>
11391 +</rule>
11392 +<rule break="no">
11393 +<beforebreak>\b[Nn]ar\.\s</beforebreak>
11394 +<afterbreak></afterbreak>
11395 +</rule>
11396 +<rule break="no">
11397 +<beforebreak>\bnasl\.\s</beforebreak>
11398 +<afterbreak></afterbreak>
11399 +</rule>
11400 +<rule break="no">
11401 +<beforebreak>\bnedok\.\s</beforebreak>
11402 +<afterbreak></afterbreak>
11403 +</rule>
11404 +<rule break="no">
11405 +<beforebreak>\bneg\.\s</beforebreak>
11406 +<afterbreak></afterbreak>
11407 +</rule>
11408 +<rule break="no">
11409 +<beforebreak>\bnegat\.\s</beforebreak>
11410 +<afterbreak></afterbreak>
11411 +</rule>
11412 +<rule break="no">
11413 +<beforebreak>\bneklas\.\s</beforebreak>
11414 +<afterbreak></afterbreak>
11415 +</rule>
11416 +<rule break="no">
11417 +<beforebreak>\b[Nn]em\.\s</beforebreak>
11418 +<afterbreak></afterbreak>
11419 +</rule>
11420 +<rule break="no">
11421 +<beforebreak>\bneodb\.\s</beforebreak>
11422 +<afterbreak></afterbreak>
11423 +</rule>
11424 +<rule break="no">
11425 +<beforebreak>\bneos\.\s</beforebreak>
11426 +<afterbreak></afterbreak>
11427 +</rule>
11428 +<rule break="no">
11429 +<beforebreak>\bneskl\.\s</beforebreak>
11430 +<afterbreak></afterbreak>
11431 +</rule>
11432 +<rule break="no">
11433 +<beforebreak>\bnesklon\.\s</beforebreak>
11434 +<afterbreak></afterbreak>
11435 +</rule>
11436 +<rule break="no">
11437 +<beforebreak>\bnespis\.\s</beforebreak>
11438 +<afterbreak></afterbreak>
11439 +</rule>
11440 +<rule break="no">
11441 +<beforebreak>\bnespráv\.\s</beforebreak>
11442 +<afterbreak></afterbreak>
11443 +</rule>
11444 +<rule break="no">
11445 +<beforebreak>\bneved\.\s</beforebreak>
11446 +<afterbreak></afterbreak>
11447 +</rule>
11448 +<rule break="no">
11449 +<beforebreak>\bnež\.\s</beforebreak>
11450 +<afterbreak></afterbreak>
11451 +</rule>
11452 +<rule break="no">
11453 +<beforebreak>\bniekt\.\s</beforebreak>
11454 +<afterbreak></afterbreak>
11455 +</rule>
11456 +<rule break="no">
11457 +<beforebreak>\bniž\.\s</beforebreak>
11458 +<afterbreak></afterbreak>
11459 +</rule>
11460 +<rule break="no">
11461 +<beforebreak>\bnom\.\s</beforebreak>
11462 +<afterbreak></afterbreak>
11463 +</rule>
11464 +<rule break="no">
11465 +<beforebreak>\bnáb\.\s</beforebreak>
11466 +<afterbreak></afterbreak>
11467 +</rule>
11468 +<rule break="no">
11469 +<beforebreak>\bnákl\.\s</beforebreak>
11470 +<afterbreak></afterbreak>
11471 +</rule>
11472 +<rule break="no">
11473 +<beforebreak>\bnámor\.\s</beforebreak>
11474 +<afterbreak></afterbreak>
11475 +</rule>
11476 +<rule break="no">
11477 +<beforebreak>\bnár\.\s</beforebreak>
11478 +<afterbreak></afterbreak>
11479 +</rule>
11480 +<rule break="no">
11481 +<beforebreak>\bobch\.\s</beforebreak>
11482 +<afterbreak></afterbreak>
11483 +</rule>
11484 +<rule break="no">
11485 +<beforebreak>\bobj\.\s</beforebreak>
11486 +<afterbreak></afterbreak>
11487 +</rule>
11488 +<rule break="no">
11489 +<beforebreak>\bobv\.\s</beforebreak>
11490 +<afterbreak></afterbreak>
11491 +</rule>
11492 +<rule break="no">
11493 +<beforebreak>\bobyč\.\s</beforebreak>
11494 +<afterbreak></afterbreak>
11495 +</rule>
11496 +<rule break="no">
11497 +<beforebreak>\bobč\.\s</beforebreak>
11498 +<afterbreak></afterbreak>
11499 +</rule>
11500 +<rule break="no">
11501 +<beforebreak>\bobčian\.\s</beforebreak>
11502 +<afterbreak></afterbreak>
11503 +</rule>
11504 +<rule break="no">
11505 +<beforebreak>\bodb\.\s</beforebreak>
11506 +<afterbreak></afterbreak>
11507 +</rule>
11508 +<rule break="no">
11509 +<beforebreak>\bodd\.\s</beforebreak>
11510 +<afterbreak></afterbreak>
11511 +</rule>
11512 +<rule break="no">
11513 +<beforebreak>\bods\.\s</beforebreak>
11514 +<afterbreak></afterbreak>
11515 +</rule>
11516 +<rule break="no">
11517 +<beforebreak>\bojed\.\s</beforebreak>
11518 +<afterbreak></afterbreak>
11519 +</rule>
11520 +<rule break="no">
11521 +<beforebreak>\b[Oo]kr\.\s</beforebreak>
11522 +<afterbreak></afterbreak>
11523 +</rule>
11524 +<rule break="no">
11525 +<beforebreak>\bopt\.\s</beforebreak>
11526 +<afterbreak></afterbreak>
11527 +</rule>
11528 +<rule break="no">
11529 +<beforebreak>\bopyt\.\s</beforebreak>
11530 +<afterbreak></afterbreak>
11531 +</rule>
11532 +<rule break="no">
11533 +<beforebreak>\borg\.\s</beforebreak>
11534 +<afterbreak></afterbreak>
11535 +</rule>
11536 +<rule break="no">
11537 +<beforebreak>\bos\.\s</beforebreak>
11538 +<afterbreak></afterbreak>
11539 +</rule>
11540 +<rule break="no">
11541 +<beforebreak>\bosob\.\s</beforebreak>
11542 +<afterbreak></afterbreak>
11543 +</rule>
11544 +<rule break="no">
11545 +<beforebreak>\bot\.\s</beforebreak>
11546 +<afterbreak></afterbreak>
11547 +</rule>
11548 +<rule break="no">
11549 +<beforebreak>\bovoc\.\s</beforebreak>
11550 +<afterbreak></afterbreak>
11551 +</rule>
11552 +<rule break="no">
11553 +<beforebreak>\bpar\.\s</beforebreak>
11554 +<afterbreak></afterbreak>
11555 +</rule>
11556 +<rule break="no">
11557 +<beforebreak>\bpart\.\s</beforebreak>
11558 +<afterbreak></afterbreak>
11559 +</rule>
11560 +<rule break="no">
11561 +<beforebreak>\bpejor\.\s</beforebreak>
11562 +<afterbreak></afterbreak>
11563 +</rule>
11564 +<rule break="no">
11565 +<beforebreak>\bpers\.\s</beforebreak>
11566 +<afterbreak></afterbreak>
11567 +</rule>
11568 +<rule break="no">
11569 +<beforebreak>\b(pf|Pf|P\.f|p\.f)\.\s</beforebreak>
11570 +<afterbreak></afterbreak>
11571 +</rule>
11572 +<rule break="no">
11573 +<beforebreak>\bpl\.\s</beforebreak>
11574 +<afterbreak></afterbreak>
11575 +</rule>
11576 +<rule break="no">
11577 +<beforebreak>\bPlk\.\s</beforebreak>
11578 +<afterbreak></afterbreak>
11579 +</rule>
11580 +<rule break="no">
11581 +<beforebreak>\bpod\.\s</beforebreak>
11582 +<afterbreak></afterbreak>
11583 +</rule>
11584 +<rule break="no">
11585 +<beforebreak>\bpodst\.\s</beforebreak>
11586 +<afterbreak></afterbreak>
11587 +</rule>
11588 +<rule break="no">
11589 +<beforebreak>\bpokl\.\s</beforebreak>
11590 +<afterbreak></afterbreak>
11591 +</rule>
11592 +<rule break="no">
11593 +<beforebreak>\bpolit\.\s</beforebreak>
11594 +<afterbreak></afterbreak>
11595 +</rule>
11596 +<rule break="no">
11597 +<beforebreak>\bpolitol\.\s</beforebreak>
11598 +<afterbreak></afterbreak>
11599 +</rule>
11600 +<rule break="no">
11601 +<beforebreak>\bpolygr\.\s</beforebreak>
11602 +<afterbreak></afterbreak>
11603 +</rule>
11604 +<rule break="no">
11605 +<beforebreak>\bpomn\.\s</beforebreak>
11606 +<afterbreak></afterbreak>
11607 +</rule>
11608 +<rule break="no">
11609 +<beforebreak>\bpopl\.\s</beforebreak>
11610 +<afterbreak></afterbreak>
11611 +</rule>
11612 +<rule break="no">
11613 +<beforebreak>\bpor\.\s</beforebreak>
11614 +<afterbreak></afterbreak>
11615 +</rule>
11616 +<rule break="no">
11617 +<beforebreak>\bporad\.\s</beforebreak>
11618 +<afterbreak></afterbreak>
11619 +</rule>
11620 +<rule break="no">
11621 +<beforebreak>\bporov\.\s</beforebreak>
11622 +<afterbreak></afterbreak>
11623 +</rule>
11624 +<rule break="no">
11625 +<beforebreak>\bposch\.\s</beforebreak>
11626 +<afterbreak></afterbreak>
11627 +</rule>
11628 +<rule break="no">
11629 +<beforebreak>\bpotrav\.\s</beforebreak>
11630 +<afterbreak></afterbreak>
11631 +</rule>
11632 +<rule break="no">
11633 +<beforebreak>\bpouž\.\s</beforebreak>
11634 +<afterbreak></afterbreak>
11635 +</rule>
11636 +<rule break="no">
11637 +<beforebreak>\bpoz\.\s</beforebreak>
11638 +<afterbreak></afterbreak>
11639 +</rule>
11640 +<rule break="no">
11641 +<beforebreak>\bpozit\.\s</beforebreak>
11642 +<afterbreak></afterbreak>
11643 +</rule>
11644 +<rule break="no">
11645 +<beforebreak>\bpoľ\.\s</beforebreak>
11646 +<afterbreak></afterbreak>
11647 +</rule>
11648 +<rule break="no">
11649 +<beforebreak>\bpoľno\.\s</beforebreak>
11650 +<afterbreak></afterbreak>
11651 +</rule>
11652 +<rule break="no">
11653 +<beforebreak>\bpoľnohosp\.\s</beforebreak>
11654 +<afterbreak></afterbreak>
11655 +</rule>
11656 +<rule break="no">
11657 +<beforebreak>\bpoľov\.\s</beforebreak>
11658 +<afterbreak></afterbreak>
11659 +</rule>
11660 +<rule break="no">
11661 +<beforebreak>\bpošt\.\s</beforebreak>
11662 +<afterbreak></afterbreak>
11663 +</rule>
11664 +<rule break="no">
11665 +<beforebreak>\bpož\.\s</beforebreak>
11666 +<afterbreak></afterbreak>
11667 +</rule>
11668 +<rule break="no">
11669 +<beforebreak>\bprac\.\s</beforebreak>
11670 +<afterbreak></afterbreak>
11671 +</rule>
11672 +<rule break="no">
11673 +<beforebreak>\bpredl\.\s</beforebreak>
11674 +<afterbreak></afterbreak>
11675 +</rule>
11676 +<rule break="no">
11677 +<beforebreak>\bpren\.\s</beforebreak>
11678 +<afterbreak></afterbreak>
11679 +</rule>
11680 +<rule break="no">
11681 +<beforebreak>\bprep\.\s</beforebreak>
11682 +<afterbreak></afterbreak>
11683 +</rule>
11684 +<rule break="no">
11685 +<beforebreak>\bpreuk\.\s</beforebreak>
11686 +<afterbreak></afterbreak>
11687 +</rule>
11688 +<rule break="no">
11689 +<beforebreak>\b[Pp]riezv\.\s</beforebreak>
11690 +<afterbreak></afterbreak>
11691 +</rule>
11692 +<rule break="no">
11693 +<beforebreak>\bprivl\.\s</beforebreak>
11694 +<afterbreak></afterbreak>
11695 +</rule>
11696 +<rule break="no">
11697 +<beforebreak>\bprof\.\s</beforebreak>
11698 +<afterbreak></afterbreak>
11699 +</rule>
11700 +<rule break="no">
11701 +<beforebreak>\bpráv\.\s</beforebreak>
11702 +<afterbreak></afterbreak>
11703 +</rule>
11704 +<rule break="no">
11705 +<beforebreak>\bpríd\.\s</beforebreak>
11706 +<afterbreak></afterbreak>
11707 +</rule>
11708 +<rule break="no">
11709 +<beforebreak>\bpríj\.\s</beforebreak>
11710 +<afterbreak></afterbreak>
11711 +</rule>
11712 +<rule break="no">
11713 +<beforebreak>\bprík\.\s</beforebreak>
11714 +<afterbreak></afterbreak>
11715 +</rule>
11716 +<rule break="no">
11717 +<beforebreak>\bpríp\.\s</beforebreak>
11718 +<afterbreak></afterbreak>
11719 +</rule>
11720 +<rule break="no">
11721 +<beforebreak>\bprír\.\s</beforebreak>
11722 +<afterbreak></afterbreak>
11723 +</rule>
11724 +<rule break="no">
11725 +<beforebreak>\bprísl\.\s</beforebreak>
11726 +<afterbreak></afterbreak>
11727 +</rule>
11728 +<rule break="no">
11729 +<beforebreak>\bpríslov\.\s</beforebreak>
11730 +<afterbreak></afterbreak>
11731 +</rule>
11732 +<rule break="no">
11733 +<beforebreak>\bpríč\.\s</beforebreak>
11734 +<afterbreak></afterbreak>
11735 +</rule>
11736 +<rule break="no">
11737 +<beforebreak>\bpsych\.\s</beforebreak>
11738 +<afterbreak></afterbreak>
11739 +</rule>
11740 +<rule break="no">
11741 +<beforebreak>\bpubl\.\s</beforebreak>
11742 +<afterbreak></afterbreak>
11743 +</rule>
11744 +<rule break="no">
11745 +<beforebreak>\bpís\.\s</beforebreak>
11746 +<afterbreak></afterbreak>
11747 +</rule>
11748 +<rule break="no">
11749 +<beforebreak>\bpísm\.\s</beforebreak>
11750 +<afterbreak></afterbreak>
11751 +</rule>
11752 +<rule break="no">
11753 +<beforebreak>\bpôv\.\s</beforebreak>
11754 +<afterbreak></afterbreak>
11755 +</rule>
11756 +<rule break="no">
11757 +<beforebreak>\brefl\.\s</beforebreak>
11758 +<afterbreak></afterbreak>
11759 +</rule>
11760 +<rule break="no">
11761 +<beforebreak>\breg\.\s</beforebreak>
11762 +<afterbreak></afterbreak>
11763 +</rule>
11764 +<rule break="no">
11765 +<beforebreak>\brep\.\s</beforebreak>
11766 +<afterbreak></afterbreak>
11767 +</rule>
11768 +<rule break="no">
11769 +<beforebreak>\bresp\.\s</beforebreak>
11770 +<afterbreak></afterbreak>
11771 +</rule>
11772 +<rule break="no">
11773 +<beforebreak>\brozk\.\s</beforebreak>
11774 +<afterbreak></afterbreak>
11775 +</rule>
11776 +<rule break="no">
11777 +<beforebreak>\brozlič\.\s</beforebreak>
11778 +<afterbreak></afterbreak>
11779 +</rule>
11780 +<rule break="no">
11781 +<beforebreak>\brozpráv\.\s</beforebreak>
11782 +<afterbreak></afterbreak>
11783 +</rule>
11784 +<rule break="no">
11785 +<beforebreak>\b[Rr]oč\.\s</beforebreak>
11786 +<afterbreak></afterbreak>
11787 +</rule>
11788 +<rule break="no">
11789 +<beforebreak>\bryb\.\s</beforebreak>
11790 +<afterbreak></afterbreak>
11791 +</rule>
11792 +<rule break="no">
11793 +<beforebreak>\brádiotech\.\s</beforebreak>
11794 +<afterbreak></afterbreak>
11795 +</rule>
11796 +<rule break="no">
11797 +<beforebreak>\brím\.\s</beforebreak>
11798 +<afterbreak></afterbreak>
11799 +</rule>
11800 +<rule break="no">
11801 +<beforebreak>\bsamohl\.\s</beforebreak>
11802 +<afterbreak></afterbreak>
11803 +</rule>
11804 +<rule break="no">
11805 +<beforebreak>\bsemest\.\s</beforebreak>
11806 +<afterbreak></afterbreak>
11807 +</rule>
11808 +<rule break="no">
11809 +<beforebreak>\bsev\.\s</beforebreak>
11810 +<afterbreak></afterbreak>
11811 +</rule>
11812 +<rule break="no">
11813 +<beforebreak>\bseveroamer\.\s</beforebreak>
11814 +<afterbreak></afterbreak>
11815 +</rule>
11816 +<rule break="no">
11817 +<beforebreak>\bseverových\.\s</beforebreak>
11818 +<afterbreak></afterbreak>
11819 +</rule>
11820 +<rule break="no">
11821 +<beforebreak>\bseverozáp\.\s</beforebreak>
11822 +<afterbreak></afterbreak>
11823 +</rule>
11824 +<rule break="no">
11825 +<beforebreak>\bsg\.\s</beforebreak>
11826 +<afterbreak></afterbreak>
11827 +</rule>
11828 +<rule break="no">
11829 +<beforebreak>\bskr\.\s</beforebreak>
11830 +<afterbreak></afterbreak>
11831 +</rule>
11832 +<rule break="no">
11833 +<beforebreak>\bskup\.\s</beforebreak>
11834 +<afterbreak></afterbreak>
11835 +</rule>
11836 +<rule break="no">
11837 +<beforebreak>\bsl\.\s</beforebreak>
11838 +<afterbreak></afterbreak>
11839 +</rule>
11840 +<rule break="no">
11841 +<beforebreak>\bSloven\.\s</beforebreak>
11842 +<afterbreak></afterbreak>
11843 +</rule>
11844 +<rule break="no">
11845 +<beforebreak>\bsoc\.\s</beforebreak>
11846 +<afterbreak></afterbreak>
11847 +</rule>
11848 +<rule break="no">
11849 +<beforebreak>\bsoch\.\s</beforebreak>
11850 +<afterbreak></afterbreak>
11851 +</rule>
11852 +<rule break="no">
11853 +<beforebreak>\bsociol\.\s</beforebreak>
11854 +<afterbreak></afterbreak>
11855 +</rule>
11856 +<rule break="no">
11857 +<beforebreak>\bsp\.\s</beforebreak>
11858 +<afterbreak></afterbreak>
11859 +</rule>
11860 +<rule break="no">
11861 +<beforebreak>\b[Ss]pol\.\s</beforebreak>
11862 +<afterbreak></afterbreak>
11863 +</rule>
11864 +<rule break="no">
11865 +<beforebreak>\bspoloč\.\s</beforebreak>
11866 +<afterbreak></afterbreak>
11867 +</rule>
11868 +<rule break="no">
11869 +<beforebreak>\bspoluhl\.\s</beforebreak>
11870 +<afterbreak></afterbreak>
11871 +</rule>
11872 +<rule break="no">
11873 +<beforebreak>\bspráv\.\s</beforebreak>
11874 +<afterbreak></afterbreak>
11875 +</rule>
11876 +<rule break="no">
11877 +<beforebreak>\bspôs\.\s</beforebreak>
11878 +<afterbreak></afterbreak>
11879 +</rule>
11880 +<rule break="no">
11881 +<beforebreak>\bst\.\s</beforebreak>
11882 +<afterbreak></afterbreak>
11883 +</rule>
11884 +<rule break="no">
11885 +<beforebreak>\bstar\.\s</beforebreak>
11886 +<afterbreak></afterbreak>
11887 +</rule>
11888 +<rule break="no">
11889 +<beforebreak>\bstarogréc\.\s</beforebreak>
11890 +<afterbreak></afterbreak>
11891 +</rule>
11892 +<rule break="no">
11893 +<beforebreak>\bstarorím\.\s</beforebreak>
11894 +<afterbreak></afterbreak>
11895 +</rule>
11896 +<rule break="no">
11897 +<beforebreak>\bs\.r\.o\.\s</beforebreak>
11898 +<afterbreak></afterbreak>
11899 +</rule>
11900 +<rule break="no">
11901 +<beforebreak>\bstol\.\s</beforebreak>
11902 +<afterbreak></afterbreak>
11903 +</rule>
11904 +<rule break="no">
11905 +<beforebreak>\bstor\.\s</beforebreak>
11906 +<afterbreak></afterbreak>
11907 +</rule>
11908 +<rule break="no">
11909 +<beforebreak>\bstr\.\s</beforebreak>
11910 +<afterbreak></afterbreak>
11911 +</rule>
11912 +<rule break="no">
11913 +<beforebreak>\bstredoamer\.\s</beforebreak>
11914 +<afterbreak></afterbreak>
11915 +</rule>
11916 +<rule break="no">
11917 +<beforebreak>\bstredoškol\.\s</beforebreak>
11918 +<afterbreak></afterbreak>
11919 +</rule>
11920 +<rule break="no">
11921 +<beforebreak>\bsubj\.\s</beforebreak>
11922 +<afterbreak></afterbreak>
11923 +</rule>
11924 +<rule break="no">
11925 +<beforebreak>\bsubst\.\s</beforebreak>
11926 +<afterbreak></afterbreak>
11927 +</rule>
11928 +<rule break="no">
11929 +<beforebreak>\bsuperl\.\s</beforebreak>
11930 +<afterbreak></afterbreak>
11931 +</rule>
11932 +<rule break="no">
11933 +<beforebreak>\bsv\.\s</beforebreak>
11934 +<afterbreak></afterbreak>
11935 +</rule>
11936 +<rule break="no">
11937 +<beforebreak>\bsz\.\s</beforebreak>
11938 +<afterbreak></afterbreak>
11939 +</rule>
11940 +<rule break="no">
11941 +<beforebreak>\bsúkr\.\s</beforebreak>
11942 +<afterbreak></afterbreak>
11943 +</rule>
11944 +<rule break="no">
11945 +<beforebreak>\bsúp\.\s</beforebreak>
11946 +<afterbreak></afterbreak>
11947 +</rule>
11948 +<rule break="no">
11949 +<beforebreak>\bsúvzť\.\s</beforebreak>
11950 +<afterbreak></afterbreak>
11951 +</rule>
11952 +<rule break="no">
11953 +<beforebreak>\b[Tt]al\.\s</beforebreak>
11954 +<afterbreak></afterbreak>
11955 +</rule>
11956 +<rule break="no">
11957 +<beforebreak>\btech\.\s</beforebreak>
11958 +<afterbreak></afterbreak>
11959 +</rule>
11960 +<rule break="no">
11961 +<beforebreak>\b[Tt]el\.\s</beforebreak>
11962 +<afterbreak></afterbreak>
11963 +</rule>
11964 +<rule break="no">
11965 +<beforebreak>\btelef\.\s</beforebreak>
11966 +<afterbreak></afterbreak>
11967 +</rule>
11968 +<rule break="no">
11969 +<beforebreak>\bteles\.\s</beforebreak>
11970 +<afterbreak></afterbreak>
11971 +</rule>
11972 +<rule break="no">
11973 +<beforebreak>\btelev\.\s</beforebreak>
11974 +<afterbreak></afterbreak>
11975 +</rule>
11976 +<rule break="no">
11977 +<beforebreak>\bteol\.\s</beforebreak>
11978 +<afterbreak></afterbreak>
11979 +</rule>
11980 +<rule break="no">
11981 +<beforebreak>\btrans\.\s</beforebreak>
11982 +<afterbreak></afterbreak>
11983 +</rule>
11984 +<rule break="no">
11985 +<beforebreak>\bturist\.\s</beforebreak>
11986 +<afterbreak></afterbreak>
11987 +</rule>
11988 +<rule break="no">
11989 +<beforebreak>\btuzem\.\s</beforebreak>
11990 +<afterbreak></afterbreak>
11991 +</rule>
11992 +<rule break="no">
11993 +<beforebreak>\btypogr\.\s</beforebreak>
11994 +<afterbreak></afterbreak>
11995 +</rule>
11996 +<rule break="no">
11997 +<beforebreak>\btzn\.\s</beforebreak>
11998 +<afterbreak></afterbreak>
11999 +</rule>
12000 +<rule break="no">
12001 +<beforebreak>\btzv\.\s</beforebreak>
12002 +<afterbreak></afterbreak>
12003 +</rule>
12004 +<rule break="no">
12005 +<beforebreak>\bukaz\.\s</beforebreak>
12006 +<afterbreak></afterbreak>
12007 +</rule>
12008 +<rule break="no">
12009 +<beforebreak>\b[Uu]l\.\s</beforebreak>
12010 +<afterbreak></afterbreak>
12011 +</rule>
12012 +<rule break="no">
12013 +<beforebreak>\bumel\.\s</beforebreak>
12014 +<afterbreak></afterbreak>
12015 +</rule>
12016 +<rule break="no">
12017 +<beforebreak>\buniv\.\s</beforebreak>
12018 +<afterbreak></afterbreak>
12019 +</rule>
12020 +<rule break="no">
12021 +<beforebreak>\bust\.\s</beforebreak>
12022 +<afterbreak></afterbreak>
12023 +</rule>
12024 +<rule break="no">
12025 +<beforebreak>\bved\.\s</beforebreak>
12026 +<afterbreak></afterbreak>
12027 +</rule>
12028 +<rule break="no">
12029 +<beforebreak>\bvedľ\.\s</beforebreak>
12030 +<afterbreak></afterbreak>
12031 +</rule>
12032 +<rule break="no">
12033 +<beforebreak>\bverb\.\s</beforebreak>
12034 +<afterbreak></afterbreak>
12035 +</rule>
12036 +<rule break="no">
12037 +<beforebreak>\bveter\.\s</beforebreak>
12038 +<afterbreak></afterbreak>
12039 +</rule>
12040 +<rule break="no">
12041 +<beforebreak>\bvin\.\s</beforebreak>
12042 +<afterbreak></afterbreak>
12043 +</rule>
12044 +<rule break="no">
12045 +<beforebreak>\bviď\.\s</beforebreak>
12046 +<afterbreak></afterbreak>
12047 +</rule>
12048 +<rule break="no">
12049 +<beforebreak>\bvl\.\s</beforebreak>
12050 +<afterbreak></afterbreak>
12051 +</rule>
12052 +<rule break="no">
12053 +<beforebreak>\bvod\.\s</beforebreak>
12054 +<afterbreak></afterbreak>
12055 +</rule>
12056 +<rule break="no">
12057 +<beforebreak>\bvodohosp\.\s</beforebreak>
12058 +<afterbreak></afterbreak>
12059 +</rule>
12060 +<rule break="no">
12061 +<beforebreak>\bp?nl\.\s</beforebreak>
12062 +<afterbreak></afterbreak>
12063 +</rule>
12064 +<rule break="no">
12065 +<beforebreak>\bvulg\.\s</beforebreak>
12066 +<afterbreak></afterbreak>
12067 +</rule>
12068 +<rule break="no">
12069 +<beforebreak>\bvyj\.\s</beforebreak>
12070 +<afterbreak></afterbreak>
12071 +</rule>
12072 +<rule break="no">
12073 +<beforebreak>\bvys\.\s</beforebreak>
12074 +<afterbreak></afterbreak>
12075 +</rule>
12076 +<rule break="no">
12077 +<beforebreak>\bvysokoškol\.\s</beforebreak>
12078 +<afterbreak></afterbreak>
12079 +</rule>
12080 +<rule break="no">
12081 +<beforebreak>\bvzťaž\.\s</beforebreak>
12082 +<afterbreak></afterbreak>
12083 +</rule>
12084 +<rule break="no">
12085 +<beforebreak>\bvôb\.\s</beforebreak>
12086 +<afterbreak></afterbreak>
12087 +</rule>
12088 +<rule break="no">
12089 +<beforebreak>\bvých\.\s</beforebreak>
12090 +<afterbreak></afterbreak>
12091 +</rule>
12092 +<rule break="no">
12093 +<beforebreak>\bvýd\.\s</beforebreak>
12094 +<afterbreak></afterbreak>
12095 +</rule>
12096 +<rule break="no">
12097 +<beforebreak>\bvýrob\.\s</beforebreak>
12098 +<afterbreak></afterbreak>
12099 +</rule>
12100 +<rule break="no">
12101 +<beforebreak>\bvýsk\.\s</beforebreak>
12102 +<afterbreak></afterbreak>
12103 +</rule>
12104 +<rule break="no">
12105 +<beforebreak>\bvýsl\.\s</beforebreak>
12106 +<afterbreak></afterbreak>
12107 +</rule>
12108 +<rule break="no">
12109 +<beforebreak>\bvýtv\.\s</beforebreak>
12110 +<afterbreak></afterbreak>
12111 +</rule>
12112 +<rule break="no">
12113 +<beforebreak>\bvýtvar\.\s</beforebreak>
12114 +<afterbreak></afterbreak>
12115 +</rule>
12116 +<rule break="no">
12117 +<beforebreak>\bvýzn\.\s</beforebreak>
12118 +<afterbreak></afterbreak>
12119 +</rule>
12120 +<rule break="no">
12121 +<beforebreak>\bvčel\.\s</beforebreak>
12122 +<afterbreak></afterbreak>
12123 +</rule>
12124 +<rule break="no">
12125 +<beforebreak>\bvš\.\s</beforebreak>
12126 +<afterbreak></afterbreak>
12127 +</rule>
12128 +<rule break="no">
12129 +<beforebreak>\bvšeob\.\s</beforebreak>
12130 +<afterbreak></afterbreak>
12131 +</rule>
12132 +<rule break="no">
12133 +<beforebreak>\bzahr\.\s</beforebreak>
12134 +<afterbreak></afterbreak>
12135 +</rule>
12136 +<rule break="no">
12137 +<beforebreak>\bzar\.\s</beforebreak>
12138 +<afterbreak></afterbreak>
12139 +</rule>
12140 +<rule break="no">
12141 +<beforebreak>\bzariad\.\s</beforebreak>
12142 +<afterbreak></afterbreak>
12143 +</rule>
12144 +<rule break="no">
12145 +<beforebreak>\bzast\.\s</beforebreak>
12146 +<afterbreak></afterbreak>
12147 +</rule>
12148 +<rule break="no">
12149 +<beforebreak>\bzastar\.\s</beforebreak>
12150 +<afterbreak></afterbreak>
12151 +</rule>
12152 +<rule break="no">
12153 +<beforebreak>\bzastaráv\.\s</beforebreak>
12154 +<afterbreak></afterbreak>
12155 +</rule>
12156 +<rule break="no">
12157 +<beforebreak>\bzb\.\s</beforebreak>
12158 +<afterbreak></afterbreak>
12159 +</rule>
12160 +<rule break="no">
12161 +<beforebreak>\bzdravot\.\s</beforebreak>
12162 +<afterbreak></afterbreak>
12163 +</rule>
12164 +<rule break="no">
12165 +<beforebreak>\bzdruž\.\s</beforebreak>
12166 +<afterbreak></afterbreak>
12167 +</rule>
12168 +<rule break="no">
12169 +<beforebreak>\bzjemn\.\s</beforebreak>
12170 +<afterbreak></afterbreak>
12171 +</rule>
12172 +<rule break="no">
12173 +<beforebreak>\bzlat\.\s</beforebreak>
12174 +<afterbreak></afterbreak>
12175 +</rule>
12176 +<rule break="no">
12177 +<beforebreak>\b[Zz]n\.\s</beforebreak>
12178 +<afterbreak></afterbreak>
12179 +</rule>
12180 +<rule break="no">
12181 +<beforebreak>\bzool\.\s</beforebreak>
12182 +<afterbreak></afterbreak>
12183 +</rule>
12184 +<rule break="no">
12185 +<beforebreak>\bzr\.\s</beforebreak>
12186 +<afterbreak></afterbreak>
12187 +</rule>
12188 +<rule break="no">
12189 +<beforebreak>\bzried\.\s</beforebreak>
12190 +<afterbreak></afterbreak>
12191 +</rule>
12192 +<rule break="no">
12193 +<beforebreak>\bzv\.\s</beforebreak>
12194 +<afterbreak></afterbreak>
12195 +</rule>
12196 +<rule break="no">
12197 +<beforebreak>\bzáhr\.\s</beforebreak>
12198 +<afterbreak></afterbreak>
12199 +</rule>
12200 +<rule break="no">
12201 +<beforebreak>\bzák\.\s</beforebreak>
12202 +<afterbreak></afterbreak>
12203 +</rule>
12204 +<rule break="no">
12205 +<beforebreak>\bzákl\.\s</beforebreak>
12206 +<afterbreak></afterbreak>
12207 +</rule>
12208 +<rule break="no">
12209 +<beforebreak>\bzám\.\s</beforebreak>
12210 +<afterbreak></afterbreak>
12211 +</rule>
12212 +<rule break="no">
12213 +<beforebreak>\bzáp\.\s</beforebreak>
12214 +<afterbreak></afterbreak>
12215 +</rule>
12216 +<rule break="no">
12217 +<beforebreak>\bzápadoeur\.\s</beforebreak>
12218 +<afterbreak></afterbreak>
12219 +</rule>
12220 +<rule break="no">
12221 +<beforebreak>\bzázn\.\s</beforebreak>
12222 +<afterbreak></afterbreak>
12223 +</rule>
12224 +<rule break="yes">
12225 +<beforebreak>\bázij\.\s</beforebreak>
12226 +<afterbreak></afterbreak>
12227 +</rule>
12228 +<rule break="no">
12229 +<beforebreak>\búzem\.\s</beforebreak>
12230 +<afterbreak></afterbreak>
12231 +</rule>
12232 +<rule break="no">
12233 +<beforebreak>\búčt\.\s</beforebreak>
12234 +<afterbreak></afterbreak>
12235 +</rule>
12236 +<rule break="no">
12237 +<beforebreak>\bčast\.\s</beforebreak>
12238 +<afterbreak></afterbreak>
12239 +</rule>
12240 +<rule break="no">
12241 +<beforebreak>\b[Čč]es\.\s</beforebreak>
12242 +<afterbreak></afterbreak>
12243 +</rule>
12244 +<rule break="no">
12245 +<beforebreak>\bčl\.\s</beforebreak>
12246 +<afterbreak></afterbreak>
12247 +</rule>
12248 +<rule break="no">
12249 +<beforebreak>\bčísl\.\s</beforebreak>
12250 +<afterbreak></afterbreak>
12251 +</rule>
12252 +<rule break="no">
12253 +<beforebreak>\bživ\.\s</beforebreak>
12254 +<afterbreak></afterbreak>
12255 +</rule>
12256 +<rule break="no">
12257 +<beforebreak>\bpr\.\s</beforebreak>
12258 +<afterbreak></afterbreak>
12259 +</rule>
12260 +<rule break="no">
12261 +<beforebreak>\bfak\.\s</beforebreak>
12262 +<afterbreak></afterbreak>
12263 +</rule>
12264 +<rule break="no">
12265 +<beforebreak>\b[Ss]lov\.\s</beforebreak>
12266 +<afterbreak>\p{Ll}</afterbreak>
12267 +</rule>
12268 +<rule break="no">
12269 +<beforebreak>\bKr\.\s</beforebreak>
12270 +<afterbreak></afterbreak>
12271 +</rule>
12272 +<rule break="no">
12273 +<beforebreak>\bp\.n\.l\.\s</beforebreak>
12274 +<afterbreak>[^\p{Lu}]</afterbreak>
12275 +</rule>
12276 +<rule break="no">
12277 +<beforebreak>\b[Jj]r\.\s</beforebreak>
12278 +<afterbreak></afterbreak>
12279 +</rule>
12280 +<rule break="no">
12281 +<beforebreak>\b(P\.\s?S|p\.\s?s|P\.\s?s)\.\s</beforebreak>
12282 +<afterbreak></afterbreak>
12283 +</rule>
12284 +<rule break="no">
12285 +<beforebreak>\b\d+\.\s</beforebreak>
12286 +<afterbreak>\p{Ll}|\p{Lu}{2,}</afterbreak>
12287 +</rule>
12288 +<rule break="no">
12289 +<beforebreak>\p{Ps}[!?]+\p{Pe} </beforebreak>
12290 +<afterbreak></afterbreak>
12291 +</rule>
12292 +<rule break="no">
12293 +<beforebreak>[\[\(]*…[\]\)]* </beforebreak>
12294 +<afterbreak>\p{Ll}</afterbreak>
12295 +</rule>
12296 +<rule break="no">
12297 +<beforebreak>[\.!?…]+\p{Pe} </beforebreak>
12298 +<afterbreak>\p{Ll}</afterbreak>
12299 +</rule>
12300 +<rule break="no">
12301 +<beforebreak>["”']\s*</beforebreak>
12302 +<afterbreak>\s*\p{Ll}</afterbreak>
12303 +</rule>
12304 +<rule break="no">
12305 +<beforebreak>['"„][\.!?…]['"”]\s</beforebreak>
12306 +<afterbreak></afterbreak>
12307 +</rule>
12308 +<rule break="no">
12309 +<beforebreak>\b\p{L}\.\s</beforebreak>
12310 +<afterbreak>\p{L}\.\s</afterbreak>
12311 +</rule>
12312 +<rule break="no">
12313 +<beforebreak>\b\p{L}\.</beforebreak>
12314 +<afterbreak>\p{L}\.</afterbreak>
12315 +</rule>
12316 +<rule break="no">
12317 +<beforebreak>[\.\s]\p{L}{1,2}\.\s</beforebreak>
12318 +<afterbreak>[\p{N}\p{Ll}]</afterbreak>
12319 +</rule>
12320 +<rule break="no">
12321 +<beforebreak>[\[\(]*\.\.\.[\]\)]* </beforebreak>
12322 +<afterbreak>[^\p{Lu}]</afterbreak>
12323 +</rule>
12324 +<rule break="no">
12325 +<beforebreak>\b\p{Lu}\.\s\p{Lu}\.\s</beforebreak>
12326 +<afterbreak></afterbreak>
12327 +</rule>
12328 +<rule break="no">
12329 +<beforebreak>\b\p{Lu}\.\p{Lu}\.\s</beforebreak>
12330 +<afterbreak></afterbreak>
12331 +</rule>
12332 +<rule break="no">
12333 +<beforebreak>[^\.]\s[A-Z]\.\s</beforebreak>
12334 +<afterbreak></afterbreak>
12335 +</rule>
12336 +<rule break="no">
12337 +<beforebreak>\b\p{Lu}\p{Ll}\.\s?</beforebreak>
12338 +<afterbreak>\p{Lu}[^\p{Lu}]</afterbreak>
12339 +</rule>
12340 +<rule break="no">
12341 +<beforebreak>[\.\s]\p{L}{1,2}\.\s</beforebreak>
12342 +<afterbreak>[\p{N}\p{Ll}]</afterbreak>
12343 +</rule>
12344 +<rule break="yes">
12345 +<beforebreak>[\.!?…][\u00BB\u2019\u201D\u203A"'\p{Pe}\u0002]*\s</beforebreak>
12346 +<afterbreak></afterbreak>
12347 +</rule>
12348 +<rule break="yes">
12349 +<beforebreak>[\.!?…]['"\u00BB\u2019\u201D\u203A\p{Pe}\u0002]*</beforebreak>
12350 +<afterbreak>\p{Lu}[^\p{Lu}]</afterbreak>
12351 +</rule>
12352 +<rule break="yes">
12353 +<beforebreak>\s\p{L}[\.!?…]\s</beforebreak>
12354 +<afterbreak>\p{Lu}\p{Ll}</afterbreak>
12355 +</rule>
12356 +</languagerule>
12357 +<languagerule languagerulename="Icelandic">
12358 +<!-- Numbers -->
12359 +<rule break="no">
12360 +<beforebreak>\b[nN]o\.\s</beforebreak>
12361 +<afterbreak>\p{N}</afterbreak>
12362 +</rule>
12363 +<rule break="no">
12364 +<beforebreak>\b[nN][rR]\.\s</beforebreak>
12365 +<afterbreak>\p{N}</afterbreak>
12366 +</rule>
12367 +<!-- Date/time stuff  -->
12368 +<rule break="no">
12369 +<beforebreak>\b\p{N}+\.\s</beforebreak>
12370 +<afterbreak>\b(janúar|febrúar|mars|apríl|maí|júní|júlí|ágúst|september|október|nóvember|desember)</afterbreak>
12371 +</rule>
12372 +<rule break="no">
12373 +<beforebreak>\b\p{N}+\.\s</beforebreak>
12374 +<afterbreak>\b(jan|feb|mar|apr|maí|jún|júl|ágú|sep|sept|okt|nóv|des)</afterbreak>
12375 +</rule>
12376 +<!-- (final) single char abbreviations x. xxx. xx.x. but not 'íáóæ' -->
12377 +<rule break="no">
12378 +<beforebreak>\b[a-z[^íáóæ]]\.\s</beforebreak>
12379 +<afterbreak></afterbreak>
12380 +</rule>
12381 +<rule break="no">
12382 +<beforebreak>\b\p{L}\.</beforebreak>
12383 +<afterbreak>\p{L}\.</afterbreak>
12384 +</rule>
12385 +<!-- Misc A  -->
12386 +<rule break="no">
12387 +<beforebreak>\bab\.fn\.\s</beforebreak>
12388 +<afterbreak></afterbreak>
12389 +</rule>
12390 +<rule break="no">
12391 +<beforebreak>\ba\.fn\.\s</beforebreak>
12392 +<afterbreak></afterbreak>
12393 +</rule>
12394 +<rule break="no">
12395 +<beforebreak>\bafs\.\s</beforebreak>
12396 +<afterbreak></afterbreak>
12397 +</rule>
12398 +<rule break="no">
12399 +<beforebreak>\bal\.\s</beforebreak>
12400 +<afterbreak></afterbreak>
12401 +</rule>
12402 +<rule break="no">
12403 +<beforebreak>\balm\.\s</beforebreak>
12404 +<afterbreak></afterbreak>
12405 +</rule>
12406 +<rule break="no">
12407 +<beforebreak>\balg\.\s</beforebreak>
12408 +<afterbreak></afterbreak>
12409 +</rule>
12410 +<rule break="no">
12411 +<beforebreak>\bandh\.\s</beforebreak>
12412 +<afterbreak></afterbreak>
12413 +</rule>
12414 +<rule break="no">
12415 +<beforebreak>\bath\.\s</beforebreak>
12416 +<afterbreak></afterbreak>
12417 +</rule>
12418 +<rule break="no">
12419 +<beforebreak>\baths\.\s</beforebreak>
12420 +<afterbreak></afterbreak>
12421 +</rule>
12422 +<rule break="no">
12423 +<beforebreak>\batr\.\s</beforebreak>
12424 +<afterbreak></afterbreak>
12425 +</rule>
12426 +<rule break="no">
12427 +<beforebreak>\bao\.\s</beforebreak>
12428 +<afterbreak></afterbreak>
12429 +</rule>
12430 +<rule break="no">
12431 +<beforebreak>\bau\.\s</beforebreak>
12432 +<afterbreak></afterbreak>
12433 +</rule>
12434 +<rule break="no">
12435 +<beforebreak>\baukaf\.\s</beforebreak>
12436 +<afterbreak></afterbreak>
12437 +</rule>
12438 +<!-- Misc Á -->
12439 +<rule break="no">
12440 +<beforebreak>\báfn\.\s</beforebreak>
12441 +<afterbreak></afterbreak>
12442 +</rule>
12443 +<rule break="no">
12444 +<beforebreak>\báhrl\.s\.\s</beforebreak>
12445 +<afterbreak></afterbreak>
12446 +</rule>
12447 +<rule break="no">
12448 +<beforebreak>\báhrs\.\s</beforebreak>
12449 +<afterbreak></afterbreak>
12450 +</rule>
12451 +<rule break="no">
12452 +<beforebreak>\bákv\.gr\.\s</beforebreak>
12453 +<afterbreak></afterbreak>
12454 +</rule>
12455 +<rule break="no">
12456 +<beforebreak>\bákv\.\s</beforebreak>
12457 +<afterbreak></afterbreak>
12458 +</rule>
12459 +<!-- Misc B -->
12460 +<rule break="no">
12461 +<beforebreak>\bbh\.\s</beforebreak>
12462 +<afterbreak></afterbreak>
12463 +</rule>
12464 +<rule break="no">
12465 +<beforebreak>\bbls\.\s</beforebreak>
12466 +<afterbreak></afterbreak>
12467 +</rule>
12468 +<!-- Misc D -->
12469 +<rule break="no">
12470 +<beforebreak>\bdr\.\s</beforebreak>
12471 +<afterbreak></afterbreak>
12472 +</rule>
12473 +<!-- Misc E -->
12474 +<rule break="no">
12475 +<beforebreak>\be\.Kr\.\s</beforebreak>
12476 +<afterbreak></afterbreak>
12477 +</rule>
12478 +<rule break="no">
12479 +<beforebreak>\bet\.\s</beforebreak>
12480 +<afterbreak></afterbreak>
12481 +</rule>
12482 +<rule break="no">
12483 +<beforebreak>\bef\.\s</beforebreak>
12484 +<afterbreak></afterbreak>
12485 +</rule>
12486 +<rule break="no">
12487 +<beforebreak>\befn\.\s</beforebreak>
12488 +<afterbreak></afterbreak>
12489 +</rule>
12490 +<rule break="no">
12491 +<beforebreak>\bennfr\.\s</beforebreak>
12492 +<afterbreak></afterbreak>
12493 +</rule>
12494 +<rule break="no">
12495 +<beforebreak>\beink\.\s</beforebreak>
12496 +<afterbreak></afterbreak>
12497 +</rule>
12498 +<rule break="no">
12499 +<beforebreak>\bend\.\s</beforebreak>
12500 +<afterbreak></afterbreak>
12501 +</rule>
12502 +<rule break="no">
12503 +<beforebreak>\be\.st\.\s</beforebreak>
12504 +<afterbreak></afterbreak>
12505 +</rule>
12506 +<rule break="no">
12507 +<beforebreak>\berl\.\s</beforebreak>
12508 +<afterbreak></afterbreak>
12509 +</rule>
12510 +<!-- Misc F -->
12511 +<rule break="no">
12512 +<beforebreak>\bfél\.\s</beforebreak>
12513 +<afterbreak></afterbreak>
12514 +</rule>
12515 +<rule break="no">
12516 +<beforebreak>\bfskj\.\s</beforebreak>
12517 +<afterbreak></afterbreak>
12518 +</rule>
12519 +<rule break="no">
12520 +<beforebreak>\bfh\.\s</beforebreak>
12521 +<afterbreak></afterbreak>
12522 +</rule>
12523 +<rule break="no">
12524 +<beforebreak>\bf\.hl\.\s</beforebreak>
12525 +<afterbreak></afterbreak>
12526 +</rule>
12527 +<rule break="no">
12528 +<beforebreak>\bfísl\.\s</beforebreak>
12529 +<afterbreak></afterbreak>
12530 +</rule>
12531 +<rule break="no">
12532 +<beforebreak>\b[A-ZÁ-Þ][a-zá-þ]+fj\.\s</beforebreak>
12533 +<afterbreak></afterbreak>
12534 +</rule>
12535 +<rule break="no">
12536 +<beforebreak>\bfl\.\s</beforebreak>
12537 +<afterbreak></afterbreak>
12538 +</rule>
12539 +<rule break="no">
12540 +<beforebreak>\bfn\.\s</beforebreak>
12541 +<afterbreak></afterbreak>
12542 +</rule>
12543 +<rule break="no">
12544 +<beforebreak>\bfo\.\s</beforebreak>
12545 +<afterbreak></afterbreak>
12546 +</rule>
12547 +<rule break="no">
12548 +<beforebreak>\bforl\.\s</beforebreak>
12549 +<afterbreak></afterbreak>
12550 +</rule>
12551 +<rule break="no">
12552 +<beforebreak>\bfrb\.\s</beforebreak>
12553 +<afterbreak></afterbreak>
12554 +</rule>
12555 +<rule break="no">
12556 +<beforebreak>\bfrl\.\s</beforebreak>
12557 +<afterbreak></afterbreak>
12558 +</rule>
12559 +<rule break="no">
12560 +<beforebreak>\bfrh\.\s</beforebreak>
12561 +<afterbreak></afterbreak>
12562 +</rule>
12563 +<rule break="no">
12564 +<beforebreak>\bfrt\.\s</beforebreak>
12565 +<afterbreak></afterbreak>
12566 +</rule>
12567 +<rule break="no">
12568 +<beforebreak>\bfsl\.\s</beforebreak>
12569 +<afterbreak></afterbreak>
12570 +</rule>
12571 +<rule break="no">
12572 +<beforebreak>\bfsh\.\s</beforebreak>
12573 +<afterbreak></afterbreak>
12574 +</rule>
12575 +<rule break="no">
12576 +<beforebreak>\bfs\.\s</beforebreak>
12577 +<afterbreak></afterbreak>
12578 +</rule>
12579 +<rule break="no">
12580 +<beforebreak>\bfsk\.\s</beforebreak>
12581 +<afterbreak></afterbreak>
12582 +</rule>
12583 +<rule break="no">
12584 +<beforebreak>\bfst\.\s</beforebreak>
12585 +<afterbreak></afterbreak>
12586 +</rule>
12587 +<rule break="no">
12588 +<beforebreak>\bf\.Kr\.\s</beforebreak>
12589 +<afterbreak></afterbreak>
12590 +</rule>
12591 +<rule break="no">
12592 +<beforebreak>\bft\.\s</beforebreak>
12593 +<afterbreak></afterbreak>
12594 +</rule>
12595 +<rule break="no">
12596 +<beforebreak>\bfv\.\s</beforebreak>
12597 +<afterbreak></afterbreak>
12598 +</rule>
12599 +<rule break="no">
12600 +<beforebreak>\bfyrrn\.\s</beforebreak>
12601 +<afterbreak></afterbreak>
12602 +</rule>
12603 +<rule break="no">
12604 +<beforebreak>\bfyrrv\.\s</beforebreak>
12605 +<afterbreak></afterbreak>
12606 +</rule>
12607 +<!-- Misc G -->
12608 +<rule break="no">
12609 +<beforebreak>\bgerm\.\s</beforebreak>
12610 +<afterbreak></afterbreak>
12611 +</rule>
12612 +<rule break="no">
12613 +<beforebreak>\bgm\.\s</beforebreak>
12614 +<afterbreak></afterbreak>
12615 +</rule>
12616 +<rule break="no">
12617 +<beforebreak>\bgr\.\s</beforebreak>
12618 +<afterbreak></afterbreak>
12619 +</rule>
12620 +<!-- Misc H -->
12621 +<rule break="no">
12622 +<beforebreak>\bhdl\.\s</beforebreak>
12623 +<afterbreak></afterbreak>
12624 +</rule>
12625 +<rule break="no">
12626 +<beforebreak>\bhdr\.\s</beforebreak>
12627 +<afterbreak></afterbreak>
12628 +</rule>
12629 +<rule break="no">
12630 +<beforebreak>\bhf\.\s</beforebreak>
12631 +<afterbreak></afterbreak>
12632 +</rule>
12633 +<rule break="no">
12634 +<beforebreak>\bhl\.\s</beforebreak>
12635 +<afterbreak></afterbreak>
12636 +</rule>
12637 +<rule break="no">
12638 +<beforebreak>\bhlsk\.\s</beforebreak>
12639 +<afterbreak></afterbreak>
12640 +</rule>
12641 +<rule break="no">
12642 +<beforebreak>\bhljsk\.\s</beforebreak>
12643 +<afterbreak></afterbreak>
12644 +</rule>
12645 +<rule break="no">
12646 +<beforebreak>\bhljv\.\s</beforebreak>
12647 +<afterbreak></afterbreak>
12648 +</rule>
12649 +<rule break="no">
12650 +<beforebreak>\bhljóðv\.\s</beforebreak>
12651 +<afterbreak></afterbreak>
12652 +</rule>
12653 +<rule break="no">
12654 +<beforebreak>\bhr\.\s</beforebreak>
12655 +<afterbreak></afterbreak>
12656 +</rule>
12657 +<rule break="no">
12658 +<beforebreak>\b[A-ZÁ-Þ][a-zá-þ]+hr\.\s</beforebreak>
12659 +<afterbreak></afterbreak>
12660 +</rule>
12661 +<rule break="no">
12662 +<beforebreak>\bhv\.\s</beforebreak>
12663 +<afterbreak></afterbreak>
12664 +</rule>
12665 +<rule break="no">
12666 +<beforebreak>\bhvk\.\s</beforebreak>
12667 +<afterbreak></afterbreak>
12668 +</rule>
12669 +<rule break="no">
12670 +<beforebreak>\bholl\.\s</beforebreak>
12671 +<afterbreak></afterbreak>
12672 +</rule>
12673 +<rule break="no">
12674 +<beforebreak>\bHos\.\s</beforebreak>
12675 +<afterbreak></afterbreak>
12676 +</rule>
12677 +<rule break="no">
12678 +<beforebreak>\bhöf\.\s</beforebreak>
12679 +<afterbreak></afterbreak>
12680 +</rule>
12681 +<rule break="no">
12682 +<beforebreak>\bhk\.\s</beforebreak>
12683 +<afterbreak></afterbreak>
12684 +</rule>
12685 +<rule break="no">
12686 +<beforebreak>\bhrl\.\s</beforebreak>
12687 +<afterbreak></afterbreak>
12688 +</rule>
12689 +<!-- Misc Í -->
12690 +<rule break="no">
12691 +<beforebreak>\bísl\.\s</beforebreak>
12692 +<afterbreak></afterbreak>
12693 +</rule>
12694 +<!-- Misc K -->
12695 +<rule break="no">
12696 +<beforebreak>\bkaf\.\s</beforebreak>
12697 +<afterbreak></afterbreak>
12698 +</rule>
12699 +<rule break="no">
12700 +<beforebreak>\bkap\.\s</beforebreak>
12701 +<afterbreak></afterbreak>
12702 +</rule>
12703 +<rule break="no">
12704 +<beforebreak>\bKhöfn\.\s</beforebreak>
12705 +<afterbreak></afterbreak>
12706 +</rule>
12707 +<rule break="no">
12708 +<beforebreak>\bkk\.\s</beforebreak>
12709 +<afterbreak></afterbreak>
12710 +</rule>
12711 +<rule break="no">
12712 +<beforebreak>\bkg\.\s</beforebreak>
12713 +<afterbreak></afterbreak>
12714 +</rule>
12715 +<rule break="no">
12716 +<beforebreak>\bkk\.\s</beforebreak>
12717 +<afterbreak></afterbreak>
12718 +</rule>
12719 +<rule break="no">
12720 +<beforebreak>\bkm\.\s</beforebreak>
12721 +<afterbreak></afterbreak>
12722 +</rule>
12723 +<rule break="no">
12724 +<beforebreak>\bkl\.\s</beforebreak>
12725 +<afterbreak></afterbreak>
12726 +</rule>
12727 +<rule break="no">
12728 +<beforebreak>\bklst\.\s</beforebreak>
12729 +<afterbreak></afterbreak>
12730 +</rule>
12731 +<rule break="no">
12732 +<beforebreak>\bkr\.\s</beforebreak>
12733 +<afterbreak></afterbreak>
12734 +</rule>
12735 +<rule break="no">
12736 +<beforebreak>\bkt\.\s</beforebreak>
12737 +<afterbreak></afterbreak>
12738 +</rule>
12739 +<rule break="no">
12740 +<beforebreak>\bkgúrsk\.\s</beforebreak>
12741 +<afterbreak></afterbreak>
12742 +</rule>
12743 +<rule break="no">
12744 +<beforebreak>\bkvk\.\s</beforebreak>
12745 +<afterbreak></afterbreak>
12746 +</rule>
12747 +<!-- Misc L -->
12748 +<rule break="no">
12749 +<beforebreak>\bleturbr\.\s</beforebreak>
12750 +<afterbreak></afterbreak>
12751 +</rule>
12752 +<rule break="no">
12753 +<beforebreak>\blh\.\s</beforebreak>
12754 +<afterbreak></afterbreak>
12755 +</rule>
12756 +<rule break="no">
12757 +<beforebreak>\blh\.nt\.\s</beforebreak>
12758 +<afterbreak></afterbreak>
12759 +</rule>
12760 +<rule break="no">
12761 +<beforebreak>\blh\.þt\.\s</beforebreak>
12762 +<afterbreak></afterbreak>
12763 +</rule>
12764 +<rule break="no">
12765 +<beforebreak>\blo\.\s</beforebreak>
12766 +<afterbreak></afterbreak>
12767 +</rule>
12768 +<rule break="no">
12769 +<beforebreak>\bltr\.\s</beforebreak>
12770 +<afterbreak></afterbreak>
12771 +</rule>
12772 +<!-- Misc M -->
12773 +<rule break="no">
12774 +<beforebreak>\bmlja\.\s</beforebreak>
12775 +<afterbreak></afterbreak>
12776 +</rule>
12777 +<rule break="no">
12778 +<beforebreak>\bmljó\.\s</beforebreak>
12779 +<afterbreak></afterbreak>
12780 +</rule>
12781 +<rule break="no">
12782 +<beforebreak>\bmillj\.\s</beforebreak>
12783 +<afterbreak></afterbreak>
12784 +</rule>
12785 +<rule break="no">
12786 +<beforebreak>\bmm\.\s</beforebreak>
12787 +<afterbreak></afterbreak>
12788 +</rule>
12789 +<rule break="no">
12790 +<beforebreak>\bmms\.\s</beforebreak>
12791 +<afterbreak></afterbreak>
12792 +</rule>
12793 +<rule break="no">
12794 +<beforebreak>\bm\.fl\.\s</beforebreak>
12795 +<afterbreak></afterbreak>
12796 +</rule>
12797 +<rule break="no">
12798 +<beforebreak>\bmiðm\.\s</beforebreak>
12799 +<afterbreak></afterbreak>
12800 +</rule>
12801 +<rule break="no">
12802 +<beforebreak>\bmgr\.\s</beforebreak>
12803 +<afterbreak></afterbreak>
12804 +</rule>
12805 +<rule break="no">
12806 +<beforebreak>\bmst\.\s</beforebreak>
12807 +<afterbreak></afterbreak>
12808 +</rule>
12809 +<rule break="no">
12810 +<beforebreak>\bmín\.\s</beforebreak>
12811 +<afterbreak></afterbreak>
12812 +</rule>
12813 +<!-- Misc N -->
12814 +<rule break="no">
12815 +<beforebreak>\bnf\.\s</beforebreak>
12816 +<afterbreak></afterbreak>
12817 +</rule>
12818 +<rule break="no">
12819 +<beforebreak>\bnh\.\s</beforebreak>
12820 +<afterbreak></afterbreak>
12821 +</rule>
12822 +<rule break="no">
12823 +<beforebreak>\bnhm\.\s</beforebreak>
12824 +<afterbreak></afterbreak>
12825 +</rule>
12826 +<rule break="no">
12827 +<beforebreak>\bnl\.\s</beforebreak>
12828 +<afterbreak></afterbreak>
12829 +</rule>
12830 +<rule break="no">
12831 +<beforebreak>\bnk\.\s</beforebreak>
12832 +<afterbreak></afterbreak>
12833 +</rule>
12834 +<rule break="no">
12835 +<beforebreak>\bnmgr\.\s</beforebreak>
12836 +<afterbreak></afterbreak>
12837 +</rule>
12838 +<rule break="no">
12839 +<beforebreak>\bno\.\s</beforebreak>
12840 +<afterbreak></afterbreak>
12841 +</rule>
12842 +<rule break="no">
12843 +<beforebreak>\bnúv\.\s</beforebreak>
12844 +<afterbreak></afterbreak>
12845 +</rule>
12846 +<rule break="no">
12847 +<beforebreak>\bnt\.\s</beforebreak>
12848 +<afterbreak></afterbreak>
12849 +</rule>
12850 +<!-- Misc O -->
12851 +<rule break="no">
12852 +<beforebreak>\bo\.áfr\.\s</beforebreak>
12853 +<afterbreak></afterbreak>
12854 +</rule>
12855 +<rule break="no">
12856 +<beforebreak>\bo\.m\.fl\.\s</beforebreak>
12857 +<afterbreak></afterbreak>
12858 +</rule>
12859 +<rule break="no">
12860 +<beforebreak>\bohf\.\s</beforebreak>
12861 +<afterbreak></afterbreak>
12862 +</rule>
12863 +<rule break="no">
12864 +<beforebreak>\bo\.fl\.\s</beforebreak>
12865 +<afterbreak></afterbreak>
12866 +</rule>
12867 +<rule break="no">
12868 +<beforebreak>\bo\.s\.frv\.\s</beforebreak>
12869 +<afterbreak></afterbreak>
12870 +</rule>
12871 +<!-- Misc Ó -->
12872 +<rule break="no">
12873 +<beforebreak>\bófn\.\s</beforebreak>
12874 +<afterbreak></afterbreak>
12875 +</rule>
12876 +<rule break="no">
12877 +<beforebreak>\bób\.\s</beforebreak>
12878 +<afterbreak></afterbreak>
12879 +</rule>
12880 +<rule break="no">
12881 +<beforebreak>\bóákv\.gr\.\s</beforebreak>
12882 +<afterbreak></afterbreak>
12883 +</rule>
12884 +<rule break="no">
12885 +<beforebreak>\bóákv\.\s</beforebreak>
12886 +<afterbreak></afterbreak>
12887 +</rule>
12888 +<!-- Misc P -->
12889 +<rule break="no">
12890 +<beforebreak>\bpfn\.\s</beforebreak>
12891 +<afterbreak></afterbreak>
12892 +</rule>
12893 +<rule break="no">
12894 +<beforebreak>\bPR\.\s</beforebreak>
12895 +<afterbreak></afterbreak>
12896 +</rule>
12897 +<rule break="no">
12898 +<beforebreak>\bpr\.\s</beforebreak>
12899 +<afterbreak></afterbreak>
12900 +</rule>
12901 +<!-- Misc R -->
12902 +<rule break="no">
12903 +<beforebreak>\bRitstj\.\s</beforebreak>
12904 +<afterbreak></afterbreak>
12905 +</rule>
12906 +<rule break="no">
12907 +<beforebreak>\bRvík\.\s</beforebreak>
12908 +<afterbreak></afterbreak>
12909 +</rule>
12910 +<rule break="no">
12911 +<beforebreak>\bRvk\.\s</beforebreak>
12912 +<afterbreak></afterbreak>
12913 +</rule>
12914 +<!-- Misc S -->
12915 +<rule break="no">
12916 +<beforebreak>\bsamb\.\s</beforebreak>
12917 +<afterbreak></afterbreak>
12918 +</rule>
12919 +<rule break="no">
12920 +<beforebreak>\bsamhlj\.\s</beforebreak>
12921 +<afterbreak></afterbreak>
12922 +</rule>
12923 +<rule break="no">
12924 +<beforebreak>\bsamn\.\s</beforebreak>
12925 +<afterbreak></afterbreak>
12926 +</rule>
12927 +<rule break="no">
12928 +<beforebreak>\bsamn\.\s</beforebreak>
12929 +<afterbreak></afterbreak>
12930 +</rule>
12931 +<rule break="no">
12932 +<beforebreak>\bsbr\.\s</beforebreak>
12933 +<afterbreak></afterbreak>
12934 +</rule>
12935 +<rule break="no">
12936 +<beforebreak>\bsek\.\s</beforebreak>
12937 +<afterbreak></afterbreak>
12938 +</rule>
12939 +<rule break="no">
12940 +<beforebreak>\bsérn\.\s</beforebreak>
12941 +<afterbreak></afterbreak>
12942 +</rule>
12943 +<rule break="no">
12944 +<beforebreak>\bsf\.\s</beforebreak>
12945 +<afterbreak></afterbreak>
12946 +</rule>
12947 +<rule break="no">
12948 +<beforebreak>\bsfn\.\s</beforebreak>
12949 +<afterbreak></afterbreak>
12950 +</rule>
12951 +<rule break="no">
12952 +<beforebreak>\bsh\.\s</beforebreak>
12953 +<afterbreak></afterbreak>
12954 +</rule>
12955 +<rule break="no">
12956 +<beforebreak>\bsfn\.\s</beforebreak>
12957 +<afterbreak></afterbreak>
12958 +</rule>
12959 +<rule break="no">
12960 +<beforebreak>\bsh\.\s</beforebreak>
12961 +<afterbreak></afterbreak>
12962 +</rule>
12963 +<rule break="no">
12964 +<beforebreak>\bs\.hl\.\s</beforebreak>
12965 +<afterbreak></afterbreak>
12966 +</rule>
12967 +<rule break="no">
12968 +<beforebreak>\bsk\.\s</beforebreak>
12969 +<afterbreak></afterbreak>
12970 +</rule>
12971 +<rule break="no">
12972 +<beforebreak>\bskv\.\s</beforebreak>
12973 +<afterbreak></afterbreak>
12974 +</rule>
12975 +<rule break="no">
12976 +<beforebreak>\bsl\.\s</beforebreak>
12977 +<afterbreak></afterbreak>
12978 +</rule>
12979 +<rule break="no">
12980 +<beforebreak>\bsn\.\s</beforebreak>
12981 +<afterbreak></afterbreak>
12982 +</rule>
12983 +<rule break="no">
12984 +<beforebreak>\bso\.\s</beforebreak>
12985 +<afterbreak></afterbreak>
12986 +</rule>
12987 +<rule break="no">
12988 +<beforebreak>\bss\.us\.\s</beforebreak>
12989 +<afterbreak></afterbreak>
12990 +</rule>
12991 +<rule break="no">
12992 +<beforebreak>\bs\.st\.\s</beforebreak>
12993 +<afterbreak></afterbreak>
12994 +</rule>
12995 +<rule break="no">
12996 +<beforebreak>\bsamþ\.\s</beforebreak>
12997 +<afterbreak></afterbreak>
12998 +</rule>
12999 +<rule break="no">
13000 +<beforebreak>\bsbr\.\s</beforebreak>
13001 +<afterbreak></afterbreak>
13002 +</rule>
13003 +<rule break="no">
13004 +<beforebreak>\bshlj\.\s</beforebreak>
13005 +<afterbreak></afterbreak>
13006 +</rule>
13007 +<rule break="no">
13008 +<beforebreak>\bsign\.\s</beforebreak>
13009 +<afterbreak></afterbreak>
13010 +</rule>
13011 +<rule break="no">
13012 +<beforebreak>\bskál\.\s</beforebreak>
13013 +<afterbreak></afterbreak>
13014 +</rule>
13015 +<rule break="no">
13016 +<beforebreak>\bst\.\s</beforebreak>
13017 +<afterbreak></afterbreak>
13018 +</rule>
13019 +<rule break="no">
13020 +<beforebreak>\bst\.s\.\s</beforebreak>
13021 +<afterbreak></afterbreak>
13022 +</rule>
13023 +<rule break="no">
13024 +<beforebreak>\bstk\.\s</beforebreak>
13025 +<afterbreak></afterbreak>
13026 +</rule>
13027 +<rule break="no">
13028 +<beforebreak>\bsþ\.\s</beforebreak>
13029 +<afterbreak></afterbreak>
13030 +</rule>
13031 +<!-- Misc T -->
13032 +<rule break="no">
13033 +<beforebreak>\bteg\.\s</beforebreak>
13034 +<afterbreak></afterbreak>
13035 +</rule>
13036 +<rule break="no">
13037 +<beforebreak>\btbl\.\s</beforebreak>
13038 +<afterbreak></afterbreak>
13039 +</rule>
13040 +<rule break="no">
13041 +<beforebreak>\btfn\.\s</beforebreak>
13042 +<afterbreak></afterbreak>
13043 +</rule>
13044 +<rule break="no">
13045 +<beforebreak>\btl\.\s</beforebreak>
13046 +<afterbreak></afterbreak>
13047 +</rule>
13048 +<rule break="no">
13049 +<beforebreak>\btvíhlj\.\s</beforebreak>
13050 +<afterbreak></afterbreak>
13051 +</rule>
13052 +<rule break="no">
13053 +<beforebreak>\btvt\.\s</beforebreak>
13054 +<afterbreak></afterbreak>
13055 +</rule>
13056 +<rule break="no">
13057 +<beforebreak>\btill\.\s</beforebreak>
13058 +<afterbreak></afterbreak>
13059 +</rule>
13060 +<rule break="no">
13061 +<beforebreak>\bto\.\s</beforebreak>
13062 +<afterbreak></afterbreak>
13063 +</rule>
13064 +<!-- Misc U -->
13065 +<rule break="no">
13066 +<beforebreak>\bumr\.\s</beforebreak>
13067 +<afterbreak></afterbreak>
13068 +</rule>
13069 +<rule break="no">
13070 +<beforebreak>\buh\.\s</beforebreak>
13071 +<afterbreak></afterbreak>
13072 +</rule>
13073 +<rule break="no">
13074 +<beforebreak>\bus\.\s</beforebreak>
13075 +<afterbreak></afterbreak>
13076 +</rule>
13077 +<rule break="no">
13078 +<beforebreak>\buppl\.\s</beforebreak>
13079 +<afterbreak></afterbreak>
13080 +</rule>
13081 +<!-- Misc Ú -->
13082 +<rule break="no">
13083 +<beforebreak>\bútg\.\s</beforebreak>
13084 +<afterbreak></afterbreak>
13085 +</rule>
13086 +<!-- Misc V -->
13087 +<rule break="no">
13088 +<beforebreak>\bvb\.\s</beforebreak>
13089 +<afterbreak></afterbreak>
13090 +</rule>
13091 +<rule break="no">
13092 +<beforebreak>\bVf\.\s</beforebreak>
13093 +<afterbreak></afterbreak>
13094 +</rule>
13095 +<rule break="no">
13096 +<beforebreak>\bvh\.\s</beforebreak>
13097 +<afterbreak></afterbreak>
13098 +</rule>
13099 +<rule break="no">
13100 +<beforebreak>\bvkf\.\s</beforebreak>
13101 +<afterbreak></afterbreak>
13102 +</rule>
13103 +<rule break="no">
13104 +<beforebreak>\bVl\.\s</beforebreak>
13105 +<afterbreak></afterbreak>
13106 +</rule>
13107 +<rule break="no">
13108 +<beforebreak>\bvl\.\s</beforebreak>
13109 +<afterbreak></afterbreak>
13110 +</rule>
13111 +<rule break="no">
13112 +<beforebreak>\bvlf\.\s</beforebreak>
13113 +<afterbreak></afterbreak>
13114 +</rule>
13115 +<rule break="no">
13116 +<beforebreak>\bvmf\.\s</beforebreak>
13117 +<afterbreak></afterbreak>
13118 +</rule>
13119 +<rule break="no">
13120 +<beforebreak>\b8vo\.\s</beforebreak>
13121 +<afterbreak></afterbreak>
13122 +</rule>
13123 +<rule break="no">
13124 +<beforebreak>\bvsk\.\s</beforebreak>
13125 +<afterbreak></afterbreak>
13126 +</rule>
13127 +<rule break="no">
13128 +<beforebreak>\bvth\.\s</beforebreak>
13129 +<afterbreak></afterbreak>
13130 +</rule>
13131 +<!-- Misc Þ -->
13132 +<rule break="no">
13133 +<beforebreak>\bþt\.\s</beforebreak>
13134 +<afterbreak></afterbreak>
13135 +</rule>
13136 +<rule break="no">
13137 +<beforebreak>\bþf\.\s</beforebreak>
13138 +<afterbreak></afterbreak>
13139 +</rule>
13140 +<rule break="no">
13141 +<beforebreak>\bþjs\.\s</beforebreak>
13142 +<afterbreak></afterbreak>
13143 +</rule>
13144 +<rule break="no">
13145 +<beforebreak>\bþgf\.\s</beforebreak>
13146 +<afterbreak></afterbreak>
13147 +</rule>
13148 +<rule break="no">
13149 +<beforebreak>\bþlt\.\s</beforebreak>
13150 +<afterbreak></afterbreak>
13151 +</rule>
13152 +<rule break="no">
13153 +<beforebreak>\bþolm\.\s</beforebreak>
13154 +<afterbreak></afterbreak>
13155 +</rule>
13156 +<rule break="no">
13157 +<beforebreak>\bþm\.\s</beforebreak>
13158 +<afterbreak></afterbreak>
13159 +</rule>
13160 +<rule break="no">
13161 +<beforebreak>\bþml\.\s</beforebreak>
13162 +<afterbreak></afterbreak>
13163 +</rule>
13164 +<rule break="no">
13165 +<beforebreak>\bþýð\.\s</beforebreak>
13166 +<afterbreak></afterbreak>
13167 +</rule>
13168 +<!-- Yes breaks -->
13169 +<rule break="yes">
13170 +<beforebreak>[\.!?…][\u00BB\u2019\u201D\u203A"'\p{Pe}\u0002]*\s</beforebreak>
13171 +<afterbreak></afterbreak>
13172 +</rule>
13173 +<rule break="yes">
13174 +<beforebreak>[\.!?…]['"\u00BB\u2019\u201D\u203A\p{Pe}\u0002]*</beforebreak>
13175 +<afterbreak>\p{Lu}[^\p{Lu}]</afterbreak>
13176 +</rule>
13177 +<rule break="yes">
13178 +<beforebreak>\s\p{L}[\.!?…]\s</beforebreak>
13179 +<afterbreak>\p{Lu}\p{Ll}</afterbreak>
13180 +</rule>
13181 +</languagerule>
13182 +<languagerule languagerulename="Russian">
13183 +<rule break="no">
13184 +<beforebreak>\b\d+\.\s</beforebreak>
13185 +<afterbreak>\p{Ll}|\p{Lu}{2,}</afterbreak>
13186 +</rule>
13187 +<!-- capital char abbreviations А. Б. В. -->
13188 +<rule break="no">
13189 +<beforebreak>\b[А-Я]\.\s</beforebreak>
13190 +<afterbreak></afterbreak>
13191 +</rule>
13192 +<rule break="no">
13193 +<beforebreak>\b[A-Z]\.\s</beforebreak>
13194 +<afterbreak></afterbreak>
13195 +</rule>
13196 +<rule break="no">
13197 +<beforebreak>\b\p{L}\.</beforebreak>
13198 +<afterbreak>\p{L}\.</afterbreak>
13199 +</rule>
13200 +<!-- date/time -->
13201 +<rule break="no">
13202 +<beforebreak>\b[0-9]+(гг|г)\.\s</beforebreak>
13203 +<afterbreak></afterbreak>
13204 +</rule>
13205 +<rule break="no">
13206 +<beforebreak>\b[XVILMC]+(в|вв)\.\s</beforebreak>
13207 +<afterbreak></afterbreak>
13208 +</rule>
13209 +<rule break="no">
13210 +<beforebreak>\b[0-9]+(\.|:)[0-9][0-9]\s</beforebreak>
13211 +<afterbreak></afterbreak>
13212 +</rule>
13213 +<rule break="no">
13214 +<beforebreak>\b[0-9]+(\.|:)[0-9][0-9](\.|:)[0-9][0-9]\s</beforebreak>
13215 +<afterbreak></afterbreak>
13216 +</rule>
13217 +<!--Measures  -->
13218 +<rule break="no">
13219 +<beforebreak>\b[0-9]+(м|мм|см|дм|л|км|га|кг|т|г|мг)\.\s</beforebreak>
13220 +<afterbreak></afterbreak>
13221 +</rule>
13222 +<!-- other abbreviations  -->
13223 +<rule break="no">
13224 +<beforebreak>\b(бульв|в|вв|г|га|гг|гл|гос|грн|д|дм|доп|др|е|ед|ед|зам|Зам|и|инд|исп|Исп)\.\s</beforebreak>
13225 +<afterbreak></afterbreak>
13226 +</rule>
13227 +<rule break="no">
13228 +<beforebreak>\b(к|кап|кг|кв|кл|км|кол|комн|коп|куб|л|лиц|лл|м|макс|мг|мин|мл|млн|Млн|млрд|Млрд|мм)\.\s</beforebreak>
13229 +<afterbreak></afterbreak>
13230 +</rule>
13231 +<rule break="no">
13232 +<beforebreak>\b(н|наб|нач|неуд|ном|о|обл|обр|общ|ок|ост|отл|п|пер|Пер|перераб|пл|пос|пр|просп|Просп|проф|Проф)\.\s</beforebreak>
13233 +<afterbreak></afterbreak>
13234 +</rule>
13235 +<rule break="no">
13236 +<beforebreak>\b(р|ред|руб|Руб|с|сб|св|см|См|соч|ср|ст|стр|т|тел|Тел|тех|тт|туп|тыс|Тыс)\.\s</beforebreak>
13237 +<afterbreak></afterbreak>
13238 +</rule>
13239 +<rule break="no">
13240 +<beforebreak>\b(уд|ул|уч|физ|х|хор|ч|чел|шт|экз|э)\.\s</beforebreak>
13241 +<afterbreak></afterbreak>
13242 +</rule>
13243 +<rule break="no">
13244 +<beforebreak>['"„“][\.!?…]['"”]\s</beforebreak>
13245 +<afterbreak></afterbreak>
13246 +</rule>
13247 +<rule break="no">
13248 +<beforebreak>[\u00AB][\.!?…][\u00BB]\s</beforebreak>
13249 +<afterbreak></afterbreak>
13250 +</rule>
13251 +<rule break="no">
13252 +<beforebreak>[\[\(]*\.\.\.[\]\)]* </beforebreak>
13253 +<afterbreak>\p{Ll}</afterbreak>
13254 +</rule>
13255 +<rule break="no">
13256 +<beforebreak>[\[\(]*…[\]\)]* </beforebreak>
13257 +<afterbreak>\p{Ll}</afterbreak>
13258 +</rule>
13259 +<rule break="no">
13260 +<beforebreak>["”'\u00BB]\s*</beforebreak>
13261 +<afterbreak>\s*\p{Ll}</afterbreak>
13262 +</rule>
13263 +<!-- break  -->
13264 +<rule break="yes">
13265 +<beforebreak>[\.!?…]['"\u00BB\u2019\u201D\u203A\u0002]*\s</beforebreak>
13266 +<afterbreak></afterbreak>
13267 +</rule>
13268 +<rule break="yes">
13269 +<beforebreak>\u005D\u005D\s</beforebreak>
13270 +<afterbreak></afterbreak>
13271 +</rule>
13272 +<rule break="yes">
13273 +<beforebreak>[\.!?…]['»"”\p{Pe}]*</beforebreak>
13274 +<afterbreak>\p{Lu}[^\p{Lu}]</afterbreak>
13275 +</rule>
13276 +<rule break="yes">
13277 +<beforebreak>\s\p{L}[\.!?…]\s</beforebreak>
13278 +<afterbreak>\p{Lu}\p{Ll}</afterbreak>
13279 +</rule>
13280 +</languagerule>
13281 +<languagerule languagerulename="Default">
13282 +<rule break="yes">
13283 +<beforebreak>\u2029</beforebreak>
13284 +<afterbreak></afterbreak>
13285 +</rule>
13286 +<!--for smooth interoperability with Anaphraseus translation plugin for OpenOffice.org-->
13287 +<rule break="yes">
13288 +<beforebreak></beforebreak>
13289 +<afterbreak>&lt;0\}</afterbreak>
13290 +</rule>
13291 +<!--Anaphraseus segment start marker-->
13292 +<rule break="yes">
13293 +<beforebreak>\{0></beforebreak>
13294 +<afterbreak></afterbreak>
13295 +</rule>
13296 +</languagerule>
13297 +<languagerule languagerulename="ByLineBreak">
13298 +<rule break="yes">
13299 +<beforebreak>\r?\n</beforebreak>
13300 +<afterbreak></afterbreak>
13301 +</rule>
13302 +</languagerule>
13303 +<languagerule languagerulename="ByTwoLineBreaks">
13304 +<rule break="yes">
13305 +<beforebreak>\r?\n\s*\r?\n[\t]*</beforebreak>
13306 +<afterbreak></afterbreak>
13307 +</rule>
13308 +</languagerule>
13309 +<languagerule languagerulename="Slovenian">
13310 +<rule break="no">
13311 +<beforebreak>\b[dD]r\.\s</beforebreak>
13312 +<afterbreak></afterbreak>
13313 +</rule>
13314 +<rule break="no">
13315 +<beforebreak>\bitd\.\s</beforebreak>
13316 +<afterbreak></afterbreak>
13317 +</rule>
13318 +<rule break="no">
13319 +<beforebreak>\bitn\.\s</beforebreak>
13320 +<afterbreak></afterbreak>
13321 +</rule>
13322 +<rule break="no">
13323 +<beforebreak>\b[šŠ]t\.\s</beforebreak>
13324 +<afterbreak>\p{N}</afterbreak>
13325 +</rule>
13326 +<rule break="no">
13327 +<beforebreak>[\[\(]*\.\.\.[\]\)]* </beforebreak>
13328 +<afterbreak>\p{Ll}</afterbreak>
13329 +</rule>
13330 +<rule break="no">
13331 +<beforebreak>[\[\(]*…[\]\)]* </beforebreak>
13332 +<afterbreak>\p{Ll}</afterbreak>
13333 +</rule>
13334 +<rule break="no">
13335 +<beforebreak>['"„][\.!?…]['"”]\s</beforebreak>
13336 +<afterbreak></afterbreak>
13337 +</rule>
13338 +<rule break="no">
13339 +<beforebreak>\bd\.\s</beforebreak>
13340 +<afterbreak></afterbreak>
13341 +</rule>
13342 +<rule break="no">
13343 +<beforebreak>\b[jJ]an\.\s</beforebreak>
13344 +<afterbreak></afterbreak>
13345 +</rule>
13346 +<rule break="no">
13347 +<beforebreak>\b[fF]eb\.\s</beforebreak>
13348 +<afterbreak></afterbreak>
13349 +</rule>
13350 +<rule break="no">
13351 +<beforebreak>\b[mM]ar\.\s</beforebreak>
13352 +<afterbreak></afterbreak>
13353 +</rule>
13354 +<rule break="no">
13355 +<beforebreak>\b[aA]pr\.\s</beforebreak>
13356 +<afterbreak></afterbreak>
13357 +</rule>
13358 +<rule break="no">
13359 +<beforebreak>\b[jJ]un\.\s</beforebreak>
13360 +<afterbreak></afterbreak>
13361 +</rule>
13362 +<rule break="no">
13363 +<beforebreak>\b[jJ]ul\.\s</beforebreak>
13364 +<afterbreak></afterbreak>
13365 +</rule>
13366 +<rule break="no">
13367 +<beforebreak>\b[aA]vg\.\s</beforebreak>
13368 +<afterbreak></afterbreak>
13369 +</rule>
13370 +<rule break="no">
13371 +<beforebreak>\b[sS]ept?\.\s</beforebreak>
13372 +<afterbreak></afterbreak>
13373 +</rule>
13374 +<rule break="no">
13375 +<beforebreak>\b[oO]kt\.\s</beforebreak>
13376 +<afterbreak></afterbreak>
13377 +</rule>
13378 +<rule break="no">
13379 +<beforebreak>\b[nN]ov\.\s</beforebreak>
13380 +<afterbreak></afterbreak>
13381 +</rule>
13382 +<rule break="no">
13383 +<beforebreak>\b[dD]ec\.\s</beforebreak>
13384 +<afterbreak></afterbreak>
13385 +</rule>
13386 +<rule break="no">
13387 +<beforebreak>\b[tT]j\.\s</beforebreak>
13388 +<afterbreak></afterbreak>
13389 +</rule>
13390 +<rule break="no">
13391 +<beforebreak>\b[nN]pr\.\s</beforebreak>
13392 +<afterbreak></afterbreak>
13393 +</rule>
13394 +<rule break="no">
13395 +<beforebreak>\b[sS]l\.\s</beforebreak>
13396 +<afterbreak></afterbreak>
13397 +</rule>
13398 +<rule break="no">
13399 +<beforebreak>\b[oO]p\.\s</beforebreak>
13400 +<afterbreak></afterbreak>
13401 +</rule>
13402 +<rule break="no">
13403 +<beforebreak>\b[gG]l\.\s</beforebreak>
13404 +<afterbreak></afterbreak>
13405 +</rule>
13406 +<rule break="no">
13407 +<beforebreak>\b[oO]z\.\s</beforebreak>
13408 +<afterbreak></afterbreak>
13409 +</rule>
13410 +<rule break="no">
13411 +<beforebreak>\bprev\.\s</beforebreak>
13412 +<afterbreak></afterbreak>
13413 +</rule>
13414 +<rule break="no">
13415 +<beforebreak>\bdipl\.\s</beforebreak>
13416 +<afterbreak></afterbreak>
13417 +</rule>
13418 +<rule break="no">
13419 +<beforebreak>\bing\.\s</beforebreak>
13420 +<afterbreak></afterbreak>
13421 +</rule>
13422 +<rule break="no">
13423 +<beforebreak>\b[pP]rim\.\s</beforebreak>
13424 +<afterbreak></afterbreak>
13425 +</rule>
13426 +<rule break="no">
13427 +<beforebreak>\b[cC]f\.\s</beforebreak>
13428 +<afterbreak></afterbreak>
13429 +</rule>
13430 +<rule break="no">
13431 +<beforebreak>\b[0-9]+(\.|:)[0-9][0-9](\.|:)[0-9][0-9]\s</beforebreak>
13432 +<afterbreak></afterbreak>
13433 +</rule>
13434 +<rule break="no">
13435 +<beforebreak>\b[0-3][0-9]+(\.|:)[0-9][0-9](\.|:)[0-9][0-9]\s</beforebreak>
13436 +<afterbreak></afterbreak>
13437 +</rule>
13438 +<rule break="no">
13439 +<beforebreak>\b[0-9]*\.\s</beforebreak>
13440 +<afterbreak></afterbreak>
13441 +</rule>
13442 +<rule break="no">
13443 +<beforebreak>\b[XVILMC]*\.\s</beforebreak>
13444 +<afterbreak></afterbreak>
13445 +</rule>
13446 +<rule break="no">
13447 +<beforebreak>\b[gG]l\.\s</beforebreak>
13448 +<afterbreak></afterbreak>
13449 +</rule>
13450 +<rule break="yes">
13451 +<beforebreak>[\.!?…][\u00BB\u2019\u201D\u203A"'\p{Pe}\u0002]*\s</beforebreak>
13452 +<afterbreak></afterbreak>
13453 +</rule>
13454 +<rule break="yes">
13455 +<beforebreak>[\.!?…]['"\u00BB\u2019\u201D\u203A\p{Pe}\u0002]*</beforebreak>
13456 +<afterbreak>\p{Lu}[^\p{Lu}]</afterbreak>
13457 +</rule>
13458 +<rule break="yes">
13459 +<beforebreak>\s\p{L}[\.!?…]\s</beforebreak>
13460 +<afterbreak>\p{Lu}\p{Ll}</afterbreak>
13461 +</rule>
13462 +</languagerule>
13463 +<languagerule languagerulename="Catalan">
13464 +<!-- Abbreviations that cannot finish sentences-->
13465 +<rule break="no">
13466 +<beforebreak>\b([Aa]vda|[Pp][ol]|Pl?za|[Aa]dm|[Dd]pto)\.\s</beforebreak>
13467 +<afterbreak></afterbreak>
13468 +</rule>
13469 +<rule break="no">
13470 +<beforebreak>\b(Dña|Dr[a]?|Sra|Sto|S(ri)?ta|Ldo|Ing|Prof|Excmo|Ilmo|Mgfco|admdor|admdora)\.\s</beforebreak>
13471 +<afterbreak></afterbreak>
13472 +</rule>
13473 +<rule break="no">
13474 +<beforebreak>\b([Aa]rt|[Cc][óo]d|[Ss]ecc|[Tt]ít)\.\s</beforebreak>
13475 +<afterbreak></afterbreak>
13476 +</rule>
13477 +<rule break="no">
13478 +<beforebreak>\b([Ee]d(it)?|[Nn]o|n|[Nn]úm|[Pp]ág|p|c|\d+er|[V\.]gr)\.\s</beforebreak>
13479 +<afterbreak></afterbreak>
13480 +</rule>
13481 +<!-- Abbreviations that can finish sentences -->
13482 +<rule break="no">
13483 +<beforebreak>\b(Sr|Jr|Admón|Adm|Inc|Co|Hnos|Vda|[VU]d[s]?)\.[\p{Pe}\p{Pf}\p{Pd}"']*\s</beforebreak>
13484 +<afterbreak>\p{Ll}</afterbreak>
13485 +</rule>
13486 +<!-- Any word in acronyms like U.S.A.F or F. B. I. or C. or c.s.p. or p. e. -->
13487 +<rule break="no">
13488 +<beforebreak>\b(\p{L}\.)+[\p{Pe}\p{Pf}\p{Pd}"']*\s</beforebreak>
13489 +<afterbreak>\p{Ll}</afterbreak>
13490 +</rule>
13491 +<!-- Any word in acronyms like EE.UU. or BB. DD. -->
13492 +<rule break="no">
13493 +<beforebreak>\b([\p{Lu}]{2}\.)+[\p{Pe}\p{Pf}\p{Pd}"']*\s</beforebreak>
13494 +<afterbreak>\p{Ll}</afterbreak>
13495 +</rule>
13496 +<!-- max min etc -->
13497 +<rule break="no">
13498 +<beforebreak>\b([Ee]tc|m[aáà]x|m[ií]n|aprox|\d+o)\.[\p{Pe}\p{Pf}\p{Pd}"']*\s</beforebreak>
13499 +<afterbreak>\p{Ll}</afterbreak>
13500 +</rule>
13501 +<!-- Composed abbrev. -->
13502 +<rule break="no">
13503 +<beforebreak>\bet al\.[\p{Pe}\p{Pf}\p{Pd}"']*\s</beforebreak>
13504 +<afterbreak></afterbreak>
13505 +</rule>
13506 +<!-- Units -->
13507 +<rule break="no">
13508 +<beforebreak>\b([Pp]ta[s]?|K[gm][s]|[mc]?[gmls]|[Hh](rs)?)\.[\p{Pe}\p{Pf}\p{Pd}"']*\s</beforebreak>
13509 +<afterbreak>\p{Ll}</afterbreak>
13510 +</rule>
13511 +<!-- (enum...) -->
13512 +<rule break="no">
13513 +<beforebreak>\b(\Q...\E|…)\p{Pe}\s</beforebreak>
13514 +<afterbreak>\p{Ll}</afterbreak>
13515 +</rule>
13516 +<!-- pero ¡ah! no estaba
13517 +<rule break="no">
13518 +<beforebreak>\b¡\p{L}+!\s</beforebreak>
13519 +<afterbreak>\p{Ll}</afterbreak>
13520 +</rule>
13521 + -->
13522 +<rule break="yes">
13523 +<beforebreak>[\.…][\u00BB\u2019\u201D\u203A"'\u0002]*\s</beforebreak>
13524 +<afterbreak></afterbreak>
13525 +</rule>
13526 +<rule break="yes">
13527 +<beforebreak>\s\p{L}+[\p{Pf}\p{Pe}\u00BB\u2019\u201D\u203A"'\u0002]*[\.:!?…]+\s*</beforebreak>
13528 +<afterbreak>[¡¿«»"'\p{Ps}]*\p{Lu}\p{L}*</afterbreak>
13529 +</rule>
13530 +</languagerule>
13531 +<languagerule languagerulename="Spanish">
13532 +<!-- Abbreviations that cannot finish sentences-->
13533 +<rule break="no">
13534 +<beforebreak>\b([Aa]vda|[Pp][ol]|Pl?za|[Aa]dm|[Dd]pto)\.\s</beforebreak>
13535 +<afterbreak></afterbreak>
13536 +</rule>
13537 +<rule break="no">
13538 +<beforebreak>\b(Dña|Dr[a]?|Sra|Sto|S(ri)?ta|Ldo|Ing|Prof|Excmo|Ilmo|Mgfco|admdor|admdora)\.\s</beforebreak>
13539 +<afterbreak></afterbreak>
13540 +</rule>
13541 +<rule break="no">
13542 +<beforebreak>\b([Aa]rt|[Cc]ód|[Ss]ecc|[Tt]ít)\.\s</beforebreak>
13543 +<afterbreak></afterbreak>
13544 +</rule>
13545 +<rule break="no">
13546 +<beforebreak>\b([Ee]d(it)?|[Nn]o|n|[Nn]úm|[Pp]ág|p|c|\d+er)|[V\.]gr\.\s</beforebreak>
13547 +<afterbreak></afterbreak>
13548 +</rule>
13549 +<!-- Abbreviations that can finish sentences -->
13550 +<rule break="no">
13551 +<beforebreak>\b(Sr|Jr|Admón|Inc|Co|Hnos|Vda|[VU]d[s]?)\.[\p{Pe}\p{Pf}\p{Pd}"']*\s</beforebreak>
13552 +<afterbreak>\p{Ll}</afterbreak>
13553 +</rule>
13554 +<!-- Any word in acronyms like U.S.A.F or F. B. I. or C. or c.s.p. or p. e. -->
13555 +<rule break="no">
13556 +<beforebreak>\b(\p{L}\.)+[\p{Pe}\p{Pf}\p{Pd}"']*\s</beforebreak>
13557 +<afterbreak>\p{Ll}</afterbreak>
13558 +</rule>
13559 +<!-- Any word in acronyms like EE.UU. or BB. DD. -->
13560 +<rule break="no">
13561 +<beforebreak>\b([\p{Lu}]{2}\.)+[\p{Pe}\p{Pf}\p{Pd}"']*\s</beforebreak>
13562 +<afterbreak>\p{Ll}</afterbreak>
13563 +</rule>
13564 +<!-- max min etc -->
13565 +<rule break="no">
13566 +<beforebreak>\b([Ee]tc|m[aá]x|m[ií]n|aprox|\d+o)\.[\p{Pe}\p{Pf}\p{Pd}"']*\s</beforebreak>
13567 +<afterbreak>\p{Ll}</afterbreak>
13568 +</rule>
13569 +<!-- Composed abbrev. -->
13570 +<rule break="no">
13571 +<beforebreak>\bet al\.[\p{Pe}\p{Pf}\p{Pd}"']*\s</beforebreak>
13572 +<afterbreak></afterbreak>
13573 +</rule>
13574 +<!-- Units -->
13575 +<rule break="no">
13576 +<beforebreak>\b([Pp]ta[s]?|K[gm][s]|[mc]?[gmls]|[Hh](rs)?)\.[\p{Pe}\p{Pf}\p{Pd}"']*\s</beforebreak>
13577 +<afterbreak>\p{Ll}</afterbreak>
13578 +</rule>
13579 +<!-- (enum...) -->
13580 +<rule break="no">
13581 +<beforebreak>\b(\Q...\E|…)\p{Pe}\s</beforebreak>
13582 +<afterbreak>\p{Ll}</afterbreak>
13583 +</rule>
13584 +<!-- pero ¡ah! no estaba
13585 +<rule break="no">
13586 +<beforebreak>\b¡\p{L}+!\s</beforebreak>
13587 +<afterbreak>\p{Ll}</afterbreak>
13588 +</rule>
13589 + -->
13590 +<rule break="yes">
13591 +<beforebreak>[\.…][\u00BB\u2019\u201D\u203A"'\u0002]*\s</beforebreak>
13592 +<afterbreak></afterbreak>
13593 +</rule>
13594 +<rule break="yes">
13595 +<beforebreak>\s\p{L}+[\p{Pf}\p{Pe}\u00BB\u2019\u201D\u203A"'\u0002]*[\.:!?…]+\s*</beforebreak>
13596 +<afterbreak>[¡¿«»"'\p{Ps}]*\p{Lu}\p{L}*</afterbreak>
13597 +</rule>
13598 +</languagerule>
13599 +<languagerule languagerulename="German">
13600 +<!-- Split e.g.: He won't. Really. -->
13601 +<rule break="yes">
13602 +<beforebreak>'\p{L}[\.!?…]\s</beforebreak>
13603 +<afterbreak>\p{Lu}</afterbreak>
13604 +</rule>
13605 +<!-- Split e.g.: He won't say no. Not really. -->
13606 +<rule break="yes">
13607 +<beforebreak>\sno[\.!?…]\s</beforebreak>
13608 +<afterbreak>\p{Lu}</afterbreak>
13609 +</rule>
13610 +<!-- Split at "a.m." or "p.m." followed by a capital letter. -->
13611 +<rule break="yes">
13612 +<beforebreak>[ap]\.m\.\s</beforebreak>
13613 +<afterbreak>\p{Lu}</afterbreak>
13614 +</rule>
13615 +<!-- Don't split at e.g. "U. S. A." -->
13616 +<rule break="no">
13617 +<beforebreak>[^-\p{L}]\p{L}[\.!?…]['|"|«|\)|\]|\}]?\s</beforebreak>
13618 +<afterbreak></afterbreak>
13619 +</rule>
13620 +<!-- Don't split at e.g. "U.S.A." -->
13621 +<rule break="no">
13622 +<beforebreak>\b\p{L}\.</beforebreak>
13623 +<afterbreak></afterbreak>
13624 +</rule>
13625 +<!-- Don't split after a white-space followed by a single letter followed
13626 +         by a dot followed by another whitespace. e.g. " p. " -->
13627 +<rule break="no">
13628 +<beforebreak>\s\p{L}\.\s</beforebreak>
13629 +<afterbreak>\p{L}\.</afterbreak>
13630 +</rule>
13631 +<!-- Don't split at "bla bla... yada yada" -->
13632 +<rule break="no">
13633 +<beforebreak>[\[\(]?\.\.\.[\]\)]?\s</beforebreak>
13634 +<afterbreak>\p{Ll}</afterbreak>
13635 +</rule>
13636 +<!-- Don't split [.?!] when the're quoted -->
13637 +<rule break="no">
13638 +<beforebreak>['"][\.!?…]['"]\s</beforebreak>
13639 +<afterbreak></afterbreak>
13640 +</rule>
13641 +<!-- Don't break after quote unless there's a capital letter
13642 +         e.g.: "That's right!" he said. -->
13643 +<rule break="no">
13644 +<beforebreak>["']\s</beforebreak>
13645 +<afterbreak>\p{Ll}</afterbreak>
13646 +</rule>
13647 +<!-- e.g. "Das ist . so." - assume one sentence. -->
13648 +<rule break="no">
13649 +<beforebreak>\s([\.!?]{1,3}|…)['|"|«|\)|\]|\}]?\s</beforebreak>
13650 +<afterbreak></afterbreak>
13651 +</rule>
13652 +<!-- Numbers, dates e.g. "3.10. datiert" -->
13653 +<rule break="no">
13654 +<beforebreak>\b\d+\.\s</beforebreak>
13655 +<afterbreak>\p{Ll}|\p{Lu}{2,}</afterbreak>
13656 +</rule>
13657 +<!-- z.B. "Das hier ist ein(!) Satz." -->
13658 +<rule break="no">
13659 +<beforebreak>[\(\[][!?]{1,3}[\]\)]\s</beforebreak>
13660 +<afterbreak></afterbreak>
13661 +</rule>
13662 +<!-- z.B. "Das hier ist (genau!) ein Satz." -->
13663 +<rule break="no">
13664 +<beforebreak>[!?]{1,3}[\)\]]\s</beforebreak>
13665 +<afterbreak></afterbreak>
13666 +</rule>
13667 +<!-- z.B. "bla (...) blubb" -> kein Satzende -->
13668 +<rule break="no">
13669 +<beforebreak>[\(\)\[\]]\s</beforebreak>
13670 +<afterbreak></afterbreak>
13671 +</rule>
13672 +<!-- don't split at cases like "Friedrich II. wird auch..." -->
13673 +<rule break="no">
13674 +<beforebreak>\s[IVX]+\.\s</beforebreak>
13675 +<afterbreak>[^\p{Lu}]+</afterbreak>
13676 +</rule>
13677 +<!-- don't split at cases like "im 13. oder 14. Jahrhundert" -->
13678 +<rule break="no">
13679 +<beforebreak>\d+\.\s</beforebreak>
13680 +<afterbreak>(und|oder|bis)\s</afterbreak>
13681 +</rule>
13682 +<!-- einige deutsche Monate, vor denen eine Zahl erscheinen kann,
13683 +         ohne dass eine Satzgrenze erkannt wird 
13684 +         (z.B. "am 13. Dezember" -> keine Satzgrenze) -->
13685 +<rule break="no">
13686 +<beforebreak>\d+\.\s</beforebreak>
13687 +<afterbreak>Januar|Februar|März|April|Mai|Juni|Juli|August|September|Oktober|November|Dezember</afterbreak>
13688 +</rule>
13689 +<!-- ähnliche Fälle außerhalb der Monatsnamen -->
13690 +<rule break="no">
13691 +<beforebreak>\d+\.\s</beforebreak>
13692 +<afterbreak>Jh|Jhd|Jahrhundert|Jahrhunderts|Geburtstag|Geburtstags|Platz|Platzes|Loch|Lochs|Loches</afterbreak>
13693 +</rule>
13694 +<!-- English abbreviations - but these work globally for all languages -->
13695 +<rule break="no">
13696 +<beforebreak>\b(Mr|Mrs|No|pp|St|no|Sr|Jr|Bros|etc|vs|esp|[Ff]ig|Jan|Feb|Mar|Apr|Jun|Jul|Aug|Sep|Sept|Oct|Okt|Nov|Dec|Ph.D|PhD|al|cf|Inc|Ms|Gen|Sen|Prof|Corp|Co|Ltd)\.\s</beforebreak>
13697 +<afterbreak></afterbreak>
13698 +</rule>
13699 +<!-- German abbreviations -->
13700 +<rule break="no">
13701 +<beforebreak>\b(versch|d|Übers|usw|bzw|Abh|Abk|Abt|ahd|Akk|allg|alltagsspr|altdt|alttest|amerikan|Anh|Ank|Anm|Art|Az|Bat|bayr|Bd|Bde|Bed|Bem|bes|bez|Bez|Bhf|bspw|btto|bw|bzw)\.\s</beforebreak>
13702 +<afterbreak></afterbreak>
13703 +</rule>
13704 +<rule break="no">
13705 +<beforebreak>\b(cts|ct|Ca|ca|chem|chin|Chr|cresc|dat|Dat|desgl|ders|dgl|Di|Dipl|Dir|Do|Doz|Dr|dt|ebd|Ed|eigtl|engl|Erg|al|etc|etw|ev|evtl|Evtl|exkl|Expl|Exz)\.\s</beforebreak>
13706 +<afterbreak></afterbreak>
13707 +</rule>
13708 +<rule break="no">
13709 +<beforebreak>\b(ff|Fa|fachspr|fam|fem|Fem|Fr|fr|franz|frz|frdl|Frl|Fut|Gd|geb|gebr|Gebr|geh|geh|geleg|gen|Gen|germ|gesch|ges|get|ggf|Ggs|ggT|griech)\.\s</beforebreak>
13710 +<afterbreak></afterbreak>
13711 +</rule>
13712 +<rule break="no">
13713 +<beforebreak>\b(hebr|hg|hl|Hrsg|Hg|hist|hochd|hochspr|Hptst|Hr|Allg|ill|inkl|incl|Ind|Inf|Ing|ital|Tr|Jb|Jg|Jh|Jhd|jmd|jmdm|jmdn|jmds|jur|Kap|kart|kath|kfm|kaufm|Kfm|kgl|Kl|Konj|Krs|Kr|Kto)\.\s</beforebreak>
13714 +<afterbreak></afterbreak>
13715 +</rule>
13716 +<rule break="no">
13717 +<beforebreak>\b(lat|lfd|Lit|lt|Lz|Mask|mask|Mrd|mdal|med|met|mhd|Mi|Mio|min|Mo|mod|nachm|nördlBr|neutr|Nhd|Nom|Nr|Nrn|Num|Obj|od|dgl|offz)\.\s</beforebreak>
13718 +<afterbreak></afterbreak>
13719 +</rule>
13720 +<rule break="no">
13721 +<beforebreak>\b(Part|Perf|Pers|Pfd|Pl|Plur|pl|Plusq|Pos|pp|Präp|Präs|Prät|Prov|Prof|rd|reg|resp|Rhld|rit|Sa|südl|Br|sel|sen|Sept|Sing|sign|So|sog|Sp|St|St|Std|stacc|Str|stud|Subst|sva|svw|sZ)\.\s</beforebreak>
13722 +<afterbreak></afterbreak>
13723 +</rule>
13724 +<rule break="no">
13725 +<beforebreak>\b(Tel|Temp|trans|Tsd|übertr|übl|ff|ugs|univ|urspr|usw|vgl|Vol|vorm|vorm|Vp|Vs|vs|wg|Hd|Ztr|zus|Zus|zzt|zz|Zz|Zt|Min|bzgl|Frhr)\.\s</beforebreak>
13726 +<afterbreak></afterbreak>
13727 +</rule>
13728 +<!-- Break rules -->
13729 +<rule break="yes">
13730 +<beforebreak>[\.!?…]['|"|«|\)|\]|\}]?\s+</beforebreak>
13731 +<afterbreak></afterbreak>
13732 +</rule>
13733 +<rule break="yes">
13734 +<beforebreak>[\.!?…]['"\p{Pe}\u00BB\u201D]?</beforebreak>
13735 +<afterbreak>\p{Lu}[^\p{Lu}]</afterbreak>
13736 +</rule>
13737 +<rule break="yes">
13738 +<beforebreak>\s\p{L}[\.!?…]\s</beforebreak>
13739 +<afterbreak>\p{Lu}\p{Ll}</afterbreak>
13740 +</rule>
13741 +</languagerule>
13742 +<languagerule languagerulename="Danish">
13743 +<!-- Split e.g.: He won't. Really. -->
13744 +<rule break="yes">
13745 +<beforebreak>'\p{L}[\.!?…]\s</beforebreak>
13746 +<afterbreak>\p{Lu}</afterbreak>
13747 +</rule>
13748 +<!-- Split e.g.: He won't say no. Not really. -->
13749 +<rule break="yes">
13750 +<beforebreak>\sno[\.!?…]\s</beforebreak>
13751 +<afterbreak>\p{Lu}</afterbreak>
13752 +</rule>
13753 +<!-- Split at "a.m." or "p.m." followed by a capital letter. -->
13754 +<rule break="yes">
13755 +<beforebreak>[ap]\.m\.\s</beforebreak>
13756 +<afterbreak>\p{Lu}</afterbreak>
13757 +</rule>
13758 +<!-- Don't split at e.g. "U. S. A." -->
13759 +<rule break="no">
13760 +<beforebreak>[^-\p{L}]\p{L}[\.!?…]['|"|«|\)|\]|\}]?\s</beforebreak>
13761 +<afterbreak></afterbreak>
13762 +</rule>
13763 +<!-- Don't split at e.g. "U.S.A." -->
13764 +<rule break="no">
13765 +<beforebreak>\b\p{L}\.</beforebreak>
13766 +<afterbreak></afterbreak>
13767 +</rule>
13768 +<!-- Don't split after a white-space followed by a single letter followed
13769 +         by a dot followed by another whitespace. e.g. " p. " -->
13770 +<rule break="no">
13771 +<beforebreak>\s\p{L}\.\s</beforebreak>
13772 +<afterbreak>\p{L}\.</afterbreak>
13773 +</rule>
13774 +<!-- Don't split at "bla bla... yada yada" -->
13775 +<rule break="no">
13776 +<beforebreak>[\[\(]?\.\.\.[\]\)]?\s</beforebreak>
13777 +<afterbreak>\p{Ll}</afterbreak>
13778 +</rule>
13779 +<!-- Don't split [.?!] when the're quoted -->
13780 +<rule break="no">
13781 +<beforebreak>['"][\.!?…]['"]\s</beforebreak>
13782 +<afterbreak></afterbreak>
13783 +</rule>
13784 +<!-- Don't break after quote unless there's a capital letter
13785 +         e.g.: "That's right!" he said. -->
13786 +<rule break="no">
13787 +<beforebreak>["']\s</beforebreak>
13788 +<afterbreak>\p{Ll}</afterbreak>
13789 +</rule>
13790 +<!-- Numbers, dates e.g. "3.10. datiert" -->
13791 +<rule break="no">
13792 +<beforebreak>\b\d+\.\s</beforebreak>
13793 +<afterbreak>\p{Ll}|\p{Lu}{2,}</afterbreak>
13794 +</rule>
13795 +<!-- f.eks. "Dette er ikke en(!) sætning." -->
13796 +<rule break="no">
13797 +<beforebreak>[\(\[][!?]{1,3}[\]\)]\s</beforebreak>
13798 +<afterbreak></afterbreak>
13799 +</rule>
13800 +<!-- f.eks. "Dette er (nøjagtig!) en sætning." -->
13801 +<rule break="no">
13802 +<beforebreak>[!?]{1,3}[\)\]]\s</beforebreak>
13803 +<afterbreak></afterbreak>
13804 +</rule>
13805 +<!-- f.eks. "bla (...) blubb" -> ingen sætning -->
13806 +<rule break="no">
13807 +<beforebreak>[\(\)\[\]]\s</beforebreak>
13808 +<afterbreak></afterbreak>
13809 +</rule>
13810 +<!-- don't split at cases like "Fra den 13. til 14. i måneden." -->
13811 +<rule break="no">
13812 +<beforebreak>\d+\.\s</beforebreak>
13813 +<afterbreak>(og|eller|til)\s</afterbreak>
13814 +</rule>
13815 +<rule break="no">
13816 +<beforebreak>\b\p{N}+\.\s</beforebreak>
13817 +<afterbreak>januar|februar|marts|april|maj|juni|juli|august|september|oktober|november|december</afterbreak>
13818 +</rule>
13819 +<!-- einige deutsche Monate, vor denen eine Zahl erscheinen kann,
13820 +         ohne dass eine Satzgrenze erkannt wird 
13821 +         (z.B. "am 13. Dezember" -> keine Satzgrenze) -->
13822 +<rule break="no">
13823 +<beforebreak>\d+\.\s</beforebreak>
13824 +<afterbreak>januar|februar|marts|april|maj|juni|juli|august|september|oktober|november|december</afterbreak>
13825 +</rule>
13826 +<!-- English abbreviations - but these work globally for all languages -->
13827 +<rule break="no">
13828 +<beforebreak>\b(Mr|Mrs|No|pp|St|no|Sr|Jr|Bros|vs|esp|[Ff]ig|Jan|Feb|Mar|Apr|Jun|Jul|Aug|Sep|Sept|Oct|Okt|Nov|Dec|Ph.D|PhD|al|cf|Inc|Ms|Gen|Sen|Prof|Corp|Co)\.\s</beforebreak>
13829 +<afterbreak></afterbreak>
13830 +</rule>
13831 +<!-- Danish abbreviations - Word Boundary \b abbreviation dot \. -->
13832 +<rule break="no">
13833 +<beforebreak>\b(abs|abstr|adj|adm|adr|adv|afd|afg|afl|afs|afvig|agro|akad|akk|allr|alm|amer|anat|ang|anm|anv|apot|appos|apr|arab|arb|arkais|arkæol|arp|arr|art|ass|astr|att|attrib|aud|aug|aut)\.\s</beforebreak>
13834 +<afterbreak></afterbreak>
13835 +</rule>
13836 +<rule break="no">
13837 +<beforebreak>\b(bag|barb|barnespr|bd|bdt|beg|besl|best|bet|bhk|biavl|bibet|bibl|bibliot|billard|billedl|biol|bjergv|bk|bl|bogb|bogh|bogtr|bornh|bot|br|bryg|bto|bygn|bødk)\.\s</beforebreak>
13838 +<afterbreak></afterbreak>
13839 +</rule>
13840 +<rule break="no">
13841 +<beforebreak>\b(ca|cand|Chr|cirk|cit|co|d|da|dagl|dans|dat|dec|def|demonstr|dep|dial|diam|dim|dipl|disp|distr|distrib|dobb|dok|dr|dvs|e|egl|ejd|eks|eksam|ekskl|eksp|ekspl|el|ell|ellipt|emb|endv|eng|enk|ent|etnogr|eufem|eur|event|evt)\.\s</beforebreak>
13842 +<afterbreak></afterbreak>
13843 +</rule>
13844 +<rule break="no">
13845 +<beforebreak>\b(f|fagl|fakt|farv|feb|ff|fhv|fig|filos|fin|fisk|fk|fl|flg|flt|flyv|fmd|fon|foragt|forb|foreg|forf|forsikr|fors|forsk|forst|forv|foræld|fot|fr|fre|fris|frk|fsv|fuldm|fx|fys|fysiol|fægt|gart|gartn|garv|gdr|gen|genopt|geogr|geol|geom|germ|gl|glarm|glda|gldgs|glholl|glno|gns|got|gr|gradbøjn|graf|gram|gross|grundbet|græc|guldsm|gym)\.\s</beforebreak>
13846 +<afterbreak></afterbreak>
13847 +</rule>
13848 +<rule break="no">
13849 +<beforebreak>\b(h|hat|hd|hebr|henh|hensobj|herald|hhv|hist|hj|holl|hovedbet|hr|hty|højtid|haandarb|haandv|i|if|iflg|ifm|ift|iht|imp|incl|indb|indik|inf|ing|Inkl|inkl|insp|instr|interj|intk|intr|iron|isl|ital|jan|jarg|jernb|jf|jnr|jr|jul|jun|jur|jy|jæg|jærnb|jød)\.\s</beforebreak>
13850 +<afterbreak></afterbreak>
13851 +</rule>
13852 +<rule break="no">
13853 +<beforebreak>\b(Kbh|kbh|kem|kgl|kirk|kl|kld|knsp|kog|koll|komm|komp|konj|konkr|kons|Kr|kr|kurv|kvt|køkkenspr|l|landbr|landmaaling|lat|lb|lic|lign|litt|Ll|log|Loll|loll|lrs|lør)\.\s</beforebreak>
13854 +<afterbreak></afterbreak>
13855 +</rule>
13856 +<rule break="no">
13857 +<beforebreak>\b(m|maj|maks|mal|man|mar|mark|mat|mdl|mdr|med|medl|meng|merc|meteorol|meton|metr|mf|mfl|mht|mia|mil|min|mineral|mio|ml|mlat|mm|mnt|mods|modsætn|modt|mr|mrk|mur|mvh|mytol|møl|mønt|n|naturv|ndf|Ndr|nedsæt|nht|no|nom|nov|nr|nt|num|nyda|nydann|nylat|naal)\.\s</beforebreak>
13858 +<afterbreak></afterbreak>
13859 +</rule>
13860 +<rule break="no">
13861 +<beforebreak>\b(obj|obl|oblik|obs|odont|oecon|oeng|ofl|ogs|oht|okt|oldfr|oldfris|oldn|olgn|omg|omkr|omtr|ons|opr|ordspr|org|osax|ovenst|overf|overs|ovf|p|pag|parl|part|pass|pat|pct|perf|pers|pga|ph|pharm|phil|pk|pkt|pl|plur|poet|pol|polit|pop|port|poss|post|pott|pr|prod|pron|propr|prov|præd|præp|præs|præt|psych|pt|pæd|paavirkn)\.\s</beforebreak>
13862 +<afterbreak></afterbreak>
13863 +</rule>
13864 +<rule break="no">
13865 +<beforebreak>\b(reb|ref|refl|regn|rekl|relat|relig|resp|retor|rev|rid|rigsspr|run|russ|s|sa|sanskr|scient|sdjy|sdr|sek|sen|sep|sept|shetl|sj|sjæll|skibsbygn|sko|skol|skr|skriftspr|skræd|Skt|slagt|slutn|smed|sml|smsat|smst|snedk|soc|soldat|sp|spec|sport|spot|spr|sprogv|spøg|ssg|ssgr|st|stat|stk|str|straf|stud|subj|subst|superl|sv|sætn|søfors|søn)\.\s</beforebreak>
13866 +<afterbreak></afterbreak>
13867 +</rule>
13868 +<rule break="no">
13869 +<beforebreak>\b(talem|talespr|tandl|td|tdl|teat|techn|telef|telegr|telekom|teol|th|theol|tir|tirs|tlf|told|tor|tors|trans|tsk|ty|tyrk|tøm|u|ubesl|ubest|udd|uddan|udenl|udg|udtr|uegl|ugtl|ult|underbet|undt|univ|upers|ur|urnord)\.\s</beforebreak>
13870 +<afterbreak></afterbreak>
13871 +</rule>
13872 +<rule break="no">
13873 +<beforebreak>\b(v|var|varem|vbs|vedk|vedl|vedr|vejl|verb|vet|vha|vol|vs|vsa|vulg|væv|zool|æ|æda|ænht|ænyd|æstet|ø|økon|å|årg|årh)\.\s</beforebreak>
13874 +<afterbreak></afterbreak>
13875 +</rule>
13876 +<!-- Danish abbreviations - These can appear at the end of sentence, so watch out for the next letter: it shouldn't be uppercase. -->
13877 +<rule break="no">
13878 +<beforebreak>\b(etc|mv|osv)\.\s</beforebreak>
13879 +<afterbreak>\p{Ll}</afterbreak>
13880 +</rule>
13881 +<!-- Break rules -->
13882 +<rule break="yes">
13883 +<beforebreak>[\.!?…]['|"|«|\)|\]|\}]?\s+</beforebreak>
13884 +<afterbreak></afterbreak>
13885 +</rule>
13886 +<rule break="yes">
13887 +<beforebreak>[\.!?…]['"\p{Pe}\u00BB\u201D]?</beforebreak>
13888 +<afterbreak>\p{Lu}[^\p{Lu}]</afterbreak>
13889 +</rule>
13890 +<rule break="yes">
13891 +<beforebreak>\s\p{L}[\.!?…]\s</beforebreak>
13892 +<afterbreak>\p{Lu}\p{Ll}</afterbreak>
13893 +</rule>
13894 +</languagerule>
13895 +<languagerule languagerulename="Esperanto">
13896 +<!-- Esperanto abbreviations (see http://eo.lernu.net/lernado/gramatiko/demandoj/mallongigoj.php) -->
13897 +<rule break="no">
13898 +<beforebreak>\b(div|[Ee]kz|h|[Ii]nkl|p|[Rr]ed|[Rr]im|ktp)\.\s</beforebreak>
13899 +<afterbreak>\p{Ll}</afterbreak>
13900 +</rule>
13901 +<rule break="no">
13902 +<beforebreak>\b([Bb]v|[Ĉĉ]|i\.a|k\.[acs]|[Tt]\.[ne]|k\.t\.p|n\.b|P\.S)\.\s</beforebreak>
13903 +<afterbreak></afterbreak>
13904 +</rule>
13905 +<rule break="no">
13906 +<beforebreak>\b[Ll]ernu!\s</beforebreak>
13907 +<afterbreak>\p{Ll}</afterbreak>
13908 +</rule>
13909 +<!-- Break rules -->
13910 +<rule break="yes">
13911 +<beforebreak>[\.!?…]['|"|«|\)|\]|\}]?\s+</beforebreak>
13912 +<afterbreak></afterbreak>
13913 +</rule>
13914 +<rule break="yes">
13915 +<beforebreak>[\.!?…]['"\p{Pe}\u00BB\u201D]?</beforebreak>
13916 +<afterbreak>\p{Lu}[^\p{Lu}]</afterbreak>
13917 +</rule>
13918 +<rule break="yes">
13919 +<beforebreak>\s\p{L}[\.!?…]\s</beforebreak>
13920 +<afterbreak>\p{Lu}\p{Ll}</afterbreak>
13921 +</rule>
13922 +</languagerule>
13923 +
13924 +<languagerule languagerulename="Ukrainian">
13925 +<rule break="no">
13926 +<beforebreak>\b\d+\.\s</beforebreak>
13927 +<afterbreak>\p{Ll}|\p{Lu}{2,}</afterbreak>
13928 +</rule>
13929 +<!-- capital char abbreviations А. Б. В. -->
13930 +<rule break="no">
13931 +<beforebreak>\b[А-Я]\.\s</beforebreak>
13932 +<afterbreak></afterbreak>
13933 +</rule>
13934 +<rule break="no">
13935 +<beforebreak>\bҐ\.\s</beforebreak>
13936 +<afterbreak></afterbreak>
13937 +</rule>
13938 +<rule break="no">
13939 +<beforebreak>\bЇ\.\s</beforebreak>
13940 +<afterbreak></afterbreak>
13941 +</rule>
13942 +<rule break="no">
13943 +<beforebreak>\bЄ\.\s</beforebreak>
13944 +<afterbreak></afterbreak>
13945 +</rule>
13946 +<rule break="no">
13947 +<beforebreak>\b[A-Z]\.\s</beforebreak>
13948 +<afterbreak></afterbreak>
13949 +</rule>
13950 +<rule break="no">
13951 +<beforebreak>\b\p{L}\.</beforebreak>
13952 +<afterbreak>\p{L}\.</afterbreak>
13953 +</rule>
13954 +<!-- date/time -->
13955 +<rule break="no">
13956 +<beforebreak>\b[0-9]+(р)\.\s</beforebreak>
13957 +<afterbreak></afterbreak>
13958 +</rule>
13959 +<rule break="no">
13960 +<beforebreak>\b[XVILMC]+(ст)\.\s</beforebreak>
13961 +<afterbreak></afterbreak>
13962 +</rule>
13963 +<rule break="no">
13964 +<beforebreak>\b[0-9]+(\.|:)[0-9][0-9]\s</beforebreak>
13965 +<afterbreak></afterbreak>
13966 +</rule>
13967 +<rule break="no">
13968 +<beforebreak>\b[0-9]+(\.|:)[0-9][0-9](\.|:)[0-9][0-9]\s</beforebreak>
13969 +<afterbreak></afterbreak>
13970 +</rule>
13971 +<!--Measures  -->
13972 +<rule break="no">
13973 +<beforebreak>\b[0-9]+(г|гг|грн|млн|млрд|руб|тис)\.\s</beforebreak>
13974 +<afterbreak></afterbreak>
13975 +</rule>
13976 +<!-- other abbreviations  -->
13977 +<rule break="no">
13978 +<beforebreak>\bв\.\s</beforebreak>
13979 +<afterbreak></afterbreak>
13980 +</rule>
13981 +<rule break="no">
13982 +<beforebreak>\bвв\.\s</beforebreak>
13983 +<afterbreak></afterbreak>
13984 +</rule>
13985 +<rule break="no">
13986 +<beforebreak>\bвул\.\s</beforebreak>
13987 +<afterbreak></afterbreak>
13988 +</rule>
13989 +<rule break="no">
13990 +<beforebreak>\bг\.\s</beforebreak>
13991 +<afterbreak></afterbreak>
13992 +</rule>
13993 +<rule break="no">
13994 +<beforebreak>\bгг\.\s</beforebreak>
13995 +<afterbreak></afterbreak>
13996 +</rule>
13997 +<rule break="no">
13998 +<beforebreak>\bгрн\.\s</beforebreak>
13999 +<afterbreak></afterbreak>
14000 +</rule>
14001 +<rule break="no">
14002 +<beforebreak>\bмлн\.\s</beforebreak>
14003 +<afterbreak></afterbreak>
14004 +</rule>
14005 +<rule break="no">
14006 +<beforebreak>\bмлрд\.\s</beforebreak>
14007 +<afterbreak></afterbreak>
14008 +</rule>
14009 +<rule break="no">
14010 +<beforebreak>\bруб\.\s</beforebreak>
14011 +<afterbreak></afterbreak>
14012 +</rule>
14013 +<rule break="no">
14014 +<beforebreak>\bст\.\s</beforebreak>
14015 +<afterbreak></afterbreak>
14016 +</rule>
14017 +<rule break="no">
14018 +<beforebreak>\bр\.\s</beforebreak>
14019 +<afterbreak></afterbreak>
14020 +</rule>
14021 +<rule break="no">
14022 +<beforebreak>\bтис\.\s</beforebreak>
14023 +<afterbreak></afterbreak>
14024 +</rule>
14025 +<rule break="no">
14026 +<beforebreak>['"„][\.!?…]['"”]\s</beforebreak>
14027 +<afterbreak></afterbreak>
14028 +</rule>
14029 +<rule break="no">
14030 +<beforebreak>[\u00AB][\.!?…][\u00BB]\s</beforebreak>
14031 +<afterbreak></afterbreak>
14032 +</rule>
14033 +<rule break="no">
14034 +<beforebreak>[\[\(]*\.\.\.[\]\)]* </beforebreak>
14035 +<afterbreak>\p{Ll}</afterbreak>
14036 +</rule>
14037 +<rule break="no">
14038 +<beforebreak>[\[\(]*…[\]\)]* </beforebreak>
14039 +<afterbreak>\p{Ll}</afterbreak>
14040 +</rule>
14041 +<rule break="no">
14042 +<beforebreak>["”'\u00BB]\s*</beforebreak>
14043 +<afterbreak>\s*\p{Ll}</afterbreak>
14044 +</rule>
14045 +<!-- break  -->
14046 +<rule break="yes">
14047 +<beforebreak>[\.!?…]['"\u00BB\u2019\u201D\u203A\u0002]*\s</beforebreak>
14048 +<afterbreak></afterbreak>
14049 +</rule>
14050 +<rule break="yes">
14051 +<beforebreak>\u005D\u005D\s</beforebreak>
14052 +<afterbreak></afterbreak>
14053 +</rule>
14054 +<rule break="yes">
14055 +<beforebreak>[\.!?…]['»"”\p{Pe}]*</beforebreak>
14056 +<afterbreak>\p{Lu}[^\p{Lu}]</afterbreak>
14057 +</rule>
14058 +<rule break="yes">
14059 +<beforebreak>\s\p{L}[\.!?…]\s</beforebreak>
14060 +<afterbreak>\p{Lu}\p{Ll}</afterbreak>
14061 +</rule>
14062 +</languagerule>
14063 +
14064 +<languagerule languagerulename="Belarusian">
14065 +<rule break="no">
14066 +<beforebreak>\b\d+\.\s</beforebreak>
14067 +<afterbreak>\p{Ll}|\p{Lu}{2,}</afterbreak>
14068 +</rule>
14069 +<!-- capital char abbreviations А. Б. В. -->
14070 +<rule break="no">
14071 +<beforebreak>\b[А-Я]\.\s</beforebreak>
14072 +<afterbreak></afterbreak>
14073 +</rule>
14074 +<rule break="no">
14075 +<beforebreak>\bЎ\.\s</beforebreak>
14076 +<afterbreak></afterbreak>
14077 +</rule>
14078 +<rule break="no">
14079 +<beforebreak>\b[A-Z]\.\s</beforebreak>
14080 +<afterbreak></afterbreak>
14081 +</rule>
14082 +<rule break="no">
14083 +<beforebreak>\b\p{L}\.</beforebreak>
14084 +<afterbreak>\p{L}\.</afterbreak>
14085 +</rule>
14086 +<!-- date/time -->
14087 +<rule break="no">
14088 +<beforebreak>\b[0-9]+(г)\.\s</beforebreak>
14089 +<afterbreak></afterbreak>
14090 +</rule>
14091 +<rule break="no">
14092 +<beforebreak>\b[XVILMC]+(ст)\.\s</beforebreak>
14093 +<afterbreak></afterbreak>
14094 +</rule>
14095 +<rule break="no">
14096 +<beforebreak>\b[0-9]+(\.|:)[0-9][0-9]\s</beforebreak>
14097 +<afterbreak></afterbreak>
14098 +</rule>
14099 +<rule break="no">
14100 +<beforebreak>\b[0-9]+(\.|:)[0-9][0-9](\.|:)[0-9][0-9]\s</beforebreak>
14101 +<afterbreak></afterbreak>
14102 +</rule>
14103 +<!--Measures  -->
14104 +<rule break="no">
14105 +<beforebreak>\b[0-9]+(г|гг|грн|млн|млрд|руб|тыс)\.\s</beforebreak>
14106 +<afterbreak></afterbreak>
14107 +</rule>
14108 +<!-- other abbreviations  -->
14109 +<rule break="no">
14110 +<beforebreak>\b(в|вв|г|гг|грн|млн|млрд|руб|ст|р|тыс)\.\s</beforebreak>
14111 +<afterbreak></afterbreak>
14112 +</rule>
14113 +<rule break="no">
14114 +<beforebreak>['"„][\.!?…]['"”]\s</beforebreak>
14115 +<afterbreak></afterbreak>
14116 +</rule>
14117 +<rule break="no">
14118 +<beforebreak>[\u00AB][\.!?…][\u00BB]\s</beforebreak>
14119 +<afterbreak></afterbreak>
14120 +</rule>
14121 +<rule break="no">
14122 +<beforebreak>[\[\(]*\.\.\.[\]\)]* </beforebreak>
14123 +<afterbreak>\p{Ll}</afterbreak>
14124 +</rule>
14125 +<rule break="no">
14126 +<beforebreak>[\[\(]*…[\]\)]* </beforebreak>
14127 +<afterbreak>\p{Ll}</afterbreak>
14128 +</rule>
14129 +<rule break="no">
14130 +<beforebreak>["”'\u00BB]\s*</beforebreak>
14131 +<afterbreak>\s*\p{Ll}</afterbreak>
14132 +</rule>
14133 +<!-- break  -->
14134 +<rule break="yes">
14135 +<beforebreak>[\.!?…]['"\u00BB\u2019\u201D\u203A\u0002]*\s</beforebreak>
14136 +<afterbreak></afterbreak>
14137 +</rule>
14138 +<rule break="yes">
14139 +<beforebreak>\u005D\u005D\s</beforebreak>
14140 +<afterbreak></afterbreak>
14141 +</rule>
14142 +<rule break="yes">
14143 +<beforebreak>[\.!?…]['»"”\p{Pe}]*</beforebreak>
14144 +<afterbreak>\p{Lu}[^\p{Lu}]</afterbreak>
14145 +</rule>
14146 +<rule break="yes">
14147 +<beforebreak>\s\p{L}[\.!?…]\s</beforebreak>
14148 +<afterbreak>\p{Lu}\p{Ll}</afterbreak>
14149 +</rule>
14150 +</languagerule>
14151 +
14152 +<languagerule languagerulename="Galician">
14153 +<!-- s. XIX; s.IX; sec. XX; séc. XX -->
14154 +<rule break="no">
14155 +<beforebreak>\bs([eé]c)?\.\s?</beforebreak>
14156 +<afterbreak>[IVXVDMCL]+</afterbreak>
14157 +</rule>
14158 +<rule break="no">
14159 +<beforebreak>\b[Ee]tc\.[\p{Pe}\p{Pf}\p{Pd}"']*\s</beforebreak>
14160 +<afterbreak>\p{Ll}</afterbreak>
14161 +</rule>
14162 +<rule break="no">
14163 +<beforebreak>\b(m[aá]x|m[ií]n|[aA]prox)\.[\p{Pe}\p{Pf}\p{Pd}"']*\s</beforebreak>
14164 +<afterbreak>[\p{Ll}\p{N}]</afterbreak>
14165 +</rule>
14166 +<rule break="no">
14167 +<beforebreak>\b([aA]pt?do|[aA]sdo|[aA]vd?a?|[Cc]ód|[Dd]e?pto|[Ff]ac|[Ii]nst)\.\s</beforebreak>
14168 +<afterbreak></afterbreak>
14169 +</rule>
14170 +<!-- S.A.R. Felipe de Borbón -->
14171 +<rule break="no">
14172 +<beforebreak>\b(S\.A\.[IRS]\.|S\.R\.M\.|A\.R\.|S\.[ME]\.)\s</beforebreak>
14173 +<afterbreak>\p{Lu}</afterbreak>
14174 +</rule>
14175 +<rule break="no">
14176 +<beforebreak>\b([\p{Ll}\p{Lu}]\.)+[\p{Pe}\p{Pf}\p{Pd}"']*\s</beforebreak>
14177 +<afterbreak>\p{Ll}</afterbreak>
14178 +</rule>
14179 +<!-- S.A., s. l. -->
14180 +<rule break="no">
14181 +<beforebreak>\b\p{L}\.\s?</beforebreak>
14182 +<afterbreak>((\p{L}\.\s?)+|\p{Ll})</afterbreak>
14183 +</rule>
14184 +<!-- EE.UU; EE.UU.; EE. UU.; EE. UU -->
14185 +<rule break="no">
14186 +<beforebreak>\b\p{Lu}{2}\.\s?</beforebreak>
14187 +<afterbreak>(\p{Lu}{2}\.?\s?|\p{Ll})</afterbreak>
14188 +</rule>
14189 +<!-- tratamento // pendente: "PP. Escolapios" vs. "do PP. Bla bla" -->
14190 +<rule break="no">
14191 +<beforebreak>\b([Aa]fm[oa]s?|Emcia|Ilt?m[ao]s?|Iltres?|MM|Exc?m[ao]s?|Magf[oa]|D(na)?|Sra?|Sr[ea]s|Srta|Dra?|Dr[ea]s?|Rm[ao]|Rev|Revm[ao]|Mons|Emmo|Rv?d[ao]|[Ll]icd[oa]|[Ll]ic|[Ll]d[oa]|[pP]rofs?)\.\s</beforebreak>
14192 +<afterbreak></afterbreak>
14193 +</rule>
14194 +<!-- num; figs; ca -->
14195 +<rule break="no">
14196 +<beforebreak>\b([Nn][úu]ms?|[fF]igs?|[Pp][aá]xs?|pp?|cc?a)\.\s</beforebreak>
14197 +<afterbreak>\p{N}</afterbreak>
14198 +</rule>
14199 +<!-- num; figs -->
14200 +<rule break="no">
14201 +<beforebreak>\b([Vv]ols?|[Cc]aps?)\.\s</beforebreak>
14202 +<afterbreak>\p{N}|[IVXVDMCL]+</afterbreak>
14203 +</rule>
14204 +<!-- Admóns, admtva, Advo, Admtvos -->
14205 +<rule break="no">
14206 +<beforebreak>\b([Aa]dmóns?|[aA]d(mt)?v[oa]s?)\.\s</beforebreak>
14207 +<afterbreak>\p{Ll}</afterbreak>
14208 +</rule>
14209 +<!-- abrevs, Abl, adx, Acr, conx, loc, prep, subst -->
14210 +<rule break="no">
14211 +<beforebreak>\b([pP]pal|[Vv]des?|[Ii]b[íi]d|[Rr]efs?|[Cc]it|[Aa]brevs?|[Aa]bl|[Aa]dx|[Aa]dv|[Aa]cr|[Cc]onx|[Ll]oc|[Pp]rep|[Ss]ubst)\.\s</beforebreak>
14212 +<afterbreak>[^\p{Lu}]</afterbreak>
14213 +</rule>
14214 +<rule break="no">
14215 +<beforebreak>\b([vV]id|[Cc]fr?)\.\s</beforebreak>
14216 +<afterbreak></afterbreak>
14217 +</rule>
14218 +<!-- coords.; Ed.; eds.; Coord. -->
14219 +<rule break="no">
14220 +<beforebreak>\b([Cc]oord|[Ee]d)s?\.\s</beforebreak>
14221 +<afterbreak></afterbreak>
14222 +</rule>
14223 +<rule break="no">
14224 +<beforebreak>\b([Cc]t[ae]|[Tt]e?lf|[Tt]fno|[Tt]el[eé]f|[Tt]el)s?\.\s</beforebreak>
14225 +<afterbreak>[^\p{Lu}]</afterbreak>
14226 +</rule>
14227 +<!-- multielemento -->
14228 +<rule break="no">
14229 +<beforebreak>\b([oO]p|[lL]oc)\.\s?</beforebreak>
14230 +<afterbreak>cit\.</afterbreak>
14231 +</rule>
14232 +<!-- et al. -->
14233 +<rule break="no">
14234 +<beforebreak>\bet [aá]l\.\s?</beforebreak>
14235 +<afterbreak>[\p{Ll}\p{N}]</afterbreak>
14236 +</rule>
14237 +<!-- Don't split [.?!] when the're quoted -->
14238 +<rule break="no">
14239 +<beforebreak>['"\(][\.!?…]['"\)]\s</beforebreak>
14240 +<afterbreak></afterbreak>
14241 +</rule>
14242 +<rule break="no">
14243 +<beforebreak>\bvs\.\s</beforebreak>
14244 +<afterbreak></afterbreak>
14245 +</rule>
14246 +<rule break="no">
14247 +<beforebreak>\besp\.\s</beforebreak>
14248 +<afterbreak></afterbreak>
14249 +</rule>
14250 +<rule break="no">
14251 +<beforebreak>(…|\.\.\.)\s</beforebreak>
14252 +<afterbreak>\p{Ll}</afterbreak>
14253 +</rule>
14254 +
14255 +<rule break="yes">
14256 +<beforebreak>[\.…][\u00BB\u2019\u201D\u203A"'\u0002]*\s</beforebreak>
14257 +<afterbreak></afterbreak>
14258 +</rule>
14259 +<rule break="yes">
14260 +<beforebreak>\s\p{L}+[\p{Pf}\p{Pe}\u00BB\u2019\u201D\u203A"'\u0002]*[\.:!?…]+\s*</beforebreak>
14261 +<afterbreak>[¡¿«»"'\p{Ps}]*\p{Lu}\p{L}*</afterbreak>
14262 +</rule>
14263 +<rule break="yes">
14264 +<beforebreak>[^\s]:\s</beforebreak>
14265 +<afterbreak>['"«¡¿\p{Ps}\p{Pi}]?\p{Lu}\p{Ll}*</afterbreak>
14266 +</rule>
14267 +</languagerule>
14268 +
14269 +
14270 +</languagerules>
14271 +<maprules>
14272 +<languagemap languagepattern="[a-z]{2}_one" languagerulename="ByLineBreak"></languagemap>
14273 +<languagemap languagepattern="[a-z]{2}_two" languagerulename="ByTwoLineBreaks"></languagemap>
14274 +<languagemap languagepattern="(EL|el).*" languagerulename="Greek"></languagemap>
14275 +<languagemap languagepattern="(PL|pl).*" languagerulename="Polish"></languagemap>
14276 +<languagemap languagepattern="(EN|en).*" languagerulename="English"></languagemap>
14277 +<languagemap languagepattern="(NL|nl).*" languagerulename="Dutch"></languagemap>
14278 +<languagemap languagepattern="(RO|ro).*" languagerulename="Romanian"></languagemap>
14279 +<languagemap languagepattern="(SK|sk).*" languagerulename="Slovak"></languagemap>
14280 +<languagemap languagepattern="(IS|is).*" languagerulename="Icelandic"></languagemap>
14281 +<languagemap languagepattern="(RU|ru).*" languagerulename="Russian"></languagemap>
14282 +<languagemap languagepattern="(SL|sl).*" languagerulename="Slovenian"></languagemap>
14283 +<languagemap languagepattern="(CA|ca).*" languagerulename="Catalan"></languagemap>
14284 +<languagemap languagepattern="(ES|es).*" languagerulename="Spanish"></languagemap>
14285 +<languagemap languagepattern="(DE|de).*" languagerulename="German"></languagemap>
14286 +<languagemap languagepattern="(DA|da).*" languagerulename="Danish"></languagemap>
14287 +<languagemap languagepattern="(EO|eo).*" languagerulename="Esperanto"></languagemap>
14288 +<languagemap languagepattern="(UK|uk).*" languagerulename="Ukrainian"></languagemap>
14289 +<languagemap languagepattern="(BE|be).*" languagerulename="Belarusian"></languagemap>
14290 +<languagemap languagepattern="(GL|gl).*" languagerulename="Galician"></languagemap>
14291 +<languagemap languagepattern=".*" languagerulename="Default"></languagemap>
14292 +</maprules>
14293 +</body>
14294 +</srx>
14295 Index: third_party/segment/Makefile.am
14296 ===================================================================
14297 --- third_party/segment/Makefile.am.orig	2010-08-10 17:33:08.000000000 +0200
14298 +++ third_party/segment/Makefile.am	2012-07-04 11:15:13.620186558 +0200
14299 @@ -1,5 +1,9 @@
14300  AM_JAVACFLAGS = -cp '$(CLASSPATH):*'
14301  javadir = $(libexecdir)/$(PACKAGE)
14302 +segmentdatadir = $(pkgdatadir)
14303 +
14304 +dist_segmentdata_DATA = segment.srx
14305 +
14306  dist_java_JAVA = SegmentInterface.java
14307  dist_java_DATA = \
14308  	activation.jar \

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2014-12-29 14:19:00, 652.5 KB) [[attachment:fedora_pantera-0.9r154-1.i686.rpm]]
  • [get | view] (2014-12-29 14:19:00, 35993.4 KB) [[attachment:fedora_pantera-0.9r154-1.src.rpm]]
  • [get | view] (2014-12-29 14:18:59, 686.4 KB) [[attachment:fedora_pantera-0.9r154-1.x86_64.rpm]]
  • [get | view] (2014-12-29 14:18:59, 266.4 KB) [[attachment:fedora_pantera-debuginfo-0.9r154-1.i686.rpm]]
  • [get | view] (2014-12-29 14:18:58, 277.3 KB) [[attachment:fedora_pantera-debuginfo-0.9r154-1.x86_64.rpm]]
  • [get | view] (2014-12-29 14:19:01, 6049.1 KB) [[attachment:fedora_pantera-lib-0.9r154-1.i686.rpm]]
  • [get | view] (2014-12-29 14:19:00, 6046.7 KB) [[attachment:fedora_pantera-lib-0.9r154-1.x86_64.rpm]]
  • [get | view] (2014-12-29 14:19:00, 6.5 KB) [[attachment:morfeusz-0.82_Polimorf_20130406-1.i686.rpm]]
  • [get | view] (2014-12-29 14:19:01, 35561.3 KB) [[attachment:morfeusz-0.82_Polimorf_20130406-1.src.rpm]]
  • [get | view] (2014-12-29 14:18:59, 6.7 KB) [[attachment:morfeusz-0.82_Polimorf_20130406-1.x86_64.rpm]]
  • [get | view] (2014-12-29 14:18:59, 2.0 KB) [[attachment:morfeusz-debuginfo-0.82_Polimorf_20130406-1.i686.rpm]]
  • [get | view] (2014-12-29 14:18:59, 2.0 KB) [[attachment:morfeusz-debuginfo-0.82_Polimorf_20130406-1.x86_64.rpm]]
  • [get | view] (2014-12-29 14:18:59, 1802.4 KB) [[attachment:morfeusz-lib-0.82_Polimorf_20130406-1.i686.rpm]]
  • [get | view] (2014-12-29 14:19:00, 1972.5 KB) [[attachment:morfeusz-lib-0.82_Polimorf_20130406-1.x86_64.rpm]]
  • [get | view] (2014-12-29 14:19:01, 720.4 KB) [[attachment:opensuse_pantera-0.9r154-1.i586.rpm]]
  • [get | view] (2014-12-29 14:18:59, 35993.4 KB) [[attachment:opensuse_pantera-0.9r154-1.src.rpm]]
  • [get | view] (2014-12-29 14:19:01, 751.1 KB) [[attachment:opensuse_pantera-0.9r154-1.x86_64.rpm]]
  • [get | view] (2014-12-29 14:19:00, 5134.7 KB) [[attachment:opensuse_pantera-lib-0.9r154-1.i586.rpm]]
  • [get | view] (2014-12-29 14:19:01, 5088.6 KB) [[attachment:opensuse_pantera-lib-0.9r154-1.x86_64.rpm]]
  • [get | view] (2015-08-10 11:28:40, 8080.3 KB) [[attachment:pantera_0.9-r150-4_amd64.deb]]
  • [get | view] (2015-08-10 11:28:33, 454.8 KB) [[attachment:patches-r150-4.diff]]
 All files | Selected Files: delete move to page

You are not allowed to attach a file to this page.