pax_global_header00006660000000000000000000000064150754531240014520gustar00rootroot0000000000000052 comment=8ed9577e10561a330ced9b81d39038d404a6fb7d Project-OSS-Revival-enca-36defd7/000077500000000000000000000000001507545312400166065ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/.github/000077500000000000000000000000001507545312400201465ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/.github/dependabot.yml000066400000000000000000000002421507545312400227740ustar00rootroot00000000000000version: 2 updates: - package-ecosystem: github-actions directory: / schedule: interval: daily labels: - dependencies - automerge Project-OSS-Revival-enca-36defd7/.github/workflows/000077500000000000000000000000001507545312400222035ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/.github/workflows/docs.yml000066400000000000000000000015121507545312400236550ustar00rootroot00000000000000name: Documentation on: [push, pull_request] jobs: docs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - name: Update apt run: sudo apt-get update - name: Install apt deps run: sudo apt-get install -y gtk-doc-tools - name: Configure build run: ./configure --enable-gtk-doc - name: Build run: make -j4 - name: Build docs run: make -C devel-docs docs - name: Fixup docs run: find devel-docs/html/ -type f -name '*.html' -print0 | xargs -r -0 sed -i 's@/libenca/@/doc/@' - name: Deploy uses: peaceiris/actions-gh-pages@v4.0.0 if: github.event_name == 'push' && github.event.ref == 'refs/heads/master' with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./devel-docs/html/ Project-OSS-Revival-enca-36defd7/.github/workflows/msys2.yml000066400000000000000000000015431507545312400240060ustar00rootroot00000000000000name: MSYS2 on: [push, pull_request, workflow_dispatch] jobs: msys2-ucrt64: runs-on: windows-latest defaults: run: shell: msys2 {0} steps: - uses: msys2/setup-msys2@v2 with: msystem: UCRT64 update: true install: git mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-libiconv mingw-w64-ucrt-x86_64-recode make dos2unix diffutils - name: Force windows git to use LF shell: pwsh run: | git config --global --add core.autocrlf false - uses: actions/checkout@v5 - name: Configure build run: ./configure --disable-shared - name: Build run: make -j$(nproc) - name: Test run: make test - name: Test log run: cat test/test-suite.log - name: Install run: make install DESTDIR=/tmp/inst Project-OSS-Revival-enca-36defd7/.github/workflows/test.yml000066400000000000000000000010221507545312400237000ustar00rootroot00000000000000name: Tests on: [push, pull_request] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - name: Update apt run: sudo apt-get update - name: Install apt deps run: sudo apt-get install -y librecode-dev - name: Configure build run: ./configure - name: Build run: make -j4 - name: Test run: make test - name: Test log run: cat test/test-suite.log - name: Install run: make install DESTDIR=/tmp/inst Project-OSS-Revival-enca-36defd7/.gitignore000066400000000000000000000003411507545312400205740ustar00rootroot00000000000000Makefile config.h config.log config.status enca.pc libtool stamp-h1 iconvenc.h enca.spec iconvcap autom4te.cache tags TAGS *.swp *~ *.bak *.log *.trs *.o *.gcov *.gcno *.gcda .libs/ enca-*.tar.bz2 enca-*.tar.gz enca-*.tar.xz Project-OSS-Revival-enca-36defd7/AUTHORS000066400000000000000000000007331507545312400176610ustar00rootroot00000000000000David Necas (Yeti) Zuxy Meng (Chinese encodings support) Michal Cihar (maintenance and merging patches) Unicode data in src/unicodemap.c comes from various free on-line resources. Files src/getopt_long.c src/getopt.h come from GNU libc getopt_long by the Free Software Foundation. Character type table lib/ctype.c is based on GLib one, by Peter Mattis, Spencer Kimball, Josh MacDonald, and the GLib Team. Project-OSS-Revival-enca-36defd7/COPYING000066400000000000000000000432451507545312400176510ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. Project-OSS-Revival-enca-36defd7/ChangeLog000066400000000000000000000422531507545312400203660ustar00rootroot00000000000000#============================================================================ # Enca v1.21 (2025-10-20) guess and convert encoding of text files # Copyright (C) 2000-2003 David Necas (Yeti) # Copyright (C) 2009-2016 Michal Cihar #============================================================================ List of user-visible changes in Enca More detailed log can be obtained from older changelogs or git log. Legend: + new feature * change of behaviour (including disappearing of a feature) - bugfix enca-1.21 + Add support for Finnish language with CP1267 charset. + Added -without-librecode to configure script - Fixed --with-libiconv and --without-libiconv options - Removed old travis ci link from readme. - Update source path in enca.spec.in - Fixed language tools build warnings and error. enca-1.20 - fix crosscompilation issues - fix documentation build - fix compiler warnings - fix librecode detection - fix normalize.py input format + with --disable-gtk-doc docs are not installed + add support for testing on MSYS2 MINGW - fixed normalize.pl input format. + add usage help to normalize.pl and countall enca-1.19 2016-09-05 - fix possible memory leak - make utf-8 detection work even on one character enca-1.18 2016-01-07 - fix installation of devhelp documentation enca-1.17 2016-01-04 - Fixed conversion of GB2312 encoding with iconv - Fixed iconv conversion on OSX - Documentation improvements - Fixed execution of external converters with ACLs - Improved test coverage to 80% enca-1.16 2014-10-20 - Fixed typo in Belarusian language name - Added aliases for Chinese and Yugoslavian languages enca-1.15 2013-09-30 - Documentation improvement - Development moved to GitHub - Do not use deprecated autoconf macros enca-1.14 2012-09-11 - Allow standard names for belarusian and slovenian languages, thanks to Branislav Geržo for suggestion. - Reset strictness when check buffer less than file size, thanks to Sam Liao. - Fixed typos in man page, thanks to A. Costa. enca-1.13 2010-02-09 - Reverse usage of temp file while converting using recode to prevent file truncation (bug #1135). enca-1.12 2009-10-29 - Fixes some minor memory leaks. - Fixes little problems in autoconf scripts. enca-1.11 2009-09-25 - Dropped scanf configure test which is not used at all. - Fixes some wrong format strings. enca-1.10 2009-08-25 + Enca is back alive or at least in maintenance mode. * Enca now lives in git repository, see . - Add missing charset koi8u to belarusian language. - Fixed some typos in program and documentation. enca-1.9 2005-12-18 + support for HZ encoding * Big5 and GBK detection improved - enca.spec no longer installs docs to world-unreadable directory enca-1.8 2005-11-24 + Chinese (Big5 and GBK) support (thanks to Zuxy) * deb/ subdirectory is gone as there is finally an Enca package in Debian (thanks to Michal Cihar) - manual page clean-up (thanks to Michal Cihar) enca-1.7 2005-02-27 + new name type: preferred MIME name (option -m) - broken iconv detection on some system was fixed enca-1.6 2004-09-01 * English language names (--list=languages, enca_language_english_name()) were changed to lowercase to match common locale aliases - Win32, i.e. MinGW and Cygwin, build problems were fixed enca-1.5 2004-05-30 - crash on impossible recovery after iconv failure in pipe was fixed - rpm building problems on Mandrake Linux were fixed enca-1.4 2004-05-12 - dependency of guessing API on locales (via ctype functions) was fixed - --help text generation failure on some systems was fixed enca-1.3 2003-12-24 + [libenca] it's possible to get analyser option values, not just set them * a good BOM (byte order mark) increases the chance of being recognized for UCS-4 and UTF-8 too * external converter wrappers were moved from bin to libexec and the b- prefix was removed (though it still works) * external converters are no longer searched in PATH, nonstandard ones has to be specified with full path enca-1.2 2003-11-26 - fixed segfault in language detection for some locale setups enca-1.1 2003-11-17 - fixed losing data at the end of file when using external converters in a pipe (and maybe in other situations) - [libenca] enca_analyser_free() not freeing analyser completely was fixed enca-1.0 2003-11-06 * deprectated options -T, -R, -S, -u, -U, -m, and -M were finally removed * default HTML API docs installation path changed to the new gtk-doc style (DATADIR/gtk-doc/html/enca) * debian/ subdir moved to deb/ to allow official deb creation w/o too much hassle enca-0.99.4 2003-07-15 - several race conditions in librecode and iconv interfaces were fixed - temporary file names are much less predictable now enca-0.99.3 2003-06-30 * Debian package is back from death * failure to find external converter is now fatal - fixed build problems on FreeBSD (and probably other Unices) - libiconv is not used for `conversion to ASCII' since never does the Right Thing, whatever it is - when conversion with libiconv fails, the file should now survive intact - fixed build problems on systems w/o libiconv (hopefully) - fixed distclean and uninstall targets to really clean and uninstall everything - fixed builds with separate source (read-only) and build directories - fixed builds with --without-libiconv and --without-librecode on GNU/Linux - external converter is not checked when it's not going to be used enca-0.99.2 2003-06-25 + EOL type is used to decide ambiguous cases, e.g. CP1250 is reported instead of ISO-8859-2/CRLF * --list languages by default prints English names, instead of ISO-639a codes, use -e or -r to get the old listing * if LC_CTYPE is something like en_US, more locale categories are examined to detect the language * cork charset was modified to contain \n, \r and \t in the same places as ASCII * some heuristics tuning enca-0.99.1 2003-06-22 + libenca pkg-config support * all libenca tuning parameters (-T, -R, -S, -u, -U, -m, and -M) were marked deprecated and are noop, Enca should DWIM * ambiguity is now always OK when the sample has the same meaning in all the charsets * deprecated `built-in-encodings' and `encodings' lists were removed * PAGER feature was removed - exchanged `latvian' and `lithuanian' language names were fixed (`lv' and `lt' were always OK) - missing tests for the new languages was added to the test suit enca-0.99.0 2003-06-14 + added some support for: Bulgarian, Croatian, Estonian, Hungarian, Latvian, Lithuanian, Slovene + a new algorithm for 8bit-dense languages (cyrillics), the old one is used as a fallback * removed support for non-transitive iconv (such a thing should not exist) * auxiliary tools in data are not longer built in regular builds, use --enable-maintainer-mode to rebuild them, create dists, etc. - fixed iconv interface surface check pickier than iconv itself inhibiting some otherwise possible conversions - fixed u+x permissions on temporary files (from 0.10.7) - fixed not deleting temporary files in iconv interface - fixed broken iconv interface behaviour in pipes - fixed iconvcap misdetecting Latin5 as ISO-8859-5 - fixed casual `make distclean' failures enca-0.10.7 2003-01-28 - fixed interchanged iconv and cstocs encoding names - corrected(?) librecode surface interaction - fixed a temporary file creation race condition * added tex and utf8 to cstocs (names and b-cstocs) enca-0.10.6 2002-10-22 + enconv uses DEFAULT_CHARSET variable, exactly as recode - ENCAOPT works everywhere, albeit imperfectly - options -P and -p no longer imply -M too - ambiguous mode (-M) works again - pager is run so that help text doesn't disappear - standard input it printed as STDIN with -d, not as null - make check works again - it compiles wihtout recode again enca-0.10.5 2002-10-13 + UTF-8 recognition in binary and otherwise messy files + detection of double-encoding from some 8bit charset to UTF-8 + Cork encoding conversion * librecode interaction was (hopefully) improved - fixed some build-time problems enca-0.10.4 2002-10-10 + added Cork encoding support for Czech, Slovak and Polish - empty files are now considered convertible to any encoding - removed the so-called faster (in fact slower) I/O - fixed some more compile-time search path issues enca-0.10.3 2002-09-22 * added support for perl umap as external converter - fixed external converter wrappers to work with standard sh - fixed some compile-time library search path issues enca-0.10.2 2002-09-15 + target charset is automatically obtained from locales when called as enconv, new options --guess, --auto-convert + English language names can be used instead of ISO-639 codes everywhere - cs_SK and ru_UA locales are properly recognised as Slovak and Ukrainian enca-0.10.1 2002-08-29 + faster I/O * external converters can be disabled at build time - `-' is accepted for standard input - fixed broken built-in converter - fixed crasing on an unknown language - trivial (identity) conversions are not performed any more - help is now printed when input is a terminal and no argument specified - changed braindamaged , to STDIN, STDOUT in messages - various small fixes and build-time improvements enca-0.10.0 2002-08-26 + added support for Ukraininan (CP1251, IBM855, ISO-8859-5, KOI8-U, maccyr CP1125), Belarusian (CP1251, IBM866, ISO-8859-5, KOI8-UNI, maccyr, IBM855) and Polish (ISO-8859-2, ISO-8859-12, ISO-8859-16, Baltic, macce, IBM852, CP1250) + Enca library introduced * dropped native Debian package * --details no longer prints guessing details (now is mostly like --human) * --list=encodings, --list=built-in-encodings corrected to --list=charsets, --list-built-in charsets (old names supported with a warning) * improved Czech and Slovak charsets detection enca-0.9.4: 2002-03-03 - built-in converter didn't convert more than first 64kB of a file enca-0.9.3: 2001-07-16 + a native Debian package - fixed random reporting of nonsense results - fixed self-contradictory --details output when file was quoted-printable encoded - fixed poor performance on non-GNU/Linux - made pager less intrusive (instead of intrusive `less' ;-) - --list=encodings prints only `known' encodings - fixed several compile-time/portability problems enca-0.9.2: 2001-07-13 * --help and --license are displayed through pager (when possible) - fixed broken language hooks--they were never activated (from 0.9.1) - fixed reporting ASCII when a 7bit encoding was detected - fixed boundary-case behaviour when recovering from librecode failures enca-0.9.1: 2001-06-25 + support for Macintosh Cyrillic, including conversion + support for unusual UCS-4 byte orders (3412 and 2143) + new option --license printing full enca license * exit codes now make sense (0, 1, 2; where 2 means serious troubles) - temporary files are no longer world-readable enca-0.9.0: 2001-03-26 Serious incompatibilities: * -E and -C option letters exchanged (much better mnemonics) * converter wrappers renamed to b-cstocs and b-recode * finding only 7bit ASCII is no longer considered failure * need to use --language to set language (sometimes) * dull converter behaviour no longer supported, -x syntax changed * option -g removed (try --name=aliases) * option -c changed to --list=converters, listing format changed * option -l changed to --list=encodings, listing format changed * converter names are no longer case insensitive * no longer uses cstocs names as canonical * external converters are called with Enca's names, not cstocs's Other changes: + support for slovak and russian (and `none') language + support for CP1251, IBM866, ISO-8859-5 and KOI8-R, including conversion + UCS-2, UCS-4, UTF-8, UTF-7 and LaTeX encoding recognition + much more encoding aliases accepted + long `GNU style' command line options + new output types: --enca-name, --iconv-name + output type --name=WORD allowing to select output type by name + ENCAOPT environment variable + language detection from locales + support for surfaces (experimental) + new option --list printing various listings + new converter wrapper b-map (for perl `map') + new option -m to reset -M back + new language filters + new options -u and -U to control multibyte encoding checks + included [generated] enca.spec into the tarball to allow `rpm -tb' * -d output improved * read limit changed to 16MB * librecode now run with flags diacritics_only and ascii_graphics - fixed broken -P options - fixed several build problems on non-GNU/Linux systems - fixed some missing and wrong characters in Unicode data - temporary copy of damaged original file is not deleted when rescue fails enca-0.8.x: Since features planned for 0.8 and 0.9 happened to be developed simultaneously, this version number has been skipped. enca-0.7.7: 2001-01-01 + ability to use UNIX98 iconv conversion functions + the word `none' can be used as -E parameter causing clearing of converter list - fixed disarranged help text, misspelled word `European' in macce long name, obsolete statements in manual page and other stuff of this kind enca-0.7.6: 2000-11-20 + any converter combination/order can be now specified with -E, old -E meaning is no longer valid + new option -c (list all valid converter names) * cork encoding not supported anymore * better verbosity * `/' is added to recode recoding requests thus partially solving the surface problem---surface never changes * some errors like specifying invalid value of threshold are no longer fatal, the bad values are ignored instead * handling of some exotic characters in bulit-in converter slightly changed - fixed several fatal bugs regarding stdin to stdout conversion - stdin is copied to stdout in case of failure whenever possible/applicable enca-0.7.5: 2000-10-25 * license changed to GNU GPL Version 2 (i.e. license version is explicitly specified) * prints error message when conversion is impossible * binary data filter improved/changed - fails back to external converter when GNU recode library cannot convert due to errorneous request - '' no longer causes enca to read from stdin - tries to restore files damaged by GNU recode library enca-0.7.4: 2000-10-12 + box-drawing characters are (carefully) filtered out when guessing - fixed intermixed behaviour in SMS/nonSMS modes enca-0.7.3: 2000-10-09 + blocks of probably binary data are filtered out when guessing * standard input is copied to standard output when its encoding is unknown - fixed reading only 4096 bytes from pipe (from 0.7.1) enca-0.7.2: has been never released + GNU recode recoding chains made possible by starting -x (convert) parameter with `..' + second best guess is marked with `-' in -d (print details) output enca-0.7.1: 2000-10-02 * in case of nonfatal i/o failure enca continues processing remaining files enca-0.7.0: 2000-09-26 + standard input to standard output conversion + short message mode -M + ability to use GNU recode library + new output type -r (encoding name after RFC1345) + ability to convert cork internally + new external converter brecode (recode wrapper) + new output type -g (list of aliases) + new option -V (verbose) * -x (convert) paramteres syntax changed to in_enc..out_enc (old syntax still supported, will be removed in 0.8.x) * option -e (disable external) no longer supported, empty string as -C (external converter) parameter can be used instead * encoding names specified as -x (convert) parameters are case insensitive * ascii is not considered unknown encoding (i.e. failure) so enca returns 0 * -d (print details) output improved/changed/updated * -p (prefix result with file name) no longer prints conversion details * by default result is prefixed by file name when enca is run on more than one file enca-0.6.2: 2000-08-17 + help texts (-h and -v) made usable (thanx to Halef) enca-0.6.1: 2000-08-15 - tarball bugfix enca-0.6.0: 2000-07-20 + bulilt-in converter + -x (convert) can now take form -x in_enc,out_enc causing enca to behave like a dull converter + new options -e and -E (disable internal/external converter) + new option -l (print internally-convertible encodings) enca-0.5.0: 2000-07-17 * -p (prefix result with file name) causes enca to print what is converted and how * iso8859-2/cp1250 recognition improved - doesn't spawn external converters as fast as is possbile, but waits for them to return - fixed `Unrecognized encoding' when winner is 1250 (from 0.4.3) - corrected -d (print details) table alignment enca-0.4.3: 2000-07-14 * -d (print details) prints encodings alphabetically sorted - corrected short encoding name t1 -> cork - division-by-zero bugfixes enca-0.4.2: has been never released * options -m/-M ([don't] use iso8892-2/cp1250 hack) no longer supported - fixed showing standard input as empty string ( is printed now) enca-0.4.1: 2000-07-12 * default of 60 significant characters changed to 10 enca-0.4.0: 2000-07-10 + first public release Project-OSS-Revival-enca-36defd7/ChangeLog.old000066400000000000000000001461271507545312400211500ustar00rootroot00000000000000 # This ChangeLog starts after enca became a library. # See ChangeLog.prelib for changes before that. # Unfortunately, there's no ChangeLog for the transition. # Later changelog is not maintained for details check Git tree. v1.9 2005-12-18 David Necas (Yeti) * NEWS: fixed version number 2005-12-18 David Necas (Yeti) * configure.ac, src/options.c, AUTHORS: updated version info 2005-12-18 David Necas (Yeti) * man/enca.1, NEWS, INSTALL: updated docs 2005-12-01 David Necas (Yeti) * data/Makefile.am, test/Makefile.am: added new files to distribution 2005-12-01 David Necas (Yeti) * iconvcap.c, data/chinese/chinese.h, data/chinese/zh_weight_big5.h, data/chinese/zh_weight_big5.txt, data/chinese/zh_weight_gb.txt, data/chinese/zh_weight_gbk.h, lib/encnames.c, lib/guess.c, lib/internal.h, lib/lang.c, lib/lang_be.c, lib/lang_bg.c, lib/lang_cs.c, lib/lang_et.c, lib/lang_hr.c, lib/lang_hu.c, lib/lang_lt.c, lib/lang_lv.c, lib/lang_pl.c, lib/lang_ru.c, lib/lang_sk.c, lib/lang_sl.c, lib/lang_uk.c, lib/lang_zh.c, lib/multibyte.c, src/convert.c, test/test-guess-short.expected, test/zh-s.hz, tools/encodings.dat, tools/iconvenc.null: incorporated Zuxy's patches that add HZ encoding and improve existing detection, with some code fixes; hz test added to tests 2005-12-01 David Necas (Yeti) * gendoc.pl: some updates to new gtk-doc v1.8 2005-11-24 David Necas (Yeti) * lib/encnames.c: documeneted ENCA_NAME_STYLE_MIME 2005-11-24 David Necas (Yeti) * lib/Makefile.am: bumped library version * enca.spec.in, README: added Chinese 2005-11-24 David Necas (Yeti) * test/setup.sh, test/zh-s.big5, test/zh-s.gbk, test/zh-s.utf8, test/test-convert-64.sh, test/test-convert-filter.sh, test/test-guiess-utf8.sh, test/test-default-cs.sh, test/test-guess-short.expected, test/Makefile.am: added zh tests files, modified conversion tests to skip over languages that do not have test pair defined 2005-11-24 David Necas (Yeti) * lib/multibyte.c: attempted to merge updated patch by Zuxy 2005-11-24 David Necas (Yeti) * THANKS, AUTHORS, configure.ac: bumped version, added people 2005-11-24 David Necas (Yeti) * deb/*, Makefile.am: removed deb from CVS and distribution 2005-11-24 David Necas (Yeti) * NEWS: updated 2005-11-24 David Necas (Yeti) * iconvcap.c, lib/guess.c, lib/internal.h, lib/lang.c, lib/Makefile.am, lib/multibyte.c, lib/utf8_double.c, tools/encodings.dat, lib/lang_zh.c, man/enca.1: Applied Chinese support patch by Zuxy (with some small fixes). 2005-09-06 David Necas (Yeti) * man/enca.1: fixed lots of - to \- (thanks to Michal Cihar) 2005-05-02 David Necas (Yeti) * src/convert.c, src/options.c: fixed HAVE_ICONV to HAVE_GOOD_ICONV v1.7 2005-02-27 David Necas (Yeti) * tools/encodings.dat: fixed MIME name of UTF-7 to UNICODE-1-1-UTF-7 (both are registered, the latter used) 2005-02-27 David Necas (Yeti) * src/convert_iconv.c: fixed a gcc warning 2005-02-27 David Necas (Yeti) * lib/Makefile.am: changed library version (interface added) * configure.ac, NEWS, deb/changelog: bumped version * INSTALL, THANKS: updated 2005-02-27 David Necas (Yeti) * man/enca.1: documented -m option, fixed mention of --list encodings 2005-02-27 David Necas (Yeti) * tools/make_hash.c, tools/encodings.dat, lib/enca.h, lib/encnames.c, lib/internal.h, src/options.c, src/enca.c, src/common.h, src/HELP.in: added new name style: preferred MIME name * iconvcap.c: added a few ISO-8859-16 aliases 2004-12-09 David Necas (Yeti) * src/common.h: removed long dead PAGER stuff 2004-11-17 David Necas (Yeti) * m4/libiconv.m4: use system libiconv.m4 * autogen.sh: require automake 1.8 or better for iconv test related macros * src/convert_iconv.c, src/common.h: update for new iconv preprocessor symbols * config.rpath: added v1.6 2004-07-22 David Necas (Yeti) * src/Makefile.am: add $(EXEEXT) to binary names before trying to symlink enca -> enconv 2004-07-22 David Necas (Yeti) * src/Makefile.am: concatenate $(DESTDIR) and $(bindir) w/o / between, // has some silly interpretation on Win32 * Makefile.am: ditto for $(man1dir) 2004-07-22 David Necas (Yeti) * THANKS, INSTALL: updated 2004-07-20 David Necas (Yeti) * lib/lang_be.c, lib/lang_bg.c, lib/lang_cs.c, lib/lang_et.c, lib/lang_hr.c, lib/lang_hu.c, lib/lang_lt.c, lib/lang_lv.c, lib/lang_pl.c, lib/lang_ru.c, lib/lang_sk.c, lib/lang_sl.c, lib/lang_uk.c: changed English language names to lowercase to match locale names 2004-07-20 David Necas (Yeti) * configure.ac, NEWS, deb/changelog: bumped version 2004-07-20 David Necas (Yeti) * configure.ac, src/locale_detect.c: check whether LC_MESSAGES is defined, and don't use it if it doesn't 2004-07-20 David Necas (Yeti) * src/filebuf.c: first attempt to emulate ftruncate() with _chsize() on Win32 2004-07-20 David Necas (Yeti) * src/convert.c: fixed a compiler warning 2004-06-01 David Necas (Yeti) * lib/internal.h: addef if (ptr) to enca_free() definition * lib/internal.h, lib/enca.c, lib/lang.c, lib/lang_be.c, lib/lang_bg.c, lib/lang_cs.c, lib/lang_et.c, lib/lang_hr.c, lib/lang_hu.c, lib/lang_lt.c, lib/lang_lv.c, lib/lang_pl.c, lib/lang_ru.c, lib/lang_sk.c, lib/lang_sl.c, lib/lang_uk.c: added lcbits, ucbits fields to analyser, lcuchook to language info, and initializing and finalizing them, otherwise they are unused v1.5 2004-05-30 David Necas (Yeti) * deb/changelog, configure.ac, NEWS: updated and bumped version to 1.5 2004-05-27 David Necas (Yeti) * src/convert_iconv (iconv_one_step): fixed bad can't-recover-in-a-pipe condition making it try to recover in a pipe with inevitable segfault 2004-05-24 David Necas (Yeti) * devel-docs/Makefile.am: removed `-' from cp of most files to make impossible to build tarballs w/o docs 2004-05-24 David Necas (Yeti) * configure.ac: bumped version to 1.4.1 2004-05-24 David Necas (Yeti) * m4/gtk-doc.m4, m4/libiconv.m4, m4/libm.m4, m4/librecode.m4, m4/localias.m4, m4/recode-bugs.m4, m4/scanf.m4, m4/tools.m4, m4/typevar.m4: fixed underquoted definitions * Makefile.am, m4/compress.m4, m4/libtoo.m4: removed useless m4 files v1.4 2004-05-11 David Necas (Yeti) * lib/Makefile.am: bumped library version * configure.in, THANKS, INSTALL, NEWS: bumped version, updated 2004-05-11 David Necas (Yeti) * lib/ctype.c, lib/internal.h, lib/encnames.c, lib/Makefile.am: replaced locale-dependent ctype macros with a fixed flag table for ASCII; it also directly defines istext, isbinary, and characters acceptable in charset names, all callers changed 2004-03-20 David Necas (Yeti) * man/enca.1: using logical sectioning (.SS) 2004-03-08 David Necas (Yeti) * src/test2c.sh: replaced \0 with &, some *nix seds don't know \0 v1.3 2003-12-23 David Necas (Yeti) * lib/utf8_double.c: enca_double_utf8_get_candidates() may be called w/o prior enca_double_utf8_check(), returns NULL then; public function docs were improved 2003-12-23 David Necas (Yeti) * enca.pc.in: fixed undefined libexecdir 2003-12-23 David Necas (Yeti) * devel-docs/Makefile.am, devel-docs/libenca-docs.sgml: moved to new-style gtk-doc docs and xml, distributing and installing .devhelp files * m4/gtk-doc.m4: requiring version 1.0 * lib/guess.c: added `Since: 1.3' to the new functions 2003-12-22 David Necas (Yeti) * lib/guess.c, lib/enca.h: added functions to retrieve analyser options * lib/enca.h, lib/encnames.c, lib/enca.c, lib/unicodemap.c: moved docs from enca.h to .c files * lib/Makefile.am: bumped library version (ifaces added) 2003-12-22 David Necas (Yeti) * script/Makefile.am: remove b- from wrapper names and install them to libexec instead of bin, creating non-b- versions using cat * src/convert_extern.c: removed check_executability() (i.e. searching in PATH), trying to remove b- prefix from extrnal converter names and find them in EXTCONV_DIR, added deprecation warning messages * deb/enca.dirs, deb/enca.files: added the libexec dir * enca.pc.in: added encaextconvdir variable * script/Makefile.am: excluded converter wrappers from --help and --version tests * script/b-cstocs.in, script/b-map.in, script/b-piconv.in, script/b-recode, script/b-umap.in: added an error message when empty $3 (i.e. probably not called by enca) * man/enca.1: updated 2003-12-21 David Necas (Yeti) * lib/multibyte.c (what_if_it_was_ucs4, is_valid_utf8, looks_like_utf8): added bonuses for a good BOM for corresponding transformation formats * lib/Makefile.am: bumped library soversion v1.2 2003-11-26 David Necas (Yeti) * src/locale_detect.c: rewrote the locale and language name mangling functions to take constant strings and always return a newly allocated one, fixing segfaults for some language detection paths * configure.ac: bumped version v1.1 2003-11-17 David Necas (Yeti) * configure.ac: bumped version * src/convert.c (copy_and_convert): added fflush(file_to->stream) fixing occasional losing file tails, namely with external converters 2003-11-17 David Necas (Yeti) * configure.ac, lib/internal.h, lib/common.c (enca_strdup): use our strdup always, not the system one, since we rely on strdup(NULL) -> NULL * src/locale_detect.c: fixed trying the same untransformed -L argument twice for codeset instead of trying the transformed one the second time * src/convert.c, src/locale_detect.c: added atexit() memory freeing 2003-11-16 David Necas (Yeti) * configure.ac, lib/common.c (enca_malloc), src/Makefile.am, test/Makefile.am: re-added strdup() test so that native strdup is used when present, removed malloc test, moved LDADD stuff to foobar_LDADD to placate automake-1.7 * lib/enca.c (enca_analyser_free), lib/Makefile.am: fixed not freeing the analyser itself * src/enca.c (process_file): fixed not freeing file on failure, and added a few more clean-up actions v1.0 2003-11-06 David Necas (Yeti) * debian/, deb/: renamed the former to the latter 2003-11-06 David Necas (Yeti) * src/options.c (interpret_opt): finally removed all the deprecated options * lib/lang_bg.c (eol_hook): removed since unused * lib/encnames.c, lib/guess.c, lib/multibyte.c, lib/filters.c, lib/pair.c, lib/enca.c, src/filebuf.c, src/locale_detect.c, src/options.c: fixed compiler warnings 2003-10-14 David Necas (Yeti) * m4/gtk-doc.m4, enca.spec.in: changed default dir for HTML documentation to new gtk-doc style /usr/share/gtk-doc/html/enca 2003-08-31 David Necas (Yeti) * configure.ac: put output files to AC_CONFIG_FILES instead of AC_OUTPUT 2003-08-31 David Necas (Yeti) * lib/Makefile.am, src/Makefile.am, test/Makefile.am: moved -I/foo/bar from blabla_CFLAGS= to INCLUDES= making automake/libtool to stop giving objects the long funny names 2003-07-31 David Necas (Yeti) * script/b-piconv.in, script/Makefile.am, configure.ac: added piconv ,perl iconv` wrapper, changed the ugly default converter code to a for-cycle * m4/localias.m4: fixed an excess locale/ in paths 2003-07-15 David Necas (Yeti) * configure.ac, src/filebuf.c: check for arandom and srandom too, just in case v0.99.4 2003-07-15 David Necas (Yeti) * src/enca.c (process_file): open files in a directly in r+b mode when conversion is required * src/convert_iconv.c: avoided file reopening and unlinking of closed files, some reorganization * src/convert_recode.c: avoided file reopening and unlinking of closed files * test/test-iconv.sh: fixed conversion failure test actually testing uknown charset failure * test/test-recode.sh, test/Makefile.am: added librecode interface test 2003-07-15 David Necas (Yeti) * src/filebuf.c (file_temporary), src/common.h, src/convert_extern.c, src/convert_iconv.c, src/convert_recode.c: added unlink-after-open parameter to file_temporary * src/convert_extern.c (convert_extern): unser some obscure failure, NULL file might be unlinked, removed a bogus error message * test/test-extern.c, test/failing-converter.sh, test/failing-converter2.sh, Makefile.am: added tests whether external converter errors are correctly propagated 2003-07-13 David Necas (Yeti) * test/setup.sh, test/finish.sh, test/test-external.sh, test/test-iconv.sh: skipped tests return 77 2003-07-13 David Necas (Yeti) * configure.ac: use AC_HEADER_TIME, AC_HEADER_STDBOOL * src/convert_recode: changed bool definition to what autoconf recommends * src/common.h, src/options.c: e_isatty -> enca_isatty * src/filebuf.c (random_seed_init, temporary_file_name), src/common.c: use /dev/urandom or /dev/random for prng seeding if possible and use random instead of rand if possible 2003-07-12 David Necas (Yeti) * configure.ac: use AC_GNU_SOURCE to define _GNU_SOURCE * configure.ac: added checks for mktemp(1), random, gettimeofday, /dev/random, /dev/urandom * script/b-cstocs, script/b-map, script/b-umap, script/b-cstocs.in, script/b-map.in, script/b-umap.in, script/Makefile.am: the scripts now use a more random temporary file name, if possible the exact way of temporary filename generation is chosen configure-time 2003-07-06 David Necas (Yeti) * m4/localias.m4: added locale.aliases beside locale.alias, and x11 locale aliases as the last resort * src/locale_detect.c (locale_alias_convert): added support for : after alias name 2003-07-03 David Necas (Yeti) * src/enca.c (dwim_libenca_options): tweaked mu to 0.005 v0.99.3 2003-06-30 David Necas (Yeti) * debian/rules, debian/libenca0.files, debian/libenca-dev.files: fixed cleaning and shlib searching 2003-06-30 David Necas (Yeti) * tools/Makefile.am: fixed taking iconvenc.h from srcdir instead of buildir (breaking all iconv stuff) 2003-06-30 David Necas (Yeti) * test/finish.sh: added removing $TESTNAME.tmp * test/test-extern.sh, test/dummy-converter.sh, test/test-external.expected: added external converter test * test/test-convlist.sh: added --list converters vs. --version test * test/test-iconv.sh: added iconv interface test * test/test-pP.sh, test/test-pP.expected: added filename prefixing test * test/Makefile.am: added the stuff 2003-06-30 David Necas (Yeti) * src/options.c (interpret_opt), src/convert.c (add_converter, extern_converter_listed), src/convert_extern.c (check_external_converter, set_external_converter), src/common.h: external converter is checked for executability only when conversion with external is going to take place, but failure is now fatal 2003-06-29 David Necas (Yeti) * debian/changelog, debian/control, debian/copyright, debian/docs, debian/enca.dirs, debian/enca.files, debian/libenca-dev.dirs, debian/libenca-dev.doc-base, debian/libenca-dev.files, debian/libenca0.dirs, debian/libenca0.files, debian/postinst, debian/postrm, debian/preinst, debian/prerm, debian/rules, debian/watch, Makefile.am: added debian stuff 2003-06-29 David Necas (Yeti) * lib/lang.c: fixed a missing NULL eolhook initializer * lib/lang_bg.c (eol_hook), lib/lang_et.c (eol_hook): fixed returning a pointer instead of calling the hook func 2003-06-29 David Necas (Yeti) * m4/libiconv.m4, m4/librecode.m4: fixed restoring yeti_save_CPPFLAGS and yeti_save_LDFLAGS even when they were not saved, breaking build with --without-libiconv 2003-06-28 David Necas (Yeti) * Makefile.am, devel-docs/Makefile.am, lib/Makefile.am, src/Makefile.am, test/Makefile.am, tools/Makefile.am: made `make distcheck' work; iconvenc.h is not distributed, src/encodings.h is properly cleaned, devel-docs are rebuilt only on explicite `make docs' 2003-06-26 David Necas (Yeti) * tools/Makefile.am: added missing BOXVERT_CP1125 2003-06-26 David Necas (Yeti) * tools/expand_table.pl: changed calling convention so that it works better with VPATH builds * m4/recode-bugs.m4: added $srcdir for long-text.l2 and crash-me * m4/libiconv.m4: added $srcdir for iconvcap.c, tools/iconvenc.null * test/test-ENCAOPT.sh, test/test-aliases.sh, test/test-convert-64.sh, test/test-convert-filter.sh, test/test-default-cs.sh, test/test-empty.sh, test/test-errors.sh, test/test-guess-short.sh, test/test-guess-stdin.sh, test/test-guess-utf8.sh, test/test-lists.sh, test/test-long-texts.sh, test/setup.sh, test/finish.sh, test/Makefile.am: added $srcdir, $top_srcdir, $top_builddir where appropriate, exported them in TESTS_ENVIRONMENT in the Makefile * tools/iconvenc.null: added the new charsets * lib/Makefile.am, src/Makefile.am, data/Makefile.am, test/Makefile.am, tools/Makefile.am, Makefile.am, script/Makefile.am, devel-docs/Makefile.am: added $(srcdir), $(top_srcdir), and $(top_builddir) where appropriate so that VPATH builds succeed * src/Makefile.am: HELP.c and COPYING.c are cleaned on make clean * Makefile.am: iconvenc.h is distributed identical to iconvenc.null * devel-docs/Makefile.am: all the gtk-doc stuff is build only in maintainer mode, added missing uninstall rule 2003-06-26 David Necas (Yeti) * src/convert_iconv.c (iconv_one_step, convert_iconv): when iconv fails, try to recover the file * filebuf.c (file_fileno, file_truncate): added fileno(3) and ftruncate(2) wrappers * configure.ac: removed redundant popen check 2003-06-25 David Necas (Yeti) * src/convert_iconv.c (convert_iconv): don't try conversion to ASCII, it never works 2003-06-25 David Necas (Yeti) * lib/enca.h, lib/internal.h, src/common.h, lib/multibyte.c, lib/guess.c: #include for ssize_t, removed a few misguided #ifdefs for probably non-macro symbols v0.99.2 2003-06-25 David Necas (Yeti) * src/Makefile.am: removed dirty.h 2003-06-25 David Necas (Yeti) * src/locale_detect.c (detect_lang, set_raw_locale, detect_user_language, detect_target_charset, static_iso639_alias_convert), src/options.c: refactored the language and codeset detection, more locale categories are now used for language detection, some corresponding messages have been made clearer 2003-06-24 David Necas (Yeti) * src/dirty.h, src/common.h: removed dirty.h, including ../lib/internal.h directly for the several libenca internals -- it also fixes possible inclusion of wrong enca header on systems with installed old libenca 2003-06-24 David Necas (Yeti) * lib/lang.c (enca_language_english_name), lib/internal.h, src/options.c (print_languages): made the english language name available to library users, when name style is HUMAN or DETAILS, --list languages prints english languages names instead of ISO-639 codes 2003-06-24 David Necas (Yeti) * test/Makefile.am: removed simtable from normal builds 2003-06-24 David Necas (Yeti) * lib/lang_be.c, lib/lang_bg.c, lib/lang_cs.c, lib/lang_et.c, lib/lang_hr.c, lib/lang_hu.c, lib/lang_lt.c, lib/lang_lv.c, lib/lang_pl.c, lib/lang_ru.c, lib/lang_sk.c, lib/lang_sl.c, lib/lang_uk.c, lib/filters.c (enca_language_hook_eol), lib/guess.c (ambiguous_hook), lib/internal.h: added enca_language_hook_eol() deciding undistinguishable cases based on EOL type, added appropriate hooks for all languages, removed enca_language_hook_discard(), added eolhook field to EncaLanguageInfo, used in ambiguous_hook() 2003-06-24 David Necas (Yeti) * data/belarussian/doit.sh, data/bulgarian/doit.sh, data/croatian/doit.sh, data/czech/doit.sh, data/estonian/doit.sh, data/hungarian/doit.sh, data/latvian/doit.sh, data/lithuanian/doit.sh, data/polish/doit.sh, data/russian/doit.sh, data/slovak/doit.sh, data/slovene/doit.sh, data/ukrainian/doit.sh: fixed charset orderings to help ambiguous hook to select some sane charset 2003-06-24 David Necas (Yeti) * lib/internal.h: added enca_csname macro and #include when DEBUG is defined 2003-06-24 David Necas (Yeti) * lib/unicodemap.c, data/maps/cork.map: modified cork map to transform \n, \r and \t to themselves, though it's incorrect, strictly speaking 2003-06-23 David Necas (Yeti) * test/test-default-cs.sh: fixed: when one conversion failed, it reported all failed 2003-06-23 David Necas (Yeti) * lib/pair.c (enca_pair_analyse): incorporated min_chars and threshold to the decision formula 2003-06-23 David Necas (Yeti) * tools/expand_table.pl: changed flag table items from short int to byte * lib/pair.c, lib/multibyte.c, lib/encnames.c: changed the flag table types to byte 2003-06-23 David Necas (Yeti) * tools/Makefile.am, tools/BOXVERT_KOI8U.t, tools/BOXVERT_KOI8UNI.t, src/filters.c: added ibm775, koi8u, koi8uni, cp1125 filters 2003-06-22 David Necas (Yeti) * src/enca.c (dwim_libenca_options): changed mu to 0.008 v0.99.1 2003-06-21 David Necas (Yeti) * src/options.c: fixed missing newline after features 2003-06-21 David Necas (Yeti) * test/Makefile.am, test/setup.sh, test/test-convert-64.sh, test/test-convert-filter.sh, test/test-default-cs.sh, test/test-guess-short.expceted, test/test-guess-utf8.expected: updated the expceted results, added missing files to dist 2003-06-21 David Necas (Yeti) * test/finish.sh, test/setup.sh, test/test-ENCAOPT.sh, test/test-aliases.sh, test/test-convert-64.sh, test/test-convert-filter.sh, test/test-default-cs.sh, test/test-empty.sh, test/test-errors.sh, test/test-guess-short.sh, test/test-guess-stdin.sh, test/test-guess-utf8.sh, test/test-lists.sh, test/test-long-texts.sh, test/Makefile.am: separated common test initialization and finalization to setup.sh and finish.sh, added tests for remaining languages, added UTF-8 samples to basic tests 2003-06-21 David Necas (Yeti) * src/locale_detect.c (static_iso639_alias_convert): fixed exchanged lv and lt 2003-06-20 David Necas (Yeti) * m4/libm.m4, Makefile.am, enca.pc.in: added pkgconfig support 2003-06-20 David Necas (Yeti) * m4/pager.m4, configure.ac, Makefile.am src/epress.c, src/texts.c, src/Makefile.am, src/text2c.sh, src/options.c (interpret_opt, print_text_and_exit), man/enca.1: removed pager and help compression 2003-06-20 David Necas (Yeti) * src/common.h, src/enca.c (process_file, dwim_libenca_options), src/filebuf.c (file_read, file_read_limited), src/options.c: fixed buffer size to 64kB, made file_read_limited() a private function, DWIM all analyser tuning parameters * lib/guess.c (enca_eol_surface), lib/Makefile.am: added check for binary files (we can get here with binary files and filtering off), increased library revision * test/test-errors.sh: removed the two tests using -S 2003-06-19 David Necas (Yeti) * src/options.c (set_read_limit, interpret_opt), src/filbuf.c: removed set_read_limit(), marked -m, -M, -u, -U, -R, -T, and -S deprecated and made them noop 2003-06-19 David Necas (Yeti) * src/options.c (print_some_list): removed the deprecated built-in-encodings and encodings lists 2003-06-19 David Necas (Yeti) * configure.ac, Makefile.am: changed manual maintainer mode to AM_MAITAINER_MODE 2003-06-19 David Necas (Yeti) * lib/enca.h: changed BEGIN_C_DECLS... to two simple #ifdefs and moved it to really contain all the decls v0.99.0 2003-06-14 David Necas (Yeti) * data/map2letters.sh: create letters/ when doesn't exist * data/Makefile.am: added Letters and some more files into dist 2003-06-14 David Necas (Yeti) * src/convert_iconv.c (convert_iconv_via_unicode): removed support for nontransitive iconv (all usable iconvs are transitive too) * m4/libiconv.m4: added a warning when usable but nontransitive iconv is found 2003-06-14 David Necas (Yeti) * src/convert_iconv.c (convert_iconv): fixed not unlinking a temporary file * src/convert_iconv.c (convert_iconv, acceptable_surface): bad EOL types are OK now * src/filebuf.c (file_temporary): fixed creation of temporary files with execute permission (from 0.10.7) 2003-06-13 David Necas (Yeti) * lib/lang_et.c, lib/filters.c (enca_language_hook_ncs): fixed a stupid enca_language_hook_ncs bug, finished estonian hooks 2003-06-13 David Necas (Yeti) * lib/lang_be.c, lib/lang_bg.c, lib/lang_cs.c, lib/lang_et.c, lib/lang_hr.c, lib/lang_hu.c, lib/lang_lt.c, lib/lang_lv.c, lib/lang_pl.c, lib/lang_ru.c, lib/lang_sk.c, lib/lang_uk.c, lib/filters.c (enca_language_hook_ncs), lib/internal.h: implemented enca_language_hook_ncs and removed enca_language_hook_2cs also defined MAKE_HOOK_LINE in internal.h 2003-06-13 David Necas (Yeti) * lib/internal.h: defined ELEMENTS * lib/enca.c, lib/encnames.c, lib/filters.c, lib/lang.c, lib/unicodemap.c: make use of ELEMENTS 2003-06-13 David Necas (Yeti) * lib/filters.c (enca_language_hook_2cs), lib/internal.h, lib/guess.c (ambiguous_hook, make_guess, enca_guess_init, enca_guess_destroy, enca_find_max_sec): replaced csmax and cssec with order[] containing all charsets, ordered by ratings 2003-06-12 David Necas (Yeti) * lib/lang.c (enca_get_charset_similarity_matrix): fixed broken normalization 2003-06-12 David Necas (Yeti) * lib/lang_hu.c (hook, hook_isocork): added iso88592/cork hook 2003-06-11 David Necas (Yeti) * m4/recode-bugs.m4: added a few more broken map tests 2003-06-10 David Necas (Yeti) * lib/lang_lv.c (hook, hook_lat4balt): added iso88594/baltic hook and finally added all the hooks to hook() 2003-06-10 David Necas (Yeti) * lib/lang_hu.c, lib/lang_lv.c, lib/lang_lt.c, lib/filters.c, lib/internal.h: the discard-hook sets rating to 0 always and now takes reasonable arguments 2003-06-10 David Necas (Yeti) * data/estonian, data/latvian, datal/lithuanian: fixed a few wrong characters * lib/lang_lt.c (hook_baltwin), lib/lang_lv.c (hook_baltwin): added and updated hooks 2003-06-10 David Necas (Yeti) * lib/lang_sl.c (hook): replaced empty hook with NULL 2003-06-10 David Necas (Yeti) * lib/filters.c (enca_language_hook_discard), lib/lang_hu.c (hook_isowin), lib/lang_lv.c (hook_iso13win): added `discard second charset' hook 2003-06-10 David Necas (Yeti) * lib/internal.h, lib/guess.c (find_max_sec, enca_find_max_sec): exported find_max_sec as enca_find_max_sec, it's needed in hooks after all * lib/guess.c (make_guess), lib/filters.c (enca_language_hook_2cs): moved enca_find_max_sec() to the hook 2003-06-10 David Necas (Yeti) * data/maps/iso885913.map, lib/unicodemap.c: fixed (another) wrong recode map: iso8859-13 * data/latvian: remove a-with-diaeresis from counts * lib/lang_lv.c (hook, hook_iso13win): added a hook deciding between iso8859-13 and cp1257 (always to cp1257) 2003-06-09 David Necas (Yeti) * lib/pair.c (compute_pair2bits): fixed a bug * data/bulgarian: regenerated from somewhat cleaner data 2003-06-09 David Necas (Yeti) * lib/lang_bg.c (hook, hook_1251mac): added cp1251/maccyr hook 2003-06-08 David Necas (Yeti) * lib/pair.c (count_good_pairs, count_good_pairs_directly, compute_pair2bits, enca_pair_analyse, enca_pair_init, enca_pair_destroy), lib/internal.h: replaced the two good pair counting algorithms with a one clever and fast (but with some initialization overhead) 2003-06-08 David Necas (Yeti) * lib/lang.c: fixed missing human name initialized for lang none 2003-06-08 David Necas (Yeti) * data/croatian/cp1250.base: added a missing char * lib/lang_hr.c (hook, hook_isowin): added l2/1250 hook 2003-06-04 David Necas (Yeti) * lib/internal.h, lib/lang_be.c, lib/lang_bg.c, lib/lang_cs.c, lib/lang_et.c, lib/lang_hr.c, lib/lang_hu.c, lib/lang_lt.c, lib/lang_lv.c, lib/lang_pl.c, lib/lang_ru.c, lib/lang_sk.c, lib/lang_sl.c, lib/lang_uk.c: added human-readable language names, not exported in any way yet 2003-06-04 David Necas (Yeti) * src/locale_detect.c (static_iso639_alias_convert): added croatian -> hr 2003-06-04 David Necas (Yeti) * data/Makefile.am, data/croatian/doit.sh, lib/lang_hr.s, lib/internal.h, lib/lang.c, lib/Makefile.am, test/simtable.c: added Croatian 2003-06-04 David Necas (Yeti) * Makefile.am: added tools back to normal-build subdirs, it's needed 2003-06-04 David Necas (Yeti) * test/simtable.c: colorized output added command line args 2003-06-04 David Necas (Yeti) * lib/pair.c (enca_pair_analyse, count_good_pairs, count_all_8bit_pairs, count_good_pairs_directly): split analysis for large and small samples * lib/guess.c: actually takes enca_pair_analyse() result into account 2003-06-03 David Necas (Yeti) * data/countpair.c, data/pairtoc.c: changed ordering so that FILL_CHARACTER is always first (and has 0 in letters table) * lib/pair.c (count_good_pairs): fixed a segfault 2003-06-03 David Necas (Yeti) * test/Makefile.am: make clean cleans more auxiliary files 2003-06-03 David Necas (Yeti) * data/maps/baltic.map: fixed baltic map (it was complete garbage?) 2003-06-03 David Necas (Yeti) * lib/enca.c (enca_analyser_alloc, enca_analyser_free), lib/pair.c, lib/internal.h, lib/guess.c (make_guess), lib/Makefile.am: added pair frequency based guessing 2003-06-02 David Necas (Yeti) * lib/internal.h, lib/lang.c, lib/lang_be.c, lib/lang_bg.c, lib/lang_cs.c, lib/lang_et.c, lib/lang_hu.c, lib/lang_lt.c, lib/lang_lv.c, lib/lang_pl.c, lib/lang_ru.c, lib/lang_sk.c, lib/lang_sl.c, lib/lang_uk.c: added pair data to struct _EncaLanguageInfo 2003-06-02 David Necas (Yeti) * data/Makefile.am, data/doit.sh, data/makepaircounts.sh, data/pairtoc.c, data/totals.pl: combined pair stuff with regular frequencies, $language.h now contains everything 2003-06-01 David Necas (Yeti) * data/Letters: added (list of UCS2 values corresponding to letters) * data/Makefile.am, data/paircount.c, data/map2letters.sh, data/findletters.c, data/makepaircounts.sh, README: changed letters format to list of 8bit values, instead of UCS2 values, simplifying everything 2003-06-01 David Necas (Yeti) * configure.ac, README.devel, Makefile.am: added --enable-maintainer-mode to skip all the silly stuff in tools/ and data/ in regular builds 2003-06-01 David Necas (Yeti) * data/basetoc.pl, data/basetoc.c, data/Makefile.am, data/doit.sh, pairtoc.c: replaced basetoc.pl with basetoc.c, continued reorganization and paircount 2003-06-01 David Necas (Yeti) * lib/unicodemap.c, data/maps/cork.map: fixed cork map 2003-05-31 David Necas (Yeti) * maps/baltic.map, maps/cork.map, maps/cp1125.map, maps/cp1250.map, maps/cp1251.map, maps/cp1257.map, maps/ecma113.map, maps/ibm775.map, maps/ibm852.map, maps/ibm855.map, maps/ibm866-bad.map, maps/ibm866.map, maps/iso885913.map, maps/iso885916.map, maps/iso88592.map, maps/iso88594.map, maps/iso88595.map, maps/keybcs2.map, maps/koi8cs2.map, maps/koi8r.map, maps/koi8u.map, maps/koi8ub.map, maps/koi8uni.map, maps/macce.map, maps/maccyr.map: moved maps to separate subdir * data/belarussian/doit.sh, data/bulgarian/doit.sh, data/czech/doit.sh, data/estonian/doit.sh, data/hungarian/doit.sh, data/latvian/doit.sh, data/lithuanian/doit.sh, data/polish/doit.sh, data/russian/doit.sh, data/slovak/doit.sh, data/slovene/doit.sh, data/ukrainian/doit.sh, data/doit.sh, data/makepaircounts.sh, data/Makefile.am: use xlt exclusively, become independent on recode, some more reorganization * data/map2letters.sh: added 2003-05-31 David Necas (Yeti) * lib/unicodemap.c: fixed wrong macce table taken from recode * m4/recode-bugs.m4: added test for broken macce 2003-05-29 David Necas (Yeti) * lib/lang_hu.c: fixed misreference to Slovak * data/cp1250.map, data/iso88592.map: added 2003-05-29 David Necas (Yeti) * src/locale_detect.c (static_iso639_alias_convert, strip_locale_name): added the new languages, refactored the two ugly arrays to one 2003-05-29 David Necas (Yeti) * lib/lang_bg.c, lib/lang_et.c, lib/lang_lv.c, lib/lang_lt.c, lib/internal.h, lib/lang.c, lib/Makefile.am: added the new languages * test/simtable.c: added the new languages 2003-05-29 David Necas (Yeti) * test/test-long-texts.sh: fixed configure.in -> configure.ac 2003-05-29 David Necas (Yeti) * data/bulgarian, data/Makefile.am: added * tools/encodings.dat, lib/unicodemap.c, iconvcap.c: added ECMA-113 charset 2003-05-29 David Necas (Yeti) * data/cp1257.map, data/iso88594.map, data/estonian, data/latvian, data/lithuanian, data/Makefile.am: added 2003-05-27 David Necas (Yeti) * configure.ac: fixed some misleading messages in the summary table 2003-05-27 David Necas (Yeti) * data/Makefile.am, data/README: removed all countall.pl reminicences 2003-05-27 David Necas (Yeti) * iconvcap.c: fixed ISO-8859-5 incorrectly detecting Latin5, which is a completely different character set * iconvcap.c: added some aliases * lib/unicodemap.c, iconvcap.c, tools/encodings.dat: added IBM775, ISO-8859-4, Windows-1257 to appropriate places 2003-05-27 David Necas (Yeti) * data/countall.c, data/Makefile.am, data/countall.pl, data/ibm775.map, data/README: replaced countall.pl with countall.c added ibm775 (dos baltic) map 2003-05-26 David Necas (Yeti) * lib/lang_sl.c, lib/lang_hu.c, data/slovene/, data/hungarian/, lib/lang.c, lib/internal.h, lib/Makefile.am, data/Makefile.am: added Slovene and Hungarian * tools/encodings.dat: added cp895 alias for kam 2003-03-17 David Necas (Yeti) * lib/enca.h: fixed nonsense license and references to recode v0.10.7 2003-01-28 David Necas (Yeti) * src/filebuf.c (file_size, file_temporary): open files first, stat them later, create temporary files with O_CREAT|O_EXCL * src/filebuf.c: added a few asserts * configure.in: added fcntl.h test 2003-01-28 David Necas (Yeti) * src/convert.c (format_request_string): fixed surface mask to mean what was (probably) intended * src/convert_recode (convert_recode): changed surface mask to only filter ENCA_SURFACE_EOL_LF unknown to recode and natural surfaces 2003-01-24 David Necas (Yeti) * src/convert.c (convert_builtin, copy_and_convert): applied David Vorisek's speed improvements (thx) 2003-01-24 David Necas (Yeti) * script/b-cstocs: also added tex and utf8 here 2003-01-24 David Necas (Yeti) * tools/encodings.dat: added tex and utf8 cstocs names, recent versions of cstocs know UTF-8 * tools/make_hash.c (print_fine_data): fixed exchanged cstocs and iconv names 2002-12-24 David Necas (Yeti) * src/HELP.in: indented options with one space (so it works with help2man) 2002-10-30 David Necas (Yeti) * src/options.c (interpret_opt), src/covnert.c (xtable): Fixed assert()'s containing useful code. v0.10.6 2002-10-22 David Necas (Yeti) * src/options.c (interpret_opt), src/locale_detect.c: Removed #if HAVE_NL_LANGINFO from options.c altogether (codeset is always defined), fixed a few #if's in locale_detect.c. 2002-10-22 David Necas (Yeti) * test/test-ENCAOPT.sh, test/test-convert-filter.sh, test/test-long-texts.sh, test/test-guess-stdin.sh, test/test-default-cs.sh: Added tests. 2002-10-22 David Necas (Yeti) * src/options.c (interpret_opt): Fixed -P also setting -M. 2002-10-22 David Necas (Yeti) * src/convert_recode.c (print_recode_warning): Moved it into the #if HAVE_LIBRECODE block. 2002-10-22 David Necas (Yeti) * src/enca.c (print_results): Fixed printing NULL as stdin's filename with -d. 2002-10-22 David Necas (Yeti) * lib/guess.c (ambiguous_hook): Fixed totally bogus charset id handling, fixed comparing winner and second best many times while not comparing winner with others. * lib/unicodemap.c (enca_charsets_subset_identical): Fixed totally bogus charset unicode map table start handling. 2002-10-21 David Necas (Yeti) * man/enca.1: updated 2002-10-21 David Necas (Yeti) * src/options.c (process_opt): enconv uses recode's DEFAULT_CHARSET, if set. 2002-10-21 David Necas (Yeti) * src/options.c (prepend_env), man/enca.1: Added a very simple built-in parser for ENCAOPT, so it's works everywhere. 2002-10-15 David Necas (Yeti) * m4/pager.m4, src/texts.c: less is run with -F only if it accepts -X too, otherwise it's too offending 2002-10-14 David Necas (Yeti) * test/Makefile.am: Added the missing test samples. v0.10.5 2002-10-13 David Necas (Yeti) * test/test.expected, test/test-guess-short.expected, test/test-guess-short.sh: Renamed test.expected to test-guess-short.expected. 2002-10-13 David Necas (Yeti) * src/enca.c (double_utf8_chk, process_file): Made it use the new Doubly-UTF-8 checks. 2002-10-13 David Necas (Yeti) * lib/utf8_double.c, lib/internal.h, lib/enca.c (enca_analyser_alloc, enca_analyser_free), lib/enca.h: * devel-docs/libenca-sections.txt: Added lib/utf8_double.c containing checks for Double-UTF-8 encoding, with quite a strange API. 2002-10-13 David Necas (Yeti) * lib/guess.c (make_guess), lib/internal.h, lib/multibyte.c (looks_like_utf8): Added looks_like_utf8() and support for non-pure UTF-8. 2002-10-12 David Necas (Yeti) * data/mystrings.c (main): Fixed not printing the character causing switch to text mode, thus distorting the output. 2002-10-12 David Necas (Yeti) * FAQ, Makefile.am: Added FAQ. 2002-10-12 David Necas (Yeti) * src/convert_recode.c (convert_recode, print_recode_warning): * m4/librecode.m4: Use librecode at task level, instead of request level, allowing to distinguish between conversion and I/O errors, added warnings for the former, recodext.h is required now to build the librecode interface 2002-10-11 David Necas (Yeti) * src/Makefile.am, tools/Makefile.am: Changed libenca linking from -lenca to ../lib/libenca.la (thx to Alexander Kovalenko) Added @LDFLAGS@ to LDFLAGS 2002-10-11 David Necas (Yeti) * src/locale_detect.c: Fixed codeset not being defined without nl_langinfo (thx to Alexander Kovalenko) 2002-10-10 David Necas (Yeti) * lib/unicodemap.c: Added Unicode map for Cork v0.10.4 2002-10-10 David Necas (Yeti) * man/enca.1, lib/Makefile.am: * test/cs-s.cork, test/pl-s.cork, test/sk-s.cork, * test/test-guess-short.sh, test/Makefile.am: Updated man page, library revision, added tests -- for Cork 2002-10-10 David Necas (Yeti) * tools/make_hash.c, tools/encodings.dat: Allowed to use empty charset flags list instead of 0 2002-10-10 David Necas (Yeti) * data/czech/doit.sh, data/slovak/doit.sh, data/polish/doit.sh: * tools/encodings.dat, iconvcap.c, tools/iconvenc.null: Added support for Cork (Czech, Slovak, Polish) 2002-10-09 David Necas (Yeti) * src/filebuf.c (file_read, file_write, file_new, file_seek, file_open): * src/common.h: * configure.in: Removed the pos field form _File struct, removed locking, reverted reading and writing to 0.9.x style 2002-10-04 David Necas (Yeti) * src/enca.c (process_file): Empty files are assumed to be in target encoding for conversion. * test/test-empty.sh: Check whether empty files are OK for conversion but bad for detection. 2002-09-30 David Necas (Yeti) * test/Makefile.am: Changed linker flags to allow RPMs to be correctly built 2002-09-25 David Necas (Yeti) * lib/Makefile.am, lib/encnames.c, lib/lang_cs.c, lib/lang_be.c, lib/lang_sk.c, lib/lang_ru.c, lib/lang_pl.c, lib/lang_uk.c: Removed -I../tools -I../data from search paths, changed #include "czech/czech.h" to #include "data/czech/czech.h" etc. v0.10.3 2002-09-22 David Necas (Yeti) * man/enca.1: Fixed a few valid HTML generation problems 2002-09-21 David Necas (Yeti) * m4/librecode.m4, m4/libiconv.m4, configure.in: Changed CFLAGS to CPPFLAGS where appropriate (fixes header presence tests). 2002-09-21 David Necas (Yeti) * configure.in: fixed adding wrong flags to CFLAGS and LDFLAGS in PREFIX/{lib/include} adding hack 2002-09-21 David Necas (Yeti) * script/b-umap, script/Makefile.am: added a new wrapper for perl umap * configure.in: added umap support * script/b-map: workaround about map returning 0 on failure and 1 on success 2002-09-21 David Necas (Yeti) * script/b-cstocs, script/b-recode, script/b-map: removed the `function' keyword (traditional sh doesn't use it) v0.10.2 2002-09-15 David Necas (Yeti) * src/locale_detect.c (set_raw_locale, detect_lang): fixed wrong locale logic after inheriting 2002-09-15 David Necas (Yeti) * Makefile.am: removed now useless echo >iconvenc.h 2002-09-15 David Necas (Yeti) * src/filebuf.c (file_open): added fsetlocking() to BYCALLER 2002-09-15 David Necas (Yeti) * src/Makefile.am, Makefile.am: added linking enca -> enconv, the same for manual pages * man/enca.1: updated * configure.in: fixed setting default external converter when not available 2002-09-15 David Necas (Yeti) * src/locale_detect.c (detect_lang, set_raw_locale, static_iso639_alias_convert, get_lang_codeset): * src/options.c (process_opt): * src/common.h: * src/HELP.in: Implemented auto target charset feature. Added static language name decryption table. Added _ to conversion (cs_SK, ru_UA). 2002-09-14 David Necas (Yeti) * src/texts.c, src/convert_iconv.c, src/convert_extern.c: Replaced perror("") with strerror()s, removed errno= assigments. v.0.10.1 2002-08-29 David Necas (Yeti) * m4/iconv.m4, m4/librecode.m4, m4/libiconv.m4: renamed iconv.m4 to libiconv.m4, changed --eanble to --with * configure.in: added $PREFIX to lib search path * tools/Makefile.am: fixed the iconv names substitution rule so that even dull sed accepts it * src/filebuf.c (file_read, file_write, file_seek, file_open): read/write whole block at once * src/convert.c (convert_builtin): catches all identity conversions 2002-08-28 David Necas (Yeti) * m4/recode-bugs.m4, m4/iconv.m4, configure.in: small fixes * src/filebuf.c, man/enca.1: , cnaged to STDIN, STDOUT * src/convert.c (convert_builtin): made identity ascii..ascii work again * src/options.c (process_opt, interpret_opt): print help only when run w/o any arguments (not just w/o filenames) accept `-' as stdin * src/enca.c (main): fixed crash on unknown language 2002-08-28 David Necas (Yeti) * lib/enca.h (enca_charset_is_known), lib/Makefile.am: API: added this covenience macro, updated library version * src/convert.c (set_external_converter, convert_extern, check_executability, check_executability_one), src/convert_extern.c: added early converter executability text, moved all external converter stuff to convert_extern.c, fixed target encoding name construction, make all the stuff optional * configure.in: added tests for canonicalize_file_name, realpath, uid_t, mode_t * src/options.c, src/convert.c: made external converter a feature 2002-08-27 David Necas (Yeti) * test/test-aliases.sh, test/test-convert-64.sh, test/Makefile.am: added new tests * configure.in, src/filebuf.c (random_seed_init): cleaned the time mess, #include only time.h and use only time() 2002-08-27 David Necas (Yeti) * lib/unicodemap.c (MAKE_CS_LINE, enca_charset_ucs2_map): fixed wrong tstart handling v0.10.0 2002-08-26 David Necas (Yeti) * debian/: removed. 2002-08-26 David Necas (Yeti) * THANKS: fixed typo * lib/unicodemap.c (UNICODE_MAP): added missing cp1125 * m4/scanf.m4: define SCANF_MODIF_SIZE_T always, at least to "" * configure.in: made PACKAGE_BUGREPORT quotable C string 2002-08-24 David Necas (Yeti) * src/filebuf.c (random_generator_seeded, EVERYTHING): get rid of perror(""), changed random_generator_seeded to module-global, formal changes * Makefile.am: removed the debian-updating targets * m4/iconv.m4, m4/librecode.m4: changed test help defaults from [yes] to [auto] * configure.in: added fread_unlocked, fwrite_unlocked, ftrylockfile, __fsetlocking, stdio_ext.h tests 2002-08-22 David Necas (Yeti) * src/convert.c (format_request_string, target_enc, target_enc_str): fixed convert.c defining its own target_enc and target_enc_str, which was of course never set 2002-08-22 David Necas (Yeti) * data/belarussian: rebuild the data after removing a few Russian texts which crept into 2002-08-22 David Necas (Yeti) * test/test.sh, test/test-guess-short.sh, test/test-lists.sh: renamed the first to the second, added the third 2002-08-22 David Necas (Yeti) * man/enca.1: updated 2002-08-21 David Necas (Yeti) * enca.spec.in, Makefile.am: updated, split into enca and enca-devel 2002-08-21 David Necas (Yeti) * lib/guess.c (enca_set_threshold, enca_set_significant): API: Also set analyser errno beside returning nonzero on failure. 2002-08-21 David Necas (Yeti) * tools/Makefile.am: Changed extension of generated tables from .c to .h 2002-08-20 David Necas (Yeti) * devel-docs/Makefile.am: Added empty all-local: rule for disabled GTK_DOC 2002-08-20 David Necas (Yeti) * src/locale_detect.c (detect_lang, locale_alias_convert): Fixed forgotten e_strdup -> enca_strdup. 2002-08-20 David Necas (Yeti) * ChangeLog, ChangeLog.prelib: Moved pre-library changelog to Changelog.prelib, started new one. v0.10.0-pre1 2002-08-19 David Necas (Yeti) * Released v0.10.0-pre1 Project-OSS-Revival-enca-36defd7/ChangeLog.prelib000066400000000000000000001427771507545312400216560ustar00rootroot00000000000000 # This is ChangeLog for changes before enca became a library. # The new ChangeLog starts after that. # Unfortunately, there's no ChangeLog for the transition. # Note: EVERYTHING as changed file means global change, i.e. `every file where # this change was applicable was changed'. 2002-06-23 Yeti * src/texts.c, src/common.h, src/options.c: define e_isatty() as portable isatty in common.h, print help instead of wainting for input when stdin is a tty v0.9.4 2002-03-04 Yeti * src/printresult.c: fixed print_detailed_report() not to truncate charset names in the table * src/convert.c: put a no-op file_seek() after file_write() to make subsequent file_read() work correctly (an ISO C ,feature`, not Enca's) 2002-03-03 Yeti * src/convert.c: fixed convert_builtin() to convert whole files, not just first 64kB 2001-08-16 Yeti * src/options.c: removed strange `:' from start of short_options 2001-08-01 Yeti * src/common.h: defined e_free(x) to set x to NULL after freeing it * src/EVERYTHING: formal changes v0.9.3 2001-07-16 Yeti * configure.in, m4/librecode.m4, m4/iconv.m4, src/Makefile.am, src/epress.c: conversion libraries are put into CONVERTER_LIBS, so epress doesn't link with them (they are included in enca_LDADD), LIBS is not modified by librecode and iconv tests * iconvcap.c: added program_name definition for the case it would link with librecode (shouldn't happen) * configure.in: added AC_AIX * Makefile.am: added forgotten m4/crash-me to EXTRA_DIST * src/encnames.c: --list=encodings prints only `known' encodings * Makefile.am: added topline.sh (needed by update target) to dist * updated docs 2001-07-15 Yeti * src/lang.c: fixed giving random results due to usage of unitialized memory in get_charsets() * src/printresult.c: fixed using double instead of int for ambiguous and multibyte flags in T_EncDetails structure * src/guess.c, src/printresult.c, src/printresult.h: added GUESS_QP_RESOLVED flag to be able to print logically consistent -d output in case of quoted printables * src/fileio.c, configure.in: include sys/stat.h unconditionally, we cannot compile w/o it anyway, warning added to configure * src/common.h: include both string[s].h and memory.h. instead of just one of them * src/common.h: define PACKAGE, VERSION, DEFAULT_EXTERNAL_CONVERTER and DEFAULT_CONVERTER_LIST when don't have config.h to compile w/o it * src/options.c: fixed too many \n's in feature list * configure.in, src/texts.c: added isatty() and ttyname() test, defined stdout_isatty(), pager is run only when we are able to positively say stdout is a tty 2001-07-14 Yeti * src/options.c, src/common.h, src/texts.c: made USE_PAGER a feature +pager * m4/recode-bugs.m4: added TeX/..ISO-8859-2 recode crash test * m4/iconv.m4, src/convert_iconv.c: added ICONV_ARG2_CONST test * m4/typevar.m4, src/common.h, configure.in: removed the no longer needed long long int test, mere long int is used for mathint * configure.in: prepend "-Wall -pedantic" before CFLAGS when compiles is GCC * Makefile.am: add a new debian changelog entry when version or release changes, otherwise update time of the current entry 2001-07-13 Yeti * src/fileio.c, src/convert_recode.c: removed the no-buffering tricks making it slightly faster on modern GNU/Linux, but much slower everywhere else * src/EVERYTHING: put back the #ifdef HAVE_CONFIG_H stuff * src/texts.c: fixed typo expand_char() -> fputc() in poor man's compress * src/common.c: added const to stpcpy() *p declaration to keep qualifiers * m4/pager.m4, Makefile.am, configure.in, src/texts.c: test whether less accepts -F, possibility to disable pager at all v0.9.2 2001-07-13 Yeti * src/guess.c: fixed reporting `7bit ASCII characters' after a successfull detection of a 7bit encoding (TeX, UTF-7) * src/convert_recode.c: fixed typo HAVE_RECODEEXT_H -> HAVE_RECODEXT_H 2001-07-12 Yeti * src/filters.c: fixed hdata->eid's comparsion before their initialization in lang_hook_2cs() (so the hook was never run) * src/convert_recode.c: more correct handling of the situation when we realise we cannot seek in temporary file during recode failure recovery * debian/Makefile.am, m4/Makefile.am, Makefile.am, configure.in: removed the first two, debian/ generated by toplevel Makefile, m4/ is just distributed * Makefile.am, src/Makefile.am: replaced $< with literal file names, some `make's don't always substitute first dependence name * src/epress.c: added program_name definition to placate librecode * src/common.h: stdlib.h and unistd.h are included unconditionally (we depend on them anyway) * src/texts.c: replaced the `is pager less?' test with a better one * configure.in, acconfig.h, m4/EVERYTHING: put descriptions directly to AC_DEFINE[_UNQUOTED]'s, almost get rid of acconfig.h * src/EVERYTHING: don't trust make passing `-DHAVE_CONFIG_H -I..' to compiler, #include "../config.h" unconditionally (we depend on it anyway) 2001-07-10 Yeti * debian/, Makefile.am: created debian/ and modified the Makefile.am to include it 2001-07-09 Yeti * configure.in, enca.spec.in: added MAINTAINER variable which can be used in rpm spec and debian/ files * src/texts.c: fixed wrong prototype putchar() -> expand_char() when no compressor is available * src/texts.c, acconfig.h, configure.in: compressed texts are displayed through a pager (if available) * autogen.sh, README.devel: added and make a note about it v0.9.1 2001-06-25 Yeti * src/guess.c: fixed possible overflow in UCS-4 test (slightly changing what gets recognized as UCS-4) * src/guess.c: implemented unusual byteorders (3412 and 2143) tests using a single little-endian ucs-4 test what_if_it_was_ucs4() and shuffling bytes around shuffle_byte_order(), the same for UCS-4 EOL type tests * src/common.h: defined PVAR(f, v) [for debugging] * updated docs * packaged 2001-06-24 Yeti * src/encnames.h, src/encnames.c, src/guess.c: renamed SURF_PER_12[34] to more logical SURF_PER_[43]21 2001-06-02 Yeti * src/efilter.c, src/Makefile.am, src/texts.c, src/common.h: created efilter.c (filter making text files to compress better) and adding reverse filter to texts.c * m4/tolower.m4, configure.in, acconfig.h, src/common.h: define our own implementation of tolower and similar unconditionally * improved various docs * BUGS, Makefile.am: generated from manual page section of the same name * src/efilter.c, src/Makefile.am, src/texts.c, src/common.h: efilter was funny experiment but not much useful, removed again 2001-06-01 Yeti * src/getopt.c, src/getopt1.c, src/getopt_long.c, src/Makefile.am: removed the first two and made getopt_long.c non-generated, removed some unneeded stuff * src/common.c: put broken-{m,c,re}alloc fixes into conditionals (but no autoconf tests---I don't believe such a broken systems really do exist) 2001-05-28 Yeti * src/options.c: fixed prepend_env() segfault, improved diagnostics * revised temporary files usage, removed `/tmp bug' from docs * convert.c, convert_iconv.c, convert_recode.c: renamed tmpfile variable (synonymous to ISO function name) to tempfile, better not to tempt fate * script/b-map, script/b-cstocs, script/b-recode: added umask 077 2001-05-27 Yeti * src/encnames.c, src/encnames.h, man/enca.1: checks that all characters in charset/surface names are from some set of allowed characters * src/common.c: added hack for systems that fail on malloc(0) and similar 2001-05-20 Yeti * src/epress.c: forgotten [ISO C99] int16_t changed to int * src/filters.c, src/filters.h: added universal decide-between-2-cs hook * src/lang_cs.c, src/lang_sk.c: modified to use the universal hook, some formal changes * src/lang_ru.c: added maccyr/cp1251 hook (via the universal) * src/common.h, src/enca.c: sensible exit code (0, 1 or 2) returned * src/convert.c: convert() returns ERR_* error codes instead of just 0, 1 * src/common.c, src/convert.c, src/convert_iconv.c, src/encnames.c, src/fileio.c, src/lang.c, src/locale_detect.c, src/options.c, src/texts.c: returned 2 on troubles * updated docs 2001-05-18 Yeti * src/license.c, src/license.h, src/texts.c, src/texts.h: renamed the former to the latter * src/epress.c, src/texts.c: implemented bzip2 and gz interface * m4/compress.m4, configure.in: added tests for libbz2 and libz, the best one found is used * configure.in, src/Makefile.am, src/options.c: COPYING.c and HELP.c are generated by epress and just linked with enca * src/Makefile.am: put getopt_long.c into BUILT_SOURCES * src/lang_ru.c, src/unicodemap.c, src/encnames.c: added maccyr charset * Makefile.am: added hook to delete BUILT_SOURCES before making dist 2001-05-17 Yeti * src/fileio.c: temporary files are created with umask 077 2001-05-06 Yeti * src/epress.c, src/COPYING.h, src/Makefile.am: created license compressor * src/license.c, src/options.c: license decompression and printing 2001-05-01 Yeti * m4/librecode.m4, m4/recode-bugs.m4, m4/long-text.l2: put test for bugs to recode-bugs.m4 (four bugs are checked, any will launch the warning) 2001-04-12 Yeti * m4/librecode.m4, configure.in: added a test for broken recode (no workaround [known], just prints a big warning message) v0.9.0 2001-03-26 Yeti * just packaged 2001-03-25 Yeti * src/convert.c: fixed reading only first file block in copy_and_convert() * configure.in, src/EVERYTHING: memory.h test added, string/strings/memory header file inclusion put into common.h * src/fileio.c: fixed file_setvbuf() and file_open() (not enough magic) * src/convert_recode.c: fixed not opening original file * configure.in, src/convert_recode.c: added recodext.h test, is used when available for setting diacritics_only and ascii_graphics flags * src/convert_iconv.c: fixed not opening original file * src/convert_iconv.c: fixed writing no output in iconv_one_step() * src/convert.c: fixed intermixed child and parent process in convert_external() * src/fileio.c: added file_getline() requiring much less system calls than GNU libc's fgets() * src/locale_detect.c: fixed segfault when language detection failed * m4/tools.m4, configure.in, acconfig.h, src/options.c: consolidated autoconf macros regarding external converters * man/enca.1: minor corrections 2001-03-24 Yeti * src/encnames.c: added quoted printable surface * src/guess.c: integrated quoted printable into the guessing process * src/encnames.c, src/options.c: added print_public_surfaces() wrapper to allow printing --human-readable list of surfaces * src/lang_cs.c, src/lang_ru.c, src/lang_sk.c: replaced slovak and russian statistical data with some new (hope better), some hardcoded array sizes now computed from sizeof() * iconvcap.c: cosmetical changes 2001-03-20 Yeti * src/fileio.c, src/fileio.h, src/common.c, src/common.h: T_Buffer type moved from fileio to common * src/lang.c, src/lang.h, src/lang_cs.c, src/lang_ru.c, src/lang_sk.c: use the new T_Buffer type * configure.in: removed now-unused tests * src/EVERYTHING: removed redundant header inclusion, ensured satisfying header dependencies, try to use strings.h when string.h is not avaialble * src/guess.c: fixed not initializing memory buffer * src/options.c: exchagned -E and -C option letters (incompatibility!) * src/guess.c: implemented quoted printable recognition (unused now) 2001-03-19 Yeti * src/fileio.c, src/fileio.h: some more magic employed, only initiated can use them now * src/convert.c, src/convert_iconv.c, src/convert_recode.c, src/lang.c: changed to use the new file i/o interface * src/convert_iconv.c: fixed a memory leak 2001-03-18 Yeti * src/fileio.c, src/fileio.h: finished implementation * src/common.c, src/common.h: removed stuff belonging to fileio * src/locale_detect.c, src/guess.c, src.guess.h, src/lang.h, src/enca.c, src/convert.h: changed to use the new file i/o interface * src/guess.c: UCS tests check remainder of file length instead of buffer position (which is still used as a fallback in case of stdin) 2001-03-17 Yeti * configure.in, script/b-cstocs, script/b-cstocs.in, script/b-map, script/b-map.in, script/b-recode, script/b-recode.in, script/Makefile.am: (I'm stupid) reverted the last change * src/fileio.c, src/fileio.h: created (unique file i/o interface, at last) 2001-03-12 Yeti * m4/tools.m4: AC_MSG_WARN is used to print warnings * m4/iconv.m4: iconvenc.h is always created (the dark side is that iconv usability is no longer cached) * m4/tools.m4, configure.in, script/b-cstocs, script/b-cstocs.in, script/b-map, script/b-map.in, script/b-recode, script/b-recode.in, script/Makefile.am: external converters are located including path and it's then used for configure-time substitution in the scripts v0.9.0pre5 2001-03-12 Yeti * src/common.h, src/common.c, src/encnames.h, src/guess.c, src/options.c, src/printresult.c, src/convert.c: eliminated rest of Settings, replaced by module methods, except read_limit which is still global * enca.spec.in: various improvements (see the spec file changelog) 2001-03-11 Yeti * src/EVERYTHING: Settings.ProgName and Settings.Verbose made globals: program_name and verbosity_level * src/common.h, src/options.c, src/convert.c: Settings.ExtConverter made convert.c module global extern_converter, set by set_external_converter() * src/common.h, src/options.c, src/printresult.c: Settings.PreFName made printresult.c module global extern_converter, set by print_set_prefix_filename() 2001-03-10 Yeti * enca.spec.in: use global cache file 2001-03-09 Yeti * Makefile.am: (generated!) enca.spec included to distribution (rpm -tb) 2001-03-02 Yeti * man/enca.1: spell-checked * src/options.c: corrected available lists in --list= help 2001-02-28 Yeti * src/lang.c: language is printed in lang_init() when verbose * src/guess.c: all Latin, Cyrillic and Greek letters have equal weight in UCS-2 and UCS-4 tests * src/guess.c: fixed bad default endianess and initial makes-sense-check in UCS-4 test * src/printresult.c: UCS-* rating is printed, too v0.9.0pre4 2001-02-26 Yeti * just packaged 2001-02-25 Yeti * src/options.c, src/encnames.c, src/printresult.c: conversion from output type to what-name is done in encnames.c, introduced new output types and what-names ALIASES and NONE, --name=aliases prints list of aliases, removed --list=aliases, --list=encodings is sensitive to value of --name= instead, --list=names lists all valid --name= values, default output type is now NONE (initialized after option processing when needed) * updated rest of docs * configure.in, m4/libm.m4: fixed `make install' fail due to dependance on libtool: get rid of libtool dependance, created our own math library test 2001-02-24 Yeti * configure.in, acinclude.m4, m4/: removed acinclude.m4, created m4 dir and put the definitions there v0.9.0pre3 2001-02-23 Yeti * src/options.c: added --list=lists listing * NEWS: updated * man/enca.1: partly updated 2001-02-22 Yeti * configure.in: added feature and failure lists * acinclude.m4: cleanup, defined some *_ok variables for feature list, fixed some `! test ... = ...' to `test ... != ...' * srcipt/b-cstocs, srcipt/b-map, srcipt/b-recode: `#!/bin/bash' changed to `#! /bin/sh' (even if I'm not sure whether the scripts are 100% sh-compatible) * iconvcap.c: initial ASCII test changed back to ISO-8859-1 since the former is not supported on some systems (SunOS, IRIX, ...) having otherwise-usable iconv * src/getopt_long.c: generated from getopt.c and getopt1.c, but distributed (mainly because automake is unable to understand something we have in LIBOBJS can be generated...) v0.9.0pre2 2001-02-22 Yeti * configure.in, src/Makefile.am: merged src/getopt.c and src/getopt1.c to src/getopt_long.c to allow simple AC_REPLACE_FUNC() be used for getopt_long optional build * acinclude.m4: simplified iconv test and added check for libiconv 2001-02-21 Yeti * Makefile.am: corrected iconvconf.h to iconvenc.h * src/options.c: fixed undefined and misused ENCA_ENV_VAR when we don't have wordexp() to parse it * acinclude.m4: iconvenc.h is always created since I'm not able to explain automake we don't need it when we don't have iconv v0.9.0pre1 2001-02-20 Yeti * src/convert.c: trivial conversions from ASCII are carried out in built-in converter * src/EVERYTHING: cleaned terminology encoding vs. charset; encoding means (charset,surface) pair * src/options.c: converter names are case sensitive again * config.h is included only when HAVE_CONFIG_H * iconvenc.nul.h, acinclude.c, src/encnames.c: iconvenc.nul.h merged into encnames.c (neede only there when !HAVE_ICONV) * configure.in, src/getopt.c, src/getopt.h, src/getopt1.c, src/options.c: added GNU getopt so long options can be used everywhere (needs testing) * src/options.c: -m as complement to -M resets affected options to defaults 2001-02-19 Yeti * src/common.h, src/options.c, src/printresult.c: added iconv name output type, `-i' (only when HAVE_ICONV) * src/options.c: `-n' changed to `-e' * src/options.c: output types (except `-x') can be specified as -n NAME * iconvcap.c: updated for the new encodings and changed ICONV_ prefix to ICONV_NAME_, also changed the suffixes to pure alphanumeric, ISO-8859-1 test changed to ASCII * src/convert_iconv.c: updated to the new encoding/surface model * src/guess.c: try to detect swapped UCS-2 from the first byte pair, too * src/options.c: pointer woodoo to comply ISO C in print_some_list(): one more level of indirection in abbreviation table data * src/options.c, src/encnames.c: iconv name output type defined always, but when iconv names are not available error message is printed instead * iconvconf.h, iconvenc.h: the former renamed to the latter * iconvenc.h.nul: created. contains all iconv names defined to NULL * acinclude.m4, src/encnames.c, src/convert_iconv.c: iconvenc.h is either successfully generated by iconvcap or copied from iconvenc.h.nul so it always exists and is always #included * configure.in, src/options.c: getopt.h test (defines getopt_long(), etc.) * src/common.c: expand_abbreviation() returns pointer to whole abbreviation structure so it's possible to fetch the expanded name, too; all callers changed * script/bcstocs, script/brecode, script/b-cstocs, script/b-recode: the first two renamed to the second two * script/b-map: created. perl `map' wrapper 2001-02-18 Yeti * src/common.c: e_tmpfd() now returns empty string a file name when fails * src/options.c: max read limit increased to 16MB * src/options.c: default converter list changed, now is "built-in,librecode" for +librecode-interface, [+-]iconv-interface "built-in,iconv" for -librecode-interface, +iconv-interface "built-in" for -librecode-interface, -iconv-interface * src/convert_recode.c: cleaned-up to use the new encoding/surface model * src/convert.c, src/convert_common.h, src/convert_recode.c: request formatting (either for printing or for recode requests) function format_request_string() * src/convert_recode.c: temporary copy of original file is not deleted when rescue of damaged original fails (what a paranoia!) * src/common.c: e_fopen() and e_fclose(), fopen() and fclose() wrappers, unsed in various places * src/EVERYTHING: perror(NULL) changed to perror("") since some C libraries don't understand the former to print empty prefix string * src/encnames.c, src/options.c: added `surfaces' to --list option * src/convert.c: valid converter names are printed one per line * src/encnames.c: added iconv name to T_EncInfo, all defined to NULL when iconv interface is not build * src/common.c: implemented abbreviation searching expand_abbreviation() * src/options.c: print_some_list() uses the new abbreviation engine * src/convert.c: add_converter() uses the new abbreviation engine (needed some data types shake-up) * src/lang.c: got rid of `initialization discards qualifier...' warnings by shaking up with the consts (no functionality changed) 2001-02-17 Yeti * src/common.h: surface type formalized to surfint (instead of uint16) * src/encnames.c: implemented surface <-> name conversion * src/encnames.c, src/guess.c: changed UCS surfaces to recode style * src/options.c, src/enca.c: updated parse_x_arg(), removed dull-converter-like beahviour * src/locale_detect.c: get rid of str[c]spn() (they are ISO C, but autoscan tries to convince me I should check for them), flag-table approach is more efficient anyway * src/common.c: commented out strstrcount() (not needed) * src/encnames.c, src/encnames.h: empty surface SURF_REMOVE (to get only "/" as surface name) (dirty) 2001-02-14 Yeti * src/options.c: option letter space polluted by various listing options cleaned by introducing --list=WORD (incompatible with previous -l usage) * src/encnames.c: print_encoding_aliases() prints list of accepted encoding aliases (`recode -l' style) * src/encnames.c: encodings sorted alphabetically (by canonical name) * src/lang.c, src/lang_cs.c, src/lang_sk.c, src/lang_ru.c: ability to print what regular encodings belong to this particular language 2001-02-12 Yeti * src/lang.c: fixed not initializing language filter report for language `none' * src/encnames.h, src/encnames.c: introduced ENCF_MULTI flag marking multibyte encodings * src/printresults: heavily improved details (but still misses surfaces) * src/options.c: file name is printed with details except when user specifically asks not to print it * src/options.c: help texts updated * src/encnames.c, src/printresults.c: cstocs names of encodings not known to it changed to ???, but still printed the same in details * src/defaults.h: removed. all definitions moved to appropriate C files (or common.h) * src/encnames.c, src/options.c, src/prinresult.c: removed option `-g' * src/encnames.c: presqueezed aliases replaced by normal, we now squeeze names when needed (with hashing it's OK), also changes canonical names * config.h.top, configure.in: removed the former and add -D_GNU_SOURCE directly to CFLAGS * configure.in: removed warnings * configure.in: integer type sizes tested only when system doesn't provide stdint.h (and int's default changed to ISO C minimum) * configure.in, acinclude.h: moved my tests to the latter (newly created) to make the former more readable * guess.c: TEX_* and UTF_* defines moved to appropriate functions (as const) * guess.c: fixed missing print_flags_or() for language hooks (from ????) 2001-02-11 Yeti * src/encnames.c: hashing is used to find encoding names * src/options.c: fixed not recognizing output encoding (from 2000-02-02) * src/unicodemap.c: `-l' prints each group on separate line 2001-02-10 Yeti * src/guess.c: handle correctly case when a language has only one encoding * src/guess.c: multibyte tests use count table for fast rejecting * src/guess.c: surface detection, eol_surface() 2001-02-08 Yeti * src/lang_ru.c, src/encnames.c, src/unicodemap.c: added IBM 866 charset * src/filters.h: made ibm866 filter alias to keybcs2 filter (they're identical) * src/guess.c: saved stdin is not restored and `up' is not recomputed when nothing was filtered out 2001-02-06 Yeti * src/detect_lang.c, src/locale_detect.c: renamed the former to the latter * src/filters.c, src/filters.h, src/lang_cs.c: first two created (language filter repository) and all box-drawing filters moved there * src/filters.c: added bow-draing filters for more encodings * src/common.h, src/options.c, src/printresult.c: implemented -n output type (prints `canonical' encoding name used internally in enca) * src/lang_sk.c, src/lang_sk.h, src/lang_ru.c, src/lang_ru.h, src/lang.c, src/encnames.c, src/unicodemap.c: added Slovak and Russian languages and appropriate encodings * src/unicodemap.c: introduced the idea of compatible encodings; LATIN2 and CYRILLIC groups defined * all headers: revised header file dependencies * src/lang.c, src/locale_detect.c: implemented the notion of no language---when user sets language to `none' no regular encodings are processed (so when you say `-UL none' only pure ascii gets recognized) * src/options.c: fixed broken `-P' (an old bug) 2001-02-05 Yeti * src/lang.c, src/lang.h, src/lang_cs.c, src/lang_cs.h: created the first two and moved all regular encoding routines to them * src/options.c: implemented language settings (added Language to Settings) 2001-02-04 Yeti * src/unicodemap.c: is_subset_consistent() now uses translation table for checking * src/guess.c: incorporated multibyte encodings into the guessing process * src/guess.c: implemented an absolute likehood test of the applied to the relative winner 2001-02-03 Yeti * src/common.c, src/common.h: introduced type flagint for tables of flags (defined as short int), all callers changed * src/options.c: fixed accepting invalid option values, ReadLimit must be a multiple of 4 (to make UCS tests more reliable) * src/guess.c, src/printresult.c: added number of 8bit's (up) to details * src/guess.c: finished is_valid_utf8(), is_valid_utf7(), looks_like_tex(), looks_like_ucs2() and looks_like_ucs4() tests (except surfaces) 2001-02-02 Yeti * src/unicodemap.c: added many missing characters to maps * src/unicodemap.c: shortened maps by starting them from first character that doesn't map to itself * src/options.c: finally removed old dull-conversion syntax * src/options.c, configure.in: long `GNU style' options---when getopt_long() function is available, configure test added * src/options.c, configure.in: program_invocation_short_name is used when offered by system, otherwise strip_path() is used to make it * src/options.c, configure.in: value of environment variable ENCAOPT is prepended before command line options---when wordexp() function is available, configure test added 2001-02-01 Yeti * src/EVERYTHING: encoding are no longer identified by name, but integer eid is used; T_Encoding contains---beside eid---surface, but it's not used for anything yet * implemented name squeezing and alias recognition---almost any sensible (and a whole bunch of stupid) encoding identifier is recognized * introduced new, less stupid, `canonical' names---passed to external converter and looked-up faster than the others * src/guess.c, src/enca.c, src/printresult.c: result is passed as T_Encoding type * src/guess.c, src/printresults.c, src/lang_cs.c: print implemented as `object', guess details are fed by different functions when needed (no globals and circular dependencies anymore) * src/printresults.c: mapping from output type to encoding name is used instead of ugly switch () * src/unicodemap.c: character 0xa4 from koi8cs2 converted to tilde (0x7f) * src/options.c: refuse to serve as a dull converter when input encoding is not known to us * src/common.c, configure.in: implemented stpcpy() when not provided by system (configure test added) * src/guess.c, src/enca.c: 7bit ascii is no longer discriminated and no longer causes enca return nonzero error code 2001-01-30 Yeti * src/langdata_cs.c, src/langhook_cs.c, src/lang_cs.c: the first two merged to the third containing [almost?] all language specific stuff 2001-01-29 Yeti * src/encnames.c: created. (language independent encoding name handling) 2001-01-28 Yeti * src/common.h, configure.in: tests for stdint.h and integer type sizes used to define uint16 and uint32 * src/unicodemap.c: changed map storage type to uint16 thus saving several kilobytes, removed need for an empty last table * src/guess.c: added looks_like_ucs2(), looks_like_ucs4() and partially looks_like_utf7() 2001-01-27 Yeti * src/guess:c reimplemented look_like_TeX() in a more efficient way * src/EVERYTHING: static file globals used only in one function moved into the appropriate function * man/enca.1: made more human readable, different macros are used 2001-01-26 Yeti * src/detect_lang.c, src/detect_lang.h: detect_lang() accepts string parameter now * src/guess.c: implemented utf-8 parse test is_valid_utf8() and (La)TeX-encoded accents test look_like_TeX() 2001-01-25 Yeti * src/detect_lang.c, src/detect_lang.h, src/Makefile.am, src/defaults.h: guessing user's preferred language from locale (not used yet) * configure.in, acconfig.h: implemented check for locale.alias v0.7.7 2001-01-01 Yeti * e_read4() now consistently sets number of bytes in buffer to zero even when reading of zero bytes is requested (seems to break nothing, but...) * documentation synchronized 2000-12-31 Yeti * `none' is accepted as converter name and causes clearing the converter list * finished iconv interface * changed some messages, hope no one parses them * ssize_t availability checked by configure 2000-11-29 Yeti * long long int availability is now explicitely checked by configure * unsigned char -> byte * implemented e_write4() and e_read4() that allow to specify buffer address and size (e_read_with_limit replaced by e_read4()) * fixed files closed twice in copy_and_convert() * fixed bad return value tests for e_read() and e_write() in copy_and_convert() * implemented iconv_one_step() and enc_trans() for iconv, so it is almost usable on iconv-transitive (GNU) systems now 2000-11-28 Yeti * iconv transitivity is now explicitely checked by iconvcap instead of checking for gconv 2000-11-26 Yeti * misspelled `Europian' corrected to `European' in macce long name 2000-11-21 Yeti * fixed some nonsubstantial stuff, redundant #includes, docs and comments forgotten in too hastily released v0.7.6 * convert_iconv.c separated from convert.c v0.7.6 2000-11-20 Yeti * unicode mapping data made NULL terminated instead of fixed-length * discovered bug in gcc :-( * all upper-half-of-ascii structures promoted to 256 characters (too many changes to record here) * support for cork encoding ceased * help text updated and divided to sections (thus fixing warning about too long, ISO C violating, string) * get_in_enc_list() and get_converters() changed to print_* printing the lists, called directly from process_opt() * convert_recode.c separated from convert.c to make the amount of #if's bearable * encoding list made NULL terminated instead of fixed-length * reversed order of generating recoding table so, character with lowest 8bit code is always outputed for synonyms (instead of highest) * implemented converter flags CONV_EXTERN, we do not try to recover after external converter failure, since it's impossible by definition * xlat table cache bubble sorting on use * man page and other documentation synchronized 2000-11-19 Yeti * a simple test suite introduced in test/ (not distributed) * fixed stupid || -> && bug in e_close() causing failure in pipes * copy_and_convert() now processes what is saved in io_buffer always when called on stdin (not only when recoding is done too), this fixes bug in conversion to the same encoding in pipe * fixed comparing return value of e_tmpfd() with zero (instead of -1) causing not calling external converter in redirection * stdin is always copied to stdout when we are not able to perform conversion, irregardles of reason * some error messages improved 2000-11-18 Yeti * it's up to every converter to translate cstocs encoding names to its native names---implemented recode's enc_trans(), others use cstocs * rearranged converters to work in any order as expected, implemented ERR_* (internal) error codes in convert.c * implemented -c printing list of all valid converter names (get_converters()) * implemented e_tolower that cannot fail (and appropriate autoconf test) * split process_opt() to make less monster from it * error messages begin with enca file name without path (strip_path()) * some preliminary iconv support, the converter doesn't actually exist yet * errorneous values of most commandline parametres no longer cause enca to abort * request cache bubble sorting on use 2000-11-16 Yeti * fixed destroying outer and request after every use * implemented librecode request chache optimization * implemented e_unlink() * any converter combination/order can be specified on command line with -E option (meaning changed!) * external converter failure made non-fatal 2000-11-14 Yeti * bcstocs and brecode return exit status and message is printed when it fails 2000-11-05 Yeti * made iconv configure test, all configure results are cached 2000-10-31 Yeti * config.h is always included first (even before system headers) 2000-10-30 Yeti * fixed freeing not allocated request in convert_recode() * implemented some more verbosity in converter * strstr() alternative moved to common.c * implemented strstrcount() conting occurrences of needle * '/' is added after both in_enc and out_enc when creating recode request string, partially helps with touchy librecode, but sometimes it fails anyway * monstrous convert_recode() split to several functions, nevertheless remains monstrous 2000-10-25 Yeti * more autoconf madness v0.7.5 2000-10-25 Yeti * strstr() defined in options.c when not provided by system library 2000-10-22 Yeti * copying policy changed to GNU/GPL version 2, explicitely, instead of version 2 or any later version * librecode autoabort feature finally disabled * fixed request cache initialization bug * fixed O_RDONLY zero/nonzero portability problem * convert_recode() restores file from temporary copy when librecode converter fails * encoding names are not duplicated but assigned in get_encodings() * heavy use of const modifier (too many changes to record here) * solved cyclic dependancy between langdata and langhook headers by making hookdata plain pointer (i.e. void*) and moving T_HookData definition to .c file 2000-10-18 Yeti * removed ffname_[rw]() filename wrapper in cases we cannot get stdin/stdout (like e_lseek()) * stdin/stdout is internally passed as NULL (instead of empty string) so one can no longer call enca '' '' to make it wait for several stdin's * return values of recode_new_outer() and recode_new_request() are checked * implemented librecode request caching, outer is now global and new request_cache too, neverhteless caching strategy is poor * implemented e_strdup() (strdup()) is not ISO/POSIX) and heavily used instead of strlen/malloc/strcpy sequences 2000-10-15 Yeti * fixed closing stderr in e_close() (though calling it with filedescriptor 2 would be bug anyway) * cleaned types of variables library functions are called with (unsigned long int -> size_t, etc.) * unsigned long long int is used when available for weight/occurence computations, mathint type introduced * cleaned names possibly conflicting with POSIX reserved names and libc header reserved names * recode_scan_request() return value is now checked for success * fails back to external converter when librecode cannot convert due to errorneous request (as one would understand from man page) * prints error message when conversion is impossible * merged all file-copying code in convert.c to copy_and_convert(), convert_internal_stdin() optimized out of existence * return codes in convert.c changed, -1 is now returned as error code only by low level i/o from common.c * get/generate_xtable() are no longer able to generate identity (not needed) 2000-10-14 Yeti * cleaned some T_GResult.boxout residua * addresses of language filter/hook reports printing functions passed in T_GResult * some #include <...> corrected to "..." for local files * corrected filter reports in SMS mode 2000-10-13 Yeti * binary filter is more drastic, requires BIN_MIN_TEXT_CHAR letters (instead of non-binary characters) to switch back to text mode v0.7.4 2000-10-11 Yeti * fixed behaviour in SMS mode (mismatched if([!]Settings.SMSMode); might even cause coredumps?) * implemented box-drawing character filter filter_boxdraw_out() and put it into langdata_cz.c, again with interface lang_filter(); not run in SMS mode (printresults.c updated accordingly) v0.7.3 2000-10-08/09 Yeti * fixed reading only 4096 bytes from pipe (by a crude way, even if trying to lower number of system calls as much as possible) from 0.7.1 * regenerated data (hope last time) and realized pair/... based guessing is nonsense * implemented filter that filters out blocks of probably binary data (stdin is saved when conversion is required), filter_binary_out() number of filtered characters is printed by -d * stdin is copied to stdout when its encoding is unknown (much more logical, but can break existing scripts) v0.7.2 2000-10-05 Yeti * corrected F_EMPTY message (F_EMPTY now really means file is empty) * second best is marked in -d output by `-' (added p_esec to T_GResult) 2000-10-04 Yeti * *_cs filenames corrected to *_cz (Czechoslovakian -> Czech) * lang_hook() divided to interface lang_hook() and lang_hook_stz() doing the real work (preparation for more langhooks) * information about active language hooks saved in active_hooks (for printing) * perhaps solved language hook info printing dependency (when -d): new function print_lang_hook_data() is defined directly in langhook_cz and called in print_results 2000-10-02/03 Yeti * recoding chains made possible by starting -x parameter with `..' * BSD [s]random() changed to ISO [s]rand() * fixed all remaining warnings except 1.4 kB long string containing help text (compile tried with -Werror -Wall -pedantic -ansi -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs) v0.7.1 2000-10-01 Yeti * moved to low level i/o: e_fopen() changed to e_open(), etc., e_write(), etc. introduced, convert_die() abadoned * return codes slightly changed to distinguish between guessing failure and i/o failure * get_xtable() and generate_xtable() changed to be able to generate identity (that is then used in convert_internal_stdin()) * not all i/o failures cause aborting * documentation improvements and corrections, as usual 2000-09-30 Yeti * temporary file creation is tried 3x and existing temporary files are not overwirtten v0.7.0 2000-09-25/26 Yeti * removed option `disable external converter' (-e), empty -C parameter can be used instead * e_tmpf() divided to e_tmpf() creating the file and e_tmpfname() generating temporary file name * fixed memory leak (not freeing tmpfname) in convert_recode() and convert_external() * man page updated 2000-09-24/25 Yeti * fixed io_pos == 0 bug when enca converts stdin as dull converter * unicode.* renamed to unicodemap.* * -x encoding separator changed to .. to be compatible with recode and comply RFC 1345 (allowing comma in encoding names) * multiple .. allowed in -x argument to make possible specify recode chains (but only recode understand them) * ffname() divided to ffname_r() and ffname_w(), one returns stdin name one stdout name * implemented convert_recode() converting via recode library * conditionaly added program_name and other stuff requred by librecode * == changed to = in bcstocs and brecode to make them work in older bash * conversion to the same encoding no longer causes warnings * conversion to the same encoding works correctly even for stdin * ascii no longer considered unknown encoding * introduced verbose option (-V), converter now prints what is doing on -V not on -p * librecode interface _disabled_ by default in configure.in 2000-09-23/24 Yeti * two underscores removed from begin (and end) of #defines to comply ISO C * guess read buffer and convert read/write buffer merged (the same applies to BUFFER_SIZE and Settings.ReadLimit) and this io_buffer made persistent (created by new functions enca_init(), destroyed by enca_done()) so information from stdin does not get lost * user specified read limit is rounded up to nearest multiple of 16 * convert_internal() splitted to convert_internal_file() and convert_internal_stdin(), that converts stdin to stdout * introduced e_tmpf() creating temporary files since none of glibc functions does The Right Thing (execept maybe non-POSIX tempnam()) * convert_external() creates temporary file and put stdin there if stdin is to be converted and passes `-' as fourth parameter to converter instructing it to send output to stdout * bcstocs and brecode rewritten to recognize the fourth parameter and put under GNU GPL * a new output type OT_ALIAS (option -g) introduced that lists all known aliases and -f does approximately the same as in 0.6 serie again * resloved strange dependencies between langdata and langhook * fixed e_tmpf() passing-by-value bug * encoding names specified as -x parameters are converted to lowercase * fixed terrible typo || -> && in bcstocs and brecode 2000-09-22/23 Yeti * introduced recode wrapper script, brecode * introduced is_subset_consistent() checking if characters have the same meaning in two encodings (unfortunately makes guess.c dependent on unicode.h) * implemented -M (by function sms_hook()) * activation and usefulness of sms_hook() reported by -d * added Cork encoding to unicode.c to make -M useful (but conversion from/to Cork is still quite bad, and should be done by cstocs/librecode only) * implemented e_malloc(), e_calloc() and e_realloc() aborting on failure, declared free() in common.h, defined NEW() allocator [this one is really braindead] 2000-09-21/22 Yeti * fixed not-initalizing-encoding-table coredump * added new output type OT_RFC1345 (option -r), some OT's renamed * added -r and -M options (-M accepted, but not implemented yet) * prefixing with filename is now on by default when run on more than one file * added RFC 1345 names and in consequence renamed name* memebers of S_EncRaw and S_EncStat to keep namespace consistent * much more (in fact all known) aliases listed in full names -- maybe too many * in detailed output is now file name printed on the top and cstocs and RFC 1345 names are printed separately in (bottom) result part * hook name is not fixed, but part of langdata_cs.c (still not very clean, though) 2000-09-17/18 Yeti * moved to autoconf/automake (not respected by the C sources yet) * reorganized to deep package * fixed `cd . && pwd` bug in automake :-( * old config.h renamed to defaults.h * rawdata.c and rawuni.c merged with encdata.c and encuni.c mainly to avoid problems with automake * bcstocs now prints error message when it fails, to make things clear * encopt* renamed to options*, encuni* to unicode* and encdata* to langdata* * enca.c split to convert.c, guess.c, printresult.c and langhook.c, header files introduced, some functions renamed and their parameters changed (too many changes to list here) (greetings to Halef) * process_file() now only controls what actions should be taken and no longer does anything itself * print_results() no longer calls converter, this is done in process_file() * results of guessing passed encapsulated in struct S_GResult * language specific files (lang*) got _cs extension * HELP_TEXT and VERSION_TEXT defined as strings instead of macros * common stuff moved to common.c/common.h [enca now compiles but doesn't work yet] v0.6.2 2000-08-17 Yeti * help texts (-h and -v) improved, thanx to Halef * some other minor changes in docs v0.6.1 2000-08-15 Yeti * tarball repacked with files encuni.c, rawuni.c, rawuni.h missing in 0.6.0 tarball * bcstocs magic line changed to #!/bin/bash * TODO updated to reflect current work on 0.7 v0.6.0 2000-07-20 Yeti * formal changes in rawdata.c * internal converter implemented (rawuni.c, encuni.c, enca.c) * -x can now take form -x in_enc,out_enc * introduced options -e and -E * introduced option -l * READLIMIT_MAX changed back to 1MB * man page improved(?) v0.5.0 2000-07-17 Yeti * waits for converter to return (much slower conversion, but doesn't produce `cannot fork()'s) * -p makes -x print what is doing * fixed `Unrecognized encoding' when winner is 1250 (from 0.4.3) * _exit() in converter caller corrected to exit() since we don't use vfork() * use EXIT_SUCCESS and EXIT_FAILURE instead of 0 and 1 * aborts when it cannot close open file (since it means something very bad is happening) * added forgotten z-with-check to il2/1250 hack * il2/1250 hack put to separate function * (minimalistic) config.h introduced * READLIMIT_MAX put to config.h and changed to 4MB * recomputed statistical data (probably not the last time) * also other defaults put to config.h * corrected -d table alignment * fixed not initializing significancy table * added -f to cp and rm in Makefile * some other code clean-ups v0.4.3 2000-07-14 Yeti * corrected short encoding name t1 -> cork * corrected some dividing by zero resulting inf/nan rating * il2/1250 hack made more logical * -d prints encodings alphabetically sorted * significancy table is computed only once v0.4.2 2000-07-13 Yeti * removed options -m/-M since it's nonsense to maintain something marked `do not use' in man page * -p now shows stdin as , instead of empty string * ascii and ??? made `encodings' * bcstocs doesn't depend on mktemp * some other code clean-ups v0.4.1 2000-07-12 Yeti * silly default of 60 significant characters changed to 10 * minor bugfixes and corrections v0.4.0 2000-07-10 Yeti * rewritten from scratch in ISO C Project-OSS-Revival-enca-36defd7/DEVELOP.md000066400000000000000000000065411507545312400202340ustar00rootroot00000000000000# Developing programs utilizing libenca * Look at libenca API documentation in devel-docs/html. * Look into enca source how it uses libenca. Note enca is quite a simple application (practically all libenca interaction is in `src/enca.c`). It's single-threaded and uses one language and one analyser all the time. Provided each thread has its own analyser, libenca should be thread-safe (untested). * Take names starting with `ENCA`, `Enca`, `enca`, `_ENCA`, `_Enca`, and `_enca` as reserved. * pkgconfig is supported, you can use `PKG_CHECK_MODULES` to check for libenca in your configure scripts # How to add a new charset/encoding (optional steps are marked _[optional]_): * `iconvcap.c`: * Add a new test (even if you are 100% sure iconv will never support it), please see top of `iconvcap.c` for some documentation how it works. * `tools/encodings.dat`: * Add a new entry. * Use `@ICONV_NAME_@` (as it will appear in iconvcap output) for iconv names. * `tools/iconvenc.null`: * Add it (with NULL) Specifically, for regular 8bit (language dependent) charsets: * `lib/unicodemap.c`: * Add a new map to Unicode (UCS-2) `unicode_map_...[]`. * Add a new `UNICODE_MAP[]` entry. * `lib/filters.c`: _[optional]_ * Create a new filter or make an alias of an existing filter. * `lib/lang_??.c`: * Add the new encoding to some existing language(s). * Add appropriate filters or hooks _[optional]_. * `data/maps/??.map`: * Add a new map to Unicode (UCS-2) Specifically, for multibyte encodings: * `lib/multibyte.c`: * Create a new check function. * Put it into appropriate ascii/8bit/binary test group `ENCA_MULTIBYTE_TESTS_ASCII[]`, `ENCA_MULTIBYTE_TESTS_8BIT[]`, `ENCA_MULTIBYTE_TESTS_BINARY[]`. * Put strict tests (i.e. test which may fail) first, looks-like tests last. # How to add a new surface * Try to ask the author what to do, since this may be complicated, or * Hack, basically it must be added to `lib/enca.h` `EncaSurface enum`, to `lib/encnames.c` `SURFACE_INFO[]` a detection method must be added to `lib/guess.c` and now the most complicated part: this new method must be used in the right places in `lib/guess.c` `make_guess()`. # How to add a new language * For a comprehensive, step-by-step guide to adding a new language, see [ENCA-ADD-LANGUAGE-GUIDE.md](ENCA-ADD-LANGUAGE-GUIDE.md). * Create a new language file: * Create new `lib/lang_....c` files by copying some existing (use locale code for names) * Fill all encoding and occurence data, create filters and hooks (see `filters.c` too). You can do it manually, but look how it's done for existing languages in `data/*` and read `data/README`. * `lib/internal.h`: * Add new `ENCA_LANGUAGE_....` * `lib/lang.c`: * Add a new `LANGUAGE_LIST[]` entry pointing to the `ENCA_LANGUAGE_....` # Automake, autoconf, libtool, ... note If you run `./autogen.sh` and it finishes OK, you are lucky and can expect things to work. You have to give `--enable-maintainer-mode` to `./configure` (or `./autogen`) to build dists and/or the strange stuff in `tools/`, `data/`, `tests/`, and `devel-docs/`. # Repository and continuous integration The git repository is located at GitHub: https://github.com/nijel/enca There is also continuous integration on GitHub: https://github.com/nijel/enca/actions Project-OSS-Revival-enca-36defd7/ENCA-ADD-LANGUAGE-GUIDE.md000066400000000000000000000210421507545312400222370ustar00rootroot00000000000000# Comprehensive Guide: Adding Finnish Language Support to Enca This guide provides a **detailed, step-by-step process** for introducing new language support (Finnish) to the Enca project. --- ## 1. Obtain a Finnish Text Sample First, obtain some Finnish text to use as a sample. For example, download a sample from: - https://wortschatz.uni-leipzig.de/en/download/Finnish#fin-fi_web_2019 Save it as `sampletext.utf8`. --- ## 2. Create Language Data Files ### 2.1 Create the Language Directory ```sh mkdir -p data/finnish ``` --- ### 2.2 Create the Finnish Data Script Create `data/finnish/doit.sh` with the following content: ```bash #!/bin/bash ../doit.sh iso88594 cp1257 ``` Make it executable: ```sh chmod a+x data/finnish/doit.sh ``` --- ### 2.3 Create Sample Files for Encodings Convert your sample text to the required encodings. ```sh iconv -f UTF-8 -t ISO-8859-4 sampletext.utf8 -o sampletext.iso88594 iconv -f UTF-8 -t CP1257 sampletext.utf8 -o sampletext.cp1257 ``` --- ### 2.4 Generate `rawcounts.` Files Go to the `enca/data` directory and run: ```sh make countall ./countall < finnish/sampletext.cp1257 > finnish/rawcounts.cp1257 ./countall < finnish/sampletext.iso88594 > finnish/rawcounts.iso88594 ``` ы **Example for `data/finnish/rawcounts.iso88594`:** ``` +0x08 . 7 +0x15 . 1 +0x16 . 1 +0x20 43309824 +0x21 ! 32929 +0x22 " 157749 +0x23 # 2231 +0x24 $ 273 +0x25 % 20671 +0x26 & 10414 +0x27 ' 14661 +0x28 ( 176988 +0x29 ) 173923 +0x2a * 2473 +0x2b + 7176 ... ``` --- ### 2.5 Generate `.base` Files Run: ```sh ./normalize.pl < finnish/rawcounts.cp1257 > finnish/cp1257.base ./normalize.pl < finnish/rawcounts.iso88594 > finnish/iso88594.base ``` **Example for `data/finnish/iso88594.base`:** ``` +. 0 +. 0 +. 0 + 5999 +! 4 +" 21 +# 0 +$ 0 +% 2 +& 1 +' 2 +( 24 +) 24 +* 0 ++ 0 +, 326 ... ``` --- ### 2.6 Generate `finnish.h` ```sh cd data/finnish ./doit.sh ``` This will produce `data/finnish/finnish.h` (full file, do not edit by hand). --- ## 3. Update Data Makefiles ### 3.1 `data/Makefile.am` **Full diff:** ```diff --- a/data/Makefile.am +++ b/data/Makefile.am @@ -16,6 +16,7 @@ noinst_HEADERS = \ croatian/croatian.h \ czech/czech.h \ estonian/estonian.h \ + finnish/finnish.h \ hungarian/hungarian.h \ latvian/latvian.h \ lithuanian/lithuanian.h \ @@ -46,6 +47,7 @@ noinst_SCRIPTS = \ croatian/doit.sh \ czech/doit.sh \ estonian/doit.sh \ + finnish/doit.sh \ hungarian/doit.sh \ latvian/doit.sh \ lithuanian/doit.sh \ @@ -61,6 +63,7 @@ BASES = \ croatian/cp1250.base \ czech/iso88592.base \ estonian/iso88594.base \ + finnish/iso88594.base \ hungarian/iso88592.base \ russian/koi8r.base \ latvian/cp1257.base \ @@ -76,6 +79,7 @@ RAWCOUNTS = \ croatian/rawcounts.cp1250 \ czech/rawcounts.iso88592 \ estonian/rawcounts.iso88594 \ + finnish/rawcounts.iso88594 \ hungarian/rawcounts.iso88592 \ latvian/rawcounts.cp1257 \ lithuanian/rawcounts.cp1257 \ ``` --- ## 4. Create the Finnish Language Implementation File Add file: `lib/lang_fi.c`: ```c name=lib/lang_fi.c /* encoding data and routines dependent on language; finnish Copyright (C) 2025 This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include "enca.h" #include "internal.h" #include "data/finnish/finnish.h" /* Local prototypes. */ static int hook(EncaAnalyserState *analyser); static int hook_iso4cp1257(EncaAnalyserState *analyser); /** * ENCA_LANGUAGE_FI: * * Finnish language. * * Everything the world out there needs to know about this language. **/ const EncaLanguageInfo ENCA_LANGUAGE_FI = { "fi", "finnish", NCHARSETS, CHARSET_NAMES, CHARSET_WEIGHTS, SIGNIFICANT, CHARSET_LETTERS, CHARSET_PAIRS, WEIGHT_SUM, &hook, NULL, NULL, NULL, }; /** * hook: * @analyser: Analyser state whose charset ratings are to be modified. * * Launches language specific hooks for language "fi". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook(EncaAnalyserState *analyser) { return hook_iso4cp1257(analyser); } /** * hook_iso4cp1257: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between iso8859-4 and cp1257 charsets for language "fi". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_iso4cp1257(EncaAnalyserState *analyser) { static const unsigned char list_iso88594[] = { 0xb9, 0xbe, 0xa9, 0xae, 0xa8}; static const unsigned char list_cp1257[] = { 0xf0, 0xfe, 0xd0, 0xde, 0xb8}; static EncaLanguageHookData1CS hookdata[] = { MAKE_HOOK_LINE(iso88594), MAKE_HOOK_LINE(cp1257), }; return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata); } /* vim: ts=2 */ ``` --- ## 5. Generate the Finnish Header After running `doit.sh`, `data/finnish/finnish.h` is generated. **Full file content should be committed, do not edit by hand.** --- ## 6. Update Source Makefiles and Language Registration ### 6.1 `lib/Makefile.am` **Full diff:** ```diff --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -21,6 +21,7 @@ libenca_la_SOURCES = \ lang_bg.c \ lang_cs.c \ lang_et.c \ + lang_fi.c \ lang_hr.c \ lang_hu.c \ lang_lt.c \ ``` ### 6.2 Update Language Registration **lib/internal.h** ```diff --- a/lib/internal.h +++ b/lib/internal.h @@ -483,6 +483,7 @@ extern const EncaLanguageInfo ENCA_LANGUAGE_BE; extern const EncaLanguageInfo ENCA_LANGUAGE_BG; extern const EncaLanguageInfo ENCA_LANGUAGE_CS; extern const EncaLanguageInfo ENCA_LANGUAGE_ET; +extern const EncaLanguageInfo ENCA_LANGUAGE_FI; extern const EncaLanguageInfo ENCA_LANGUAGE_HR; extern const EncaLanguageInfo ENCA_LANGUAGE_HU; extern const EncaLanguageInfo ENCA_LANGUAGE_LT; @@ -504,4 +505,4 @@ extern EncaGuessFunc ENCA_MULTIBYTE_TESTS_8BIT_TOLERANT[]; /* Locale-independent character type table. */ extern const short int enca_ctype_data[0x100]; -#endif /* not LIBENCA_H */ +#endif /* not LIBENCA_H */ ``` **lib/lang.c** ```diff --- a/lib/lang.c +++ b/lib/lang.c @@ -51,6 +51,7 @@ static const EncaLanguageInfo *const LANGUAGE_LIST[] = { &ENCA_LANGUAGE_BG, /* Bulgarian. */ &ENCA_LANGUAGE_CS, /* Czech. */ &ENCA_LANGUAGE_ET, /* Estonian. */ + &ENCA_LANGUAGE_FI, /* Finnish. */ &ENCA_LANGUAGE_HR, /* Croatian. */ &ENCA_LANGUAGE_HU, /* Hungarian. */ &ENCA_LANGUAGE_LT, /* Latvian. */ @@ -347,4 +348,3 @@ enca_get_charset_similarity_matrix(const EncaLanguageInfo *lang) } /* vim: ts=2 */ ``` --- ## 7. Update and Add Tests ### 7.1 Add Test Files Create `test/fi-s.utf8` with this content: ``` Hyvä ystävä, älä käytä öljyä yöllä. Kävelyä järven äärellä on tärkeää. š ``` Convert to encodings: ```sh iconv -f UTF-8 -t ISO-8859-4 test/fi-s.utf8 -o test/fi-s.iso88594 iconv -f UTF-8 -t CP1257 test/fi-s.utf8 -o test/fi-s.cp1257 ``` **Add these files to the repo.** --- ### 7.2 Update Test Setup **test/setup.sh** ```diff --- a/test/setup.sh +++ b/test/setup.sh @@ -1,10 +1,11 @@ ENCA=$top_builddir/src/enca -TEST_LANGUAGES="be bg cs et hr hu lt lv pl ru sk sl uk zh" +TEST_LANGUAGES="be bg cs et fi hr hu lt lv pl ru sk sl uk zh" ALL_TEST_LANGUAGES="$TEST_LANGUAGES none" TEST_PAIR_be="koi8uni cp1251" TEST_PAIR_bg="ibm855 cp1251" TEST_PAIR_cs="keybcs2 ibm852" TEST_PAIR_et="iso885913 baltic" +TEST_PAIR_fi="iso88594 cp1257" TEST_PAIR_hr="ibm852 cp1250" TEST_PAIR_hu="cp1250 ibm852" TEST_PAIR_lt="iso88594 baltic" ``` **test/simtable.c** ```diff @@ -59,6 +59,7 @@ main(int argc, char *argv[]) prl(&ENCA_LANGUAGE_BG, "1251mac"); prl(&ENCA_LANGUAGE_CS, "isowin 852kam"); prl(&ENCA_LANGUAGE_ET, ""); + prl(&ENCA_LANGUAGE_FI, ""); prl(&ENCA_LANGUAGE_HR, "isowin"); prl(&ENCA_LANGUAGE_HU, "isocork isowin[XXX]"); prl(&ENCA_LANGUAGE_LT, "winbalt lat4balt iso13win[XXX]"); @@ -70,4 +71,4 @@ main(int argc, char *argv[]) prl(&ENCA_LANGUAGE_UK, "macwin isokoi ibm1125"); return 0; -} +} \ No newline at endProject-OSS-Revival-enca-36defd7/FAQ000066400000000000000000000070101507545312400171360ustar00rootroot00000000000000#============================================================================ # Enca v1.21 (2025-10-20) guess and convert encoding of text files # Copyright (C) 2000-2003 David Necas (Yeti) # Copyright (C) 2009-2016 Michal Cihar #============================================================================ Frequently Asked Questions about Enca * Q: What obscure encoding the FAQ, THANKS, and other files use? * A: Run Enca on them and you'll see. * Q: How do I specify input encoding? * A: You can't. If you know the encoding, you don't need Enca. Use some fully-fledged converter. * Q: Why Enca can't detect both language and encoding? * A: Because this is impossible. Well, it's possible for natural, long enough texts. But Enca can detect encoding of nonsense and people are used to it. No program can tell you “ěčřýáíéú” is both Czech and e.g. ISO-8859-2. Incidentally, interpreting the same bytes as Win-1251 one gets “мишэбнйъ”, which is equally good Russian nonsense. * Q: Why Enca can't recognise encoding of all-uppercase texts? * A: Mostly again because there's a trade-off between nonsense detection and low-probability natural text detection. But it's possible to detect both, I'm working on that. * Q: Why Enca needs LC_CTYPE to be set? * A: No, it doesn't need it. But you need to use “-L language-code” then. It's possible to put it into ENCAOPT environment variable, if you want to make your life easier. (Never versions of Enca try to guess your language from other locale settings too.) * Q: Why “enca -x ascii” doesn't work? * A: Unfortunately there are several different things people call “conversion to ASCII”. Consider following characters: ě (Latin small letter e with caron) and ≫ (Much greater-than). By conversion to ASCII you may mean: 1a. Omitting these characters in output, because they are not representable in ASCII. 1b. Keeping these characters intact in output, because they are not representable in ASCII. 1c. Failing (possibly damaging the file), because they are not representable in ASCII 2. Approximating them with single, close ASCII characters; in this case probably plain “e” and “>”. 3. Expanding them to sequences of ASCII characters which may be less readable then the approximations above, but generally allow reconstruction of the original characters. Such sequences could be e.g. RFC-1345 mnemonics “e<” and “>>”. What happens when you run “enca -x ascii” on something, depends on the converter used. The usual scenario is: Enca uses librecode or libiconv, which do (1), and you get upset. The only tool doing (2) known to me is cstocs, and does it only for Latin2 characters (install cstocs and specify cstocs as the converter to be used, if you want (2)). AFAIK, there's no tool doing reasonably (3), though recode can expand to mnemonics (use rfc1345 as target charset instead of ascii). * Q: Why “enca -E cstocs” doesn't work in my RedHat/Fedora? * A: This is a cstocs problem. Cstocs is broken for Perl ≥ 5.8 and UTF-8 locales. Perl Unicode handling changes with every version so an advanced charset converter working in mutiple Perl versions is something between impossible and a big mess. Either set your locales to non-UTF-8 (e.g. ISO-8859-2) or don't use cstocs until this is resolved somehow. Project-OSS-Revival-enca-36defd7/INSTALL000066400000000000000000000366261507545312400176540ustar00rootroot00000000000000Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2017, 2020-2021 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell command './configure && make && make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the 'README' file for instructions specific to this package. Some packages provide this 'INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The 'configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a 'Makefile' in each directory of the package. It may also create one or more '.h' files containing system-dependent definitions. Finally, it creates a shell script 'config.status' that you can run in the future to recreate the current configuration, and a file 'config.log' containing compiler output (useful mainly for debugging 'configure'). It can also use an optional file (typically called 'config.cache' and enabled with '--cache-file=config.cache' or simply '-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how 'configure' could check whether to do them, and mail diffs or instructions to the address given in the 'README' so they can be considered for the next release. If you are using the cache, and at some point 'config.cache' contains results you don't want to keep, you may remove or edit it. The file 'configure.ac' (or 'configure.in') is used to create 'configure' by a program called 'autoconf'. You need 'configure.ac' if you want to change it or regenerate 'configure' using a newer version of 'autoconf'. The simplest way to compile this package is: 1. 'cd' to the directory containing the package's source code and type './configure' to configure the package for your system. Running 'configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type 'make' to compile the package. 3. Optionally, type 'make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type 'make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the 'make install' phase executed with root privileges. 5. Optionally, type 'make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior 'make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing 'make clean'. To also remove the files that 'configure' created (so you can compile the package for a different kind of computer), type 'make distclean'. There is also a 'make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type 'make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide 'make distcheck', which can by used by developers to test that all other targets like 'make install' and 'make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the 'configure' script does not know about. Run './configure --help' for details on some of the pertinent environment variables. You can give 'configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU 'make'. 'cd' to the directory where you want the object files and executables to go and run the 'configure' script. 'configure' automatically checks for the source code in the directory that 'configure' is in and in '..'. This is known as a "VPATH" build. With a non-GNU 'make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use 'make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple '-arch' options to the compiler but only a single '-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the 'lipo' tool if you have problems. Installation Names ================== By default, 'make install' installs the package's commands under '/usr/local/bin', include files under '/usr/local/include', etc. You can specify an installation prefix other than '/usr/local' by giving 'configure' the option '--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option '--exec-prefix=PREFIX' to 'configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like '--bindir=DIR' to specify different values for particular kinds of files. Run 'configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of '${prefix}', so that specifying just '--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to 'configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the 'make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, 'make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of '${prefix}'. Any directories that were specified during 'configure', but not in terms of '${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the 'DESTDIR' variable. For example, 'make install DESTDIR=/alternate/directory' will prepend '/alternate/directory' before all installation names. The approach of 'DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of '${prefix}' at 'configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving 'configure' the option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'. Some packages pay attention to '--enable-FEATURE' options to 'configure', where FEATURE indicates an optional part of the package. They may also pay attention to '--with-PACKAGE' options, where PACKAGE is something like 'gnu-as' or 'x' (for the X Window System). The 'README' should mention any '--enable-' and '--with-' options that the package recognizes. For packages that use the X Window System, 'configure' can usually find the X include and library files automatically, but if it doesn't, you can use the 'configure' options '--x-includes=DIR' and '--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of 'make' will be. For these packages, running './configure --enable-silent-rules' sets the default to minimal output, which can be overridden with 'make V=1'; while running './configure --disable-silent-rules' sets the default to verbose, which can be overridden with 'make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX 'make' updates targets which have the same timestamps as their prerequisites, which makes it generally unusable when shipped generated files such as 'configure' are involved. Use GNU 'make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its '' header file. The option '-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put '/usr/ucb' early in your 'PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in '/usr/bin'. So, if you need '/usr/ucb' in your 'PATH', put it _after_ '/usr/bin'. On Haiku, software installed for all users goes in '/boot/common', not '/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features 'configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, 'configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the '--build=TYPE' option. TYPE can either be a short name for the system type, such as 'sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file 'config.sub' for the possible values of each field. If 'config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option '--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with '--host=TYPE'. Sharing Defaults ================ If you want to set default values for 'configure' scripts to share, you can create a site shell script called 'config.site' that gives default values for variables like 'CC', 'cache_file', and 'prefix'. 'configure' looks for 'PREFIX/share/config.site' if it exists, then 'PREFIX/etc/config.site' if it exists. Or, you can set the 'CONFIG_SITE' environment variable to the location of the site script. A warning: not all 'configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to 'configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the 'configure' command line, using 'VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified 'gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an Autoconf limitation. Until the limitation is lifted, you can use this workaround: CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash 'configure' Invocation ====================== 'configure' recognizes the following options to control how it operates. '--help' '-h' Print a summary of all of the options to 'configure', and exit. '--help=short' '--help=recursive' Print a summary of the options unique to this package's 'configure', and exit. The 'short' variant lists options used only in the top level, while the 'recursive' variant lists options also present in any nested packages. '--version' '-V' Print the version of Autoconf used to generate the 'configure' script, and exit. '--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally 'config.cache'. FILE defaults to '/dev/null' to disable caching. '--config-cache' '-C' Alias for '--cache-file=config.cache'. '--quiet' '--silent' '-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to '/dev/null' (any error messages will still be shown). '--srcdir=DIR' Look for the package's source code in directory DIR. Usually 'configure' can determine that directory automatically. '--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. '--no-create' '-n' Run the configure checks, but stop before creating any output files. 'configure' also accepts some other, not widely useful, options. Run 'configure --help' for more details. Project-OSS-Revival-enca-36defd7/Makefile.am000066400000000000000000000031541507545312400206450ustar00rootroot00000000000000if MAINTAINER_MODE SUBDIRS = tools data script lib src devel-docs test else SUBDIRS = tools script lib src devel-docs test endif man_MANS = man/enca.1 DISTCHECK_CONFIGURE_FLAGS = --enable-maintainer-mode ACLOCAL_AMFLAGS = -I m4 M4TESTS = \ m4/crash-me \ m4/gtk-doc.m4 \ m4/libiconv.m4 \ m4/libm.m4 \ m4/librecode.m4 \ m4/localias.m4 \ m4/long-text.l2 \ m4/recode-bugs.m4 \ m4/tools.m4 \ m4/typevar.m4 EXTRA_DIST = \ FAQ \ DEVELOP.md \ README.md \ TODO \ ChangeLog.prelib \ autogen.sh \ config.rpath \ enca.pc.in \ enca.spec \ enca.spec.in \ iconvcap.c \ topline.sh \ man/enca.1 \ $(M4TESTS) ####################### maintainer's targets ###################### # alias test=check test: check docs: cd $(srcdir)/devel-docs && $(MAKE) docs .PHONY: test docs pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = enca.pc $(pkgconfig_DATA): config.status install-data-hook: cd $(DESTDIR)$(man1dir); \ inst1=`echo enca | sed '$(transform)'`.1; \ inst2=`echo enconv | sed '$(transform)'`.1; \ $(LN_S) -f $$inst1 $$inst2 uninstall-hook: inst=`echo enconv | sed '$(transform)'`.1; \ rm -f $(DESTDIR)$(man1dir)/$$inst clean-local: rm -f iconvcap iconvcap.o *~ core.* distclean-local: rm -f iconvenc.h if MAINTAINER_MODE dist-check-maintainer: else dist-check-maintainer: @echo "*** maintainer mode must be enabled in order to make dist" @false endif dist-hook: dist-check-maintainer cat $(distdir)/tools/iconvenc.null >$(distdir)/iconvenc.h if MAINTAINER_MODE # To be run [by hand] before release (not the same as before making dists). update: ./topline.sh endif .PHONY: update Project-OSS-Revival-enca-36defd7/Makefile.in000066400000000000000000001023231507545312400206540ustar00rootroot00000000000000# Makefile.in generated by automake 1.17 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2024 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) am__rm_f = rm -f $(am__rm_f_notfound) am__rm_rf = rm -rf $(am__rm_f_notfound) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gcov.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libiconv.m4 \ $(top_srcdir)/m4/libm.m4 $(top_srcdir)/m4/librecode.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/localias.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/m4_ax_prog_cc_for_build.m4 \ $(top_srcdir)/m4/tools.m4 $(top_srcdir)/m4/typevar.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = enca.spec enca.pc CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \ } man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgconfigdir)" NROFF = nroff MANS = $(man_MANS) DATA = $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` DIST_SUBDIRS = tools script lib src devel-docs test data am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/enca.pc.in $(srcdir)/enca.spec.in AUTHORS COPYING \ ChangeLog INSTALL NEWS README THANKS TODO compile config.guess \ config.rpath config.sub depcomp install-sh ltmain.sh missing \ mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -700 -exec chmod u+rwx {} ';' \ ; rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz GZIP_ENV = -9 DIST_TARGETS = dist-xz dist-gzip # Exists only to be overridden by the user if desired. AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = \ find . \( -type f -a \! \ \( -name .nfs* -o -name .smb* -o -name .__afs* \) \) -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_EXEEXT = @BUILD_EXEEXT@ BUILD_OBJEXT = @BUILD_OBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ CONVERTER_LIBS = @CONVERTER_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CSCOPE = @CSCOPE@ CSTOCS_PROG = @CSTOCS_PROG@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFAULT_CONVERTER_LIST = @DEFAULT_CONVERTER_LIST@ DEFAULT_EXTERNAL_CONVERTER = @DEFAULT_EXTERNAL_CONVERTER@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GCOV = @GCOV@ GCOV_CPPFLAGS = @GCOV_CPPFLAGS@ GCOV_FLAGS = @GCOV_FLAGS@ GCOV_LDFLAGS = @GCOV_LDFLAGS@ GREP = @GREP@ GTKDOC = @GTKDOC@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ LIBICONV = @LIBICONV@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAP_PROG = @MAP_PROG@ MKDIR_P = @MKDIR_P@ MKTEMP_PROG = @MKTEMP_PROG@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PICONV_PROG = @PICONV_PROG@ RANLIB = @RANLIB@ RECODE_PROG = @RECODE_PROG@ RELEASE = @RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHELL_RANDOM_FILENAME = @SHELL_RANDOM_FILENAME@ STRIP = @STRIP@ UMAP_PROG = @UMAP_PROG@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CC_FOR_BUILD = @ac_ct_CC_FOR_BUILD@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__rm_f_notfound = @am__rm_f_notfound@ am__tar = @am__tar@ am__untar = @am__untar@ am__xargs_n = @am__xargs_n@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @MAINTAINER_MODE_FALSE@SUBDIRS = tools script lib src devel-docs test @MAINTAINER_MODE_TRUE@SUBDIRS = tools data script lib src devel-docs test man_MANS = man/enca.1 DISTCHECK_CONFIGURE_FLAGS = --enable-maintainer-mode ACLOCAL_AMFLAGS = -I m4 M4TESTS = \ m4/crash-me \ m4/gtk-doc.m4 \ m4/libiconv.m4 \ m4/libm.m4 \ m4/librecode.m4 \ m4/localias.m4 \ m4/long-text.l2 \ m4/recode-bugs.m4 \ m4/tools.m4 \ m4/typevar.m4 EXTRA_DIST = \ FAQ \ DEVELOP.md \ README.md \ TODO \ ChangeLog.prelib \ autogen.sh \ config.rpath \ enca.pc.in \ enca.spec \ enca.spec.in \ iconvcap.c \ topline.sh \ man/enca.1 \ $(M4TESTS) pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = enca.pc all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnits'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnits \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status $(AM_V_at)rm -f stamp-h1 $(AM_V_GEN)cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(AM_V_GEN)($(am__cd) $(top_srcdir) && $(AUTOHEADER)) $(AM_V_at)rm -f stamp-h1 $(AM_V_at)touch $@ distclean-hdr: -rm -f config.h stamp-h1 enca.spec: $(top_builddir)/config.status $(srcdir)/enca.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ enca.pc: $(top_builddir)/config.status $(srcdir)/enca.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-man1: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(man_MANS)'; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.1[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @case `sed 15q $(srcdir)/NEWS` in \ *"$(VERSION)"*) : ;; \ *) \ echo "NEWS not updated; not releasing" 1>&2; \ exit 1;; \ esac $(am__remove_distdir) $(AM_V_at)$(MKDIR_P) "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-zstd: distdir tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ eval GZIP= gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ eval GZIP= gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ *.tar.zst*) \ zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(MANS) $(DATA) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -$(am__rm_f) $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-local distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-man install-pkgconfigDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-man1 install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-man uninstall-pkgconfigDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook uninstall-man: uninstall-man1 .MAKE: $(am__recursive_targets) all install-am install-data-am \ install-strip uninstall-am .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool clean-local cscope cscopelist-am ctags ctags-am \ dist dist-all dist-bzip2 dist-gzip dist-hook dist-lzip \ dist-shar dist-tarZ dist-xz dist-zip dist-zstd distcheck \ distclean distclean-generic distclean-hdr distclean-libtool \ distclean-local distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-data-hook install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-man1 install-pdf \ install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am uninstall-hook \ uninstall-man uninstall-man1 uninstall-pkgconfigDATA .PRECIOUS: Makefile ####################### maintainer's targets ###################### # alias test=check test: check docs: cd $(srcdir)/devel-docs && $(MAKE) docs .PHONY: test docs $(pkgconfig_DATA): config.status install-data-hook: cd $(DESTDIR)$(man1dir); \ inst1=`echo enca | sed '$(transform)'`.1; \ inst2=`echo enconv | sed '$(transform)'`.1; \ $(LN_S) -f $$inst1 $$inst2 uninstall-hook: inst=`echo enconv | sed '$(transform)'`.1; \ rm -f $(DESTDIR)$(man1dir)/$$inst clean-local: rm -f iconvcap iconvcap.o *~ core.* distclean-local: rm -f iconvenc.h @MAINTAINER_MODE_TRUE@dist-check-maintainer: @MAINTAINER_MODE_FALSE@dist-check-maintainer: @MAINTAINER_MODE_FALSE@ @echo "*** maintainer mode must be enabled in order to make dist" @MAINTAINER_MODE_FALSE@ @false dist-hook: dist-check-maintainer cat $(distdir)/tools/iconvenc.null >$(distdir)/iconvenc.h # To be run [by hand] before release (not the same as before making dists). @MAINTAINER_MODE_TRUE@update: @MAINTAINER_MODE_TRUE@ ./topline.sh .PHONY: update # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: # Tell GNU make to disable its built-in pattern rules. %:: %,v %:: RCS/%,v %:: RCS/% %:: s.% %:: SCCS/s.% Project-OSS-Revival-enca-36defd7/NEWS000077700000000000000000000000001507545312400210522ChangeLogustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/README000077700000000000000000000000001507545312400207402README.mdustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/README.md000066400000000000000000000075501507545312400200740ustar00rootroot00000000000000# Enca - guess and convert encoding of text files [![codecov.io](https://codecov.io/github/nijel/enca/coverage.svg?branch=master)](https://codecov.io/github/nijel/enca?branch=master) [![Coverity Scan Build Status](https://scan.coverity.com/projects/3292/badge.svg)](https://scan.coverity.com/projects/nijel-enca) [![Coverage Status](https://coveralls.io/repos/nijel/enca/badge.png?branch=master)](https://coveralls.io/r/nijel/enca?branch=master) ## Copyright Copyright (C) 2000-2003 David Necas (Yeti) Copyright (C) 2009-2016 Michal Cihar ## Description Enca (Extremely Naive Charset Analyser) consists of two main components: * libenca, an encoding detection library. It currently supports Belarusian, Bulgarian, Croatian, Czech, Estonian, Finnish, Hungarian, Latvian, Lithuanian, Polish, Russian, Slovak, Slovene, Ukrainian, Chinese, and some multibyte encodings independently on language. The API should be relatively stable (to be read as `it will either change only marginally, or very drastically'). * enca, a command line frontend, integrating libenca and several charset conversion libraries and tools (GNU recode, UNIX98 iconv, perl Unicode::Map, cstocs). ## Installation Enca should compile and work on every POSIX.1 compliant system with ISO C compiler, and actually compiles on many noncompliant systems too (see below for list dependencies). If you have some of following additional tools, Enca can use them as external converters: * GNU recode and the associated recoding library * Perl charset converters Unicode::Map8 or Unicode::Map * cstocs, the famous Czech charset converter Optional features: * Compilation of GNU recode library interface is controlled by `--with-librecode[=DIR]`, `--without-librecode` configure parameters. It is compiled in by default when found. Optionally, you can specify a DIR; librecode include files will be then searched in DIR/include and the library itself in DIR/lib. * Compilation of UNIX98 iconv interface is controlled by `--with-libiconv[=DIR]`, `--without-libiconv` configure parameters. It is compiled in by default when found and considered usable. Optionally, you can specify a DIR; libiconv include files will be then searched in DIR/include and the library itself in DIR/lib. * Compilation of interface to external converter programs is controlled by `--enable-external`, `--disable-external` configure parameters. By default is is compiled in. Don't even try to compile Enca on system not supporting following ISO C and POSIX features: * Function prototypes. * Basic ISO C headers and functions declared there: - assert.h, ctype.h, math.h, stdarg.h, stdio.h, stdlib.h - any (working) one of string.h, strings.h, memory.h - unistd.h, sys/stat.h, sys/types.h For the impatient: Run ./configure make make check make install as usual. Running Test make test ## License Enca can be copied and/or modified under the terms of version 2 of GNU General Public License. Please see COPYING for details. ## Web resources Enca can be found at https://github.com/nijel/enca/ ## Bugs Report problems at . Some known bugs have been collected in BUGS section of enca manual page. ## Hacking (with) Enca Please see TODO for list of things that should be fixed and features to be implemented and their priority and also for list of things that definitely shouldn't be implemented. - For instructions on adding a new encoding or language, see [DEVELOP.md](DEVELOP.md). - For a comprehensive, step-by-step guide to adding a new language (example: Finnish), see [ENCA-ADD-LANGUAGE-GUIDE.md](ENCA-ADD-LANGUAGE-GUIDE.md). The file DEVELOP.md describes what needs to be done to add a new encoding or language to Enca. The directory devel-docs/html contains Enca library API documentation in HTML form. Project-OSS-Revival-enca-36defd7/THANKS000066400000000000000000000026761507545312400175340ustar00rootroot00000000000000Daniel Polanský (Halef) for the original usable help and version texts Václav Říkal (Vac) Jiří Polcar Jan Martínek (Johny) for help with testing on non-GNU/Linux platforms Михаил Шигорин for the initial impulse to add Ukrainian and Belarusian support, and invaluable help during its implementation Александр Боковой for enlightening of dark corners of Cyrillic charsets Александр Коваленко for finding many portability problems and the FreeBSD port David Voříšek for speed testing and hints, and pointing to some code problems Martin Man for Debian packages Michal Čihař for Debian packages that actually made it to Debian Nick Rezmerski David Kamholz for testing on Mac OS X Jindřich Makovička for MPlayer integration Jan Bílek for Win32 (MinGW and Cygwin) testing Михаил Рамендик for the idea of preferred MIME charset name style François Pinard for his infinitely powerful, though incredibly buggy, recode All the wise men who devised Unicode, though it was too late. Project-OSS-Revival-enca-36defd7/TODO000066400000000000000000000073251507545312400173050ustar00rootroot00000000000000#============================================================================ # Enca v1.21 (2025-10-20) guess and convert encoding of text files # Copyright (C) 2000-2003 David Necas (Yeti) # Copyright (C) 2009-2016 Michal Cihar #============================================================================ TO THE NEXT RELEASE: (this list must be empty at the time of release) IN FUTURE: (should be done, but maybe not right now) * LCUC check for cyrillic charsets. * Backups -- like cp, mv, etc. This will be hard to get right with all the silly converters. * More tests * Structured documentation (the manual page is ugly) - keep a reasonably brief manual page - put all the boring doc stuff somewhere else, there are possibilities: info: searchable, has links, partly portable, has console viewers HTML: poorly searchable, has links, most portable, has console viewers TeX (ps): not searchable, no links, portable, most pleasant to read, no console viewers => use SGML (or info itself?) and generate the others MAYBE SOMEDAY: (when I will have mood for it, items are freely moved here and removed again) * Detect all-caps texts OK. After several experiments it seems we have to - use pair occurrences, at least, with specifically computed difference-maximising weights - guess in two steps - first with uncapitalization and pair weights, and check whether the sample looks like natural text (garbageness test, but better) - if the first approach fails, do it as we do it now * design better levels of verbosity/warnings (or: remove the --verbose option, keep important messages and remove all others?) 0: only messages followed by exit(EXIT_FAILURE) (or abort()) are printed plus `cannot convert...' 1: all nonfatal errors/warnings 2: what converters are tried, what language gets detected (do not duplicate --details) >2: debug * _real_ paranoiac behaviour assuring that nothing gets lost and that conversion output is either correctly converted text or untouched original (requires major redesign of all the conversion stuff) NEVER: (you can do anything GNU GPL v2 allows, but I'll restrain) * features that nobody needs (mm, well, ... ok, let it be) * duplicate other tools functionality more than necessary, use them instead * dependency on anything that is not ISO C and/or POSIX (moreover do not use braindead features of both); important functionallity must be present everywhere nevertheless, enca can be smaller, faster or cleverer on some (GNU) systems * localization; please correct my english instead ;-> * converter calling generalization (would require inlcuding the whole wordexp thing in enca, and: launching external converter is Bad Thing(TM) anyway) * data in run-time files (needs parser (could live with) and disallows hooks (can't live without)) * loadable module support (it's not very portable) ------------- KNOWN ISO C CONFLICTS: (perhaps to be solved someday) All constants and typedefs. They start with ENCA_ and Enca, but: Names beginning with a capital `E' followed a digit or uppercase letter may be used for additional error code names. [errno.h] And additionally inside libenca (i.e. not so serious): * libenca.h: #define EPSILON [errno.h] * filters.c: isvbox[] [ctype.h] * guess.c: #define isbinary [ctype.h] * guess.c: #define istext [ctype.h] * multibyte.c: is_valid_utf7() [ctype.h] * multibyte.c: is_valid_utf8() [ctype.h] Some probably can't conflict. Project-OSS-Revival-enca-36defd7/aclocal.m4000066400000000000000000004032571507545312400204610ustar00rootroot00000000000000# generated automatically by aclocal 1.17 -*- Autoconf -*- # Copyright (C) 1996-2024 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.72],, [m4_warning([this file was generated for autoconf 2.72. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # host-cpu-c-abi.m4 # serial 18 dnl Copyright (C) 2002-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl This file is offered as-is, without any warranty. dnl From Bruno Haible and Sam Steingold. dnl Sets the HOST_CPU variable to the canonical name of the CPU. dnl Sets the HOST_CPU_C_ABI variable to the canonical name of the CPU with its dnl C language ABI (application binary interface). dnl Also defines __${HOST_CPU}__ and __${HOST_CPU_C_ABI}__ as C macros in dnl config.h. dnl dnl This canonical name can be used to select a particular assembly language dnl source file that will interoperate with C code on the given host. dnl dnl For example: dnl * 'i386' and 'sparc' are different canonical names, because code for i386 dnl will not run on SPARC CPUs and vice versa. They have different dnl instruction sets. dnl * 'sparc' and 'sparc64' are different canonical names, because code for dnl 'sparc' and code for 'sparc64' cannot be linked together: 'sparc' code dnl contains 32-bit instructions, whereas 'sparc64' code contains 64-bit dnl instructions. A process on a SPARC CPU can be in 32-bit mode or in 64-bit dnl mode, but not both. dnl * 'mips' and 'mipsn32' are different canonical names, because they use dnl different argument passing and return conventions for C functions, and dnl although the instruction set of 'mips' is a large subset of the dnl instruction set of 'mipsn32'. dnl * 'mipsn32' and 'mips64' are different canonical names, because they use dnl different sizes for the C types like 'int' and 'void *', and although dnl the instruction sets of 'mipsn32' and 'mips64' are the same. dnl * The same canonical name is used for different endiannesses. You can dnl determine the endianness through preprocessor symbols: dnl - 'arm': test __ARMEL__. dnl - 'mips', 'mipsn32', 'mips64': test _MIPSEB vs. _MIPSEL. dnl - 'powerpc64': test __BIG_ENDIAN__ vs. __LITTLE_ENDIAN__. dnl * The same name 'i386' is used for CPUs of type i386, i486, i586 dnl (Pentium), AMD K7, Pentium II, Pentium IV, etc., because dnl - Instructions that do not exist on all of these CPUs (cmpxchg, dnl MMX, SSE, SSE2, 3DNow! etc.) are not frequently used. If your dnl assembly language source files use such instructions, you will dnl need to make the distinction. dnl - Speed of execution of the common instruction set is reasonable across dnl the entire family of CPUs. If you have assembly language source files dnl that are optimized for particular CPU types (like GNU gmp has), you dnl will need to make the distinction. dnl See . AC_DEFUN([gl_HOST_CPU_C_ABI], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_C_ASM]) AC_CACHE_CHECK([host CPU and C ABI], [gl_cv_host_cpu_c_abi], [case "$host_cpu" in changequote(,)dnl i[34567]86 ) changequote([,])dnl gl_cv_host_cpu_c_abi=i386 ;; x86_64 ) # On x86_64 systems, the C compiler may be generating code in one of # these ABIs: # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 # with native Windows (mingw, MSVC). # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if (defined __x86_64__ || defined __amd64__ \ || defined _M_X64 || defined _M_AMD64) int ok; #else error fail #endif ]])], [AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __ILP32__ || defined _ILP32 int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=x86_64-x32], [gl_cv_host_cpu_c_abi=x86_64])], [gl_cv_host_cpu_c_abi=i386]) ;; changequote(,)dnl alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] ) changequote([,])dnl gl_cv_host_cpu_c_abi=alpha ;; arm* | aarch64 ) # Assume arm with EABI. # On arm64 systems, the C compiler may be generating code in one of # these ABIs: # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#ifdef __aarch64__ int ok; #else error fail #endif ]])], [AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __ILP32__ || defined _ILP32 int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=arm64-ilp32], [gl_cv_host_cpu_c_abi=arm64])], [# Don't distinguish little-endian and big-endian arm, since they # don't require different machine code for simple operations and # since the user can distinguish them through the preprocessor # defines __ARMEL__ vs. __ARMEB__. # But distinguish arm which passes floating-point arguments and # return values in integer registers (r0, r1, ...) - this is # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which # passes them in float registers (s0, s1, ...) and double registers # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer # sets the preprocessor defines __ARM_PCS (for the first case) and # __ARM_PCS_VFP (for the second case), but older GCC does not. echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c # Look for a reference to the register d0 in the .s file. AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1 if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then gl_cv_host_cpu_c_abi=armhf else gl_cv_host_cpu_c_abi=arm fi rm -f conftest* ]) ;; hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) # On hppa, the C compiler may be generating 32-bit code or 64-bit # code. In the latter case, it defines _LP64 and __LP64__. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#ifdef __LP64__ int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=hppa64], [gl_cv_host_cpu_c_abi=hppa]) ;; ia64* ) # On ia64 on HP-UX, the C compiler may be generating 64-bit code or # 32-bit code. In the latter case, it defines _ILP32. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#ifdef _ILP32 int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=ia64-ilp32], [gl_cv_host_cpu_c_abi=ia64]) ;; mips* ) # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this # at 32. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=mips64], [# In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but # may later get defined by ), and _MIPS_SIM == _ABIN32. # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but # may later get defined by ), and _MIPS_SIM == _ABIO32. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if (_MIPS_SIM == _ABIN32) int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=mipsn32], [gl_cv_host_cpu_c_abi=mips])]) ;; powerpc* ) # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. # No need to distinguish them here; the caller may distinguish # them based on the OS. # On powerpc64 systems, the C compiler may still be generating # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may # be generating 64-bit code. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __powerpc64__ || defined __LP64__ int ok; #else error fail #endif ]])], [# On powerpc64, there are two ABIs on Linux: The AIX compatible # one and the ELFv2 one. The latter defines _CALL_ELF=2. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined _CALL_ELF && _CALL_ELF == 2 int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=powerpc64-elfv2], [gl_cv_host_cpu_c_abi=powerpc64]) ], [gl_cv_host_cpu_c_abi=powerpc]) ;; rs6000 ) gl_cv_host_cpu_c_abi=powerpc ;; riscv32 | riscv64 ) # There are 2 architectures (with variants): rv32* and rv64*. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if __riscv_xlen == 64 int ok; #else error fail #endif ]])], [cpu=riscv64], [cpu=riscv32]) # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. # Size of 'long' and 'void *': AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __LP64__ int ok; #else error fail #endif ]])], [main_abi=lp64], [main_abi=ilp32]) # Float ABIs: # __riscv_float_abi_double: # 'float' and 'double' are passed in floating-point registers. # __riscv_float_abi_single: # 'float' are passed in floating-point registers. # __riscv_float_abi_soft: # No values are passed in floating-point registers. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __riscv_float_abi_double int ok; #else error fail #endif ]])], [float_abi=d], [AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __riscv_float_abi_single int ok; #else error fail #endif ]])], [float_abi=f], [float_abi='']) ]) gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}" ;; s390* ) # On s390x, the C compiler may be generating 64-bit (= s390x) code # or 31-bit (= s390) code. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __LP64__ || defined __s390x__ int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=s390x], [gl_cv_host_cpu_c_abi=s390]) ;; sparc | sparc64 ) # UltraSPARCs running Linux have `uname -m` = "sparc64", but the # C compiler still generates 32-bit code. AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[#if defined __sparcv9 || defined __arch64__ int ok; #else error fail #endif ]])], [gl_cv_host_cpu_c_abi=sparc64], [gl_cv_host_cpu_c_abi=sparc]) ;; *) gl_cv_host_cpu_c_abi="$host_cpu" ;; esac ]) dnl In most cases, $HOST_CPU and $HOST_CPU_C_ABI are the same. HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'` HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi" AC_SUBST([HOST_CPU]) AC_SUBST([HOST_CPU_C_ABI]) # This was # AC_DEFINE_UNQUOTED([__${HOST_CPU}__]) # AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__]) # earlier, but KAI C++ 3.2d doesn't like this. sed -e 's/-/_/g' >> confdefs.h <. dnl Don't make changes that are incompatible with that documentation! AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed. gl_saved_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #include ]], [[iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);]])], [am_cv_func_iconv=yes]) if test "$am_cv_func_iconv" != yes; then gl_saved_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[ #include #include ]], [[iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);]])], [am_cv_lib_iconv=yes] [am_cv_func_iconv=yes]) LIBS="$gl_saved_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, dnl Solaris 10, macOS 14.4. gl_saved_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi am_cv_func_iconv_works=no for ac_iconv_const in '' 'const'; do AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[ #include #include #ifndef ICONV_CONST # define ICONV_CONST $ac_iconv_const #endif ]], [[int result = 0; /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from successful returns. This is even documented in */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; iconv_close (cd_utf8_to_88591); } } /* Test against macOS 14.4 bug: Failures are not distinguishable from successful returns. POSIX:2018 says: "The iconv() function shall ... return the number of non-identical conversions performed." But here, the conversion always does transliteration (the suffixes "//TRANSLIT" and "//IGNORE" have no effect, nor does iconvctl()) and does not report when it does a non-identical conversion. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO-8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\305\202"; /* LATIN SMALL LETTER L WITH STROKE */ char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); /* Here: With glibc, GNU libiconv (including macOS up to 13): res == (size_t)-1, errno == EILSEQ. With musl libc, NetBSD 10, Solaris 11: res == 1. With macOS 14.4: res == 0, output is "l". */ if (res == 0) result |= 2; iconv_close (cd_utf8_to_88591); } } /* Test against Solaris 10 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\263"; char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 4; iconv_close (cd_ascii_to_88591); } } /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ { iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; ICONV_CONST char *inptr = input; size_t inbytesleft = 1; char *outptr = buf; size_t outbytesleft = 1; size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 8; iconv_close (cd_88591_to_utf8); } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 16; iconv_close (cd_88591_to_utf8); } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ { /* Try standardized names. */ iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); /* Try IRIX, OSF/1 names. */ iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); /* Try AIX names. */ iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); /* Try HP-UX names. */ iconv_t cd4 = iconv_open ("utf8", "eucJP"); if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) result |= 32; if (cd1 != (iconv_t)(-1)) iconv_close (cd1); if (cd2 != (iconv_t)(-1)) iconv_close (cd2); if (cd3 != (iconv_t)(-1)) iconv_close (cd3); if (cd4 != (iconv_t)(-1)) iconv_close (cd4); } return result; ]])], [am_cv_func_iconv_works=yes], , [case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac]) test "$am_cv_func_iconv_works" = no || break done LIBS="$gl_saved_LIBS" ]) case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then AC_DEFINE([HAVE_ICONV], [1], [Define if you have the iconv() function and it works.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$gl_saved_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST([LIBICONV]) AC_SUBST([LTLIBICONV]) ]) dnl Define AM_ICONV using AC_DEFUN_ONCE, in order to avoid warnings like dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". AC_DEFUN_ONCE([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_CACHE_CHECK([whether iconv is compatible with its POSIX signature], [gl_cv_iconv_nonconst], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ #include #include extern #ifdef __cplusplus "C" #endif size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); ]], [[]])], [gl_cv_iconv_nonconst=yes], [gl_cv_iconv_nonconst=no]) ]) else dnl When compiling GNU libiconv on a system that does not have iconv yet, dnl pick the POSIX compliant declaration without 'const'. gl_cv_iconv_nonconst=yes fi if test $gl_cv_iconv_nonconst = yes; then iconv_arg1="" else iconv_arg1="const" fi AC_DEFINE_UNQUOTED([ICONV_CONST], [$iconv_arg1], [Define as const if the declaration of iconv() needs const.]) dnl Also substitute ICONV_CONST in the gnulib generated . m4_ifdef([gl_ICONV_H_DEFAULTS], [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) if test $gl_cv_iconv_nonconst != yes; then ICONV_CONST="const" fi ]) dnl A summary result, for those packages which want to print a summary at the dnl end of the configuration. if test "$am_func_iconv" = yes; then if test -n "$LIBICONV"; then am_cv_func_iconv_summary='yes, in libiconv' else am_cv_func_iconv_summary='yes, in libc' fi else if test "$am_cv_func_iconv" = yes; then am_cv_func_iconv_summary='not working, consider installing GNU libiconv' else am_cv_func_iconv_summary='no, consider installing GNU libiconv' fi fi ]) # lib-ld.m4 # serial 13 dnl Copyright (C) 1996-2003, 2009-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl This file is offered as-is, without any warranty. dnl Subroutines of libtool.m4, dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid dnl collision with libtool.m4. dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], [# I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 /dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi if test -n "$LD"; then AC_MSG_CHECKING([for ld]) elif test "$GCC" = yes; then AC_MSG_CHECKING([for ld used by $CC]) elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi if test -n "$LD"; then # Let the user override the test with a path. : else AC_CACHE_VAL([acl_cv_path_LD], [ acl_cv_path_LD= # Final result of this test ac_prog=ld # Program to search in $PATH if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. case $host in *-*-mingw* | windows*) # gcc leaves a trailing carriage return which upsets mingw acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) acl_output=`($CC -print-prog-name=ld) 2>&5` ;; esac case $acl_output in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` done # Got the pathname. No search in PATH is needed. acl_cv_path_LD="$acl_output" ac_prog= ;; "") # If it fails, then pretend we aren't using GCC. ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac fi if test -n "$ac_prog"; then # Search for $ac_prog in $PATH. acl_saved_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$acl_saved_IFS" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE([rpath], [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_FROMPACKAGE(name, package) dnl declares that libname comes from the given package. The configure file dnl will then not have a --with-libname-prefix option but a dnl --with-package-prefix option. Several libraries can come from the same dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar dnl macro call that searches for libname. AC_DEFUN([AC_LIB_FROMPACKAGE], [ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) define([acl_frompackage_]NAME, [$2]) popdef([NAME]) pushdef([PACK],[$2]) pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) define([acl_libsinpackage_]PACKUP, m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) popdef([PACKUP]) popdef([PACK]) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" ]) AC_ARG_WITH(PACK[-prefix], [[ --with-]]PACK[[-prefix[=DIR] search for ]]PACKLIBS[[ in DIR/include and DIR/lib --without-]]PACK[[-prefix don't search for ]]PACKLIBS[[ in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" additional_libdir2="$withval/$acl_libdirstem2" additional_libdir3="$withval/$acl_libdirstem3" fi fi ]) if test "X$additional_libdir2" = "X$additional_libdir"; then additional_libdir2= fi if test "X$additional_libdir3" = "X$additional_libdir"; then additional_libdir3= fi dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Use breadth-first search. LIB[]NAME= LTLIB[]NAME= INC[]NAME= LIB[]NAME[]_PREFIX= dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been dnl computed. So it has to be reset here. HAVE_LIB[]NAME= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do if test "X$found_dir" = "X"; then eval dir=\$$additional_libdir_variable if test -n "$dir"; then dnl The same code as in the loop below: dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi fi done fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2" \ || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$acl_hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem3 | */$acl_libdirstem3/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. saved_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$saved_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $dependency_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then haveit= if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$dependency_libdir"; then dnl Really add $dependency_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$dependency_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$dependency_libdir"; then dnl Really add $dependency_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$dependency_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. dnl But on GNU systems, ignore -lc options, because dnl - linking with libc is the default anyway, dnl - linking with libc.a may produce an error dnl "/usr/bin/ld: dynamic STT_GNU_IFUNC symbol `strcmp' with pointer equality in `/usr/lib/libc.a(strcmp.o)' can not be used when making an executable; recompile with -fPIE and relink with -pie" dnl or may produce an executable that always crashes, see dnl . dep=`echo "X$dep" | sed -e 's/^X-l//'` if test "X$dep" != Xc \ || case $host_os in linux* | gnu* | k*bsd*-gnu) false ;; *) true ;; esac; then names_next_round="$names_next_round $dep" fi ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. acl_saved_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_saved_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_saved_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_saved_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi popdef([PACKLIBS]) popdef([PACKUP]) popdef([PACK]) popdef([NAME]) ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) dnl For those cases where a variable contains several -L and -l options dnl referring to unknown libraries and directories, this macro determines the dnl necessary additional linker options for the runtime path. dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) dnl sets LDADDVAR to linker options needed together with LIBSVALUE. dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, dnl otherwise linking without libtool is assumed. AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], [ AC_REQUIRE([AC_LIB_RPATH]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) $1= if test "$enable_rpath" != no; then if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode directories into the resulting dnl binary. rpathdirs= next= for opt in $2; do if test -n "$next"; then dir="$next" dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2" \ && test "X$dir" != "X/usr/$acl_libdirstem3"; then rpathdirs="$rpathdirs $dir" fi next= else case $opt in -L) next=yes ;; -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2" \ && test "X$dir" != "X/usr/$acl_libdirstem3"; then rpathdirs="$rpathdirs $dir" fi next= ;; *) next= ;; esac fi done if test "X$rpathdirs" != "X"; then if test -n ""$3""; then dnl libtool is used for linking. Use -R options. for dir in $rpathdirs; do $1="${$1}${$1:+ }-R$dir" done else dnl The linker is used for linking directly. if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user dnl must pass all path elements in one option. alldirs= for dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" done acl_saved_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_saved_libdir" $1="$flag" else dnl The -rpath options are cumulative. for dir in $rpathdirs; do acl_saved_libdir="$libdir" libdir="$dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_saved_libdir" $1="${$1}${$1:+ }$flag" done fi fi fi fi fi AC_SUBST([$1]) ]) # lib-prefix.m4 # serial 23 dnl Copyright (C) 2001-2005, 2008-2024 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl This file is offered as-is, without any warranty. dnl From Bruno Haible. dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_ARG_WITH([lib-prefix], [[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_saved_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_saved_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_saved_prefix="$prefix" prefix="$acl_final_prefix" acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_saved_exec_prefix" prefix="$acl_saved_prefix" ]) dnl AC_LIB_PREPARE_MULTILIB creates dnl - a function acl_is_expected_elfclass, that tests whether standard input dn; has a 32-bit or 64-bit ELF header, depending on the host CPU ABI, dnl - 3 variables acl_libdirstem, acl_libdirstem2, acl_libdirstem3, containing dnl the basename of the libdir to try in turn, either "lib" or "lib64" or dnl "lib/64" or "lib32" or "lib/sparcv9" or "lib/amd64" or similar. AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ dnl There is no formal standard regarding lib, lib32, and lib64. dnl On most glibc systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. However, on dnl Arch Linux based distributions, it's the opposite: 32-bit libraries go dnl under $prefix/lib32 and 64-bit libraries go under $prefix/lib. dnl We determine the compiler's default mode by looking at the compiler's dnl library search path. If at least one of its elements ends in /lib64 or dnl points to a directory whose absolute pathname ends in /lib64, we use that dnl for 64-bit ABIs. Similarly for 32-bit ABIs. Otherwise we use the default, dnl namely "lib". dnl On Solaris systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_HOST_CPU_C_ABI_32BIT]) AC_CACHE_CHECK([for ELF binary format], [gl_cv_elf], [AC_EGREP_CPP([Extensible Linking Format], [#if defined __ELF__ || (defined __linux__ && (defined __EDG__ || defined __SUNPRO_C)) Extensible Linking Format #endif ], [gl_cv_elf=yes], [gl_cv_elf=no]) ]) if test $gl_cv_elf = yes; then # Extract the ELF class of a file (5th byte) in decimal. # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header if od -A x < /dev/null >/dev/null 2>/dev/null; then # Use POSIX od. func_elfclass () { od -A n -t d1 -j 4 -N 1 } else # Use BSD hexdump. func_elfclass () { dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "' echo } fi # Use 'expr', not 'test', to compare the values of func_elfclass, because on # Solaris 11 OpenIndiana and Solaris 11 OmniOS, the result is 001 or 002, # not 1 or 2. changequote(,)dnl case $HOST_CPU_C_ABI_32BIT in yes) # 32-bit ABI. acl_is_expected_elfclass () { expr "`func_elfclass | sed -e 's/[ ]//g'`" = 1 > /dev/null } ;; no) # 64-bit ABI. acl_is_expected_elfclass () { expr "`func_elfclass | sed -e 's/[ ]//g'`" = 2 > /dev/null } ;; *) # Unknown. acl_is_expected_elfclass () { : } ;; esac changequote([,])dnl else acl_is_expected_elfclass () { : } fi dnl Allow the user to override the result by setting acl_cv_libdirstems. AC_CACHE_CHECK([for the common suffixes of directories in the library search path], [acl_cv_libdirstems], [dnl Try 'lib' first, because that's the default for libdir in GNU, see dnl . acl_libdirstem=lib acl_libdirstem2= acl_libdirstem3= case "$host_os" in solaris*) dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment dnl . dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the dnl symlink is missing, so we set acl_libdirstem2 too. if test $HOST_CPU_C_ABI_32BIT = no; then acl_libdirstem2=lib/64 case "$host_cpu" in sparc*) acl_libdirstem3=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem3=lib/amd64 ;; esac fi ;; netbsd*) dnl On NetBSD/sparc64, there is a 'sparc' subdirectory that contains dnl 32-bit libraries. if test $HOST_CPU_C_ABI_32BIT != no; then case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparc ;; esac fi ;; *) dnl If $CC generates code for a 32-bit ABI, the libraries are dnl surely under $prefix/lib or $prefix/lib32, not $prefix/lib64. dnl Similarly, if $CC generates code for a 64-bit ABI, the libraries dnl are surely under $prefix/lib or $prefix/lib64, not $prefix/lib32. dnl Find the compiler's search path. However, non-system compilers dnl sometimes have odd library search paths. But we can't simply invoke dnl '/usr/bin/gcc -print-search-dirs' because that would not take into dnl account the -m32/-m31 or -m64 options from the $CC or $CFLAGS. searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \ | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test $HOST_CPU_C_ABI_32BIT != no; then # 32-bit or unknown ABI. if test -d /usr/lib32; then acl_libdirstem2=lib32 fi fi if test $HOST_CPU_C_ABI_32BIT != yes; then # 64-bit or unknown ABI. if test -d /usr/lib64; then acl_libdirstem3=lib64 fi fi if test -n "$searchpath"; then acl_saved_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;; */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib32 ) acl_libdirstem2=lib32 ;; */lib64 ) acl_libdirstem3=lib64 ;; esac ;; esac fi done IFS="$acl_saved_IFS" if test $HOST_CPU_C_ABI_32BIT = yes; then # 32-bit ABI. acl_libdirstem3= fi if test $HOST_CPU_C_ABI_32BIT = no; then # 64-bit ABI. acl_libdirstem2= fi fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem" acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3" ]) dnl Decompose acl_cv_libdirstems into acl_libdirstem, acl_libdirstem2, and dnl acl_libdirstem3. changequote(,)dnl acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'` acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'` changequote([,])dnl ]) # Copyright (C) 2002-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.17' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.17], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.17])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thus: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. AS_CASE([$CONFIG_FILES], [*\'*], [eval set x "$CONFIG_FILES"], [*], [set x $CONFIG_FILES]) shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`AS_DIRNAME(["$am_mf"])` am_filepart=`AS_BASENAME(["$am_mf"])` AM_RUN_LOG([cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles]) || am_rc=$? done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE="gmake" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi AS_UNSET([am_dirpart]) AS_UNSET([am_filepart]) AS_UNSET([am_mf]) AS_UNSET([am_rc]) rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking is enabled. # This creates each '.Po' and '.Plo' makefile fragment that we'll need in # order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl m4_ifdef([_$0_ALREADY_INIT], [m4_fatal([$0 expanded multiple times ]m4_defn([_$0_ALREADY_INIT]))], [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) # Variables for tags utilities; see am/tags.am if test -z "$CTAGS"; then CTAGS=ctags fi AC_SUBST([CTAGS]) if test -z "$ETAGS"; then ETAGS=etags fi AC_SUBST([ETAGS]) if test -z "$CSCOPE"; then CSCOPE=cscope fi AC_SUBST([CSCOPE]) AC_REQUIRE([_AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl AC_REQUIRE([_AM_PROG_RM_F]) AC_REQUIRE([_AM_PROG_XARGS_N]) dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless 'enable' is passed literally. # For symmetry, 'disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], am_maintainer_other[ make rules and dependencies not useful (and sometimes confusing) to the casual installer])], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check whether make has an 'include' directive that can support all # the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) AS_CASE([$?:`cat confinc.out 2>/dev/null`], ['0:this is the am__doit target'], [AS_CASE([$s], [BSD], [am__include='.include' am__quote='"'], [am__include='include' am__quote=''])]) if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* AC_MSG_RESULT([${_am_result}]) AC_SUBST([am__include])]) AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2022-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_RM_F # --------------- # Check whether 'rm -f' without any arguments works. # https://bugs.gnu.org/10828 AC_DEFUN([_AM_PROG_RM_F], [am__rm_f_notfound= AS_IF([(rm -f && rm -fr && rm -rf) 2>/dev/null], [], [am__rm_f_notfound='""']) AC_SUBST(am__rm_f_notfound) ]) # Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SLEEP_FRACTIONAL_SECONDS # ---------------------------- AC_DEFUN([_AM_SLEEP_FRACTIONAL_SECONDS], [dnl AC_CACHE_CHECK([whether sleep supports fractional seconds], am_cv_sleep_fractional_seconds, [dnl AS_IF([sleep 0.001 2>/dev/null], [am_cv_sleep_fractional_seconds=yes], [am_cv_sleep_fractional_seconds=no]) ])]) # _AM_FILESYSTEM_TIMESTAMP_RESOLUTION # ----------------------------------- # Determine the filesystem's resolution for file modification # timestamps. The coarsest we know of is FAT, with a resolution # of only two seconds, even with the most recent "exFAT" extensions. # The finest (e.g. ext4 with large inodes, XFS, ZFS) is one # nanosecond, matching clock_gettime. However, it is probably not # possible to delay execution of a shell script for less than one # millisecond, due to process creation overhead and scheduling # granularity, so we don't check for anything finer than that. (See below.) AC_DEFUN([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION], [dnl AC_REQUIRE([_AM_SLEEP_FRACTIONAL_SECONDS]) AC_CACHE_CHECK([filesystem timestamp resolution], am_cv_filesystem_timestamp_resolution, [dnl # Default to the worst case. am_cv_filesystem_timestamp_resolution=2 # Only try to go finer than 1 sec if sleep can do it. # Don't try 1 sec, because if 0.01 sec and 0.1 sec don't work, # - 1 sec is not much of a win compared to 2 sec, and # - it takes 2 seconds to perform the test whether 1 sec works. # # Instead, just use the default 2s on platforms that have 1s resolution, # accept the extra 1s delay when using $sleep in the Automake tests, in # exchange for not incurring the 2s delay for running the test for all # packages. # am_try_resolutions= if test "$am_cv_sleep_fractional_seconds" = yes; then # Even a millisecond often causes a bunch of false positives, # so just try a hundredth of a second. The time saved between .001 and # .01 is not terribly consequential. am_try_resolutions="0.01 0.1 $am_try_resolutions" fi # In order to catch current-generation FAT out, we must *modify* files # that already exist; the *creation* timestamp is finer. Use names # that make ls -t sort them differently when they have equal # timestamps than when they have distinct timestamps, keeping # in mind that ls -t prints the *newest* file first. rm -f conftest.ts? : > conftest.ts1 : > conftest.ts2 : > conftest.ts3 # Make sure ls -t actually works. Do 'set' in a subshell so we don't # clobber the current shell's arguments. (Outer-level square brackets # are removed by m4; they're present so that m4 does not expand # ; be careful, easy to get confused.) if ( set X `[ls -t conftest.ts[12]]` && { test "$[]*" != "X conftest.ts1 conftest.ts2" || test "$[]*" != "X conftest.ts2 conftest.ts1"; } ); then :; else # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". _AS_ECHO_UNQUOTED( ["Bad output from ls -t: \"`[ls -t conftest.ts[12]]`\""], [AS_MESSAGE_LOG_FD]) AC_MSG_FAILURE([ls -t produces unexpected output. Make sure there is not a broken ls alias in your environment.]) fi for am_try_res in $am_try_resolutions; do # Any one fine-grained sleep might happen to cross the boundary # between two values of a coarser actual resolution, but if we do # two fine-grained sleeps in a row, at least one of them will fall # entirely within a coarse interval. echo alpha > conftest.ts1 sleep $am_try_res echo beta > conftest.ts2 sleep $am_try_res echo gamma > conftest.ts3 # We assume that 'ls -t' will make use of high-resolution # timestamps if the operating system supports them at all. if (set X `ls -t conftest.ts?` && test "$[]2" = conftest.ts3 && test "$[]3" = conftest.ts2 && test "$[]4" = conftest.ts1); then # # Ok, ls -t worked. If we're at a resolution of 1 second, we're done, # because we don't need to test make. make_ok=true if test $am_try_res != 1; then # But if we've succeeded so far with a subsecond resolution, we # have one more thing to check: make. It can happen that # everything else supports the subsecond mtimes, but make doesn't; # notably on macOS, which ships make 3.81 from 2006 (the last one # released under GPLv2). https://bugs.gnu.org/68808 # # We test $MAKE if it is defined in the environment, else "make". # It might get overridden later, but our hope is that in practice # it does not matter: it is the system "make" which is (by far) # the most likely to be broken, whereas if the user overrides it, # probably they did so with a better, or at least not worse, make. # https://lists.gnu.org/archive/html/automake/2024-06/msg00051.html # # Create a Makefile (real tab character here): rm -f conftest.mk echo 'conftest.ts1: conftest.ts2' >conftest.mk echo ' touch conftest.ts2' >>conftest.mk # # Now, running # touch conftest.ts1; touch conftest.ts2; make # should touch ts1 because ts2 is newer. This could happen by luck, # but most often, it will fail if make's support is insufficient. So # test for several consecutive successes. # # (We reuse conftest.ts[12] because we still want to modify existing # files, not create new ones, per above.) n=0 make=${MAKE-make} until test $n -eq 3; do echo one > conftest.ts1 sleep $am_try_res echo two > conftest.ts2 # ts2 should now be newer than ts1 if $make -f conftest.mk | grep 'up to date' >/dev/null; then make_ok=false break # out of $n loop fi n=`expr $n + 1` done fi # if $make_ok; then # Everything we know to check worked out, so call this resolution good. am_cv_filesystem_timestamp_resolution=$am_try_res break # out of $am_try_res loop fi # Otherwise, we'll go on to check the next resolution. fi done rm -f conftest.ts? # (end _am_filesystem_timestamp_resolution) ])]) # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_REQUIRE([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION]) # This check should not be cached, as it may vary across builds of # different projects. AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). am_build_env_is_sane=no am_has_slept=no rm -f conftest.file for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[]*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi test "$[]2" = conftest.file ); then am_build_env_is_sane=yes break fi # Just in case. sleep "$am_cv_filesystem_timestamp_resolution" am_has_slept=yes done AC_MSG_RESULT([$am_build_env_is_sane]) if test "$am_build_env_is_sane" = no; then AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= AS_IF([test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1],, [dnl ( sleep "$am_cv_filesystem_timestamp_resolution" ) & am_sleep_pid=$! ]) AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SILENT_RULES # ---------------- # Enable less verbose build rules support. AC_DEFUN([_AM_SILENT_RULES], [AM_DEFAULT_VERBOSITY=1 AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl dnl Delay evaluation of AM_DEFAULT_VERBOSITY to the end to allow multiple calls dnl to AM_SILENT_RULES to change the default value. AC_CONFIG_COMMANDS_PRE([dnl case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; esac if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi ])dnl ]) # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Set the default verbosity level to DEFAULT ("yes" being less verbose, "no" or # empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_REQUIRE([_AM_SILENT_RULES]) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1])]) # Copyright (C) 2001-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test x$am_uid = xunknown; then AC_MSG_WARN([ancient id detected; assuming current UID is ok, but dist-ustar might not work]) elif test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test x$gm_gid = xunknown; then AC_MSG_WARN([ancient id detected; assuming current GID is ok, but dist-ustar might not work]) elif test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR # Copyright (C) 2022-2024 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_XARGS_N # ---------------- # Check whether 'xargs -n' works. It should work everywhere, so the fallback # is not optimized at all as we never expect to use it. AC_DEFUN([_AM_PROG_XARGS_N], [AC_CACHE_CHECK([xargs -n works], am_cv_xargs_n_works, [dnl AS_IF([test "`echo 1 2 3 | xargs -n2 echo`" = "1 2 3"], [am_cv_xargs_n_works=yes], [am_cv_xargs_n_works=no])]) AS_IF([test "$am_cv_xargs_n_works" = yes], [am__xargs_n='xargs -n'], [dnl am__xargs_n='am__xargs_n () { shift; sed "s/ /\\n/g" | while read am__xargs_n_arg; do "$@" "$am__xargs_n_arg"; done; }' ])dnl AC_SUBST(am__xargs_n) ]) m4_include([m4/gcov.m4]) m4_include([m4/gtk-doc.m4]) m4_include([m4/libiconv.m4]) m4_include([m4/libm.m4]) m4_include([m4/librecode.m4]) m4_include([m4/libtool.m4]) m4_include([m4/localias.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) m4_include([m4/m4_ax_prog_cc_for_build.m4]) m4_include([m4/tools.m4]) m4_include([m4/typevar.m4]) Project-OSS-Revival-enca-36defd7/autogen.sh000077500000000000000000000126351507545312400206160ustar00rootroot00000000000000#!/bin/sh # Run this to generate all the initial makefiles, etc. # Tweaked by David Necas (Yeti) from various other # autogen.sh's. This file is in public domain. DIE=0 PROJECT=Enca ACLOCAL_FLAGS="-I m4" (autoconf --version) < /dev/null > /dev/null 2>&1 || { echo echo "**ERROR**: You must have \`autoconf' installed to re-generate" echo "all the $PROJECT Makefiles." echo "Download the appropriate package for your distribution," echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/." DIE=1 NO_AUTOCONF=yes } (grep "^AM_PROG_LIBTOOL" ./configure.ac >/dev/null) && { (libtoolize --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`libtoolize' installed." echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.4.tar.gz" echo "(or a newer version if it is available)" DIE=1 NO_LIBTOOL=yes } } (automake --version) < /dev/null > /dev/null 2>&1 || { echo echo "**ERROR**: You must have \`automake' installed to re-generate" echo "all the $PROJECT Makefiles." echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.8.3.tar.gz" echo "(or a newer version if it is available) and read DEVELOP.md." DIE=1 NO_AUTOMAKE=yes } version_check ( ) { if [ "x$1" = "x" ] ; then echo "INTERNAL ERROR: version_check was not provided a minimum version" exit 1 fi _min="$1" if [ "x$2" = "x" ] ; then echo "INTERNAL ERROR: version check was not provided a comparison version" exit 1 fi _cur="$2" # needed to handle versions like 1.10 and 1.4-p6 _min="`echo ${_min}. | sed 's/[^0-9]/./g' | sed 's/\.\././g'`" _cur="`echo ${_cur}. | sed 's/[^0-9]/./g' | sed 's/\.\././g'`" _min_major="`echo $_min | cut -d. -f1`" _min_minor="`echo $_min | cut -d. -f2`" _min_patch="`echo $_min | cut -d. -f3`" _cur_major="`echo $_cur | cut -d. -f1`" _cur_minor="`echo $_cur | cut -d. -f2`" _cur_patch="`echo $_cur | cut -d. -f3`" if [ "x$_min_major" = "x" ] ; then _min_major=0 fi if [ "x$_min_minor" = "x" ] ; then _min_minor=0 fi if [ "x$_min_patch" = "x" ] ; then _min_patch=0 fi if [ "x$_cur_minor" = "x" ] ; then _cur_major=0 fi if [ "x$_cur_minor" = "x" ] ; then _cur_minor=0 fi if [ "x$_cur_patch" = "x" ] ; then _cur_patch=0 fi if [ $_min_major -lt $_cur_major ] ; then return 0 elif [ $_min_major -eq $_cur_major ] ; then if [ $_min_minor -lt $_cur_minor ] ; then return 0 elif [ $_min_minor -eq $_cur_minor ] ; then if [ $_min_patch -lt $_cur_patch ] ; then return 0 elif [ $_min_patch -eq $_cur_patch ] ; then return 0 fi fi fi return 1 } # The world is cruel. if test -z "$NO_AUTOCONF"; then AC_VERSION=`autoconf --version | sed -e '2,$ d' -e 's/ *([^()]*)$//' -e 's/.* \(.*\)/\1/' -e 's/-p[0-9]\+//'` if ! version_check "2.52" "$AC_VERSION" ; then echo echo "**ERROR**: You need at least autoconf-2.52 installed to re-generate" echo "all the $PROJECT Makefiles." echo "Download the appropriate package for your distribution," echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/." DIE=1 else echo "Autoconf $AC_VERSION: OK" fi fi if test -z "$NO_AUTOMAKE"; then AM_VERSION=`automake --version | sed -e '2,$ d' -e 's/ *([^()]*)$//' -e 's/.* \(.*\)/\1/' -e 's/-p[0-9]\+//'` if ! version_check "1.8" "$AM_VERSION" ; then echo echo "**ERROR**: You need at least automake-1.8 installed to re-generate" echo "all the $PROJECT Makefiles." echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.8.3.tar.gz" echo "(or a newer version if it is available) and read DEVELOP.md." DIE=1 else echo "Automake $AM_VERSION: OK" fi fi # if no automake, don't bother testing for aclocal test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { echo echo "**ERROR**: Missing \`aclocal'. The version of \`automake'" echo "installed doesn't appear recent enough." echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.8.3.tar.gz" echo "(or a newer version if it is available) and read DEVELOP.md." DIE=1 } if test -z "$NO_LIBTOOL"; then LT_VERSION=`libtoolize --version | sed -e '2,$ d' -e 's/ *([^()]*)$//' -e 's/.* \(.*\)/\1/' -e 's/-p[0-9]\+//' -e 's/^[a-zA-Z]*-//'` if ! version_check "1.4" "$LT_VERSION" ; then echo echo "**ERROR**: You need at least libtool-1.4 installed to re-generate" echo "all the $PROJECT Makefiles." echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.4.tar.gz" echo "(or a newer version if it is available) and read DEVELOP.md." DIE=1 else echo "Libtool $LT_VERSION: OK" fi fi if test "$DIE" -eq 1; then exit 1 fi case $CC in *xlc | *xlc\ * | *lcc | *lcc\ * ) am_opt=--include-deps;; esac dir=. echo processing $dir (cd $dir && \ libtoolize --force --copy && \ aclocal $ACLOCAL_FLAGS && \ autoheader && \ automake --add-missing --copy $am_opt && \ autoconf) || { echo "**ERROR**: Re-generating failed. You are allowed to shoot $PROJECT maintainer." echo "(BTW, why are you re-generating everything? Have you read DEVELOP.md?)" exit 1 } if test -z "$*"; then echo "**Warning**: I am going to run \`configure' with no arguments." echo "If you wish to pass any to it, please specify them on the" echo "\`$0' command line." echo fi ./configure "$@" Project-OSS-Revival-enca-36defd7/compile000077500000000000000000000167051507545312400201750ustar00rootroot00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2024-06-19.01; # UTC # Copyright (C) 1999-2024 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN* | MSYS*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.lo | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . GNU Automake home page: . General help using GNU software: . EOF exit $? ;; -v | --v*) echo "compile (GNU Automake) $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ clang-cl | *[/\\]clang-cl | clang-cl.exe | *[/\\]clang-cl.exe | \ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: Project-OSS-Revival-enca-36defd7/config.guess000077500000000000000000001405121507545312400211310ustar00rootroot00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2022 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale timestamp='2022-01-09' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # https://git.savannah.gnu.org/cgit/config.git/plain/config.guess # # Please send patches to . # The "shellcheck disable" line above the timestamp inhibits complaints # about features and limitations of the classic Bourne shell that were # superseded or lifted in POSIX. However, this script identifies a wide # variety of pre-POSIX systems that do not have POSIX shells at all, and # even some reasonably current systems (Solaris 10 as case-in-point) still # have a pre-POSIX /bin/sh. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi # Just in case it came from the environment. GUESS= # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. tmp= # shellcheck disable=SC2172 trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 set_cc_for_build() { # prevent multiple calls if $tmp is already set test "$tmp" && return 0 : "${TMPDIR=/tmp}" # shellcheck disable=SC2039,SC3028 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } dummy=$tmp/dummy case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in ,,) echo "int x;" > "$dummy.c" for driver in cc gcc c89 c99 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD=$driver break fi done if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac } # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case $UNAME_SYSTEM in Linux|GNU|GNU/*) LIBC=unknown set_cc_for_build cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #elif defined(__GLIBC__) LIBC=gnu #else #include /* First heuristic to detect musl libc. */ #ifdef __DEFINED_va_list LIBC=musl #endif #endif EOF cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` eval "$cc_set_libc" # Second heuristic to detect musl libc. if [ "$LIBC" = unknown ] && command -v ldd >/dev/null && ldd --version 2>&1 | grep -q ^musl; then LIBC=musl fi # If the system lacks a compiler, then just pick glibc. # We could probably try harder. if [ "$LIBC" = unknown ]; then LIBC=gnu fi ;; esac # Note: order is significant - the case branches are not exclusive. case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ echo unknown)` case $UNAME_MACHINE_ARCH in aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` machine=${arch}${endian}-unknown ;; *) machine=$UNAME_MACHINE_ARCH-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. case $UNAME_MACHINE_ARCH in earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # Determine ABI tags. case $UNAME_MACHINE_ARCH in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case $UNAME_VERSION in Debian*) release='-gnu' ;; *) release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. GUESS=$machine-${os}${release}${abi-} ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE ;; *:SecBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE ;; *:MidnightBSD:*:*) GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE ;; *:ekkoBSD:*:*) GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE ;; *:SolidBSD:*:*) GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE ;; *:OS108:*:*) GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE ;; macppc:MirBSD:*:*) GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE ;; *:MirBSD:*:*) GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE ;; *:Sortix:*:*) GUESS=$UNAME_MACHINE-unknown-sortix ;; *:Twizzler:*:*) GUESS=$UNAME_MACHINE-unknown-twizzler ;; *:Redox:*:*) GUESS=$UNAME_MACHINE-unknown-redox ;; mips:OSF1:*.*) GUESS=mips-dec-osf1 ;; alpha:OSF1:*:*) # Reset EXIT trap before exiting to avoid spurious non-zero exit code. trap '' 0 case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case $ALPHA_CPU_TYPE in "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") UNAME_MACHINE=alpha ;; "EV5 (21164)") UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` GUESS=$UNAME_MACHINE-dec-osf$OSF_REL ;; Amiga*:UNIX_System_V:4.0:*) GUESS=m68k-unknown-sysv4 ;; *:[Aa]miga[Oo][Ss]:*:*) GUESS=$UNAME_MACHINE-unknown-amigaos ;; *:[Mm]orph[Oo][Ss]:*:*) GUESS=$UNAME_MACHINE-unknown-morphos ;; *:OS/390:*:*) GUESS=i370-ibm-openedition ;; *:z/VM:*:*) GUESS=s390-ibm-zvmoe ;; *:OS400:*:*) GUESS=powerpc-ibm-os400 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) GUESS=arm-acorn-riscix$UNAME_RELEASE ;; arm*:riscos:*:*|arm*:RISCOS:*:*) GUESS=arm-unknown-riscos ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) GUESS=hppa1.1-hitachi-hiuxmpp ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. case `(/bin/universe) 2>/dev/null` in att) GUESS=pyramid-pyramid-sysv3 ;; *) GUESS=pyramid-pyramid-bsd ;; esac ;; NILE*:*:*:dcosx) GUESS=pyramid-pyramid-svr4 ;; DRS?6000:unix:4.0:6*) GUESS=sparc-icl-nx6 ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) GUESS=sparc-icl-nx7 ;; esac ;; s390x:SunOS:*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL ;; sun4H:SunOS:5.*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=sparc-hal-solaris2$SUN_REL ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=sparc-sun-solaris2$SUN_REL ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) GUESS=i386-pc-auroraux$UNAME_RELEASE ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) set_cc_for_build SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH=x86_64 fi fi SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=$SUN_ARCH-pc-solaris2$SUN_REL ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=sparc-sun-solaris3$SUN_REL ;; sun4*:SunOS:*:*) case `/usr/bin/arch -k` in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` GUESS=sparc-sun-sunos$SUN_REL ;; sun3*:SunOS:*:*) GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 case `/bin/arch` in sun3) GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun4) GUESS=sparc-sun-sunos$UNAME_RELEASE ;; esac ;; aushp:SunOS:*:*) GUESS=sparc-auspex-sunos$UNAME_RELEASE ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) GUESS=m68k-atari-mint$UNAME_RELEASE ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) GUESS=m68k-atari-mint$UNAME_RELEASE ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) GUESS=m68k-atari-mint$UNAME_RELEASE ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) GUESS=m68k-milan-mint$UNAME_RELEASE ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) GUESS=m68k-hades-mint$UNAME_RELEASE ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) GUESS=m68k-unknown-mint$UNAME_RELEASE ;; m68k:machten:*:*) GUESS=m68k-apple-machten$UNAME_RELEASE ;; powerpc:machten:*:*) GUESS=powerpc-apple-machten$UNAME_RELEASE ;; RISC*:Mach:*:*) GUESS=mips-dec-mach_bsd4.3 ;; RISC*:ULTRIX:*:*) GUESS=mips-dec-ultrix$UNAME_RELEASE ;; VAX*:ULTRIX*:*:*) GUESS=vax-dec-ultrix$UNAME_RELEASE ;; 2020:CLIX:*:* | 2430:CLIX:*:*) GUESS=clipper-intergraph-clix$UNAME_RELEASE ;; mips:*:*:UMIPS | mips:*:*:RISCos) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } GUESS=mips-mips-riscos$UNAME_RELEASE ;; Motorola:PowerMAX_OS:*:*) GUESS=powerpc-motorola-powermax ;; Motorola:*:4.3:PL8-*) GUESS=powerpc-harris-powermax ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) GUESS=powerpc-harris-powermax ;; Night_Hawk:Power_UNIX:*:*) GUESS=powerpc-harris-powerunix ;; m88k:CX/UX:7*:*) GUESS=m88k-harris-cxux7 ;; m88k:*:4*:R4*) GUESS=m88k-motorola-sysv4 ;; m88k:*:3*:R3*) GUESS=m88k-motorola-sysv3 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 then if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ test "$TARGET_BINARY_INTERFACE"x = x then GUESS=m88k-dg-dgux$UNAME_RELEASE else GUESS=m88k-dg-dguxbcs$UNAME_RELEASE fi else GUESS=i586-dg-dgux$UNAME_RELEASE fi ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) GUESS=m88k-dolphin-sysv3 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 GUESS=m88k-motorola-sysv3 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) GUESS=m88k-tektronix-sysv3 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) GUESS=m68k-tektronix-bsd ;; *:IRIX*:*:*) IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` GUESS=mips-sgi-irix$IRIX_REL ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) GUESS=i386-ibm-aix ;; ia64:AIX:*:*) if test -x /usr/bin/oslevel ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then GUESS=$SYSTEM_NAME else GUESS=rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then GUESS=rs6000-ibm-aix3.2.4 else GUESS=rs6000-ibm-aix3.2 fi ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if test -x /usr/bin/lslpp ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi GUESS=$IBM_ARCH-ibm-aix$IBM_REV ;; *:AIX:*:*) GUESS=rs6000-ibm-aix ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) GUESS=romp-ibm-bsd4.4 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) GUESS=rs6000-bull-bosx ;; DPX/2?00:B.O.S.:*:*) GUESS=m68k-bull-sysv3 ;; 9000/[34]??:4.3bsd:1.*:*) GUESS=m68k-hp-bsd ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) GUESS=m68k-hp-bsd4.4 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` case $UNAME_MACHINE in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if test -x /usr/bin/getconf; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case $sc_cpu_version in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case $sc_kernel_bits in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi if test "$HP_ARCH" = ""; then set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if test "$HP_ARCH" = hppa2.0w then set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH=hppa2.0w else HP_ARCH=hppa64 fi fi GUESS=$HP_ARCH-hp-hpux$HPUX_REV ;; ia64:HP-UX:*:*) HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` GUESS=ia64-hp-hpux$HPUX_REV ;; 3050*:HI-UX:*:*) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } GUESS=unknown-hitachi-hiuxwe2 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) GUESS=hppa1.1-hp-bsd ;; 9000/8??:4.3bsd:*:*) GUESS=hppa1.0-hp-bsd ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) GUESS=hppa1.0-hp-mpeix ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) GUESS=hppa1.1-hp-osf ;; hp8??:OSF1:*:*) GUESS=hppa1.0-hp-osf ;; i*86:OSF1:*:*) if test -x /usr/sbin/sysversion ; then GUESS=$UNAME_MACHINE-unknown-osf1mk else GUESS=$UNAME_MACHINE-unknown-osf1 fi ;; parisc*:Lites*:*:*) GUESS=hppa1.1-hp-lites ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) GUESS=c1-convex-bsd ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) GUESS=c34-convex-bsd ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) GUESS=c38-convex-bsd ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) GUESS=c4-convex-bsd ;; CRAY*Y-MP:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=ymp-cray-unicos$CRAY_REL ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=t90-cray-unicos$CRAY_REL ;; CRAY*T3E:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=alphaev5-cray-unicosmk$CRAY_REL ;; CRAY*SV1:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=sv1-cray-unicos$CRAY_REL ;; *:UNICOS/mp:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=craynv-cray-unicosmp$CRAY_REL ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE ;; sparc*:BSD/OS:*:*) GUESS=sparc-unknown-bsdi$UNAME_RELEASE ;; *:BSD/OS:*:*) GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE ;; arm:FreeBSD:*:*) UNAME_PROCESSOR=`uname -p` set_cc_for_build if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi else FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf fi ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case $UNAME_PROCESSOR in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL ;; i*:CYGWIN*:*) GUESS=$UNAME_MACHINE-pc-cygwin ;; *:MINGW64*:*) GUESS=$UNAME_MACHINE-pc-mingw64 ;; *:MINGW*:*) GUESS=$UNAME_MACHINE-pc-mingw32 ;; *:MSYS*:*) GUESS=$UNAME_MACHINE-pc-msys ;; i*:PW*:*) GUESS=$UNAME_MACHINE-pc-pw32 ;; *:SerenityOS:*:*) GUESS=$UNAME_MACHINE-pc-serenity ;; *:Interix*:*) case $UNAME_MACHINE in x86) GUESS=i586-pc-interix$UNAME_RELEASE ;; authenticamd | genuineintel | EM64T) GUESS=x86_64-unknown-interix$UNAME_RELEASE ;; IA64) GUESS=ia64-unknown-interix$UNAME_RELEASE ;; esac ;; i*:UWIN*:*) GUESS=$UNAME_MACHINE-pc-uwin ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) GUESS=x86_64-pc-cygwin ;; prep*:SunOS:5.*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=powerpcle-unknown-solaris2$SUN_REL ;; *:GNU:*:*) # the GNU system GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL ;; *:GNU/*:*:*) # other systems with GNU libc and userland GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC ;; *:Minix:*:*) GUESS=$UNAME_MACHINE-unknown-minix ;; aarch64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; arm*:Linux:*:*) set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then GUESS=$UNAME_MACHINE-unknown-linux-$LIBC else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi else GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf fi fi ;; avr32*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; cris:Linux:*:*) GUESS=$UNAME_MACHINE-axis-linux-$LIBC ;; crisv32:Linux:*:*) GUESS=$UNAME_MACHINE-axis-linux-$LIBC ;; e2k:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; frv:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; hexagon:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; i*86:Linux:*:*) GUESS=$UNAME_MACHINE-pc-linux-$LIBC ;; ia64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; k1om:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; m32r*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; m68*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build IS_GLIBC=0 test x"${LIBC}" = xgnu && IS_GLIBC=1 sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef mips #undef mipsel #undef mips64 #undef mips64el #if ${IS_GLIBC} && defined(_ABI64) LIBCABI=gnuabi64 #else #if ${IS_GLIBC} && defined(_ABIN32) LIBCABI=gnuabin32 #else LIBCABI=${LIBC} #endif #endif #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 CPU=mipsisa64r6 #else #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 CPU=mipsisa32r6 #else #if defined(__mips64) CPU=mips64 #else CPU=mips #endif #endif #endif #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) MIPS_ENDIAN=el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) MIPS_ENDIAN= #else MIPS_ENDIAN= #endif #endif EOF cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` eval "$cc_set_vars" test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; openrisc*:Linux:*:*) GUESS=or1k-unknown-linux-$LIBC ;; or32:Linux:*:* | or1k*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; padre:Linux:*:*) GUESS=sparc-unknown-linux-$LIBC ;; parisc64:Linux:*:* | hppa64:Linux:*:*) GUESS=hppa64-unknown-linux-$LIBC ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; *) GUESS=hppa-unknown-linux-$LIBC ;; esac ;; ppc64:Linux:*:*) GUESS=powerpc64-unknown-linux-$LIBC ;; ppc:Linux:*:*) GUESS=powerpc-unknown-linux-$LIBC ;; ppc64le:Linux:*:*) GUESS=powerpc64le-unknown-linux-$LIBC ;; ppcle:Linux:*:*) GUESS=powerpcle-unknown-linux-$LIBC ;; riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; s390:Linux:*:* | s390x:Linux:*:*) GUESS=$UNAME_MACHINE-ibm-linux-$LIBC ;; sh64*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; sh*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; sparc:Linux:*:* | sparc64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; tile*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; vax:Linux:*:*) GUESS=$UNAME_MACHINE-dec-linux-$LIBC ;; x86_64:Linux:*:*) set_cc_for_build LIBCABI=$LIBC if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_X32 >/dev/null then LIBCABI=${LIBC}x32 fi fi GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI ;; xtensa*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. GUESS=i386-sequent-sysv4 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. GUESS=$UNAME_MACHINE-pc-os2-emx ;; i*86:XTS-300:*:STOP) GUESS=$UNAME_MACHINE-unknown-stop ;; i*86:atheos:*:*) GUESS=$UNAME_MACHINE-unknown-atheos ;; i*86:syllable:*:*) GUESS=$UNAME_MACHINE-pc-syllable ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) GUESS=i386-unknown-lynxos$UNAME_RELEASE ;; i*86:*DOS:*:*) GUESS=$UNAME_MACHINE-pc-msdosdjgpp ;; i*86:*:4.*:*) UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL else GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL fi ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL else GUESS=$UNAME_MACHINE-pc-sysv32 fi ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. GUESS=i586-pc-msdosdjgpp ;; Intel:Mach:3*:*) GUESS=i386-pc-mach3 ;; paragon:*:*:*) GUESS=i860-intel-osf1 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 fi ;; mini*:CTIX:SYS*5:*) # "miniframe" GUESS=m68010-convergent-sysv ;; mc68k:UNIX:SYSTEM5:3.51m) GUESS=m68k-convergent-sysv ;; M680?0:D-NIX:5.3:*) GUESS=m68k-diab-dnix ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) GUESS=m68k-unknown-lynxos$UNAME_RELEASE ;; mc68030:UNIX_System_V:4.*:*) GUESS=m68k-atari-sysv4 ;; TSUNAMI:LynxOS:2.*:*) GUESS=sparc-unknown-lynxos$UNAME_RELEASE ;; rs6000:LynxOS:2.*:*) GUESS=rs6000-unknown-lynxos$UNAME_RELEASE ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) GUESS=powerpc-unknown-lynxos$UNAME_RELEASE ;; SM[BE]S:UNIX_SV:*:*) GUESS=mips-dde-sysv$UNAME_RELEASE ;; RM*:ReliantUNIX-*:*:*) GUESS=mips-sni-sysv4 ;; RM*:SINIX-*:*:*) GUESS=mips-sni-sysv4 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` GUESS=$UNAME_MACHINE-sni-sysv4 else GUESS=ns32k-sni-sysv fi ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says GUESS=i586-unisys-sysv4 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm GUESS=hppa1.1-stratus-sysv4 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. GUESS=i860-stratus-sysv4 ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. GUESS=$UNAME_MACHINE-stratus-vos ;; *:VOS:*:*) # From Paul.Green@stratus.com. GUESS=hppa1.1-stratus-vos ;; mc68*:A/UX:*:*) GUESS=m68k-apple-aux$UNAME_RELEASE ;; news*:NEWS-OS:6*:*) GUESS=mips-sony-newsos6 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if test -d /usr/nec; then GUESS=mips-nec-sysv$UNAME_RELEASE else GUESS=mips-unknown-sysv$UNAME_RELEASE fi ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. GUESS=powerpc-be-beos ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. GUESS=powerpc-apple-beos ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. GUESS=i586-pc-beos ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. GUESS=i586-pc-haiku ;; x86_64:Haiku:*:*) GUESS=x86_64-unknown-haiku ;; SX-4:SUPER-UX:*:*) GUESS=sx4-nec-superux$UNAME_RELEASE ;; SX-5:SUPER-UX:*:*) GUESS=sx5-nec-superux$UNAME_RELEASE ;; SX-6:SUPER-UX:*:*) GUESS=sx6-nec-superux$UNAME_RELEASE ;; SX-7:SUPER-UX:*:*) GUESS=sx7-nec-superux$UNAME_RELEASE ;; SX-8:SUPER-UX:*:*) GUESS=sx8-nec-superux$UNAME_RELEASE ;; SX-8R:SUPER-UX:*:*) GUESS=sx8r-nec-superux$UNAME_RELEASE ;; SX-ACE:SUPER-UX:*:*) GUESS=sxace-nec-superux$UNAME_RELEASE ;; Power*:Rhapsody:*:*) GUESS=powerpc-apple-rhapsody$UNAME_RELEASE ;; *:Rhapsody:*:*) GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE ;; arm64:Darwin:*:*) GUESS=aarch64-apple-darwin$UNAME_RELEASE ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac if command -v xcode-select > /dev/null 2> /dev/null && \ ! xcode-select --print-path > /dev/null 2> /dev/null ; then # Avoid executing cc if there is no toolchain installed as # cc will be a stub that puts up a graphical alert # prompting the user to install developer tools. CC_FOR_BUILD=no_compiler_found else set_cc_for_build fi if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_PPC >/dev/null then UNAME_PROCESSOR=powerpc fi elif test "$UNAME_PROCESSOR" = i386 ; then # uname -m returns i386 or x86_64 UNAME_PROCESSOR=$UNAME_MACHINE fi GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE ;; *:QNX:*:4*) GUESS=i386-pc-qnx ;; NEO-*:NONSTOP_KERNEL:*:*) GUESS=neo-tandem-nsk$UNAME_RELEASE ;; NSE-*:NONSTOP_KERNEL:*:*) GUESS=nse-tandem-nsk$UNAME_RELEASE ;; NSR-*:NONSTOP_KERNEL:*:*) GUESS=nsr-tandem-nsk$UNAME_RELEASE ;; NSV-*:NONSTOP_KERNEL:*:*) GUESS=nsv-tandem-nsk$UNAME_RELEASE ;; NSX-*:NONSTOP_KERNEL:*:*) GUESS=nsx-tandem-nsk$UNAME_RELEASE ;; *:NonStop-UX:*:*) GUESS=mips-compaq-nonstopux ;; BS2000:POSIX*:*:*) GUESS=bs2000-siemens-sysv ;; DS/*:UNIX_System_V:*:*) GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "${cputype-}" = 386; then UNAME_MACHINE=i386 elif test "x${cputype-}" != x; then UNAME_MACHINE=$cputype fi GUESS=$UNAME_MACHINE-unknown-plan9 ;; *:TOPS-10:*:*) GUESS=pdp10-unknown-tops10 ;; *:TENEX:*:*) GUESS=pdp10-unknown-tenex ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) GUESS=pdp10-dec-tops20 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) GUESS=pdp10-xkl-tops20 ;; *:TOPS-20:*:*) GUESS=pdp10-unknown-tops20 ;; *:ITS:*:*) GUESS=pdp10-unknown-its ;; SEI:*:*:SEIUX) GUESS=mips-sei-seiux$UNAME_RELEASE ;; *:DragonFly:*:*) DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case $UNAME_MACHINE in A*) GUESS=alpha-dec-vms ;; I*) GUESS=ia64-dec-vms ;; V*) GUESS=vax-dec-vms ;; esac ;; *:XENIX:*:SysV) GUESS=i386-pc-xenix ;; i*86:skyos:*:*) SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL ;; i*86:rdos:*:*) GUESS=$UNAME_MACHINE-pc-rdos ;; i*86:Fiwix:*:*) GUESS=$UNAME_MACHINE-pc-fiwix ;; *:AROS:*:*) GUESS=$UNAME_MACHINE-unknown-aros ;; x86_64:VMkernel:*:*) GUESS=$UNAME_MACHINE-unknown-esx ;; amd64:Isilon\ OneFS:*:*) GUESS=x86_64-unknown-onefs ;; *:Unleashed:*:*) GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE ;; esac # Do we have a guess based on uname results? if test "x$GUESS" != x; then echo "$GUESS" exit fi # No uname command or uname output not recognized. set_cc_for_build cat > "$dummy.c" < #include #endif #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) #if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) #include #if defined(_SIZE_T_) || defined(SIGLOST) #include #endif #endif #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) #if !defined (ultrix) #include #if defined (BSD) #if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); #else #if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); #else printf ("vax-dec-bsd\n"); exit (0); #endif #endif #else printf ("vax-dec-bsd\n"); exit (0); #endif #else #if defined(_SIZE_T_) || defined(SIGLOST) struct utsname un; uname (&un); printf ("vax-dec-ultrix%s\n", un.release); exit (0); #else printf ("vax-dec-ultrix\n"); exit (0); #endif #endif #endif #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) #if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) #if defined(_SIZE_T_) || defined(SIGLOST) struct utsname *un; uname (&un); printf ("mips-dec-ultrix%s\n", un.release); exit (0); #else printf ("mips-dec-ultrix\n"); exit (0); #endif #endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } echo "$0: unable to guess system type" >&2 case $UNAME_MACHINE:$UNAME_SYSTEM in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <&2 <&2 </dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = "$UNAME_MACHINE" UNAME_RELEASE = "$UNAME_RELEASE" UNAME_SYSTEM = "$UNAME_SYSTEM" UNAME_VERSION = "$UNAME_VERSION" EOF fi exit 1 # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: Project-OSS-Revival-enca-36defd7/config.h.in000066400000000000000000000221311507545312400206300ustar00rootroot00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Define to path to the cstocs recoder. */ #undef CSTOCS_PROG /* Define to default converter list. */ #undef DEFAULT_CONVERTER_LIST /* Define to default external converter program. */ #undef DEFAULT_EXTERNAL_CONVERTER /* Define to enable external converter programs. */ #undef ENABLE_EXTERNAL /* Define to 1 if you have the declaration of 'LC_MESSAGES', and to 0 if you don't. */ #undef HAVE_DECL_LC_MESSAGES /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the 'fork' function. */ #undef HAVE_FORK /* Define to 1 if you have the 'ftruncate' function. */ #undef HAVE_FTRUNCATE /* Define to 1 if you have the header file. */ #undef HAVE_GETOPT_H /* Define to 1 if you have the 'getopt_long' function. */ #undef HAVE_GETOPT_LONG /* Define to 1 if you have the 'gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define if you have the UNIX98 iconv functions. */ #undef HAVE_GOOD_ICONV /* Define if you have the iconv() function and it works. */ #undef HAVE_ICONV /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the 'isatty' function. */ #undef HAVE_ISATTY /* Define to 1 if you have the header file. */ #undef HAVE_LANGINFO_H /* Define if you have the recode library (-lrecode). */ #undef HAVE_LIBRECODE /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define if you have locale.alias file. */ #undef HAVE_LOCALE_ALIAS /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_MINIX_CONFIG_H /* Define to 1 if you have the 'nl_langinfo' function. */ #undef HAVE_NL_LANGINFO /* Define if you have program_invocation_short_name variable. */ #undef HAVE_PROGRAM_INVOCATION_SHORT_NAME /* Define to 1 if you have the 'random' function. */ #undef HAVE_RANDOM /* Define to 1 if you have the 'realpath' function. */ #undef HAVE_REALPATH /* Define to 1 if you have the 'setlocale' function. */ #undef HAVE_SETLOCALE /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the 'stpcpy' function. */ #undef HAVE_STPCPY /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the 'strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the header file. */ #undef HAVE_TIME_H /* Define to 1 if you have the 'ttyname' function. */ #undef HAVE_TTYNAME /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the 'vfork' function. */ #undef HAVE_VFORK /* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H /* Define to 1 if you have the header file. */ #undef HAVE_WCHAR_H /* Define to 1 if you have the 'wordexp' function. */ #undef HAVE_WORDEXP /* Define to 1 if you have the header file. */ #undef HAVE_WORDEXP_H /* Define to 1 if 'fork' works. */ #undef HAVE_WORKING_FORK /* Define to 1 if 'vfork' works. */ #undef HAVE_WORKING_VFORK /* Define to 1 if the system has the type '_Bool'. */ #undef HAVE__BOOL /* Define as const if the declaration of iconv() needs const. */ #undef ICONV_CONST /* Define if iconv is transitive. */ #undef ICONV_IS_TRANSITIVE /* Define to the path to locale.alias file. */ #undef LOCALE_ALIAS_PATH /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define to path to the map recoder. */ #undef MAP_PROG /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to path to the piconv recoder. */ #undef PICONV_PROG /* Define to path to the recode recoder. */ #undef RECODE_PROG /* Define to 1 if the 'S_IS*' macros in do not work properly. */ #undef STAT_MACROS_BROKEN /* Define to 1 if all of the C89 standard headers exist (not just the ones required in a freestanding environment). This macro is provided for backward compatibility; new code need not use it. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . This macro is obsolete. */ #undef TIME_WITH_SYS_TIME /* Define to path to the umap recoder. */ #undef UMAP_PROG /* Enable extensions on AIX, Interix, z/OS. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable general extensions on macOS. */ #ifndef _DARWIN_C_SOURCE # undef _DARWIN_C_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable X/Open compliant socket functions that do not require linking with -lxnet on HP-UX 11.11. */ #ifndef _HPUX_ALT_XOPEN_SOCKET_API # undef _HPUX_ALT_XOPEN_SOCKET_API #endif /* Identify the host operating system as Minix. This macro does not affect the system headers' behavior. A future release of Autoconf may stop defining this macro. */ #ifndef _MINIX # undef _MINIX #endif /* Enable general extensions on NetBSD. Enable NetBSD compatibility extensions on Minix. */ #ifndef _NETBSD_SOURCE # undef _NETBSD_SOURCE #endif /* Enable OpenBSD compatibility extensions on NetBSD. Oddly enough, this does nothing on OpenBSD. */ #ifndef _OPENBSD_SOURCE # undef _OPENBSD_SOURCE #endif /* Define to 1 if needed for POSIX-compatible behavior. */ #ifndef _POSIX_SOURCE # undef _POSIX_SOURCE #endif /* Define to 2 if needed for POSIX-compatible behavior. */ #ifndef _POSIX_1_SOURCE # undef _POSIX_1_SOURCE #endif /* Enable POSIX-compatible threading on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ #ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ # undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ #endif /* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ #ifndef __STDC_WANT_IEC_60559_BFP_EXT__ # undef __STDC_WANT_IEC_60559_BFP_EXT__ #endif /* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ #ifndef __STDC_WANT_IEC_60559_DFP_EXT__ # undef __STDC_WANT_IEC_60559_DFP_EXT__ #endif /* Enable extensions specified by C23 Annex F. */ #ifndef __STDC_WANT_IEC_60559_EXT__ # undef __STDC_WANT_IEC_60559_EXT__ #endif /* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ #ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ # undef __STDC_WANT_IEC_60559_FUNCS_EXT__ #endif /* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */ #ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ # undef __STDC_WANT_IEC_60559_TYPES_EXT__ #endif /* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ #ifndef __STDC_WANT_LIB_EXT2__ # undef __STDC_WANT_LIB_EXT2__ #endif /* Enable extensions specified by ISO/IEC 24747:2009. */ #ifndef __STDC_WANT_MATH_SPEC_FUNCS__ # undef __STDC_WANT_MATH_SPEC_FUNCS__ #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable X/Open extensions. Define to 500 only if necessary to make mbstate_t available. */ #ifndef _XOPEN_SOURCE # undef _XOPEN_SOURCE #endif /* Version number of package */ #undef VERSION /* Define to empty if 'const' does not conform to ANSI C. */ #undef const /* Define as 'int' if doesn't define. */ #undef gid_t /* Define to 'int' if does not define. */ #undef mode_t /* Define to 'long int' if does not define. */ #undef off_t /* Define as a signed integer type capable of holding a process identifier. */ #undef pid_t /* Define as 'unsigned int' if doesn't define. */ #undef size_t /* Define to 'int' if does not define. */ #undef ssize_t /* Define as 'int' if doesn't define. */ #undef uid_t /* Define as 'fork' if 'vfork' does not work. */ #undef vfork Project-OSS-Revival-enca-36defd7/config.rpath000077500000000000000000000352131507545312400211220ustar00rootroot00000000000000#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2003 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a `.a' archive for static linking (except M$VC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; mingw* | pw32* | os2*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; newsos6) ;; linux*) case $CC in icc|ecc) wl='-Wl,' ;; ccc) wl='-Wl,' ;; esac ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; sco3.2v5*) ;; solaris*) wl='-Wl,' ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) wl='-Wl,' ;; sysv4*MP*) ;; uts4*) ;; esac fi # Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then case "$host_os" in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = yes; then # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi4*) ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then hardcode_direct=no fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd1*) ld_shlibs=no ;; freebsd2.2*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; freebsd2*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10* | hpux11*) if test "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=no ;; ia64*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; *) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; openbsd*) hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; sco3.2v5*) ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4.2uw2*) hardcode_direct=yes hardcode_minus_L=no ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) ;; sysv5*) hardcode_libdir_flag_spec= ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER. libname_spec='lib$name' case "$host_os" in aix3*) ;; aix4* | aix5*) ;; amigaos*) ;; beos*) ;; bsdi4*) ;; cygwin* | mingw* | pw32*) shrext=.dll ;; darwin* | rhapsody*) shrext=.dylib ;; dgux*) ;; freebsd1*) ;; freebsd*) ;; gnu*) ;; hpux9* | hpux10* | hpux11*) case "$host_cpu" in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac ;; irix5* | irix6* | nonstopux*) case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux*) ;; netbsd*) ;; newsos6) ;; nto-qnx) ;; openbsd*) ;; os2*) libname_spec='$name' shrext=.dll ;; osf3* | osf4* | osf5*) ;; sco3.2v5*) ;; solaris*) ;; sunos4*) ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) ;; sysv4*MP*) ;; uts4*) ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # https://git.savannah.gnu.org/cgit/config.git/plain/config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. # The "shellcheck disable" line above the timestamp inhibits complaints # about features and limitations of the classic Bourne shell that were # superseded or lifted in POSIX. However, this script identifies a wide # variety of pre-POSIX systems that do not have POSIX shells at all, and # even some reasonably current systems (Solaris 10 as case-in-point) still # have a pre-POSIX /bin/sh. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; *local*) # First pass through any local machine types. echo "$1" exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Split fields of configuration type # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read field1 field2 field3 field4 <&2 exit 1 ;; *-*-*-*) basic_machine=$field1-$field2 basic_os=$field3-$field4 ;; *-*-*) # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two # parts maybe_os=$field2-$field3 case $maybe_os in nto-qnx* | linux-* | uclinux-uclibc* \ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ | storm-chaos* | os2-emx* | rtmk-nova*) basic_machine=$field1 basic_os=$maybe_os ;; android-linux) basic_machine=$field1-unknown basic_os=linux-android ;; *) basic_machine=$field1-$field2 basic_os=$field3 ;; esac ;; *-*) # A lone config we happen to match not fitting any pattern case $field1-$field2 in decstation-3100) basic_machine=mips-dec basic_os= ;; *-*) # Second component is usually, but not always the OS case $field2 in # Prevent following clause from handling this valid os sun*os*) basic_machine=$field1 basic_os=$field2 ;; zephyr*) basic_machine=$field1-unknown basic_os=$field2 ;; # Manufacturers dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ | unicom* | ibm* | next | hp | isi* | apollo | altos* \ | convergent* | ncr* | news | 32* | 3600* | 3100* \ | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ | ultra | tti* | harris | dolphin | highlevel | gould \ | cbm | ns | masscomp | apple | axis | knuth | cray \ | microblaze* | sim | cisco \ | oki | wec | wrs | winbond) basic_machine=$field1-$field2 basic_os= ;; *) basic_machine=$field1 basic_os=$field2 ;; esac ;; esac ;; *) # Convert single-component short-hands not valid as part of # multi-component configurations. case $field1 in 386bsd) basic_machine=i386-pc basic_os=bsd ;; a29khif) basic_machine=a29k-amd basic_os=udi ;; adobe68k) basic_machine=m68010-adobe basic_os=scout ;; alliant) basic_machine=fx80-alliant basic_os= ;; altos | altos3068) basic_machine=m68k-altos basic_os= ;; am29k) basic_machine=a29k-none basic_os=bsd ;; amdahl) basic_machine=580-amdahl basic_os=sysv ;; amiga) basic_machine=m68k-unknown basic_os= ;; amigaos | amigados) basic_machine=m68k-unknown basic_os=amigaos ;; amigaunix | amix) basic_machine=m68k-unknown basic_os=sysv4 ;; apollo68) basic_machine=m68k-apollo basic_os=sysv ;; apollo68bsd) basic_machine=m68k-apollo basic_os=bsd ;; aros) basic_machine=i386-pc basic_os=aros ;; aux) basic_machine=m68k-apple basic_os=aux ;; balance) basic_machine=ns32k-sequent basic_os=dynix ;; blackfin) basic_machine=bfin-unknown basic_os=linux ;; cegcc) basic_machine=arm-unknown basic_os=cegcc ;; convex-c1) basic_machine=c1-convex basic_os=bsd ;; convex-c2) basic_machine=c2-convex basic_os=bsd ;; convex-c32) basic_machine=c32-convex basic_os=bsd ;; convex-c34) basic_machine=c34-convex basic_os=bsd ;; convex-c38) basic_machine=c38-convex basic_os=bsd ;; cray) basic_machine=j90-cray basic_os=unicos ;; crds | unos) basic_machine=m68k-crds basic_os= ;; da30) basic_machine=m68k-da30 basic_os= ;; decstation | pmax | pmin | dec3100 | decstatn) basic_machine=mips-dec basic_os= ;; delta88) basic_machine=m88k-motorola basic_os=sysv3 ;; dicos) basic_machine=i686-pc basic_os=dicos ;; djgpp) basic_machine=i586-pc basic_os=msdosdjgpp ;; ebmon29k) basic_machine=a29k-amd basic_os=ebmon ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson basic_os=ose ;; gmicro) basic_machine=tron-gmicro basic_os=sysv ;; go32) basic_machine=i386-pc basic_os=go32 ;; h8300hms) basic_machine=h8300-hitachi basic_os=hms ;; h8300xray) basic_machine=h8300-hitachi basic_os=xray ;; h8500hms) basic_machine=h8500-hitachi basic_os=hms ;; harris) basic_machine=m88k-harris basic_os=sysv3 ;; hp300 | hp300hpux) basic_machine=m68k-hp basic_os=hpux ;; hp300bsd) basic_machine=m68k-hp basic_os=bsd ;; hppaosf) basic_machine=hppa1.1-hp basic_os=osf ;; hppro) basic_machine=hppa1.1-hp basic_os=proelf ;; i386mach) basic_machine=i386-mach basic_os=mach ;; isi68 | isi) basic_machine=m68k-isi basic_os=sysv ;; m68knommu) basic_machine=m68k-unknown basic_os=linux ;; magnum | m3230) basic_machine=mips-mips basic_os=sysv ;; merlin) basic_machine=ns32k-utek basic_os=sysv ;; mingw64) basic_machine=x86_64-pc basic_os=mingw64 ;; mingw32) basic_machine=i686-pc basic_os=mingw32 ;; mingw32ce) basic_machine=arm-unknown basic_os=mingw32ce ;; monitor) basic_machine=m68k-rom68k basic_os=coff ;; morphos) basic_machine=powerpc-unknown basic_os=morphos ;; moxiebox) basic_machine=moxie-unknown basic_os=moxiebox ;; msdos) basic_machine=i386-pc basic_os=msdos ;; msys) basic_machine=i686-pc basic_os=msys ;; mvs) basic_machine=i370-ibm basic_os=mvs ;; nacl) basic_machine=le32-unknown basic_os=nacl ;; ncr3000) basic_machine=i486-ncr basic_os=sysv4 ;; netbsd386) basic_machine=i386-pc basic_os=netbsd ;; netwinder) basic_machine=armv4l-rebel basic_os=linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony basic_os=newsos ;; news1000) basic_machine=m68030-sony basic_os=newsos ;; necv70) basic_machine=v70-nec basic_os=sysv ;; nh3000) basic_machine=m68k-harris basic_os=cxux ;; nh[45]000) basic_machine=m88k-harris basic_os=cxux ;; nindy960) basic_machine=i960-intel basic_os=nindy ;; mon960) basic_machine=i960-intel basic_os=mon960 ;; nonstopux) basic_machine=mips-compaq basic_os=nonstopux ;; os400) basic_machine=powerpc-ibm basic_os=os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson basic_os=ose ;; os68k) basic_machine=m68k-none basic_os=os68k ;; paragon) basic_machine=i860-intel basic_os=osf ;; parisc) basic_machine=hppa-unknown basic_os=linux ;; psp) basic_machine=mipsallegrexel-sony basic_os=psp ;; pw32) basic_machine=i586-unknown basic_os=pw32 ;; rdos | rdos64) basic_machine=x86_64-pc basic_os=rdos ;; rdos32) basic_machine=i386-pc basic_os=rdos ;; rom68k) basic_machine=m68k-rom68k basic_os=coff ;; sa29200) basic_machine=a29k-amd basic_os=udi ;; sei) basic_machine=mips-sei basic_os=seiux ;; sequent) basic_machine=i386-sequent basic_os= ;; sps7) basic_machine=m68k-bull basic_os=sysv2 ;; st2000) basic_machine=m68k-tandem basic_os= ;; stratus) basic_machine=i860-stratus basic_os=sysv4 ;; sun2) basic_machine=m68000-sun basic_os= ;; sun2os3) basic_machine=m68000-sun basic_os=sunos3 ;; sun2os4) basic_machine=m68000-sun basic_os=sunos4 ;; sun3) basic_machine=m68k-sun basic_os= ;; sun3os3) basic_machine=m68k-sun basic_os=sunos3 ;; sun3os4) basic_machine=m68k-sun basic_os=sunos4 ;; sun4) basic_machine=sparc-sun basic_os= ;; sun4os3) basic_machine=sparc-sun basic_os=sunos3 ;; sun4os4) basic_machine=sparc-sun basic_os=sunos4 ;; sun4sol2) basic_machine=sparc-sun basic_os=solaris2 ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun basic_os= ;; sv1) basic_machine=sv1-cray basic_os=unicos ;; symmetry) basic_machine=i386-sequent basic_os=dynix ;; t3e) basic_machine=alphaev5-cray basic_os=unicos ;; t90) basic_machine=t90-cray basic_os=unicos ;; toad1) basic_machine=pdp10-xkl basic_os=tops20 ;; tpf) basic_machine=s390x-ibm basic_os=tpf ;; udi29k) basic_machine=a29k-amd basic_os=udi ;; ultra3) basic_machine=a29k-nyu basic_os=sym1 ;; v810 | necv810) basic_machine=v810-nec basic_os=none ;; vaxv) basic_machine=vax-dec basic_os=sysv ;; vms) basic_machine=vax-dec basic_os=vms ;; vsta) basic_machine=i386-pc basic_os=vsta ;; vxworks960) basic_machine=i960-wrs basic_os=vxworks ;; vxworks68) basic_machine=m68k-wrs basic_os=vxworks ;; vxworks29k) basic_machine=a29k-wrs basic_os=vxworks ;; xbox) basic_machine=i686-pc basic_os=mingw32 ;; ymp) basic_machine=ymp-cray basic_os=unicos ;; *) basic_machine=$1 basic_os= ;; esac ;; esac # Decode 1-component or ad-hoc basic machines case $basic_machine in # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) cpu=hppa1.1 vendor=winbond ;; op50n) cpu=hppa1.1 vendor=oki ;; op60c) cpu=hppa1.1 vendor=oki ;; ibm*) cpu=i370 vendor=ibm ;; orion105) cpu=clipper vendor=highlevel ;; mac | mpw | mac-mpw) cpu=m68k vendor=apple ;; pmac | pmac-mpw) cpu=powerpc vendor=apple ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) cpu=m68000 vendor=att ;; 3b*) cpu=we32k vendor=att ;; bluegene*) cpu=powerpc vendor=ibm basic_os=cnk ;; decsystem10* | dec10*) cpu=pdp10 vendor=dec basic_os=tops10 ;; decsystem20* | dec20*) cpu=pdp10 vendor=dec basic_os=tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) cpu=m68k vendor=motorola ;; dpx2*) cpu=m68k vendor=bull basic_os=sysv3 ;; encore | umax | mmax) cpu=ns32k vendor=encore ;; elxsi) cpu=elxsi vendor=elxsi basic_os=${basic_os:-bsd} ;; fx2800) cpu=i860 vendor=alliant ;; genix) cpu=ns32k vendor=ns ;; h3050r* | hiux*) cpu=hppa1.1 vendor=hitachi basic_os=hiuxwe2 ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) cpu=m68000 vendor=hp ;; hp9k3[2-9][0-9]) cpu=m68k vendor=hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) cpu=hppa1.1 vendor=hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp cpu=hppa1.1 vendor=hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp cpu=hppa1.1 vendor=hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) cpu=hppa1.1 vendor=hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; i*86v32) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv32 ;; i*86v4*) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv4 ;; i*86v) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv ;; i*86sol2) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=solaris2 ;; j90 | j90-cray) cpu=j90 vendor=cray basic_os=${basic_os:-unicos} ;; iris | iris4d) cpu=mips vendor=sgi case $basic_os in irix*) ;; *) basic_os=irix4 ;; esac ;; miniframe) cpu=m68000 vendor=convergent ;; *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) cpu=m68k vendor=atari basic_os=mint ;; news-3600 | risc-news) cpu=mips vendor=sony basic_os=newsos ;; next | m*-next) cpu=m68k vendor=next case $basic_os in openstep*) ;; nextstep*) ;; ns2*) basic_os=nextstep2 ;; *) basic_os=nextstep3 ;; esac ;; np1) cpu=np1 vendor=gould ;; op50n-* | op60c-*) cpu=hppa1.1 vendor=oki basic_os=proelf ;; pa-hitachi) cpu=hppa1.1 vendor=hitachi basic_os=hiuxwe2 ;; pbd) cpu=sparc vendor=tti ;; pbb) cpu=m68k vendor=tti ;; pc532) cpu=ns32k vendor=pc532 ;; pn) cpu=pn vendor=gould ;; power) cpu=power vendor=ibm ;; ps2) cpu=i386 vendor=ibm ;; rm[46]00) cpu=mips vendor=siemens ;; rtpc | rtpc-*) cpu=romp vendor=ibm ;; sde) cpu=mipsisa32 vendor=sde basic_os=${basic_os:-elf} ;; simso-wrs) cpu=sparclite vendor=wrs basic_os=vxworks ;; tower | tower-32) cpu=m68k vendor=ncr ;; vpp*|vx|vx-*) cpu=f301 vendor=fujitsu ;; w65) cpu=w65 vendor=wdc ;; w89k-*) cpu=hppa1.1 vendor=winbond basic_os=proelf ;; none) cpu=none vendor=none ;; leon|leon[3-9]) cpu=sparc vendor=$basic_machine ;; leon-*|leon[3-9]-*) cpu=sparc vendor=`echo "$basic_machine" | sed 's/-.*//'` ;; *-*) # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read cpu vendor <&2 exit 1 ;; esac ;; esac # Here we canonicalize certain aliases for manufacturers. case $vendor in digital*) vendor=dec ;; commodore*) vendor=cbm ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if test x$basic_os != x then # First recognize some ad-hoc cases, or perhaps split kernel-os, or else just # set os. case $basic_os in gnu/linux*) kernel=linux os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` ;; os2-emx) kernel=os2 os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` ;; nto-qnx*) kernel=nto os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` ;; *-*) # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read kernel os <&2 exit 1 ;; esac # As a final step for OS-related things, validate the OS-kernel combination # (given a valid OS), if there is a kernel. case $kernel-$os in linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ | linux-musl* | linux-relibc* | linux-uclibc* ) ;; uclinux-uclibc* ) ;; -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* ) # These are just libc implementations, not actual OSes, and thus # require a kernel. echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 exit 1 ;; kfreebsd*-gnu* | kopensolaris*-gnu*) ;; vxworks-simlinux | vxworks-simwindows | vxworks-spe) ;; nto-qnx*) ;; os2-emx) ;; *-eabi* | *-gnueabi*) ;; -*) # Blank kernel with real OS is always fine. ;; *-*) echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 exit 1 ;; esac # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. case $vendor in unknown) case $cpu-$os in *-riscix*) vendor=acorn ;; *-sunos*) vendor=sun ;; *-cnk* | *-aix*) vendor=ibm ;; *-beos*) vendor=be ;; *-hpux*) vendor=hp ;; *-mpeix*) vendor=hp ;; *-hiux*) vendor=hitachi ;; *-unos*) vendor=crds ;; *-dgux*) vendor=dg ;; *-luna*) vendor=omron ;; *-genix*) vendor=ns ;; *-clix*) vendor=intergraph ;; *-mvs* | *-opened*) vendor=ibm ;; *-os400*) vendor=ibm ;; s390-* | s390x-*) vendor=ibm ;; *-ptx*) vendor=sequent ;; *-tpf*) vendor=ibm ;; *-vxsim* | *-vxworks* | *-windiss*) vendor=wrs ;; *-aux*) vendor=apple ;; *-hms*) vendor=hitachi ;; *-mpw* | *-macos*) vendor=apple ;; *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) vendor=atari ;; *-vos*) vendor=stratus ;; esac ;; esac echo "$cpu-$vendor-${kernel:+$kernel-}$os" exit # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: Project-OSS-Revival-enca-36defd7/configure000077500000000000000000024257351507545312400205370ustar00rootroot00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.72 for Enca 1.21. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation, # Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case e in #( e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac ;; esac fi # Reset variables that may have inherited troublesome values from # the environment. # IFS needs to be set, to space, tab, and newline, in precisely that order. # (If _AS_PATH_WALK were called with IFS unset, it would have the # side effect of setting IFS to empty, thus disabling word splitting.) # Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl IFS=" "" $as_nl" PS1='$ ' PS2='> ' PS4='+ ' # Ensure predictable behavior from utilities with locale-dependent output. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # We cannot yet rely on "unset" to work, but we need these variables # to be unset--not just set to an empty or harmless value--now, to # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct # also avoids known problems related to "unset" and subshell syntax # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH do eval test \${$as_var+y} \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done # Ensure that fds 0, 1, and 2 are open. if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case e in #( e) case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ) then : else case e in #( e) exitcode=1; echo positional parameters were not saved. ;; esac fi test x\$exitcode = x0 || exit 1 blah=\$(echo \$(echo blah)) test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null then : as_have_required=yes else case e in #( e) as_have_required=no ;; esac fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null then : else case e in #( e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$as_shell as_have_required=yes if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null then : break 2 fi fi done;; esac as_found=false done IFS=$as_save_IFS if $as_found then : else case e in #( e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } && as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$SHELL as_have_required=yes fi ;; esac fi if test "x$CONFIG_SHELL" != x then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno then : printf "%s\n" "$0: This script requires a shell more modern than all" printf "%s\n" "$0: the shells that I found on your system." if test ${ZSH_VERSION+y} ; then printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and $0: https://github.com/nijel/enca/issues about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi ;; esac fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null then : eval 'as_fn_append () { eval $1+=\$2 }' else case e in #( e) as_fn_append () { eval $1=\$$1\$2 } ;; esac fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null then : eval 'as_fn_arith () { as_val=$(( $* )) }' else case e in #( e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } ;; esac fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' t clear :clear s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } # Determine whether it's possible to make 'echo' print without a newline. # These variables are no longer used directly by Autoconf, but are AC_SUBSTed # for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac # For backward compatibility with old third-party macros, we provide # the shell variables $as_echo and $as_echo_n. New code should use # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. as_echo='printf %s\n' as_echo_n='printf %s' rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" as_tr_sh="eval sed '$as_sed_sh'" # deprecated SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Enca' PACKAGE_TARNAME='enca' PACKAGE_VERSION='1.21' PACKAGE_STRING='Enca 1.21' PACKAGE_BUGREPORT='https://github.com/nijel/enca/issues' PACKAGE_URL='' ac_unique_file="src/enca.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_STDIO_H # include #endif #ifdef HAVE_STDLIB_H # include #endif #ifdef HAVE_STRING_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_header_c_list= ac_func_c_list= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS SHELL_RANDOM_FILENAME DEFAULT_CONVERTER_LIST DEFAULT_EXTERNAL_CONVERTER CONVERTER_LIBS RELEASE LTLIBICONV LIBICONV LIBOBJS LIBM ENABLE_GTK_DOC_FALSE ENABLE_GTK_DOC_TRUE GTKDOC HTML_DIR GCOV_LDFLAGS GCOV_CPPFLAGS GCOV_FLAGS GCOV MAP_PROG PICONV_PROG UMAP_PROG RECODE_PROG CSTOCS_PROG MKTEMP_PROG LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP FILECMD LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED host_os host_vendor host_cpu host LIBTOOL LDFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD CFLAGS_FOR_BUILD BUILD_OBJEXT BUILD_EXEEXT CPP_FOR_BUILD ac_ct_CC_FOR_BUILD CC_FOR_BUILD build_os build_vendor build_cpu build CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE am__xargs_n am__rm_f_notfound AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V CSCOPE ETAGS CTAGS am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_maintainer_mode enable_dependency_tracking enable_shared enable_static enable_pic with_pic enable_fast_install enable_aix_soname with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock enable_external with_gcov with_html_dir enable_gtk_doc with_libiconv with_libiconv_prefix enable_rpath with_librecode ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP LT_SYS_LIBRARY_PATH' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: '$ac_option' Try '$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: '$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: '$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF 'configure' configures Enca 1.21 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print 'checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for '--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or '..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, 'make install' will install all the files in '$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify an installation prefix other than '$ac_default_prefix' using '--prefix', for instance '--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/enca] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of Enca 1.21:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --enable-aix-soname=aix|svr4|both shared library versioning (aka "SONAME") variant to provide on AIX, [default=aix]. --disable-libtool-lock avoid locking (might break parallel builds) --enable-external enable conversion using external programs [yes] --enable-gtk-doc use gtk-doc to build documentation [auto] --disable-rpath do not hardcode runtime library paths Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-gcov compile for coverage tests using gcov (default=no) --with-html-dir=PATH path to installed docs [DATADIR/gtk-doc/html] --with-libiconv[=DIR] look for libiconv in DIR/lib and DIR/include [auto] --without-libiconv disable libiconv (UNIX98 iconv) interface --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-librecode[=DIR] look for librecode in DIR/lib and DIR/include [auto] --without-librecode disable librecode Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor LT_SYS_LIBRARY_PATH User-defined run-time library search path. Use these variables to override the choices made by 'configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for configure.gnu first; this name is used for a wrapper for # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF Enca configure 1.21 generated by GNU Autoconf 2.72 Copyright (C) 2023 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext then : ac_retval=0 else case e in #( e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 ;; esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err } then : ac_retval=0 else case e in #( e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 ;; esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" else case e in #( e) eval "$3=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext } then : ac_retval=0 else case e in #( e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 ;; esac fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (void); below. */ #include #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (void); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main (void) { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$3=yes" else case e in #( e) eval "$3=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else case e in #( e) eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) eval "$3=yes" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR # ------------------------------------------------------------------ # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR. ac_fn_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 printf %s "checking whether $as_decl_name is declared... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else case e in #( e) as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` eval ac_save_FLAGS=\$$6 as_fn_append $6 " $5" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" else case e in #( e) eval "$3=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext eval $6=\$ac_save_FLAGS ;; esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_check_decl # ac_fn_c_try_run LINENO # ---------------------- # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that # executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } then : ac_retval=0 else case e in #( e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5 printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status ;; esac fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run ac_configure_args_raw= for ac_arg do case $ac_arg in *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append ac_configure_args_raw " '$ac_arg'" done case $ac_configure_args_raw in *$as_nl*) ac_safe_unquote= ;; *) ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. ac_unsafe_a="$ac_unsafe_z#~" ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; esac cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by Enca $as_me 1.21, which was generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac printf "%s\n" "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Sanitize IFS. IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo printf "%s\n" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && printf "%s\n" "$as_me: caught signal $ac_signal" printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi for ac_site_file in $ac_site_files do case $ac_site_file in #( */*) : ;; #( *) : ac_site_file=./$ac_site_file ;; esac if test -f "$ac_site_file" && test -r "$ac_site_file"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See 'config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Test code for whether the C compiler supports C89 (global declarations) ac_c_conftest_c89_globals=' /* Does the compiler advertise C89 conformance? Do not test the value of __STDC__, because some compilers set it to 0 while being otherwise adequately conformant. */ #if !defined __STDC__ # error "Compiler does not advertise C89 conformance" #endif #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ struct buf { int x; }; struct buf * (*rcsopen) (struct buf *, struct stat *, int); static char *e (char **p, int i) { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* C89 style stringification. */ #define noexpand_stringify(a) #a const char *stringified = noexpand_stringify(arbitrary+token=sequence); /* C89 style token pasting. Exercises some of the corner cases that e.g. old MSVC gets wrong, but not very hard. */ #define noexpand_concat(a,b) a##b #define expand_concat(a,b) noexpand_concat(a,b) extern int vA; extern int vbee; #define aye A #define bee B int *pvA = &expand_concat(v,aye); int *pvbee = &noexpand_concat(v,bee); /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not \xHH hex character constants. These do not provoke an error unfortunately, instead are silently treated as an "x". The following induces an error, until -std is added to get proper ANSI mode. Curiously \x00 != x always comes out true, for an array size at least. It is necessary to write \x00 == 0 to get something that is true only with -std. */ int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) '\''x'\'' int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), int, int);' # Test code for whether the C compiler supports C89 (body of main). ac_c_conftest_c89_main=' ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); ' # Test code for whether the C compiler supports C99 (global declarations) ac_c_conftest_c99_globals=' /* Does the compiler advertise C99 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L # error "Compiler does not advertise C99 conformance" #endif // See if C++-style comments work. #include extern int puts (const char *); extern int printf (const char *, ...); extern int dprintf (int, const char *, ...); extern void *malloc (size_t); extern void free (void *); // Check varargs macros. These examples are taken from C99 6.10.3.5. // dprintf is used instead of fprintf to avoid needing to declare // FILE and stderr. #define debug(...) dprintf (2, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK #error "your preprocessor is broken" #endif #if BIG_OK #else #error "your preprocessor is broken" #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) continue; return 0; } // Check varargs and va_copy. static bool test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str = ""; int number = 0; float fnumber = 0; while (*format) { switch (*format++) { case '\''s'\'': // string str = va_arg (args_copy, const char *); break; case '\''d'\'': // int number = va_arg (args_copy, int); break; case '\''f'\'': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); return *str && number && fnumber; } ' # Test code for whether the C compiler supports C99 (body of main). ac_c_conftest_c99_main=' // Check bool. _Bool success = false; success |= (argc != 0); // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Work around memory leak warnings. free (ia); // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[0] = argv[0][0]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' || dynamic_array[ni.number - 1] != 543); ' # Test code for whether the C compiler supports C11 (global declarations) ac_c_conftest_c11_globals=' /* Does the compiler advertise C11 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L # error "Compiler does not advertise C11 conformance" #endif // Check _Alignas. char _Alignas (double) aligned_as_double; char _Alignas (0) no_special_alignment; extern char aligned_as_int; char _Alignas (0) _Alignas (int) aligned_as_int; // Check _Alignof. enum { int_alignment = _Alignof (int), int_array_alignment = _Alignof (int[100]), char_alignment = _Alignof (char) }; _Static_assert (0 < -_Alignof (int), "_Alignof is signed"); // Check _Noreturn. int _Noreturn does_not_return (void) { for (;;) continue; } // Check _Static_assert. struct test_static_assert { int x; _Static_assert (sizeof (int) <= sizeof (long int), "_Static_assert does not work in struct"); long int y; }; // Check UTF-8 literals. #define u8 syntax error! char const utf8_literal[] = u8"happens to be ASCII" "another string"; // Check duplicate typedefs. typedef long *long_ptr; typedef long int *long_ptr; typedef long_ptr long_ptr; // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. struct anonymous { union { struct { int i; int j; }; struct { int k; long int l; } w; }; int m; } v1; ' # Test code for whether the C compiler supports C11 (body of main). ac_c_conftest_c11_main=' _Static_assert ((offsetof (struct anonymous, i) == offsetof (struct anonymous, w.k)), "Anonymous union alignment botch"); v1.i = 2; v1.w.k = 5; ok |= v1.i != 5; ' # Test code for whether the C compiler supports C11 (complete). ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} ${ac_c_conftest_c99_globals} ${ac_c_conftest_c11_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} ${ac_c_conftest_c99_main} ${ac_c_conftest_c11_main} return ok; } " # Test code for whether the C compiler supports C99 (complete). ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} ${ac_c_conftest_c99_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} ${ac_c_conftest_c99_main} return ok; } " # Test code for whether the C compiler supports C89 (complete). ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} return ok; } " as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H" as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H" as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H" as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H" as_fn_append ac_func_c_list " fork HAVE_FORK" as_fn_append ac_func_c_list " vfork HAVE_VFORK" # Auxiliary files required by this configure script. ac_aux_files="config.rpath ltmain.sh config.guess config.sub compile missing install-sh" # Locations in which to look for auxiliary files. ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.." # Search for a directory containing all of the required auxiliary files, # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. # If we don't find one directory that contains all the files we need, # we report the set of missing files from the *first* directory in # $ac_aux_dir_candidates and give up. ac_missing_aux_files="" ac_first_candidate=: printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in $ac_aux_dir_candidates do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac as_found=: printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 ac_aux_dir_found=yes ac_install_sh= for ac_aux in $ac_aux_files do # As a special case, if "install-sh" is required, that requirement # can be satisfied by any of "install-sh", "install.sh", or "shtool", # and $ac_install_sh is set appropriately for whichever one is found. if test x"$ac_aux" = x"install-sh" then if test -f "${as_dir}install-sh"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 ac_install_sh="${as_dir}install-sh -c" elif test -f "${as_dir}install.sh"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 ac_install_sh="${as_dir}install.sh -c" elif test -f "${as_dir}shtool"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 ac_install_sh="${as_dir}shtool install -c" else ac_aux_dir_found=no if $ac_first_candidate; then ac_missing_aux_files="${ac_missing_aux_files} install-sh" else break fi fi else if test -f "${as_dir}${ac_aux}"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 else ac_aux_dir_found=no if $ac_first_candidate; then ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" else break fi fi fi done if test "$ac_aux_dir_found" = yes; then ac_aux_dir="$as_dir" break fi ac_first_candidate=false as_found=false done IFS=$as_save_IFS if $as_found then : else case e in #( e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;; esac fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. if test -f "${ac_aux_dir}config.guess"; then ac_config_guess="$SHELL ${ac_aux_dir}config.guess" fi if test -f "${ac_aux_dir}config.sub"; then ac_config_sub="$SHELL ${ac_aux_dir}config.sub" fi if test -f "$ac_aux_dir/configure"; then ac_configure="$SHELL ${ac_aux_dir}configure" fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5 printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5 printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5 printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5 printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5 printf "%s\n" "$as_me: former value: '$ac_old_val'" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5 printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_files="$ac_config_files Makefile enca.spec enca.pc devel-docs/Makefile data/Makefile lib/Makefile script/Makefile script/b-cstocs script/b-map script/b-piconv script/b-umap src/Makefile src/HELP test/Makefile tools/Makefile" ac_config_headers="$ac_config_headers config.h" am__api_version='1.17' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 printf %s "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test ${ac_cv_path_install+y} then : printf %s "(cached) " >&6 else case e in #( e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac # Account for fact that we put trailing slashes in our PATH walk. case $as_dir in #(( ./ | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir ;; esac fi if test ${ac_cv_path_install+y}; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 printf "%s\n" "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sleep supports fractional seconds" >&5 printf %s "checking whether sleep supports fractional seconds... " >&6; } if test ${am_cv_sleep_fractional_seconds+y} then : printf %s "(cached) " >&6 else case e in #( e) if sleep 0.001 2>/dev/null then : am_cv_sleep_fractional_seconds=yes else case e in #( e) am_cv_sleep_fractional_seconds=no ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_sleep_fractional_seconds" >&5 printf "%s\n" "$am_cv_sleep_fractional_seconds" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking filesystem timestamp resolution" >&5 printf %s "checking filesystem timestamp resolution... " >&6; } if test ${am_cv_filesystem_timestamp_resolution+y} then : printf %s "(cached) " >&6 else case e in #( e) # Default to the worst case. am_cv_filesystem_timestamp_resolution=2 # Only try to go finer than 1 sec if sleep can do it. # Don't try 1 sec, because if 0.01 sec and 0.1 sec don't work, # - 1 sec is not much of a win compared to 2 sec, and # - it takes 2 seconds to perform the test whether 1 sec works. # # Instead, just use the default 2s on platforms that have 1s resolution, # accept the extra 1s delay when using $sleep in the Automake tests, in # exchange for not incurring the 2s delay for running the test for all # packages. # am_try_resolutions= if test "$am_cv_sleep_fractional_seconds" = yes; then # Even a millisecond often causes a bunch of false positives, # so just try a hundredth of a second. The time saved between .001 and # .01 is not terribly consequential. am_try_resolutions="0.01 0.1 $am_try_resolutions" fi # In order to catch current-generation FAT out, we must *modify* files # that already exist; the *creation* timestamp is finer. Use names # that make ls -t sort them differently when they have equal # timestamps than when they have distinct timestamps, keeping # in mind that ls -t prints the *newest* file first. rm -f conftest.ts? : > conftest.ts1 : > conftest.ts2 : > conftest.ts3 # Make sure ls -t actually works. Do 'set' in a subshell so we don't # clobber the current shell's arguments. (Outer-level square brackets # are removed by m4; they're present so that m4 does not expand # ; be careful, easy to get confused.) if ( set X `ls -t conftest.ts[12]` && { test "$*" != "X conftest.ts1 conftest.ts2" || test "$*" != "X conftest.ts2 conftest.ts1"; } ); then :; else # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". printf "%s\n" ""Bad output from ls -t: \"`ls -t conftest.ts[12]`\""" >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "ls -t produces unexpected output. Make sure there is not a broken ls alias in your environment. See 'config.log' for more details" "$LINENO" 5; } fi for am_try_res in $am_try_resolutions; do # Any one fine-grained sleep might happen to cross the boundary # between two values of a coarser actual resolution, but if we do # two fine-grained sleeps in a row, at least one of them will fall # entirely within a coarse interval. echo alpha > conftest.ts1 sleep $am_try_res echo beta > conftest.ts2 sleep $am_try_res echo gamma > conftest.ts3 # We assume that 'ls -t' will make use of high-resolution # timestamps if the operating system supports them at all. if (set X `ls -t conftest.ts?` && test "$2" = conftest.ts3 && test "$3" = conftest.ts2 && test "$4" = conftest.ts1); then # # Ok, ls -t worked. If we're at a resolution of 1 second, we're done, # because we don't need to test make. make_ok=true if test $am_try_res != 1; then # But if we've succeeded so far with a subsecond resolution, we # have one more thing to check: make. It can happen that # everything else supports the subsecond mtimes, but make doesn't; # notably on macOS, which ships make 3.81 from 2006 (the last one # released under GPLv2). https://bugs.gnu.org/68808 # # We test $MAKE if it is defined in the environment, else "make". # It might get overridden later, but our hope is that in practice # it does not matter: it is the system "make" which is (by far) # the most likely to be broken, whereas if the user overrides it, # probably they did so with a better, or at least not worse, make. # https://lists.gnu.org/archive/html/automake/2024-06/msg00051.html # # Create a Makefile (real tab character here): rm -f conftest.mk echo 'conftest.ts1: conftest.ts2' >conftest.mk echo ' touch conftest.ts2' >>conftest.mk # # Now, running # touch conftest.ts1; touch conftest.ts2; make # should touch ts1 because ts2 is newer. This could happen by luck, # but most often, it will fail if make's support is insufficient. So # test for several consecutive successes. # # (We reuse conftest.ts[12] because we still want to modify existing # files, not create new ones, per above.) n=0 make=${MAKE-make} until test $n -eq 3; do echo one > conftest.ts1 sleep $am_try_res echo two > conftest.ts2 # ts2 should now be newer than ts1 if $make -f conftest.mk | grep 'up to date' >/dev/null; then make_ok=false break # out of $n loop fi n=`expr $n + 1` done fi # if $make_ok; then # Everything we know to check worked out, so call this resolution good. am_cv_filesystem_timestamp_resolution=$am_try_res break # out of $am_try_res loop fi # Otherwise, we'll go on to check the next resolution. fi done rm -f conftest.ts? # (end _am_filesystem_timestamp_resolution) ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_filesystem_timestamp_resolution" >&5 printf "%s\n" "$am_cv_filesystem_timestamp_resolution" >&6; } # This check should not be cached, as it may vary across builds of # different projects. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 printf %s "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). am_build_env_is_sane=no am_has_slept=no rm -f conftest.file for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi test "$2" = conftest.file ); then am_build_env_is_sane=yes break fi # Just in case. sleep "$am_cv_filesystem_timestamp_resolution" am_has_slept=yes done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_build_env_is_sane" >&5 printf "%s\n" "$am_build_env_is_sane" >&6; } if test "$am_build_env_is_sane" = no; then as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1 then : else case e in #( e) ( sleep "$am_cv_filesystem_timestamp_resolution" ) & am_sleep_pid=$! ;; esac fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was 's,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_STRIP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 printf "%s\n" "$STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_STRIP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 printf "%s\n" "$ac_ct_STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5 printf %s "checking for a race-free mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test ${ac_cv_path_mkdir+y} then : printf %s "(cached) " >&6 else case e in #( e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir ('*'coreutils) '* | \ *'BusyBox '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS ;; esac fi test -d ./--version && rmdir ./--version if test ${ac_cv_path_mkdir+y}; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use plain mkdir -p, # in the hope it doesn't have the bugs of ancient mkdir. MKDIR_P='mkdir -p' fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 printf "%s\n" "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AWK+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 printf "%s\n" "$AWK" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$AWK" && break done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval test \${ac_cv_prog_make_${ac_make}_set+y} then : printf %s "(cached) " >&6 else case e in #( e) cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make ;; esac fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } SET_MAKE= else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AM_DEFAULT_VERBOSITY=1 # Check whether --enable-silent-rules was given. if test ${enable_silent_rules+y} then : enableval=$enable_silent_rules; fi am_make=${MAKE-make} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 printf %s "checking whether $am_make supports nested variables... " >&6; } if test ${am_cv_make_support_nested_variables+y} then : printf %s "(cached) " >&6 else case e in #( e) if printf "%s\n" 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } AM_BACKSLASH='\' am__rm_f_notfound= if (rm -f && rm -fr && rm -rf) 2>/dev/null then : else case e in #( e) am__rm_f_notfound='""' ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking xargs -n works" >&5 printf %s "checking xargs -n works... " >&6; } if test ${am_cv_xargs_n_works+y} then : printf %s "(cached) " >&6 else case e in #( e) if test "`echo 1 2 3 | xargs -n2 echo`" = "1 2 3" then : am_cv_xargs_n_works=yes else case e in #( e) am_cv_xargs_n_works=no ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_xargs_n_works" >&5 printf "%s\n" "$am_cv_xargs_n_works" >&6; } if test "$am_cv_xargs_n_works" = yes then : am__xargs_n='xargs -n' else case e in #( e) am__xargs_n='am__xargs_n () { shift; sed "s/ /\\n/g" | while read am__xargs_n_arg; do "" "$am__xargs_n_arg"; done; }' ;; esac fi if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='enca' VERSION='1.21' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # Variables for tags utilities; see am/tags.am if test -z "$CTAGS"; then CTAGS=ctags fi if test -z "$ETAGS"; then ETAGS=etags fi if test -z "$CSCOPE"; then CSCOPE=cscope fi test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" for k in m4 ; do ACLOCAL="$ACLOCAL -I $k" ; done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 printf %s "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test ${enable_maintainer_mode+y} then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else case e in #( e) USE_MAINTAINER_MODE=no ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 printf "%s\n" "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE RELEASE=1 for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AWK+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 printf "%s\n" "$AWK" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$AWK" && break done ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. set dummy ${ac_tool_prefix}clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}clang" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "clang", so it can be a program name with args. set dummy clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="clang" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi fi test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See 'config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 printf %s "checking whether the C compiler works... " >&6; } ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'. # So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an '-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else case e in #( e) ac_file='' ;; esac fi if test -z "$ac_file" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See 'config.log' for more details" "$LINENO" 5; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 printf %s "checking for C compiler default output file name... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 printf "%s\n" "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 printf %s "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : # If both 'conftest.exe' and 'conftest' are 'present' (well, observable) # catch 'conftest.exe'. For instance with Cygwin, 'ls conftest' will # work properly (i.e., refer to 'conftest.exe'), while it won't with # 'rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else case e in #( e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See 'config.log' for more details" "$LINENO" 5; } ;; esac fi rm -f conftest conftest$ac_cv_exeext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 printf "%s\n" "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { FILE *f = fopen ("conftest.out", "w"); if (!f) return 1; return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 printf %s "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot run C compiled programs. If you meant to cross compile, use '--host'. See 'config.log' for more details" "$LINENO" 5; } fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 printf "%s\n" "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext \ conftest.o conftest.obj conftest.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 printf %s "checking for suffix of object files... " >&6; } if test ${ac_cv_objext+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else case e in #( e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See 'config.log' for more details" "$LINENO" 5; } ;; esac fi rm -f conftest.$ac_cv_objext conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 printf "%s\n" "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes else case e in #( e) ac_compiler_gnu=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } ac_compiler_gnu=$ac_cv_c_compiler_gnu if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes else case e in #( e) CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi ac_prog_cc_stdc=no if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c11_program _ACEOF for ac_arg in '' -std=gnu11 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c11=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } CC="$CC $ac_cv_prog_cc_c11" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 ac_prog_cc_stdc=c11 ;; esac fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c99_program _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } CC="$CC $ac_cv_prog_cc_c99" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 ac_prog_cc_stdc=c99 ;; esac fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c89_program _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } CC="$CC $ac_cv_prog_cc_c89" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 ac_prog_cc_stdc=c89 ;; esac fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 printf %s "checking whether $CC understands -c and -o together... " >&6; } if test ${am_cv_prog_cc_c_o+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; } cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } case $?:`cat confinc.out 2>/dev/null` in #( '0:this is the am__doit target') : case $s in #( BSD) : am__include='.include' am__quote='"' ;; #( *) : am__include='include' am__quote='' ;; esac ;; #( *) : ;; esac if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 printf "%s\n" "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. if test ${enable_dependency_tracking+y} then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 printf %s "checking dependency style of $depcc... " >&6; } if test ${am_cv_CC_dependencies_compiler_type+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thus: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 printf %s "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test ${ac_cv_prog_CPP+y} then : printf %s "(cached) " >&6 else case e in #( e) # Double quotes because $CC needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO" then : else case e in #( e) # Broken: fails on valid input. continue ;; esac fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue else case e in #( e) # Passes both tests. ac_preproc_ok=: break ;; esac fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : break fi done ac_cv_prog_CPP=$CPP ;; esac fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 printf "%s\n" "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO" then : else case e in #( e) # Broken: fails on valid input. continue ;; esac fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue else case e in #( e) # Passes both tests. ac_preproc_ok=: break ;; esac fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : else case e in #( e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See 'config.log' for more details" "$LINENO" 5; } ;; esac fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Make sure we can run config.sub. $SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 printf %s "checking build system type... " >&6; } if test ${ac_cv_build+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 printf "%s\n" "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac cross_compiling_build=no ac_build_tool_prefix= if test -n "$build" then : ac_build_tool_prefix="$build-" elif test -n "$build_alias" then : ac_build_tool_prefix="$build_alias-" fi ac_ext=c ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD' ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5' ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_build_c_compiler_gnu ac_ext=c ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD' ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5' ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_build_c_compiler_gnu if test -n "$ac_build_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_build_tool_prefix}gcc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC_FOR_BUILD+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC_FOR_BUILD"; then ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC_FOR_BUILD="${ac_build_tool_prefix}gcc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD if test -n "$CC_FOR_BUILD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5 printf "%s\n" "$CC_FOR_BUILD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC_FOR_BUILD"; then ac_ct_CC_FOR_BUILD=$CC_FOR_BUILD # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC_FOR_BUILD+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_CC_FOR_BUILD"; then ac_cv_prog_ac_ct_CC_FOR_BUILD="$ac_ct_CC_FOR_BUILD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC_FOR_BUILD="gcc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_CC_FOR_BUILD=$ac_cv_prog_ac_ct_CC_FOR_BUILD if test -n "$ac_ct_CC_FOR_BUILD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC_FOR_BUILD" >&5 printf "%s\n" "$ac_ct_CC_FOR_BUILD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC_FOR_BUILD" = x; then CC_FOR_BUILD="" else case $cross_compiling_build:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with build triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with build triplet" >&2;} ac_tool_warned=yes ;; esac CC_FOR_BUILD=$ac_ct_CC_FOR_BUILD fi else CC_FOR_BUILD="$ac_cv_prog_CC_FOR_BUILD" fi if test -z "$CC_FOR_BUILD"; then if test -n "$ac_build_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_build_tool_prefix}cc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC_FOR_BUILD+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC_FOR_BUILD"; then ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC_FOR_BUILD="${ac_build_tool_prefix}cc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD if test -n "$CC_FOR_BUILD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5 printf "%s\n" "$CC_FOR_BUILD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi fi if test -z "$CC_FOR_BUILD"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC_FOR_BUILD+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC_FOR_BUILD"; then ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC_FOR_BUILD="cc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC_FOR_BUILD shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC_FOR_BUILD to just the basename; use the full file name. shift ac_cv_prog_CC_FOR_BUILD="$as_dir$ac_word${1+' '}$@" fi fi fi ;; esac fi CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD if test -n "$CC_FOR_BUILD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5 printf "%s\n" "$CC_FOR_BUILD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$CC_FOR_BUILD"; then if test -n "$ac_build_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_build_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC_FOR_BUILD+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC_FOR_BUILD"; then ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC_FOR_BUILD="$ac_build_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD if test -n "$CC_FOR_BUILD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5 printf "%s\n" "$CC_FOR_BUILD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$CC_FOR_BUILD" && break done fi if test -z "$CC_FOR_BUILD"; then ac_ct_CC_FOR_BUILD=$CC_FOR_BUILD for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC_FOR_BUILD+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_CC_FOR_BUILD"; then ac_cv_prog_ac_ct_CC_FOR_BUILD="$ac_ct_CC_FOR_BUILD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC_FOR_BUILD="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_CC_FOR_BUILD=$ac_cv_prog_ac_ct_CC_FOR_BUILD if test -n "$ac_ct_CC_FOR_BUILD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC_FOR_BUILD" >&5 printf "%s\n" "$ac_ct_CC_FOR_BUILD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_CC_FOR_BUILD" && break done if test "x$ac_ct_CC_FOR_BUILD" = x; then CC_FOR_BUILD="" else case $cross_compiling_build:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with build triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with build triplet" >&2;} ac_tool_warned=yes ;; esac CC_FOR_BUILD=$ac_ct_CC_FOR_BUILD fi fi fi if test -z "$CC_FOR_BUILD"; then if test -n "$ac_build_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. set dummy ${ac_build_tool_prefix}clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC_FOR_BUILD+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC_FOR_BUILD"; then ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC_FOR_BUILD="${ac_build_tool_prefix}clang" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD if test -n "$CC_FOR_BUILD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5 printf "%s\n" "$CC_FOR_BUILD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC_FOR_BUILD"; then ac_ct_CC_FOR_BUILD=$CC_FOR_BUILD # Extract the first word of "clang", so it can be a program name with args. set dummy clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC_FOR_BUILD+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_CC_FOR_BUILD"; then ac_cv_prog_ac_ct_CC_FOR_BUILD="$ac_ct_CC_FOR_BUILD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC_FOR_BUILD="clang" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_CC_FOR_BUILD=$ac_cv_prog_ac_ct_CC_FOR_BUILD if test -n "$ac_ct_CC_FOR_BUILD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC_FOR_BUILD" >&5 printf "%s\n" "$ac_ct_CC_FOR_BUILD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC_FOR_BUILD" = x; then CC_FOR_BUILD="" else case $cross_compiling_build:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with build triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with build triplet" >&2;} ac_tool_warned=yes ;; esac CC_FOR_BUILD=$ac_ct_CC_FOR_BUILD fi else CC_FOR_BUILD="$ac_cv_prog_CC_FOR_BUILD" fi fi test -z "$CC_FOR_BUILD" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See 'config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes else case e in #( e) ac_compiler_gnu=no ;; esac fi rm -f core conftest.err conftest.$ac_build_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } ac_compiler_gnu=$ac_cv_c_compiler_gnu if test $ac_compiler_gnu = yes; then GCC_FOR_BUILD=yes else GCC_FOR_BUILD= fi ac_test_CFLAGS=${CFLAGS_FOR_BUILD+y} ac_save_CFLAGS=$CFLAGS_FOR_BUILD { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD accepts -g" >&5 printf %s "checking whether $CC_FOR_BUILD accepts -g... " >&6; } if test ${ac_cv_build_prog_cc_g+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_build_prog_cc_g=no CFLAGS_FOR_BUILD="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_build_prog_cc_g=yes else case e in #( e) CFLAGS_FOR_BUILD="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS_FOR_BUILD="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_build_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_build_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_build_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_build_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build_prog_cc_g" >&5 printf "%s\n" "$ac_cv_build_prog_cc_g" >&6; } if test $ac_test_CFLAGS; then CFLAGS_FOR_BUILD=$ac_save_CFLAGS elif test $ac_cv_build_prog_cc_g = yes; then if test "$GCC_FOR_BUILD" = yes; then CFLAGS_FOR_BUILD="-g -O2" else CFLAGS_FOR_BUILD="-g" fi else if test "$GCC_FOR_BUILD" = yes; then CFLAGS_FOR_BUILD="-O2" else CFLAGS_FOR_BUILD= fi fi ac_prog_cc_stdc=no if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC_FOR_BUILD option to enable C11 features" >&5 printf %s "checking for $CC_FOR_BUILD option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c11=no ac_save_CC=$CC_FOR_BUILD cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c11_program _ACEOF for ac_arg in '' -std=gnu11 do CC_FOR_BUILD="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c11=$ac_arg fi rm -f core conftest.err conftest.$ac_build_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext CC_FOR_BUILD=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } CC_FOR_BUILD="$CC_FOR_BUILD $ac_cv_prog_cc_c11" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 ac_prog_cc_stdc=c11 ;; esac fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC_FOR_BUILD option to enable C99 features" >&5 printf %s "checking for $CC_FOR_BUILD option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c99=no ac_save_CC=$CC_FOR_BUILD cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c99_program _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= do CC_FOR_BUILD="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_build_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC_FOR_BUILD=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } CC_FOR_BUILD="$CC_FOR_BUILD $ac_cv_prog_cc_c99" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 ac_prog_cc_stdc=c99 ;; esac fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC_FOR_BUILD option to enable C89 features" >&5 printf %s "checking for $CC_FOR_BUILD option to enable C89 features... " >&6; } if test ${ac_cv_build_prog_cc_c89+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_build_prog_cc_c89=no ac_save_CC=$CC_FOR_BUILD cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c89_program _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC_FOR_BUILD="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_build_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_build_objext conftest.beam test "x$ac_cv_build_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC_FOR_BUILD=$ac_save_CC ;; esac fi if test "x$ac_cv_build_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_build_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_build_prog_cc_c89" >&6; } CC_FOR_BUILD="$CC_FOR_BUILD $ac_cv_build_prog_cc_c89" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_build_prog_cc_c89 ac_prog_cc_stdc=c89 ;; esac fi fi ac_ext=c ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD' ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5' ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_build_c_compiler_gnu ac_ext=c ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD' ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5' ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_build_c_compiler_gnu { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD understands -c and -o together" >&5 printf %s "checking whether $CC_FOR_BUILD understands -c and -o together... " >&6; } if test ${am_cv_build_prog_cc_c_o+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_build_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC_FOR_BUILD -c conftest.$ac_ext -o conftest2.$ac_build_objext" >&5 ($CC_FOR_BUILD -c conftest.$ac_ext -o conftest2.$ac_build_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_build_objext; then : OK else am_cv_build_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_build_prog_cc_c_o" >&5 printf "%s\n" "$am_cv_build_prog_cc_c_o" >&6; } if test "$am_cv_build_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC_FOR_BUILD="$am_aux_dir/compile $CC_FOR_BUILD" fi ac_ext=c ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD' ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5' ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_build_c_compiler_gnu depcc="$CC_FOR_BUILD" am_compiler_list= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 printf %s "checking dependency style of $depcc... " >&6; } if test ${am_cv_build_CC_dependencies_compiler_type+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_build_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${BUILD_OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${BUILD_OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thus: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_build_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_build_CC_dependencies_compiler_type=none fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_build_CC_dependencies_compiler_type" >&5 printf "%s\n" "$am_cv_build_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_build_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_build_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 printf %s "checking whether the C compiler works... " >&6; } ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'. # So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test ${ac_cv_build_exeext+y} && test "$ac_cv_build_exeext" != no; then :; else ac_cv_build_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an '-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_build_exeext" = no && ac_cv_build_exeext= else case e in #( e) ac_file='' ;; esac fi if test -z "$ac_file" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See 'config.log' for more details" "$LINENO" 5; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 printf %s "checking for C compiler default output file name... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 printf "%s\n" "$ac_file" >&6; } ac_build_exeext=$ac_cv_build_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_build_exeext b.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 printf %s "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : # If both 'conftest.exe' and 'conftest' are 'present' (well, observable) # catch 'conftest.exe'. For instance with Cygwin, 'ls conftest' will # work properly (i.e., refer to 'conftest.exe'), while it won't with # 'rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_build_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else case e in #( e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See 'config.log' for more details" "$LINENO" 5; } ;; esac fi rm -f conftest conftest$ac_cv_build_exeext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build_exeext" >&5 printf "%s\n" "$ac_cv_build_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_build_exeext ac_build_exeext=$BUILD_EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { FILE *f = fopen ("conftest.out", "w"); if (!f) return 1; return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 printf %s "checking whether we are cross compiling... " >&6; } if test "$cross_compiling_build" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_build_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling_build=no else if test "$cross_compiling_build" = maybe; then cross_compiling_build=yes else { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot run C compiled programs. If you meant to cross compile, use '--build'. See 'config.log' for more details" "$LINENO" 5; } fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling_build" >&5 printf "%s\n" "$cross_compiling_build" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_build_exeext \ conftest.o conftest.obj conftest.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 printf %s "checking for suffix of object files... " >&6; } if test ${ac_cv_build_objext+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_build_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else case e in #( e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See 'config.log' for more details" "$LINENO" 5; } ;; esac fi rm -f conftest.$ac_cv_build_objext conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build_objext" >&5 printf "%s\n" "$ac_cv_build_objext" >&6; } OBJEXT=$ac_cv_build_objext ac_build_objext=$BUILD_OBJEXT ac_ext=c ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD' ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5' ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_build_c_compiler_gnu { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 printf %s "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP_FOR_BUILD" && test -d "$CPP_FOR_BUILD"; then CPP_FOR_BUILD= fi if test -z "$CPP_FOR_BUILD"; then if test ${ac_cv_build_prog_CPP+y} then : printf %s "(cached) " >&6 else case e in #( e) # Double quotes because $CC needs to be expanded for CPP_FOR_BUILD in "$CC_FOR_BUILD -E" "$CC_FOR_BUILD -E -traditional-cpp" cpp /lib/cpp do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO" then : else case e in #( e) # Broken: fails on valid input. continue ;; esac fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue else case e in #( e) # Passes both tests. ac_preproc_ok=: break ;; esac fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : break fi done ac_cv_build_prog_CPP=$CPP_FOR_BUILD ;; esac fi CPP_FOR_BUILD=$ac_cv_build_prog_CPP else ac_cv_build_prog_CPP=$CPP_FOR_BUILD fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP_FOR_BUILD" >&5 printf "%s\n" "$CPP_FOR_BUILD" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO" then : else case e in #( e) # Broken: fails on valid input. continue ;; esac fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue else case e in #( e) # Passes both tests. ac_preproc_ok=: break ;; esac fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : else case e in #( e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP_FOR_BUILD\" fails sanity check See 'config.log' for more details" "$LINENO" 5; } ;; esac fi ac_ext=c ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD' ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5' ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_build_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_header= ac_cache= for ac_item in $ac_header_c_list do if test $ac_cache; then ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then printf "%s\n" "#define $ac_item 1" >> confdefs.h fi ac_header= ac_cache= elif test $ac_header; then ac_cache=$ac_item else ac_header=$ac_item fi done if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes then : printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; } if test ${ac_cv_safe_to_define___extensions__+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_safe_to_define___extensions__=yes else case e in #( e) ac_cv_safe_to_define___extensions__=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5 printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; } if test ${ac_cv_should_define__xopen_source+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_should_define__xopen_source=no if test $ac_cv_header_wchar_h = yes then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include mbstate_t x; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _XOPEN_SOURCE 500 #include mbstate_t x; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_should_define__xopen_source=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5 printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; } printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h printf "%s\n" "#define __STDC_WANT_IEC_60559_EXT__ 1" >>confdefs.h printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h if test $ac_cv_header_minix_config_h = yes then : MINIX=yes printf "%s\n" "#define _MINIX 1" >>confdefs.h printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h else case e in #( e) MINIX= ;; esac fi if test $ac_cv_safe_to_define___extensions__ = yes then : printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h fi if test $ac_cv_should_define__xopen_source = yes then : printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 printf %s "checking for library containing strerror... " >&6; } if test ${ac_cv_search_strerror+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char strerror (void); int main (void) { return strerror (); ; return 0; } _ACEOF for ac_lib in '' cposix do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO" then : ac_cv_search_strerror=$ac_res fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext if test ${ac_cv_search_strerror+y} then : break fi done if test ${ac_cv_search_strerror+y} then : else case e in #( e) ac_cv_search_strerror=no ;; esac fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 printf "%s\n" "$ac_cv_search_strerror" >&6; } ac_res=$ac_cv_search_strerror if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi case `pwd` in *\ * | *\ *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.5.4' macro_revision='2.5.4' ltmain=$ac_aux_dir/ltmain.sh { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 printf %s "checking host system type... " >&6; } if test ${ac_cv_host+y} then : printf %s "(cached) " >&6 else case e in #( e) if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 printf "%s\n" "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 printf %s "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case $ECHO in printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5 printf "%s\n" "printf" >&6; } ;; print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 printf "%s\n" "print -r" >&6; } ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5 printf "%s\n" "cat" >&6; } ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 printf %s "checking for a sed that does not truncate output... " >&6; } if test ${ac_cv_path_SED+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in sed gsed do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in #( *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 printf "%s\n" "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 printf %s "checking for grep that handles long lines and -e... " >&6; } if test ${ac_cv_path_GREP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in grep ggrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in #( *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 printf "%s\n" "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 printf %s "checking for egrep... " >&6; } if test ${ac_cv_path_EGREP+y} then : printf %s "(cached) " >&6 else case e in #( e) if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in egrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in #( *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 printf "%s\n" "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" EGREP_TRADITIONAL=$EGREP ac_cv_path_EGREP_TRADITIONAL=$EGREP { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 printf %s "checking for fgrep... " >&6; } if test ${ac_cv_path_FGREP+y} then : printf %s "(cached) " >&6 else case e in #( e) if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in fgrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in #( *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 printf "%s\n" "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test ${with_gnu_ld+y} then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else case e in #( e) with_gnu_ld=no ;; esac fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 printf %s "checking for ld used by $CC... " >&6; } case $host in *-*-mingw* | *-*-windows*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 printf %s "checking for GNU ld... " >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 printf %s "checking for non-GNU ld... " >&6; } fi if test ${lt_cv_path_LD+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 printf "%s\n" "$LD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 printf %s "checking if the linker ($LD) is GNU ld... " >&6; } if test ${lt_cv_prog_gnu_ld+y} then : printf %s "(cached) " >&6 else case e in #( e) # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if test ${lt_cv_path_NM+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw* | windows*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 printf "%s\n" "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DUMPBIN+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 printf "%s\n" "$DUMPBIN" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DUMPBIN+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 printf "%s\n" "$ac_ct_DUMPBIN" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 printf %s "checking the name lister ($NM) interface... " >&6; } if test ${lt_cv_nm_interface+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 printf "%s\n" "$lt_cv_nm_interface" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 printf %s "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 printf "%s\n" "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 printf %s "checking the maximum length of command line arguments... " >&6; } if test ${lt_cv_sys_max_cmd_len+y} then : printf %s "(cached) " >&6 else case e in #( e) i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu* | ironclad*) # Under GNU Hurd and Ironclad, this test is not required because there # is no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | windows* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ;; esac fi if test -n "$lt_cv_sys_max_cmd_len"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 printf "%s\n" "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 printf %s "checking how to convert $build file names to $host format... " >&6; } if test ${lt_cv_to_host_file_cmd+y} then : printf %s "(cached) " >&6 else case e in #( e) case $host in *-*-mingw* ) case $build in *-*-mingw* | *-*-windows* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* | *-*-windows* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 printf %s "checking how to convert $build file names to toolchain format... " >&6; } if test ${lt_cv_to_tool_file_cmd+y} then : printf %s "(cached) " >&6 else case e in #( e) #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* | *-*-windows* ) case $build in *-*-mingw* | *-*-windows* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 printf %s "checking for $LD option to reload object files... " >&6; } if test ${lt_cv_ld_reload_flag+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_ld_reload_flag='-r' ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 printf "%s\n" "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | windows* | pw32* | cegcc*) if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) if test yes = "$GCC"; then reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac # Extract the first word of "file", so it can be a program name with args. set dummy file; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_FILECMD+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$FILECMD"; then ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_FILECMD="file" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_FILECMD" && ac_cv_prog_FILECMD=":" fi ;; esac fi FILECMD=$ac_cv_prog_FILECMD if test -n "$FILECMD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5 printf "%s\n" "$FILECMD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OBJDUMP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 printf "%s\n" "$OBJDUMP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OBJDUMP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 printf "%s\n" "$ac_ct_OBJDUMP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 printf %s "checking how to recognize dependent libraries... " >&6; } if test ${lt_cv_deplibs_check_method+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='$FILECMD -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | windows* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly* | midnightbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=$FILECMD case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; *-mlibc) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; serenity*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 printf "%s\n" "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | windows* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DLLTOOL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 printf "%s\n" "$DLLTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DLLTOOL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 printf "%s\n" "$ac_ct_DLLTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 printf %s "checking how to associate runtime and link libraries... " >&6; } if test ${lt_cv_sharedlib_from_linklib_cmd+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | windows* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_RANLIB+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 printf "%s\n" "$RANLIB" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_RANLIB+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 printf "%s\n" "$ac_ct_RANLIB" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AR+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi AR=$ac_cv_prog_AR if test -n "$AR"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 printf "%s\n" "$AR" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_AR+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 printf "%s\n" "$ac_ct_AR" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} # Use ARFLAGS variable as AR's operation code to sync the variable naming with # Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have # higher priority because that's what people were doing historically (setting # ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS # variable obsoleted/removed. test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} lt_ar_flags=$AR_FLAGS # Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override # by AR_FLAGS because that was never working and AR_FLAGS is about to die. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 printf %s "checking for archiver @FILE support... " >&6; } if test ${lt_cv_ar_at_file+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 printf "%s\n" "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_STRIP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 printf "%s\n" "$STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_STRIP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 printf "%s\n" "$ac_ct_STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 printf %s "checking command to parse $NM output from $compiler object... " >&6; } if test ${lt_cv_sys_global_symbol_pipe+y} then : printf %s "(cached) " >&6 else case e in #( e) # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | windows* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BCDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw* | windows*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++ or ICC, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(void){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5 if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done ;; esac fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 printf "%s\n" "failed" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5 printf "%s\n" "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 printf %s "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test ${with_sysroot+y} then : withval=$with_sysroot; else case e in #( e) with_sysroot=no ;; esac fi lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then # Trim trailing / since we'll always append absolute paths and we want # to avoid //, if only for less confusing output for the user. lt_sysroot=`$CC --print-sysroot 2>/dev/null | $SED 's:/\+$::'` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 printf "%s\n" "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 printf "%s\n" "${lt_sysroot:-no}" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 printf %s "checking for a working dd... " >&6; } if test ${ac_cv_path_lt_DD+y} then : printf %s "(cached) " >&6 else case e in #( e) printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then ac_path_lt_DD_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in dd do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi $ac_path_lt_DD_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_lt_DD"; then : fi else ac_cv_path_lt_DD=$lt_DD fi rm -f conftest.i conftest2.i conftest.out ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 printf "%s\n" "$ac_cv_path_lt_DD" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 printf %s "checking how to truncate binary pipes... " >&6; } if test ${lt_cv_truncate_bin+y} then : printf %s "(cached) " >&6 else case e in #( e) printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 printf "%s\n" "$lt_cv_truncate_bin" >&6; } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # Check whether --enable-libtool-lock was given. if test ${enable_libtool_lock+y} then : enableval=$enable_libtool_lock; fi test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `$FILECMD conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `$FILECMD conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `$FILECMD conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `$FILECMD conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `$FILECMD conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*|x86_64-gnu*) case `$FILECMD conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*|x86_64-gnu*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 printf %s "checking whether the C compiler needs -belf... " >&6; } if test ${lt_cv_cc_needs_belf+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_cv_cc_needs_belf=yes else case e in #( e) lt_cv_cc_needs_belf=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `$FILECMD conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_MANIFEST_TOOL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 printf "%s\n" "$MANIFEST_TOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if test ${lt_cv_path_manifest_tool+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_path_manifest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_manifest_tool=yes fi rm -f conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_manifest_tool" >&5 printf "%s\n" "$lt_cv_path_manifest_tool" >&6; } if test yes != "$lt_cv_path_manifest_tool"; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DSYMUTIL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 printf "%s\n" "$DSYMUTIL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DSYMUTIL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 printf "%s\n" "$ac_ct_DSYMUTIL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_NMEDIT+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 printf "%s\n" "$NMEDIT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_NMEDIT+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 printf "%s\n" "$ac_ct_NMEDIT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_LIPO+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 printf "%s\n" "$LIPO" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_LIPO+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 printf "%s\n" "$ac_ct_LIPO" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OTOOL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 printf "%s\n" "$OTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OTOOL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 printf "%s\n" "$ac_ct_OTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OTOOL64+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 printf "%s\n" "$OTOOL64" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OTOOL64+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 printf "%s\n" "$ac_ct_OTOOL64" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 printf %s "checking for -single_module linker flag... " >&6; } if test ${lt_cv_apple_cc_single_mod+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; } # Feature test to disable chained fixups since it is not # compatible with '-undefined dynamic_lookup' { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -no_fixup_chains linker flag" >&5 printf %s "checking for -no_fixup_chains linker flag... " >&6; } if test ${lt_cv_support_no_fixup_chains+y} then : printf %s "(cached) " >&6 else case e in #( e) save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_cv_support_no_fixup_chains=yes else case e in #( e) lt_cv_support_no_fixup_chains=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_support_no_fixup_chains" >&5 printf "%s\n" "$lt_cv_support_no_fixup_chains" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 printf %s "checking for -exported_symbols_list linker flag... " >&6; } if test ${lt_cv_ld_exported_symbols_list+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_cv_ld_exported_symbols_list=yes else case e in #( e) lt_cv_ld_exported_symbols_list=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 printf %s "checking for -force_load linker flag... " >&6; } if test ${lt_cv_ld_force_load+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5 $AR $AR_FLAGS libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main(void) { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 printf "%s\n" "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) case $MACOSX_DEPLOYMENT_TARGET,$host in 10.[012],*|,*powerpc*-darwin[5-8]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; *) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' if test yes = "$lt_cv_support_no_fixup_chains"; then as_fn_append _lt_dar_allow_undefined ' $wl-no_fixup_chains' fi ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi _lt_dar_needs_single_mod=no case $host_os in rhapsody* | darwin1.*) _lt_dar_needs_single_mod=yes ;; darwin*) # When targeting Mac OS X 10.4 (darwin 8) or later, # -single_module is the default and -multi_module is unsupported. # The toolchain on macOS 10.14 (darwin 18) and later cannot # target any OS version that needs -single_module. case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*-darwin[567].*|10.[0-3],*-darwin[5-9].*|10.[0-3],*-darwin1[0-7].*) _lt_dar_needs_single_mod=yes ;; esac ;; esac if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes then : printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h fi # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test ${enable_shared+y} then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac else case e in #( e) enable_shared=yes ;; esac fi # Check whether --enable-static was given. if test ${enable_static+y} then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac else case e in #( e) enable_static=yes ;; esac fi # Check whether --enable-pic was given. if test ${enable_pic+y} then : enableval=$enable_pic; lt_p=${PACKAGE-default} case $enableval in yes|no) pic_mode=$enableval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $enableval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac else case e in #( e) # Check whether --with-pic was given. if test ${with_pic+y} then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac else case e in #( e) pic_mode=default ;; esac fi ;; esac fi # Check whether --enable-fast-install was given. if test ${enable_fast_install+y} then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac else case e in #( e) enable_fast_install=yes ;; esac fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 printf %s "checking which variant of shared library versioning to provide... " >&6; } # Check whether --enable-aix-soname was given. if test ${enable_aix_soname+y} then : enableval=$enable_aix_soname; case $enableval in aix|svr4|both) ;; *) as_fn_error $? "Unknown argument to --enable-aix-soname" "$LINENO" 5 ;; esac lt_cv_with_aix_soname=$enable_aix_soname else case e in #( e) # Check whether --with-aix-soname was given. if test ${with_aix_soname+y} then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; *) as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 ;; esac lt_cv_with_aix_soname=$with_aix_soname else case e in #( e) if test ${lt_cv_with_aix_soname+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_with_aix_soname=aix ;; esac fi ;; esac fi enable_aix_soname=$lt_cv_with_aix_soname ;; esac fi with_aix_soname=$enable_aix_soname { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 printf "%s\n" "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 printf %s "checking for objdir... " >&6; } if test ${lt_cv_objdir+y} then : printf %s "(cached) " >&6 else case e in #( e) rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 printf "%s\n" "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC and # ICC, which need '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o func_cc_basename $compiler cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 printf %s "checking for ${ac_tool_prefix}file... " >&6; } if test ${lt_cv_path_MAGIC_CMD+y} then : printf %s "(cached) " >&6 else case e in #( e) case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/${ac_tool_prefix}file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 printf "%s\n" "$MAGIC_CMD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5 printf %s "checking for file... " >&6; } if test ${lt_cv_path_MAGIC_CMD+y} then : printf %s "(cached) " >&6 else case e in #( e) case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 printf "%s\n" "$MAGIC_CMD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(void){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test ${lt_cv_prog_compiler_rtti_exceptions+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi lt_prog_compiler_pic='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; esac ;; mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; *flang* | ftn | f18* | f95*) # Flang compiler. lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # flang / f18. f95 an alias for gfortran or flang on Debian flang* | f18* | f95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | $SED 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *-mlibc) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; serenity*) ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 printf %s "checking for $compiler option to produce PIC... " >&6; } if test ${lt_cv_prog_compiler_pic+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test ${lt_cv_prog_compiler_pic_works+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test ${lt_cv_prog_compiler_static_works+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test ${lt_cv_prog_compiler_c_o+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test ${lt_cv_prog_compiler_c_o+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 printf %s "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 printf "%s\n" "$hard_links" >&6; } if test no = "$hard_links"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | windows* | pw32* | cegcc*) # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++ or Intel C++ Compiler. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) with_gnu_ld=yes ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' export_dynamic_flag_spec='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | windows* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='$wl--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' file_list_spec='@' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=no ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes file_list_spec='@' ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' export_dynamic_flag_spec='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; *-mlibc) archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test no = "$ld_shlibs"; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct=no hardcode_direct_absolute=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if test ${lt_cv_aix_libpath_+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi ;; esac fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if test ${lt_cv_aix_libpath_+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi ;; esac fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' $wl-bernotok' allow_undefined_flag=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | windows* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++ or Intel C++ Compiler. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl* | icl*) # Native MSVC or ICC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -Fe$output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC and ICC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly* | midnightbsd*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test yes = "$GCC"; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 printf %s "checking if $CC understands -b... " >&6; } if test ${lt_cv_prog_compiler__b+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 printf "%s\n" "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if test ${lt_cv_irix_exported_symbol+y} then : printf %s "(cached) " >&6 else case e in #( e) save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_cv_irix_exported_symbol=yes else case e in #( e) lt_cv_irix_exported_symbol=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi link_all_deplibs=no else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' ;; esac ;; *-mlibc) ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' else archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes file_list_spec='@' ;; osf3*) if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; serenity*) ;; solaris*) no_undefined_flag=' -z defs' if test yes = "$GCC"; then wlarc='$wl' archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='$wl-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='$wl-z,text' allow_undefined_flag='$wl-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 printf "%s\n" "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 printf %s "checking whether -lc should be explicitly linked in... " >&6; } if test ${lt_cv_archive_cmds_need_lc+y} then : printf %s "(cached) " >&6 else case e in #( e) $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 printf %s "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | windows* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds # If user builds GCC with multilib enabled, # it should just install on $(libdir) # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones. if test xyes = x"$multilib"; then postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ $install_prog $dir/$dlname $destdir/$dlname~ chmod a+x $destdir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib $destdir/$dlname'\'' || exit \$?; fi' else postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' fi postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | windows* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl* | *,icl*) # Native MSVC or ICC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw* | windows*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC and ICC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly* | midnightbsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac case $host_cpu in powerpc64) # On FreeBSD bi-arch platforms, a different variable is used for 32-bit # binaries. See . cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int test_pointer_size[sizeof (void *) - 5]; _ACEOF if ac_fn_c_try_compile "$LINENO" then : shlibpath_var=LD_LIBRARY_PATH else case e in #( e) shlibpath_var=LD_32_LIBRARY_PATH ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; *) shlibpath_var=LD_LIBRARY_PATH ;; esac case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib' sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib' hardcode_into_libs=no ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # -rpath works at least for libraries that are not overridden by # libraries installed in system locations. hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if test ${lt_cv_shlibpath_overrides_runpath+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir ;; esac fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directories which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; *-mlibc) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='mlibc ld.so' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; serenity*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no dynamic_linker='SerenityOS LibELF' ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; emscripten*) version_type=none need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= dynamic_linker="Emscripten linker" lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi lt_prog_compiler_pic='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; esac ;; mingw* | windows* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; *flang* | ftn | f18* | f95*) # Flang compiler. lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # flang / f18. f95 an alias for gfortran or flang on Debian flang* | f18* | f95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | $SED 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *-mlibc) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; serenity*) ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 printf %s "checking for $compiler option to produce PIC... " >&6; } if test ${lt_cv_prog_compiler_pic+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test ${lt_cv_prog_compiler_pic_works+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test ${lt_cv_prog_compiler_static_works+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= fi ='-fPIC' archive_cmds='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib' archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym' archive_cmds_need_lc=no no_undefined_flag= ;; *) dynamic_linker=no ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 printf "%s\n" "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 printf %s "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 printf "%s\n" "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | windows* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 printf %s "checking for dlopen in -ldl... " >&6; } if test ${ac_cv_lib_dl_dlopen+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char dlopen (void); int main (void) { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dl_dlopen=yes else case e in #( e) ac_cv_lib_dl_dlopen=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else case e in #( e) lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; esac fi ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes then : lt_cv_dlopen=shl_load else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 printf %s "checking for shl_load in -ldld... " >&6; } if test ${ac_cv_lib_dld_shl_load+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char shl_load (void); int main (void) { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dld_shl_load=yes else case e in #( e) ac_cv_lib_dld_shl_load=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else case e in #( e) ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes then : lt_cv_dlopen=dlopen else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 printf %s "checking for dlopen in -ldl... " >&6; } if test ${ac_cv_lib_dl_dlopen+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char dlopen (void); int main (void) { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dl_dlopen=yes else case e in #( e) ac_cv_lib_dl_dlopen=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 printf %s "checking for dlopen in -lsvld... " >&6; } if test ${ac_cv_lib_svld_dlopen+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char dlopen (void); int main (void) { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_svld_dlopen=yes else case e in #( e) ac_cv_lib_svld_dlopen=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 printf %s "checking for dld_link in -ldld... " >&6; } if test ${ac_cv_lib_dld_dld_link+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char dld_link (void); int main (void) { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dld_dld_link=yes else case e in #( e) ac_cv_lib_dld_dld_link=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi ;; esac fi ;; esac fi ;; esac fi ;; esac fi ;; esac fi ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 printf %s "checking whether a program can dlopen itself... " >&6; } if test ${lt_cv_dlopen_self+y} then : printf %s "(cached) " >&6 else case e in #( e) if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord (void) __attribute__((visibility("default"))); #endif int fnord (void) { return 42; } int main (void) { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 printf "%s\n" "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 printf %s "checking whether a statically linked program can dlopen itself... " >&6; } if test ${lt_cv_dlopen_self_static+y} then : printf %s "(cached) " >&6 else case e in #( e) if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord (void) __attribute__((visibility("default"))); #endif int fnord (void) { return 42; } int main (void) { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 printf "%s\n" "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 printf %s "checking whether stripping libraries is possible... " >&6; } if test -z "$STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } else if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then old_striplib="$STRIP --strip-debug" striplib="$STRIP --strip-unneeded" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else case $host_os in darwin*) # FIXME - insert some real tests, host_os isn't really good enough striplib="$STRIP -x" old_striplib="$STRIP -S" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } ;; freebsd*) if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then old_striplib="$STRIP --strip-debug" striplib="$STRIP --strip-unneeded" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ;; esac fi fi # Report what library types will actually be built { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 printf %s "checking if libtool supports shared libraries... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 printf "%s\n" "$can_build_shared" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 printf %s "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 printf "%s\n" "$enable_shared" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 printf %s "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 printf "%s\n" "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC ac_config_commands="$ac_config_commands libtool" # Only expand once: ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. set dummy ${ac_tool_prefix}clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}clang" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "clang", so it can be a program name with args. set dummy clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="clang" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi fi test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See 'config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes else case e in #( e) ac_compiler_gnu=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } ac_compiler_gnu=$ac_cv_c_compiler_gnu if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes else case e in #( e) CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi ac_prog_cc_stdc=no if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c11_program _ACEOF for ac_arg in '' -std=gnu11 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c11=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } CC="$CC $ac_cv_prog_cc_c11" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 ac_prog_cc_stdc=c11 ;; esac fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c99_program _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } CC="$CC $ac_cv_prog_cc_c99" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 ac_prog_cc_stdc=c99 ;; esac fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c89_program _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } CC="$CC $ac_cv_prog_cc_c89" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 ac_prog_cc_stdc=c89 ;; esac fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 printf %s "checking whether $CC understands -c and -o together... " >&6; } if test ${am_cv_prog_cc_c_o+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 printf %s "checking dependency style of $depcc... " >&6; } if test ${am_cv_CC_dependencies_compiler_type+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thus: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 printf %s "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 printf "%s\n" "no, using $LN_S" >&6; } fi # Extract the first word of "mktemp", so it can be a program name with args. set dummy mktemp; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_MKTEMP_PROG+y} then : printf %s "(cached) " >&6 else case e in #( e) case $MKTEMP_PROG in [\\/]* | ?:[\\/]*) ac_cv_path_MKTEMP_PROG="$MKTEMP_PROG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_MKTEMP_PROG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi MKTEMP_PROG=$ac_cv_path_MKTEMP_PROG if test -n "$MKTEMP_PROG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKTEMP_PROG" >&5 printf "%s\n" "$MKTEMP_PROG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "$GCC" = yes; then CFLAGS="-Wall -Wextra -W -pedantic $CFLAGS" fi # Extract the first word of "cstocs", so it can be a program name with args. set dummy cstocs; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_CSTOCS_PROG+y} then : printf %s "(cached) " >&6 else case e in #( e) case $CSTOCS_PROG in [\\/]* | ?:[\\/]*) ac_cv_path_CSTOCS_PROG="$CSTOCS_PROG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_CSTOCS_PROG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi CSTOCS_PROG=$ac_cv_path_CSTOCS_PROG if test -n "$CSTOCS_PROG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CSTOCS_PROG" >&5 printf "%s\n" "$CSTOCS_PROG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi # Extract the first word of "recode", so it can be a program name with args. set dummy recode; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_RECODE_PROG+y} then : printf %s "(cached) " >&6 else case e in #( e) case $RECODE_PROG in [\\/]* | ?:[\\/]*) ac_cv_path_RECODE_PROG="$RECODE_PROG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_RECODE_PROG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi RECODE_PROG=$ac_cv_path_RECODE_PROG if test -n "$RECODE_PROG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RECODE_PROG" >&5 printf "%s\n" "$RECODE_PROG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi # Extract the first word of "umap", so it can be a program name with args. set dummy umap; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_UMAP_PROG+y} then : printf %s "(cached) " >&6 else case e in #( e) case $UMAP_PROG in [\\/]* | ?:[\\/]*) ac_cv_path_UMAP_PROG="$UMAP_PROG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_UMAP_PROG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi UMAP_PROG=$ac_cv_path_UMAP_PROG if test -n "$UMAP_PROG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $UMAP_PROG" >&5 printf "%s\n" "$UMAP_PROG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi # Extract the first word of "piconv", so it can be a program name with args. set dummy piconv; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_PICONV_PROG+y} then : printf %s "(cached) " >&6 else case e in #( e) case $PICONV_PROG in [\\/]* | ?:[\\/]*) ac_cv_path_PICONV_PROG="$PICONV_PROG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_PICONV_PROG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi PICONV_PROG=$ac_cv_path_PICONV_PROG if test -n "$PICONV_PROG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PICONV_PROG" >&5 printf "%s\n" "$PICONV_PROG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi # Extract the first word of "map", so it can be a program name with args. set dummy map; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_MAP_PROG+y} then : printf %s "(cached) " >&6 else case e in #( e) case $MAP_PROG in [\\/]* | ?:[\\/]*) ac_cv_path_MAP_PROG="$MAP_PROG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_MAP_PROG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi MAP_PROG=$ac_cv_path_MAP_PROG if test -n "$MAP_PROG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAP_PROG" >&5 printf "%s\n" "$MAP_PROG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi # Check whether --enable-external was given. if test ${enable_external+y} then : enableval=$enable_external; case "${enableval}" in yes) WANT_EXTERNAL=yes ;; no) WANT_EXTERNAL=no ;; *) as_fn_error $? "bad value ${enableval} for --enable-external" "$LINENO" 5 ;; esac else case e in #( e) WANT_EXTERNAL=yes ;; esac fi # Check whether --with-gcov was given. if test ${with_gcov+y} then : withval=$with_gcov; if test "$GCC" = "yes" then using_gcov=$with_gcov fi fi # Extract the first word of "gcov", so it can be a program name with args. set dummy gcov; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_GCOV+y} then : printf %s "(cached) " >&6 else case e in #( e) case $GCOV in [\\/]* | ?:[\\/]*) ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_GCOV="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi GCOV=$ac_cv_path_GCOV if test -n "$GCOV"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5 printf "%s\n" "$GCOV" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "$GCOV" -a "$using_gcov" = "yes" then GCOV_FLAGS="-fprofile-arcs -ftest-coverage" GCOV_CPPFLAGS=${GCOV_FLAGS} GCOV_LDFLAGS=${GCOV_FLAGS} fi if false; then printf "%s\n" "#define CSTOCS_PROG \"\"" >>confdefs.h printf "%s\n" "#define MAP_PROG \"\"" >>confdefs.h printf "%s\n" "#define RECODE_PROG \"\"" >>confdefs.h printf "%s\n" "#define PICONV_PROG \"\"" >>confdefs.h printf "%s\n" "#define UMAP_PROG \"\"" >>confdefs.h fi for w in cstocs recode piconv map umap; do wPROG=`echo $w | tr $as_cr_letters $as_cr_LETTERS`_PROG # Is this POSIX? But even ash supports it. eval wPROGcv=$`echo ac_cv_path_$wPROG` if test -n "$wPROGcv"; then printf "%s\n" "#define $wPROG \"$wPROGcv\"" >>confdefs.h if test -z "$DEFAULT_EXTERNAL_CONVERTER"; then DEFAULT_EXTERNAL_CONVERTER=$w fi fi done # Check whether --with-html-dir was given. if test ${with_html_dir+y} then : withval=$with_html_dir; fi if test "x$with_html_dir" = "x" ; then HTML_DIR=$datadir/gtk-doc/html else HTML_DIR=$with_html_dir fi # Extract the first word of "gtkdoc-mkdb", so it can be a program name with args. set dummy gtkdoc-mkdb; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_GTKDOC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$GTKDOC"; then ac_cv_prog_GTKDOC="$GTKDOC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_GTKDOC="true" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_GTKDOC" && ac_cv_prog_GTKDOC="false" fi ;; esac fi GTKDOC=$ac_cv_prog_GTKDOC if test -n "$GTKDOC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GTKDOC" >&5 printf "%s\n" "$GTKDOC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi gtk_doc_min_version=1.0 if $GTKDOC ; then gtk_doc_version=`gtkdoc-mkdb --version` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version" >&5 printf %s "checking gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version... " >&6; } if perl <= "$gtk_doc_min_version") ? 0 : 1); EOF { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } GTKDOC=false fi fi # Check whether --enable-gtk-doc was given. if test ${enable_gtk_doc+y} then : enableval=$enable_gtk_doc; enable_gtk_doc="$enableval" else case e in #( e) enable_gtk_doc=auto ;; esac fi if test x$enable_gtk_doc = xauto ; then if test x$GTKDOC = xtrue ; then enable_gtk_doc=yes else enable_gtk_doc=no fi fi if test x$enable_gtk_doc = xyes; then ENABLE_GTK_DOC_TRUE= ENABLE_GTK_DOC_FALSE='#' else ENABLE_GTK_DOC_TRUE='#' ENABLE_GTK_DOC_FALSE= fi case "$target" in NONE) yeti_libm_target="$host" ;; *) yeti_libm_target="$target" ;; esac LIBM= case "$yeti_libm_target" in *-*-beos* | *-*-cygwin*) # These system don't have libm ;; *-ncr-sysv4.3*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5 printf %s "checking for _mwvalidcheckl in -lmw... " >&6; } if test ${ac_cv_lib_mw__mwvalidcheckl+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lmw $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char _mwvalidcheckl (void); int main (void) { return _mwvalidcheckl (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_mw__mwvalidcheckl=yes else case e in #( e) ac_cv_lib_mw__mwvalidcheckl=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5 printf "%s\n" "$ac_cv_lib_mw__mwvalidcheckl" >&6; } if test "x$ac_cv_lib_mw__mwvalidcheckl" = xyes then : LIBM="-lmw" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 printf %s "checking for sqrt in -lm... " >&6; } if test ${ac_cv_lib_m_sqrt+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char sqrt (void); int main (void) { return sqrt (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_m_sqrt=yes else case e in #( e) ac_cv_lib_m_sqrt=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 printf "%s\n" "$ac_cv_lib_m_sqrt" >&6; } if test "x$ac_cv_lib_m_sqrt" = xyes then : LIBM="$LIBM -lm" fi ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 printf %s "checking for sqrt in -lm... " >&6; } if test ${ac_cv_lib_m_sqrt+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char sqrt (void); int main (void) { return sqrt (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_m_sqrt=yes else case e in #( e) ac_cv_lib_m_sqrt=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 printf "%s\n" "$ac_cv_lib_m_sqrt" >&6; } if test "x$ac_cv_lib_m_sqrt" = xyes then : LIBM="-lm" fi ;; esac LIBS="$LIBS $LIBM" # Autoupdate added the next two lines to ensure that your configure # script's behavior did not change. They are probably safe to remove. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 printf %s "checking for egrep... " >&6; } if test ${ac_cv_path_EGREP+y} then : printf %s "(cached) " >&6 else case e in #( e) if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in egrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in #( *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 printf "%s\n" "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" EGREP_TRADITIONAL=$EGREP ac_cv_path_EGREP_TRADITIONAL=$EGREP { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 printf %s "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } if test ${ac_cv_header_sys_wait_h+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main (void) { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_header_sys_wait_h=yes else case e in #( e) ac_cv_header_sys_wait_h=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 printf "%s\n" "$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi # Obsolete code to be removed. if test $ac_cv_header_sys_time_h = yes; then printf "%s\n" "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi # End of obsolete code. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 printf %s "checking whether stat file-mode macros are broken... " >&6; } if test ${ac_cv_header_stat_broken+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if defined S_ISBLK && defined S_IFDIR extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; #endif #if defined S_ISBLK && defined S_IFCHR extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; #endif #if defined S_ISLNK && defined S_IFREG extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; #endif #if defined S_ISSOCK && defined S_IFREG extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_header_stat_broken=no else case e in #( e) ac_cv_header_stat_broken=yes ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 printf "%s\n" "$ac_cv_header_stat_broken" >&6; } if test $ac_cv_header_stat_broken = yes; then printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = xyes then : printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99 or later" >&5 printf %s "checking for stdbool.h that conforms to C99 or later... " >&6; } if test ${ac_cv_header_stdbool_h+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* "true" and "false" should be usable in #if expressions and integer constant expressions, and "bool" should be a valid type name. Although C99 requires bool, true, and false to be macros, C23 and C++11 overrule that, so do not test for that. Although C99 requires __bool_true_false_are_defined and _Bool, C23 says they are obsolescent, so do not require them. */ #if !true #error "'true' is not true" #endif #if true != 1 #error "'true' is not equal to 1" #endif char b[true == 1 ? 1 : -1]; char c[true]; #if false #error "'false' is not false" #endif #if false != 0 #error "'false' is not equal to 0" #endif char d[false == 0 ? 1 : -1]; enum { e = false, f = true, g = false * true, h = true * 256 }; char i[(bool) 0.5 == true ? 1 : -1]; char j[(bool) 0.0 == false ? 1 : -1]; char k[sizeof (bool) > 0 ? 1 : -1]; struct sb { bool s: 1; bool t; } s; char l[sizeof s.t > 0 ? 1 : -1]; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ bool m[h]; char n[sizeof m == h * sizeof m[0] ? 1 : -1]; char o[-1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html */ bool p = true; bool *pp = &p; int main (void) { bool ps = &s; *pp |= p; *pp |= ! p; /* Refer to every declared value, so they cannot be discarded as unused. */ return (!b + !c + !d + !e + !f + !g + !h + !i + !j + !k + !l + !m + !n + !o + !p + !pp + !ps); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_header_stdbool_h=yes else case e in #( e) ac_cv_header_stdbool_h=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 printf "%s\n" "$ac_cv_header_stdbool_h" >&6; } if test $ac_cv_header_stdbool_h = yes; then printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" if test "x$ac_cv_header_errno_h" = xyes then : printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" if test "x$ac_cv_header_fcntl_h" = xyes then : printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" if test "x$ac_cv_header_getopt_h" = xyes then : printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default" if test "x$ac_cv_header_langinfo_h" = xyes then : printf "%s\n" "#define HAVE_LANGINFO_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" if test "x$ac_cv_header_limits_h" = xyes then : printf "%s\n" "#define HAVE_LIMITS_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" if test "x$ac_cv_header_locale_h" = xyes then : printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "memory.h" "ac_cv_header_memory_h" "$ac_includes_default" if test "x$ac_cv_header_memory_h" = xyes then : printf "%s\n" "#define HAVE_MEMORY_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" if test "x$ac_cv_header_string_h" = xyes then : printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default" if test "x$ac_cv_header_strings_h" = xyes then : printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default" if test "x$ac_cv_header_sys_stat_h" = xyes then : printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default" if test "x$ac_cv_header_sys_types_h" = xyes then : printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default" if test "x$ac_cv_header_sys_wait_h" = xyes then : printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" if test "x$ac_cv_header_sys_time_h" = xyes then : printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default" if test "x$ac_cv_header_time_h" = xyes then : printf "%s\n" "#define HAVE_TIME_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" if test "x$ac_cv_header_unistd_h" = xyes then : printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "wordexp.h" "ac_cv_header_wordexp_h" "$ac_includes_default" if test "x$ac_cv_header_wordexp_h" = xyes then : printf "%s\n" "#define HAVE_WORDEXP_H 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 printf %s "checking for an ANSI C-conforming const... " >&6; } if test ${ac_cv_c_const+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* IBM XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_const=yes else case e in #( e) ac_cv_c_const=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 printf "%s\n" "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then printf "%s\n" "#define const /**/" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes then : else case e in #( e) printf "%s\n" "#define size_t unsigned int" >>confdefs.h ;; esac fi ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" if test "x$ac_cv_type_mode_t" = xyes then : else case e in #( e) printf "%s\n" "#define mode_t int" >>confdefs.h ;; esac fi ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" if test "x$ac_cv_type_off_t" = xyes then : else case e in #( e) printf "%s\n" "#define off_t long int" >>confdefs.h ;; esac fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default " if test "x$ac_cv_type_pid_t" = xyes then : else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined _WIN64 && !defined __CYGWIN__ LLP64 #endif int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_pid_type='int' else case e in #( e) ac_pid_type='__int64' ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h ;; esac fi ac_fn_c_check_type "$LINENO" "uid_t" "ac_cv_type_uid_t" "$ac_includes_default" if test "x$ac_cv_type_uid_t" = xyes then : else case e in #( e) printf "%s\n" "#define uid_t int" >>confdefs.h ;; esac fi ac_fn_c_check_type "$LINENO" "gid_t" "ac_cv_type_gid_t" "$ac_includes_default" if test "x$ac_cv_type_gid_t" = xyes then : else case e in #( e) printf "%s\n" "#define gid_t int" >>confdefs.h ;; esac fi ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" if test "x$ac_cv_type_ssize_t" = xyes then : else case e in #( e) printf "%s\n" "#define ssize_t int" >>confdefs.h ;; esac fi # FIXME: This is crude. It seems to work on Linux, though. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; } if test ${ac_cv_c_undeclared_builtin_options+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_save_CFLAGS=$CFLAGS ac_cv_c_undeclared_builtin_options='cannot detect' for ac_arg in '' -fno-builtin; do CFLAGS="$ac_save_CFLAGS $ac_arg" # This test program should *not* compile successfully. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { (void) strchr; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) # This test program should compile successfully. # No library function is consistently available on # freestanding implementations, so test against a dummy # declaration. Include always-available headers on the # off chance that they somehow elicit warnings. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include extern void ac_decl (int, char *); int main (void) { (void) ac_decl (0, (char *) 0); (void) ac_decl; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : if test x"$ac_arg" = x then : ac_cv_c_undeclared_builtin_options='none needed' else case e in #( e) ac_cv_c_undeclared_builtin_options=$ac_arg ;; esac fi break fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CFLAGS=$ac_save_CFLAGS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } case $ac_cv_c_undeclared_builtin_options in #( 'cannot detect') : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot make $CC report undeclared builtins See 'config.log' for more details" "$LINENO" 5; } ;; #( 'none needed') : ac_c_undeclared_builtin_options='' ;; #( *) : ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;; esac ac_fn_check_decl "$LINENO" "LC_MESSAGES" "ac_cv_have_decl_LC_MESSAGES" "#include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_LC_MESSAGES" = xyes then : ac_have_decl=1 else case e in #( e) ac_have_decl=0 ;; esac fi printf "%s\n" "#define HAVE_DECL_LC_MESSAGES $ac_have_decl" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for program_invocation_short_name" >&5 printf %s "checking for program_invocation_short_name... " >&6; } if test ${yeti_cv_lib_c_program_invocation_short_name+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { if (!program_invocation_short_name) return 1; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : yeti_cv_lib_c_program_invocation_short_name=yes else case e in #( e) yeti_cv_lib_c_program_invocation_short_name=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $yeti_cv_lib_c_program_invocation_short_name" >&5 printf "%s\n" "$yeti_cv_lib_c_program_invocation_short_name" >&6; } if test "$yeti_cv_lib_c_program_invocation_short_name" = yes; then printf "%s\n" "#define HAVE_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h fi ac_func= for ac_item in $ac_func_c_list do if test $ac_func; then ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then echo "#define $ac_item 1" >> confdefs.h fi ac_func= else ac_func=$ac_item fi done if test "x$ac_cv_func_fork" = xyes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 printf %s "checking for working fork... " >&6; } if test ${ac_cv_func_fork_works+y} then : printf %s "(cached) " >&6 else case e in #( e) if test "$cross_compiling" = yes then : ac_cv_func_fork_works=cross else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main (void) { /* By R. Kuhlmann. */ return fork () < 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_fork_works=yes else case e in #( e) ac_cv_func_fork_works=no ;; esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 printf "%s\n" "$ac_cv_func_fork_works" >&6; } else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 printf %s "checking for working vfork... " >&6; } if test ${ac_cv_func_vfork_works+y} then : printf %s "(cached) " >&6 else case e in #( e) if test "$cross_compiling" = yes then : ac_cv_func_vfork_works=cross else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include #include #ifdef HAVE_VFORK_H # include #endif static void do_nothing (int sig) { (void) sig; } /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void sparc_address_test (int arg) { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main (void) { pid_t parent = getpid (); pid_t child; sparc_address_test (0); /* On Solaris 2.4, changes by the child to the signal handler also munge signal handlers in the parent. To detect this, start by putting the parent's handler in a known state. */ signal (SIGTERM, SIG_DFL); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* Alter the child's signal handler. */ if (signal (SIGTERM, do_nothing) != SIG_DFL) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; return ( /* Was there some problem with vforking? */ child < 0 /* Did the child munge the parent's signal handler? */ || signal (SIGTERM, SIG_DFL) != SIG_DFL /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_vfork_works=yes else case e in #( e) ac_cv_func_vfork_works=no ;; esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 printf "%s\n" "$ac_cv_func_vfork_works" >&6; } fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h else printf "%s\n" "#define vfork fork" >>confdefs.h fi if test "x$ac_cv_func_fork_works" = xyes; then printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate" if test "x$ac_cv_func_ftruncate" = xyes then : printf "%s\n" "#define HAVE_FTRUNCATE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" if test "x$ac_cv_func_gettimeofday" = xyes then : printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "isatty" "ac_cv_func_isatty" if test "x$ac_cv_func_isatty" = xyes then : printf "%s\n" "#define HAVE_ISATTY 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo" if test "x$ac_cv_func_nl_langinfo" = xyes then : printf "%s\n" "#define HAVE_NL_LANGINFO 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random" if test "x$ac_cv_func_random" = xyes then : printf "%s\n" "#define HAVE_RANDOM 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "realpath" "ac_cv_func_realpath" if test "x$ac_cv_func_realpath" = xyes then : printf "%s\n" "#define HAVE_REALPATH 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr" if test "x$ac_cv_func_strstr" = xyes then : printf "%s\n" "#define HAVE_STRSTR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy" if test "x$ac_cv_func_stpcpy" = xyes then : printf "%s\n" "#define HAVE_STPCPY 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" if test "x$ac_cv_func_setlocale" = xyes then : printf "%s\n" "#define HAVE_SETLOCALE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "ttyname" "ac_cv_func_ttyname" if test "x$ac_cv_func_ttyname" = xyes then : printf "%s\n" "#define HAVE_TTYNAME 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "wordexp" "ac_cv_func_wordexp" if test "x$ac_cv_func_wordexp" = xyes then : printf "%s\n" "#define HAVE_WORDEXP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long" if test "x$ac_cv_func_getopt_long" = xyes then : printf "%s\n" "#define HAVE_GETOPT_LONG 1" >>confdefs.h else case e in #( e) case " $LIBOBJS " in *" getopt_long.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext" ;; esac ;; esac fi CONVERTER_LIBS= if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_saved_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_saved_prefix" # Check whether --with-gnu-ld was given. if test ${with_gnu_ld+y} then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else case e in #( e) with_gnu_ld=no ;; esac fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi if test -n "$LD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5 printf %s "checking for ld... " >&6; } elif test "$GCC" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 printf %s "checking for ld used by $CC... " >&6; } elif test "$with_gnu_ld" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 printf %s "checking for GNU ld... " >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 printf %s "checking for non-GNU ld... " >&6; } fi if test -n "$LD"; then # Let the user override the test with a path. : else if test ${acl_cv_path_LD+y} then : printf %s "(cached) " >&6 else case e in #( e) acl_cv_path_LD= # Final result of this test ac_prog=ld # Program to search in $PATH if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. case $host in *-*-mingw* | windows*) # gcc leaves a trailing carriage return which upsets mingw acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) acl_output=`($CC -print-prog-name=ld) 2>&5` ;; esac case $acl_output in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` done # Got the pathname. No search in PATH is needed. acl_cv_path_LD="$acl_output" ac_prog= ;; "") # If it fails, then pretend we aren't using GCC. ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac fi if test -n "$ac_prog"; then # Search for $ac_prog in $PATH. acl_saved_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$acl_saved_IFS" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 conftest.$ac_ext /* end confdefs.h. */ #if defined __powerpc64__ || defined __LP64__ int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : # The compiler produces 64-bit code. Add option '-b64' so that the # linker groks 64-bit object files. case "$acl_cv_path_LD " in *" -b64 "*) ;; *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; sparc64-*-netbsd*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __sparcv9 || defined __arch64__ int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) # The compiler produces 32-bit code. Add option '-m elf32_sparc' # so that the linker groks 32-bit object files. case "$acl_cv_path_LD " in *" -m elf32_sparc "*) ;; *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;; esac ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac ;; esac fi LD="$acl_cv_path_LD" fi if test -n "$LD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 printf "%s\n" "$LD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 printf %s "checking if the linker ($LD) is GNU ld... " >&6; } if test ${acl_cv_prog_gnu_ld+y} then : printf %s "(cached) " >&6 else case e in #( e) # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 printf %s "checking for shared library run path origin... " >&6; } if test ${acl_cv_rpath+y} then : printf %s "(cached) " >&6 else case e in #( e) CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 printf "%s\n" "$acl_cv_rpath" >&6; } wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. if test ${enable_rpath+y} then : enableval=$enable_rpath; : else case e in #( e) enable_rpath=yes ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5 printf %s "checking 32-bit host C ABI... " >&6; } if test ${gl_cv_host_cpu_c_abi_32bit+y} then : printf %s "(cached) " >&6 else case e in #( e) case "$host_cpu" in # CPUs that only support a 32-bit ABI. arc \ | bfin \ | cris* \ | csky \ | epiphany \ | ft32 \ | h8300 \ | m68k \ | microblaze | microblazeel \ | nds32 | nds32le | nds32be \ | nios2 | nios2eb | nios2el \ | or1k* \ | or32 \ | sh | sh1234 | sh1234elb \ | tic6x \ | xtensa* ) gl_cv_host_cpu_c_abi_32bit=yes ;; # CPUs that only support a 64-bit ABI. alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \ | mmix ) gl_cv_host_cpu_c_abi_32bit=no ;; *) if test -n "$gl_cv_host_cpu_c_abi"; then case "$gl_cv_host_cpu_c_abi" in i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc) gl_cv_host_cpu_c_abi_32bit=yes ;; x86_64 | alpha | arm64 | aarch64c | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 ) gl_cv_host_cpu_c_abi_32bit=no ;; *) gl_cv_host_cpu_c_abi_32bit=unknown ;; esac else gl_cv_host_cpu_c_abi_32bit=unknown fi if test $gl_cv_host_cpu_c_abi_32bit = unknown; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int test_pointer_size[sizeof (void *) - 5]; _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=no else case e in #( e) gl_cv_host_cpu_c_abi_32bit=yes ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi ;; esac ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5 printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; } HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep -e" >&5 printf %s "checking for egrep -e... " >&6; } if test ${ac_cv_path_EGREP_TRADITIONAL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -z "$EGREP_TRADITIONAL"; then ac_path_EGREP_TRADITIONAL_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in grep ggrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue # Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found. # Check for GNU $ac_path_EGREP_TRADITIONAL case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #( *GNU*) ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl" "$ac_path_EGREP_TRADITIONAL" -E 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_TRADITIONAL_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then : fi else ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL fi if test "$ac_cv_path_EGREP_TRADITIONAL" then : ac_cv_path_EGREP_TRADITIONAL="$ac_cv_path_EGREP_TRADITIONAL -E" else case e in #( e) if test -z "$EGREP_TRADITIONAL"; then ac_path_EGREP_TRADITIONAL_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in egrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue # Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found. # Check for GNU $ac_path_EGREP_TRADITIONAL case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #( *GNU*) ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl" "$ac_path_EGREP_TRADITIONAL" 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_TRADITIONAL_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL fi ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP_TRADITIONAL" >&5 printf "%s\n" "$ac_cv_path_EGREP_TRADITIONAL" >&6; } EGREP_TRADITIONAL=$ac_cv_path_EGREP_TRADITIONAL { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ELF binary format" >&5 printf %s "checking for ELF binary format... " >&6; } if test ${gl_cv_elf+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __ELF__ || (defined __linux__ && (defined __EDG__ || defined __SUNPRO_C)) Extensible Linking Format #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP_TRADITIONAL "Extensible Linking Format" >/dev/null 2>&1 then : gl_cv_elf=yes else case e in #( e) gl_cv_elf=no ;; esac fi rm -rf conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_elf" >&5 printf "%s\n" "$gl_cv_elf" >&6; } if test $gl_cv_elf = yes; then # Extract the ELF class of a file (5th byte) in decimal. # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header if od -A x < /dev/null >/dev/null 2>/dev/null; then # Use POSIX od. func_elfclass () { od -A n -t d1 -j 4 -N 1 } else # Use BSD hexdump. func_elfclass () { dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "' echo } fi # Use 'expr', not 'test', to compare the values of func_elfclass, because on # Solaris 11 OpenIndiana and Solaris 11 OmniOS, the result is 001 or 002, # not 1 or 2. case $HOST_CPU_C_ABI_32BIT in yes) # 32-bit ABI. acl_is_expected_elfclass () { expr "`func_elfclass | sed -e 's/[ ]//g'`" = 1 > /dev/null } ;; no) # 64-bit ABI. acl_is_expected_elfclass () { expr "`func_elfclass | sed -e 's/[ ]//g'`" = 2 > /dev/null } ;; *) # Unknown. acl_is_expected_elfclass () { : } ;; esac else acl_is_expected_elfclass () { : } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5 printf %s "checking for the common suffixes of directories in the library search path... " >&6; } if test ${acl_cv_libdirstems+y} then : printf %s "(cached) " >&6 else case e in #( e) acl_libdirstem=lib acl_libdirstem2= acl_libdirstem3= case "$host_os" in solaris*) if test $HOST_CPU_C_ABI_32BIT = no; then acl_libdirstem2=lib/64 case "$host_cpu" in sparc*) acl_libdirstem3=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem3=lib/amd64 ;; esac fi ;; netbsd*) if test $HOST_CPU_C_ABI_32BIT != no; then case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparc ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \ | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test $HOST_CPU_C_ABI_32BIT != no; then # 32-bit or unknown ABI. if test -d /usr/lib32; then acl_libdirstem2=lib32 fi fi if test $HOST_CPU_C_ABI_32BIT != yes; then # 64-bit or unknown ABI. if test -d /usr/lib64; then acl_libdirstem3=lib64 fi fi if test -n "$searchpath"; then acl_saved_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;; */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib32 ) acl_libdirstem2=lib32 ;; */lib64 ) acl_libdirstem3=lib64 ;; esac ;; esac fi done IFS="$acl_saved_IFS" if test $HOST_CPU_C_ABI_32BIT = yes; then # 32-bit ABI. acl_libdirstem3= fi if test $HOST_CPU_C_ABI_32BIT = no; then # 64-bit ABI. acl_libdirstem2= fi fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem" acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3" ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5 printf "%s\n" "$acl_cv_libdirstems" >&6; } acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'` acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'` use_additional=yes acl_saved_prefix="$prefix" prefix="$acl_final_prefix" acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" exec_prefix="$acl_saved_exec_prefix" prefix="$acl_saved_prefix" # Check whether --with-libiconv-prefix was given. if test ${with_libiconv_prefix+y} then : withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_saved_prefix="$prefix" prefix="$acl_final_prefix" acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" exec_prefix="$acl_saved_exec_prefix" prefix="$acl_saved_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" additional_libdir2="$withval/$acl_libdirstem2" additional_libdir3="$withval/$acl_libdirstem3" fi fi fi if test "X$additional_libdir2" = "X$additional_libdir"; then additional_libdir2= fi if test "X$additional_libdir3" = "X$additional_libdir"; then additional_libdir3= fi LIBICONV= LTLIBICONV= INCICONV= LIBICONV_PREFIX= HAVE_LIBICONV= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='iconv ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do if test "X$found_dir" = "X"; then eval dir=\$$additional_libdir_variable if test -n "$dir"; then if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi fi done fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do acl_saved_prefix="$prefix" prefix="$acl_final_prefix" acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_saved_exec_prefix" prefix="$acl_saved_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2" \ || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBICONV; do acl_saved_prefix="$prefix" prefix="$acl_final_prefix" acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_saved_exec_prefix" prefix="$acl_saved_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" else LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem3 | */$acl_libdirstem3/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do acl_saved_prefix="$prefix" prefix="$acl_final_prefix" acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_saved_exec_prefix" prefix="$acl_saved_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then saved_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$saved_libdir" for dep in $dependency_libs; do case "$dep" in -L*) dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then haveit= if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBICONV; do acl_saved_prefix="$prefix" prefix="$acl_final_prefix" acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_saved_exec_prefix" prefix="$acl_saved_prefix" if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$dependency_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$dependency_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBICONV; do acl_saved_prefix="$prefix" prefix="$acl_final_prefix" acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_saved_exec_prefix" prefix="$acl_saved_prefix" if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$dependency_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$dependency_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dep=`echo "X$dep" | sed -e 's/^X-l//'` if test "X$dep" != Xc \ || case $host_os in linux* | gnu* | k*bsd*-gnu) false ;; *) true ;; esac; then names_next_round="$names_next_round $dep" fi ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ;; esac done fi else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_saved_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_saved_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_saved_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_saved_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" done fi gl_saved_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_saved_prefix="$prefix" prefix="$acl_final_prefix" acl_saved_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_saved_exec_prefix" prefix="$acl_saved_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 printf %s "checking for iconv... " >&6; } if test ${am_cv_func_iconv+y} then : printf %s "(cached) " >&6 else case e in #( e) am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then gl_saved_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : am_cv_lib_iconv=yes am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$gl_saved_LIBS" fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 printf "%s\n" "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 printf %s "checking for working iconv... " >&6; } if test ${am_cv_func_iconv_works+y} then : printf %s "(cached) " >&6 else case e in #( e) gl_saved_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi am_cv_func_iconv_works=no for ac_iconv_const in '' 'const'; do if test "$cross_compiling" = yes then : case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef ICONV_CONST # define ICONV_CONST $ac_iconv_const #endif int main (void) { int result = 0; /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from successful returns. This is even documented in */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; iconv_close (cd_utf8_to_88591); } } /* Test against macOS 14.4 bug: Failures are not distinguishable from successful returns. POSIX:2018 says: "The iconv() function shall ... return the number of non-identical conversions performed." But here, the conversion always does transliteration (the suffixes "//TRANSLIT" and "//IGNORE" have no effect, nor does iconvctl()) and does not report when it does a non-identical conversion. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO-8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\305\202"; /* LATIN SMALL LETTER L WITH STROKE */ char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); /* Here: With glibc, GNU libiconv (including macOS up to 13): res == (size_t)-1, errno == EILSEQ. With musl libc, NetBSD 10, Solaris 11: res == 1. With macOS 14.4: res == 0, output is "l". */ if (res == 0) result |= 2; iconv_close (cd_utf8_to_88591); } } /* Test against Solaris 10 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\263"; char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 4; iconv_close (cd_ascii_to_88591); } } /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ { iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; ICONV_CONST char *inptr = input; size_t inbytesleft = 1; char *outptr = buf; size_t outbytesleft = 1; size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 8; iconv_close (cd_88591_to_utf8); } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 16; iconv_close (cd_88591_to_utf8); } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ { /* Try standardized names. */ iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); /* Try IRIX, OSF/1 names. */ iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); /* Try AIX names. */ iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); /* Try HP-UX names. */ iconv_t cd4 = iconv_open ("utf8", "eucJP"); if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) result |= 32; if (cd1 != (iconv_t)(-1)) iconv_close (cd1); if (cd2 != (iconv_t)(-1)) iconv_close (cd2); if (cd3 != (iconv_t)(-1)) iconv_close (cd3); if (cd4 != (iconv_t)(-1)) iconv_close (cd4); } return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : am_cv_func_iconv_works=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi test "$am_cv_func_iconv_works" = no || break done LIBS="$gl_saved_LIBS" ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 printf "%s\n" "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 printf %s "checking how to link with libiconv... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 printf "%s\n" "$LIBICONV" >&6; } else CPPFLAGS="$gl_saved_CPPFLAGS" LIBICONV= LTLIBICONV= fi if test "$am_cv_func_iconv" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iconv is compatible with its POSIX signature" >&5 printf %s "checking whether iconv is compatible with its POSIX signature... " >&6; } if test ${gl_cv_iconv_nonconst+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include extern #ifdef __cplusplus "C" #endif size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_iconv_nonconst=yes else case e in #( e) gl_cv_iconv_nonconst=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_iconv_nonconst" >&5 printf "%s\n" "$gl_cv_iconv_nonconst" >&6; } else gl_cv_iconv_nonconst=yes fi if test $gl_cv_iconv_nonconst = yes; then iconv_arg1="" else iconv_arg1="const" fi printf "%s\n" "#define ICONV_CONST $iconv_arg1" >>confdefs.h if test "$am_func_iconv" = yes; then if test -n "$LIBICONV"; then am_cv_func_iconv_summary='yes, in libiconv' else am_cv_func_iconv_summary='yes, in libc' fi else if test "$am_cv_func_iconv" = yes; then am_cv_func_iconv_summary='not working, consider installing GNU libiconv' else am_cv_func_iconv_summary='no, consider installing GNU libiconv' fi fi # ---------------------------------------------------------------------------- # Option handling for libiconv (UNIX98 iconv interface) # New (preferred) interface: --with-libiconv[=DIR] / --without-libiconv # Backwards compatible (deprecated) interface: --with-iconv[=DIR] / --without-iconv # DIR, when provided, adds DIR/include to CPPFLAGS and DIR/lib to LDFLAGS. # ---------------------------------------------------------------------------- # This is the default configure option to enable or disable libiconv with enca. # Check whether --with-libiconv was given. if test ${with_libiconv+y} then : withval=$with_libiconv; case "$withval" in yes|auto) WANT_LIBICONV=1 ;; no) WANT_LIBICONV=0 ;; *) WANT_LIBICONV=1 ; yeti_libiconv_CPPFLAGS="-I$withval/include" ; yeti_libiconv_LDFLAGS="-L$withval/lib" ; yeti_libiconv_LD_LIBRARY_PATH="$withval/lib" ;; esac WANT_LIBICONV_SET=1 else case e in #( e) WANT_LIBICONV=1 ;; esac fi if test "$WANT_LIBICONV" = 1; then # This will override the behaviour of standard libiconv-prefix provided by the gettext iconv.m4 # libiconv-prefix is always added in option when AM_ICONV is used, and the default implementation # does not work to use a custom path for the library for enca. # Check whether --with-libiconv-prefix was given. if test ${with_libiconv_prefix+y} then : withval=$with_libiconv_prefix; case "$withval" in yes) WANT_LIBICONV=1 ;; no) WANT_LIBICONV=0 ;; *) WANT_LIBICONV=1 ; yeti_libiconv_CPPFLAGS="-I$withval/include" ; yeti_libiconv_LDFLAGS="-L$withval/lib" ; yeti_libiconv_LD_LIBRARY_PATH="$withval/lib" ;; esac WANT_LIBICONV_SET=1 else case e in #( e) WANT_LIBICONV=1 ;; esac fi fi if test "$WANT_LIBICONV" = 1; then # Apply custom include/lib dirs if requested before detection. if test -n "$yeti_libiconv_CPPFLAGS"; then CPPFLAGS="$CPPFLAGS $yeti_libiconv_CPPFLAGS" fi if test -n "$yeti_libiconv_LDFLAGS"; then LDFLAGS="$LDFLAGS $yeti_libiconv_LDFLAGS" fi if test -n "$yeti_libiconv_LD_LIBRARY_PATH"; then LIBICONV="-liconv" LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$yeti_libiconv_LD_LIBRARY_PATH" fi CONVERTER_LIBS="$CONVERTER_LIBS $LIBICONV" libiconv_ok="$am_cv_func_iconv" if test "$libiconv_ok" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iconv implementation is usable" >&5 printf %s "checking whether iconv implementation is usable... " >&6; } if $CC -o iconvcap$ac_exeext $CPPFLAGS $CPPFLAGS $LDFLAGS $srcdir/iconvcap.c $LIBS $CONVERTER_LIBS 1>&5 2>&5 && test -s ./iconvcap$ac_exeext 2>&5; then if LD_LIBRARY_PATH=$LD_LIBRARY_PATH ./iconvcap 2>&5 >iconvenc.h; then libiconv_ok=yes else libiconv_ok=no fi else libiconv_ok=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libiconv_ok" >&5 printf "%s\n" "$libiconv_ok" >&6; } if test "$libiconv_ok" = yes; then printf "%s\n" "#define HAVE_GOOD_ICONV 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iconv is transitive" >&5 printf %s "checking whether iconv is transitive... " >&6; } if test ${yeti_cv_lib_c_iconv_transitive+y} then : printf %s "(cached) " >&6 else case e in #( e) if ./iconvcap iconvenc.h 2>&5; then yeti_cv_lib_c_iconv_transitive=yes else yeti_cv_lib_c_iconv_transitive=no fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $yeti_cv_lib_c_iconv_transitive" >&5 printf "%s\n" "$yeti_cv_lib_c_iconv_transitive" >&6; } if test "$yeti_cv_lib_c_iconv_transitive" = yes; then printf "%s\n" "#define ICONV_IS_TRANSITIVE 1" >>confdefs.h else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: A non-transitive but otherwise usable iconv implementation was found. This beast was believed to be mythical. Please send your system specs to the maintainer." >&5 printf "%s\n" "$as_me: WARNING: A non-transitive but otherwise usable iconv implementation was found. This beast was believed to be mythical. Please send your system specs to the maintainer." >&2;} fi else echo >iconvenc.h fi else libiconv_ok=no fi else libiconv_ok=no fi if test "$libiconv_ok" != "yes"; then cat $srcdir/tools/iconvenc.null >iconvenc.h fi # Check whether --with-librecode was given. if test ${with_librecode+y} then : withval=$with_librecode; case "$withval" in yes|auto) WANT_LIBRECODE=1 ;; no) WANT_LIBRECODE=0 ;; *) WANT_LIBRECODE=1 ; yeti_librecode_CPPFLAGS="-I$withval/include" ; yeti_librecode_LDFLAGS="-L$withval/lib" ;; esac else case e in #( e) WANT_LIBRECODE=1 ;; esac fi if test "$WANT_LIBRECODE" = 1; then yeti_save_LIBS="$LIBS" yeti_save_CPPFLAGS="$CPPFLAGS" yeti_save_LDFLAGS="$LDFLAGS" LIBS="$LIBS -lrecode" CPPFLAGS="$CPPFLAGS $yeti_librecode_CPPFLAGS" LDFLAGS="$LDFLAGS $yeti_librecode_LDFLAGS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for recode_new_outer in librecode" >&5 printf %s "checking for recode_new_outer in librecode... " >&6; } if test ${yeti_cv_lib_recode_new_outer+y} then : printf %s "(cached) " >&6 else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for recode_new_outer in -lrecode" >&5 printf %s "checking for recode_new_outer in -lrecode... " >&6; } if test ${ac_cv_lib_recode_recode_new_outer+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lrecode $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char recode_new_outer (void); int main (void) { return recode_new_outer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_recode_recode_new_outer=yes else case e in #( e) ac_cv_lib_recode_recode_new_outer=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_recode_recode_new_outer" >&5 printf "%s\n" "$ac_cv_lib_recode_recode_new_outer" >&6; } if test "x$ac_cv_lib_recode_recode_new_outer" = xyes then : yeti_cv_lib_recode_new_outer=yes else case e in #( e) yeti_cv_lib_recode_new_outer=no ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $yeti_cv_lib_recode_new_outer" >&5 printf "%s\n" "$yeti_cv_lib_recode_new_outer" >&6; } librecode_ok="$yeti_cv_lib_recode_new_outer"; if test "$librecode_ok" = yes; then ac_fn_c_check_header_compile "$LINENO" "recode.h" "ac_cv_header_recode_h" "#define bool int #define size_t int #define FILE void " if test "x$ac_cv_header_recode_h" = xyes then : librecode_ok=yes else case e in #( e) librecode_ok=no ;; esac fi fi if test "$librecode_ok" = yes; then ac_fn_c_check_header_compile "$LINENO" "recodext.h" "ac_cv_header_recodext_h" "#define bool int #define size_t int #define FILE void " if test "x$ac_cv_header_recodext_h" = xyes then : librecode_ok=yes else case e in #( e) librecode_ok=no ;; esac fi fi if test "$librecode_ok" = yes; then printf "%s\n" "#define HAVE_LIBRECODE 1" >>confdefs.h CONVERTER_LIBS="$CONVERTER_LIBS -lrecode" fi LIBS="$yeti_save_LIBS" else librecode_ok=no fi if test "$librecode_ok" != "yes"; then if test "$WANT_LIBRECODE" = 1; then CPPFLAGS="$yeti_save_CPPFLAGS" LDFLAGS="$yeti_save_LDFLAGS" fi fi DEFAULT_CONVERTER_LIST="built-in" if test "$librecode_ok" = "yes"; then DEFAULT_CONVERTER_LIST="$DEFAULT_CONVERTER_LIST,librecode" else if test "$libiconv_ok" = "yes"; then DEFAULT_CONVERTER_LIST="$DEFAULT_CONVERTER_LIST,iconv" fi fi printf "%s\n" "#define DEFAULT_CONVERTER_LIST \"$DEFAULT_CONVERTER_LIST\"" >>confdefs.h if test "$WANT_EXTERNAL" = "yes" -a "$ac_cv_func_fork_works" = "yes"; then printf "%s\n" "#define ENABLE_EXTERNAL 1" >>confdefs.h if test -n "$DEFAULT_EXTERNAL_CONVERTER"; then enable_external="yes ($DEFAULT_EXTERNAL_CONVERTER)" else enable_external="yes (but no suitable found)" fi else enable_external=no DEFAULT_EXTERNAL_CONVERTER= fi printf "%s\n" "#define DEFAULT_EXTERNAL_CONVERTER \"$DEFAULT_EXTERNAL_CONVERTER\"" >>confdefs.h locale_alias_ok=no if test "$ac_cv_func_setlocale" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for locale.alias" >&5 printf %s "checking for locale.alias... " >&6; } if test ${yeti_cv_file_locale_alias+y} then : printf %s "(cached) " >&6 else case e in #( e) for yeti_ac_tmp in /usr/share/locale /usr/local/share/locale /etc /usr/lib/X11/locale /usr/X11/lib/locale; do if test -f "$yeti_ac_tmp/locale.alias"; then yeti_cv_file_locale_alias="$yeti_ac_tmp/locale.alias" break fi if test -f "$yeti_ac_tmp/locale.aliases"; then yeti_cv_file_locale_alias="$yeti_ac_tmp/locale.aliases" break fi done ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $yeti_cv_file_locale_alias" >&5 printf "%s\n" "$yeti_cv_file_locale_alias" >&6; } if test -n "$yeti_cv_file_locale_alias"; then locale_alias_ok=yes printf "%s\n" "#define HAVE_LOCALE_ALIAS 1" >>confdefs.h printf "%s\n" "#define LOCALE_ALIAS_PATH \"$yeti_cv_file_locale_alias\"" >>confdefs.h fi fi if test -n "$MKTEMP_PROG"; then SHELL_RANDOM_FILENAME='`'$MKTEMP_PROG' /tmp/enca-$$-XXXXXXXX`' else SHELL_RANDOM_FILENAME='/tmp/enca-$$-$RANDOM' fi cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # 'ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* 'ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # 'set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # 'set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 printf %s "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 printf "%s\n" "done" >&6; } case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; esac if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then as_fn_error $? "conditional \"ENABLE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case e in #( e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac ;; esac fi # Reset variables that may have inherited troublesome values from # the environment. # IFS needs to be set, to space, tab, and newline, in precisely that order. # (If _AS_PATH_WALK were called with IFS unset, it would have the # side effect of setting IFS to empty, thus disabling word splitting.) # Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl IFS=" "" $as_nl" PS1='$ ' PS2='> ' PS4='+ ' # Ensure predictable behavior from utilities with locale-dependent output. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # We cannot yet rely on "unset" to work, but we need these variables # to be unset--not just set to an empty or harmless value--now, to # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct # also avoids known problems related to "unset" and subshell syntax # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH do eval test \${$as_var+y} \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done # Ensure that fds 0, 1, and 2 are open. if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null then : eval 'as_fn_append () { eval $1+=\$2 }' else case e in #( e) as_fn_append () { eval $1=\$$1\$2 } ;; esac fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null then : eval 'as_fn_arith () { as_val=$(( $* )) }' else case e in #( e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } ;; esac fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # Determine whether it's possible to make 'echo' print without a newline. # These variables are no longer used directly by Autoconf, but are AC_SUBSTed # for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac # For backward compatibility with old third-party macros, we provide # the shell variables $as_echo and $as_echo_n. New code should use # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. as_echo='printf %s\n' as_echo_n='printf %s' rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" as_tr_sh="eval sed '$as_sed_sh'" # deprecated exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by Enca $as_me 1.21, which was generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ '$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ Enca config.status 1.21 configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" Copyright (C) 2023 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) printf "%s\n" "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) printf "%s\n" "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: '$1' Try '$0 --help' for more information.";; --help | --hel | -h ) printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: '$1' Try '$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX printf "%s\n" "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' FILECMD='`$ECHO "$FILECMD" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' lt_ar_flags='`$ECHO "$lt_ar_flags" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ FILECMD \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ lt_cv_nm_interface \ nm_file_list_spec \ lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ configure_time_dlsearch_path \ configure_time_lt_sys_library_path; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "enca.spec") CONFIG_FILES="$CONFIG_FILES enca.spec" ;; "enca.pc") CONFIG_FILES="$CONFIG_FILES enca.pc" ;; "devel-docs/Makefile") CONFIG_FILES="$CONFIG_FILES devel-docs/Makefile" ;; "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "script/Makefile") CONFIG_FILES="$CONFIG_FILES script/Makefile" ;; "script/b-cstocs") CONFIG_FILES="$CONFIG_FILES script/b-cstocs" ;; "script/b-map") CONFIG_FILES="$CONFIG_FILES script/b-map" ;; "script/b-piconv") CONFIG_FILES="$CONFIG_FILES script/b-piconv" ;; "script/b-umap") CONFIG_FILES="$CONFIG_FILES script/b-umap" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/HELP") CONFIG_FILES="$CONFIG_FILES src/HELP" ;; "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to '$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with './config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with './config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script 'defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain ':'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is 'configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 printf "%s\n" "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`printf "%s\n" "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when '$srcdir' = '.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&5 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 printf "%s\n" "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. case $CONFIG_FILES in #( *\'*) : eval set x "$CONFIG_FILES" ;; #( *) : set x $CONFIG_FILES ;; #( *) : ;; esac shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`$as_dirname -- "$am_mf" || $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$am_mf" : 'X\(//\)[^/]' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` am_filepart=`$as_basename -- "$am_mf" || $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$am_mf" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` { echo "$as_me:$LINENO: cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles" >&5 (cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } || am_rc=$? done if test $am_rc -ne 0; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE=\"gmake\" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See 'config.log' for more details" "$LINENO" 5; } fi { am_dirpart=; unset am_dirpart;} { am_filepart=; unset am_filepart;} { am_mf=; unset am_mf;} { am_rc=; unset am_rc;} rm -f conftest-deps.mk } ;; "libtool":C) # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 # Copyright (C) 2024 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # The names of the tagged configurations supported by this script. available_tags='' # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shared archive member basename,for filename based shared library versioning on AIX. shared_archive_member_spec=$shared_archive_member_spec # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # A file(cmd) program that detects file types. FILECMD=$lt_FILECMD # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive (by configure). lt_ar_flags=$lt_ar_flags # Flags to create an archive. AR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"} # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm into a list of symbols to manually relocate. global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name lister interface. nm_interface=$lt_lt_cv_nm_interface # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot # Command to truncate a binary pipe. lt_truncate_bin=$lt_lt_cv_truncate_bin # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Detected run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path # Explicit LT_SYS_LIBRARY_PATH set during ./configure time. configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e. impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? $SED '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi if test "$yeti_recode_buggy" = yes; then librecode_state="$librecode_ok (buggy, see above)" else librecode_state="$librecode_ok" fi if test -z "$yeti_cv_file_locale_alias"; then locale_alias_state="built-in (naive)" else locale_alias_state="$yeti_cv_file_locale_alias" fi if test "$ac_cv_func_wordexp" = yes; then ENCAOPT_state="$ac_cv_func_wordexp" else ENCAOPT_state="built-in parser (naive)" fi if test "$enable_static" = yes; then if test "$enable_shared" = yes; then libenca_state="static, shared" else libenca_state=static fi else if test "$enable_shared" = yes; then # Can this happen? libenca_state=shared else libenca_state="not at all?" fi fi echo "=================================================================" echo " Features:" echo " libenca will be built as: $libenca_state" echo " GNU recode library interface: $librecode_state" echo " UNIX98 iconv interface: $libiconv_ok" if test "$libiconv_ok" != "yes" && test "$librecode_ok" != "yes"; then echo " (consider installing at least one of GNU libiconv and GNU librecode)" fi echo " External converters: $enable_external" echo " Language preferences from locale: $ac_cv_func_setlocale" if test "$ac_cv_func_setlocale" = yes; then echo " Language aliases decryption: $locale_alias_state" fi echo " Target charset from locale: $ac_cv_func_nl_langinfo" echo " ENCAOPT environment variable: $ENCAOPT_state" echo "=================================================================" if test "$ac_cv_header_stdc" != yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: expect build to fail since we depend on \"ISO C headers\"" >&5 printf "%s\n" "$as_me: WARNING: expect build to fail since we depend on \"ISO C headers\"" >&2;} fi if test "$ac_cv_header_unistd_h" != yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: expect build to fail since we depend on \"unistd.h\"" >&5 printf "%s\n" "$as_me: WARNING: expect build to fail since we depend on \"unistd.h\"" >&2;} fi if test "$ac_cv_header_sys_types_h" != yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: expect build to fail since we depend on \"sys/types.h\"" >&5 printf "%s\n" "$as_me: WARNING: expect build to fail since we depend on \"sys/types.h\"" >&2;} fi if test "$ac_cv_header_sys_stat_h" != yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: expect build to fail since we depend on \"sys/stat.h\"" >&5 printf "%s\n" "$as_me: WARNING: expect build to fail since we depend on \"sys/stat.h\"" >&2;} fi echo echo "Configure complete, now type \`make' to compile enca." echo "If it compiles, don't forget to run \`make check'." Project-OSS-Revival-enca-36defd7/configure.ac000066400000000000000000000163161507545312400211030ustar00rootroot00000000000000dnl configure.in by David Necas (Yeti) dnl This file is in public domain. dnl Process this file with autoconf to produce a configure script. dnl Shake before use. AC_INIT([Enca],[1.21],[https://github.com/nijel/enca/issues]) AC_PREREQ([2.69]) AC_CONFIG_SRCDIR(src/enca.c) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_FILES( \ Makefile \ enca.spec \ enca.pc \ devel-docs/Makefile \ data/Makefile \ lib/Makefile \ script/Makefile \ script/b-cstocs \ script/b-map \ script/b-piconv \ script/b-umap \ src/Makefile \ src/HELP \ test/Makefile \ tools/Makefile) AC_CONFIG_HEADERS(config.h) AM_INIT_AUTOMAKE([1.8 gnits check-news dist-xz]) AM_ACLOCAL_INCLUDE(m4) AM_MAINTAINER_MODE dnl RPM release (normally always 1, may be manually changed by package dnl maintainer in spec later) RELEASE=1 dnl Checks for programs. AC_PROG_AWK AC_PROG_CC AX_PROG_CC_FOR_BUILD AC_USE_SYSTEM_EXTENSIONS AC_USE_SYSTEM_EXTENSIONS AC_SEARCH_LIBS([strerror],[cposix]) LT_INIT AC_PROG_CC AM_PROG_CC_C_O AC_PROG_INSTALL AC_PROG_LN_S AC_PATH_PROG(MKTEMP_PROG, mktemp) dnl With GCC, be paranoiac. It should compile really cleanly. dnl Except -Wno-sign-compare, but older gcc's don't know it. if test "$GCC" = yes; then CFLAGS="-Wall -Wextra -W -pedantic $CFLAGS" fi dnl Check for various external converters. AC_PATH_PROG(CSTOCS_PROG, cstocs) AC_PATH_PROG(RECODE_PROG, recode) AC_PATH_PROG(UMAP_PROG, umap) AC_PATH_PROG(PICONV_PROG, piconv) AC_PATH_PROG(MAP_PROG, map) dnl External convetor. It may be disabled later, if fork() doesn't work. AC_ARG_ENABLE(external, [ --enable-external enable conversion using external programs @<:@yes@:>@], [case "${enableval}" in yes) WANT_EXTERNAL=yes ;; no) WANT_EXTERNAL=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-external) ;; esac], [WANT_EXTERNAL=yes]) dnl gcov coverage AM_GCOV dnl Fool autoconf, it can't parse the for-cycle below if false; then AC_DEFINE_UNQUOTED(CSTOCS_PROG,"",[Define to path to the cstocs recoder.]) AC_DEFINE_UNQUOTED(MAP_PROG,"",[Define to path to the map recoder.]) AC_DEFINE_UNQUOTED(RECODE_PROG,"",[Define to path to the recode recoder.]) AC_DEFINE_UNQUOTED(PICONV_PROG,"",[Define to path to the piconv recoder.]) AC_DEFINE_UNQUOTED(UMAP_PROG,"",[Define to path to the umap recoder.]) fi dnl Find default external converter for w in cstocs recode piconv map umap; do wPROG=`echo $w | tr $as_cr_letters $as_cr_LETTERS`_PROG # Is this POSIX? But even ash supports it. eval wPROGcv=$`echo ac_cv_path_$wPROG` if test -n "$wPROGcv"; then AC_DEFINE_UNQUOTED($wPROG,"$wPROGcv") if test -z "$DEFAULT_EXTERNAL_CONVERTER"; then DEFAULT_EXTERNAL_CONVERTER=$w fi fi done dnl And for gtk-doc gtk_CHECK_GTK_DOC dnl Checks for libraries. ye_CHECK_LIBM dnl Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_HEADER_TIME AC_HEADER_STAT AC_HEADER_STDBOOL AC_CHECK_HEADERS( \ errno.h \ fcntl.h \ getopt.h \ langinfo.h \ limits.h \ locale.h \ memory.h \ string.h \ strings.h \ sys/stat.h \ sys/types.h \ sys/wait.h \ sys/time.h \ time.h \ unistd.h \ wordexp.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T AC_TYPE_MODE_T AC_TYPE_OFF_T AC_TYPE_PID_T AC_TYPE_UID_T AC_CHECK_TYPE(ssize_t, int) # FIXME: This is crude. It seems to work on Linux, though. AC_CHECK_DECLS(LC_MESSAGES,,,[#include ]) ye_CHECK_VAR_PROGRAM_INVOCATION_SHORT_NAME dnl Checks for library functions. AC_FUNC_FORK AC_CHECK_FUNCS( \ ftruncate \ gettimeofday \ isatty \ nl_langinfo \ random \ realpath \ strstr \ stpcpy \ setlocale \ ttyname \ wordexp) AC_REPLACE_FUNCS(getopt_long) dnl Following two check for much more than just library functions, iconv test dnl in fact has to build a simple iconv app to find out wheter it's usable. CONVERTER_LIBS= ye_CHECK_FUNC_ICONV_USABLE ye_CHECK_LIB_RECODE dnl Adjust default converter list preference order: prefer librecode, then libiconv DEFAULT_CONVERTER_LIST="built-in" if test "$librecode_ok" = "yes"; then DEFAULT_CONVERTER_LIST="$DEFAULT_CONVERTER_LIST,librecode" else if test "$libiconv_ok" = "yes"; then DEFAULT_CONVERTER_LIST="$DEFAULT_CONVERTER_LIST,iconv" fi fi AC_DEFINE_UNQUOTED(DEFAULT_CONVERTER_LIST,"$DEFAULT_CONVERTER_LIST",[Define to default converter list.]) if test "$WANT_EXTERNAL" = "yes" -a "$ac_cv_func_fork_works" = "yes"; then AC_DEFINE(ENABLE_EXTERNAL,1,[Define to enable external converter programs.]) if test -n "$DEFAULT_EXTERNAL_CONVERTER"; then enable_external="yes ($DEFAULT_EXTERNAL_CONVERTER)" else enable_external="yes (but no suitable found)" fi else enable_external=no DEFAULT_EXTERNAL_CONVERTER= fi AC_DEFINE_UNQUOTED(DEFAULT_EXTERNAL_CONVERTER,"$DEFAULT_EXTERNAL_CONVERTER",[Define to default external converter program.]) dnl Try to find locale.alias. FIXME! FIXME! FIXME! This works on GNU/Linux and dnl perhaps nowhere else. Any suggestions are welcome. ye_PATH_LOCALE_ALIAS dnl Random filename generation in scripts if test -n "$MKTEMP_PROG"; then SHELL_RANDOM_FILENAME='`'$MKTEMP_PROG' /tmp/enca-$$-XXXXXXXX`' else SHELL_RANDOM_FILENAME='/tmp/enca-$$-$RANDOM' fi AC_SUBST(RELEASE) AC_SUBST(CONVERTER_LIBS) AC_SUBST(DEFAULT_EXTERNAL_CONVERTER) AC_SUBST(DEFAULT_CONVERTER_LIST) AC_SUBST(SHELL_RANDOM_FILENAME) AC_OUTPUT dnl Inform user what optional features will be built. if test "$yeti_recode_buggy" = yes; then librecode_state="$librecode_ok (buggy, see above)" else librecode_state="$librecode_ok" fi if test -z "$yeti_cv_file_locale_alias"; then locale_alias_state="built-in (naive)" else locale_alias_state="$yeti_cv_file_locale_alias" fi if test "$ac_cv_func_wordexp" = yes; then ENCAOPT_state="$ac_cv_func_wordexp" else ENCAOPT_state="built-in parser (naive)" fi if test "$enable_static" = yes; then if test "$enable_shared" = yes; then libenca_state="static, shared" else libenca_state=static fi else if test "$enable_shared" = yes; then # Can this happen? libenca_state=shared else libenca_state="not at all?" fi fi echo "=================================================================" echo " Features:" echo " libenca will be built as: $libenca_state" echo " GNU recode library interface: $librecode_state" echo " UNIX98 iconv interface: $libiconv_ok" if test "$libiconv_ok" != "yes" && test "$librecode_ok" != "yes"; then echo " (consider installing at least one of GNU libiconv and GNU librecode)" fi echo " External converters: $enable_external" echo " Language preferences from locale: $ac_cv_func_setlocale" if test "$ac_cv_func_setlocale" = yes; then echo " Language aliases decryption: $locale_alias_state" fi echo " Target charset from locale: $ac_cv_func_nl_langinfo" echo " ENCAOPT environment variable: $ENCAOPT_state" echo "=================================================================" ye_WARN_FAIL($ac_cv_header_stdc,"ISO C headers") ye_WARN_FAIL($ac_cv_header_unistd_h,"unistd.h") ye_WARN_FAIL($ac_cv_header_sys_types_h,"sys/types.h") ye_WARN_FAIL($ac_cv_header_sys_stat_h,"sys/stat.h") echo echo "Configure complete, now type \`make' to compile enca." echo "If it compiles, don't forget to run \`make check'." Project-OSS-Revival-enca-36defd7/data/000077500000000000000000000000001507545312400175175ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/data/.gitignore000066400000000000000000000001141507545312400215030ustar00rootroot00000000000000.deps Makefile basetoc countall countpair findletters mystrings pairtoc xlt Project-OSS-Revival-enca-36defd7/data/Letters000066400000000000000000000127211507545312400210670ustar00rootroot0000000000000000c0 00c1 00c2 00c3 00c4 00c5 00c6 00c7 00c8 00c9 00ca 00cb 00cc 00cd 00ce 00cf 00d0 00d1 00d2 00d3 00d4 00d5 00d6 00d8 00d9 00da 00db 00dc 00dd 00de 00df 00e0 00e1 00e2 00e3 00e4 00e5 00e6 00e7 00e8 00e9 00ea 00eb 00ec 00ed 00ee 00ef 00f0 00f1 00f2 00f3 00f4 00f5 00f6 00f8 00f9 00fa 00fb 00fc 00fd 00fe 00ff 0100 0101 0102 0103 0104 0105 0106 0107 0108 0109 010a 010b 010c 010d 010e 010f 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 011a 011b 011c 011d 011e 011f 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 012a 012b 012c 012d 012e 012f 0130 0131 0134 0135 0136 0137 0138 0139 013a 013b 013c 013d 013e 013f 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 014a 014b 014c 014d 014e 014f 0150 0151 0154 0155 0156 0157 0158 0159 015a 015b 015c 015d 015e 015f 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 016a 016b 016c 016d 016e 016f 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 017a 017b 017c 017d 017e 017f 0180 0181 0182 0183 0184 0185 0186 0187 0188 0189 018a 018b 018c 018d 018e 018f 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 019a 019b 019c 019d 019e 019f 01a0 01a1 01a2 01a3 01a4 01a5 01a6 01a7 01a8 01a9 01aa 01ab 01ac 01ad 01ae 01af 01b0 01b1 01b2 01b3 01b4 01b5 01b6 01b7 01b8 01b9 01ba 01bb 01bc 01bd 01be 01bf 01c0 01c1 01c2 01c3 01c4 01c5 01c6 01c7 01c8 01c9 01ca 01cb 01cc 01cd 01ce 01cf 01d0 01d1 01d2 01d3 01d4 01d5 01d6 01d7 01d8 01d9 01da 01db 01dc 01dd 01de 01df 01e0 01e1 01e2 01e3 01e4 01e5 01e6 01e7 01e8 01e9 01ea 01eb 01ec 01ed 01ee 01ef 01f0 01f1 01f2 01f3 01f4 01f5 01f6 01f7 01f8 01f9 01fa 01fb 01fc 01fd 01fe 01ff 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 020a 020b 020c 020d 020e 020f 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 021a 021b 021c 021d 021e 021f 0220 0222 0223 0224 0225 0226 0227 0228 0229 022a 022b 022c 022d 022e 022f 0230 0231 0232 0233 0250 0251 0252 0253 0254 0255 0256 0257 0258 0259 025a 025b 025c 025d 025e 025f 0260 0261 0262 0263 0264 0265 0266 0267 0268 0269 026a 026b 026c 026d 026e 026f 0270 0271 0272 0273 0274 0275 0276 0277 0278 0279 027a 027b 027c 027d 027e 027f 0280 0281 0282 0283 0284 0285 0286 0287 0288 0289 028a 028b 028c 028d 028e 028f 0290 0291 0292 0293 0294 0295 0296 0297 0298 0299 029a 029b 029c 029d 029e 029f 02a0 02a1 02a2 02a3 02a4 02a5 02a6 02a7 02a8 02a9 02aa 02ab 02ac 02ad 02b0 02b1 02b2 02b3 02b4 02b5 02b6 02b7 02b8 02b9 02ba 02bb 02bc 02bd 02be 02bf 02c0 02c1 02c2 02c3 02c4 02c5 02c6 02c8 02c9 02ca 02cb 02cc 02cd 02ce 02cf 02d0 02d1 02d2 02d3 02d4 02d5 02d6 02d7 02de 02df 02e0 02e1 02e2 02e3 02e4 02e5 02e6 02e7 02e8 02e9 02ea 02eb 02ec 02ed 02ee 0363 0364 0365 0366 0367 0368 0369 036a 036b 036c 036d 036e 036f 0386 0388 0389 038a 038c 038e 038f 0390 0391 0392 0393 0394 0395 0396 0397 0398 0399 039a 039b 039c 039d 039e 039f 03a0 03a1 03a3 03a4 03a5 03a6 03a7 03a8 03a9 03aa 03ab 03ac 03ad 03ae 03af 03b0 03b1 03b2 03b3 03b4 03b5 03b6 03b7 03b8 03b9 03ba 03bb 03bc 03bd 03be 03bf 03c0 03c1 03c2 03c3 03c4 03c5 03c6 03c7 03c8 03c9 03ca 03cb 03cc 03cd 03ce 03d8 03d9 03da 03db 03dc 03dd 03de 03df 03e0 03e1 03e2 03e3 03e4 03e5 03e6 03e7 03e8 03e9 03ea 03eb 03ec 03ed 03ee 03ef 03f3 0400 0401 0402 0403 0404 0405 0406 0407 0408 0409 040a 040b 040c 040d 040e 040f 0410 0411 0412 0413 0414 0415 0416 0417 0418 0419 041a 041b 041c 041d 041e 041f 0420 0421 0422 0423 0424 0425 0426 0427 0428 0429 042a 042b 042c 042d 042e 042f 0430 0431 0432 0433 0434 0435 0436 0437 0438 0439 043a 043b 043c 043d 043e 043f 0440 0441 0442 0443 0444 0445 0446 0447 0448 0449 044a 044b 044c 044d 044e 044f 0450 0451 0452 0453 0454 0455 0456 0457 0458 0459 045a 045b 045c 045d 045e 045f 0460 0461 0462 0463 0464 0465 0466 0467 0468 0469 046a 046b 046c 046d 046e 046f 0470 0471 0472 0473 0474 0475 0476 0477 0478 0479 047a 047b 047c 047d 047e 047f 0480 0481 048a 048b 048c 048d 048e 048f 0490 0491 0492 0493 0494 0495 0496 0497 0498 0499 049a 049b 049c 049d 049e 049f 04a0 04a1 04a2 04a3 04a6 04a7 04a8 04a9 04aa 04ab 04ac 04ad 04ae 04af 04b0 04b1 04b2 04b3 04b6 04b7 04b8 04b9 04ba 04bb 04bc 04bd 04be 04bf 04c0 04c1 04c2 04c3 04c4 04c5 04c6 04c7 04c8 04c9 04ca 04cb 04cc 04cd 04ce 04d0 04d1 04d2 04d3 04d6 04d7 04d8 04d9 04da 04db 04dc 04dd 04de 04df 04e0 04e1 04e2 04e3 04e4 04e5 04e6 04e7 04e8 04e9 04ea 04eb 04ec 04ed 04ee 04ef 04f0 04f1 04f2 04f3 04f4 04f5 04f8 04f9 0500 0501 0502 0503 0504 0505 0506 0507 0508 0509 050a 050b 050c 050d 050e 050f 1e00 1e01 1e02 1e03 1e04 1e05 1e06 1e07 1e08 1e09 1e0a 1e0b 1e0c 1e0d 1e0e 1e0f 1e10 1e11 1e12 1e13 1e14 1e15 1e16 1e17 1e18 1e19 1e1a 1e1b 1e1c 1e1d 1e1e 1e1f 1e20 1e21 1e22 1e23 1e24 1e25 1e26 1e27 1e28 1e29 1e2a 1e2b 1e2c 1e2d 1e2e 1e2f 1e30 1e31 1e32 1e33 1e34 1e35 1e36 1e37 1e38 1e39 1e3a 1e3b 1e3c 1e3d 1e3e 1e3f 1e40 1e41 1e42 1e43 1e44 1e45 1e46 1e47 1e48 1e49 1e4a 1e4b 1e4c 1e4d 1e4e 1e4f 1e50 1e51 1e52 1e53 1e54 1e55 1e56 1e57 1e58 1e59 1e5a 1e5b 1e5c 1e5d 1e5e 1e5f 1e60 1e61 1e62 1e63 1e64 1e65 1e66 1e67 1e68 1e69 1e6a 1e6b 1e6c 1e6d 1e6e 1e6f 1e70 1e71 1e72 1e73 1e74 1e75 1e76 1e77 1e78 1e79 1e7a 1e7b 1e7c 1e7d 1e7e 1e7f 1e80 1e81 1e82 1e83 1e84 1e85 1e86 1e87 1e88 1e89 1e8a 1e8b 1e8c 1e8d 1e8e 1e8f 1e90 1e91 1e92 1e93 1e94 1e95 1e96 1e97 1e98 1e99 1e9a 1e9b 1ea0 1ea1 1ea2 1ea3 1ea4 1ea5 1ea6 1ea7 1ea8 1ea9 1eaa 1eab 1eac 1ead 1eae 1eaf 1eb0 1eb1 1eb2 1eb3 1eb4 1eb5 1eb6 1eb7 1eb8 1eb9 1eba 1ebb 1ebc 1ebd 1ebe 1ebf 1ec0 1ec1 1ec2 1ec3 1ec4 1ec5 1ec6 1ec7 1ec8 1ec9 1eca 1ecb 1ecc 1ecd 1ece 1ecf 1ed0 1ed1 1ed2 1ed3 1ed4 1ed5 1ed6 1ed7 1ed8 1ed9 1eda 1edb 1edc 1edd 1ede 1edf 1ee0 1ee1 1ee2 1ee3 1ee4 1ee5 1ee6 1ee7 1ee8 1ee9 1eea 1eeb 1eec 1eed 1eee 1eef 1ef0 1ef1 1ef2 1ef3 1ef4 1ef5 1ef6 1ef7 1ef8 1ef9 Project-OSS-Revival-enca-36defd7/data/Makefile.am000066400000000000000000000063041507545312400215560ustar00rootroot00000000000000noinst_PROGRAMS = \ basetoc \ countall \ countpair \ findletters \ mystrings \ pairtoc \ xlt noinst_DATA = $(BASES) $(RAWCOUNTS) $(PAIRCOUNTS) $(MAPS) Letters noinst_HEADERS = \ belarusian/belarusian.h \ bulgarian/bulgarian.h \ chinese/chinese.h \ chinese/zh_weight_big5.h \ chinese/zh_weight_gbk.h \ croatian/croatian.h \ czech/czech.h \ estonian/estonian.h \ finnish/finnish.h \ hungarian/hungarian.h \ latvian/latvian.h \ lithuanian/lithuanian.h \ polish/polish.h \ russian/russian.h \ slovak/slovak.h \ slovene/slovene.h \ ukrainian/ukrainian.h basetoc_SOURCES = basetoc.c countall_SOURCES = countall.c countpair_SOURCES = countpair.c findletters_SOURCES = findletters.c mystrings_SOURCES = mystrings.c pairtoc_SOURCES = pairtoc.c xlt_SOURCES = xlt.c noinst_SCRPITS = \ clean.sh \ doit.sh \ extreme.pl \ makepaircounts.sh \ map2letters.sh \ normalize.pl \ totals.pl \ belarusian/doit.sh \ bulgarian/doit.sh \ croatian/doit.sh \ czech/doit.sh \ estonian/doit.sh \ finnish/doit.sh \ hungarian/doit.sh \ latvian/doit.sh \ lithuanian/doit.sh \ polish/doit.sh \ russian/doit.sh \ slovak/doit.sh \ slovene/doit.sh \ ukrainian/doit.sh BASES = \ belarusian/cp1251.base \ bulgarian/cp1251.base \ croatian/cp1250.base \ czech/iso88592.base \ estonian/iso88594.base \ finnish/iso88594.base \ hungarian/iso88592.base \ russian/koi8r.base \ latvian/cp1257.base \ lithuanian/cp1257.base \ polish/iso88592.base \ slovak/cp1250.base \ slovene/iso88592.base \ ukrainian/cp1251.base RAWCOUNTS = \ belarusian/rawcounts.cp1251 \ bulgarian/rawcounts.cp1251 \ croatian/rawcounts.cp1250 \ czech/rawcounts.iso88592 \ estonian/rawcounts.iso88594 \ finnish/rawcounts.iso88594 \ hungarian/rawcounts.iso88592 \ latvian/rawcounts.cp1257 \ lithuanian/rawcounts.cp1257 \ polish/rawcounts.iso88592 \ russian/rawcounts.koi8r \ slovak/rawcounts.cp1250 \ slovene/rawcounts.iso88592 \ ukrainian/rawcounts.cp1251 PAIRCOUNTS = \ belarusian/paircounts.cp1251 \ belarusian/paircounts.ibm866 \ bulgarian/paircounts.cp1251 \ russian/paircounts.koi8r \ ukrainian/paircounts.cp1251 MAPS = \ maps/baltic.map \ maps/cork.map \ maps/cp1125.map \ maps/cp1250.map \ maps/cp1251.map \ maps/cp1257.map \ maps/ecma113.map \ maps/ibm775.map \ maps/ibm852.map \ maps/ibm855.map \ maps/ibm866-bad.map \ maps/ibm866.map \ maps/iso885913.map \ maps/iso885916.map \ maps/iso88592.map \ maps/iso88594.map \ maps/iso88595.map \ maps/keybcs2.map \ maps/koi8cs2.map \ maps/koi8r.map \ maps/koi8u.map \ maps/koi8ub.map \ maps/koi8uni.map \ maps/macce.map \ maps/maccyr.map OTHERDATA = \ chinese/zh_weight_big5.txt \ chinese/zh_weight_gb.txt EXTRA_DIST = README $(BASES) $(RAWCOUNTS) $(PAIRCOUNTS) $(MAPS) $(OTHERDATA) \ $(noinst_SCRPITS) Letters # We don't want to recreate the headers over and over, namely we don't want # to recreate them during normal compilation. Run `make headers' to create # them. headers: $(BASES) xlt letters ./doit.sh letters: ./map2letters.sh .PHONY: headers letters clean-local: -rm -f *~ */*~ core.* distclean-local: -./clean.sh -rm -f $(noinst_PROGRAMS) Project-OSS-Revival-enca-36defd7/data/Makefile.in000066400000000000000000000615671507545312400216030ustar00rootroot00000000000000# Makefile.in generated by automake 1.17 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2024 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) am__rm_f = rm -f $(am__rm_f_notfound) am__rm_rf = rm -rf $(am__rm_f_notfound) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = basetoc$(EXEEXT) countall$(EXEEXT) \ countpair$(EXEEXT) findletters$(EXEEXT) mystrings$(EXEEXT) \ pairtoc$(EXEEXT) xlt$(EXEEXT) subdir = data ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gcov.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libiconv.m4 \ $(top_srcdir)/m4/libm.m4 $(top_srcdir)/m4/librecode.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/localias.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/m4_ax_prog_cc_for_build.m4 \ $(top_srcdir)/m4/tools.m4 $(top_srcdir)/m4/typevar.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_basetoc_OBJECTS = basetoc.$(OBJEXT) basetoc_OBJECTS = $(am_basetoc_OBJECTS) basetoc_LDADD = $(LDADD) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = am_countall_OBJECTS = countall.$(OBJEXT) countall_OBJECTS = $(am_countall_OBJECTS) countall_LDADD = $(LDADD) am_countpair_OBJECTS = countpair.$(OBJEXT) countpair_OBJECTS = $(am_countpair_OBJECTS) countpair_LDADD = $(LDADD) am_findletters_OBJECTS = findletters.$(OBJEXT) findletters_OBJECTS = $(am_findletters_OBJECTS) findletters_LDADD = $(LDADD) am_mystrings_OBJECTS = mystrings.$(OBJEXT) mystrings_OBJECTS = $(am_mystrings_OBJECTS) mystrings_LDADD = $(LDADD) am_pairtoc_OBJECTS = pairtoc.$(OBJEXT) pairtoc_OBJECTS = $(am_pairtoc_OBJECTS) pairtoc_LDADD = $(LDADD) am_xlt_OBJECTS = xlt.$(OBJEXT) xlt_OBJECTS = $(am_xlt_OBJECTS) xlt_LDADD = $(LDADD) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/basetoc.Po ./$(DEPDIR)/countall.Po \ ./$(DEPDIR)/countpair.Po ./$(DEPDIR)/findletters.Po \ ./$(DEPDIR)/mystrings.Po ./$(DEPDIR)/pairtoc.Po \ ./$(DEPDIR)/xlt.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(basetoc_SOURCES) $(countall_SOURCES) $(countpair_SOURCES) \ $(findletters_SOURCES) $(mystrings_SOURCES) $(pairtoc_SOURCES) \ $(xlt_SOURCES) DIST_SOURCES = $(basetoc_SOURCES) $(countall_SOURCES) \ $(countpair_SOURCES) $(findletters_SOURCES) \ $(mystrings_SOURCES) $(pairtoc_SOURCES) $(xlt_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(noinst_DATA) HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/mkinstalldirs README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_EXEEXT = @BUILD_EXEEXT@ BUILD_OBJEXT = @BUILD_OBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ CONVERTER_LIBS = @CONVERTER_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CSCOPE = @CSCOPE@ CSTOCS_PROG = @CSTOCS_PROG@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFAULT_CONVERTER_LIST = @DEFAULT_CONVERTER_LIST@ DEFAULT_EXTERNAL_CONVERTER = @DEFAULT_EXTERNAL_CONVERTER@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GCOV = @GCOV@ GCOV_CPPFLAGS = @GCOV_CPPFLAGS@ GCOV_FLAGS = @GCOV_FLAGS@ GCOV_LDFLAGS = @GCOV_LDFLAGS@ GREP = @GREP@ GTKDOC = @GTKDOC@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ LIBICONV = @LIBICONV@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAP_PROG = @MAP_PROG@ MKDIR_P = @MKDIR_P@ MKTEMP_PROG = @MKTEMP_PROG@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PICONV_PROG = @PICONV_PROG@ RANLIB = @RANLIB@ RECODE_PROG = @RECODE_PROG@ RELEASE = @RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHELL_RANDOM_FILENAME = @SHELL_RANDOM_FILENAME@ STRIP = @STRIP@ UMAP_PROG = @UMAP_PROG@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CC_FOR_BUILD = @ac_ct_CC_FOR_BUILD@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__rm_f_notfound = @am__rm_f_notfound@ am__tar = @am__tar@ am__untar = @am__untar@ am__xargs_n = @am__xargs_n@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_DATA = $(BASES) $(RAWCOUNTS) $(PAIRCOUNTS) $(MAPS) Letters noinst_HEADERS = \ belarusian/belarusian.h \ bulgarian/bulgarian.h \ chinese/chinese.h \ chinese/zh_weight_big5.h \ chinese/zh_weight_gbk.h \ croatian/croatian.h \ czech/czech.h \ estonian/estonian.h \ finnish/finnish.h \ hungarian/hungarian.h \ latvian/latvian.h \ lithuanian/lithuanian.h \ polish/polish.h \ russian/russian.h \ slovak/slovak.h \ slovene/slovene.h \ ukrainian/ukrainian.h basetoc_SOURCES = basetoc.c countall_SOURCES = countall.c countpair_SOURCES = countpair.c findletters_SOURCES = findletters.c mystrings_SOURCES = mystrings.c pairtoc_SOURCES = pairtoc.c xlt_SOURCES = xlt.c noinst_SCRPITS = \ clean.sh \ doit.sh \ extreme.pl \ makepaircounts.sh \ map2letters.sh \ normalize.pl \ totals.pl \ belarusian/doit.sh \ bulgarian/doit.sh \ croatian/doit.sh \ czech/doit.sh \ estonian/doit.sh \ finnish/doit.sh \ hungarian/doit.sh \ latvian/doit.sh \ lithuanian/doit.sh \ polish/doit.sh \ russian/doit.sh \ slovak/doit.sh \ slovene/doit.sh \ ukrainian/doit.sh BASES = \ belarusian/cp1251.base \ bulgarian/cp1251.base \ croatian/cp1250.base \ czech/iso88592.base \ estonian/iso88594.base \ finnish/iso88594.base \ hungarian/iso88592.base \ russian/koi8r.base \ latvian/cp1257.base \ lithuanian/cp1257.base \ polish/iso88592.base \ slovak/cp1250.base \ slovene/iso88592.base \ ukrainian/cp1251.base RAWCOUNTS = \ belarusian/rawcounts.cp1251 \ bulgarian/rawcounts.cp1251 \ croatian/rawcounts.cp1250 \ czech/rawcounts.iso88592 \ estonian/rawcounts.iso88594 \ finnish/rawcounts.iso88594 \ hungarian/rawcounts.iso88592 \ latvian/rawcounts.cp1257 \ lithuanian/rawcounts.cp1257 \ polish/rawcounts.iso88592 \ russian/rawcounts.koi8r \ slovak/rawcounts.cp1250 \ slovene/rawcounts.iso88592 \ ukrainian/rawcounts.cp1251 PAIRCOUNTS = \ belarusian/paircounts.cp1251 \ belarusian/paircounts.ibm866 \ bulgarian/paircounts.cp1251 \ russian/paircounts.koi8r \ ukrainian/paircounts.cp1251 MAPS = \ maps/baltic.map \ maps/cork.map \ maps/cp1125.map \ maps/cp1250.map \ maps/cp1251.map \ maps/cp1257.map \ maps/ecma113.map \ maps/ibm775.map \ maps/ibm852.map \ maps/ibm855.map \ maps/ibm866-bad.map \ maps/ibm866.map \ maps/iso885913.map \ maps/iso885916.map \ maps/iso88592.map \ maps/iso88594.map \ maps/iso88595.map \ maps/keybcs2.map \ maps/koi8cs2.map \ maps/koi8r.map \ maps/koi8u.map \ maps/koi8ub.map \ maps/koi8uni.map \ maps/macce.map \ maps/maccyr.map OTHERDATA = \ chinese/zh_weight_big5.txt \ chinese/zh_weight_gb.txt EXTRA_DIST = README $(BASES) $(RAWCOUNTS) $(PAIRCOUNTS) $(MAPS) $(OTHERDATA) \ $(noinst_SCRPITS) Letters all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits data/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits data/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstPROGRAMS: $(am__rm_f) $(noinst_PROGRAMS) test -z "$(EXEEXT)" || $(am__rm_f) $(noinst_PROGRAMS:$(EXEEXT)=) basetoc$(EXEEXT): $(basetoc_OBJECTS) $(basetoc_DEPENDENCIES) $(EXTRA_basetoc_DEPENDENCIES) @rm -f basetoc$(EXEEXT) $(AM_V_CCLD)$(LINK) $(basetoc_OBJECTS) $(basetoc_LDADD) $(LIBS) countall$(EXEEXT): $(countall_OBJECTS) $(countall_DEPENDENCIES) $(EXTRA_countall_DEPENDENCIES) @rm -f countall$(EXEEXT) $(AM_V_CCLD)$(LINK) $(countall_OBJECTS) $(countall_LDADD) $(LIBS) countpair$(EXEEXT): $(countpair_OBJECTS) $(countpair_DEPENDENCIES) $(EXTRA_countpair_DEPENDENCIES) @rm -f countpair$(EXEEXT) $(AM_V_CCLD)$(LINK) $(countpair_OBJECTS) $(countpair_LDADD) $(LIBS) findletters$(EXEEXT): $(findletters_OBJECTS) $(findletters_DEPENDENCIES) $(EXTRA_findletters_DEPENDENCIES) @rm -f findletters$(EXEEXT) $(AM_V_CCLD)$(LINK) $(findletters_OBJECTS) $(findletters_LDADD) $(LIBS) mystrings$(EXEEXT): $(mystrings_OBJECTS) $(mystrings_DEPENDENCIES) $(EXTRA_mystrings_DEPENDENCIES) @rm -f mystrings$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mystrings_OBJECTS) $(mystrings_LDADD) $(LIBS) pairtoc$(EXEEXT): $(pairtoc_OBJECTS) $(pairtoc_DEPENDENCIES) $(EXTRA_pairtoc_DEPENDENCIES) @rm -f pairtoc$(EXEEXT) $(AM_V_CCLD)$(LINK) $(pairtoc_OBJECTS) $(pairtoc_LDADD) $(LIBS) xlt$(EXEEXT): $(xlt_OBJECTS) $(xlt_DEPENDENCIES) $(EXTRA_xlt_DEPENDENCIES) @rm -f xlt$(EXEEXT) $(AM_V_CCLD)$(LINK) $(xlt_OBJECTS) $(xlt_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basetoc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/countall.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/countpair.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findletters.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mystrings.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pairtoc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xlt.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @: >>$@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(DATA) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -$(am__rm_f) $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-local clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/basetoc.Po -rm -f ./$(DEPDIR)/countall.Po -rm -f ./$(DEPDIR)/countpair.Po -rm -f ./$(DEPDIR)/findletters.Po -rm -f ./$(DEPDIR)/mystrings.Po -rm -f ./$(DEPDIR)/pairtoc.Po -rm -f ./$(DEPDIR)/xlt.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-local distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/basetoc.Po -rm -f ./$(DEPDIR)/countall.Po -rm -f ./$(DEPDIR)/countpair.Po -rm -f ./$(DEPDIR)/findletters.Po -rm -f ./$(DEPDIR)/mystrings.Po -rm -f ./$(DEPDIR)/pairtoc.Po -rm -f ./$(DEPDIR)/xlt.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-local clean-noinstPROGRAMS \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-local \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # We don't want to recreate the headers over and over, namely we don't want # to recreate them during normal compilation. Run `make headers' to create # them. headers: $(BASES) xlt letters ./doit.sh letters: ./map2letters.sh .PHONY: headers letters clean-local: -rm -f *~ */*~ core.* distclean-local: -./clean.sh -rm -f $(noinst_PROGRAMS) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: # Tell GNU make to disable its built-in pattern rules. %:: %,v %:: RCS/%,v %:: RCS/% %:: s.% %:: SCCS/s.% Project-OSS-Revival-enca-36defd7/data/README000066400000000000000000000070361507545312400204050ustar00rootroot00000000000000=== Programs === doit.sh -- Regenerates all */*.base and */*.c files from the source one (given as first parameter in */doit.sh), used by */doit.sh to regenerate stuff in individual directories too. Uses many of following scripts. */doit.sh -- Customized scripts for individual directories. Once a directory contains doit.sh, it's run by the main one. clean.sh -- Removes most auxiliary files from language subdirs. basetoc.c -- [filter] Converts one .base file to .c file, used by doit.sh $ ./basetoc CHARSET.c totals.pl -- Reads generated .c files and computes significancy data, weight sums and other summary data, writes file `totals.c' $ ./totals.pl CHARSET1.c ... CHARSETn.c normalize.pl -- [filter] Does some kind of funny weight normalization, useful for producing CHARSET.base files, since the weights must fit into unsigned short int: $ ./normalize.pl NORMALIZED_COUNTS Given a file on command line, it normalizes input to have exactly(!) the same weight sum: $ ./normalize.pl REFERENCE_COUNTS RENORMALIZED_COUNTS This is not run by doit.sh. extreme.pl -- Given two count files, it finds characters most suitable for hook deciding between these two, i.e. characters with the biggest difference of occurrences: $ ./extreme.pl COUNT1 COUNT2 xlt.c -- [filter] Extremely simple charset converter, to become independent on the other broken converters: $ ./xlt SOURCE.map TARGET.map CONVERTED_TEXT mystrings.c -- [filter] Extract text chunks from input (strings(1) doesn't seem to do good job on 8bit files): $ ./mystrings rawcounts.CHARSET countpair.c -- [filter] Count 8bit letter pair frequencies and print a table containing as much pairs as to get 95% of all $ ./countpair CHARSET.letters paircounts.CHARSET findletters.c -- [filter] Find what 8bit characters from a charset map are letters $ ./findletters CHARSET.map CHARSET.letters map2letters.sh -- Run findletters.c for all charsets in maps/. === Data === Letters -- Unicode characters assumed to be letters, excluding 7bits. Also excluding non-European scripts, to keep it small. maps/ -- 8bit charset -> UCS2 maps, notable ones: ibm866-bad.map -- Translates Latin `i' and `I' to Cyrillic 0x0456 and 0x0406, thus approximates them the opposite way when used as TARGET. maccyr.map -- It's Macintosh Cyrillic after Apple unification of Russian and Ukriainian variants and adding Euro symbol there, in Mac OS 9.0 or so (recode uses the old Russian maccyr -- FIXME with iconv it doesn't?). macce.map -- Macintosh Central European encoding, the real one, not the crappy one used by recode. koi8u.map -- KOI8-U (Ukrainian) (recode uses some strange mapping?). koi8uni.map -- KOI8-Unified. koi8ub.map -- KOI8-UB (Ukrainian/Belarusian). cork.map -- T1 Cork encoding (recode uses some strange mapping?). iso885913.map -- ISO-8859-13 map (recode uses some strange mapping?). letters/ -- lists of 8bit charset that are letters (generated) for various charsets, run map2letters.sh to create it Project-OSS-Revival-enca-36defd7/data/basetoc.c000066400000000000000000000013501507545312400213020ustar00rootroot00000000000000#include #include #define mytoupper(x) (islower(x) ? toupper(x) : (x)) int main(int argc, char *argv[]) { unsigned int weights[0x100]; unsigned int i, j; unsigned char c; for (i = 0; i < 0x100; i++) weights[i] = 0; while (scanf("%c %u\n", &c, &j) == 2) weights[c] = j; puts("/* THIS IS A GENERATED TABLE, see data/basetoc.c. */"); printf("static const unsigned short int RAW_"); for (i = 0; argv[1][i]; i++) printf("%c", mytoupper(argv[1][i])); puts("[] = {"); for (i = 0; i < 0x100; i++) { if (i % 8 == 0) printf(" "); printf("%4u", weights[i]); if (i % 8 == 7) printf(", /* 0x%02x */\n", i-7); else printf(", "); } puts("};\n"); return 0; } Project-OSS-Revival-enca-36defd7/data/belarusian/000077500000000000000000000000001507545312400216445ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/data/belarusian/belarusian.h000066400000000000000000001534241507545312400241530ustar00rootroot00000000000000/***** THIS IS A GENERATED FILE. DO NOT TOUCH! *****/ /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_CP1251[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 939, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 1491, 0, 0, 0, 0, /* 0xb0 */ 187, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 137, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 5987, 651, 1083, 728, 1220, 1497, 282, 1029, /* 0xe0 */ 0, 380, 1400, 1540, 1111, 2360, 1390, 1015, /* 0xe8 */ 1623, 1555, 1345, 1172, 0, 424, 896, 556, /* 0xf0 */ 445, 0, 0, 1673, 602, 381, 227, 1394, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char LETTER_CP1251[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 255, 255, 0, 255, 0, 0, 0, 0, /* 0x80 */ 0, 0, 255, 0, 255, 255, 255, 255, /* 0x88 */ 255, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 255, 0, 255, 255, 255, 255, /* 0x98 */ 0, 255, 1, 255, 0, 255, 0, 0, /* 0xa0 */ 2, 0, 255, 0, 0, 0, 0, 255, /* 0xa8 */ 0, 0, 3, 4, 255, 0, 0, 0, /* 0xb0 */ 5, 0, 255, 0, 255, 255, 255, 255, /* 0xb8 */ 6, 7, 8, 9, 255, 255, 255, 10, /* 0xc0 */ 255, 255, 11, 255, 12, 13, 255, 14, /* 0xc8 */ 15, 255, 16, 17, 255, 255, 255, 255, /* 0xd0 */ 255, 255, 255, 255, 255, 255, 255, 18, /* 0xd8 */ 19, 20, 21, 22, 23, 24, 25, 26, /* 0xe0 */ 255, 27, 28, 29, 30, 31, 32, 33, /* 0xe8 */ 34, 35, 36, 37, 38, 39, 40, 41, /* 0xf0 */ 42, 255, 255, 43, 44, 45, 46, 47, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char *PAIR_CP1251[] = { (unsigned char*)"\xef\xed\xf1\xe7\xe0\xe4\xff\xe2\xf2\xe1\xea\xec\xb3\xe3\xa2\xf0\xf3\xf8\xeb\xc0\xf7\xf6\xf5\xe6\xcf\xcd\xd1\xc1\xb8\xcc\xc2\xca\xdf\xd3\xc4\xc7\xd2\xc3\xb2\xd0\xd5\xcb\xf4\xd8\xe5\xd7\xa8", /* FILLCHAR */ (unsigned char*)".\xf1\xed\xeb\xe4\xf8\xe6\xe2\xe7\xea", /* 0xa2 */ (unsigned char*)"\xed", /* 0xa8 */ (unsigned char*)".", /* 0xb2 */ (unsigned char*)".\xed\xea\xeb\xf6\xf1\xec\xf5\xa2\xf0\xf7\xff\xe2\xf2\xe4\xe7\xf8", /* 0xb3 */ (unsigned char*)"\xed.\xe9", /* 0xb8 */ (unsigned char*)".\xeb", /* 0xc0 */ (unsigned char*)"\xe5\xe0", /* 0xc1 */ (unsigned char*)"\xee", /* 0xc2 */ (unsigned char*)"\xfd", /* 0xc3 */ (unsigned char*)"\xe0", /* 0xc7 */ (unsigned char*)"\xe0", /* 0xca */ (unsigned char*)"\xe0", /* 0xcc */ (unsigned char*)"\xe0\xe5", /* 0xcd */ (unsigned char*)"\xe0\xf0", /* 0xcf */ (unsigned char*)"\xe0", /* 0xd0 */ (unsigned char*)"\xe0", /* 0xd2 */ (unsigned char*)".", /* 0xd3 */ (unsigned char*)".", /* 0xdf */ (unsigned char*)".\xeb\xe4\xf0\xf1\xa2\xed\xec\xe2\xea\xe3\xf6\xe9\xe1\xe7\xf2\xef\xf7\xe5\xff\xf5\xfe\xf8\xe6\xb8\xf4\xb3", /* 0xe0 */ (unsigned char*)"\xfb\xe0\xe5\xee.\xf0\xf3\xb3\xeb\xff\xed", /* 0xe1 */ (unsigned char*)"\xe0\xfb\xe5\xee\xb3\xff\xf3.", /* 0xe2 */ (unsigned char*)"\xe0\xee\xfd.\xeb\xf3\xf0\xb3\xed\xe5", /* 0xe3 */ (unsigned char*)"\xe0\xe7.\xfb\xed\xf3\xee\xf0\xea\xe2\xeb\xe6\xf1\xfd\xf7", /* 0xe4 */ (unsigned char*)".\xf0\xed\xeb\xe4\xf1\xf6\xe9\xa2\xec\xea\xf2\xe7\xf8\xf7\xe2\xef\xe5\xe6\xe1", /* 0xe5 */ (unsigned char*)"\xe0\xfb.\xed\xee", /* 0xe6 */ (unsigned char*)"\xe0.\xe5\xb3\xed\xff\xe2\xfc\xf3\xe4\xf0\xec\xe1\xe3\xeb\xfb", /* 0xe7 */ (unsigned char*)".\xed\xf8\xf1", /* 0xe9 */ (unsigned char*)"\xe0.\xb3\xf3\xee\xf0\xeb\xf2\xf1\xed", /* 0xea */ (unsigned char*)"\xe0\xb3\xfc\xe5\xff\xee.\xfe\xfb\xf3\xb8", /* 0xeb */ (unsigned char*)".\xe0\xb3\xe5\xee\xf3\xff\xfb\xed\xeb", /* 0xec */ (unsigned char*)"\xe0\xe5\xfb\xb3.\xff\xf3\xed\xee\xfc\xf2\xf1\xea\xf6\xe4\xf8\xf7", /* 0xed */ (unsigned char*)".\xa2\xeb\xe4\xf0\xe2\xed\xf1\xe9\xe3\xec\xe6\xe1\xf2\xea\xf7\xe5\xe7\xef\xf8\xf6\xf5", /* 0xee */ (unsigned char*)"\xe0\xf0\xe5\xee\xeb\xb3\xfb\xf3.\xff", /* 0xef */ (unsigned char*)"\xe0\xfb\xee\xf3\xfd.\xed\xea\xf2\xf8\xec\xe3\xe2\xf1", /* 0xf0 */ (unsigned char*)"\xf2\xff\xea\xe0\xf6\xef\xfc.\xf3\xeb\xe2\xb3\xe5\xed\xb8\xee\xfb\xec", /* 0xf1 */ (unsigned char*)"\xe0\xee\xfb\xf0\xf3.\xe2\xea\xfd\xed", /* 0xf2 */ (unsigned char*)".\xf1\xe4\xeb\xec\xf2\xf0\xfe\xea\xef\xa2\xf6\xf7\xe6\xf8\xed\xf5\xe1\xe3\xe7\xe2", /* 0xf3 */ (unsigned char*)"\xe0", /* 0xf4 */ (unsigned char*)".\xe0\xee\xf2\xb3\xf3\xed", /* 0xf5 */ (unsigned char*)"\xfc\xe0\xfb\xb3\xf6\xe5\xff.\xea\xfd", /* 0xf6 */ (unsigned char*)"\xe0\xfb\xed\xfd\xf3.\xee\xea", /* 0xf7 */ (unsigned char*)"\xf2\xfb\xf7\xe0.\xea\xeb\xfd\xed", /* 0xf8 */ (unsigned char*)".\xec\xff\xeb\xf5\xed\xea\xf6\xa2\xf1\xe2\xf2\xf7\xf0\xe9\xef\xb3\xe1\xe3\xf8\xe4\xe7", /* 0xfb */ (unsigned char*)".\xed\xea\xf6\xec\xf8\xe2\xf1", /* 0xfc */ (unsigned char*)"\xf2\xed\xf0.\xeb\xe9\xe1\xf1", /* 0xfd */ (unsigned char*)".\xf7\xf6\xe4", /* 0xfe */ (unsigned char*)".\xea\xed\xe3\xf0\xeb\xe4\xa2\xec\xf6\xe5\xf8\xf1\xe2\xf2\xe1\xe7\xf7\xef\xf5", /* 0xff */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_IBM866[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 143, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 6241, 679, 1128, 759, 1272, 1561, 293, 1073, /* 0xa0 */ 0, 397, 1460, 1606, 1159, 2459, 1448, 1057, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 1692, 1621, 1401, 1222, 0, 441, 933, 580, /* 0xe0 */ 463, 0, 0, 1744, 628, 398, 237, 1452, /* 0xe8 */ 0, 194, 0, 0, 0, 0, 0, 979, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char LETTER_IBM866[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 1, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 2, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 3, 4, 5, 6, 255, 255, 255, 7, /* 0x80 */ 255, 255, 8, 255, 9, 10, 255, 11, /* 0x88 */ 12, 255, 13, 14, 15, 255, 255, 16, /* 0x90 */ 255, 255, 255, 255, 255, 255, 255, 17, /* 0x98 */ 18, 19, 20, 21, 22, 23, 24, 25, /* 0xa0 */ 255, 26, 27, 28, 29, 30, 31, 32, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 33, 34, 35, 36, 37, 38, 39, 40, /* 0xe0 */ 41, 255, 255, 42, 43, 44, 45, 46, /* 0xe8 */ 47, 48, 255, 255, 255, 255, 255, 49, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char *PAIR_IBM866[] = { (unsigned char*)"\xaf\xad\x69\xe1\xa7\xa0\xa4\xef\xa2\xa1\xe2\xaa\xa3\xac\xf7\x97\xe0\xe3\xe8\x80\xab\xe7\xe6\xe5\x8f\xa6\x8d\x49\x91\x81\xf1\x93\x8c\x8a\x82\x9f\x84\x92\x83\x87\x90\x95\x8b\xe4\x96\x98\xf0\xa5", /* FILLCHAR */ (unsigned char*)".", /* 0x49 */ (unsigned char*)".\xad\xe1\xaa\xe6\xab\xe5\xac\xf7\xef\xe7\xe0\xe2\xa2\xa7\xa4\xe8", /* 0x69 */ (unsigned char*)".\xab", /* 0x80 */ (unsigned char*)"\xa5\xa0", /* 0x81 */ (unsigned char*)"\xae", /* 0x82 */ (unsigned char*)"\xed", /* 0x83 */ (unsigned char*)"\xa0", /* 0x87 */ (unsigned char*)"\xa0", /* 0x8a */ (unsigned char*)"\xa0", /* 0x8c */ (unsigned char*)"\xa0\xa5", /* 0x8d */ (unsigned char*)"\xa0\xe0", /* 0x8f */ (unsigned char*)"\xa0", /* 0x90 */ (unsigned char*)"\xa0", /* 0x92 */ (unsigned char*)".", /* 0x93 */ (unsigned char*)".", /* 0x94 */ (unsigned char*)".", /* 0x97 */ (unsigned char*)".", /* 0x9f */ (unsigned char*)".\xab\xa4\xe0\xe1\xf7\xad\xac\xa2\xaa\xa3\xe6\xa9\xa1\xa7\xe2\xaf\xe7\xa5\xef\xe5\xee\xe8\xa6\x69\xf1\xe4", /* 0xa0 */ (unsigned char*)"\xeb\xa0\xa5\xae\xe0\x69.\xe3\xab\xef\xad", /* 0xa1 */ (unsigned char*)"\xa0\xeb\xa5\x69\xae\xef\xe3", /* 0xa2 */ (unsigned char*)"\xa0\xae\xed\x69\xab\xe3\xe0.\xad\xa5", /* 0xa3 */ (unsigned char*)"\xa0\xa7.\xeb\xad\xe3\xae\xe0\xaa\xa2\xab\xa6\xe1\xed\xe7", /* 0xa4 */ (unsigned char*)".\xe0\xad\xab\xa4\xe1\xe6\xa9\xf7\xac\xaa\xe2\xa7\xe8\xe7\xa2\xaf\xa5\xa6\xa1", /* 0xa5 */ (unsigned char*)"\xa0\xeb.\xad\xae", /* 0xa6 */ (unsigned char*)"\xa0.\xa5\x69\xad\xef\xa2\xec\xe3\xa4\xe0\xac\xa1\xa3\xab\xeb", /* 0xa7 */ (unsigned char*)".\xad\xe8\xe1", /* 0xa9 */ (unsigned char*)"\xa0\x69.\xe3\xae\xe0\xab\xe2\xe1\xad", /* 0xaa */ (unsigned char*)"\x69\xa0\xec\xa5\xef\xae\xee\xeb\xe3.\xf1", /* 0xab */ (unsigned char*)".\xa0\x69\xa5\xae\xe3\xef\xeb\xad\xab", /* 0xac */ (unsigned char*)"\xa0\xa5\xeb\x69\xef.\xe3\xad\xae\xec\xe2\xe1\xaa\xe6\xa4\xe8\xe7", /* 0xad */ (unsigned char*)".\xf7\xab\xa4\xe0\xa2\xad\xe1\xa9\xa3\xac\xa6\xa1\xe2\xaa\xe7\xa5\xa7\xaf\xe8\xe6\xe5", /* 0xae */ (unsigned char*)"\xa0\xe0\xa5\xae\x69\xab\xeb\xe3\xef", /* 0xaf */ (unsigned char*)"\xa0\xeb\xae\xe3\xed.\xad\xaa\xe2\xe8\xac\xa3\xa2\xe1", /* 0xe0 */ (unsigned char*)"\xe2\xef\xaa\xa0\xe6\xaf\xec\x69\xe3\xab\xa2.\xa5\xad\xf1\xae\xeb\xac", /* 0xe1 */ (unsigned char*)"\xa0\xae\xeb\xe0\xe3.\xa2\xaa\xed\xad", /* 0xe2 */ (unsigned char*)".\xe1\xa4\xab\xac\xe2\xe0\xee\xaa\xaf\xf7\xe6\xe7\xa6\xe8\xad\xe5\xa1\xa3\xa7\xa2", /* 0xe3 */ (unsigned char*)"\xa0\x69", /* 0xe4 */ (unsigned char*)".\xa0\xae\x69\xe2\xe3\xad", /* 0xe5 */ (unsigned char*)"\xec\x69\xa0\xeb\xe6\xa5\xef\xaa\xed\xf1", /* 0xe6 */ (unsigned char*)"\xa0\xeb\xad\xed\xe3.\xae\xaa", /* 0xe7 */ (unsigned char*)"\xe2\xeb\xe7\xa0.\xaa\xab\xed\xad", /* 0xe8 */ (unsigned char*)".\xac\xef\xab\xe5\xad\xaa\xe6\xf7\xe1\xa2\xe2\xe7\x69\xe0\xa9\xaf\xa1\xa3\xe8\xa4\xa7", /* 0xeb */ (unsigned char*)".\xad\xaa\xe6\xac\xe8\xa2\xe1", /* 0xec */ (unsigned char*)"\xe2\xad\xe0.\xab\xa9\xa1\xe1", /* 0xed */ (unsigned char*)".\xe7\xe6\xa4", /* 0xee */ (unsigned char*)".\xaa\xad\xa3\xe0\xab\xa4\xf7\xac\xe6\xa5\xe8\xe1\xa2\xe2\xa1\xa7\xe7\xaf\xe5\xa6", /* 0xef */ (unsigned char*)"\xad", /* 0xf0 */ (unsigned char*)"\xad.\xa9", /* 0xf1 */ (unsigned char*)".\xe1\xad\xab\xa4\xe8\xa6\xa2\xa7\xaa", /* 0xf7 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_ISO88595[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 137, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 5987, 651, 1083, 728, 1220, 1497, 282, 1029, /* 0xd0 */ 0, 380, 1400, 1540, 1111, 2360, 1390, 1015, /* 0xd8 */ 1623, 1555, 1345, 1172, 0, 424, 896, 556, /* 0xe0 */ 445, 0, 0, 1673, 602, 381, 227, 1394, /* 0xe8 */ 0, 187, 0, 0, 0, 0, 1491, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 939, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char LETTER_ISO88595[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 2, 255, 255, 255, 255, 3, 255, /* 0xa0 */ 255, 255, 255, 255, 255, 0, 255, 255, /* 0xa8 */ 6, 7, 8, 9, 255, 255, 255, 10, /* 0xb0 */ 255, 255, 11, 255, 12, 13, 255, 14, /* 0xb8 */ 15, 255, 16, 17, 255, 255, 255, 255, /* 0xc0 */ 255, 255, 255, 255, 255, 255, 255, 18, /* 0xc8 */ 19, 20, 21, 22, 23, 24, 25, 26, /* 0xd0 */ 255, 27, 28, 29, 30, 31, 32, 33, /* 0xd8 */ 34, 35, 36, 37, 38, 39, 40, 41, /* 0xe0 */ 42, 255, 255, 43, 44, 45, 46, 47, /* 0xe8 */ 0, 5, 255, 255, 255, 255, 4, 255, /* 0xf0 */ 255, 255, 255, 255, 255, 0, 1, 255, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char *PAIR_ISO88595[] = { (unsigned char*)"\xdf\xdd\xe1\xd7\xd0\xd4\xef\xd2\xe2\xd1\xda\xdc\xf6\xd3\xfe\xe0\xe3\xe8\xdb\xb0\xe7\xe6\xe5\xd6\xbf\xbd\xc1\xb1\xf1\xbc\xb2\xba\xcf\xc3\xb4\xb7\xc2\xb3\xa6\xc0\xc5\xbb\xe4\xc8\xd5\xc7\xa1", /* FILLCHAR */ (unsigned char*)".\xe1\xdd\xdb\xd4\xe8\xd6\xd2\xd7\xda", /* 0xfe */ (unsigned char*)"\xdd", /* 0xa1 */ (unsigned char*)".", /* 0xa6 */ (unsigned char*)".\xdd\xda\xdb\xe6\xe1\xdc\xe5\xfe\xe0\xe7\xef\xd2\xe2\xd4\xd7\xe8", /* 0xf6 */ (unsigned char*)"\xdd.\xd9", /* 0xf1 */ (unsigned char*)".\xdb", /* 0xb0 */ (unsigned char*)"\xd5\xd0", /* 0xb1 */ (unsigned char*)"\xde", /* 0xb2 */ (unsigned char*)"\xed", /* 0xb3 */ (unsigned char*)"\xd0", /* 0xb7 */ (unsigned char*)"\xd0", /* 0xba */ (unsigned char*)"\xd0", /* 0xbc */ (unsigned char*)"\xd0\xd5", /* 0xbd */ (unsigned char*)"\xd0\xe0", /* 0xbf */ (unsigned char*)"\xd0", /* 0xc0 */ (unsigned char*)"\xd0", /* 0xc2 */ (unsigned char*)".", /* 0xc3 */ (unsigned char*)".", /* 0xcf */ (unsigned char*)".\xdb\xd4\xe0\xe1\xfe\xdd\xdc\xd2\xda\xd3\xe6\xd9\xd1\xd7\xe2\xdf\xe7\xd5\xef\xe5\xee\xe8\xd6\xf1\xe4\xf6", /* 0xd0 */ (unsigned char*)"\xeb\xd0\xd5\xde.\xe0\xe3\xf6\xdb\xef\xdd", /* 0xd1 */ (unsigned char*)"\xd0\xeb\xd5\xde\xf6\xef\xe3.", /* 0xd2 */ (unsigned char*)"\xd0\xde\xed.\xdb\xe3\xe0\xf6\xdd\xd5", /* 0xd3 */ (unsigned char*)"\xd0\xd7.\xeb\xdd\xe3\xde\xe0\xda\xd2\xdb\xd6\xe1\xed\xe7", /* 0xd4 */ (unsigned char*)".\xe0\xdd\xdb\xd4\xe1\xe6\xd9\xfe\xdc\xda\xe2\xd7\xe8\xe7\xd2\xdf\xd5\xd6\xd1", /* 0xd5 */ (unsigned char*)"\xd0\xeb.\xdd\xde", /* 0xd6 */ (unsigned char*)"\xd0.\xd5\xf6\xdd\xef\xd2\xec\xe3\xd4\xe0\xdc\xd1\xd3\xdb\xeb", /* 0xd7 */ (unsigned char*)".\xdd\xe8\xe1", /* 0xd9 */ (unsigned char*)"\xd0.\xf6\xe3\xde\xe0\xdb\xe2\xe1\xdd", /* 0xda */ (unsigned char*)"\xd0\xf6\xec\xd5\xef\xde.\xee\xeb\xe3\xf1", /* 0xdb */ (unsigned char*)".\xd0\xf6\xd5\xde\xe3\xef\xeb\xdd\xdb", /* 0xdc */ (unsigned char*)"\xd0\xd5\xeb\xf6.\xef\xe3\xdd\xde\xec\xe2\xe1\xda\xe6\xd4\xe8\xe7", /* 0xdd */ (unsigned char*)".\xfe\xdb\xd4\xe0\xd2\xdd\xe1\xd9\xd3\xdc\xd6\xd1\xe2\xda\xe7\xd5\xd7\xdf\xe8\xe6\xe5", /* 0xde */ (unsigned char*)"\xd0\xe0\xd5\xde\xdb\xf6\xeb\xe3.\xef", /* 0xdf */ (unsigned char*)"\xd0\xeb\xde\xe3\xed.\xdd\xda\xe2\xe8\xdc\xd3\xd2\xe1", /* 0xe0 */ (unsigned char*)"\xe2\xef\xda\xd0\xe6\xdf\xec.\xe3\xdb\xd2\xf6\xd5\xdd\xf1\xde\xeb\xdc", /* 0xe1 */ (unsigned char*)"\xd0\xde\xeb\xe0\xe3.\xd2\xda\xed\xdd", /* 0xe2 */ (unsigned char*)".\xe1\xd4\xdb\xdc\xe2\xe0\xee\xda\xdf\xfe\xe6\xe7\xd6\xe8\xdd\xe5\xd1\xd3\xd7\xd2", /* 0xe3 */ (unsigned char*)"\xd0", /* 0xe4 */ (unsigned char*)".\xd0\xde\xe2\xf6\xe3\xdd", /* 0xe5 */ (unsigned char*)"\xec\xd0\xeb\xf6\xe6\xd5\xef.\xda\xed", /* 0xe6 */ (unsigned char*)"\xd0\xeb\xdd\xed\xe3.\xde\xda", /* 0xe7 */ (unsigned char*)"\xe2\xeb\xe7\xd0.\xda\xdb\xed\xdd", /* 0xe8 */ (unsigned char*)".\xdc\xef\xdb\xe5\xdd\xda\xe6\xfe\xe1\xd2\xe2\xe7\xe0\xd9\xdf\xf6\xd1\xd3\xe8\xd4\xd7", /* 0xeb */ (unsigned char*)".\xdd\xda\xe6\xdc\xe8\xd2\xe1", /* 0xec */ (unsigned char*)"\xe2\xdd\xe0.\xdb\xd9\xd1\xe1", /* 0xed */ (unsigned char*)".\xe7\xe6\xd4", /* 0xee */ (unsigned char*)".\xda\xdd\xd3\xe0\xdb\xd4\xfe\xdc\xe6\xd5\xe8\xe1\xd2\xe2\xd1\xd7\xe7\xdf\xe5", /* 0xef */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_KOI8UNI[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 187, 0, 0, 1491, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 939, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 227, 5987, 651, 896, 1220, 1497, 0, 728, /* 0xc0 */ 424, 0, 380, 1400, 1540, 1111, 2360, 1390, /* 0xc8 */ 1015, 1394, 1623, 1555, 1345, 1172, 282, 1083, /* 0xd0 */ 602, 1673, 1029, 445, 381, 0, 556, 0, /* 0xd8 */ 0, 137, 0, 0, 0, 0, 0, 0, /* 0xe0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char LETTER_KOI8UNI[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 255, 255, 5, 255, 255, 4, 255, /* 0xa0 */ 255, 255, 255, 255, 255, 255, 1, 255, /* 0xa8 */ 0, 255, 255, 2, 255, 255, 3, 255, /* 0xb0 */ 255, 255, 255, 255, 255, 255, 255, 255, /* 0xb8 */ 46, 19, 20, 40, 23, 24, 38, 22, /* 0xc0 */ 39, 255, 27, 28, 29, 30, 31, 32, /* 0xc8 */ 33, 47, 34, 35, 36, 37, 25, 21, /* 0xd0 */ 44, 43, 26, 42, 45, 255, 41, 255, /* 0xd8 */ 255, 6, 7, 255, 255, 255, 255, 9, /* 0xe0 */ 255, 255, 255, 11, 255, 12, 13, 255, /* 0xe8 */ 14, 18, 15, 255, 16, 17, 255, 8, /* 0xf0 */ 255, 255, 10, 255, 255, 255, 255, 255, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char *PAIR_KOI8UNI[] = { (unsigned char*)"\xd0\xce\xd3\xda\xc1\xc4\xd1\xd7\xd4\xc2\xcb\xcd\xa6\xc7\xae\xd2\xd5\xdb\xcc\xe1\xde\xc3\xc8\xd6\xf0\xee\xf3\xe2\xa3\xed\xf7\xeb\xf1\xf5\xe4\xfa\xf4\xe7\xb6\xf2\xe8\xec\xc6\xfb\xc5\xfe\xb3", /* FILLCHAR */ (unsigned char*)".\xd3\xce\xcc\xc4\xdb\xd6\xd7\xda\xcb", /* 0xae */ (unsigned char*)"\xce", /* 0xb3 */ (unsigned char*)".", /* 0xb6 */ (unsigned char*)".\xce\xcb\xcc\xc3\xd3\xcd\xc8\xae\xd2\xde\xd1\xd7\xd4\xc4\xda\xdb", /* 0xa6 */ (unsigned char*)"\xce.\xca", /* 0xa3 */ (unsigned char*)".\xcc", /* 0xe1 */ (unsigned char*)"\xc5\xc1", /* 0xe2 */ (unsigned char*)"\xcf", /* 0xf7 */ (unsigned char*)"\xdc", /* 0xe7 */ (unsigned char*)"\xc1", /* 0xfa */ (unsigned char*)"\xc1", /* 0xeb */ (unsigned char*)"\xc1", /* 0xed */ (unsigned char*)"\xc1\xc5", /* 0xee */ (unsigned char*)"\xc1\xd2", /* 0xf0 */ (unsigned char*)"\xc1", /* 0xf2 */ (unsigned char*)"\xc1", /* 0xf4 */ (unsigned char*)".", /* 0xf5 */ (unsigned char*)".", /* 0xf1 */ (unsigned char*)".\xcc\xc4\xd2\xd3\xae\xce\xcd\xd7\xcb\xc7\xc3\xca\xc2\xda\xd4\xd0\xde\xc5\xd1\xc8\xc0\xdb\xd6\xa3\xc6\xa6", /* 0xc1 */ (unsigned char*)"\xd9\xc1\xc5\xcf.\xd2\xd5\xa6\xcc\xd1\xce", /* 0xc2 */ (unsigned char*)"\xc1\xd9\xc5\xcf\xa6\xd1\xd5.", /* 0xd7 */ (unsigned char*)"\xc1\xcf\xdc.\xcc\xd5\xd2\xa6\xce\xc5", /* 0xc7 */ (unsigned char*)"\xc1\xda.\xd9\xce\xd5\xcf\xd2\xcb\xd7\xcc\xd6\xd3\xdc\xde", /* 0xc4 */ (unsigned char*)".\xd2\xce\xcc\xc4\xd3\xc3\xca\xae\xcd\xcb\xd4\xda\xdb\xde\xd7\xd0\xc5\xd6\xc2", /* 0xc5 */ (unsigned char*)"\xc1\xd9.\xce\xcf", /* 0xd6 */ (unsigned char*)"\xc1.\xc5\xa6\xce\xd1\xd7\xd8\xd5\xc4\xd2\xcd\xc2\xc7\xcc\xd9", /* 0xda */ (unsigned char*)".\xce\xdb\xd3", /* 0xca */ (unsigned char*)"\xc1.\xa6\xd5\xcf\xd2\xcc\xd4\xd3\xce", /* 0xcb */ (unsigned char*)"\xc1\xa6\xd8\xc5\xd1\xcf.\xc0\xd9\xd5\xa3", /* 0xcc */ (unsigned char*)".\xc1\xa6\xc5\xcf\xd5\xd1\xd9\xce\xcc", /* 0xcd */ (unsigned char*)"\xc1\xc5\xd9\xa6.\xd1\xd5\xce\xcf\xd8\xd4\xd3\xcb\xc3\xc4\xdb\xde", /* 0xce */ (unsigned char*)".\xae\xcc\xc4\xd2\xd7\xce\xd3\xca\xc7\xcd\xd6\xc2\xd4\xcb\xde\xc5\xda\xd0\xdb\xc3\xc8", /* 0xcf */ (unsigned char*)"\xc1\xd2\xc5\xcf\xcc\xa6\xd9\xd5.\xd1", /* 0xd0 */ (unsigned char*)"\xc1\xd9\xcf\xd5\xdc.\xce\xcb\xd4\xdb\xcd\xc7\xd7\xd3", /* 0xd2 */ (unsigned char*)"\xd4\xd1\xcb\xc1\xc3\xd0\xd8.\xd5\xcc\xd7\xa6\xc5\xce\xa3\xcf\xd9\xcd", /* 0xd3 */ (unsigned char*)"\xc1\xcf\xd9\xd2\xd5.\xd7\xcb\xdc\xce", /* 0xd4 */ (unsigned char*)".\xd3\xc4\xcc\xcd\xd4\xd2\xc0\xcb\xd0\xae\xc3\xde\xd6\xdb\xce\xc8\xc2\xc7\xda\xd7", /* 0xd5 */ (unsigned char*)"\xc1", /* 0xc6 */ (unsigned char*)".\xc1\xcf\xd4\xa6\xd5\xce", /* 0xc8 */ (unsigned char*)"\xd8\xc1\xd9\xa6\xc3\xc5\xd1.\xcb\xdc", /* 0xc3 */ (unsigned char*)"\xc1\xd9\xce\xdc\xd5.\xcf\xcb", /* 0xde */ (unsigned char*)"\xd4\xd9\xde\xc1.\xcb\xcc\xdc\xce", /* 0xdb */ (unsigned char*)".\xcd\xd1\xcc\xc8\xce\xcb\xc3\xae\xd3\xd7\xd4\xde\xd2\xca\xd0\xa6\xc2\xc7\xdb\xc4\xda", /* 0xd9 */ (unsigned char*)".\xce\xcb\xc3\xcd\xdb\xd7\xd3", /* 0xd8 */ (unsigned char*)"\xd4\xce\xd2.\xcc\xca\xc2\xd3", /* 0xdc */ (unsigned char*)".\xde\xc3\xc4", /* 0xc0 */ (unsigned char*)".\xcb\xce\xc7\xd2\xcc\xc4\xae\xcd\xc3\xc5\xdb\xd3\xd7\xd4\xc2\xda\xde\xd0\xc8", /* 0xd1 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_MACCYR[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 137, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 1491, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 939, 0, 0, 0, 0, 187, 1394, /* 0xd8 */ 5987, 651, 1083, 728, 1220, 1497, 282, 1029, /* 0xe0 */ 0, 380, 1400, 1540, 1111, 2360, 1390, 1015, /* 0xe8 */ 1623, 1555, 1345, 1172, 0, 424, 896, 556, /* 0xf0 */ 445, 0, 0, 1673, 602, 381, 227, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char LETTER_MACCYR[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 6, 7, 8, 9, 255, 255, 255, 10, /* 0x80 */ 255, 255, 11, 255, 12, 13, 255, 14, /* 0x88 */ 15, 255, 16, 17, 255, 255, 255, 255, /* 0x90 */ 255, 255, 255, 255, 255, 255, 255, 18, /* 0x98 */ 0, 0, 255, 0, 0, 0, 0, 3, /* 0xa0 */ 0, 0, 0, 255, 255, 0, 255, 255, /* 0xa8 */ 0, 0, 0, 0, 4, 0, 255, 255, /* 0xb0 */ 255, 255, 255, 255, 255, 255, 255, 255, /* 0xb8 */ 255, 255, 0, 0, 255, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 255, 255, 255, 255, 255, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 255, 1, 255, 255, 0, 2, 5, 47, /* 0xd8 */ 19, 20, 21, 22, 23, 24, 25, 26, /* 0xe0 */ 255, 27, 28, 29, 30, 31, 32, 33, /* 0xe8 */ 34, 35, 36, 37, 38, 39, 40, 41, /* 0xf0 */ 42, 255, 255, 43, 44, 45, 46, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char *PAIR_MACCYR[] = { (unsigned char*)"\xef\xed\xf1\xe7\xe0\xe4\xdf\xe2\xf2\xe1\xea\xec\xb4\xe3\xd9\xf0\xf3\xf8\xeb\x80\xf7\xf6\xf5\xe6\x8f\x8d\x91\x81\xde\x8c\x82\x8a\x9f\x93\x84\x87\x92\x83\xa7\x90\x95\x8b\xf4\x98\xe5\x97\xdd", /* FILLCHAR */ (unsigned char*)".\xf1\xed\xeb\xe4\xf8\xe6\xe2\xe7\xea", /* 0xd9 */ (unsigned char*)"\xed", /* 0xdd */ (unsigned char*)".", /* 0xa7 */ (unsigned char*)".\xed\xea\xeb\xf6\xf1\xec\xf5\xd9\xf0\xf7\xdf\xe2\xf2\xe4\xe7\xf8", /* 0xb4 */ (unsigned char*)"\xed.\xe9", /* 0xde */ (unsigned char*)".\xeb", /* 0x80 */ (unsigned char*)"\xe5\xe0", /* 0x81 */ (unsigned char*)"\xee", /* 0x82 */ (unsigned char*)"\xfd", /* 0x83 */ (unsigned char*)"\xe0", /* 0x87 */ (unsigned char*)"\xe0", /* 0x8a */ (unsigned char*)"\xe0", /* 0x8c */ (unsigned char*)"\xe0\xe5", /* 0x8d */ (unsigned char*)"\xe0\xf0", /* 0x8f */ (unsigned char*)"\xe0", /* 0x90 */ (unsigned char*)"\xe0", /* 0x92 */ (unsigned char*)".", /* 0x93 */ (unsigned char*)".", /* 0x9f */ (unsigned char*)".\xeb\xe4\xf0\xf1\xd9\xed\xec\xe2\xea\xe3\xf6\xe9\xe1\xe7\xf2\xef\xf7\xe5\xdf\xf5\xfe\xf8\xe6\xde\xf4\xb4", /* 0xe0 */ (unsigned char*)"\xfb\xe0\xe5\xee.\xf0\xf3\xb4\xeb\xdf\xed", /* 0xe1 */ (unsigned char*)"\xe0\xfb\xe5\xee\xb4\xdf\xf3.", /* 0xe2 */ (unsigned char*)"\xe0\xee\xfd.\xeb\xf3\xf0\xb4\xed\xe5", /* 0xe3 */ (unsigned char*)"\xe0\xe7.\xfb\xed\xf3\xee\xf0\xea\xe2\xeb\xe6\xf1\xfd\xf7", /* 0xe4 */ (unsigned char*)".\xf0\xed\xeb\xe4\xf1\xf6\xe9\xd9\xec\xea\xf2\xe7\xf8\xf7\xe2\xef\xe5\xe6\xe1", /* 0xe5 */ (unsigned char*)"\xe0\xfb.\xed\xee", /* 0xe6 */ (unsigned char*)"\xe0.\xe5\xb4\xed\xdf\xe2\xfc\xf3\xe4\xf0\xec\xe1\xe3\xeb\xfb", /* 0xe7 */ (unsigned char*)".\xed\xf8\xf1", /* 0xe9 */ (unsigned char*)"\xe0.\xb4\xf3\xee\xf0\xeb\xf2\xf1\xed", /* 0xea */ (unsigned char*)"\xe0\xb4\xfc\xe5\xdf\xee.\xfe\xfb\xf3\xde", /* 0xeb */ (unsigned char*)".\xe0\xb4\xe5\xee\xf3\xdf\xfb\xed\xeb", /* 0xec */ (unsigned char*)"\xe0\xe5\xfb\xb4.\xdf\xf3\xed\xee\xfc\xf2\xf1\xea\xf6\xe4\xf8\xf7", /* 0xed */ (unsigned char*)".\xd9\xeb\xe4\xf0\xe2\xed\xf1\xe9\xe3\xec\xe6\xe1\xf2\xea\xf7\xe5\xe7\xef\xf8\xf6\xf5", /* 0xee */ (unsigned char*)"\xe0\xf0\xe5\xee\xeb\xb4\xfb\xf3.\xdf", /* 0xef */ (unsigned char*)"\xe0\xfb\xee\xf3\xfd.\xed\xea\xf2\xf8\xec\xe3\xe2\xf1", /* 0xf0 */ (unsigned char*)"\xf2\xdf\xea\xe0\xf6\xef\xfc.\xf3\xeb\xe2\xb4\xe5\xed\xde\xee\xfb\xec", /* 0xf1 */ (unsigned char*)"\xe0\xee\xfb\xf0\xf3.\xe2\xea\xfd\xed", /* 0xf2 */ (unsigned char*)".\xf1\xe4\xeb\xec\xf2\xf0\xfe\xea\xef\xd9\xf6\xf7\xe6\xf8\xed\xf5\xe1\xe3\xe7\xe2", /* 0xf3 */ (unsigned char*)"\xe0", /* 0xf4 */ (unsigned char*)".\xe0\xee\xf2\xb4\xf3\xed", /* 0xf5 */ (unsigned char*)"\xfc\xe0\xfb\xb4\xf6\xe5\xdf.\xea\xfd", /* 0xf6 */ (unsigned char*)"\xe0\xfb\xed\xfd\xf3.\xee\xea", /* 0xf7 */ (unsigned char*)"\xf2\xfb\xf7\xe0.\xea\xeb\xfd\xed", /* 0xf8 */ (unsigned char*)".\xec\xdf\xeb\xf5\xed\xea\xf6\xd9\xf1\xe2\xf2\xf7\xf0\xe9\xef\xb4\xe1\xe3\xf8\xe4\xe7", /* 0xfb */ (unsigned char*)".\xed\xea\xf6\xec\xf8\xe2\xf1", /* 0xfc */ (unsigned char*)"\xf2\xed\xf0.\xeb\xe9\xe1\xf1", /* 0xfd */ (unsigned char*)".\xf7\xf6\xe4", /* 0xfe */ (unsigned char*)".\xea\xed\xe3\xf0\xeb\xe4\xd9\xec\xf6\xe5\xf8\xf1\xe2\xf2\xe1\xe7\xf7\xef\xf5", /* 0xdf */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_IBM855[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 187, 0, 0, 0, /* 0x80 */ 0, 0, 1491, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 939, 0, 0, 0, 227, 0, 0, 0, /* 0x98 */ 5987, 137, 651, 0, 896, 0, 1220, 0, /* 0xa0 */ 1497, 0, 0, 0, 728, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 424, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 380, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 1400, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 1540, 0, 1111, 0, 2360, 0, 1390, 0, /* 0xd0 */ 1015, 0, 0, 0, 0, 0, 1394, 0, /* 0xd8 */ 0, 1623, 0, 1555, 0, 1345, 0, 1172, /* 0xe0 */ 0, 282, 0, 1083, 0, 602, 0, 0, /* 0xe8 */ 0, 1673, 0, 1029, 0, 445, 0, 381, /* 0xf0 */ 0, 0, 0, 556, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char LETTER_IBM855[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 255, 255, 255, 255, 5, 2, 255, 255, /* 0x80 */ 255, 255, 4, 3, 255, 255, 255, 255, /* 0x88 */ 255, 255, 255, 255, 255, 0, 255, 255, /* 0x90 */ 1, 255, 255, 255, 46, 255, 255, 255, /* 0x98 */ 19, 6, 20, 7, 40, 255, 23, 255, /* 0xa0 */ 24, 255, 38, 255, 22, 9, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 39, 255, 255, /* 0xb0 */ 255, 0, 0, 0, 0, 27, 255, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 28, 11, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 29, 255, 30, 12, 31, 13, 32, 255, /* 0xd0 */ 33, 0, 0, 0, 0, 14, 47, 0, /* 0xd8 */ 18, 34, 15, 35, 255, 36, 16, 37, /* 0xe0 */ 17, 25, 255, 21, 8, 44, 255, 0, /* 0xe8 */ 0, 43, 255, 26, 10, 42, 255, 45, /* 0xf0 */ 255, 255, 255, 41, 255, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char *PAIR_IBM855[] = { (unsigned char*)"\xd8\xd4\xe3\xf3\xa0\xa6\xde\xeb\xe5\xa2\xc6\xd2\x8a\xac\x98\xe1\xe7\xf5\xd0\xa1\xfb\xa4\xb5\xe9\xdd\xd5\xe4\xa3\x84\xd3\xec\xc7\xe0\xe8\xa7\xf4\xe6\xad\x8b\xe2\xb6\xd1\xaa\xf6\xa8\xfc\x85", /* FILLCHAR */ (unsigned char*)".\xe3\xd4\xd0\xa6\xf5\xe9\xeb\xf3\xc6", /* 0x98 */ (unsigned char*)"\xd4", /* 0x85 */ (unsigned char*)".", /* 0x8b */ (unsigned char*)".\xd4\xc6\xd0\xa4\xe3\xd2\xb5\x98\xe1\xfb\xde\xeb\xe5\xa6\xf3\xf5", /* 0x8a */ (unsigned char*)"\xd4.\xbd", /* 0x84 */ (unsigned char*)".\xd0", /* 0xa1 */ (unsigned char*)"\xa8\xa0", /* 0xa3 */ (unsigned char*)"\xd6", /* 0xec */ (unsigned char*)"\xf7", /* 0xad */ (unsigned char*)"\xa0", /* 0xf4 */ (unsigned char*)"\xa0", /* 0xc7 */ (unsigned char*)"\xa0", /* 0xd3 */ (unsigned char*)"\xa0\xa8", /* 0xd5 */ (unsigned char*)"\xa0\xe1", /* 0xdd */ (unsigned char*)"\xa0", /* 0xe2 */ (unsigned char*)"\xa0", /* 0xe6 */ (unsigned char*)".", /* 0xe8 */ (unsigned char*)".", /* 0xe0 */ (unsigned char*)".\xd0\xa6\xe1\xe3\x98\xd4\xd2\xeb\xc6\xac\xa4\xbd\xa2\xf3\xe5\xd8\xfb\xa8\xde\xb5\x9c\xf5\xe9\x84\xaa\x8a", /* 0xa0 */ (unsigned char*)"\xf1\xa0\xa8\xd6.\xe1\xe7\x8a\xd0\xde\xd4", /* 0xa2 */ (unsigned char*)"\xa0\xf1\xa8\xd6\x8a\xde\xe7.", /* 0xeb */ (unsigned char*)"\xa0\xd6\xf7.\xd0\xe7\xe1\x8a\xd4\xa8", /* 0xac */ (unsigned char*)"\xa0\xf3.\xf1\xd4\xe7\xd6\xe1\xc6\xeb\xd0\xe9\xe3\xf7\xfb", /* 0xa6 */ (unsigned char*)".\xe1\xd4\xd0\xa6\xe3\xa4\xbd\x98\xd2\xc6\xe5\xf3\xf5\xfb\xeb\xd8\xa8\xe9\xa2", /* 0xa8 */ (unsigned char*)"\xa0\xf1.\xd4\xd6", /* 0xe9 */ (unsigned char*)"\xa0.\xa8\x8a\xd4\xde\xeb\xed\xe7\xa6\xe1\xd2\xa2\xac\xd0\xf1", /* 0xf3 */ (unsigned char*)".\xd4\xf5\xe3", /* 0xbd */ (unsigned char*)"\xa0.\x8a\xe7\xd6\xe1\xd0\xe5\xe3\xd4", /* 0xc6 */ (unsigned char*)"\xa0\x8a\xed\xa8\xde\xd6.\x9c\xf1\xe7\x84", /* 0xd0 */ (unsigned char*)".\xa0\x8a\xa8\xd6\xe7\xde\xf1\xd4\xd0", /* 0xd2 */ (unsigned char*)"\xa0\xa8\xf1\x8a.\xde\xe7\xd4\xd6\xed\xe5\xe3\xc6\xa4\xa6\xf5\xfb", /* 0xd4 */ (unsigned char*)".\x98\xd0\xa6\xe1\xeb\xd4\xe3\xbd\xac\xd2\xe9\xa2\xe5\xc6\xfb\xa8\xf3\xd8\xf5\xa4\xb5", /* 0xd6 */ (unsigned char*)"\xa0\xe1\xa8\xd6\xd0\x8a\xf1\xe7.\xde", /* 0xd8 */ (unsigned char*)"\xa0\xf1\xd6\xe7\xf7.\xd4\xc6\xe5\xf5\xd2\xac\xeb\xe3", /* 0xe1 */ (unsigned char*)"\xe5\xde\xc6\xa0\xa4\xd8\xed.\xe7\xd0\xeb\x8a\xa8\xd4\x84\xd6\xf1\xd2", /* 0xe3 */ (unsigned char*)"\xa0\xd6\xf1\xe1\xe7.\xeb\xc6\xf7\xd4", /* 0xe5 */ (unsigned char*)".\xe3\xa6\xd0\xd2\xe5\xe1\x9c\xc6\xd8\x98\xa4\xfb\xe9\xf5\xd4\xb5\xa2\xac\xf3\xeb", /* 0xe7 */ (unsigned char*)"\xa0", /* 0xaa */ (unsigned char*)".\xa0\xd6\xe5\x8a\xe7\xd4", /* 0xb5 */ (unsigned char*)"\xed\xa0\xf1\x8a\xa4\xa8\xde.\xc6\xf7", /* 0xa4 */ (unsigned char*)"\xa0\xf1\xd4\xf7\xe7.\xd6\xc6", /* 0xfb */ (unsigned char*)"\xe5\xf1\xfb\xa0.\xc6\xd0\xf7\xd4", /* 0xf5 */ (unsigned char*)".\xd2\xde\xd0\xb5\xd4\xc6\xa4\x98\xe3\xeb\xe5\xfb\xe1\xbd\xd8\x8a\xa2\xac\xf5\xa6\xf3", /* 0xf1 */ (unsigned char*)".\xd4\xc6\xa4\xd2\xf5\xeb\xe3", /* 0xed */ (unsigned char*)"\xe5\xd4\xe1.\xd0\xbd\xa2\xe3", /* 0xf7 */ (unsigned char*)".\xfb\xa4\xa6", /* 0x9c */ (unsigned char*)".\xc6\xd4\xac\xe1\xd0\xa6\x98\xd2\xa4\xa8\xf5\xe3\xeb\xe5\xa2\xf3\xfb\xd8\xb5", /* 0xde */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_KOI8U[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 939, 187, 0, 0, 1491, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 227, 5987, 651, 896, 1220, 1497, 0, 728, /* 0xc0 */ 424, 0, 380, 1400, 1540, 1111, 2360, 1390, /* 0xc8 */ 1015, 1394, 1623, 1555, 1345, 1172, 282, 1083, /* 0xd0 */ 602, 1673, 1029, 445, 381, 0, 556, 0, /* 0xd8 */ 0, 137, 0, 0, 0, 0, 0, 0, /* 0xe0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char LETTER_KOI8U[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 1, 5, 255, 0, 4, 255, /* 0xa0 */ 0, 0, 0, 0, 0, 255, 0, 0, /* 0xa8 */ 0, 0, 0, 2, 255, 0, 3, 255, /* 0xb0 */ 0, 0, 0, 0, 0, 255, 0, 0, /* 0xb8 */ 46, 19, 20, 40, 23, 24, 38, 22, /* 0xc0 */ 39, 255, 27, 28, 29, 30, 31, 32, /* 0xc8 */ 33, 47, 34, 35, 36, 37, 25, 21, /* 0xd0 */ 44, 43, 26, 42, 45, 255, 41, 255, /* 0xd8 */ 255, 6, 7, 255, 255, 255, 255, 9, /* 0xe0 */ 255, 255, 255, 11, 255, 12, 13, 255, /* 0xe8 */ 14, 18, 15, 255, 16, 17, 255, 8, /* 0xf0 */ 255, 255, 10, 255, 255, 255, 255, 255, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char *PAIR_KOI8U[] = { (unsigned char*)"\xd0\xce\xd3\xda\xc1\xc4\xd1\xd7\xd4\xc2\xcb\xcd\xa6\xc7\xa2\xd2\xd5\xdb\xcc\xe1\xde\xc3\xc8\xd6\xf0\xee\xf3\xe2\xa3\xed\xf7\xeb\xf1\xf5\xe4\xfa\xf4\xe7\xb6\xf2\xe8\xec\xc6\xfb\xc5\xfe\xb3", /* FILLCHAR */ (unsigned char*)".\xd3\xce\xcc\xc4\xdb\xd6\xd7\xda\xcb", /* 0xa2 */ (unsigned char*)"\xce", /* 0xb3 */ (unsigned char*)".", /* 0xb6 */ (unsigned char*)".\xce\xcb\xcc\xc3\xd3\xcd\xc8\xa2\xd2\xde\xd1\xd7\xd4\xc4\xda\xdb", /* 0xa6 */ (unsigned char*)"\xce.\xca", /* 0xa3 */ (unsigned char*)".\xcc", /* 0xe1 */ (unsigned char*)"\xc5\xc1", /* 0xe2 */ (unsigned char*)"\xcf", /* 0xf7 */ (unsigned char*)"\xdc", /* 0xe7 */ (unsigned char*)"\xc1", /* 0xfa */ (unsigned char*)"\xc1", /* 0xeb */ (unsigned char*)"\xc1", /* 0xed */ (unsigned char*)"\xc1\xc5", /* 0xee */ (unsigned char*)"\xc1\xd2", /* 0xf0 */ (unsigned char*)"\xc1", /* 0xf2 */ (unsigned char*)"\xc1", /* 0xf4 */ (unsigned char*)".", /* 0xf5 */ (unsigned char*)".", /* 0xf1 */ (unsigned char*)".\xcc\xc4\xd2\xd3\xa2\xce\xcd\xd7\xcb\xc7\xc3\xca\xc2\xda\xd4\xd0\xde\xc5\xd1\xc8\xc0\xdb\xd6\xa3\xc6\xa6", /* 0xc1 */ (unsigned char*)"\xd9\xc1\xc5\xcf.\xd2\xd5\xa6\xcc\xd1\xce", /* 0xc2 */ (unsigned char*)"\xc1\xd9\xc5\xcf\xa6\xd1\xd5.", /* 0xd7 */ (unsigned char*)"\xc1\xcf\xdc.\xcc\xd5\xd2\xa6\xce\xc5", /* 0xc7 */ (unsigned char*)"\xc1\xda.\xd9\xce\xd5\xcf\xd2\xcb\xd7\xcc\xd6\xd3\xdc\xde", /* 0xc4 */ (unsigned char*)".\xd2\xce\xcc\xc4\xd3\xc3\xca\xa2\xcd\xcb\xd4\xda\xdb\xde\xd7\xd0\xc5\xd6\xc2", /* 0xc5 */ (unsigned char*)"\xc1\xd9.\xce\xcf", /* 0xd6 */ (unsigned char*)"\xc1.\xc5\xa6\xce\xd1\xd7\xd8\xd5\xc4\xd2\xcd\xc2\xc7\xcc\xd9", /* 0xda */ (unsigned char*)".\xce\xdb\xd3", /* 0xca */ (unsigned char*)"\xc1.\xa6\xd5\xcf\xd2\xcc\xd4\xd3\xce", /* 0xcb */ (unsigned char*)"\xc1\xa6\xd8\xc5\xd1\xcf.\xc0\xd9\xd5\xa3", /* 0xcc */ (unsigned char*)".\xc1\xa6\xc5\xcf\xd5\xd1\xd9\xce\xcc", /* 0xcd */ (unsigned char*)"\xc1\xc5\xd9\xa6.\xd1\xd5\xce\xcf\xd8\xd4\xd3\xcb\xc3\xc4\xdb\xde", /* 0xce */ (unsigned char*)".\xa2\xcc\xc4\xd2\xd7\xce\xd3\xca\xc7\xcd\xd6\xc2\xd4\xcb\xde\xc5\xda\xd0\xdb\xc3\xc8", /* 0xcf */ (unsigned char*)"\xc1\xd2\xc5\xcf\xcc\xa6\xd9\xd5.\xd1", /* 0xd0 */ (unsigned char*)"\xc1\xd9\xcf\xd5\xdc.\xce\xcb\xd4\xdb\xcd\xc7\xd7\xd3", /* 0xd2 */ (unsigned char*)"\xd4\xd1\xcb\xc1\xc3\xd0\xd8.\xd5\xcc\xd7\xa6\xc5\xce\xa3\xcf\xd9\xcd", /* 0xd3 */ (unsigned char*)"\xc1\xcf\xd9\xd2\xd5.\xd7\xcb\xdc\xce", /* 0xd4 */ (unsigned char*)".\xd3\xc4\xcc\xcd\xd4\xd2\xc0\xcb\xd0\xa2\xc3\xde\xd6\xdb\xce\xc8\xc2\xc7\xda\xd7", /* 0xd5 */ (unsigned char*)"\xc1", /* 0xc6 */ (unsigned char*)".\xc1\xcf\xd4\xa6\xd5\xce", /* 0xc8 */ (unsigned char*)"\xd8\xc1\xd9\xa6\xc3\xc5\xd1.\xcb\xdc", /* 0xc3 */ (unsigned char*)"\xc1\xd9\xce\xdc\xd5.\xcf\xcb", /* 0xde */ (unsigned char*)"\xd4\xd9\xde\xc1.\xcb\xcc\xdc\xce", /* 0xdb */ (unsigned char*)".\xcd\xd1\xcc\xc8\xce\xcb\xc3\xa2\xd3\xd7\xd4\xde\xd2\xca\xd0\xa6\xc2\xc7\xdb\xc4\xda", /* 0xd9 */ (unsigned char*)".\xce\xcb\xc3\xcd\xdb\xd7\xd3", /* 0xd8 */ (unsigned char*)"\xd4\xce\xd2.\xcc\xca\xc2\xd3", /* 0xdc */ (unsigned char*)".\xde\xc3\xc4", /* 0xc0 */ (unsigned char*)".\xcb\xce\xc7\xd2\xcc\xc4\xa2\xcd\xc3\xc5\xdb\xd3\xd7\xd4\xc2\xda\xde\xd0\xc8", /* 0xd1 */ }; /* THIS IS A GENERATED TABLE, see data/totals.pl. */ static const unsigned short int SIGNIFICANT[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 280, 0, 0, 0, 187, 0, 0, 0, /* 0x80 */ 0, 0, 1491, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 939, 0, 0, 0, 227, 0, 0, 0, /* 0x98 */ 12228, 816, 3657, 1133, 2168, 1561, 4495, 1073, /* 0xa0 */ 1497, 397, 1460, 1606, 1887, 2459, 2387, 1057, /* 0xa8 */ 137, 0, 0, 1491, 1491, 424, 0, 0, /* 0xb0 */ 187, 0, 0, 0, 0, 380, 0, 0, /* 0xb8 */ 591, 11974, 1302, 1792, 2440, 2994, 1400, 1456, /* 0xc0 */ 848, 0, 760, 2800, 3080, 2222, 4720, 2780, /* 0xc8 */ 9557, 3439, 5440, 3838, 6270, 3841, 2236, 3195, /* 0xd0 */ 2219, 4665, 3458, 2430, 1873, 2360, 4083, 2409, /* 0xd8 */ 15289, 6375, 4912, 5405, 2440, 5204, 2393, 4366, /* 0xe0 */ 908, 1042, 2800, 7580, 3452, 6101, 3244, 4876, /* 0xe8 */ 3246, 5164, 2690, 3373, 0, 1293, 3283, 2472, /* 0xf0 */ 890, 0, 0, 3902, 1204, 762, 1393, 1394, /* 0xf8 */ }; /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define WEIGHT_SUM 36720 /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const char *const CHARSET_NAMES[] = { "cp1251", "ibm866", "iso88595", "koi8uni", "maccyr", "ibm855", "koi8u", }; /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const unsigned short int *const CHARSET_WEIGHTS[] = { RAW_CP1251, RAW_IBM866, RAW_ISO88595, RAW_KOI8UNI, RAW_MACCYR, RAW_IBM855, RAW_KOI8U, }; /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const unsigned char *const CHARSET_LETTERS[] = { LETTER_CP1251, LETTER_IBM866, LETTER_ISO88595, LETTER_KOI8UNI, LETTER_MACCYR, LETTER_IBM855, LETTER_KOI8U, }; /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const unsigned char **const CHARSET_PAIRS[] = { PAIR_CP1251, PAIR_IBM866, PAIR_ISO88595, PAIR_KOI8UNI, PAIR_MACCYR, PAIR_IBM855, PAIR_KOI8U, }; /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define NCHARSETS 7 Project-OSS-Revival-enca-36defd7/data/belarusian/cp1251.base000066400000000000000000000003221507545312400234100ustar00rootroot00000000000000 939 1491 187 137 5987 651 1083 728 1220 1497 282 1029 380 1400 1540 1111 2360 1390 1015 1623 1555 1345 1172 424 896 556 445 1673 602 381 227 1394 Project-OSS-Revival-enca-36defd7/data/belarusian/doit.sh000077500000000000000000000003501507545312400231400ustar00rootroot00000000000000#! /bin/bash grep -v '' cp1251.base | ../xlt ../maps/cp1251.map ../maps/ibm866.map\ >ibm866.base ../normalize.pl cp1251.base ibm866.xbase rm ibm866.base ../doit.sh cp1251 ibm866 iso88595 koi8uni maccyr ibm855 koi8u Project-OSS-Revival-enca-36defd7/data/belarusian/paircounts.cp1251000066400000000000000000000011241507545312400246660ustar00rootroot00000000000000.:òר :. : :. :. :. :. : : : : : : : : : : :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. : :. :. :. :. :. :. :. :. :. Project-OSS-Revival-enca-36defd7/data/belarusian/paircounts.ibm866000066400000000000000000000011351507545312400247700ustar00rootroot00000000000000.:i᧠⪣耫另I񓌊䖘 I:. i:.⢧ :. : : : : : : : : : : :. :. :. :. :.橡i :력i. :i :i. :.ઢ :.୫碯 :. :.iଡ :. :i. :i. :.i뭫 :i.㭮 :.ࢭᩣ祧 :८i :.謣 :猪i㫢. :. :.ᤫ塣 :i :.i :i :. :. :.孪i੯褧 :. :. :. :.૤⡧ : :. :.᭫覢 Project-OSS-Revival-enca-36defd7/data/belarusian/rawcounts.cp1251000066400000000000000000000042761507545312400245370ustar00rootroot000000000000000x09 . 1923 0x0a . 98633 0x0d . 20222 0x10 . 3 0x20 1500444 0x21 ! 4403 0x22 " 52979 0x23 # 3816 0x24 $ 2 0x25 % 480 0x26 & 7338 0x27 ' 3061 0x28 ( 3804 0x29 ) 3842 0x2a * 112 0x2b + 1146 0x2c , 86939 0x2d - 9782 0x2e . 75938 0x2f / 47631 0x30 0 12353 0x31 1 41640 0x32 2 12998 0x33 3 9557 0x34 4 8543 0x35 5 8525 0x36 6 8053 0x37 7 28159 0x38 8 9477 0x39 9 8496 0x3a : 5084 0x3b ; 9095 0x3c < 94257 0x3d = 29109 0x3e > 94342 0x3f ? 5693 0x40 @ 33 0x41 A 2011 0x42 B 1666 0x43 C 1831 0x44 D 1125 0x45 E 2516 0x46 F 1556 0x47 G 681 0x48 H 1367 0x49 I 3673 0x4a J 255 0x4b K 516 0x4c L 1581 0x4d M 981 0x4e N 2067 0x4f O 1681 0x50 P 2243 0x51 Q 121 0x52 R 2338 0x53 S 2155 0x54 T 2889 0x55 U 557 0x56 V 959 0x57 W 443 0x58 X 629 0x59 Y 252 0x5a Z 268 0x5b [ 171 0x5c \ 23 0x5d ] 171 0x5f _ 462 0x60 ` 26 0x61 a 70028 0x62 b 12407 0x63 c 9423 0x64 d 26286 0x65 e 55347 0x66 f 5261 0x67 g 5733 0x68 h 8719 0x69 i 68421 0x6a j 822 0x6b k 2336 0x6c l 11282 0x6d m 23072 0x6e n 33746 0x6f o 13238 0x70 p 45524 0x71 q 427 0x72 r 15846 0x73 s 16244 0x74 t 20968 0x75 u 4747 0x76 v 3397 0x77 w 3695 0x78 x 1260 0x79 y 2531 0x7a z 1666 0x7b { 183 0x7c | 116 0x7d } 183 0x7e ~ 13 0x7f . 30 0x84 64 0x85 478 0x92 462 0x93 1452 0x94 1417 0x96 562 0x97 20396 0x9a 2 0x9d 3 0xa0 1 0xa1 297 0xa2 93964 0xa8 1446 0xa9 4 0xaa 1 0xab 450 0xaf 3 0xb2 4693 0xb3 149120 0xb7 4 0xb8 18768 0xb9 175 0xbb 442 0xbf 7 0xc0 13704 0xc1 7306 0xc2 6072 0xc3 4710 0xc4 5121 0xc5 1198 0xc6 748 0xc7 4622 0xc8 575 0xc9 162 0xca 6378 0xcb 3131 0xcc 6195 0xcd 8428 0xce 1035 0xcf 7995 0xd0 4369 0xd1 8045 0xd2 4984 0xd3 5268 0xd4 920 0xd5 2711 0xd6 1599 0xd7 1673 0xd8 1778 0xd9 26 0xda 1 0xdb 633 0xdc 235 0xdd 365 0xde 580 0xdf 5244 0xe0 598769 0xe1 65173 0xe2 108380 0xe3 72835 0xe4 122086 0xe5 149700 0xe6 28212 0xe7 102941 0xe8 4930 0xe9 38082 0xea 140088 0xeb 154012 0xec 111138 0xed 236040 0xee 139014 0xef 101567 0xf0 162342 0xf1 155543 0xf2 134516 0xf3 117245 0xf4 5538 0xf5 42419 0xf6 89686 0xf7 55672 0xf8 44530 0xf9 213 0xfa 51 0xfb 167379 0xfc 60244 0xfd 38167 0xfe 22715 0xff 139416 Project-OSS-Revival-enca-36defd7/data/bulgarian/000077500000000000000000000000001507545312400214635ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/data/bulgarian/bulgarian.h000066400000000000000000001103551507545312400236050ustar00rootroot00000000000000/***** THIS IS A GENERATED FILE. DO NOT TOUCH! *****/ /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_CP1251[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 125, 0, 97, 0, 0, 0, 0, 0, /* 0xc0 */ 104, 0, 0, 0, 0, 170, 0, 98, /* 0xc8 */ 0, 107, 135, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 5956, 713, 2084, 731, 1638, 4455, 396, 1148, /* 0xe0 */ 4081, 299, 1679, 1654, 1291, 3203, 4364, 1306, /* 0xe8 */ 2168, 2364, 3471, 676, 0, 376, 224, 669, /* 0xf0 */ 376, 324, 992, 0, 0, 0, 0, 893, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char LETTER_CP1251[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 255, 255, 0, 255, 0, 0, 0, 0, /* 0x80 */ 0, 0, 255, 0, 255, 255, 255, 255, /* 0x88 */ 255, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 255, 0, 255, 255, 255, 255, /* 0x98 */ 0, 255, 255, 255, 0, 255, 0, 0, /* 0xa0 */ 255, 0, 255, 0, 0, 0, 0, 255, /* 0xa8 */ 0, 0, 255, 255, 255, 0, 0, 0, /* 0xb0 */ 255, 0, 255, 0, 255, 255, 255, 255, /* 0xb8 */ 1, 255, 2, 255, 255, 255, 255, 3, /* 0xc0 */ 4, 255, 5, 255, 6, 7, 255, 8, /* 0xc8 */ 255, 255, 9, 255, 255, 255, 255, 255, /* 0xd0 */ 255, 255, 255, 255, 255, 255, 255, 255, /* 0xd8 */ 10, 11, 12, 13, 14, 15, 16, 17, /* 0xe0 */ 18, 19, 20, 21, 22, 23, 24, 25, /* 0xe8 */ 26, 27, 28, 29, 30, 31, 32, 33, /* 0xf0 */ 34, 35, 36, 255, 255, 255, 255, 37, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char *PAIR_CP1251[] = { (unsigned char*)"\xf1\xed\xef\xe4\xe8\xe2\xee\xf2\xea\xec\xe7\xe1\xe5\xe3\xf0\xf7\xcd\xe0\xeb\xf3\xd2\xcf\xd1\xc2\xc4\xc0\xca\xf9\xc8\xcc\xf5\xc7\xe6\xc1\xce\xff\xf6\xd0\xf4\xc3\xc5\xf8\xd5\xcb\xd7\xd3", /* FILLCHAR */ (unsigned char*)".", /* 0xc0 */ (unsigned char*)".\xe8", /* 0xc2 */ (unsigned char*)"\xe0", /* 0xc7 */ (unsigned char*)".", /* 0xc8 */ (unsigned char*)"\xe0\xee", /* 0xca */ (unsigned char*)"\xe0", /* 0xcc */ (unsigned char*)"\xe5\xe0\xee\xe8", /* 0xcd */ (unsigned char*)"\xee\xf0", /* 0xcf */ (unsigned char*)"\xee", /* 0xd2 */ (unsigned char*)".\xf2\xed\xe2\xeb\xea\xe7\xec\xf0\xf1\xe4\xf8\xe9\xef\xf5\xe1\xf7\xf9\xe3\xe6\xe5\xff\xf6", /* 0xe0 */ (unsigned char*)"\xe5\xe8\xf0\xee\xe0\xfa\xeb\xff\xe2\xf3", /* 0xe1 */ (unsigned char*)"\xe0\xe5\xe8\xee.\xfa\xf1\xf0\xed\xff\xeb\xf2", /* 0xe2 */ (unsigned char*)"\xee\xe0\xeb\xe8\xf0\xed.\xfa", /* 0xe3 */ (unsigned char*)"\xe0\xe5\xe8\xee.\xed\xf0\xfa\xe2\xf3\xff\xf1", /* 0xe4 */ (unsigned char*)".\xed\xf2\xe4\xeb\xf1\xf0\xec\xf8\xe7\xea\xe3\xf7\xf9\xe6\xe2\xef\xe1\xe9\xf5\xf6\xee", /* 0xe5 */ (unsigned char*)"\xe5\xe8\xe4\xe0\xed.", /* 0xe6 */ (unsigned char*)"\xe0\xe8\xe2\xed.\xef\xe5\xe4\xeb\xec\xee\xea\xe1\xe3\xf0", /* 0xe7 */ (unsigned char*)".\xf2\xed\xe7\xff\xeb\xe5\xf1\xf7\xec\xea\xe2\xf0\xe3\xf6\xe4\xf5\xf8\xe6\xf9\xee\xef", /* 0xe8 */ (unsigned char*)".\xf2\xed\xf1\xea", /* 0xe9 */ (unsigned char*)"\xe0\xee\xe8.\xfa\xf0\xe2\xf2\xeb\xf3\xed", /* 0xea */ (unsigned char*)"\xe8\xe5\xe0\xee.\xed\xff\xea\xf3\xfa\xfe", /* 0xeb */ (unsigned char*)"\xe5\xe0.\xe8\xee\xf3\xed\xfa\xff", /* 0xec */ (unsigned char*)"\xe0\xe8\xe5\xee.\xff\xf2\xf1\xed\xe4\xf6\xea", /* 0xed */ (unsigned char*)".\xf2\xe2\xf1\xf0\xeb\xe1\xe3\xe4\xe9\xed\xea\xe6\xec\xf7\xef\xff\xe7\xe8\xe5\xf9", /* 0xee */ (unsigned char*)"\xee\xf0\xe0\xe8\xfa\xe5\xeb\xf3", /* 0xef */ (unsigned char*)"\xe0\xe5\xe8\xee\xfa.\xf3\xff\xed\xe2\xf2\xe4\xf1\xec\xea", /* 0xf0 */ (unsigned char*)"\xf2\xe5\xe8.\xfa\xeb\xe0\xea\xe2\xed\xef\xec\xee\xff\xf0", /* 0xf1 */ (unsigned char*)"\xee\xe0\xe5.\xe8\xf0\xe2\xed\xfa\xff\xf3\xea\xf2\xeb", /* 0xf2 */ (unsigned char*)".\xf1\xe2\xf7\xec\xe4\xe3\xea\xf0\xef\xe1\xf8\xeb\xe6\xed\xf2", /* 0xf3 */ (unsigned char*)"\xe8", /* 0xf4 */ (unsigned char*)".\xe0\xee\xed\xe2", /* 0xf5 */ (unsigned char*)"\xe8\xe5\xe0", /* 0xf6 */ (unsigned char*)"\xe5\xe0\xe8\xed\xea\xf3\xee", /* 0xf7 */ (unsigned char*)"\xe5.\xe8\xe0", /* 0xf8 */ (unsigned char*)"\xe5\xee\xe0\xe8", /* 0xf9 */ (unsigned char*)"\xf0\xeb\xf2\xec\xf1\xea\xe7\xe4\xed\xe2\xf9\xef\xe6\xe3\xe1", /* 0xfa */ (unsigned char*)".\xf2\xea\xe2\xf5\xec\xeb\xf1\xe1\xed", /* 0xff */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_ISO88595[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 125, 0, 97, 0, 0, 0, 0, 0, /* 0xb0 */ 104, 0, 0, 0, 0, 170, 0, 98, /* 0xb8 */ 0, 107, 135, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 5956, 713, 2084, 731, 1638, 4455, 396, 1148, /* 0xd0 */ 4081, 299, 1679, 1654, 1291, 3203, 4364, 1306, /* 0xd8 */ 2168, 2364, 3471, 676, 0, 376, 224, 669, /* 0xe0 */ 376, 324, 992, 0, 0, 0, 0, 893, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char LETTER_ISO88595[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 255, 255, 255, 255, 255, 255, 255, /* 0xa0 */ 255, 255, 255, 255, 255, 0, 255, 255, /* 0xa8 */ 1, 255, 2, 255, 255, 255, 255, 3, /* 0xb0 */ 4, 255, 5, 255, 6, 7, 255, 8, /* 0xb8 */ 255, 255, 9, 255, 255, 255, 255, 255, /* 0xc0 */ 255, 255, 255, 255, 255, 255, 255, 255, /* 0xc8 */ 10, 11, 12, 13, 14, 15, 16, 17, /* 0xd0 */ 18, 19, 20, 21, 22, 23, 24, 25, /* 0xd8 */ 26, 27, 28, 29, 30, 31, 32, 33, /* 0xe0 */ 34, 35, 36, 255, 255, 255, 255, 37, /* 0xe8 */ 0, 255, 255, 255, 255, 255, 255, 255, /* 0xf0 */ 255, 255, 255, 255, 255, 0, 255, 255, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char *PAIR_ISO88595[] = { (unsigned char*)"\xe1\xdd\xdf\xd4\xd8\xd2\xde\xe2\xda\xdc\xd7\xd1\xd5\xd3\xe0\xe7\xbd\xd0\xdb\xe3\xc2\xbf\xc1\xb2\xb4\xb0\xba\xe9\xb8\xbc\xe5\xb7\xd6\xb1\xbe\xef\xe6\xc0\xe4\xb3\xb5\xe8\xc5\xbb\xc7\xc3", /* FILLCHAR */ (unsigned char*)".", /* 0xb0 */ (unsigned char*)".\xd8", /* 0xb2 */ (unsigned char*)"\xd0", /* 0xb7 */ (unsigned char*)".", /* 0xb8 */ (unsigned char*)"\xd0\xde", /* 0xba */ (unsigned char*)"\xd0", /* 0xbc */ (unsigned char*)"\xd5\xd0\xde\xd8", /* 0xbd */ (unsigned char*)"\xde\xe0", /* 0xbf */ (unsigned char*)"\xde", /* 0xc2 */ (unsigned char*)".\xe2\xdd\xd2\xdb\xda\xd7\xdc\xe0\xe1\xd4\xe8\xd9\xdf\xe5\xd1\xe7\xe9\xd3\xd6\xd5\xef\xe6", /* 0xd0 */ (unsigned char*)"\xd5\xd8\xe0\xde\xd0\xea\xdb\xef\xd2\xe3", /* 0xd1 */ (unsigned char*)"\xd0\xd5\xd8\xde.\xea\xe1\xe0\xdd\xef\xdb\xe2", /* 0xd2 */ (unsigned char*)"\xde\xd0\xdb\xd8\xe0\xdd.\xea", /* 0xd3 */ (unsigned char*)"\xd0\xd5\xd8\xde.\xdd\xe0\xea\xd2\xe3\xef\xe1", /* 0xd4 */ (unsigned char*)".\xdd\xe2\xd4\xdb\xe1\xe0\xdc\xe8\xd7\xda\xd3\xe7\xe9\xd6\xd2\xdf\xd1\xd9\xe5\xe6\xde", /* 0xd5 */ (unsigned char*)"\xd5\xd8\xd4\xd0\xdd.", /* 0xd6 */ (unsigned char*)"\xd0\xd8\xd2\xdd.\xdf\xd5\xd4\xdb\xdc\xde\xda\xd1\xd3\xe0", /* 0xd7 */ (unsigned char*)".\xe2\xdd\xd7\xef\xdb\xd5\xe1\xe7\xdc\xda\xd2\xe0\xd3\xe6\xd4\xe5\xe8\xd6\xe9\xde\xdf", /* 0xd8 */ (unsigned char*)".\xe2\xdd\xe1\xda", /* 0xd9 */ (unsigned char*)"\xd0\xde\xd8.\xea\xe0\xd2\xe2\xdb\xe3\xdd", /* 0xda */ (unsigned char*)"\xd8\xd5\xd0\xde.\xdd\xef\xda\xe3\xea\xee", /* 0xdb */ (unsigned char*)"\xd5\xd0.\xd8\xde\xe3\xdd\xea\xef", /* 0xdc */ (unsigned char*)"\xd0\xd8\xd5\xde.\xef\xe2\xe1\xdd\xd4\xe6\xda", /* 0xdd */ (unsigned char*)".\xe2\xd2\xe1\xe0\xdb\xd1\xd3\xd4\xd9\xdd\xda\xd6\xdc\xe7\xdf\xef\xd7\xd8\xd5\xe9", /* 0xde */ (unsigned char*)"\xde\xe0\xd0\xd8\xea\xd5\xdb\xe3", /* 0xdf */ (unsigned char*)"\xd0\xd5\xd8\xde\xea.\xe3\xef\xdd\xd2\xe2\xd4\xe1\xdc\xda", /* 0xe0 */ (unsigned char*)"\xe2\xd5\xd8.\xea\xdb\xd0\xda\xd2\xdd\xdf\xdc\xde\xef\xe0", /* 0xe1 */ (unsigned char*)"\xde\xd0\xd5.\xd8\xe0\xd2\xdd\xea\xef\xe3\xda\xe2\xdb", /* 0xe2 */ (unsigned char*)".\xe1\xd2\xe7\xdc\xd4\xd3\xda\xe0\xdf\xd1\xe8\xdb\xd6\xdd\xe2", /* 0xe3 */ (unsigned char*)"\xd8", /* 0xe4 */ (unsigned char*)".\xd0\xde\xdd\xd2", /* 0xe5 */ (unsigned char*)"\xd8\xd5\xd0", /* 0xe6 */ (unsigned char*)"\xd5\xd0\xd8\xdd\xda\xe3\xde", /* 0xe7 */ (unsigned char*)"\xd5.\xd8\xd0", /* 0xe8 */ (unsigned char*)"\xd5\xde\xd0\xd8", /* 0xe9 */ (unsigned char*)"\xe0\xdb\xe2\xdc\xe1\xda\xd7\xd4\xdd\xd2\xe9\xdf\xd6\xd3\xd1", /* 0xea */ (unsigned char*)".\xe2\xda\xd2\xe5\xdc\xdb\xe1\xd1\xdd", /* 0xef */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_IBM855[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 992, 0, /* 0x98 */ 5956, 125, 713, 0, 224, 0, 1638, 0, /* 0xa0 */ 4455, 0, 0, 0, 731, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 376, 0, 4081, /* 0xb0 */ 104, 0, 0, 0, 0, 299, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 1679, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 1654, 0, 1291, 0, 3203, 170, 4364, 0, /* 0xd0 */ 1306, 0, 0, 0, 0, 98, 893, 0, /* 0xd8 */ 0, 2168, 0, 2364, 107, 3471, 135, 676, /* 0xe0 */ 0, 396, 0, 2084, 97, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 1148, 0, 376, 0, 0, /* 0xf0 */ 0, 324, 0, 669, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char LETTER_IBM855[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 255, 255, 255, 255, 255, 255, 255, 255, /* 0x80 */ 255, 255, 255, 255, 255, 255, 255, 255, /* 0x88 */ 255, 255, 255, 255, 255, 0, 255, 255, /* 0x90 */ 255, 255, 255, 255, 255, 255, 36, 255, /* 0x98 */ 10, 1, 11, 255, 32, 255, 14, 255, /* 0xa0 */ 15, 255, 30, 255, 13, 255, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 31, 255, 18, /* 0xb0 */ 4, 0, 0, 0, 0, 19, 255, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 20, 5, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 21, 255, 22, 6, 23, 7, 24, 255, /* 0xd0 */ 25, 0, 0, 0, 0, 8, 37, 0, /* 0xd8 */ 255, 26, 255, 27, 255, 28, 9, 29, /* 0xe0 */ 255, 16, 255, 12, 2, 255, 255, 0, /* 0xe8 */ 0, 255, 255, 17, 3, 34, 255, 255, /* 0xf0 */ 255, 35, 255, 33, 255, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char *PAIR_IBM855[] = { (unsigned char*)"\xe3\xd4\xd8\xa6\xb7\xeb\xd6\xe5\xc6\xd2\xf3\xa2\xa8\xac\xe1\xfb\xd5\xa0\xd0\xe7\xe6\xdd\xe4\xec\xa7\xa1\xc7\xf9\xb8\xd3\xb5\xf4\xe9\xa3\xd7\xde\xa4\xe2\xaa\xad\xa9\xf5\xb6\xd1\xfc\xe8", /* FILLCHAR */ (unsigned char*)".", /* 0xa1 */ (unsigned char*)".\xb7", /* 0xec */ (unsigned char*)"\xa0", /* 0xf4 */ (unsigned char*)".", /* 0xb8 */ (unsigned char*)"\xa0\xd6", /* 0xc7 */ (unsigned char*)"\xa0", /* 0xd3 */ (unsigned char*)"\xa8\xa0\xd6\xb7", /* 0xd5 */ (unsigned char*)"\xd6\xe1", /* 0xdd */ (unsigned char*)"\xd6", /* 0xe6 */ (unsigned char*)".\xe5\xd4\xeb\xd0\xc6\xf3\xd2\xe1\xe3\xa6\xf5\xbd\xd8\xb5\xa2\xfb\xf9\xac\xe9\xa8\xde\xa4", /* 0xa0 */ (unsigned char*)"\xa8\xb7\xe1\xd6\xa0\x9e\xd0\xde\xeb\xe7", /* 0xa2 */ (unsigned char*)"\xa0\xa8\xb7\xd6.\x9e\xe3\xe1\xd4\xde\xd0\xe5", /* 0xeb */ (unsigned char*)"\xd6\xa0\xd0\xb7\xe1\xd4.\x9e", /* 0xac */ (unsigned char*)"\xa0\xa8\xb7\xd6.\xd4\xe1\x9e\xeb\xe7\xde\xe3", /* 0xa6 */ (unsigned char*)".\xd4\xe5\xa6\xd0\xe3\xe1\xd2\xf5\xf3\xc6\xac\xfb\xf9\xe9\xeb\xd8\xa2\xbd\xb5\xa4\xd6", /* 0xa8 */ (unsigned char*)"\xa8\xb7\xa6\xa0\xd4.", /* 0xe9 */ (unsigned char*)"\xa0\xb7\xeb\xd4.\xd8\xa8\xa6\xd0\xd2\xd6\xc6\xa2\xac\xe1", /* 0xf3 */ (unsigned char*)".\xe5\xd4\xf3\xde\xd0\xa8\xe3\xfb\xd2\xc6\xeb\xe1\xac\xa4\xa6\xb5\xf5\xe9\xf9\xd6\xd8", /* 0xb7 */ (unsigned char*)".\xe5\xd4\xe3\xc6", /* 0xbd */ (unsigned char*)"\xa0\xd6\xb7.\x9e\xe1\xeb\xe5\xd0\xe7\xd4", /* 0xc6 */ (unsigned char*)"\xb7\xa8\xa0\xd6.\xd4\xde\xc6\xe7\x9e\x9c", /* 0xd0 */ (unsigned char*)"\xa8\xa0.\xb7\xd6\xe7\xd4\x9e\xde", /* 0xd2 */ (unsigned char*)"\xa0\xb7\xa8\xd6.\xde\xe5\xe3\xd4\xa6\xa4\xc6", /* 0xd4 */ (unsigned char*)".\xe5\xeb\xe3\xe1\xd0\xa2\xac\xa6\xbd\xd4\xc6\xe9\xd2\xfb\xd8\xde\xf3\xb7\xa8\xf9", /* 0xd6 */ (unsigned char*)"\xd6\xe1\xa0\xb7\x9e\xa8\xd0\xe7", /* 0xd8 */ (unsigned char*)"\xa0\xa8\xb7\xd6\x9e.\xe7\xde\xd4\xeb\xe5\xa6\xe3\xd2\xc6", /* 0xe1 */ (unsigned char*)"\xe5\xa8\xb7.\x9e\xd0\xa0\xc6\xeb\xd4\xd8\xd2\xd6\xde\xe1", /* 0xe3 */ (unsigned char*)"\xd6\xa0\xa8.\xb7\xe1\xeb\xd4\x9e\xde\xe7\xc6\xe5\xd0", /* 0xe5 */ (unsigned char*)".\xe3\xeb\xfb\xd2\xa6\xac\xc6\xe1\xd8\xa2\xf5\xd0\xe9\xd4\xe5", /* 0xe7 */ (unsigned char*)"\xb7", /* 0xaa */ (unsigned char*)".\xa0\xd6\xd4\xeb", /* 0xb5 */ (unsigned char*)"\xb7\xa8\xa0", /* 0xa4 */ (unsigned char*)"\xa8\xa0\xb7\xd4\xc6\xe7\xd6", /* 0xfb */ (unsigned char*)"\xa8.\xb7\xa0", /* 0xf5 */ (unsigned char*)"\xa8\xd6\xa0\xb7", /* 0xf9 */ (unsigned char*)"\xe1\xd0\xe5\xd2\xe3\xc6\xf3\xa6\xd4\xeb\xf9\xd8\xe9\xac\xa2", /* 0x9e */ (unsigned char*)".\xe5\xc6\xeb\xb5\xd2\xd0\xe3\xa2\xd4", /* 0xde */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_MACCYR[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 125, 0, 97, 0, 0, 0, 0, 0, /* 0x80 */ 104, 0, 0, 0, 0, 170, 0, 98, /* 0x88 */ 0, 107, 135, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 893, /* 0xd8 */ 5956, 713, 2084, 731, 1638, 4455, 396, 1148, /* 0xe0 */ 4081, 299, 1679, 1654, 1291, 3203, 4364, 1306, /* 0xe8 */ 2168, 2364, 3471, 676, 0, 376, 224, 669, /* 0xf0 */ 376, 324, 992, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char LETTER_MACCYR[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 1, 255, 2, 255, 255, 255, 255, 3, /* 0x80 */ 4, 255, 5, 255, 6, 7, 255, 8, /* 0x88 */ 255, 255, 9, 255, 255, 255, 255, 255, /* 0x90 */ 255, 255, 255, 255, 255, 255, 255, 255, /* 0x98 */ 0, 0, 255, 0, 0, 0, 0, 255, /* 0xa0 */ 0, 0, 0, 255, 255, 0, 255, 255, /* 0xa8 */ 0, 0, 0, 0, 255, 0, 255, 255, /* 0xb0 */ 255, 255, 255, 255, 255, 255, 255, 255, /* 0xb8 */ 255, 255, 0, 0, 255, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 255, 255, 255, 255, 255, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 255, 255, 255, 255, 0, 255, 255, 37, /* 0xd8 */ 10, 11, 12, 13, 14, 15, 16, 17, /* 0xe0 */ 18, 19, 20, 21, 22, 23, 24, 25, /* 0xe8 */ 26, 27, 28, 29, 30, 31, 32, 33, /* 0xf0 */ 34, 35, 36, 255, 255, 255, 255, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char *PAIR_MACCYR[] = { (unsigned char*)"\xf1\xed\xef\xe4\xe8\xe2\xee\xf2\xea\xec\xe7\xe1\xe5\xe3\xf0\xf7\x8d\xe0\xeb\xf3\x92\x8f\x91\x82\x84\x80\x8a\xf9\x88\x8c\xf5\x87\xe6\x81\x8e\xdf\xf6\x90\xf4\x83\x85\xf8\x95\x8b\x97\x93", /* FILLCHAR */ (unsigned char*)".", /* 0x80 */ (unsigned char*)".\xe8", /* 0x82 */ (unsigned char*)"\xe0", /* 0x87 */ (unsigned char*)".", /* 0x88 */ (unsigned char*)"\xe0\xee", /* 0x8a */ (unsigned char*)"\xe0", /* 0x8c */ (unsigned char*)"\xe5\xe0\xee\xe8", /* 0x8d */ (unsigned char*)"\xee\xf0", /* 0x8f */ (unsigned char*)"\xee", /* 0x92 */ (unsigned char*)".\xf2\xed\xe2\xeb\xea\xe7\xec\xf0\xf1\xe4\xf8\xe9\xef\xf5\xe1\xf7\xf9\xe3\xe6\xe5\xdf\xf6", /* 0xe0 */ (unsigned char*)"\xe5\xe8\xf0\xee\xe0\xfa\xeb\xdf\xe2\xf3", /* 0xe1 */ (unsigned char*)"\xe0\xe5\xe8\xee.\xfa\xf1\xf0\xed\xdf\xeb\xf2", /* 0xe2 */ (unsigned char*)"\xee\xe0\xeb\xe8\xf0\xed.\xfa", /* 0xe3 */ (unsigned char*)"\xe0\xe5\xe8\xee.\xed\xf0\xfa\xe2\xf3\xdf\xf1", /* 0xe4 */ (unsigned char*)".\xed\xf2\xe4\xeb\xf1\xf0\xec\xf8\xe7\xea\xe3\xf7\xf9\xe6\xe2\xef\xe1\xe9\xf5\xf6\xee", /* 0xe5 */ (unsigned char*)"\xe5\xe8\xe4\xe0\xed.", /* 0xe6 */ (unsigned char*)"\xe0\xe8\xe2\xed.\xef\xe5\xe4\xeb\xec\xee\xea\xe1\xe3\xf0", /* 0xe7 */ (unsigned char*)".\xf2\xed\xe7\xdf\xeb\xe5\xf1\xf7\xec\xea\xe2\xf0\xe3\xf6\xe4\xf5\xf8\xe6\xf9\xee\xef", /* 0xe8 */ (unsigned char*)".\xf2\xed\xf1\xea", /* 0xe9 */ (unsigned char*)"\xe0\xee\xe8.\xfa\xf0\xe2\xf2\xeb\xf3\xed", /* 0xea */ (unsigned char*)"\xe8\xe5\xe0\xee.\xed\xdf\xea\xf3\xfa\xfe", /* 0xeb */ (unsigned char*)"\xe5\xe0.\xe8\xee\xf3\xed\xfa\xdf", /* 0xec */ (unsigned char*)"\xe0\xe8\xe5\xee.\xdf\xf2\xf1\xed\xe4\xf6\xea", /* 0xed */ (unsigned char*)".\xf2\xe2\xf1\xf0\xeb\xe1\xe3\xe4\xe9\xed\xea\xe6\xec\xf7\xef\xdf\xe7\xe8\xe5\xf9", /* 0xee */ (unsigned char*)"\xee\xf0\xe0\xe8\xfa\xe5\xeb\xf3", /* 0xef */ (unsigned char*)"\xe0\xe5\xe8\xee\xfa.\xf3\xdf\xed\xe2\xf2\xe4\xf1\xec\xea", /* 0xf0 */ (unsigned char*)"\xf2\xe5\xe8.\xfa\xeb\xe0\xea\xe2\xed\xef\xec\xee\xdf\xf0", /* 0xf1 */ (unsigned char*)"\xee\xe0\xe5.\xe8\xf0\xe2\xed\xfa\xdf\xf3\xea\xf2\xeb", /* 0xf2 */ (unsigned char*)".\xf1\xe2\xf7\xec\xe4\xe3\xea\xf0\xef\xe1\xf8\xeb\xe6\xed\xf2", /* 0xf3 */ (unsigned char*)"\xe8", /* 0xf4 */ (unsigned char*)".\xe0\xee\xed\xe2", /* 0xf5 */ (unsigned char*)"\xe8\xe5\xe0", /* 0xf6 */ (unsigned char*)"\xe5\xe0\xe8\xed\xea\xf3\xee", /* 0xf7 */ (unsigned char*)"\xe5.\xe8\xe0", /* 0xf8 */ (unsigned char*)"\xe5\xee\xe0\xe8", /* 0xf9 */ (unsigned char*)"\xf0\xeb\xf2\xec\xf1\xea\xe7\xe4\xed\xe2\xf9\xef\xe6\xe3\xe1", /* 0xfa */ (unsigned char*)".\xf2\xea\xe2\xf5\xec\xeb\xf1\xe1\xed", /* 0xdf */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_ECMA113[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 5956, 713, 224, 1638, 4455, 0, 731, /* 0xc0 */ 376, 4081, 299, 1679, 1654, 1291, 3203, 4364, /* 0xc8 */ 1306, 893, 2168, 2364, 3471, 676, 396, 2084, /* 0xd0 */ 0, 0, 1148, 376, 0, 324, 669, 992, /* 0xd8 */ 0, 125, 0, 0, 0, 0, 0, 0, /* 0xe0 */ 0, 104, 0, 0, 0, 0, 170, 0, /* 0xe8 */ 98, 0, 0, 107, 135, 0, 0, 97, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char LETTER_ECMA113[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 255, 255, 255, 255, 255, 255, 255, /* 0xa0 */ 255, 255, 255, 255, 255, 0, 255, 255, /* 0xa8 */ 0, 255, 255, 255, 255, 255, 255, 255, /* 0xb0 */ 255, 255, 255, 255, 255, 0, 255, 255, /* 0xb8 */ 255, 10, 11, 32, 14, 15, 30, 13, /* 0xc0 */ 31, 18, 19, 20, 21, 22, 23, 24, /* 0xc8 */ 25, 37, 26, 27, 28, 29, 16, 12, /* 0xd0 */ 255, 255, 17, 34, 255, 35, 33, 36, /* 0xd8 */ 255, 1, 255, 255, 255, 255, 255, 255, /* 0xe0 */ 255, 4, 255, 5, 255, 6, 7, 255, /* 0xe8 */ 8, 255, 255, 255, 9, 255, 255, 2, /* 0xf0 */ 255, 255, 3, 255, 255, 255, 255, 255, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char *PAIR_ECMA113[] = { (unsigned char*)"\xd3\xce\xd0\xc4\xc9\xd7\xcf\xd4\xcb\xcd\xda\xc2\xc5\xc7\xd2\xde\xee\xc1\xcc\xd5\xf4\xf0\xf3\xf7\xe4\xe1\xeb\xdd\xe9\xed\xc8\xfa\xd6\xe2\xef\xd1\xc3\xf2\xc6\xe7\xe5\xdb\xe8\xec\xfe\xf5", /* FILLCHAR */ (unsigned char*)".", /* 0xe1 */ (unsigned char*)".\xc9", /* 0xf7 */ (unsigned char*)"\xc1", /* 0xfa */ (unsigned char*)".", /* 0xe9 */ (unsigned char*)"\xc1\xcf", /* 0xeb */ (unsigned char*)"\xc1", /* 0xed */ (unsigned char*)"\xc5\xc1\xcf\xc9", /* 0xee */ (unsigned char*)"\xcf\xd2", /* 0xf0 */ (unsigned char*)"\xcf", /* 0xf4 */ (unsigned char*)".\xd4\xce\xd7\xcc\xcb\xda\xcd\xd2\xd3\xc4\xdb\xca\xd0\xc8\xc2\xde\xdd\xc7\xd6\xc5\xd1\xc3", /* 0xc1 */ (unsigned char*)"\xc5\xc9\xd2\xcf\xc1\xdf\xcc\xd1\xd7\xd5", /* 0xc2 */ (unsigned char*)"\xc1\xc5\xc9\xcf.\xdf\xd3\xd2\xce\xd1\xcc\xd4", /* 0xd7 */ (unsigned char*)"\xcf\xc1\xcc\xc9\xd2\xce.\xdf", /* 0xc7 */ (unsigned char*)"\xc1\xc5\xc9\xcf.\xce\xd2\xdf\xd7\xd5\xd1\xd3", /* 0xc4 */ (unsigned char*)".\xce\xd4\xc4\xcc\xd3\xd2\xcd\xdb\xda\xcb\xc7\xde\xdd\xd6\xd7\xd0\xc2\xca\xc8\xc3\xcf", /* 0xc5 */ (unsigned char*)"\xc5\xc9\xc4\xc1\xce.", /* 0xd6 */ (unsigned char*)"\xc1\xc9\xd7\xce.\xd0\xc5\xc4\xcc\xcd\xcf\xcb\xc2\xc7\xd2", /* 0xda */ (unsigned char*)".\xd4\xce\xda\xd1\xcc\xc5\xd3\xde\xcd\xcb\xd7\xd2\xc7\xc3\xc4\xc8\xdb\xd6\xdd\xcf\xd0", /* 0xc9 */ (unsigned char*)".\xd4\xce\xd3\xcb", /* 0xca */ (unsigned char*)"\xc1\xcf\xc9.\xdf\xd2\xd7\xd4\xcc\xd5\xce", /* 0xcb */ (unsigned char*)"\xc9\xc5\xc1\xcf.\xce\xd1\xcb\xd5\xdf\xc0", /* 0xcc */ (unsigned char*)"\xc5\xc1.\xc9\xcf\xd5\xce\xdf\xd1", /* 0xcd */ (unsigned char*)"\xc1\xc9\xc5\xcf.\xd1\xd4\xd3\xce\xc4\xc3\xcb", /* 0xce */ (unsigned char*)".\xd4\xd7\xd3\xd2\xcc\xc2\xc7\xc4\xca\xce\xcb\xd6\xcd\xde\xd0\xd1\xda\xc9\xc5\xdd", /* 0xcf */ (unsigned char*)"\xcf\xd2\xc1\xc9\xdf\xc5\xcc\xd5", /* 0xd0 */ (unsigned char*)"\xc1\xc5\xc9\xcf\xdf.\xd5\xd1\xce\xd7\xd4\xc4\xd3\xcd\xcb", /* 0xd2 */ (unsigned char*)"\xd4\xc5\xc9.\xdf\xcc\xc1\xcb\xd7\xce\xd0\xcd\xcf\xd1\xd2", /* 0xd3 */ (unsigned char*)"\xcf\xc1\xc5.\xc9\xd2\xd7\xce\xdf\xd1\xd5\xcb\xd4\xcc", /* 0xd4 */ (unsigned char*)".\xd3\xd7\xde\xcd\xc4\xc7\xcb\xd2\xd0\xc2\xdb\xcc\xd6\xce\xd4", /* 0xd5 */ (unsigned char*)"\xc9", /* 0xc6 */ (unsigned char*)".\xc1\xcf\xce\xd7", /* 0xc8 */ (unsigned char*)"\xc9\xc5\xc1", /* 0xc3 */ (unsigned char*)"\xc5\xc1\xc9\xce\xcb\xd5\xcf", /* 0xde */ (unsigned char*)"\xc5.\xc9\xc1", /* 0xdb */ (unsigned char*)"\xc5\xcf\xc1\xc9", /* 0xdd */ (unsigned char*)"\xd2\xcc\xd4\xcd\xd3\xcb\xda\xc4\xce\xd7\xdd\xd0\xd6\xc7\xc2", /* 0xdf */ (unsigned char*)".\xd4\xcb\xd7\xc8\xcd\xcc\xd3\xc2\xce", /* 0xd1 */ }; /* THIS IS A GENERATED TABLE, see data/totals.pl. */ static const unsigned short int SIGNIFICANT[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 125, 0, 97, 0, 0, 0, 0, 0, /* 0x80 */ 104, 0, 0, 0, 0, 170, 0, 98, /* 0x88 */ 0, 107, 135, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 992, 0, /* 0x98 */ 5956, 125, 713, 0, 224, 0, 1638, 0, /* 0xa0 */ 4455, 0, 0, 0, 731, 0, 0, 0, /* 0xa8 */ 125, 0, 97, 0, 0, 376, 0, 4081, /* 0xb0 */ 208, 0, 0, 0, 0, 469, 0, 98, /* 0xb8 */ 125, 6063, 945, 224, 1638, 4455, 1679, 731, /* 0xc0 */ 480, 4081, 299, 1679, 1654, 1461, 3203, 4462, /* 0xc8 */ 8916, 1713, 5678, 3095, 8312, 5301, 5156, 3232, /* 0xd0 */ 5387, 299, 2827, 2030, 1291, 3625, 5926, 3191, /* 0xd8 */ 14080, 6083, 7639, 4502, 3383, 12757, 1151, 3641, /* 0xe0 */ 8538, 1422, 4350, 5392, 2679, 6406, 8898, 3505, /* 0xe8 */ 4434, 4728, 6942, 2607, 135, 1128, 448, 1435, /* 0xf0 */ 752, 972, 1984, 669, 0, 0, 0, 893, /* 0xf8 */ }; /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define WEIGHT_SUM 48367 /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const char *const CHARSET_NAMES[] = { "cp1251", "iso88595", "ibm855", "maccyr", "ecma113", }; /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const unsigned short int *const CHARSET_WEIGHTS[] = { RAW_CP1251, RAW_ISO88595, RAW_IBM855, RAW_MACCYR, RAW_ECMA113, }; /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const unsigned char *const CHARSET_LETTERS[] = { LETTER_CP1251, LETTER_ISO88595, LETTER_IBM855, LETTER_MACCYR, LETTER_ECMA113, }; /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const unsigned char **const CHARSET_PAIRS[] = { PAIR_CP1251, PAIR_ISO88595, PAIR_IBM855, PAIR_MACCYR, PAIR_ECMA113, }; /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define NCHARSETS 5 Project-OSS-Revival-enca-36defd7/data/bulgarian/cp1251.base000066400000000000000000000003311507545312400232270ustar00rootroot00000000000000 125 97 104 170 98 107 135 5956 713 2084 731 1638 4455 396 1148 4081 299 1679 1654 1291 3203 4364 1306 2168 2364 3471 676 376 224 669 376 324 992 893 Project-OSS-Revival-enca-36defd7/data/bulgarian/doit.sh000077500000000000000000000000761507545312400227640ustar00rootroot00000000000000#! /bin/bash ../doit.sh cp1251 iso88595 ibm855 maccyr ecma113 Project-OSS-Revival-enca-36defd7/data/bulgarian/paircounts.cp1251000066400000000000000000000007531507545312400245140ustar00rootroot00000000000000.: :. :. : :. : : : : : :. : :. :. :. :. :. :. :. :. :. :. :. :. :. : :. :. :. :. : :. : : :. : : :. Project-OSS-Revival-enca-36defd7/data/bulgarian/rawcounts.cp1251000066400000000000000000000036321507545312400243510ustar00rootroot000000000000000x00 . 3 0x09 . 10609 0x0a . 53700 0x0c . 3 0x0d . 49092 0x15 . 13 0x18 . 1 0x1a . 7 0x20 432159 0x21 ! 1781 0x22 " 10781 0x23 # 203 0x24 $ 5 0x25 % 43 0x26 & 1617 0x27 ' 480 0x28 ( 3285 0x29 ) 3363 0x2a * 1603 0x2b + 1030 0x2c , 26902 0x2d - 19686 0x2e . 31767 0x2f / 5616 0x30 0 3276 0x31 1 2782 0x32 2 1418 0x33 3 1010 0x34 4 1055 0x35 5 914 0x36 6 1272 0x37 7 519 0x38 8 819 0x39 9 1092 0x3a : 2101 0x3b ; 4217 0x3c < 10637 0x3d = 8564 0x3e > 10618 0x3f ? 2538 0x40 @ 60 0x41 A 895 0x42 B 969 0x43 C 1524 0x44 D 923 0x45 E 1301 0x46 F 440 0x47 G 622 0x48 H 817 0x49 I 2537 0x4a J 108 0x4b K 124 0x4c L 1492 0x4d M 699 0x4e N 990 0x4f O 768 0x50 P 478 0x51 Q 13 0x52 R 1464 0x53 S 821 0x54 T 1406 0x55 U 423 0x56 V 293 0x57 W 366 0x58 X 23 0x59 Y 118 0x5a Z 24 0x5b [ 54 0x5c \ 327 0x5d ] 54 0x5e ^ 4 0x5f _ 2538 0x61 a 9390 0x62 b 6906 0x63 c 5120 0x64 d 6166 0x65 e 16081 0x66 f 2992 0x67 g 2763 0x68 h 3944 0x69 i 9441 0x6a j 305 0x6b k 1633 0x6c l 5673 0x6d m 3775 0x6e n 9907 0x6f o 10169 0x70 p 5383 0x71 q 329 0x72 r 13044 0x73 s 6931 0x74 t 13017 0x75 u 4347 0x76 v 2431 0x77 w 2036 0x78 x 1325 0x79 y 1422 0x7a z 752 0x7b { 440 0x7c | 1123 0x7d } 440 0x92 1 0x96 81 0xae 1 0xc0 3900 0xc1 1568 0xc2 3027 0xc3 997 0xc4 2823 0xc5 1834 0xc6 278 0xc7 1955 0xc8 3250 0xc9 144 0xca 2829 0xcb 1109 0xcc 2265 0xcd 5294 0xce 2440 0xcf 3064 0xd0 2093 0xd1 3346 0xd2 4206 0xd3 809 0xd4 382 0xd5 801 0xd6 261 0xd7 710 0xd8 276 0xd9 310 0xda 309 0xdb 59 0xdc 42 0xde 102 0xdf 428 0xe0 184647 0xe1 22118 0xe2 64605 0xe3 22666 0xe4 50790 0xe5 138125 0xe6 12283 0xe7 35618 0xe8 126526 0xe9 9288 0xea 52079 0xeb 51286 0xec 40022 0xed 99293 0xee 135288 0xef 40509 0xf0 67218 0xf1 73304 0xf2 107621 0xf3 20977 0xf4 2495 0xf5 11665 0xf6 6973 0xf7 20746 0xf8 11674 0xf9 10045 0xfa 30759 0xfc 231 0xfd 2 0xfe 1525 0xff 27684 Project-OSS-Revival-enca-36defd7/data/chinese/000077500000000000000000000000001507545312400211355ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/data/chinese/chinese.h000066400000000000000000000005411507545312400227240ustar00rootroot00000000000000/* This header file is in the public domain. */ #ifndef CHINESE_H #define CHINESE_H #include struct zh_weight { unsigned char name[3]; double freq; }; typedef const struct zh_weight *RateFunc (const unsigned char *str); typedef int ValidityFunc (const unsigned char *str); #include "zh_weight_gbk.h" #include "zh_weight_big5.h" #endif Project-OSS-Revival-enca-36defd7/data/chinese/zh_weight_big5.h000066400000000000000000000605431507545312400242140ustar00rootroot00000000000000/* This header file is in the public domain. Most of its content is generated by gperf, with modifications Chinese frequency table courtesy of Dept. of CS, Tsinghua Univeristy, Beijing See http://fhpi.yingkou.net.cn/bbs/1951/messages/2903.html */ /* ANSI-C code produced by gperf version 3.0.1 */ /* Command-line: gperf -L ANSI-C -I -C -E -n -o -c -D -t zh_weight_big5.txt */ /* Computed positions: -k'1-2' */ #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) /* The character set is not based on ISO-646. */ #error "gperf generated tables don't work with this execution character set. Please report a bug to ." #endif /* maximum key range = 987, duplicates = 0 */ #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif /*ARGSUSED*/ static unsigned int hash_big5 (register const unsigned char *str) { static const unsigned short asso_values[] = { 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 333, 104, 109, 139, 400, 987, 98, 224, 306, 468, 214, 987, 381, 233, 93, 240, 56, 286, 987, 119, 251, 59, 214, 221, 4, 245, 987, 204, 199, 228, 10, 84, 278, 356, 0, 105, 366, 371, 174, 381, 79, 98, 19, 169, 356, 450, 216, 508, 298, 290, 987, 58, 96, 48, 38, 176, 184, 10, 205, 146, 118, 440, 193, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 987, 305, 987, 238, 10, 5, 0, 85, 25, 285, 115, 30, 180, 75, 415, 238, 15, 260, 3, 160, 68, 60, 270, 18, 265, 90, 130, 360, 245, 485, 495, 345, 385, 133, 480, 365, 435, 110, 445, 473, 505, 455, 166, 410, 448, 153, 28, 39, 455, 110, 500, 215, 340, 343, 164, 243, 96, 470, 325, 91, 378, 391, 29, 14, 385, 4, 3, 171, 56, 506, 168, 448, 26, 144, 441, 351, 360, 458, 5, 241, 225, 311, 303, 46, 11, 493, 418, 285, 255, 438, 398, 301, 453, 1, 136, 987 }; return asso_values[(unsigned char)str[1]] + asso_values[(unsigned char)str[0]]; } static const struct zh_weight *in_big5 (register const unsigned char *str) { enum { TOTAL_KEYWORDS = 500, MIN_WORD_LENGTH = 2, MAX_WORD_LENGTH = 2, MIN_HASH_VALUE = 0, MAX_HASH_VALUE = 986 }; static const struct zh_weight wordlist[] = { {"\246b",0.0082045}, {"\246\375",0.0010253}, {"\246\342",0.0005973}, {"\246X",0.0023691}, {"\245\246",0.0005788}, {"\245\375",0.0010976}, {"\245\262",0.0006812}, {"\245X",0.0042527}, {"\246^",0.0006653}, {"\244\375",0.0006086}, {"\244\342",0.0009187}, {"\244\341",0.0005598}, {"\245\364",0.0012122}, {"\260\342",0.0004988}, {"\245\337",0.0015778}, {"\244\244",0.0076843}, {"\244\364",0.0016446}, {"\267\245",0.0006288}, {"\244\337",0.0014967}, {"\246\250",0.0037219}, {"\246\350",0.0012152}, {"\250\342",0.0013376}, {"\244j",0.0066078}, {"\250\356",0.0026895}, {"\262\316",0.0011475}, {"\245\316",0.002668}, {"\253\341",0.0021836}, {"\245\253",0.0046659}, {"\244\350",0.002853}, {"\244\316",0.0012255}, {"\244\336",0.0006632}, {"\260\250",0.0005587}, {"\262v",0.0005754}, {"\245v",0.0004954}, {"\253\337",0.0005375}, {"\253\260",0.0010251}, {"\246\363",0.0005162}, {"\244v",0.0006239}, {"\244\317",0.0006176}, {"\245\363",0.0009711}, {"\245u",0.0008284}, {"\260\317",0.0022413}, {"\250\253",0.0006468}, {"\246P",0.0026107}, {"\244u",0.0050114}, {"\246U",0.001779}, {"\265\246",0.0006082}, {"\265\375",0.0007621}, {"\265\262",0.0011242}, {"\250\317",0.001449}, {"\265\245",0.0021605}, {"\244\344",0.0007224}, {"\244s",0.0011044}, {"\244U",0.0021357}, {"\244\265",0.0013712}, {"\250\363",0.0007439}, {"\264X",0.0008733}, {"\245\264",0.0005953}, {"\267P",0.0005274}, {"\260\265",0.0007036}, {"\267s",0.002897}, {"\255\262",0.0012506}, {"\246h",0.0032382}, {"\245\255",0.0016647}, {"\250\344",0.0017313}, {"\250s",0.0007264}, {"\245h",0.0013444}, {"\244\255",0.0007467}, {"\253\344",0.0006569}, {"\247\342",0.0010343}, {"\245_",0.0015279}, {"\246\271",0.0011388}, {"\246\333",0.0022824}, {"\255\267",0.0007326}, {"\244_",0.0026086}, {"\244\247",0.001919}, {"\245\333",0.0004908}, {"\245N",0.0016641}, {"\260_",0.0015911}, {"\250\255",0.0006168}, {"\245\330",0.0015919}, {"\245i",0.0018478}, {"\246A",0.0005426}, {"\255\253",0.0023459}, {"\244F",0.0079237}, {"\253h",0.0005586}, {"\246\321",0.0008237}, {"\267N",0.0011669}, {"\247\316",0.0009425}, {"\247\336",0.0016091}, {"\245\321",0.0013801}, {"\267F",0.0009596}, {"\271\316",0.0009523}, {"\252\341",0.0005451}, {"\244\321",0.0016483}, {"\250t",0.0013262}, {"\245|",0.0009759}, {"\264\344",0.0005587}, {"\260\321",0.0006661}, {"\253\330",0.0032052}, {"\264\265",0.0006023}, {"\244S",0.0009509}, {"\260\252",0.0025748}, {"\247\363",0.0008908}, {"\260|",0.0010515}, {"\250B",0.0010507}, {"\250\321",0.000632}, {"\267|",0.0051579}, {"\245\301",0.0035945}, {"\246C",0.0005658}, {"\244\272",0.0016149}, {"\245\376",0.0032345}, {"\250|",0.0009705}, {"\250S",0.0008714}, {"\252\253",0.0010483}, {"\246{",0.000633}, {"\305v",0.0009164}, {"\262{",0.0025147}, {"\265\271",0.0007847}, {"\265\333",0.0014365}, {"\252v",0.0009927}, {"\244\351",0.0036327}, {"\250\272",0.0007224}, {"\265\330",0.0012136}, {"\245\315",0.0039844}, {"\272\336",0.001622}, {"\246\263",0.0077624}, {"\264N",0.0021619}, {"\262\263",0.0006362}, {"\250C",0.000715}, {"\255\271",0.0004878}, {"\246\312",0.0006978}, {"\246\346",0.0041784}, {"\253C",0.0005662}, {"\263y",0.0009483}, {"\255t",0.0005072}, {"\245\346",0.0011534}, {"\244\326",0.0009361}, {"\247\271",0.0006563}, {"\246w",0.00114}, {"\265|",0.0007012}, {"\244k",0.0006045}, {"\246\254",0.0012488}, {"\260\312",0.0023694}, {"\247i",0.0005829}, {"\244f",0.0012146}, {"\245\254",0.0005445}, {"\244w",0.0015716}, {"\271F",0.0012618}, {"\245x",0.0008597}, {"\254y",0.0008055}, {"\250\312",0.0012137}, {"\246~",0.0071346}, {"\271A",0.001983}, {"\254\260",0.0054216}, {"\250\343",0.0006981}, {"\245~",0.0022498}, {"\271B",0.0009758}, {"\252\247",0.0007016}, {"\264\301",0.0012406}, {"\244~",0.0006942}, {"\245\\",0.0005073}, {"\255\272",0.0006626}, {"\265{",0.0012378}, {"\262z",0.0029849}, {"\245[",0.0023829}, {"\253\254",0.0006771}, {"\267~",0.0065423}, {"\252F",0.0011892}, {"\246V",0.0014073}, {"\246\323",0.0018881}, {"\246n",0.0017451}, {"\263s",0.0004976}, {"\252A",0.0008639}, {"\271\272",0.0007059}, {"\246W",0.0014078}, {"\253~",0.0023513}, {"\244J",0.0015621}, {"\252\321",0.0005495}, {"\272\330",0.0018411}, {"\246]",0.0010577}, {"\260\323",0.0016298}, {"\244W",0.0048331}, {"\245]",0.0006314}, {"\244G",0.001247}, {"\272c",0.0007005}, {"\262M",0.0005405}, {"\244]",0.001974}, {"\250\323",0.0034731}, {"\262\243",0.0043545}, {"\260]",0.0005022}, {"\252\272",0.0341277}, {"\253n",0.00114}, {"\244\243",0.0063303}, {"\247\326",0.0006737}, {"\244O",0.0022943}, {"\301|",0.0006836}, {"\263N",0.0014501}, {"\305\351",0.0021551}, {"\260O",0.0013592}, {"\263t",0.0005376}, {"\250M",0.0011549}, {"\255x",0.0009727}, {"\245\370",0.0027556}, {"\244T",0.0017945}, {"\250\243",0.0007272}, {"\246\270",0.0014362}, {"\260T",0.000496}, {"\257\253",0.0005762}, {"\263B",0.0009814}, {"\253O",0.0014976}, {"\254\333",0.0010087}, {"\253\327",0.0015281}, {"\244\270",0.002067}, {"\270\364",0.001188}, {"\254F",0.002679}, {"\261j",0.0013442}, {"\266\244",0.0009591}, {"\262`",0.0008945}, {"\274v",0.000514}, {"\252k",0.0025935}, {"\266\260",0.0010417}, {"\257u",0.0006076}, {"\251\262",0.0009796}, {"\255\323",0.0043881}, {"\255n",0.0045003}, {"\265M",0.001088}, {"\245q",0.0017401}, {"\244Q",0.0016297}, {"\246p",0.0012367}, {"\247J",0.0005433}, {"\247\323",0.0008129}, {"\246\373",0.0005246}, {"\274s",0.0011772}, {"\267Q",0.0008423}, {"\246\241",0.0008493}, {"\264\243",0.0016334}, {"\244p",0.0016135}, {"\245\241",0.0004698}, {"\245H",0.0038364}, {"\251\316",0.0006972}, {"\265\370",0.000674}, {"\244H",0.0080773}, {"\260\362",0.0014197}, {"\261\265",0.0007936}, {"\244\361",0.001161}, {"\270s",0.0005419}, {"\270U",0.0020929}, {"\247O",0.0007577}, {"\247\357",0.0018059}, {"\263\346",0.0008341}, {"\266\265",0.0011181}, {"\271\357",0.0032427}, {"\246@",0.0010536}, {"\263f",0.0005011}, {"\255\261",0.0020167}, {"\253H",0.000977}, {"\245@",0.0010821}, {"\252G",0.0008799}, {"\247\370",0.0009976}, {"\274t",0.0012368}, {"\244@",0.0112731}, {"\246\277",0.0009106}, {"\262\325",0.0011894}, {"\257\305",0.0009423}, {"\245\277",0.0013077}, {"\254\343",0.0009783}, {"\261N",0.0014281}, {"\277\244",0.0009752}, {"\246a",0.0047688}, {"\257S",0.0012592}, {"\261i",0.0007204}, {"\263\\",0.0005616}, {"\246\354",0.0016007}, {"\244\353",0.0024389}, {"\273\342",0.0011289}, {"\245\273",0.0024993}, {"\244l",0.0015414}, {"\266i",0.0032419}, {"\252\370",0.0025652}, {"\247Q",0.0018856}, {"\255p",0.00135}, {"\270\321",0.0011085}, {"\255\373",0.0018995}, {"\246\334",0.0007778}, {"\271q",0.001873}, {"\263W",0.0013724}, {"\245\334",0.0004949}, {"\250\354",0.0036926}, {"\245L",0.0031435}, {"\263]",0.0022181}, {"\250\303",0.0012383}, {"\244g",0.0005437}, {"\264\332",0.0005576}, {"\244\300",0.002317}, {"\300\364",0.0006218}, {"\263\243",0.0014503}, {"\252\367",0.001743}, {"\253e",0.0020531}, {"\245\372",0.0005461}, {"\245D",0.0027957}, {"\260\335",0.0015404}, {"\253\334",0.000797}, {"\247\332",0.0034646}, {"\301`",0.0018397}, {"\252p",0.0005979}, {"\263\370",0.0027135}, {"\273P",0.0019506}, {"\247@",0.0040521}, {"\254O",0.0076122}, {"\274w",0.0005846}, {"\250\372",0.0009919}, {"\250D",0.0009944}, {"\252\361",0.0009063}, {"\261\346",0.0005027}, {"\253D",0.000531}, {"\301p",0.0009379}, {"\300u",0.0008197}, {"\255\354",0.0009897}, {"\247\353",0.0011592}, {"\262\304",0.0017413}, {"\250\256",0.0010894}, {"\265L",0.0010303}, {"\305@",0.0005659}, {"\247\354",0.0004875}, {"\263Q",0.000825}, {"\253\366",0.0004965}, {"\263q",0.0015692}, {"\251\312",0.0011996}, {"\256v",0.00052}, {"\244\306",0.0023838}, {"\260\352",0.0106651}, {"\246\355",0.000485}, {"\260\306",0.0006302}, {"\251w",0.0024269}, {"\256u",0.0004695}, {"\263\241",0.0033026}, {"\274W",0.0014225}, {"\253\371",0.0010342}, {"\250\306",0.0018604}, {"\271L",0.0020606}, {"\260\355",0.0004694}, {"\303\321",0.0005749}, {"\267\355",0.001657}, {"\250\374",0.0008222}, {"\270\323",0.0006501}, {"\272\353",0.0007159}, {"\253\374",0.0007731}, {"\266V",0.0004797}, {"\254\241",0.0011783}, {"\252e",0.0005451}, {"\305\334",0.0007406}, {"\271D",0.0012275}, {"\267\307",0.0007058}, {"\261M",0.0009373}, {"\244\275",0.0031331}, {"\252L",0.0007135}, {"\250\307",0.0013308}, {"\252\300",0.0020607}, {"\303\376",0.0005014}, {"\267\275",0.0005666}, {"\277\263",0.0005636}, {"\273{",0.0008819}, {"\246o",0.0005373}, {"\266O",0.0009271}, {"\275\350",0.0009775}, {"\256i",0.0030534}, {"\261\370",0.0012831}, {"\244\345",0.0018717}, {"\251M",0.0067636}, {"\260\310",0.0018869}, {"\266T",0.0006242}, {"\255\314",0.0030767}, {"\256\321",0.001001}, {"\263d",0.0006355}, {"\257q",0.0008483}, {"\250\310",0.0006162}, {"\271\352",0.002744}, {"\275u",0.0005442}, {"\253\310",0.0004833}, {"\264I",0.0004872}, {"\261`",0.0008196}, {"\254\354",0.0014751}, {"\270`",0.000558}, {"\300\263",0.0014049}, {"\254d",0.000721}, {"\302\264",0.0007599}, {"\261q",0.001703}, {"\276P",0.0008187}, {"\252\371",0.0014059}, {"\270q",0.0011046}, {"\305\347",0.0005062}, {"\266q",0.0015425}, {"\277n",0.0006935}, {"\252\314",0.0022472}, {"\261\241",0.0011166}, {"\270\373",0.0005458}, {"\265o",0.0053412}, {"\247\275",0.0009665}, {"\254\335",0.0008716}, {"\252\355",0.0013294}, {"\266\241",0.0010701}, {"\266H",0.0004946}, {"\247\365",0.0006669}, {"\255\310",0.0006514}, {"\256\346",0.0008735}, {"\261\332",0.0005358}, {"\277\357",0.0006163}, {"\301\311",0.0004837}, {"\271\322",0.0005699}, {"\247\345",0.0007277}, {"\276i",0.0004942}, {"\304\263",0.0011071}, {"\251\361",0.0010846}, {"\254\366",0.0004974}, {"\252\275",0.0005522}, {"\301\331",0.0014906}, {"\263\306",0.0006344}, {"\263\314",0.0012694}, {"\252\276",0.0006257}, {"\266\325",0.0006866}, {"\263\320",0.0007723}, {"\261a",0.0006134}, {"\254\371",0.000501}, {"\303\370",0.0007756}, {"\257\340",0.0022237}, {"\251\324",0.0005527}, {"\300Y",0.0007873}, {"\254\374",0.0013899}, {"\254\311",0.0010474}, {"\275\315",0.0006043}, {"\256\360",0.0005779}, {"\251l",0.0004855}, {"\270\334",0.000621}, {"\261\300",0.0006574}, {"\270g",0.0049223}, {"\254I",0.0009187}, {"\306[",0.0007736}, {"\254\331",0.0016366}, {"\263\365",0.0030636}, {"\274\313",0.0008296}, {"\251e",0.001456}, {"\256\327",0.0005503}, {"\263\322",0.0005726}, {"\273\362",0.0006158}, {"\273\241",0.0019478}, {"\276\343",0.0006271}, {"\263o",0.0043446}, {"\256\370",0.0006543}, {"\270\313",0.000643}, {"\304Y",0.0006039}, {"\251\372",0.0014369}, {"\273\332",0.0012275}, {"\300\362",0.0004915}, {"\274\306",0.0008388}, {"\261\304",0.0006097}, {"\274\320",0.0009393}, {"\251\366",0.0006749}, {"\277\354",0.0013224}, {"\270\352",0.0027448}, {"\266}",0.0031058}, {"\270\314",0.0014032}, {"\261\320",0.0013183}, {"\266m",0.0007924}, {"\275\327",0.0007584}, {"\275T",0.0006259}, {"\304\362",0.0005217}, {"\256\332",0.000545}, {"\266\307",0.0007021}, {"\274\322",0.0004864}, {"\303\300",0.0004998}, {"\273\335",0.0007022}, {"\273D",0.0004727}, {"\303D",0.0013688}, {"\261o",0.0019729}, {"\256a",0.0039648}, {"\266\310",0.0005794}, {"\276\367",0.0023189}, {"\303\366",0.0023261}, {"\251\322",0.0015791}, {"\273\371",0.0010855}, {"\276\332",0.0009205}, {"\275\325",0.0012018}, {"\300\347",0.0011203}, {"\276\324",0.0008112}, {"\256\304",0.0009217}, {"\273\365",0.000824}, {"\300\331",0.0026701}, {"\256\306",0.0005776}, {"\302\340",0.0007108}, {"\256\374",0.0015815}, {"\256\311",0.0030057}, {"\276\372",0.0005352}, {"\304\322",0.0011413}, {"\302\355",0.000663}, {"\302I",0.0013538}, {"\276\311",0.0011932}, {"\276\307",0.0027139}, {"\302\276",0.000867}, {"\302\345",0.0005415} }; static const short lookup[] = { 0, 1, -1, 2, 3, 4, 5, -1, 6, 7, 8, 9, -1, 10, 11, -1, 12, -1, 13, 14, 15, 16, -1, 17, 18, 19, 20, -1, 21, 22, 23, 24, -1, 25, 26, 27, 28, -1, 29, 30, 31, 32, -1, 33, 34, 35, 36, -1, 37, 38, -1, 39, -1, 40, 41, 42, 43, -1, 44, 45, 46, 47, -1, 48, 49, 50, 51, -1, 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, 61, 62, 63, 64, -1, 65, 66, 67, 68, -1, 69, 70, 71, 72, -1, 73, 74, 75, 76, -1, 77, 78, 79, 80, -1, 81, 82, 83, -1, -1, 84, 85, 86, 87, -1, 88, 89, 90, 91, -1, 92, 93, 94, 95, -1, 96, 97, 98, 99, -1, 100, 101, 102, 103, -1, 104, 105, 106, 107, -1, 108, 109, 110, 111, -1, 112, 113, 114, 115, -1, 116, 117, 118, 119, -1, 120, 121, 122, 123, -1, 124, 125, 126, 127, -1, 128, 129, 130, 131, -1, 132, 133, 134, 135, -1, 136, 137, 138, 139, -1, 140, 141, 142, 143, -1, 144, 145, 146, 147, -1, 148, 149, 150, 151, -1, 152, 153, 154, 155, -1, 156, 157, 158, 159, -1, 160, 161, 162, 163, -1, 164, 165, 166, 167, -1, 168, 169, 170, 171, -1, 172, 173, 174, 175, -1, 176, 177, 178, 179, -1, 180, -1, 181, 182, -1, 183, 184, 185, 186, -1, 187, -1, 188, 189, -1, 190, -1, 191, 192, -1, 193, 194, 195, 196, -1, 197, 198, 199, 200, -1, 201, 202, 203, 204, -1, 205, -1, 206, 207, -1, 208, 209, 210, 211, -1, 212, -1, 213, 214, -1, 215, 216, 217, 218, -1, 219, 220, 221, 222, -1, 223, -1, 224, 225, -1, 226, -1, 227, 228, -1, 229, 230, 231, 232, -1, 233, 234, 235, 236, -1, 237, -1, 238, 239, -1, 240, -1, 241, 242, -1, 243, -1, 244, 245, -1, 246, 247, 248, 249, -1, 250, -1, 251, 252, -1, 253, 254, 255, 256, -1, 257, 258, 259, 260, -1, 261, -1, 262, 263, -1, 264, -1, 265, 266, -1, 267, -1, 268, 269, 270, 271, 272, 273, 274, -1, 275, -1, 276, 277, -1, 278, -1, 279, 280, -1, 281, -1, 282, 283, -1, 284, -1, 285, 286, -1, 287, -1, 288, 289, -1, 290, -1, 291, 292, -1, 293, -1, 294, 295, -1, 296, -1, 297, 298, -1, 299, -1, 300, 301, -1, 302, -1, 303, 304, -1, 305, -1, 306, 307, -1, 308, -1, 309, 310, -1, 311, -1, 312, 313, -1, 314, -1, 315, 316, -1, 317, -1, 318, 319, -1, 320, -1, 321, 322, -1, 323, -1, 324, 325, -1, 326, -1, 327, 328, -1, 329, -1, 330, 331, -1, 332, -1, 333, 334, -1, 335, -1, 336, 337, -1, 338, -1, 339, 340, -1, 341, -1, 342, 343, -1, 344, -1, 345, 346, -1, 347, 348, 349, 350, -1, 351, -1, 352, 353, -1, 354, -1, 355, 356, -1, 357, -1, 358, 359, -1, 360, -1, 361, 362, -1, 363, -1, 364, 365, -1, 366, -1, 367, 368, -1, 369, -1, 370, 371, -1, 372, -1, 373, 374, -1, 375, -1, 376, 377, -1, 378, -1, 379, 380, -1, 381, -1, 382, -1, -1, 383, -1, 384, 385, -1, 386, -1, 387, 388, -1, 389, -1, 390, -1, -1, 391, -1, 392, 393, -1, 394, -1, 395, 396, -1, 397, -1, 398, 399, -1, 400, -1, 401, 402, -1, 403, -1, 404, -1, -1, 405, -1, 406, 407, -1, 408, -1, 409, 410, -1, 411, -1, 412, 413, -1, 414, -1, 415, -1, -1, 416, -1, 417, -1, -1, 418, -1, 419, -1, -1, 420, -1, 421, 422, -1, 423, -1, 424, -1, -1, 425, -1, 426, -1, -1, -1, -1, 427, -1, -1, 428, -1, 429, -1, -1, 430, -1, 431, 432, -1, 433, -1, 434, 435, -1, 436, 437, 438, -1, -1, 439, -1, 440, 441, -1, 442, -1, 443, -1, -1, 444, -1, 445, 446, -1, 447, -1, 448, -1, -1, -1, -1, 449, -1, -1, -1, -1, 450, -1, -1, 451, -1, 452, -1, -1, 453, -1, 454, -1, -1, -1, -1, 455, -1, -1, -1, -1, 456, -1, -1, 457, -1, 458, 459, -1, -1, -1, 460, -1, -1, 461, -1, 462, -1, -1, -1, -1, 463, -1, -1, -1, -1, -1, -1, -1, 464, -1, -1, -1, -1, -1, -1, -1, 465, -1, 466, -1, 467, -1, -1, 468, -1, 469, -1, -1, -1, -1, 470, 471, -1, -1, -1, -1, -1, -1, -1, -1, 472, -1, -1, -1, -1, 473, -1, -1, 474, -1, -1, 475, -1, -1, -1, 476, -1, -1, -1, -1, 477, -1, -1, 478, -1, 479, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 480, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 481, -1, -1, -1, -1, -1, -1, -1, 482, -1, -1, -1, -1, 483, -1, 484, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 485, -1, -1, 486, -1, 487, -1, -1, -1, -1, 488, -1, -1, -1, -1, 489, -1, -1, 490, -1, 491, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 492, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 493, -1, -1, 494, -1, -1, -1, -1, -1, -1, -1, -1, -1, 495, -1, 496, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 497, -1, -1, -1, -1, -1, -1, 498, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 499 }; register int key = hash_big5 (str); if (key <= MAX_HASH_VALUE && key >= 0) { register int index = lookup[key]; if (index >= 0) { register const unsigned char *s = wordlist[index].name; if (*str == *s && str[1] == s[1]) return &wordlist[index]; } } return 0; } /** * is_big5: * @str: Pointer to a 16-bit wide character. * * Returns: One if the wide character is within Big5 charset range, zero otherwise **/ static int is_big5(const unsigned char *str) { unsigned char high = str[0]; unsigned char low = str[1]; return high >=0xa1 && high <= 0xf9 && ((low >= 0x40 && low <= 0x7e) || (low >= 0xa1 && low <= 0xfe)); } Project-OSS-Revival-enca-36defd7/data/chinese/zh_weight_big5.txt000066400000000000000000000145441507545312400246040ustar00rootroot00000000000000struct zh_weight { char name[2], double freq }; %% ,0.0341277 @,0.0112731 ,0.0106651 b,0.0082045 H,0.0080773 F,0.0079237 ,0.0077624 ,0.0076843 O,0.0076122 ~,0.0071346 M,0.0067636 j,0.0066078 ~,0.0065423 ,0.0063303 ,0.0054216 o,0.0053412 |,0.0051579 u,0.0050114 g,0.0049223 W,0.0048331 a,0.0047688 ,0.0046659 n,0.0045003 ,0.0043881 ,0.0043545 o,0.0043446 X,0.0042527 ,0.0041784 @,0.0040521 ,0.0039844 a,0.0039648 H,0.0038364 ,0.0037219 ,0.0036926 ,0.0036327 ,0.0035945 ,0.0034731 ,0.0034646 ,0.0033026 ,0.0032427 i,0.0032419 h,0.0032382 ,0.0032345 ,0.0032052 L,0.0031435 ,0.0031331 },0.0031058 ,0.0030767 ,0.0030636 i,0.0030534 ,0.0030057 z,0.0029849 s,0.002897 ,0.002853 D,0.0027957 ,0.0027556 ,0.0027448 ,0.002744 ,0.0027139 ,0.0027135 ,0.0026895 F,0.002679 ,0.0026701 ,0.002668 P,0.0026107 _,0.0026086 k,0.0025935 ,0.0025748 ,0.0025652 {,0.0025147 ,0.0024993 ,0.0024389 w,0.0024269 ,0.0023838 [,0.0023829 ,0.0023694 X,0.0023691 ~,0.0023513 ,0.0023459 ,0.0023261 ,0.0023189 ,0.002317 O,0.0022943 ,0.0022824 ~,0.0022498 ,0.0022472 ,0.0022413 ,0.0022237 ],0.0022181 ,0.0021836 N,0.0021619 ,0.0021605 ,0.0021551 U,0.0021357 U,0.0020929 ,0.002067 ,0.0020607 L,0.0020606 e,0.0020531 ,0.0020167 A,0.001983 ],0.001974 o,0.0019729 P,0.0019506 ,0.0019478 ,0.001919 ,0.0018995 ,0.0018881 ,0.0018869 Q,0.0018856 q,0.001873 ,0.0018717 ,0.0018604 i,0.0018478 ,0.0018411 `,0.0018397 ,0.0018059 T,0.0017945 U,0.001779 n,0.0017451 ,0.001743 ,0.0017413 q,0.0017401 ,0.0017313 q,0.001703 ,0.0016647 N,0.0016641 ,0.001657 ,0.0016483 ,0.0016446 ,0.0016366 ,0.0016334 ,0.0016298 Q,0.0016297 ,0.001622 ,0.0016149 p,0.0016135 ,0.0016091 ,0.0016007 ,0.0015919 _,0.0015911 ,0.0015815 ,0.0015791 ,0.0015778 w,0.0015716 q,0.0015692 J,0.0015621 q,0.0015425 l,0.0015414 ,0.0015404 ,0.0015281 _,0.0015279 O,0.0014976 ,0.0014967 ,0.0014906 ,0.0014751 e,0.001456 ,0.0014503 N,0.0014501 ,0.001449 ,0.0014369 ,0.0014365 ,0.0014362 N,0.0014281 W,0.0014225 ,0.0014197 W,0.0014078 V,0.0014073 ,0.0014059 ,0.0014049 ,0.0014032 ,0.0013899 ,0.0013801 W,0.0013724 ,0.0013712 D,0.0013688 O,0.0013592 I,0.0013538 p,0.00135 h,0.0013444 j,0.0013442 ,0.0013376 ,0.0013308 ,0.0013294 t,0.0013262 ,0.0013224 ,0.0013183 ,0.0013077 ,0.0012831 ,0.0012694 F,0.0012618 S,0.0012592 ,0.0012506 ,0.0012488 G,0.001247 ,0.0012406 ,0.0012383 {,0.0012378 t,0.0012368 p,0.0012367 D,0.0012275 ,0.0012275 ,0.0012255 ,0.0012152 f,0.0012146 ,0.0012137 ,0.0012136 ,0.0012122 ,0.0012018 ,0.0011996 ,0.0011932 ,0.0011894 F,0.0011892 ,0.001188 ,0.0011783 s,0.0011772 N,0.0011669 ,0.001161 ,0.0011592 M,0.0011549 ,0.0011534 ,0.0011475 ,0.0011413 n,0.00114 w,0.00114 ,0.0011388 ,0.0011289 ,0.0011242 ,0.0011203 ,0.0011181 ,0.0011166 ,0.0011085 ij,0.0011071 q,0.0011046 s,0.0011044 ,0.0010976 ,0.0010894 M,0.001088 ,0.0010855 ,0.0010846 @,0.0010821 ,0.0010701 ],0.0010577 @,0.0010536 |,0.0010515 B,0.0010507 ,0.0010483 ,0.0010474 ,0.0010417 ,0.0010343 ,0.0010342 L,0.0010303 ,0.0010253 ,0.0010251 ,0.0010087 ,0.001001 ,0.0009976 D,0.0009944 v,0.0009927 ,0.0009919 ,0.0009897 B,0.0009814 ,0.0009796 ,0.0009783 ,0.0009775 H,0.000977 |,0.0009759 B,0.0009758 ,0.0009752 x,0.0009727 ,0.0009711 |,0.0009705 ,0.0009665 F,0.0009596 ,0.0009591 ,0.0009523 S,0.0009509 y,0.0009483 ,0.0009425 ,0.0009423 ,0.0009393 p,0.0009379 M,0.0009373 ,0.0009361 O,0.0009271 ,0.0009217 ,0.0009205 ,0.0009187 I,0.0009187 v,0.0009164 ,0.0009106 ,0.0009063 `,0.0008945 ,0.0008908 {,0.0008819 G,0.0008799 ,0.0008735 X,0.0008733 ,0.0008716 S,0.0008714 ¾,0.000867 A,0.0008639 x,0.0008597 ,0.0008493 q,0.0008483 Q,0.0008423 ,0.0008388 ,0.0008341 ,0.0008296 u,0.0008284 Q,0.000825 ,0.000824 ,0.0008237 ,0.0008222 u,0.0008197 `,0.0008196 P,0.0008187 ,0.0008129 ,0.0008112 y,0.0008055 ,0.000797 ,0.0007936 m,0.0007924 Y,0.0007873 ,0.0007847 ,0.0007778 ,0.0007756 [,0.0007736 ,0.0007731 ,0.0007723 ,0.0007621 ´,0.0007599 ,0.0007584 O,0.0007577 ,0.0007467 ,0.0007439 ,0.0007406 ,0.0007326 ,0.0007277 ,0.0007272 s,0.0007264 ,0.0007224 ,0.0007224 d,0.000721 i,0.0007204 ,0.0007159 C,0.000715 L,0.0007135 ,0.0007108 ,0.0007059 ,0.0007058 ,0.0007036 ,0.0007022 ,0.0007021 ,0.0007016 |,0.0007012 c,0.0007005 ,0.0006981 ,0.0006978 ,0.0006972 ~,0.0006942 n,0.0006935 ,0.0006866 |,0.0006836 ,0.0006812 ,0.0006771 ,0.0006749 ,0.000674 ,0.0006737 ,0.0006669 ,0.0006661 ^,0.0006653 ,0.0006632 ,0.000663 ,0.0006626 ,0.0006574 ,0.0006569 ,0.0006563 ,0.0006543 ,0.0006514 ,0.0006501 ,0.0006468 ,0.000643 ,0.0006362 d,0.0006355 ,0.0006344 {,0.000633 ,0.000632 ],0.0006314 ,0.0006302 ,0.0006288 ,0.0006271 T,0.0006259 ,0.0006257 T,0.0006242 v,0.0006239 ,0.0006218 ,0.000621 ,0.0006176 ,0.0006168 ,0.0006163 ,0.0006162 ,0.0006158 a,0.0006134 ,0.0006097 ,0.0006086 ,0.0006082 u,0.0006076 k,0.0006045 ,0.0006043 Y,0.0006039 ,0.0006023 p,0.0005979 ,0.0005973 ,0.0005953 w,0.0005846 i,0.0005829 ,0.0005794 ,0.0005788 ,0.0005779 ,0.0005776 ,0.0005762 v,0.0005754 ,0.0005749 ,0.0005726 ,0.0005699 ,0.0005666 C,0.0005662 @,0.0005659 C,0.0005658 ,0.0005636 \,0.0005616 ,0.0005598 ,0.0005587 ,0.0005587 h,0.0005586 `,0.000558 ,0.0005576 ,0.0005527 ,0.0005522 ,0.0005503 ,0.0005495 ,0.0005461 ,0.0005458 e,0.0005451 ,0.0005451 ,0.000545 ,0.0005445 u,0.0005442 g,0.0005437 J,0.0005433 A,0.0005426 s,0.0005419 ,0.0005415 M,0.0005405 t,0.0005376 ,0.0005375 o,0.0005373 ,0.0005358 ,0.0005352 D,0.000531 P,0.0005274 ,0.0005246 ,0.0005217 v,0.00052 ,0.0005162 v,0.000514 \,0.0005073 t,0.0005072 ,0.0005062 ,0.0005027 ],0.0005022 ,0.0005014 f,0.0005011 ,0.000501 ,0.0004998 ,0.0004988 s,0.0004976 ,0.0004974 ,0.0004965 T,0.000496 v,0.0004954 ,0.0004949 H,0.0004946 i,0.0004942 ,0.0004915 ,0.0004908 ,0.0004878 ,0.0004875 I,0.0004872 ,0.0004864 l,0.0004855 ,0.000485 ,0.0004837 ,0.0004833 V,0.0004797 D,0.0004727 ,0.0004698 u,0.0004695 ,0.0004694 Project-OSS-Revival-enca-36defd7/data/chinese/zh_weight_gb.txt000066400000000000000000000145441507545312400243460ustar00rootroot00000000000000struct zh_weight { char name[2], double freq }; %% ,0.0341277 һ,0.0112731 ,0.0106651 ,0.0082045 ,0.0080773 ,0.0079237 ,0.0077624 ,0.0076843 ,0.0076122 ,0.0071346 ,0.0067636 ,0.0066078 ҵ,0.0065423 ,0.0063303 Ϊ,0.0054216 ,0.0053412 ,0.0051579 ,0.0050114 ,0.0049223 ,0.0048331 ,0.0047688 ,0.0046659 Ҫ,0.0045003 ,0.0043881 ,0.0043545 ,0.0043446 ,0.0042527 ,0.0041784 ,0.0040521 ,0.0039844 ,0.0039648 ,0.0038364 ,0.0037219 ,0.0036926 ,0.0036327 ,0.0035945 ,0.0034731 ,0.0034646 ,0.0033026 ,0.0032427 ,0.0032419 ,0.0032382 ȫ,0.0032345 ,0.0032052 ,0.0031435 ,0.0031331 ,0.0031058 ,0.0030767 ,0.0030636 չ,0.0030534 ʱ,0.0030057 ,0.0029849 ,0.002897 ,0.002853 ,0.0027957 ,0.0027556 ,0.0027448 ʵ,0.002744 ѧ,0.0027139 ,0.0027135 ,0.0026895 ,0.002679 ,0.0026701 ,0.002668 ͬ,0.0026107 ,0.0026086 ,0.0025935 ,0.0025748 ,0.0025652 ,0.0025147 ,0.0024993 ,0.0024389 ,0.0024269 ,0.0023838 ,0.0023829 ,0.0023694 ,0.0023691 Ʒ,0.0023513 ,0.0023459 ,0.0023261 ,0.0023189 ,0.002317 ,0.0022943 ,0.0022824 ,0.0022498 ,0.0022472 ,0.0022413 ,0.0022237 ,0.0022181 ,0.0021836 ,0.0021619 ,0.0021605 ,0.0021551 ,0.0021357 ,0.0020929 Ԫ,0.002067 ,0.0020607 ,0.0020606 ǰ,0.0020531 ,0.0020167 ũ,0.001983 Ҳ,0.001974 ,0.0019729 ,0.0019506 ˵,0.0019478 ֮,0.001919 Ա,0.0018995 ,0.0018881 ,0.0018869 ,0.0018856 ,0.001873 ,0.0018717 ,0.0018604 ,0.0018478 ,0.0018411 ,0.0018397 ,0.0018059 ,0.0017945 ,0.001779 ,0.0017451 ,0.001743 ,0.0017413 ˾,0.0017401 ,0.0017313 ,0.001703 ƽ,0.0016647 ,0.0016641 ,0.001657 ,0.0016483 ˮ,0.0016446 ʡ,0.0016366 ,0.0016334 ,0.0016298 ʮ,0.0016297 ,0.001622 ,0.0016149 С,0.0016135 ,0.0016091 λ,0.0016007 Ŀ,0.0015919 ,0.0015911 ,0.0015815 ,0.0015791 ,0.0015778 ,0.0015716 ͨ,0.0015692 ,0.0015621 ,0.0015425 ,0.0015414 ,0.0015404 ,0.0015281 ,0.0015279 ,0.0014976 ,0.0014967 ,0.0014906 ,0.0014751 ί,0.001456 ,0.0014503 ,0.0014501 ʹ,0.001449 ,0.0014369 ,0.0014365 ,0.0014362 ,0.0014281 ,0.0014225 ,0.0014197 ,0.0014078 ,0.0014073 ,0.0014059 Ӧ,0.0014049 ,0.0014032 ,0.0013899 ,0.0013801 ,0.0013724 ,0.0013712 ,0.0013688 ,0.0013592 ,0.0013538 ,0.00135 ȥ,0.0013444 ǿ,0.0013442 ,0.0013376 Щ,0.0013308 ,0.0013294 ϵ,0.0013262 ,0.0013224 ,0.0013183 ,0.0013077 ,0.0012831 ,0.0012694 ,0.0012618 ,0.0012592 ,0.0012506 ,0.0012488 ,0.001247 ,0.0012406 ,0.0012383 ,0.0012378 ,0.0012368 ,0.0012367 ,0.0012275 ,0.0012275 ,0.0012255 ,0.0012152 ,0.0012146 ,0.0012137 ,0.0012136 ,0.0012122 ,0.0012018 ,0.0011996 ,0.0011932 ,0.0011894 ,0.0011892 ·,0.001188 ,0.0011783 ,0.0011772 ,0.0011669 ,0.001161 Ͷ,0.0011592 ,0.0011549 ,0.0011534 ͳ,0.0011475 ,0.0011413 ,0.00114 ,0.00114 ,0.0011388 ,0.0011289 ,0.0011242 Ӫ,0.0011203 ,0.0011181 ,0.0011166 ,0.0011085 ,0.0011071 ,0.0011046 ɽ,0.0011044 ,0.0010976 ,0.0010894 Ȼ,0.001088 ,0.0010855 ,0.0010846 ,0.0010821 ,0.0010701 ,0.0010577 ,0.0010536 Ժ,0.0010515 ,0.0010507 ,0.0010483 ,0.0010474 ,0.0010417 ,0.0010343 ,0.0010342 ,0.0010303 ,0.0010253 ,0.0010251 ,0.0010087 ,0.001001 ,0.0009976 ,0.0009944 ,0.0009927 ȡ,0.0009919 ԭ,0.0009897 ,0.0009814 ,0.0009796 ,0.0009783 ,0.0009775 ,0.000977 ,0.0009759 ,0.0009758 ,0.0009752 ,0.0009727 ,0.0009711 ,0.0009705 ,0.0009665 ,0.0009596 ,0.0009591 ,0.0009523 ,0.0009509 ,0.0009483 ,0.0009425 ,0.0009423 ,0.0009393 ,0.0009379 ר,0.0009373 ,0.0009361 ,0.0009271 Ч,0.0009217 ,0.0009205 ,0.0009187 ʩ,0.0009187 Ȩ,0.0009164 ,0.0009106 ,0.0009063 ,0.0008945 ,0.0008908 ,0.0008819 ,0.0008799 ,0.0008735 ,0.0008733 ,0.0008716 û,0.0008714 ְ,0.000867 ,0.0008639 ̨,0.0008597 ʽ,0.0008493 ,0.0008483 ,0.0008423 ,0.0008388 ,0.0008341 ,0.0008296 ֻ,0.0008284 ,0.000825 ,0.000824 ,0.0008237 ,0.0008222 ,0.0008197 ,0.0008196 ,0.0008187 ־,0.0008129 ս,0.0008112 ,0.0008055 ,0.000797 ,0.0007936 ,0.0007924 ͷ,0.0007873 ,0.0007847 ,0.0007778 ,0.0007756 ,0.0007736 ָ,0.0007731 ,0.0007723 ֤,0.0007621 ֯,0.0007599 ,0.0007584 ,0.0007577 ,0.0007467 Э,0.0007439 ,0.0007406 ,0.0007326 ,0.0007277 ,0.0007272 ,0.0007264 ֧,0.0007224 ,0.0007224 ,0.000721 ,0.0007204 ,0.0007159 ÿ,0.000715 ,0.0007135 ת,0.0007108 ,0.0007059 ׼,0.0007058 ,0.0007036 ,0.0007022 ,0.0007021 ,0.0007016 ˰,0.0007012 ,0.0007005 ,0.0006981 ,0.0006978 ,0.0006972 ,0.0006942 ,0.0006935 ,0.0006866 ,0.0006836 ,0.0006812 ,0.0006771 ,0.0006749 ,0.000674 ,0.0006737 ,0.0006669 ,0.0006661 ,0.0006653 ,0.0006632 ,0.000663 ,0.0006626 ,0.0006574 ˼,0.0006569 ,0.0006563 ,0.0006543 ֵ,0.0006514 ,0.0006501 ,0.0006468 װ,0.000643 ,0.0006362 ,0.0006355 ,0.0006344 ,0.000633 ,0.000632 ,0.0006314 ,0.0006302 ,0.0006288 ,0.0006271 ȷ,0.0006259 ֪,0.0006257 ó,0.0006242 ,0.0006239 ,0.0006218 ,0.000621 ,0.0006176 ,0.0006168 ѡ,0.0006163 ,0.0006162 ô,0.0006158 ,0.0006134 ,0.0006097 ,0.0006086 ,0.0006082 ,0.0006076 Ů,0.0006045 ̸,0.0006043 ,0.0006039 ˹,0.0006023 ,0.0005979 ɫ,0.0005973 ,0.0005953 ,0.0005846 ,0.0005829 ,0.0005794 ,0.0005788 ,0.0005779 ,0.0005776 ,0.0005762 ,0.0005754 ʶ,0.0005749 ,0.0005726 ,0.0005699 Դ,0.0005666 ,0.0005662 ,0.0005659 ,0.0005658 ,0.0005636 ,0.0005616 ,0.0005598 ,0.0005587 ,0.0005587 ,0.0005586 ,0.000558 ,0.0005576 ,0.0005527 ֱ,0.0005522 ,0.0005503 ,0.0005495 ,0.0005461 ,0.0005458 ,0.0005451 ,0.0005451 ,0.000545 ,0.0005445 ,0.0005442 ,0.0005437 ,0.0005433 ,0.0005426 Ⱥ,0.0005419 ҽ,0.0005415 ,0.0005405 ,0.0005376 ,0.0005375 ,0.0005373 ,0.0005358 ,0.0005352 ,0.000531 ,0.0005274 ռ,0.0005246 ,0.0005217 ʦ,0.00052 ,0.0005162 Ӱ,0.000514 ,0.0005073 ,0.0005072 ,0.0005062 ,0.0005027 ,0.0005022 ,0.0005014 ,0.0005011 Լ,0.000501 ,0.0004998 ,0.0004988 ,0.0004976 ,0.0004974 ,0.0004965 Ѷ,0.000496 ʷ,0.0004954 ʾ,0.0004949 ,0.0004946 ,0.0004942 ,0.0004915 ʯ,0.0004908 ʳ,0.0004878 ץ,0.0004875 ,0.0004872 ģ,0.0004864 ʼ,0.0004855 ס,0.000485 ,0.0004837 ,0.0004833 Խ,0.0004797 ,0.0004727 ,0.0004698 ϯ,0.0004695 ,0.0004694 Project-OSS-Revival-enca-36defd7/data/chinese/zh_weight_gbk.h000066400000000000000000000632461507545312400241340ustar00rootroot00000000000000/* This header file is in the public domain. Most of its content is generated by gperf, with modifications Chinese frequency table courtesy of Dept. of CS, Tsinghua Univeristy, Beijing See http://fhpi.yingkou.net.cn/bbs/1951/messages/2903.html */ /* ANSI-C code produced by gperf version 3.0.1 */ /* Command-line: gperf -L ANSI-C -I -C -E -n -o -c -D -t zh_weight_gbk.txt */ /* Computed positions: -k'1-2' */ #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) /* The character set is not based on ISO-646. */ #error "gperf generated tables don't work with this execution character set. Please report a bug to ." #endif /* maximum key range = 1014, duplicates = 0 */ #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif /*ARGSUSED*/ static unsigned int hash_gbk (register const unsigned char *str) { static const unsigned short asso_values[] = { 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 1014, 340, 218, 345, 88, 505, 245, 8, 63, 310, 325, 225, 40, 18, 410, 500, 510, 455, 280, 400, 375, 255, 371, 480, 510, 60, 85, 5, 450, 108, 160, 95, 35, 45, 365, 0, 55, 165, 90, 10, 25, 103, 41, 24, 336, 465, 1, 401, 176, 16, 186, 486, 475, 340, 270, 481, 400, 511, 511, 66, 76, 81, 145, 463, 390, 431, 273, 306, 263, 113, 438, 31, 278, 285, 411, 30, 13, 4, 9, 158, 3, 48, 483, 415, 291, 246, 220, 85, 263, 336, 131, 183, 455, 86, 116, 151, 218, 143, 81, 505, 381, 455, 261, 358, 508, 460, 138, 225, 233, 1014, 391, 78, 3, 130, 56, 490, 43, 343, 155, 46, 1014 }; return asso_values[(unsigned char)str[1]+47] + asso_values[(unsigned char)str[0]+7]; } static const struct zh_weight *in_gbk (register const unsigned char *str) { enum { TOTAL_KEYWORDS = 500, MIN_WORD_LENGTH = 2, MAX_WORD_LENGTH = 2, MIN_HASH_VALUE = 0, MAX_HASH_VALUE = 1013 }; static const struct zh_weight wordlist[] = { {"\322\252",0.0045003}, {"\322\265",0.0065423}, {"\322\327",0.0006749}, {"\322\324",0.0038364}, {"\312\265",0.002744}, {"\312\327",0.0006626}, {"\322\325",0.0004998}, {"\326\252",0.0006257}, {"\326\265",0.0006514}, {"\266\324",0.0032427}, {"\326\367",0.0027957}, {"\312\325",0.0012488}, {"\312\256",0.0016297}, {"\312\323",0.000674}, {"\326\256",0.001919}, {"\266\323",0.0009591}, {"\322\262",0.001974}, {"\327\252",0.0007108}, {"\326\270",0.0007731}, {"\327\367",0.0040521}, {"\327\324",0.0022824}, {"\312\257",0.0004908}, {"\274\323",0.0023829}, {"\266\257",0.0023694}, {"\274\270",0.0008733}, {"\326\257",0.0007599}, {"\317\265",0.0013262}, {"\327\323",0.0015414}, {"\273\252",0.0012136}, {"\326\316",0.0009927}, {"\274\257",0.0010417}, {"\326\247",0.0007224}, {"\312\261",0.0030057}, {"\274\322",0.0039648}, {"\320\324",0.0011996}, {"\273\256",0.0007059}, {"\326\261",0.0005522}, {"\266\250",0.0024269}, {"\266\376",0.001247}, {"\323\252",0.0011203}, {"\326\330",0.0023459}, {"\317\257",0.0004695}, {"\274\373",0.0007272}, {"\266\253",0.0011892}, {"\274\376",0.0009711}, {"\273\257",0.0023838}, {"\267\242",0.0053412}, {"\310\325",0.0036327}, {"\327\250",0.0009373}, {"\312\302",0.0018604}, {"\274\253",0.0006288}, {"\273\247",0.0005598}, {"\320\316",0.0009425}, {"\317\373",0.0006543}, {"\320\247",0.0009217}, {"\322\351",0.0011071}, {"\317\330",0.0009752}, {"\273\250",0.0005451}, {"\312\351",0.001001}, {"\273\330",0.0006653}, {"\263\265",0.0010894}, {"\312\241",0.0016366}, {"\310\316",0.0012122}, {"\274\303",0.0026701}, {"\316\252",0.0054216}, {"\273\371",0.0014197}, {"\316\367",0.0012152}, {"\312\246",0.00052}, {"\317\302",0.0021357}, {"\327\366",0.0007036}, {"\274\344",0.0010701}, {"\310\250",0.0009164}, {"\327\351",0.0011894}, {"\267\250",0.0025935}, {"\267\376",0.0008639}, {"\327\241",0.000485}, {"\320\302",0.002897}, {"\326\260",0.000867}, {"\310\253",0.0032345}, {"\322\345",0.0011046}, {"\326\244",0.0007621}, {"\316\257",0.001456}, {"\274\260",0.0012255}, {"\263\247",0.0012368}, {"\314\270",0.0006043}, {"\316\322",0.0034646}, {"\320\304",0.0014967}, {"\327\260",0.000643}, {"\320\241",0.0016135}, {"\323\303",0.002668}, {"\325\373",0.0006271}, {"\320\255",0.0007439}, {"\325\376",0.002679}, {"\266\370",0.0018881}, {"\311\253",0.0005973}, {"\327\345",0.0005358}, {"\273\260",0.000621}, {"\310\241",0.0009919}, {"\325\371",0.0007016}, {"\273\244",0.0005659}, {"\274\341",0.0004694}, {"\323\246",0.0014049}, {"\322\346",0.0008483}, {"\314\250",0.0008597}, {"\322\375",0.0006632}, {"\314\330",0.0012592}, {"\323\260",0.000514}, {"\312\375",0.0008388}, {"\312\326",0.0009187}, {"\324\252",0.002067}, {"\263\366",0.0042527}, {"\326\326",0.0018411}, {"\327\305",0.0014365}, {"\273\341",0.0051579}, {"\263\241",0.0030636}, {"\320\370",0.0005217}, {"\316\304",0.0018717}, {"\273\361",0.0004915}, {"\316\336",0.0010303}, {"\312\267",0.0004954}, {"\322\342",0.0011669}, {"\327\245",0.0004875}, {"\320\350",0.0007022}, {"\320\305",0.000977}, {"\312\271",0.001449}, {"\317\326",0.0025147}, {"\273\375",0.0006935}, {"\263\244",0.0025652}, {"\311\314",0.0016298}, {"\323\305",0.0008197}, {"\263\314",0.0012378}, {"\315\373",0.0005027}, {"\315\250",0.0015692}, {"\324\261",0.0018995}, {"\267\305",0.0010846}, {"\323\375",0.0009705}, {"\316\345",0.0007467}, {"\323\326",0.0009509}, {"\310\375",0.0017945}, {"\273\267",0.0006218}, {"\310\245",0.0013444}, {"\267\326",0.002317}, {"\311\361",0.0005762}, {"\314\345",0.0021551}, {"\322\362",0.0010577}, {"\273\271",0.0014906}, {"\311\350",0.0022181}, {"\326\335",0.000633}, {"\324\302",0.0024389}, {"\316\361",0.0018869}, {"\261\270",0.0006344}, {"\325\305",0.0007204}, {"\310\267",0.0006259}, {"\272\323",0.0005451}, {"\314\341",0.0016334}, {"\316\305",0.0004727}, {"\325\346",0.0006076}, {"\324\366",0.0014225}, {"\325\375",0.0013077}, {"\263\326",0.0010342}, {"\265\367",0.0012018}, {"\312\334",0.0008222}, {"\317\347",0.0007924}, {"\324\255",0.0009897}, {"\272\316",0.0005162}, {"\261\261",0.0015279}, {"\317\362",0.0014073}, {"\261\250",0.0027135}, {"\273\362",0.0006972}, {"\261\330",0.0006812}, {"\317\363",0.0004946}, {"\322\275",0.0005415}, {"\327\334",0.0018397}, {"\325\342",0.0043446}, {"\312\275",0.0008493}, {"\325\271",0.0030534}, {"\310\347",0.0012367}, {"\301\252",0.0009379}, {"\267\347",0.0007326}, {"\301\367",0.0008055}, {"\301\242",0.0015778}, {"\265\261",0.001657}, {"\327\337",0.0006468}, {"\312\320",0.0046659}, {"\314\342",0.0013688}, {"\265\330",0.0047688}, {"\326\320",0.0076843}, {"\312\333",0.0004988}, {"\317\337",0.0005442}, {"\265\253",0.0010253}, {"\272\303",0.0017451}, {"\311\347",0.0020607}, {"\261\344",0.0007406}, {"\315\305",0.0009523}, {"\320\355",0.0005616}, {"\320\313",0.0005636}, {"\274\333",0.0010855}, {"\265\302",0.0005846}, {"\270\367",0.001779}, {"\325\362",0.000663}, {"\326\312",0.0009775}, {"\270\256",0.0009796}, {"\265\303",0.0019729}, {"\310\313",0.0080773}, {"\274\312",0.0012275}, {"\315\254",0.0026107}, {"\265\304",0.0341277}, {"\323\311",0.0013801}, {"\320\320",0.0041784}, {"\327\312",0.0027448}, {"\267\275",0.002853}, {"\315\267",0.0007873}, {"\310\317",0.0008819}, {"\323\320",0.0077624}, {"\312\263",0.0004878}, {"\315\342",0.0022498}, {"\266\340",0.0032382}, {"\312\274",0.0004855}, {"\311\355",0.0006168}, {"\266\274",0.0014503}, {"\271\262",0.0010536}, {"\262\242",0.0012383}, {"\270\261",0.0006302}, {"\325\337",0.0022472}, {"\311\275",0.0011044}, {"\260\270",0.0005503}, {"\274\274",0.0016091}, {"\325\275",0.0008112}, {"\263\311",0.0037219}, {"\311\317",0.0048331}, {"\260\262",0.00114}, {"\327\274",0.0007058}, {"\270\371",0.000545}, {"\271\373",0.0008799}, {"\312\251",0.0009187}, {"\317\340",0.0010087}, {"\271\330",0.0023261}, {"\301\246",0.0022943}, {"\262\316",0.0006661}, {"\303\367",0.0014369}, {"\271\253",0.0031331}, {"\305\256",0.0006045}, {"\327\356",0.0012694}, {"\315\362",0.0020929}, {"\270\303",0.0006501}, {"\270\366",0.0043881}, {"\324\362",0.0005586}, {"\270\304",0.0018059}, {"\317\356",0.0011181}, {"\312\307",0.0076122}, {"\312\365",0.0014501}, {"\273\356",0.0011783}, {"\321\247",0.0027139}, {"\316\312",0.0015404}, {"\310\374",0.0004837}, {"\265\245",0.0008341}, {"\312\266",0.0005749}, {"\274\307",0.0013592}, {"\320\251",0.0013308}, {"\322\321",0.0015716}, {"\322\332",0.000824}, {"\317\353",0.0008423}, {"\303\373",0.0014078}, {"\274\266",0.0009423}, {"\271\246",0.0005073}, {"\321\371",0.0008296}, {"\275\323",0.0007936}, {"\326\332",0.0006362}, {"\262\351",0.000721}, {"\324\313",0.0009758}, {"\325\274",0.0005246}, {"\273\365",0.0005011}, {"\271\244",0.0050114}, {"\324\275",0.0004797}, {"\323\353",0.0019506}, {"\301\326",0.0007135}, {"\266\310",0.0015281}, {"\270\370",0.0007847}, {"\310\353",0.0015621}, {"\311\356",0.0008945}, {"\301\254",0.0004976}, {"\321\351",0.0005062}, {"\270\361",0.0008735}, {"\321\241",0.0006163}, {"\313\265",0.0019478}, {"\267\307",0.000531}, {"\275\250",0.0032052}, {"\274\315",0.0004974}, {"\272\363",0.0021836}, {"\313\256",0.0016446}, {"\270\346",0.0005829}, {"\265\347",0.001873}, {"\275\253",0.0014281}, {"\317\310",0.0010976}, {"\312\306",0.0006866}, {"\323\332",0.0026086}, {"\272\334",0.000797}, {"\326\306",0.0026895}, {"\267\321",0.0009271}, {"\322\273",0.0112731}, {"\271\346",0.0013724}, {"\263\307",0.0010251}, {"\261\355",0.0013294}, {"\271\375",0.0020606}, {"\274\306",0.00135}, {"\320\315",0.0006771}, {"\326\273",0.0008284}, {"\312\276",0.0004949}, {"\275\366",0.0005794}, {"\262\305",0.0006942}, {"\326\276",0.0008129}, {"\313\373",0.0031435}, {"\321\370",0.0004942}, {"\315\263",0.0011475}, {"\300\373",0.0018856}, {"\314\365",0.0012831}, {"\275\255",0.0009106}, {"\304\334",0.0022237}, {"\272\317",0.0023691}, {"\274\272",0.0006239}, {"\324\274",0.000501}, {"\313\371",0.0015791}, {"\271\342",0.0005461}, {"\277\252",0.0031058}, {"\271\271",0.0007005}, {"\303\361",0.0035945}, {"\265\275",0.0036926}, {"\312\300",0.0010821}, {"\264\323",0.001703}, {"\303\305",0.0014059}, {"\326\301",0.0007778}, {"\275\314",0.0013183}, {"\317\372",0.0008187}, {"\303\346",0.0020167}, {"\267\264",0.0006176}, {"\273\372",0.0023189}, {"\313\304",0.0009759}, {"\304\317",0.00114}, {"\310\273",0.001088}, {"\264\316",0.0014362}, {"\263\243",0.0008196}, {"\275\370",0.0032419}, {"\275\341",0.0011242}, {"\301\313",0.0079237}, {"\300\255",0.0005527}, {"\310\272",0.0005419}, {"\275\361",0.0013712}, {"\301\275",0.0013376}, {"\315\365",0.0006086}, {"\313\260",0.0007012}, {"\276\253",0.0007159}, {"\301\317",0.0005776}, {"\264\253",0.0007021}, {"\315\266",0.0011592}, {"\314\354",0.0016483}, {"\301\320",0.0005658}, {"\306\344",0.0017313}, {"\311\331",0.0009361}, {"\316\273",0.0016007}, {"\271\334",0.001622}, {"\270\337",0.0025748}, {"\311\372",0.0039844}, {"\302\267",0.001188}, {"\276\366",0.0011549}, {"\324\332",0.0082045}, {"\265\263",0.0011413}, {"\270\311",0.0009596}, {"\265\274",0.0011932}, {"\277\366",0.0005979}, {"\276\255",0.0049223}, {"\307\351",0.0011166}, {"\275\342",0.0011085}, {"\270\320",0.0005274}, {"\271\311",0.0005495}, {"\264\246",0.0009814}, {"\270\333",0.0005587}, {"\316\357",0.0010483}, {"\313\375",0.0005373}, {"\262\337",0.0006082}, {"\306\370",0.0005779}, {"\307\260",0.0020531}, {"\262\275",0.0010507}, {"\271\333",0.0007736}, {"\262\311",0.0006097}, {"\324\354",0.0009483}, {"\264\345",0.0009976}, {"\315\306",0.0006574}, {"\324\360",0.0006355}, {"\307\345",0.0005405}, {"\275\347",0.0010474}, {"\324\264",0.0005666}, {"\264\370",0.0006134}, {"\313\271",0.0006023}, {"\307\370",0.0022413}, {"\321\317",0.0006039}, {"\304\307",0.0007224}, {"\324\331",0.0005426}, {"\261\310",0.001161}, {"\321\320",0.0009783}, {"\324\272",0.0010515}, {"\270\374",0.0008908}, {"\304\277",0.0015919}, {"\306\267",0.0023513}, {"\276\326",0.0009665}, {"\265\332",0.0017413}, {"\302\355",0.0005587}, {"\272\315",0.0067636}, {"\315\352",0.0006563}, {"\304\321",0.0007756}, {"\261\243",0.0014976}, {"\304\332",0.0016149}, {"\315\301",0.0005437}, {"\302\311",0.0005375}, {"\272\243",0.0015815}, {"\265\310",0.0021605}, {"\261\360",0.0007577}, {"\301\277",0.0015425}, {"\260\374",0.0006314}, {"\262\274",0.0005445}, {"\275\317",0.0005458}, {"\271\251",0.000632}, {"\302\333",0.0007584}, {"\261\273",0.000825}, {"\261\276",0.0024993}, {"\265\343",0.0013538}, {"\304\243",0.0004864}, {"\302\312",0.0005754}, {"\303\263",0.0006242}, {"\306\363",0.0027556}, {"\300\355",0.0029849}, {"\276\335",0.0009205}, {"\261\352",0.0009393}, {"\264\362",0.0005953}, {"\300\317",0.0008237}, {"\301\354",0.0011289}, {"\305\251",0.001983}, {"\264\363",0.0066078}, {"\307\363",0.0009944}, {"\262\277",0.0033026}, {"\321\353",0.0004698}, {"\306\275",0.0016647}, {"\260\321",0.0010343}, {"\275\374",0.0009063}, {"\321\307",0.0006162}, {"\265\300",0.0012275}, {"\304\352",0.0071346}, {"\276\337",0.0006981}, {"\303\307",0.0030767}, {"\321\266",0.000496}, {"\264\313",0.0011388}, {"\277\313",0.0005433}, {"\303\277",0.000715}, {"\271\343",0.0011772}, {"\277\311",0.0018478}, {"\270\273",0.0004872}, {"\313\274",0.0006569}, {"\300\340",0.0005014}, {"\313\374",0.0005788}, {"\260\354",0.0013224}, {"\270\272",0.0005072}, {"\260\264",0.0004965}, {"\262\306",0.0005022}, {"\300\356",0.0006669}, {"\271\372",0.0106651}, {"\270\357",0.0012506}, {"\262\273",0.0063303}, {"\260\331",0.0006978}, {"\275\332",0.000558}, {"\262\372",0.0043545}, {"\276\263",0.0005699}, {"\303\264",0.0006158}, {"\276\374",0.0009727}, {"\307\340",0.0005662}, {"\303\273",0.0008714}, {"\305\372",0.0007277}, {"\276\251",0.0012137}, {"\277\356",0.0005576}, {"\275\360",0.001743}, {"\275\273",0.0011534}, {"\303\300",0.0013899}, {"\300\315",0.0005726}, {"\306\332",0.0012406}, {"\276\277",0.0007264}, {"\307\277",0.0013442}, {"\300\264",0.0034731}, {"\277\332",0.0012146}, {"\313\276",0.0017401}, {"\313\331",0.0005376}, {"\276\315",0.0021619}, {"\306\360",0.0015911}, {"\300\372",0.0005352}, {"\277\315",0.0004833}, {"\300\357",0.0014032}, {"\277\354",0.0006737}, {"\264\264",0.0007723}, {"\277\306",0.0014751}, {"\277\264",0.0008716}, {"\276\331",0.0006836}, {"\264\372",0.0016641}, {"\264\357",0.0012618} }; static const short lookup[] = { 0, 1, -1, 2, 3, -1, 4, -1, 5, 6, 7, 8, 9, 10, 11, 12, -1, -1, 13, -1, 14, 15, -1, -1, 16, 17, 18, -1, 19, 20, 21, 22, -1, 23, 24, 25, 26, -1, 27, -1, 28, 29, -1, 30, -1, 31, 32, -1, 33, 34, 35, 36, -1, 37, 38, 39, -1, -1, 40, -1, 41, 42, -1, 43, 44, 45, -1, -1, 46, 47, 48, 49, -1, 50, -1, 51, 52, -1, 53, -1, 54, 55, -1, 56, -1, 57, 58, -1, 59, 60, 61, 62, -1, -1, 63, 64, 65, -1, 66, -1, 67, 68, -1, 69, 70, 71, 72, -1, 73, 74, 75, 76, -1, 77, -1, 78, 79, -1, 80, -1, 81, 82, -1, 83, 84, 85, 86, -1, 87, -1, 88, 89, -1, 90, -1, 91, 92, -1, 93, -1, 94, 95, -1, 96, -1, 97, 98, -1, 99, 100, 101, 102, -1, 103, -1, 104, 105, -1, 106, -1, 107, -1, -1, 108, -1, 109, 110, -1, 111, -1, 112, 113, -1, 114, -1, 115, 116, -1, 117, -1, 118, 119, -1, 120, -1, 121, -1, -1, 122, -1, 123, 124, -1, 125, -1, 126, 127, -1, 128, -1, 129, 130, -1, 131, -1, 132, 133, -1, 134, -1, 135, 136, -1, 137, -1, 138, 139, -1, -1, -1, 140, 141, -1, 142, 143, 144, 145, -1, 146, -1, 147, 148, -1, 149, 150, 151, 152, -1, 153, 154, 155, 156, -1, 157, -1, 158, 159, -1, 160, -1, -1, 161, -1, 162, -1, 163, 164, -1, -1, 165, 166, -1, -1, 167, -1, 168, 169, -1, 170, -1, 171, 172, -1, 173, -1, 174, 175, -1, 176, -1, 177, 178, -1, 179, -1, 180, 181, -1, 182, -1, 183, 184, -1, 185, -1, 186, 187, -1, 188, -1, 189, 190, -1, 191, 192, 193, 194, -1, 195, 196, -1, 197, -1, 198, -1, 199, 200, -1, -1, -1, 201, 202, -1, 203, 204, 205, 206, -1, 207, -1, 208, 209, -1, 210, -1, -1, 211, -1, 212, -1, 213, 214, -1, 215, 216, 217, 218, -1, 219, 220, 221, 222, -1, 223, -1, 224, 225, -1, 226, -1, 227, 228, -1, 229, 230, 231, 232, -1, 233, -1, 234, 235, -1, 236, -1, 237, 238, -1, 239, -1, 240, 241, -1, 242, -1, 243, 244, -1, 245, -1, 246, 247, -1, 248, -1, 249, 250, -1, 251, -1, 252, 253, -1, 254, -1, 255, 256, -1, 257, -1, 258, 259, -1, -1, -1, 260, 261, -1, 262, 263, 264, 265, -1, 266, -1, 267, 268, -1, 269, -1, 270, 271, -1, 272, -1, 273, 274, -1, 275, 276, 277, 278, -1, 279, -1, 280, 281, -1, 282, -1, 283, 284, -1, 285, -1, 286, 287, -1, 288, -1, 289, 290, -1, 291, -1, 292, 293, -1, 294, -1, 295, 296, -1, 297, 298, 299, 300, -1, 301, 302, 303, 304, -1, 305, -1, 306, 307, -1, 308, -1, 309, 310, -1, 311, -1, 312, 313, -1, 314, 315, 316, 317, -1, 318, 319, 320, 321, -1, 322, -1, 323, 324, -1, 325, -1, 326, 327, -1, 328, -1, 329, 330, -1, 331, -1, 332, 333, -1, 334, -1, 335, 336, -1, 337, -1, 338, 339, -1, 340, -1, 341, 342, -1, 343, -1, 344, 345, -1, 346, -1, 347, 348, -1, 349, -1, 350, -1, -1, 351, -1, 352, 353, -1, 354, -1, 355, 356, -1, 357, -1, 358, 359, -1, 360, -1, 361, 362, -1, 363, -1, 364, 365, -1, 366, -1, 367, -1, -1, 368, -1, 369, 370, -1, 371, -1, 372, -1, -1, 373, -1, 374, 375, -1, 376, -1, 377, -1, -1, 378, -1, 379, -1, -1, 380, -1, 381, 382, -1, 383, -1, 384, 385, -1, 386, -1, 387, 388, -1, 389, -1, 390, -1, -1, -1, -1, 391, 392, -1, -1, -1, 393, -1, -1, 394, -1, 395, -1, -1, 396, 397, 398, 399, -1, 400, -1, 401, 402, -1, 403, -1, 404, 405, -1, 406, -1, 407, 408, -1, 409, -1, 410, 411, -1, 412, -1, 413, 414, -1, 415, -1, 416, -1, -1, 417, -1, 418, -1, -1, 419, -1, 420, 421, -1, 422, -1, -1, -1, -1, -1, 423, 424, -1, -1, -1, -1, 425, 426, -1, -1, -1, -1, 427, -1, 428, -1, -1, 429, -1, -1, -1, 430, -1, -1, 431, -1, -1, -1, -1, -1, -1, 432, -1, -1, 433, -1, 434, 435, -1, 436, -1, -1, -1, -1, 437, -1, 438, 439, -1, -1, -1, 440, 441, -1, 442, -1, 443, 444, -1, -1, -1, 445, -1, -1, 446, -1, 447, 448, -1, 449, -1, -1, -1, -1, 450, -1, 451, -1, -1, -1, -1, 452, -1, -1, 453, -1, 454, -1, -1, -1, -1, 455, 456, -1, 457, -1, 458, 459, -1, -1, -1, -1, -1, -1, -1, -1, 460, -1, -1, 461, -1, -1, -1, -1, 462, -1, 463, -1, -1, 464, -1, 465, -1, -1, 466, -1, 467, -1, -1, -1, -1, -1, -1, -1, -1, -1, 468, 469, -1, -1, -1, 470, -1, -1, 471, -1, -1, 472, -1, -1, -1, 473, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 474, -1, -1, -1, 475, -1, -1, 476, -1, 477, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 478, 479, -1, -1, -1, -1, -1, -1, 480, -1, 481, -1, -1, -1, -1, 482, -1, -1, -1, -1, -1, -1, -1, -1, -1, 483, -1, -1, -1, -1, -1, -1, -1, -1, -1, 484, -1, -1, -1, -1, 485, -1, -1, -1, -1, -1, 486, -1, 487, -1, -1, -1, -1, 488, -1, 489, -1, -1, -1, -1, 490, -1, -1, 491, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 492, -1, 493, -1, -1, -1, -1, 494, -1, -1, 495, -1, 496, -1, -1, -1, -1, -1, -1, -1, 497, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 498, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 499 }; register int key = hash_gbk (str); if (key <= MAX_HASH_VALUE && key >= 0) { register int index = lookup[key]; if (index >= 0) { register const unsigned char *s = wordlist[index].name; if (*str == *s && str[1] == s[1]) return &wordlist[index]; } } return 0; } /** * is_gbk: * @str: Pointer to a 16-bit wide character. * * Dosen't support GB18030 quadbyte (32-bit) characters yet * * Returns: One if the wide character is within GBK charset range, zero otherwise **/ static int is_gbk(const unsigned char *str) { unsigned char high = str[0]; unsigned char low = str[1]; return high >=0x81 && high <= 0xfe && low >= 0x40 && low <= 0xfe && low != 0x7f; } Project-OSS-Revival-enca-36defd7/data/clean.sh000077500000000000000000000004621507545312400211420ustar00rootroot00000000000000#! /bin/bash for d in `ls */doit.sh | cut -d/ -f1`; do echo '[ '$d' ]' cd ./$d >/dev/null test -f "xlt.c" && exit 1 base=`ls rawcounts.* | head -n1 | cut -d. -f2` rm -vf *.c *.pair ls *.base *.xbase | grep -v '^'$base'\.' | xargs rm -vf cd .. >/dev/null done rm -rf letters rm *~ 2>/dev/null Project-OSS-Revival-enca-36defd7/data/countall.c000066400000000000000000000021741507545312400215100ustar00rootroot00000000000000#include #include #include #include #include #define isbinary(x) (iscntrl(x) || (x) == 127) #define FILL_CHARACTER '.' void print_usage(const char *progname) { printf("Usage: %s < [SAMPLE_TEXT]\n", progname); printf("Options:\n"); printf(" -h, --help Show this help message\n"); } int main(int argc, char *argv[]) { unsigned long int count[0x100]; int i, c; int opt; int option_index = 0; static struct option long_options[] = { /* These options set a flag. */ {"help", no_argument, 0, 'h'} }; opt = getopt_long (argc, argv, "h:", long_options, &option_index); switch (opt) { case -1: break; case 'h': print_usage(argv[0]); return 0; default: print_usage(argv[0]); return 1; } for (i = 0; i < 0x100; i++) count[i]=0; while ((c = getchar()) != EOF) count[c]++; for (i = 0; i < 0x100; i++) { if (count[i]) { printf("0x%02x ", i); printf("%c %lu\n", isbinary(i) ? '.' : i, count[i]); } } return 0; } Project-OSS-Revival-enca-36defd7/data/countpair.c000066400000000000000000000046041507545312400216730ustar00rootroot00000000000000#include #include #define NO_CHR 0xffff #define FILL_CHARACTER '.' int main(int argc, char *argv[]) { unsigned int letters[0x100]; unsigned long int count[0x10000]; FILE *f; unsigned long int c; int i, killme, last; unsigned long j, sum; if (argc < 1) { fprintf(stderr, "Error: Missing arguments!\n"); return 0; } /* read letters */ for (i = 0; i < 0x100; i++) letters[i] = 0; f = fopen(argv[1], "r"); while (fscanf(f, "%lx", &j) == 1) letters[j] = 1; fclose(f); /* read stuff */ for (i = 0; i < 0x10000; i++) count[i] = 0; killme = 0; last = FILL_CHARACTER; do { c = getchar(); killme = ((int)c == EOF); if ((int)c == EOF || !letters[c]) c = FILL_CHARACTER; count[last*0x100 + c]++; last = c; } while (!killme); /* note we put things into the same array. that's ugly. */ sum = 0; last = 0; for (i = 0; i < 0x10000; i++) { if (i/0x100 == FILL_CHARACTER && i%0x100 == FILL_CHARACTER) count[i] = 0; else { assert(i >= last); if (count[i]) { sum += count[last++] = count[i]; count[last++] = i; } } } /* sort by count */ last /= 2; do { killme = 1; for (i = 1; i < last; i++) { if (count[2*i] > count[2*i-2]) { killme = 0; j = count[2*i]; count[2*i] = count[2*i-2]; count[2*i-2] = j; j = count[2*i+1]; count[2*i+1] = count[2*i-1]; count[2*i-1] = j; } } } while (!killme); /* kill small */ sum = 0.95*sum; j = 0; for (i = 0; i < last; i++) { j += count[2*i]; if (j > sum) break; } last = i; /* sort by first again */ do { killme = 1; for (i = 1; i < last; i++) { /* note we sort by first letter only, so the second letters will be * sorted by frequency, which is exactly what we want */ if (count[2*i+1]/0x100 < count[2*i-1]/0x100) { killme = 0; j = count[2*i]; count[2*i] = count[2*i-2]; count[2*i-2] = j; j = count[2*i+1]; count[2*i+1] = count[2*i-1]; count[2*i-1] = j; } } } while (!killme); i = 0; while (i < last) { c = count[2*i+1]/0x100; printf("%c:", (char)c); while (i < last && count[2*i+1]/0x100 == c) { printf("%c", (char)count[2*i+1]%0x100); i++; } printf("\n"); } return 0; } /* vim: ts=2 */ Project-OSS-Revival-enca-36defd7/data/croatian/000077500000000000000000000000001507545312400213175ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/data/croatian/cp1250.base000066400000000000000000000001001507545312400230540ustar00rootroot00000000000000 414 409 5188 3876 263 587 84 5403 6857 1415 Project-OSS-Revival-enca-36defd7/data/croatian/croatian.h000066400000000000000000000323141507545312400232730ustar00rootroot00000000000000/***** THIS IS A GENERATED FILE. DO NOT TOUCH! *****/ /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_CP1250[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 414, 0, 0, 0, 409, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 5188, 0, 0, 0, 3876, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 263, 0, /* 0xc0 */ 587, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 84, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 0, 0, 0, 0, 0, 5403, 0, /* 0xe0 */ 6857, 0, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 1415, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_ISO88592[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 414, 0, 0, 0, 0, 409, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 5188, 0, 0, 0, 0, 3876, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 263, 0, /* 0xc0 */ 587, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 84, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 0, 0, 0, 0, 0, 5403, 0, /* 0xe0 */ 6857, 0, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 1415, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_IBM852[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 5403, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 263, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 6857, /* 0x98 */ 0, 0, 0, 0, 0, 0, 409, 3876, /* 0xa0 */ 0, 0, 0, 0, 587, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 1415, 84, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 0, 0, 0, 0, 0, 414, 5188, /* 0xe0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_MACCE[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 587, 0, 6857, 263, 5403, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 84, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 414, 0, 0, 5188, 0, 0, 0, /* 0xe0 */ 0, 0, 0, 409, 3876, 0, 0, 0, /* 0xe8 */ 1415, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_CORK[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 263, 587, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 414, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 409, 0, 0, 0, 1415, 0, /* 0x98 */ 0, 0, 5403, 6857, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 5188, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 3876, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 84, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/totals.pl. */ static const unsigned short int SIGNIFICANT[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 263, 587, 0, 0, 5403, 0, /* 0x80 */ 0, 587, 414, 6857, 263, 5403, 409, 263, /* 0x88 */ 0, 0, 414, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 5597, 0, 0, 0, 5291, 6857, /* 0x98 */ 0, 0, 5403, 6857, 0, 0, 409, 3876, /* 0xa0 */ 0, 414, 0, 0, 587, 0, 409, 0, /* 0xa8 */ 0, 0, 5188, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 5188, 3876, 0, 0, 0, 3876, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 526, 0, /* 0xc0 */ 1174, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 1751, 84, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 414, 0, 0, 5188, 0, 11220, 5188, /* 0xe0 */ 13714, 0, 0, 409, 3876, 0, 0, 0, /* 0xe8 */ 4245, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define WEIGHT_SUM 24496 /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const char *const CHARSET_NAMES[] = { "cp1250", "iso88592", "ibm852", "macce", "cork", }; /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const unsigned short int *const CHARSET_WEIGHTS[] = { RAW_CP1250, RAW_ISO88592, RAW_IBM852, RAW_MACCE, RAW_CORK, }; /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define CHARSET_LETTERS NULL /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define CHARSET_PAIRS NULL /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define NCHARSETS 5 Project-OSS-Revival-enca-36defd7/data/croatian/doit.sh000077500000000000000000000000721507545312400226140ustar00rootroot00000000000000#! /bin/bash ../doit.sh cp1250 iso88592 ibm852 macce cork Project-OSS-Revival-enca-36defd7/data/croatian/rawcounts.cp1250000066400000000000000000000030261507545312400242010ustar00rootroot000000000000000x09 . 1064 0x0a . 68883 0x0d . 57400 0x20 894657 0x21 ! 949 0x22 " 168303 0x23 # 6193 0x24 $ 9 0x25 % 3365 0x26 & 8392 0x27 ' 6037 0x28 ( 7156 0x29 ) 7155 0x2a * 97 0x2b + 612 0x2c , 24096 0x2d - 17768 0x2e . 49532 0x2f / 66618 0x30 0 46376 0x31 1 27351 0x32 2 15615 0x33 3 15120 0x34 4 7821 0x35 5 14641 0x36 6 11973 0x37 7 4969 0x38 8 7456 0x39 9 8681 0x3a : 11667 0x3b ; 19569 0x3c < 105533 0x3d = 99170 0x3e > 105497 0x3f ? 320 0x40 @ 1064 0x41 A 16592 0x42 B 2855 0x43 C 6433 0x44 D 6603 0x45 E 8767 0x46 F 4797 0x47 G 4918 0x48 H 12053 0x49 I 11884 0x4a J 3063 0x4b K 3990 0x4c L 3400 0x4d M 8442 0x4e N 6401 0x4f O 7841 0x50 P 5389 0x51 Q 32 0x52 R 6208 0x53 S 6960 0x54 T 12262 0x55 U 2799 0x56 V 4881 0x57 W 2643 0x58 X 119 0x59 Y 635 0x5a Z 2754 0x5b [ 1622 0x5c \ 12 0x5d ] 1619 0x5f _ 5472 0x60 ` 2 0x61 a 214383 0x62 b 54196 0x63 c 63051 0x64 d 88650 0x65 e 190883 0x66 f 54376 0x67 g 59484 0x68 h 64527 0x69 i 185352 0x6a j 39139 0x6b k 38520 0x6c l 101820 0x6d m 61337 0x6e n 147847 0x6f o 154035 0x70 p 71657 0x71 q 1879 0x72 r 147688 0x73 s 135786 0x74 t 186550 0x75 u 50856 0x76 v 50956 0x77 w 20924 0x78 x 10579 0x79 y 11887 0x7a z 21651 0x7b { 1364 0x7c | 996 0x7d } 1364 0x7e ~ 108 0x7f . 1 0x80 10 0x85 7 0x8a 414 0x8e 409 0x92 5 0x93 33 0x94 31 0x95 41 0x96 39 0x9a 5188 0x9e 3876 0xa0 5 0xa9 99 0xab 6 0xb0 2 0xb7 7 0xbb 335 0xc6 263 0xc8 587 0xc9 7 0xd0 84 0xd6 1 0xe1 11 0xe2 8 0xe4 21 0xe6 5403 0xe8 6857 0xe9 19 0xf0 1415 0xf3 1 0xf4 1 0xf6 23 0xfb 2 0xfc 40 Project-OSS-Revival-enca-36defd7/data/czech/000077500000000000000000000000001507545312400206135ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/data/czech/czech.h000066400000000000000000000425341507545312400220700ustar00rootroot00000000000000/***** THIS IS A GENERATED FILE. DO NOT TOUCH! *****/ /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_ISO88592[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 37, 0, 0, 0, 0, 33, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 1751, 0, 121, 0, 0, 2506, 0, /* 0xb8 */ 0, 56, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 63, 14, 0, 0, 14, 56, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 42, 0, 34, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 4600, 0, 0, 0, 0, 0, 0, /* 0xe0 */ 2110, 1874, 0, 0, 3563, 5975, 0, 129, /* 0xe8 */ 0, 0, 121, 73, 0, 0, 0, 0, /* 0xf0 */ 2421, 987, 193, 0, 0, 1618, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_CP1250[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 37, 0, 0, 0, 33, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 1751, 0, 0, 121, 2506, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 56, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 63, 14, 0, 0, 14, 56, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 42, 0, 34, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 4600, 0, 0, 0, 0, 0, 0, /* 0xe0 */ 2110, 1874, 0, 0, 3563, 5975, 0, 129, /* 0xe8 */ 0, 0, 121, 73, 0, 0, 0, 0, /* 0xf0 */ 2421, 987, 193, 0, 0, 1618, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_IBM852[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 1874, 0, 0, 987, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 14, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 121, 0, 0, 2110, /* 0x98 */ 4600, 5975, 73, 193, 0, 0, 33, 2506, /* 0xa0 */ 0, 0, 0, 0, 63, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 56, 0, 14, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 129, 0, 56, 0, /* 0xd0 */ 3563, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 0, 0, 0, 0, 121, 37, 1751, /* 0xe0 */ 0, 34, 0, 0, 1618, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 42, 2421, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_KEYBCS2[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 63, 0, 1874, 129, 0, 0, 0, 2110, /* 0x80 */ 3563, 14, 0, 56, 0, 0, 0, 56, /* 0x88 */ 14, 2506, 33, 0, 0, 0, 987, 34, /* 0x90 */ 1618, 0, 0, 37, 0, 0, 42, 121, /* 0x98 */ 4600, 5975, 73, 193, 121, 0, 0, 0, /* 0xa0 */ 1751, 2421, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_MACCE[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 14, 0, 0, 0, 4600, /* 0x80 */ 0, 63, 0, 2110, 0, 0, 1874, 0, /* 0x88 */ 0, 0, 5975, 129, 0, 0, 0, 73, /* 0x90 */ 0, 0, 0, 0, 193, 14, 3563, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 121, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 42, 0, 0, 2421, 0, /* 0xd8 */ 0, 37, 0, 0, 1751, 0, 0, 56, /* 0xe0 */ 0, 121, 56, 33, 2506, 0, 0, 0, /* 0xe8 */ 0, 0, 34, 987, 0, 0, 0, 0, /* 0xf0 */ 0, 1618, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_KOI8CS2[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 4600, 0, 2110, 129, 3563, 0, 0, /* 0xc0 */ 0, 5975, 987, 0, 0, 0, 121, 73, /* 0xc8 */ 0, 0, 2421, 1751, 121, 193, 0, 1874, /* 0xd0 */ 0, 1618, 2506, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 56, 0, 63, 0, 14, 0, 0, /* 0xe0 */ 0, 56, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 0, 0, 42, 37, 0, 34, 0, 14, /* 0xf0 */ 0, 0, 33, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_CORK[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 63, 0, 14, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 42, 0, 37, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 33, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 2110, 129, 3563, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 121, 0, 0, 0, /* 0xa8 */ 2421, 0, 1751, 0, 121, 0, 0, 987, /* 0xb0 */ 0, 0, 2506, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 56, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 14, 0, 0, 0, 56, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 34, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 4600, 0, 0, 0, 0, 0, 0, /* 0xe0 */ 0, 1874, 0, 0, 0, 5975, 0, 0, /* 0xe8 */ 0, 0, 0, 73, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 193, 0, 0, 1618, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/totals.pl. */ static const unsigned short int SIGNIFICANT[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 63, 0, 3748, 206, 0, 1001, 0, 6710, /* 0x80 */ 3563, 77, 37, 2166, 0, 0, 1907, 56, /* 0x88 */ 70, 2506, 6045, 129, 0, 0, 987, 107, /* 0x90 */ 1618, 0, 1784, 37, 314, 135, 6111, 2231, /* 0x98 */ 9200, 11950, 146, 2496, 250, 3563, 33, 2506, /* 0xa0 */ 1751, 2458, 0, 0, 184, 0, 33, 0, /* 0xa8 */ 2421, 0, 1751, 0, 121, 56, 0, 1001, /* 0xb0 */ 0, 1751, 2506, 121, 0, 0, 2506, 0, /* 0xb8 */ 0, 4768, 0, 2110, 129, 3563, 0, 0, /* 0xc0 */ 126, 6017, 987, 121, 28, 168, 121, 73, /* 0xc8 */ 0, 0, 2421, 1751, 250, 193, 56, 1874, /* 0xd0 */ 3647, 1618, 2608, 42, 0, 0, 2421, 0, /* 0xd8 */ 0, 13893, 0, 63, 1751, 135, 37, 1807, /* 0xe0 */ 4220, 5833, 56, 33, 11250, 17925, 0, 258, /* 0xe8 */ 0, 0, 318, 1243, 0, 34, 0, 14, /* 0xf0 */ 4842, 3592, 612, 0, 42, 7275, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define WEIGHT_SUM 28391 /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const char *const CHARSET_NAMES[] = { "iso88592", "cp1250", "ibm852", "keybcs2", "macce", "koi8cs2", "cork", }; /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const unsigned short int *const CHARSET_WEIGHTS[] = { RAW_ISO88592, RAW_CP1250, RAW_IBM852, RAW_KEYBCS2, RAW_MACCE, RAW_KOI8CS2, RAW_CORK, }; /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define CHARSET_LETTERS NULL /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define CHARSET_PAIRS NULL /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define NCHARSETS 7 Project-OSS-Revival-enca-36defd7/data/czech/doit.sh000077500000000000000000000001121507545312400221030ustar00rootroot00000000000000#! /bin/bash ../doit.sh iso88592 cp1250 ibm852 keybcs2 macce koi8cs2 cork Project-OSS-Revival-enca-36defd7/data/czech/iso88592.base000066400000000000000000000002171507545312400226610ustar00rootroot00000000000000 37 33 1751 121 2506 56 63 14 14 56 42 34 4600 2110 1874 3563 5975 129 121 73 2421 987 193 1618 Project-OSS-Revival-enca-36defd7/data/czech/rawcounts.iso88592000066400000000000000000000027731507545312400240050ustar00rootroot000000000000000 . 1 9 . 10985 10 . 103531 13 . 58730 26 . 1 32 630197 33 ! 4121 34 " 45651 35 # 3008 36 $ 7335 37 % 3333 38 & 18354 39 ' 1375 40 ( 5917 41 ) 6096 42 * 861 43 + 1368 44 , 51573 45 - 20025 46 . 61967 47 / 34947 48 0 8025 49 1 10433 50 2 9618 51 3 3944 52 4 2861 53 5 3993 54 6 2200 55 7 1587 56 8 3152 57 9 2868 58 : 8110 59 ; 13973 60 < 63596 61 = 20298 62 > 63783 63 ? 4122 64 @ 826 65 A 16166 66 B 8906 67 C 12677 68 D 14161 69 E 16863 70 F 11052 71 G 3352 72 H 8249 73 I 9666 74 J 5505 75 K 6443 76 L 9938 77 M 8137 78 N 17291 79 O 16564 80 P 18540 81 Q 539 82 R 10637 83 S 11158 84 T 25912 85 U 3555 86 V 7465 87 W 2075 88 X 3295 89 Y 1961 90 Z 6644 91 [ 1208 92 \ 20922 93 ] 1211 94 ^ 2329 95 _ 3763 96 ` 671 97 a 232801 98 b 66059 99 c 82150 100 d 118219 101 e 282628 102 f 19550 103 g 13861 104 h 83282 105 i 139675 106 j 63988 107 k 105864 108 l 157438 109 m 114582 110 n 201060 111 o 251724 112 p 108757 113 q 2256 114 r 121671 115 s 158686 116 t 196170 117 u 104891 118 v 115575 119 w 4028 120 x 7694 121 y 60666 122 z 63135 123 { 8174 124 | 640 125 } 8177 126 ~ 4925 132 210 133 60 145 2 146 1 147 203 148 139 150 460 160 1 168 1 169 531 171 51 174 468 180 7 185 24527 187 1699 190 35094 192 2 193 796 200 890 201 198 204 204 205 788 207 14 210 25 211 69 216 599 217 80 218 486 221 138 225 64400 228 8 229 1 232 29551 233 26237 236 49883 237 83652 239 1808 242 1696 243 1022 246 14 248 33906 249 13822 250 2702 252 8 253 22665 Project-OSS-Revival-enca-36defd7/data/doit.sh000077500000000000000000000031051507545312400210140ustar00rootroot00000000000000#! /bin/bash charsets="$@" base=$1 language=$(basename $(pwd)) target=$language.h xlate () { ../xlt ../maps/$1.map ../maps/$2.map } # This is a recursive call. if test -z "$base"; then for d in `ls */doit.sh | cut -d/ -f1`; do echo '[ '$d' ]' cd ./$d >/dev/null ./doit.sh cd .. >/dev/null done exit 0 fi # Counts for cs in $charsets; do echo '+'$cs... if test "$cs" != "$base"; then if test -s $cs.xbase; then mv -f $cs.xbase $cs.base else rm -f $cs.xbase 2>/dev/null xlate $base $cs <$base.base >$cs.base if test ! -s $cs.base; then echo "Cannot create $cs.base" 2>&1 exit 1 fi fi fi ../basetoc $cs <$cs.base >$cs.c done # Pairs if test -f paircounts.$base; then if test `echo $charsets | wc -w` -gt 8; then echo '*** Warning: more than 8 charsets. Expect coredumps... ***' 1>&2 fi for cs in $charsets; do echo '++'$cs... if test -f paircounts.$cs; then cp paircounts.$cs $cs.pair else xlate $base $cs <$base.pair >$cs.pair fi if test ! -s $cs.pair; then echo "Cannot create $cs.pair" 2>&1 exit 1 fi ../pairtoc $cs ../letters/$cs.letters <$cs.pair >$cs.p.c done fi # Totals echo =totals... ../totals.pl $charsets if test ! -s totals.c; then echo "Cannot create totals.c" 2>&1 exit 1 fi echo '>'$target... echo "/***** THIS IS A GENERATED FILE. DO NOT TOUCH! *****/" >$target for cs in $charsets; do cat $cs.c >>$target if test -s $cs.p.c; then cat $cs.p.c >>$target fi echo >>$target done cat totals.c >>$target echo done. Project-OSS-Revival-enca-36defd7/data/estonian/000077500000000000000000000000001507545312400213375ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/data/estonian/doit.sh000077500000000000000000000001061507545312400226320ustar00rootroot00000000000000#! /bin/bash ../doit.sh iso88594 cp1257 ibm775 iso885913 macce baltic Project-OSS-Revival-enca-36defd7/data/estonian/estonian.h000066400000000000000000000364401507545312400233370ustar00rootroot00000000000000/***** THIS IS A GENERATED FILE. DO NOT TOUCH! *****/ /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_ISO88594[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 8, 0, 0, 0, 0, 6, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 143, 0, 0, 0, 0, 63, 0, /* 0xb8 */ 0, 0, 0, 0, 33, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 66, 8, 0, /* 0xd0 */ 0, 0, 0, 0, 169, 0, 0, 0, /* 0xd8 */ 0, 0, 0, 0, 5657, 0, 0, 0, /* 0xe0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 0, 0, 5588, 2041, 0, /* 0xf0 */ 0, 0, 0, 0, 3469, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_CP1257[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 33, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 8, 0, 0, 0, 0, 66, 8, 0, /* 0xd0 */ 0, 0, 0, 0, 169, 0, 6, 0, /* 0xd8 */ 0, 0, 0, 0, 5657, 0, 0, 0, /* 0xe0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 143, 0, 0, 0, 0, 5588, 2041, 0, /* 0xf0 */ 0, 0, 0, 0, 3469, 0, 63, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_IBM775[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 3469, 0, 0, 5657, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 33, 0, /* 0x88 */ 0, 0, 0, 0, 2041, 0, 0, 0, /* 0x90 */ 0, 8, 169, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 8, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 6, /* 0xc8 */ 0, 0, 0, 0, 0, 143, 0, 0, /* 0xd0 */ 63, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 0, 0, 0, 5588, 66, 0, 0, /* 0xe0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_ISO885913[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 33, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 8, 0, 0, 0, 0, 66, 8, 0, /* 0xd0 */ 0, 0, 0, 0, 169, 0, 6, 0, /* 0xd8 */ 0, 0, 0, 0, 5657, 0, 0, 0, /* 0xe0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 143, 0, 0, 0, 0, 5588, 2041, 0, /* 0xf0 */ 0, 0, 0, 0, 3469, 0, 63, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_MACCE[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 33, 0, 0, 0, 0, 8, 169, 0, /* 0x80 */ 0, 0, 5657, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 2041, 5588, 0, 0, 0, 3469, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 66, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 8, 0, 0, 143, 0, 0, 0, /* 0xe0 */ 0, 0, 0, 6, 63, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_BALTIC[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 33, 0, 0, 0, /* 0xc0 */ 0, 0, 6, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 66, 8, 0, /* 0xd0 */ 0, 8, 0, 0, 169, 0, 0, 0, /* 0xd8 */ 0, 0, 0, 0, 5657, 0, 0, 0, /* 0xe0 */ 0, 0, 63, 0, 0, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 0, 0, 5588, 2041, 0, /* 0xf0 */ 0, 143, 0, 0, 3469, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/totals.pl. */ static const unsigned short int SIGNIFICANT[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 33, 3469, 0, 0, 5657, 8, 169, 0, /* 0x80 */ 0, 0, 5657, 0, 0, 0, 33, 0, /* 0x88 */ 0, 0, 0, 0, 2041, 0, 0, 0, /* 0x90 */ 0, 8, 2210, 5588, 0, 0, 0, 3469, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 8, 0, 0, 0, 0, 6, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 143, 0, 0, 0, 0, 71, 0, /* 0xb8 */ 0, 0, 0, 0, 132, 0, 0, 0, /* 0xc0 */ 0, 0, 6, 0, 0, 66, 0, 6, /* 0xc8 */ 16, 0, 0, 0, 0, 407, 32, 0, /* 0xd0 */ 63, 8, 0, 0, 676, 0, 12, 0, /* 0xd8 */ 0, 8, 0, 0, 28359, 66, 0, 0, /* 0xe0 */ 0, 0, 63, 6, 63, 0, 0, 0, /* 0xe8 */ 286, 0, 0, 0, 0, 22352, 8164, 0, /* 0xf0 */ 0, 143, 0, 0, 13876, 0, 126, 0, /* 0xf8 */ }; /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define WEIGHT_SUM 17251 /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const char *const CHARSET_NAMES[] = { "iso88594", "cp1257", "ibm775", "iso885913", "macce", "baltic", }; /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const unsigned short int *const CHARSET_WEIGHTS[] = { RAW_ISO88594, RAW_CP1257, RAW_IBM775, RAW_ISO885913, RAW_MACCE, RAW_BALTIC, }; /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define CHARSET_LETTERS NULL /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define CHARSET_PAIRS NULL /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define NCHARSETS 6 Project-OSS-Revival-enca-36defd7/data/estonian/iso88594.base000066400000000000000000000001031507545312400234010ustar00rootroot00000000000000 8 6 143 63 33 66 8 169 5657 5588 2041 3469 Project-OSS-Revival-enca-36defd7/data/estonian/rawcounts.iso88594000066400000000000000000000027051507545312400245260ustar00rootroot000000000000000x0a . 101704 0x0d . 7 0x20 1334193 0x21 ! 2177 0x22 " 17533 0x25 % 832 0x26 & 11 0x27 ' 1334 0x28 ( 10501 0x29 ) 10624 0x2a * 565 0x2b + 331 0x2c , 85292 0x2d - 18948 0x2e . 100508 0x2f / 716 0x30 0 169785 0x31 1 44281 0x32 2 29559 0x33 3 26438 0x34 4 22425 0x35 5 20400 0x36 6 17273 0x37 7 17681 0x38 8 18419 0x39 9 18782 0x3a : 5164 0x3b ; 2346 0x3c < 40 0x3d = 337 0x3e > 140 0x3f ? 3146 0x41 A 55622 0x42 B 9615 0x43 C 1809 0x44 D 2405 0x45 E 31652 0x46 F 1343 0x47 G 1715 0x48 H 18081 0x49 I 36576 0x4a J 19318 0x4b K 20553 0x4c L 32238 0x4d M 12277 0x4e N 12901 0x4f O 26568 0x50 P 36233 0x51 Q 66 0x52 R 10882 0x53 S 24542 0x54 T 26820 0x55 U 24735 0x56 V 11727 0x57 W 650 0x58 X 755 0x59 Y 95 0x5a Z 301 0x5b [ 382 0x5c \ 78298 0x5d ] 384 0x5e ^ 69 0x5f _ 12 0x60 ` 5 0x61 a 777170 0x62 b 51279 0x63 c 3210 0x64 d 256862 0x65 e 692708 0x66 f 9387 0x67 g 122120 0x68 h 107507 0x69 i 633030 0x6a j 110740 0x6b k 309980 0x6c l 389040 0x6d m 227336 0x6e n 303206 0x6f o 256811 0x70 p 114781 0x71 q 99 0x72 r 205604 0x73 s 583476 0x74 t 640147 0x75 u 379398 0x76 v 148222 0x77 w 744 0x78 x 451 0x79 y 1119 0x7a z 1144 0x7b { 37 0x7c | 84 0x7d } 37 0x7e ~ 14 0xa0 2 0xa1 7 0xa7 279 0xa8 98 0xa9 122 0xab 14 0xae 92 0xb0 254 0xb9 2006 0xbe 889 0xc1 2 0xc4 474 0xd5 925 0xd6 122 0xd8 9 0xdc 2366 0xdf 9 0xe1 45 0xe3 1 0xe4 79207 0xe5 15 0xe9 84 0xeb 1 0xec 3 0xf5 78242 0xf6 28582 0xf8 2 0xf9 1 0xfa 23 0xfc 48577 Project-OSS-Revival-enca-36defd7/data/extreme.pl000077500000000000000000000016341507545312400215340ustar00rootroot00000000000000#!/usr/bin/perl use warnings; use strict; my @w1 = ( 0 ) x 0x100; my @w2 = ( 0 ) x 0x100; my $m; open FH, "<".$ARGV[0]; while () { my $ch = substr $_,0,1; my $count = substr $_,2; $w1[ord $ch] = $count; } close FH; open FH, "<".$ARGV[1]; while () { my $ch = substr $_,0,1; my $count = substr $_,2; $w2[ord $ch] = $count; } close FH; for (my $i = 0; $i < 0x100; $i++) { my $x = $w1[$i]; $w1[$i] -= 4*$w2[$i]; $w2[$i] -= 4*$x; } $m = 1; while ($m > 0) { my $j = 0; for (my $i = 1; $i < 0x100; $i++) { if ($w1[$i] > $w1[$j]) { $j = $i; } } $m = $w1[$j]; if ($m > 0) { printf '0x%02x, (%u)'."\n", $j, $m; $w1[$j] = -1; } } print "\n"; $m = 1; while ($m > 0) { my $j = 0; for (my $i = 1; $i < 0x100; $i++) { if ($w2[$i] > $w2[$j]) { $j = $i; } } $m = $w2[$j]; if ($m > 0) { printf '0x%02x, (%u)'."\n", $j, $m; $w2[$j] = -1; } } Project-OSS-Revival-enca-36defd7/data/findletters.c000066400000000000000000000007221507545312400222070ustar00rootroot00000000000000#include int main(int argc, char *argv[]) { unsigned int map[0x100]; unsigned int letter_map[0x10000]; unsigned int i; FILE *f; f = fopen(argv[1], "r"); for (i = 0; i < 0x100; i++) fscanf(f, "%x", map + i); fclose(f); for (i = 0; i < 0x10000; i++) letter_map[i] = 0; while (scanf("%x", &i) == 1) letter_map[i] = 1; for (i = 0; i < 0x100; i++) { if (letter_map[map[i]]) printf("%02x\n", i); } return 0; } Project-OSS-Revival-enca-36defd7/data/finnish/000077500000000000000000000000001507545312400211555ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/data/finnish/doit.sh000077500000000000000000000000471507545312400224540ustar00rootroot00000000000000#! /bin/bash ../doit.sh iso88594 cp1257Project-OSS-Revival-enca-36defd7/data/finnish/finnish.h000066400000000000000000000153541507545312400227740ustar00rootroot00000000000000/***** THIS IS A GENERATED FILE. DO NOT TOUCH! *****/ /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_ISO88594[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 4, 21, 0, 0, 2, 1, 2, /* 0x20 */ 24, 24, 0, 0, 326, 128, 0, 7, /* 0x28 */ 122, 105, 76, 33, 28, 34, 25, 25, /* 0x30 */ 28, 49, 39, 2, 0, 0, 0, 8, /* 0x38 */ 0, 58, 21, 18, 14, 52, 14, 11, /* 0x40 */ 69, 31, 46, 118, 61, 83, 42, 37, /* 0x48 */ 74, 0, 39, 133, 96, 23, 66, 9, /* 0x50 */ 1, 23, 1, 0, 0, 0, 0, 1, /* 0x58 */ 0, 5399, 37, 32, 403, 3579, 32, 84, /* 0x60 */ 765, 4735, 859, 2254, 2539, 1338, 3767, 2470, /* 0x68 */ 768, 1, 1096, 3362, 4242, 2326, 1031, 11, /* 0x70 */ 4, 800, 6, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 6, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 1, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 2, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 0, 0, 0, 1808, 0, 0, 0, /* 0xe0 */ 0, 1, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 255, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_CP1257[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 4, 21, 0, 0, 2, 1, 2, /* 0x20 */ 24, 24, 0, 0, 326, 128, 0, 7, /* 0x28 */ 122, 105, 76, 33, 28, 34, 25, 25, /* 0x30 */ 28, 49, 39, 2, 0, 0, 0, 8, /* 0x38 */ 0, 58, 21, 18, 14, 52, 14, 11, /* 0x40 */ 69, 31, 46, 118, 61, 83, 42, 37, /* 0x48 */ 74, 0, 39, 133, 96, 23, 66, 9, /* 0x50 */ 1, 23, 1, 0, 0, 0, 0, 1, /* 0x58 */ 0, 5399, 37, 32, 403, 3579, 32, 84, /* 0x60 */ 765, 4735, 859, 2254, 2539, 1338, 3767, 2470, /* 0x68 */ 768, 1, 1096, 3362, 4242, 2326, 1031, 11, /* 0x70 */ 4, 800, 6, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 6, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 2, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 0, 0, 0, 1808, 0, 0, 0, /* 0xe0 */ 0, 1, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 1, 0, 0, 0, 0, 0, 255, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/totals.pl. */ static const unsigned short int SIGNIFICANT[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 8, 42, 0, 0, 4, 2, 4, /* 0x20 */ 48, 48, 0, 0, 652, 256, 0, 14, /* 0x28 */ 244, 210, 152, 66, 56, 68, 50, 50, /* 0x30 */ 56, 98, 78, 4, 0, 0, 0, 16, /* 0x38 */ 0, 116, 42, 36, 28, 104, 28, 22, /* 0x40 */ 138, 62, 92, 236, 122, 166, 84, 74, /* 0x48 */ 148, 0, 78, 266, 192, 46, 132, 18, /* 0x50 */ 2, 46, 2, 0, 0, 0, 0, 2, /* 0x58 */ 0, 10798, 74, 64, 806, 7158, 64, 168, /* 0x60 */ 1530, 9470, 1718, 4508, 5078, 2676, 7534, 4940, /* 0x68 */ 1536, 2, 2192, 6724, 8484, 4652, 2062, 22, /* 0x70 */ 8, 1600, 12, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 12, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 1, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 4, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 0, 0, 0, 3616, 0, 0, 0, /* 0xe0 */ 0, 2, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 1, 0, 0, 0, 0, 0, 510, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define WEIGHT_SUM 46267 /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const char *const CHARSET_NAMES[] = { "iso88594", "cp1257", }; /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const unsigned short int *const CHARSET_WEIGHTS[] = { RAW_ISO88594, RAW_CP1257, }; /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define CHARSET_LETTERS NULL /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define CHARSET_PAIRS NULL /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define NCHARSETS 2 Project-OSS-Revival-enca-36defd7/data/finnish/iso88594.base000066400000000000000000000015101507545312400232220ustar00rootroot00000000000000. 0 . 0 . 0 5999 ! 4 " 21 # 0 $ 0 % 2 & 1 ' 2 ( 24 ) 24 * 0 + 0 , 326 - 128 . 558 / 7 0 122 1 105 2 76 3 33 4 28 5 34 6 25 7 25 8 28 9 49 : 39 ; 2 < 0 = 0 > 0 ? 8 @ 0 A 58 B 21 C 18 D 14 E 52 F 14 G 11 H 69 I 31 J 46 K 118 L 61 M 83 N 42 O 37 P 74 Q 0 R 39 S 133 T 96 U 23 V 66 W 9 X 1 Y 23 Z 1 [ 0 \ 0 ] 0 ^ 0 _ 1 ` 0 a 5399 b 37 c 32 d 403 e 3579 f 32 g 84 h 765 i 4735 j 859 k 2254 l 2539 m 1338 n 3767 o 2470 p 768 q 1 r 1096 s 3362 t 4242 u 2326 v 1031 w 11 x 4 y 800 z 6 { 0 | 0 } 0 ~ 0 . 0 � 0 � 0 � 0 � 0 � 0 � 0 � 0 � 0 � 6 � 0 � 0 � 0 � 0 � 0 � 0 � 0 � 1 � 0 � 0 � 0 � 0 � 2 � 0 � 0 � 0 � 0 � 0 � 0 � 0 � 0 � 0 � 0 � 0 � 0 � 0 � 0 � 0 � 1808 � 0 � 0 � 0 � 0 � 1 � 0 � 0 � 0 � 0 � 0 � 0 � 0 � 255 � 0 � 0 � 0 � 0 � 0 Project-OSS-Revival-enca-36defd7/data/finnish/rawcounts.iso88594000066400000000000000000000037761507545312400243550ustar00rootroot000000000000000x08 . 7 0x15 . 1 0x16 . 1 0x20 43309824 0x21 ! 32929 0x22 " 157749 0x23 # 2231 0x24 $ 273 0x25 % 20671 0x26 & 10414 0x27 ' 14661 0x28 ( 176988 0x29 ) 173923 0x2a * 2473 0x2b + 7176 0x2c , 2356929 0x2d - 929385 0x2e . 4034374 0x2f / 50930 0x30 0 881852 0x31 1 758265 0x32 2 555082 0x33 3 241716 0x34 4 206462 0x35 5 248893 0x36 6 184643 0x37 7 180858 0x38 8 203671 0x39 9 359659 0x3a : 285993 0x3b ; 19592 0x3c < 339 0x3d = 2455 0x3e > 1246 0x3f ? 63572 0x40 @ 2648 0x41 A 424041 0x42 B 154984 0x43 C 132076 0x44 D 105440 0x45 E 376940 0x46 F 106667 0x47 G 81094 0x48 H 500425 0x49 I 228774 0x4a J 338869 0x4b K 857247 0x4c L 443843 0x4d M 599604 0x4e N 306990 0x4f O 273646 0x50 P 537341 0x51 Q 7082 0x52 R 282878 0x53 S 964224 0x54 T 697305 0x55 U 170075 0x56 V 482988 0x57 W 65684 0x58 X 9926 0x59 Y 168603 0x5a Z 13982 0x5b [ 2555 0x5c \ 54 0x5d ] 2574 0x5e ^ 90 0x5f _ 7538 0x60 ` 269 0x61 a 38977603 0x62 b 273986 0x63 c 236578 0x64 d 2913605 0x65 e 25839170 0x66 f 233861 0x67 g 611191 0x68 h 5525729 0x69 i 34184835 0x6a j 6203886 0x6b k 16273609 0x6c l 18331533 0x6d m 9660734 0x6e n 27200205 0x6f o 17835561 0x70 p 5544908 0x71 q 9220 0x72 r 7912194 0x73 s 24276850 0x74 t 30624995 0x75 u 16795139 0x76 v 7446789 0x77 w 80798 0x78 x 34546 0x79 y 5775453 0x7a z 49256 0x7b { 233 0x7c | 635 0x7d } 229 0x7e ~ 200 0x7f . 7 0xa1 � 1 0xa4 � 51 0xa6 � 1 0xa7 � 7098 0xa8 � 95 0xa9 � 962 0xaa � 1 0xab � 1 0xad � 48990 0xae � 256 0xaf � 2 0xb0 � 1561 0xb1 � 31 0xb4 � 803 0xb6 � 21 0xb8 � 3 0xb9 � 7560 0xba � 217 0xbb � 3 0xbe � 1435 0xc0 � 7 0xc4 � 15430 0xc5 � 1636 0xc6 � 45 0xc8 � 87 0xc9 � 314 0xcf � 1 0xd2 � 183 0xd3 � 16 0xd5 � 21 0xd6 � 3626 0xd7 � 920 0xd8 � 151 0xdc � 207 0xde � 1 0xdf � 230 0xe0 � 272 0xe4 � 13055748 0xe5 � 4188 0xe6 � 275 0xe7 � 2 0xe8 � 353 0xe9 � 11018 0xea � 32 0xec � 93 0xef � 102 0xf1 � 53 0xf2 � 1948 0xf3 � 13 0xf5 � 557 0xf6 � 1847997 0xf7 � 1 0xf8 � 1072 0xf9 � 5 0xfc � 4651 0xfe � 599Project-OSS-Revival-enca-36defd7/data/hungarian/000077500000000000000000000000001507545312400214735ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/data/hungarian/doit.sh000077500000000000000000000000721507545312400227700ustar00rootroot00000000000000#! /bin/bash ../doit.sh iso88592 cp1250 ibm852 macce cork Project-OSS-Revival-enca-36defd7/data/hungarian/hungarian.h000066400000000000000000000323141507545312400236230ustar00rootroot00000000000000/***** THIS IS A GENERATED FILE. DO NOT TOUCH! *****/ /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_ISO88592[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 65, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 162, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 28, 49, 0, /* 0xd0 */ 0, 0, 35, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 5950, 0, 0, 0, 0, 0, 0, /* 0xe0 */ 0, 5523, 0, 0, 0, 846, 0, 0, /* 0xe8 */ 0, 0, 0, 1611, 0, 1444, 2019, 0, /* 0xf0 */ 0, 0, 612, 316, 1016, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_CP1250[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 65, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 162, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 28, 49, 0, /* 0xd0 */ 0, 0, 35, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 5950, 0, 0, 0, 0, 0, 0, /* 0xe0 */ 0, 5523, 0, 0, 0, 846, 0, 0, /* 0xe8 */ 0, 0, 0, 1611, 0, 1444, 2019, 0, /* 0xf0 */ 0, 0, 612, 316, 1016, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_IBM852[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 1016, 5523, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 28, 1444, 0, 0, 0, 0, /* 0x88 */ 162, 0, 0, 0, 2019, 0, 0, 0, /* 0x90 */ 0, 49, 0, 0, 0, 0, 0, 0, /* 0x98 */ 5950, 846, 1611, 612, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 65, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe0 */ 0, 35, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 316, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_MACCE[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 162, 0, 49, 0, 5950, /* 0x80 */ 0, 0, 0, 0, 0, 0, 5523, 0, /* 0x88 */ 0, 0, 846, 0, 0, 0, 0, 1611, /* 0x90 */ 0, 0, 2019, 0, 612, 0, 0, 1016, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 28, 0, 1444, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 0, 0, 0, 0, 0, 0, 65, /* 0xe0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 0, 0, 35, 0, 0, 316, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_CORK[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 28, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 1444, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 316, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 65, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 162, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 49, 0, /* 0xd0 */ 0, 0, 35, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 5950, 0, 0, 0, 0, 0, 0, /* 0xe0 */ 0, 5523, 0, 0, 0, 846, 0, 0, /* 0xe8 */ 0, 0, 0, 1611, 0, 0, 2019, 0, /* 0xf0 */ 0, 0, 612, 0, 1016, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/totals.pl. */ static const unsigned short int SIGNIFICANT[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 1016, 5523, 162, 0, 49, 0, 5950, /* 0x80 */ 0, 0, 28, 1444, 0, 0, 5551, 0, /* 0x88 */ 162, 0, 846, 0, 2019, 0, 0, 1611, /* 0x90 */ 0, 49, 2019, 0, 612, 0, 0, 1016, /* 0x98 */ 5950, 846, 1611, 612, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 1444, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 65, 316, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 195, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 486, 0, 0, 28, 0, 1444, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 56, 147, 0, /* 0xd0 */ 0, 0, 105, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 17850, 0, 0, 0, 0, 0, 65, /* 0xe0 */ 0, 16604, 0, 0, 0, 2538, 0, 0, /* 0xe8 */ 0, 0, 35, 4833, 0, 3204, 6057, 0, /* 0xf0 */ 0, 0, 1836, 948, 3048, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define WEIGHT_SUM 19676 /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const char *const CHARSET_NAMES[] = { "iso88592", "cp1250", "ibm852", "macce", "cork", }; /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const unsigned short int *const CHARSET_WEIGHTS[] = { RAW_ISO88592, RAW_CP1250, RAW_IBM852, RAW_MACCE, RAW_CORK, }; /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define CHARSET_LETTERS NULL /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define CHARSET_PAIRS NULL /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define NCHARSETS 5 Project-OSS-Revival-enca-36defd7/data/hungarian/iso88592.base000066400000000000000000000001261507545312400235400ustar00rootroot00000000000000 65 162 28 49 35 5950 5523 846 1611 1444 2019 612 316 1016 Project-OSS-Revival-enca-36defd7/data/hungarian/rawcounts.iso88592000066400000000000000000000032501507545312400246540ustar00rootroot000000000000000x09 . 4259 0x0a . 424091 0x0d . 357722 0x20 3312405 0x21 ! 28722 0x22 " 130280 0x23 # 4206 0x24 $ 41 0x25 % 4109 0x26 & 28289 0x27 ' 6398 0x28 ( 9708 0x29 ) 9705 0x2a * 13163 0x2b + 987 0x2c , 335888 0x2d - 143835 0x2e . 285910 0x2f / 122087 0x30 0 16006 0x31 1 17466 0x32 2 8955 0x33 3 6705 0x34 4 4718 0x35 5 5968 0x36 6 5166 0x37 7 3430 0x38 8 4290 0x39 9 8686 0x3a : 29238 0x3b ; 32865 0x3c < 217476 0x3d = 79964 0x3e > 217474 0x3f ? 28446 0x40 @ 610 0x41 A 119037 0x42 B 33861 0x43 C 15415 0x44 D 19499 0x45 E 53282 0x46 F 67626 0x47 G 50023 0x48 H 29654 0x49 I 105063 0x4a J 45167 0x4b K 28669 0x4c L 58733 0x4d M 48771 0x4e N 88841 0x4f O 32042 0x50 P 90618 0x51 Q 214 0x52 R 35177 0x53 S 71533 0x54 T 86970 0x55 U 43264 0x56 V 16670 0x57 W 4569 0x58 X 1224 0x59 Y 39413 0x5a Z 7878 0x5b [ 1671 0x5c \ 10547 0x5d ] 1564 0x5e ^ 117 0x5f _ 2981 0x60 ` 3228 0x61 a 1410682 0x62 b 331421 0x63 c 154141 0x64 d 385489 0x65 e 1612974 0x66 f 174673 0x67 g 570412 0x68 h 293360 0x69 i 680341 0x6a j 185178 0x6b k 719497 0x6c l 968873 0x6d m 596519 0x6e n 987701 0x6f o 714336 0x70 p 192957 0x71 q 1247 0x72 r 699815 0x73 s 914329 0x74 t 1362466 0x75 u 200931 0x76 v 287574 0x77 w 17822 0x78 x 3800 0x79 y 366028 0x7a z 593471 0x7b { 306 0x7c | 856 0x7d } 307 0xb0 6 0xb4 2 0xb7 3 0xbc 1 0xc0 1 0xc1 5332 0xc4 5 0xc5 6 0xc9 13303 0xcd 1690 0xd0 2 0xd3 2042 0xd4 84 0xd5 2335 0xd6 4034 0xda 2893 0xdb 162 0xdc 924 0xdf 2 0xe0 9 0xe1 487916 0xe3 7 0xe4 515 0xe5 12 0xe6 1 0xe7 1 0xe8 12 0xe9 452955 0xeb 8 0xed 69428 0xee 8 0xf0 2 0xf2 1 0xf3 132151 0xf4 1394 0xf5 118426 0xf6 165573 0xfa 50232 0xfb 25978 0xfc 83366 0xfd 1 Project-OSS-Revival-enca-36defd7/data/latvian/000077500000000000000000000000001507545312400211555ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/data/latvian/cp1257.base000066400000000000000000000002041507545312400227260ustar00rootroot00000000000000 0 172 11 14 6 2 68 22 6 102 3 11 6 5926 3448 145 69 567 3465 837 2015 1786 1363 382 Project-OSS-Revival-enca-36defd7/data/latvian/doit.sh000077500000000000000000000001061507545312400224500ustar00rootroot00000000000000#! /bin/bash ../doit.sh cp1257 iso88594 ibm775 iso885913 macce baltic Project-OSS-Revival-enca-36defd7/data/latvian/latvian.h000066400000000000000000000364401507545312400227730ustar00rootroot00000000000000/***** THIS IS A GENERATED FILE. DO NOT TOUCH! *****/ /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_CP1257[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 172, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 11, 0, 0, 0, 0, 14, /* 0xc0 */ 6, 0, 0, 0, 2, 68, 22, 6, /* 0xc8 */ 102, 0, 3, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 11, 0, 0, 6, 0, /* 0xd8 */ 0, 0, 5926, 0, 0, 0, 0, 3448, /* 0xe0 */ 145, 0, 0, 0, 69, 567, 3465, 837, /* 0xe8 */ 2015, 0, 1786, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 1363, 0, 0, 382, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_ISO88594[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 6, 0, /* 0xa0 */ 0, 102, 14, 2, 0, 0, 6, 0, /* 0xa8 */ 0, 0, 0, 172, 0, 0, 837, 0, /* 0xb0 */ 0, 2015, 3448, 69, 0, 0, 382, 0, /* 0xb8 */ 11, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 6, 0, 0, 0, 0, 0, 0, 22, /* 0xc8 */ 0, 3, 0, 68, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 11, 0, /* 0xd8 */ 5926, 0, 0, 0, 0, 0, 0, 0, /* 0xe0 */ 145, 0, 0, 0, 0, 0, 0, 3465, /* 0xe8 */ 0, 1786, 0, 567, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 1363, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_IBM775[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 5926, 0, 69, 0, 0, /* 0x80 */ 0, 3448, 0, 172, 3465, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 2, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 11, 22, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 6, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 102, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 11, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 6, /* 0xc8 */ 0, 145, 0, 0, 0, 2015, 0, 1363, /* 0xd0 */ 382, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe0 */ 68, 567, 6, 837, 1786, 14, 3, 0, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_ISO885913[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 172, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 11, 0, 0, 0, 0, 14, /* 0xc0 */ 6, 0, 0, 0, 2, 68, 22, 6, /* 0xc8 */ 102, 0, 3, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 11, 0, 0, 6, 0, /* 0xd8 */ 0, 0, 5926, 0, 0, 0, 0, 3448, /* 0xe0 */ 145, 0, 0, 0, 69, 567, 3465, 837, /* 0xe8 */ 2015, 0, 1786, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 1363, 0, 0, 382, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_MACCE[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 11, 5926, 0, 0, 0, 0, 0, /* 0x80 */ 0, 6, 0, 145, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 14, 3448, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 69, 0, /* 0xa8 */ 0, 22, 0, 0, 3465, 68, 0, 0, /* 0xb0 */ 0, 6, 837, 0, 0, 0, 0, 3, /* 0xb8 */ 1786, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 172, 102, 0, 0, 2015, 0, 0, 0, /* 0xe0 */ 0, 0, 0, 6, 382, 11, 0, 0, /* 0xe8 */ 1363, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 567, 0, 0, 0, 2, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_BALTIC[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 172, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 11, 0, 0, 0, 0, 6, /* 0xc0 */ 2, 0, 6, 0, 14, 68, 22, 6, /* 0xc8 */ 0, 3, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 102, 0, 11, 0, 0, 0, 0, /* 0xd8 */ 0, 0, 5926, 0, 0, 0, 0, 145, /* 0xe0 */ 69, 0, 382, 0, 3448, 567, 3465, 837, /* 0xe8 */ 0, 1786, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 2015, 0, 1363, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/totals.pl. */ static const unsigned short int SIGNIFICANT[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 11, 5926, 5926, 0, 69, 0, 0, /* 0x80 */ 0, 3454, 0, 317, 3465, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 14, 3450, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 11, 22, 0, 0, 0, 0, 6, 0, /* 0xa0 */ 0, 102, 14, 2, 0, 0, 75, 0, /* 0xa8 */ 0, 22, 0, 172, 3465, 68, 843, 0, /* 0xb0 */ 0, 2021, 4801, 69, 0, 0, 484, 3, /* 0xb8 */ 1797, 0, 33, 0, 0, 0, 0, 45, /* 0xc0 */ 20, 0, 6, 0, 18, 204, 66, 46, /* 0xc8 */ 204, 151, 6, 68, 0, 2015, 0, 1363, /* 0xd0 */ 382, 102, 0, 33, 0, 0, 23, 0, /* 0xd8 */ 6098, 102, 17778, 0, 2015, 0, 0, 7041, /* 0xe0 */ 572, 567, 388, 843, 5754, 1726, 10398, 5976, /* 0xe8 */ 5393, 3572, 3572, 567, 0, 0, 0, 0, /* 0xf0 */ 0, 2015, 567, 4089, 0, 0, 2129, 0, /* 0xf8 */ }; /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define WEIGHT_SUM 20426 /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const char *const CHARSET_NAMES[] = { "cp1257", "iso88594", "ibm775", "iso885913", "macce", "baltic", }; /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const unsigned short int *const CHARSET_WEIGHTS[] = { RAW_CP1257, RAW_ISO88594, RAW_IBM775, RAW_ISO885913, RAW_MACCE, RAW_BALTIC, }; /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define CHARSET_LETTERS NULL /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define CHARSET_PAIRS NULL /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define NCHARSETS 6 Project-OSS-Revival-enca-36defd7/data/latvian/rawcounts.cp1257000066400000000000000000000031501507545312400240440ustar00rootroot000000000000000x0a . 235594 0x0d . 235594 0x20 1423855 0x21 ! 14157 0x22 " 121452 0x23 # 187 0x24 $ 5 0x26 & 52551 0x27 ' 2327 0x28 ( 2773 0x29 ) 2763 0x2a * 11 0x2c , 159841 0x2d - 21373 0x2e . 183461 0x2f / 103464 0x30 0 29899 0x31 1 43929 0x32 2 19586 0x33 3 18012 0x34 4 14107 0x35 5 19726 0x36 6 8862 0x37 7 12295 0x38 8 7951 0x39 9 7225 0x3a : 21065 0x3b ; 62595 0x3c < 175588 0x3d = 64224 0x3e > 175585 0x3f ? 9162 0x41 A 56757 0x42 B 15432 0x43 C 10738 0x44 D 7072 0x45 E 13186 0x46 F 34719 0x47 G 39530 0x48 H 1273 0x49 I 85520 0x4a J 44835 0x4b K 18248 0x4c L 49113 0x4d M 12644 0x4e N 53199 0x4f O 5117 0x50 P 20362 0x51 Q 2 0x52 R 10308 0x53 S 44983 0x54 T 58425 0x55 U 40095 0x56 V 21246 0x57 W 140 0x58 X 93 0x59 Y 33561 0x5a Z 5783 0x5b [ 936 0x5c \ 1 0x5d ] 995 0x5e ^ 3 0x5f _ 22 0x60 ` 166 0x61 a 831468 0x62 b 143524 0x63 c 92116 0x64 d 224342 0x65 e 459547 0x66 f 20485 0x67 g 125071 0x68 h 41130 0x69 i 706112 0x6a j 161999 0x6b k 259212 0x6c l 244492 0x6d m 229237 0x6e n 369783 0x6f o 278841 0x70 p 284281 0x71 q 54002 0x72 r 330016 0x73 s 549690 0x74 t 535852 0x75 u 504938 0x76 v 199418 0x77 w 7541 0x78 x 3727 0x79 y 32042 0x7a z 158390 0x7b { 2 0x7d } 2 0x7e ~ 3 0x84 31 0x91 5 0x92 11 0x93 2 0x94 2 0x96 1 0x97 103 0xaa 5 0xab 375 0xb0 4 0xb1 1 0xba 6716 0xbb 353 0xc2 437 0xc7 573 0xc8 235 0xcc 91 0xcd 2654 0xce 869 0xcf 262 0xd0 4009 0xd2 137 0xdb 455 0xdc 5 0xde 257 0xe2 231142 0xe4 244 0xe7 134494 0xe8 5670 0xec 2700 0xed 22126 0xee 135172 0xef 32650 0xf0 78617 0xf2 69673 0xf3 6 0xf4 49 0xf6 13 0xfa 1 0xfb 53176 0xfc 19 0xfe 14904 Project-OSS-Revival-enca-36defd7/data/lithuanian/000077500000000000000000000000001507545312400216535ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/data/lithuanian/cp1257.base000066400000000000000000000001501507545312400234240ustar00rootroot00000000000000 4 51 1 40 9 313 3 4 188 2811 2122 866 1527 5758 5069 3943 1589 3408 Project-OSS-Revival-enca-36defd7/data/lithuanian/doit.sh000077500000000000000000000001061507545312400231460ustar00rootroot00000000000000#! /bin/bash ../doit.sh cp1257 iso88594 ibm775 iso885913 macce baltic Project-OSS-Revival-enca-36defd7/data/lithuanian/lithuanian.h000066400000000000000000000364401507545312400241670ustar00rootroot00000000000000/***** THIS IS A GENERATED FILE. DO NOT TOUCH! *****/ /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_CP1257[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 4, 51, 0, 0, 0, 0, 1, 0, /* 0xc0 */ 40, 0, 0, 9, 0, 0, 0, 0, /* 0xc8 */ 313, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 3, 0, 0, 4, 0, 0, 188, 0, /* 0xd8 */ 2811, 2122, 0, 0, 0, 0, 866, 0, /* 0xe0 */ 1527, 0, 0, 5758, 0, 0, 0, 0, /* 0xe8 */ 5069, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 3943, 0, 0, 1589, 0, 0, 3408, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_ISO88594[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 4, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 313, 0, 0, 0, 0, 188, 0, /* 0xa8 */ 0, 2811, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 5069, 0, 0, 0, 0, 3408, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 51, /* 0xc0 */ 40, 0, 1, 0, 9, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 3, 0, 0, 0, 0, 4, 0, /* 0xd8 */ 0, 0, 0, 0, 0, 0, 0, 2122, /* 0xe0 */ 1527, 0, 866, 0, 5758, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 3943, 0, 0, 0, 0, 1589, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_IBM775[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 4, 40, 1, /* 0xb0 */ 9, 0, 0, 0, 0, 51, 313, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 3, 4, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 188, /* 0xc8 */ 2811, 1527, 866, 5758, 2122, 5069, 3943, 1589, /* 0xd0 */ 3408, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_ISO885913[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 4, 51, 0, 0, 0, 0, 1, 0, /* 0xc0 */ 40, 0, 0, 9, 0, 0, 0, 0, /* 0xc8 */ 313, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 3, 0, 0, 4, 0, 0, 188, 0, /* 0xd8 */ 2811, 2122, 0, 0, 0, 0, 866, 0, /* 0xe0 */ 1527, 0, 0, 5758, 0, 0, 0, 0, /* 0xe8 */ 5069, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 3943, 0, 0, 1589, 0, 0, 3408, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_MACCE[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 4, 0, 0, 0, /* 0x80 */ 2811, 40, 0, 1527, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 9, 0, /* 0x90 */ 5758, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 1, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 866, 0, 0, 0, 51, /* 0xa8 */ 2122, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 313, 0, 0, 5069, 0, 0, 0, /* 0xe0 */ 0, 0, 0, 188, 3408, 4, 0, 0, /* 0xe8 */ 1589, 0, 0, 0, 0, 0, 3, 3943, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_BALTIC[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 51, 9, 0, 0, 0, 0, 4, 40, /* 0xc0 */ 0, 0, 188, 1, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 3, 313, 0, 4, 0, 0, 0, 0, /* 0xd8 */ 2122, 5758, 0, 0, 0, 0, 2811, 1527, /* 0xe0 */ 0, 0, 3408, 866, 0, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 3943, 5069, 0, 1589, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/totals.pl. */ static const unsigned short int SIGNIFICANT[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 4, 0, 0, 0, /* 0x80 */ 2811, 40, 0, 1527, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 9, 0, /* 0x90 */ 5758, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 4, 1, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 313, 0, 866, 0, 0, 188, 51, /* 0xa8 */ 2122, 2811, 0, 0, 0, 4, 40, 1, /* 0xb0 */ 9, 5069, 0, 0, 0, 51, 3721, 0, /* 0xb8 */ 59, 111, 0, 0, 0, 0, 9, 95, /* 0xc0 */ 120, 0, 189, 19, 9, 0, 0, 188, /* 0xc8 */ 3437, 1527, 866, 5758, 2122, 5069, 3943, 1589, /* 0xd0 */ 3417, 316, 0, 12, 0, 0, 380, 0, /* 0xd8 */ 7744, 10315, 0, 0, 5069, 0, 4543, 3649, /* 0xe0 */ 4581, 0, 4274, 12570, 9166, 4, 0, 0, /* 0xe8 */ 11727, 0, 0, 0, 0, 0, 3, 3943, /* 0xf0 */ 11829, 9012, 0, 4767, 0, 0, 8405, 0, /* 0xf8 */ }; /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define WEIGHT_SUM 27706 /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const char *const CHARSET_NAMES[] = { "cp1257", "iso88594", "ibm775", "iso885913", "macce", "baltic", }; /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const unsigned short int *const CHARSET_WEIGHTS[] = { RAW_CP1257, RAW_ISO88594, RAW_IBM775, RAW_ISO885913, RAW_MACCE, RAW_BALTIC, }; /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define CHARSET_LETTERS NULL /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define CHARSET_PAIRS NULL /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define NCHARSETS 6 Project-OSS-Revival-enca-36defd7/data/lithuanian/rawcounts.cp1257000066400000000000000000000035311507545312400245450ustar00rootroot000000000000000x09 . 1328 0x0a . 152685 0x0d . 107720 0x1a . 24 0x20 1020861 0x21 ! 5749 0x22 " 131851 0x23 # 7890 0x24 $ 22 0x25 % 1826 0x26 & 6757 0x27 ' 10760 0x28 ( 11998 0x29 ) 12635 0x2a * 631 0x2b + 1522 0x2c , 96883 0x2d - 39106 0x2e . 127804 0x2f / 101676 0x30 0 33314 0x31 1 31160 0x32 2 16831 0x33 3 9365 0x34 4 8756 0x35 5 8651 0x36 6 8443 0x37 7 6413 0x38 8 8827 0x39 9 14392 0x3a : 26488 0x3b ; 16102 0x3c < 167265 0x3d = 76259 0x3e > 167294 0x3f ? 5807 0x40 @ 1243 0x41 A 69973 0x42 B 55280 0x43 C 26400 0x44 D 25020 0x45 E 58596 0x46 F 37804 0x47 G 16759 0x48 H 27108 0x49 I 36408 0x4a J 11072 0x4b K 15927 0x4c L 32566 0x4d M 24352 0x4e N 43325 0x4f O 38790 0x50 P 44699 0x51 Q 2170 0x52 R 59000 0x53 S 25829 0x54 T 67203 0x55 U 7073 0x56 V 15773 0x57 W 5272 0x58 X 1242 0x59 Y 3193 0x5a Z 5783 0x5b [ 1121 0x5c \ 33 0x5d ] 1116 0x5e ^ 3 0x5f _ 2609 0x60 ` 199 0x61 a 617115 0x62 b 76042 0x63 c 48117 0x64 d 156585 0x65 e 349522 0x66 f 25720 0x67 g 114402 0x68 h 63004 0x69 i 693366 0x6a j 88962 0x6b k 201424 0x6c l 196548 0x6d m 182455 0x6e n 297448 0x6f o 313693 0x70 p 162933 0x71 q 1523 0x72 r 304308 0x73 s 419987 0x74 t 387088 0x75 u 235015 0x76 v 108785 0x77 w 25935 0x78 x 8595 0x79 y 77733 0x7a z 16855 0x7b { 1796 0x7c | 198 0x7d } 1796 0x7e ~ 249 0x84 297 0x85 1053 0x91 3 0x92 100 0x93 727 0x94 601 0x96 980 0x97 187 0x99 3 0xa0 12 0xa2 1 0xa9 10 0xab 4 0xb1 5 0xb7 65 0xb8 1 0xbb 5 0xbc 6 0xbf 1 0xc0 56 0xc1 612 0xc2 4 0xc6 12 0xc8 491 0xc9 1 0xca 1 0xcb 118 0xd0 3758 0xd3 1 0xd8 41 0xd9 6 0xdb 54 0xdc 2 0xdd 1 0xde 2261 0xdf 22 0xe0 33735 0xe1 25474 0xe2 25 0xe4 31 0xe5 1 0xe6 10398 0xe7 7 0xe8 18326 0xe9 30 0xea 12 0xeb 69107 0xec 5 0xed 4 0xf0 60828 0xf1 8 0xf3 9 0xf6 22 0xf7 7 0xf8 47318 0xf9 7 0xfb 19071 0xfc 46 0xfd 8 0xfe 40901 Project-OSS-Revival-enca-36defd7/data/makepaircounts.sh000077500000000000000000000010431507545312400231010ustar00rootroot00000000000000#! /bin/bash textdir=/none/tmp/texts maps=maps letters=letters subdirs="belarusian bulgarian russian ukrainian" dir="$1" test -n "$dir" || dir="$subdirs" for d in $dir; do c=`ls $d/rawcounts.* | head -n1 | cut -d. -f2` echo '[ '$d / $c' ]' cat $textdir/$d/* | ./countpair $letters/$c.letters \ >$d/paircounts.$c if test "$d" = "belarusian"; then c2=ibm866 echo '[ '$d / $c2' ]' cat $textdir/$d/* | ./xlt $maps/$c.map $maps/$c2-bad.map \ | ./countpair $letters/$c2-bad.letters \ >$d/paircounts.$c2 fi done Project-OSS-Revival-enca-36defd7/data/map2letters.sh000077500000000000000000000002401507545312400223140ustar00rootroot00000000000000#! /bin/bash test -d letters || mkdir letters for f in maps/*.map; do cs=`basename $f .map` echo $cs ./findletters $f letters/$cs.letters done Project-OSS-Revival-enca-36defd7/data/maps/000077500000000000000000000000001507545312400204575ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/data/maps/baltic.map000066400000000000000000000024001507545312400224100ustar00rootroot000000000000000000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 000d 000e 000f 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001a 001b 001c 001d 001e 001f 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007b 007c 007d 007e 007f 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 008a 008b 008c 008d 008e 008f 0090 0091 0092 0093 0094 0095 0096 0097 0098 0099 009a 009b 009c 009d 009e 009f 00a0 201d 00a2 00a3 00a4 00a5 00a6 00a7 00d8 00a9 201e 00ab 00ac 00ad 00ae 00c6 00b0 00b1 00b2 00b3 00b4 00b5 00b6 00b7 00f8 00b9 201c 00bb 00bc 00bd 00be 00e6 012e 0116 0100 0106 00c4 00c5 0104 010c 0122 00c9 017d 0118 0112 0136 012a 013b 0141 0145 0143 00d3 014c 00d5 00d6 00d7 0172 0160 015a 016a 00dc 017b 0179 00df 012f 0117 0101 0107 00e4 00e5 0105 010d 0123 00e9 017e 0119 0113 0137 012b 013c 0142 0146 0144 00f3 014d 00f5 00f6 00f7 0173 0161 015b 016b 00fc 017c 017a 0138 Project-OSS-Revival-enca-36defd7/data/maps/cork.map000066400000000000000000000024001507545312400221100ustar00rootroot000000000000000060 00b4 005e 007e 00a8 02dd 02da 02c7 02d8 0009 000a 00b8 02db 000d 2039 203a 201c 201d 201e 00ab 00bb 2013 2014 2080 0131 002e fb00 fb01 fb02 fb00 0069 fb00 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007b 007c 007d 007e 2010 0102 0104 0106 010c 010e 011a 0118 011e 0139 013d 0141 0143 0147 014a 0150 0154 0158 015a 0160 015e 0164 0162 0170 016e 0178 0179 017d 017b 0132 0130 0111 00a7 0103 0105 0107 010d 010f 011b 0119 011f 013a 013e 0142 0144 0148 014b 0151 0155 0159 015b 0161 015f 0165 0163 0171 016f 00ff 017a 017e 017c 0133 00a1 00bf 00a3 00c0 00c1 00c2 00c3 00c4 00c5 00c6 00c7 00c8 00c9 00ca 00cb 00cc 00cd 00ce 00cf 00d0 00d1 00d2 00d3 00d4 00d5 00d6 0152 00d8 00d9 00da 00db 00dc 00dd 00de 0053 00e0 00e1 00e2 00e3 00e4 00e5 00e6 00e7 00e8 00e9 00ea 00eb 00ec 00ed 00ee 00ef 00f0 00f1 00f2 00f3 00f4 00f5 00f6 0153 00f8 00f9 00fa 00fb 00fc 00fd 00fe 00df Project-OSS-Revival-enca-36defd7/data/maps/cp1125.map000066400000000000000000000024001507545312400220650ustar00rootroot000000000000000000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 000d 000e 000f 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001a 001b 001c 001d 001e 001f 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007b 007c 007d 007e 007f 0410 0411 0412 0413 0414 0415 0416 0417 0418 0419 041a 041b 041c 041d 041e 041f 0420 0421 0422 0423 0424 0425 0426 0427 0428 0429 042a 042b 042c 042d 042e 042f 0430 0431 0432 0433 0434 0435 0436 0437 0438 0439 043a 043b 043c 043d 043e 043f 2591 2592 2593 2502 2524 2561 2562 2556 2555 2563 2551 2557 255d 255c 255b 2510 2514 2534 252c 251c 2500 253c 255e 255f 255a 2554 2569 2566 2560 2550 256c 2567 2568 2564 2565 2559 2558 2552 2553 256b 256a 2518 250c 2588 2584 258c 2590 2580 0440 0441 0442 0443 0444 0445 0446 0447 0448 0449 044a 044b 044c 044d 044e 044f 0401 0451 0490 0491 0404 0454 0406 0456 0407 0457 00b7 221a 2116 00a4 25a0 00a0 Project-OSS-Revival-enca-36defd7/data/maps/cp1250.map000066400000000000000000000024001507545312400220640ustar00rootroot000000000000000000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 000d 000e 000f 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001a 001b 001c 001d 001e 001f 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007b 007c 007d 007e 007f 20ac ffff 201a ffff 201e 2026 2020 2021 ffff 2030 0160 2039 015a 0164 017d 0179 ffff 2018 2019 201c 201d 2022 2013 2014 ffff 2122 0161 203a 015b 0165 017e 017a 00a0 02c7 02d8 0141 00a4 0104 00a6 00a7 00a8 00a9 015e 00ab 00ac 00ad 00ae 017b 00b0 00b1 02db 0142 00b4 00b5 00b6 00b7 00b8 0105 015f 00bb 013d 02dd 013e 017c 0154 00c1 00c2 0102 00c4 0139 0106 00c7 010c 00c9 0118 00cb 011a 00cd 00ce 010e 0110 0143 0147 00d3 00d4 0150 00d6 00d7 0158 016e 00da 0170 00dc 00dd 0162 00df 0155 00e1 00e2 0103 00e4 013a 0107 00e7 010d 00e9 0119 00eb 011b 00ed 00ee 010f 0111 0144 0148 00f3 00f4 0151 00f6 00f7 0159 016f 00fa 0171 00fc 00fd 0163 02d9 Project-OSS-Revival-enca-36defd7/data/maps/cp1251.map000066400000000000000000000024001507545312400220650ustar00rootroot000000000000000000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 000d 000e 000f 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001a 001b 001c 001d 001e 001f 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007b 007c 007d 007e 007f 0402 0403 201a 0453 201e 2026 2020 2021 20ac 2030 0409 2039 040a 040c 040b 040f 0452 2018 2019 201c 201d 2022 2013 2014 ffff 2122 0459 203a 045a 045c 045b 045f 00a0 040e 045e 0408 00a4 0490 00a6 00a7 0401 00a9 0404 00ab 00ac 00ad 00ae 0407 00b0 00b1 0406 0456 0491 00b5 00b6 00b7 0451 2116 0454 00bb 0458 0405 0455 0457 0410 0411 0412 0413 0414 0415 0416 0417 0418 0419 041a 041b 041c 041d 041e 041f 0420 0421 0422 0423 0424 0425 0426 0427 0428 0429 042a 042b 042c 042d 042e 042f 0430 0431 0432 0433 0434 0435 0436 0437 0438 0439 043a 043b 043c 043d 043e 043f 0440 0441 0442 0443 0444 0445 0446 0447 0448 0449 044a 044b 044c 044d 044e 044f Project-OSS-Revival-enca-36defd7/data/maps/cp1257.map000066400000000000000000000024001507545312400220730ustar00rootroot000000000000000000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 000d 000e 000f 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001a 001b 001c 001d 001e 001f 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007b 007c 007d 007e 007f 20ac ffff 201a ffff 201e 2026 2020 2021 ffff 2030 ffff 2039 ffff ffff ffff ffff ffff 2018 2019 201c 201d 2022 2013 2014 ffff 2122 ffff 203a ffff ffff ffff ffff 00a0 ffff 00a2 00a3 00a4 ffff 00a6 00a7 00d8 00a9 0156 00ab 00ac 00ad 00ae 00c6 00b0 00b1 00b2 00b3 ffff 00b5 00b6 00b7 00f8 00b9 0157 00bb 00bc 00bd 00be 00e6 0104 012e 0100 0106 00c4 00c5 0118 0112 010c 00c9 0179 0116 0122 0136 012a 013b 0160 0143 0145 00d3 014c 00d5 00d6 00d7 0172 0141 015a 016a 00dc 017b 017d 00df 0105 012f 0101 0107 00e4 00e5 0119 0113 010d 00e9 017a 0117 0123 0137 012b 013c 0161 0144 0146 00f3 014d 00f5 00f6 00f7 0173 0142 015b 016b 00fc 017c 017e ffff Project-OSS-Revival-enca-36defd7/data/maps/ecma113.map000066400000000000000000000024001507545312400223040ustar00rootroot000000000000000000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 000d 000e 000f 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001a 001b 001c 001d 001e 001f 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007b 007c 007d 007e 007f 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 008a 008b 008c 008d 008e 008f 0090 0091 0092 0093 0094 0095 0096 0097 0098 0099 009a 009b 009c 009d 009e 009f 00a0 0452 0453 0451 0454 0455 0456 0457 0458 0459 045a 045b 045c 00ad 045e 045f 2116 0402 0403 0401 0404 0405 0406 0407 0408 0409 040a 040b 040c 00a4 040e 040f 044e 0430 0431 0446 0434 0435 0444 0433 0445 0438 0439 043a 043b 043c 043d 043e 043f 044f 0440 0441 0442 0443 0436 0432 044c 044b 0437 0448 044d 0449 0447 044a 042e 0410 0411 0426 0414 0415 0424 0413 0425 0418 0419 041a 041b 041c 041d 041e 041f 042f 0420 0421 0422 0423 0416 0412 042c 042b 0417 0428 042d 0429 0427 042a Project-OSS-Revival-enca-36defd7/data/maps/ibm775.map000066400000000000000000000024001507545312400221640ustar00rootroot000000000000000000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 000d 000e 000f 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001a 001b 001c 001d 001e 001f 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007b 007c 007d 007e 007f 0106 00fc 00e9 0101 00e4 0123 00e5 0107 0142 0113 0156 0157 012b 0179 00c4 00c5 00c9 00e6 00c6 014d 00f6 0122 00a2 015a 015b 00d6 00dc 00f8 00a3 00d8 00d7 00a4 0100 012a 00f3 017b 017c 017a 201d 00a6 00a9 00ae 00ac 00bd 00bc 0141 00ab 00bb 2591 2592 2593 2502 2524 0104 010c 0118 0116 2563 2551 2557 255d 012e 0160 2510 2514 2534 252c 251c 2500 253c 0172 016a 255a 2554 2569 2566 2560 2550 256c 017d 0105 010d 0119 0117 012f 0161 0173 016b 017e 2518 250c 2588 2584 258c 2590 2580 00d3 00df 014c 0143 00f5 00d5 00b5 0144 0136 0137 013b 013c 0146 0112 0145 2019 00ad 00b1 201c 00be 00b6 00a7 00f7 201e 00b0 2219 00b7 00b9 00b3 00b2 25a0 00a0 Project-OSS-Revival-enca-36defd7/data/maps/ibm852.map000066400000000000000000000024001507545312400221600ustar00rootroot000000000000000000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 000d 000e 000f 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001a 001b 001c 001d 001e 001f 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007b 007c 007d 007e 007f 00c7 00fc 00e9 00e2 00e4 016f 0107 00e7 0142 00eb 0150 0151 00ee 0179 00c4 0106 00c9 0139 013a 00f4 00f6 013d 013e 015a 015b 00d6 00dc 0164 0165 0141 00d7 010d 00e1 00ed 00f3 00fa 0104 0105 017d 017e 0118 0119 00ac 017a 010c 015f 00ab 00bb 2591 2592 2593 2502 2524 00c1 00c2 011a 015e 2563 2551 2557 255d 017b 017c 2510 2514 2534 252c 251c 2500 253c 0102 0103 255a 2554 2569 2566 2560 2550 256c 00a4 0111 0110 010e 00cb 010f 0147 00cd 00ce 011b 2518 250c 2588 2584 0162 016e 2580 00d3 00df 00d4 0143 0144 0148 0160 0161 0154 00da 0155 0170 00fd 00dd 0163 00b4 00ad 02dd 02db 02c7 02d8 00a7 00f7 00b8 00b0 00a8 02d9 0171 0158 0159 25a0 00a0 Project-OSS-Revival-enca-36defd7/data/maps/ibm855.map000066400000000000000000000024001507545312400221630ustar00rootroot000000000000000000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 000d 000e 000f 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001a 001b 001c 001d 001e 001f 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007b 007c 007d 007e 007f 0452 0402 0453 0403 0451 0401 0454 0404 0455 0405 0456 0406 0457 0407 0458 0408 0459 0409 045a 040a 045b 0093 045c 040c 045e 040e 045f 040f 044e 042e 044a 042a 0430 0410 0431 0411 0446 0426 0434 0414 0435 0415 0444 0424 0433 0413 00ab 00bb 2591 2592 2593 2502 2524 0445 0425 0438 0418 2563 2551 2557 255d 0439 0419 2510 2514 2534 252c 251c 2500 253c 043a 041a 255a 2554 2569 2566 2560 2550 256c 00a4 043b 041b 043c 041c 043d 041d 043e 041e 043f 2518 250c 2588 2584 041f 044f 2580 042f 0440 0420 0441 0421 0442 0422 0443 0423 0436 0416 0432 0412 044c 042c 00b4 00ad 044b 042b 0437 0417 0448 0428 044d 042d 0449 0429 0447 0427 ffff 25a0 00a0 Project-OSS-Revival-enca-36defd7/data/maps/ibm866-bad.map000066400000000000000000000024001507545312400227110ustar00rootroot000000000000000000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 000d 000e 000f 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001a 001b 001c 001d 001e 001f 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f 0040 0041 0042 0043 0044 0045 0046 0047 0048 0406 004a 004b 004c 004d 004e 004f 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f 0060 0061 0062 0063 0064 0065 0066 0067 0068 0456 006a 006b 006c 006d 006e 006f 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007b 007c 007d 007e 007f 0410 0411 0412 0413 0414 0415 0416 0417 0418 0419 041a 041b 041c 041d 041e 041f 0420 0421 0422 0423 0424 0425 0426 0427 0428 0429 042a 042b 042c 042d 042e 042f 0430 0431 0432 0433 0434 0435 0436 0437 0438 0439 043a 043b 043c 043d 043e 043f 2591 2592 2593 2502 2524 2561 2562 2556 2555 2563 2551 2557 255d 255c 255b 2510 2514 2534 252c 251c 2500 253c 255e 255f 255a 2554 2569 2566 2560 2550 256c 2567 2568 2564 2565 2559 2558 2552 2553 256b 256a 2518 250c 2588 2584 258c 2590 2580 0440 0441 0442 0443 0444 0445 0446 0447 0448 0449 044a 044b 044c 044d 044e 044f 0401 0451 0404 0454 0407 0457 040e 045e 00b0 2219 00b7 221a 2116 00a4 25a0 00a0 Project-OSS-Revival-enca-36defd7/data/maps/ibm866.map000066400000000000000000000024001507545312400221650ustar00rootroot000000000000000000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 000d 000e 000f 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001a 001b 001c 001d 001e 001f 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007b 007c 007d 007e 007f 0410 0411 0412 0413 0414 0415 0416 0417 0418 0419 041a 041b 041c 041d 041e 041f 0420 0421 0422 0423 0424 0425 0426 0427 0428 0429 042a 042b 042c 042d 042e 042f 0430 0431 0432 0433 0434 0435 0436 0437 0438 0439 043a 043b 043c 043d 043e 043f 2591 2592 2593 2502 2524 2561 2562 2556 2555 2563 2551 2557 255d 255c 255b 2510 2514 2534 252c 251c 2500 253c 255e 255f 255a 2554 2569 2566 2560 2550 256c 2567 2568 2564 2565 2559 2558 2552 2553 256b 256a 2518 250c 2588 2584 258c 2590 2580 0440 0441 0442 0443 0444 0445 0446 0447 0448 0449 044a 044b 044c 044d 044e 044f 0401 0451 0404 0454 0407 0457 040e 045e 00b0 2219 00b7 221a 2116 00a4 25a0 00a0 Project-OSS-Revival-enca-36defd7/data/maps/iso885913.map000066400000000000000000000024001507545312400224460ustar00rootroot000000000000000000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 000d 000e 000f 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001a 001b 001c 001d 001e 001f 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007b 007c 007d 007e 007f 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 008a 008b 008c 008d 008e 008f 0090 0091 0092 0093 0094 0095 0096 0097 0098 0099 009a 009b 009c 009d 009e 009f 00a0 201d 00a2 00a3 00a4 201e 00a6 00a7 00d8 00a9 0156 00ab 00ac 00ad 00ae 00c6 00b0 00b1 00b2 00b3 201c 00b5 00b6 00b7 00f8 00b9 0157 00bb 00bc 00bd 00be 00e6 0104 012e 0100 0106 00c4 00c5 0118 0112 010c 00c9 0179 0116 0122 0136 012a 013b 0160 0143 0145 00d3 014c 00d5 00d6 00d7 0172 0141 015a 016a 00dc 017b 017d 00df 0105 012f 0101 0107 00e4 00e5 0119 0113 010d 00e9 017a 0117 0123 0137 012b 013c 0161 0144 0146 00f3 014d 00f5 00f6 00f7 0173 0142 015b 016b 00fc 017c 017e 2019 Project-OSS-Revival-enca-36defd7/data/maps/iso885916.map000066400000000000000000000024001507545312400224510ustar00rootroot000000000000000000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 000d 000e 000f 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001a 001b 001c 001d 001e 001f 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007b 007c 007d 007e 007f 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 008a 008b 008c 008d 008e 008f 0090 0091 0092 0093 0094 0095 0096 0097 0098 0099 009a 009b 009c 009d 009e 009f 00a0 0104 0105 0141 20ac 00ab 0160 00a7 0161 00a9 0218 201e 0179 00ad 017a 017b 00b0 00b1 010c 0142 017d 201d 00b6 00b7 017e 010d 0219 00bb 0152 0153 0178 017c 00c0 00c1 00c2 0102 00c4 0106 00c6 00c7 00c8 00c9 00ca 00cb 00cc 00cd 00ce 00cf 0110 0143 00d2 00d3 00d4 0150 00d6 015a 0170 00d9 00da 00db 00dc 0118 021a 00df 00e0 00e1 00e2 0103 00e4 0107 00e6 00e7 00e8 00e9 00ea 00eb 00ec 00ed 00ee 00ef 0111 0144 00f2 00f3 00f4 0151 00f6 015b 0171 00f9 00fa 00fb 00fc 0119 021b 00ff Project-OSS-Revival-enca-36defd7/data/maps/iso88592.map000066400000000000000000000024001507545312400223640ustar00rootroot000000000000000000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 000d 000e 000f 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001a 001b 001c 001d 001e 001f 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007b 007c 007d 007e 007f 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 008a 008b 008c 008d 008e 008f 0090 0091 0092 0093 0094 0095 0096 0097 0098 0099 009a 009b 009c 009d 009e 009f 00a0 0104 02d8 0141 00a4 013d 015a 00a7 00a8 0160 015e 0164 0179 00ad 017d 017b 00b0 0105 02db 0142 00b4 013e 015b 02c7 00b8 0161 015f 0165 017a 02dd 017e 017c 0154 00c1 00c2 0102 00c4 0139 0106 00c7 010c 00c9 0118 00cb 011a 00cd 00ce 010e 0110 0143 0147 00d3 00d4 0150 00d6 00d7 0158 016e 00da 0170 00dc 00dd 0162 00df 0155 00e1 00e2 0103 00e4 013a 0107 00e7 010d 00e9 0119 00eb 011b 00ed 00ee 010f 0111 0144 0148 00f3 00f4 0151 00f6 00f7 0159 016f 00fa 0171 00fc 00fd 0163 02d9 Project-OSS-Revival-enca-36defd7/data/maps/iso88594.map000066400000000000000000000024001507545312400223660ustar00rootroot000000000000000000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 000d 000e 000f 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001a 001b 001c 001d 001e 001f 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007b 007c 007d 007e 007f 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 008a 008b 008c 008d 008e 008f 0090 0091 0092 0093 0094 0095 0096 0097 0098 0099 009a 009b 009c 009d 009e 009f 00a0 0104 0138 0156 00a4 0128 013b 00a7 00a8 0160 0112 0122 0166 00ad 017d 00af 00b0 0105 02db 0157 00b4 0129 013c 02c7 00b8 0161 0113 0123 0167 014a 017e 014b 0100 00c1 00c2 00c3 00c4 00c5 00c6 012e 010c 00c9 0118 00cb 0116 00cd 00ce 012a 0110 0145 014c 0136 00d4 00d5 00d6 00d7 00d8 0172 00da 00db 00dc 0168 016a 00df 0101 00e1 00e2 00e3 00e4 00e5 00e6 012f 010d 00e9 0119 00eb 0117 00ed 00ee 012b 0111 0146 014d 0137 00f4 00f5 00f6 00f7 00f8 0173 00fa 00fb 00fc 0169 016b 02d9 Project-OSS-Revival-enca-36defd7/data/maps/iso88595.map000066400000000000000000000024001507545312400223670ustar00rootroot000000000000000000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 000d 000e 000f 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001a 001b 001c 001d 001e 001f 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007b 007c 007d 007e 007f 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 008a 008b 008c 008d 008e 008f 0090 0091 0092 0093 0094 0095 0096 0097 0098 0099 009a 009b 009c 009d 009e 009f 00a0 0401 0402 0403 0404 0405 0406 0407 0408 0409 040a 040b 040c 00ad 040e 040f 0410 0411 0412 0413 0414 0415 0416 0417 0418 0419 041a 041b 041c 041d 041e 041f 0420 0421 0422 0423 0424 0425 0426 0427 0428 0429 042a 042b 042c 042d 042e 042f 0430 0431 0432 0433 0434 0435 0436 0437 0438 0439 043a 043b 043c 043d 043e 043f 0440 0441 0442 0443 0444 0445 0446 0447 0448 0449 044a 044b 044c 044d 044e 044f 2116 0451 0452 0453 0454 0455 0456 0457 0458 0459 045a 045b 045c 00a7 045e 045f Project-OSS-Revival-enca-36defd7/data/maps/keybcs2.map000066400000000000000000000024001507545312400225140ustar00rootroot000000000000000000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 000d 000e 000f 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001a 001b 001c 001d 001e 001f 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007b 007c 007d 007e 007f 010c 00fc 00e9 010f 00e4 010e 0164 010d 011b 011a 0139 00cd 013e 013a 00c4 00c1 00c9 017e 017d 00f4 00f6 00d3 016f 00da 00fd 00d6 00dc 0160 013d 00dd 0158 0165 00e1 00ed 00f3 00fa 0148 0147 016e 00d4 0161 0159 0155 0154 00bc 00a7 00ab 00bb 2591 2592 2593 2502 2524 2561 2562 2556 2555 2563 2551 2557 255d 255c 255b 2510 2514 2534 252c 251c 2500 253c 255e 255f 255a 2554 2569 2566 2560 2550 256c 2567 2568 2564 2565 2559 2558 2552 2553 256b 256a 2518 250c 2588 2584 258c 2590 2580 03b1 03b2 0393 03c0 03a3 03c3 03bc 03c4 03a6 0398 03a9 03b4 221e 2205 03b5 2229 2261 00b1 2265 2264 2320 2321 00f7 2248 2218 00b7 2219 221a 207f 00b2 25a0 00a0 Project-OSS-Revival-enca-36defd7/data/maps/koi8cs2.map000066400000000000000000000024001507545312400224340ustar00rootroot000000000000000000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 000d 000e 000f 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001a 001b 001c 001d 001e 001f 0020 0021 0022 0023 00a4 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007b 007c 007d 007e 007f 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 008a 008b 008c 008d 008e 008f 0090 0091 0092 0093 0094 0095 0096 0097 0098 0099 009a 009b 009c 009d 009e 009f 00a0 ffff 00b4 ffff 007e ffff 02d8 02d9 00a8 ffff 02da 00b8 ffff 02dd 02db 02c7 00a9 00ae 250c 2510 2514 2518 2500 2193 03a9 00a7 03b1 03b3 03b5 03bc 03c0 03c9 00e0 00e1 01ce 010d 010f 011b 0155 ffff 00fc 00ed 016f 013a 013e 00f6 0148 00f3 00f4 00e4 0159 0161 0165 00fa 00eb 00e9 0171 00fd 017e ffff ffff 0151 0117 00df 00c0 00c1 01cd 010c 010e 011a 0154 ffff 00dc 00cd 016e 0139 013d 00d6 0147 00d3 00d4 00c4 0158 0160 0164 00da 00cb 00c9 0170 00dd 017d ffff ffff 0150 0116 ffff Project-OSS-Revival-enca-36defd7/data/maps/koi8r.map000066400000000000000000000024001507545312400222060ustar00rootroot000000000000000000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 000d 000e 000f 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001a 001b 001c 001d 001e 001f 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007b 007c 007d 007e 007f 2500 2502 250c 2510 2514 2518 251c 2524 252c 2534 253c 2580 2584 2588 258c 2590 2591 2592 2593 2320 25a0 2022 221a 2248 2264 2265 00a0 2321 00b0 00b2 00b7 00f7 2550 2551 2552 0451 2553 2554 2555 2556 2557 2558 2559 255a 255b 255c 255d 255e 255f 2560 2561 0401 2562 2563 2564 2565 2566 2567 2568 2569 256a 256b 256c 00a9 044e 0430 0431 0446 0434 0435 0444 0433 0445 0438 0439 043a 043b 043c 043d 043e 043f 044f 0440 0441 0442 0443 0436 0432 044c 044b 0437 0448 044d 0449 0447 044a 042e 0410 0411 0426 0414 0415 0424 0413 0425 0418 0419 041a 041b 041c 041d 041e 041f 042f 0420 0421 0422 0423 0416 0412 042c 042b 0417 0428 042d 0429 0427 042a Project-OSS-Revival-enca-36defd7/data/maps/koi8u.map000066400000000000000000000024001507545312400222110ustar00rootroot000000000000000000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 000d 000e 000f 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001a 001b 001c 001d 001e 001f 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007b 007c 007d 007e 007f 2500 2502 250c 2510 2514 2518 251c 2524 252c 2534 253c 2580 2584 2588 258c 2590 2591 2592 2593 2320 25a0 2219 221a 2248 2264 2265 00a0 2321 00b0 00b2 00b7 00f7 2550 2551 2552 0451 0454 2554 0456 0457 2557 2558 2559 255a 255b 0491 255d 255e 255f 2560 2561 0401 0404 2563 0406 0407 2566 2567 2568 2569 256a 0490 256c 00a9 044e 0430 0431 0446 0434 0435 0444 0433 0445 0438 0439 043a 043b 043c 043d 043e 043f 044f 0440 0441 0442 0443 0436 0432 044c 044b 0437 0448 044d 0449 0447 044a 042e 0410 0411 0426 0414 0415 0424 0413 0425 0418 0419 041a 041b 041c 041d 041e 041f 042f 0420 0421 0422 0423 0416 0412 042c 042b 0417 0428 042d 0429 0427 042a Project-OSS-Revival-enca-36defd7/data/maps/koi8ub.map000066400000000000000000000024001507545312400223530ustar00rootroot000000000000000000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 000d 000e 000f 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001a 001b 001c 001d 001e 001f 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007b 007c 007d 007e 007f 20ac 03c1 201a 0192 201e 2026 2020 2021 00a4 2030 002d 2039 00a7 ffff 00b6 00d7 00a3 0060 0027 201c 201d 2022 2013 2014 02dc 2122 0020 203a 00ae ffff 00b7 00f7 0020 ffff 00a2 0451 0454 00a5 0456 0457 ffff 00a9 00aa 00ab 00ac 0491 045e ffff 00b0 00b1 00b2 0401 0404 00b5 0406 0407 ffff 2116 00ba 00bb ffff 0490 040e 00a9 044e 0430 0431 0446 0434 0435 0444 0433 0445 0438 0439 043a 043b 043c 043d 043e 043f 044f 0440 0441 0442 0443 0436 0432 044c 044b 0437 0448 044d 0449 0447 044a 042e 0410 0411 0426 0414 0415 0424 0413 0425 0418 0419 041a 041b 041c 041d 041e 041f 042f 0420 0421 0422 0423 0416 0412 042c 042b 0417 0428 042d 0429 0427 042a Project-OSS-Revival-enca-36defd7/data/maps/koi8uni.map000066400000000000000000000024001507545312400225400ustar00rootroot000000000000000000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 000d 000e 000f 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001a 001b 001c 001d 001e 001f 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007b 007c 007d 007e 007f 2500 2502 250c 2510 2514 2518 251c 2524 252c 2534 253c 2580 2584 2588 258c 2590 2591 2018 2019 201c 201d 2219 2013 2014 00a9 2122 00a0 00bb 00ae 00ab 00b7 00a4 00a0 0452 0453 0451 0454 0455 0456 0457 0458 0459 045a 045b 045c 0491 045e 045f 2116 0402 0403 0401 0404 0405 0406 0407 0408 0409 040a 040b 040c 0490 040e 040f 044e 0430 0431 0446 0434 0435 0444 0433 0445 0438 0439 043a 043b 043c 043d 043e 043f 044f 0440 0441 0442 0443 0436 0432 044c 044b 0437 0448 044d 0449 0447 044a 042e 0410 0411 0426 0414 0415 0424 0413 0425 0418 0419 041a 041b 041c 041d 041e 041f 042f 0420 0421 0422 0423 0416 0412 042c 042b 0417 0428 042d 0429 0427 042a Project-OSS-Revival-enca-36defd7/data/maps/macce.map000066400000000000000000000024001507545312400222220ustar00rootroot000000000000000000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 000d 000e 000f 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001a 001b 001c 001d 001e 001f 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007b 007c 007d 007e 007f 00c4 0100 0101 00c9 0104 00d6 00dc 00e1 0105 010c 00e4 010d 0106 0107 00e9 0179 017a 010e 00ed 010f 0112 0113 0116 00f3 0117 00f4 00f6 00f5 00fa 011a 011b 00fc 2020 00b0 0118 00a3 00a7 2022 00b6 00df 00ae 00a9 2122 0119 00a8 2260 0123 012e 012f 012a 2264 2265 012b 0136 2202 2211 0142 013b 013c 013d 013e 0139 013a 0145 0146 0143 00ac 221a 0144 0147 2206 00ab 00bb 2026 00a0 0148 0150 00d5 0151 014c 2013 2014 201c 201d 2018 2019 00f7 25ca 014d 0154 0155 0158 2039 203a 0159 0156 0157 0160 201a 201e 0161 015a 015b 00c1 0164 0165 00cd 017d 017e 016a 00d3 00d4 016b 016e 00da 016f 0170 0171 0172 0173 00dd 00fd 0137 017b 0141 017c 0122 02c7 Project-OSS-Revival-enca-36defd7/data/maps/maccyr.map000066400000000000000000000024001507545312400224300ustar00rootroot000000000000000000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000a 000b 000c 000d 000e 000f 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001a 001b 001c 001d 001e 001f 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002a 002b 002c 002d 002e 002f 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003a 003b 003c 003d 003e 003f 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004a 004b 004c 004d 004e 004f 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005a 005b 005c 005d 005e 005f 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006a 006b 006c 006d 006e 006f 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007a 007b 007c 007d 007e 007f 0410 0411 0412 0413 0414 0415 0416 0417 0418 0419 041a 041b 041c 041d 041e 041f 0420 0421 0422 0423 0424 0425 0426 0427 0428 0429 042a 042b 042c 042d 042e 042f 2020 00b0 0490 00a3 00a7 2022 00b6 0406 00ae 00a9 2122 0402 0452 2260 0403 0453 221e 00b1 2264 2265 0456 00b5 0491 0408 0404 0454 0407 0457 0409 0459 040a 045a 0458 0405 00ac 221a 0192 2248 2206 00ab 00bb 2026 00a0 040b 045b 040c 045c 0455 2013 2014 201c 201d 2018 2019 00f7 201e 040e 045e 040f 045f 2116 0401 0451 044f 0430 0431 0432 0433 0434 0435 0436 0437 0438 0439 043a 043b 043c 043d 043e 043f 0440 0441 0442 0443 0444 0445 0446 0447 0448 0449 044a 044b 044c 044d 044e 20ac Project-OSS-Revival-enca-36defd7/data/mystrings.c000066400000000000000000000014451507545312400217260ustar00rootroot00000000000000#include #include #define isbinary(x) (iscntrl(x) && !isspace(x)) #define istext(x) (islower(x) || isupper(x) || (x) > 127) #define MINTEXT 4 #define FILL_CHARACTER ' ' int main(void) { int mode; unsigned char old[MINTEXT - 1]; int c; mode = 0; while ((c = getchar()) != EOF) { if (isbinary(c)) { if (mode == 0) putchar('\n'); mode = MINTEXT; } else { if (mode > 0) { if (istext(c)) { mode--; if (mode == 0) { int j; for (j = 0; j < MINTEXT-1; j++) putchar(old[j]); putchar(c); } else old[MINTEXT - mode - 1] = c; } else mode = MINTEXT; } else putchar(c); } } if (mode == 0) putchar('\n'); return 0; } Project-OSS-Revival-enca-36defd7/data/normalize.pl000077500000000000000000000052301507545312400220570ustar00rootroot00000000000000#!/usr/bin/perl use warnings; use strict; use Getopt::Long; use Pod::Usage; my $n = 0; my $q; my $max = 0; my (@char_hex, @char, @count); my $help; my $man; my $no_zero; GetOptions("no-zero" => \$no_zero, 'help|?' => \$help, man => \$man) or pod2usage(2); pod2usage(1) if $help; pod2usage(-exitval => 0, -verbose => 2) if $man; pod2usage("$0: No files given.") if ((@ARGV == 0) && (-t STDIN)); if (!defined $ARGV[0]) { while () { chomp; # Handle special case of space character (0x20 count) if (/^(0x20)\s+(\d+)$/) { $char_hex[$n] = $1; $char[$n] = ' '; $count[$n] = $2; } else { ($char_hex[$n], $char[$n], $count[$n]) = split /\s+/, $_, 3; } if ($max < $count[$n]) { $max = $count[$n]; } $n++; } for ($q = 1; $max/$q >= 6000; $q++) { } for (my $i = 0; $i < $n; $i++) { if ($no_zero && ($count[$i]/$q) < 1) { next; } printf "%s %u\n", $char[$i], $count[$i]/$q; } } else { my @err; my $sum = 0; open FH, "<".$ARGV[0]; while () { my ($char, $count) = split /\s+/, $_, 2; $sum += $count; } close FH; my $sum2 = 0; while () { chomp; # Handle special case of space character (0x20 count) if (/^(0x20)\s+(\d+)$/) { $char_hex[$n] = $1; $char[$n] = ' '; $count[$n] = $2; } else { ($char_hex[$n], $char[$n], $count[$n]) = split /\s+/, $_, 3; } $sum2 += $count[$n]; $n++; } for (my $i = 0; $i < $n; $i++) { my $x = $count[$i]*$sum/$sum2; $count[$i] = int $x; $err[$i] = $count[$i] - $x; } $sum2 = 0; for (my $i = 0; $i < $n; $i++) { $sum2 += $count[$i]; } while ($sum2 != $sum) { $max = 0; for (my $i = 0; $i < $n; $i++) { if ($err[$i]*($sum - $sum2) > $err[$max]*($sum - $sum2)) { $max = $i; } } $count[$max] += $sum2 > $sum ? -1 : 1; $err[$max] -= $sum2 > $sum ? -1 : 1; $sum2 += $sum2 > $sum ? -1 : 1; } for (my $i = 0; $i < $n; $i++) { if ($no_zero && ($count[$i]) < 1) { next; } printf "%s %u\n", $char[$i], $count[$i]; } } __END__ =head1 normalize.pl normalize.pl - Useful for producing CHARSET.base files, since the weights must fit into unsigned short int: =head1 SYNOPSIS normalize.pl [options] [EXISTING_COUNT] < [RAW_COUNT] Options: -help brief help message -no-zero Skip characters with zero counts =head1 OPTIONS =over 8 =item B<-help> Print a brief help message and exits. =item B<-man> Prints the manual page and exits. =back =head1 DESCRIPTION B will read the given input file(s) and do something useful with the contents thereof. =cut Project-OSS-Revival-enca-36defd7/data/pairtoc.c000066400000000000000000000040741507545312400213310ustar00rootroot00000000000000#include #include #include #include #define FILL_CHARACTER '.' #define mytoupper(x) (islower(x) ? toupper(x) : (x)) int main(int argc, char *argv[]) { unsigned int letters[0x100]; unsigned int order[0x100]; unsigned char *pairs[0x100]; FILE *f; unsigned int i, k; long unsigned int j; int first, second; if (argc < 1) { fprintf(stderr, "Error: Missing arguments!\n"); return 0; } /* read letters */ for (i = 0; i < 0x100; i++) { letters[i] = 0; pairs[i] = NULL; } f = fopen(argv[2], "r"); while (fscanf(f, "%lx", &j) == 1) letters[j] = 0xff; fclose(f); /* read stuff */ j = 0; while ((first = getchar()) != EOF) { pairs[first] = (unsigned char*)malloc(0x101); order[j] = first; letters[first] = j++; getchar(); /* : */ i = 0; while ((second = getchar()) != '\n') pairs[first][i++] = second; pairs[first][i] = '\0'; } assert(order[0] == FILL_CHARACTER); puts("/* THIS IS A GENERATED TABLE, see data/pairtoc.c. */"); printf("static const unsigned char LETTER_"); for (i = 0; argv[1][i]; i++) printf("%c", mytoupper(argv[1][i])); puts("[] = {"); for (i = 0; i < 0x100; i++) { if (i % 8 == 0) printf(" "); printf("%3u", letters[i]); if (i % 8 == 7) printf(", /* 0x%02x */\n", i-7); else printf(", "); } puts("};\n"); puts("/* THIS IS A GENERATED TABLE, see data/pairtoc.c. */"); printf("static const unsigned char *PAIR_"); for (i = 0; argv[1][i]; i++) printf("%c", mytoupper(argv[1][i])); puts("[] = {\n"); printf(" (unsigned char*)\""); for (k = 0; pairs[FILL_CHARACTER][k]; k++) { printf("\\x%02x", pairs[FILL_CHARACTER][k]); } printf("\", /* FILLCHAR */\n"); for (i = 1; i < j; i++) { printf(" (unsigned char*)\""); for (k = 0; pairs[order[i]][k]; k++) { if (pairs[order[i]][k] == FILL_CHARACTER) printf("."); else printf("\\x%02x", pairs[order[i]][k]); } printf("\", /* 0x%02x */\n", order[i]); } puts("};\n"); return 0; } Project-OSS-Revival-enca-36defd7/data/polish/000077500000000000000000000000001507545312400210155ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/data/polish/doit.sh000077500000000000000000000001251507545312400223110ustar00rootroot00000000000000#! /bin/bash ../doit.sh iso88592 cp1250 ibm852 macce iso885913 iso885916 baltic cork Project-OSS-Revival-enca-36defd7/data/polish/iso88592.base000066400000000000000000000001141507545312400230570ustar00rootroot00000000000000 23 31 70 2437 5859 1720 211 2137 1351 3257 401 1816 Project-OSS-Revival-enca-36defd7/data/polish/polish.h000066400000000000000000000466551507545312400225040ustar00rootroot00000000000000/***** THIS IS A GENERATED FILE. DO NOT TOUCH! *****/ /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_ISO88592[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 23, 0, 0, 31, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 70, /* 0xa8 */ 0, 2437, 0, 5859, 0, 0, 1720, 0, /* 0xb0 */ 0, 0, 0, 0, 211, 0, 0, 2137, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 0, 0, 0, 0, 0, 1351, 0, /* 0xe0 */ 0, 0, 3257, 0, 0, 0, 0, 0, /* 0xe8 */ 0, 401, 0, 1816, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_CP1250[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 31, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 1720, 0, 0, 211, /* 0x98 */ 0, 0, 0, 23, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 70, /* 0xa8 */ 0, 0, 0, 5859, 0, 0, 0, 0, /* 0xb0 */ 0, 2437, 0, 0, 0, 0, 0, 2137, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 0, 0, 0, 0, 0, 1351, 0, /* 0xe0 */ 0, 0, 3257, 0, 0, 0, 0, 0, /* 0xe8 */ 0, 401, 0, 1816, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_IBM852[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 1351, 0, /* 0x80 */ 5859, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 31, /* 0x90 */ 1720, 0, 0, 0, 0, 23, 0, 0, /* 0x98 */ 0, 0, 1816, 0, 0, 2437, 0, 0, /* 0xa0 */ 0, 3257, 0, 211, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 70, 2137, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 0, 0, 0, 401, 0, 0, 0, /* 0xe0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_MACCE[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 2437, 0, 0, 0, 0, 1351, 0, 0, /* 0x88 */ 211, 0, 0, 0, 0, 0, 0, 1816, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 3257, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 5859, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 401, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 0, 0, 0, 0, 31, 1720, 0, /* 0xe0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 70, 23, 2137, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_ISO885913[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 23, 31, 0, 0, 70, 0, 0, /* 0xd8 */ 2437, 0, 0, 1351, 0, 0, 3257, 0, /* 0xe0 */ 0, 0, 211, 0, 0, 0, 0, 0, /* 0xe8 */ 0, 401, 0, 1816, 0, 0, 0, 0, /* 0xf0 */ 0, 5859, 1720, 0, 0, 2137, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_ISO885916[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 2437, 23, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 211, 70, /* 0xa8 */ 0, 0, 0, 5859, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 2137, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 31, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 0, 0, 0, 0, 1351, 0, 0, /* 0xe0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 0, 401, 0, 1816, 0, 0, 0, 1720, /* 0xf0 */ 0, 0, 0, 0, 0, 3257, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_BALTIC[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 23, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 31, 0, 0, 70, 0, 0, /* 0xd8 */ 0, 0, 0, 1351, 0, 0, 2437, 0, /* 0xe0 */ 0, 0, 0, 3257, 0, 0, 0, 0, /* 0xe8 */ 5859, 0, 401, 1816, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 1720, 0, 0, 2137, 211, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_CORK[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 23, 0, 0, 0, 0, 0, /* 0x88 */ 0, 31, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 70, 0, 0, 0, 0, /* 0x98 */ 0, 2437, 1351, 0, 0, 0, 3257, 0, /* 0xa0 */ 0, 0, 5859, 401, 0, 0, 0, 0, /* 0xa8 */ 0, 1720, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 211, 0, 2137, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 1816, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/totals.pl. */ static const unsigned short int SIGNIFICANT[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 1351, 0, /* 0x80 */ 8296, 0, 23, 0, 31, 1351, 0, 0, /* 0x88 */ 211, 31, 0, 0, 0, 0, 0, 1847, /* 0x90 */ 1720, 0, 0, 70, 1720, 23, 0, 211, /* 0x98 */ 0, 2437, 5604, 69, 0, 2437, 3288, 0, /* 0xa0 */ 0, 3257, 5859, 3869, 0, 0, 211, 210, /* 0xa8 */ 0, 4157, 0, 17577, 0, 0, 1720, 0, /* 0xb0 */ 5859, 2648, 0, 2137, 211, 70, 2137, 6411, /* 0xb8 */ 0, 0, 0, 0, 401, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 23, 0, 0, 0, 0, 0, 0, 31, /* 0xd0 */ 0, 23, 62, 0, 0, 140, 0, 0, /* 0xd8 */ 2437, 0, 0, 2702, 401, 1382, 10116, 0, /* 0xe0 */ 0, 0, 6725, 3257, 0, 0, 0, 0, /* 0xe8 */ 5859, 1604, 401, 10896, 0, 0, 0, 1720, /* 0xf0 */ 0, 5859, 3440, 70, 23, 9668, 211, 0, /* 0xf8 */ }; /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define WEIGHT_SUM 19313 /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const char *const CHARSET_NAMES[] = { "iso88592", "cp1250", "ibm852", "macce", "iso885913", "iso885916", "baltic", "cork", }; /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const unsigned short int *const CHARSET_WEIGHTS[] = { RAW_ISO88592, RAW_CP1250, RAW_IBM852, RAW_MACCE, RAW_ISO885913, RAW_ISO885916, RAW_BALTIC, RAW_CORK, }; /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define CHARSET_LETTERS NULL /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define CHARSET_PAIRS NULL /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define NCHARSETS 8 Project-OSS-Revival-enca-36defd7/data/polish/rawcounts.iso88592000066400000000000000000000034421507545312400242010ustar00rootroot000000000000000x09 . 478 0x0a . 307296 0x0d . 261760 0x20 1738594 0x21 ! 21553 0x22 " 71173 0x23 # 7181 0x24 $ 63 0x25 % 9843 0x26 & 100450 0x27 ' 2489 0x28 ( 3283 0x29 ) 3555 0x2a * 582 0x2b + 208 0x2c , 144097 0x2d - 49466 0x2e . 109782 0x2f / 42607 0x30 0 22095 0x31 1 7192 0x32 2 12857 0x33 3 3065 0x34 4 4695 0x35 5 4981 0x36 6 1278 0x37 7 2264 0x38 8 8316 0x39 9 2298 0x3a : 15607 0x3b ; 109509 0x3c < 179947 0x3d = 36495 0x3e > 180608 0x3f ? 10390 0x40 @ 337 0x41 A 19198 0x42 B 14521 0x43 C 16569 0x44 D 11720 0x45 E 9731 0x46 F 5540 0x47 G 8817 0x48 H 5581 0x49 I 15132 0x4a J 10119 0x4b K 15433 0x4c L 7213 0x4d M 13190 0x4e N 17561 0x4f O 12259 0x50 P 23364 0x51 Q 132 0x52 R 13080 0x53 S 18521 0x54 T 19508 0x55 U 4563 0x56 V 1057 0x57 W 19787 0x58 X 1178 0x59 Y 1006 0x5a Z 13247 0x5b [ 1257 0x5c \ 171 0x5d ] 1442 0x5e ^ 27 0x5f _ 5221 0x60 ` 1230 0x61 a 675245 0x62 b 330749 0x63 c 316234 0x64 d 252519 0x65 e 630363 0x66 f 29788 0x67 g 144083 0x68 h 109615 0x69 i 683449 0x6a j 147881 0x6b k 226750 0x6c l 195904 0x6d m 235685 0x6e n 502439 0x6f o 565574 0x70 p 304251 0x71 q 6227 0x72 r 457012 0x73 s 428128 0x74 t 337494 0x75 u 166560 0x76 v 8310 0x77 w 293327 0x78 x 4030 0x79 y 276515 0x7a z 427891 0x7b { 52 0x7c | 452 0x7d } 83 0x7e ~ 267 0x82 51 0x84 12 0x85 58 0x87 41 0x8f 1 0x99 20 0x9a 1 0x9b 21 0xa1 175 0xa3 742 0xa5 83 0xa6 999 0xab 4 0xac 86 0xaf 2241 0xb0 4 0xb1 77991 0xb3 187508 0xb6 55060 0xb7 26 0xb9 2 0xba 2 0xbb 4 0xbc 6765 0xbf 68392 0xc3 16 0xc4 112 0xc5 128 0xc6 45 0xc9 1 0xca 84 0xd1 67 0xd3 162 0xd6 1 0xdc 1 0xde 1 0xe0 4 0xe1 20 0xe2 1 0xe4 20 0xe5 21 0xe6 43252 0xe7 3 0xe9 399 0xea 104253 0xec 2 0xed 30 0xee 3 0xef 3 0xf1 12853 0xf3 58130 0xf6 53 0xf8 3 0xfa 6 0xfc 21 0xfd 7 Project-OSS-Revival-enca-36defd7/data/russian/000077500000000000000000000000001507545312400212035ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/data/russian/doit.sh000077500000000000000000000000741507545312400225020ustar00rootroot00000000000000#! /bin/bash ../doit.sh koi8r cp1251 iso88595 ibm866 maccyr Project-OSS-Revival-enca-36defd7/data/russian/koi8r.base000066400000000000000000000002721507545312400230740ustar00rootroot00000000000000 418 4711 935 244 1917 5075 896 597 3824 819 2062 2651 1688 3538 5972 1529 1262 2752 2929 3628 1580 570 2406 1202 1284 969 500 754 Project-OSS-Revival-enca-36defd7/data/russian/paircounts.koi8r000066400000000000000000000014371507545312400243550ustar00rootroot00000000000000.: :. :. :. :. :. :. : :. :. :. :. :. :. :. :. :. : :. :. :. :. :. :. :. :. :. :. : : : :. :. :. : :. :. : :. :. :. :. :. :. :. :. : :. :. :. :. :. : :. :. :. :. : : : : Project-OSS-Revival-enca-36defd7/data/russian/rawcounts.koi8r000066400000000000000000000014061507545312400242070ustar00rootroot0000000000000013520 30682 22930 93536 1915 25916 608 387 2701 891 1555 1554 208 2571 8830 10868 17822 21560 7814 6472 1626 3052 843 941 2559 2430 2184 2136 2545 3760 27671 22243 28341 1664 340 12634 8266 4844 9115 11584 4826 5190 8692 7917 4 1347 7568 2432 4826 6919 2505 674 13189 3320 13900 1099 910 2747 7 404 971 4 1 4 810 15557 7281 6467 5219 15422 3154 7756 8966 13530 814 4831 7627 10815 10655 10786 8764 102 15550 11627 16648 4200 4162 1953 973 4820 1094 186 2937 187 4 60 1 46 28 16 62 16 2093 23558 4677 1220 9589 25376 489 4482 2987 19124 4099 10311 13258 8440 17694 29860 7646 6310 13761 14649 18140 7904 2852 12033 6011 6421 4849 2502 675 901 3774 50 40 1383 494 48 523 443 61 341 272 1306 51 884 411 839 1471 862 1505 590 518 1348 724 320 144 1825 30 26 381 299 149 7 336 1 Project-OSS-Revival-enca-36defd7/data/russian/russian.h000066400000000000000000001305701507545312400230460ustar00rootroot00000000000000/***** THIS IS A GENERATED FILE. DO NOT TOUCH! *****/ /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_KOI8R[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 418, 4711, 935, 244, 1917, 5075, 0, 896, /* 0xc0 */ 597, 3824, 819, 2062, 2651, 1688, 3538, 5972, /* 0xc8 */ 1529, 1262, 2752, 2929, 3628, 1580, 570, 2406, /* 0xd0 */ 1202, 1284, 969, 500, 0, 0, 754, 0, /* 0xd8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char LETTER_KOI8R[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 255, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 255, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 1, 2, 3, 4, 5, 6, 7, 8, /* 0xc0 */ 9, 10, 11, 12, 13, 14, 15, 16, /* 0xc8 */ 17, 18, 19, 20, 21, 22, 23, 24, /* 0xd0 */ 25, 26, 27, 28, 29, 30, 31, 255, /* 0xd8 */ 32, 33, 34, 255, 35, 36, 255, 37, /* 0xe0 */ 38, 39, 40, 41, 42, 43, 44, 45, /* 0xe8 */ 46, 47, 48, 49, 50, 51, 52, 53, /* 0xf0 */ 54, 55, 56, 57, 58, 59, 60, 255, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char *PAIR_KOI8R[] = { (unsigned char*)"\xd0\xd3\xce\xd7\xcf\xc9\xd4\xcb\xc4\xc2\xcd\xf7\xee\xf0\xda\xd2\xf3\xde\xd5\xc7\xef\xeb\xe9\xf4\xcc\xed\xe4\xc5\xe1\xdc\xd1\xf2\xe2\xd6\xc1\xe7\xfa\xf1\xfe\xc8\xf5\xfc\xec\xdb\xe5\xe8\xc6\xf6\xe6\xc3\xfb", /* FILLCHAR */ (unsigned char*)".\xd4\xc4\xdd\xc2", /* 0xc0 */ (unsigned char*)".\xcc\xd4\xcb\xce\xda\xd3\xcd\xd7\xd2\xc4\xd1\xc5\xc0\xd6\xdb\xc8\xca\xc2\xde\xd0\xc7\xd5\xdd\xc3", /* 0xc1 */ (unsigned char*)"\xd9\xcf\xc5\xd2\xd5\xc1\xc9\xcc\xd1.\xce", /* 0xc2 */ (unsigned char*)"\xc5\xc9\xc1.\xcf", /* 0xc3 */ (unsigned char*)"\xc5\xc1\xcf\xc9\xd5\xce\xd2.\xd7\xd9\xd8\xcc\xd1\xd3\xcb\xc3", /* 0xc4 */ (unsigned char*)".\xce\xd2\xcc\xd4\xd3\xcd\xc7\xc4\xca\xcb\xd7\xda\xc2\xde\xc5\xd0\xdb\xd6\xdd\xc8\xc3\xcf", /* 0xc5 */ (unsigned char*)"\xcf\xc9", /* 0xc6 */ (unsigned char*)"\xcf\xc1\xcc\xd2\xc4\xc9.\xd5\xce\xc5", /* 0xc7 */ (unsigned char*)".\xcf\xc1\xc9\xce", /* 0xc8 */ (unsigned char*)".\xcc\xd4\xce\xcb\xcd\xd3\xd7\xda\xc5\xc8\xc4\xde\xca\xd1\xd2\xc3\xc7\xc9\xdb\xc2\xcf\xd6\xd0\xc1\xc0", /* 0xc9 */ (unsigned char*)".\xd3\xd4\xce\xde\xc4", /* 0xca */ (unsigned char*)"\xc1\xcf.\xc9\xd5\xd2\xd4\xcc\xd3\xc5\xce", /* 0xcb */ (unsigned char*)".\xc9\xcf\xc1\xc5\xd8\xd3\xd1\xd5\xc0\xd9\xcb\xce\xcc", /* 0xcc */ (unsigned char*)".\xcf\xc5\xc1\xc9\xd5\xce\xd9\xd1", /* 0xcd */ (unsigned char*)"\xc1\xcf\xc5\xc9.\xd9\xd5\xce\xd1\xd8\xd4\xc4\xd3\xcb\xc3", /* 0xce */ (unsigned char*)".\xd7\xd2\xd4\xcc\xd3\xce\xcd\xc4\xc7\xca\xc2\xcb\xd6\xde\xc5\xd0\xda\xdb\xc9\xd1\xc8\xcf\xdd\xc0", /* 0xcf */ (unsigned char*)"\xcf\xd2\xc5\xc1\xc9\xcc\xd5\xd9\xd1", /* 0xd0 */ (unsigned char*)".\xd4\xcc\xc4\xce\xd3\xcd\xd7\xda\xdd", /* 0xd1 */ (unsigned char*)"\xcf\xc1\xc5\xc9\xd5.\xd9\xce\xd1\xd4\xd8\xd7\xcd\xc4\xcb\xd6\xd3\xc0", /* 0xd2 */ (unsigned char*)"\xd4\xd1\xcb\xc5.\xd8\xcf\xcc\xc9\xd0\xc1\xce\xd7\xcd\xd3\xd5\xd9\xde", /* 0xd3 */ (unsigned char*)"\xcf.\xc1\xc5\xd8\xc9\xd2\xd7\xd9\xd5\xd3\xce\xcb\xd1\xcc", /* 0xd4 */ (unsigned char*)".\xcc\xc4\xd4\xd3\xcd\xd6\xc7\xc0\xde\xd2\xcb\xc2\xd0\xdb\xd7\xce\xc8\xda\xdd", /* 0xd5 */ (unsigned char*)"\xc5\xc9\xc1\xce\xc4.\xd5", /* 0xd6 */ (unsigned char*)"\xc1\xcf.\xc5\xc9\xd9\xd3\xce\xd2\xd5\xcc\xdb\xda\xd4\xc4\xd1\xcb", /* 0xd7 */ (unsigned char*)".\xce\xcb\xd3\xdb\xc5\xc0\xd1", /* 0xd8 */ (unsigned char*)".\xcc\xca\xc5\xcd\xc8\xd7\xd4\xd3\xdb\xd2\xc2", /* 0xd9 */ (unsigned char*)"\xc1\xce.\xc4\xd7\xcf\xc9\xc5\xd5\xd9\xcd\xd2\xd1\xc7\xcc", /* 0xda */ (unsigned char*)"\xc5\xc9\xc1\xd8\xcb\xcc\xce\xcf\xd5", /* 0xdb */ (unsigned char*)"\xd4", /* 0xdc */ (unsigned char*)"\xc5\xc9\xc1", /* 0xdd */ (unsigned char*)"\xc5\xd4\xc1\xc9\xce\xd5\xcb.\xd8", /* 0xde */ (unsigned char*)".", /* 0xe0 */ (unsigned char*)".\xec\xf4\xeb\xee\xfa\xf7\xf3\xed\xf2\xf1\xe4\xce", /* 0xe1 */ (unsigned char*)"\xf9\xef\xe5", /* 0xe2 */ (unsigned char*)"\xe5\xe1\xef\xc1\xe9\xf5.\xcf\xee", /* 0xe4 */ (unsigned char*)".\xf2\xee\xec\xf4\xf3\xed\xe4\xe7\xf7\xea\xe2", /* 0xe5 */ (unsigned char*)"\xef\xcf", /* 0xe7 */ (unsigned char*)".\xef", /* 0xe8 */ (unsigned char*)".\xec\xf4\xee\xf3\xeb\xed\xf7\xe4\xe5\xfa\xfe", /* 0xe9 */ (unsigned char*)".", /* 0xea */ (unsigned char*)"\xe1\xef.\xe9\xc1\xcf\xf5\xf2", /* 0xeb */ (unsigned char*)".\xe9\xef\xe1\xe5\xf8\xf3", /* 0xec */ (unsigned char*)".\xc1\xe5\xef\xe1\xe9\xf5\xcf\xee", /* 0xed */ (unsigned char*)"\xe5\xe1\xef\xe9\xc5.\xc1\xf9\xf5\xcf\xee\xd5\xf1", /* 0xee */ (unsigned char*)".\xf7\xce\xf4\xee\xf3\xec\xf2\xed\xe4\xe7\xea\xe2\xf6\xe5\xeb\xfe\xf0", /* 0xef */ (unsigned char*)"\xef\xf2\xcf\xd2\xe5\xc1\xe1", /* 0xf0 */ (unsigned char*)".\xf4", /* 0xf1 */ (unsigned char*)"\xef\xe1\xe5\xe9\xf5.\xd5\xc1", /* 0xf2 */ (unsigned char*)"\xf4.\xf1\xeb\xe5\xf8\xec\xef\xf0\xd4\xe9\xcb", /* 0xf3 */ (unsigned char*)"\xef.\xe1\xf8\xe5\xe9\xf2\xcf\xf7\xc1\xf9\xf5", /* 0xf4 */ (unsigned char*)".\xe4\xec\xf4", /* 0xf5 */ (unsigned char*)"\xe5", /* 0xf6 */ (unsigned char*)".\xef\xe1\xe5\xe9\xd9\xf9\xcf\xf3\xc9\xd3\xc1", /* 0xf7 */ (unsigned char*)".", /* 0xf8 */ (unsigned char*)".\xec\xea", /* 0xf9 */ (unsigned char*)"\xe1\xc1\xee.", /* 0xfa */ (unsigned char*)"\xe5\xe9", /* 0xfb */ (unsigned char*)"\xd4\xf4", /* 0xfc */ (unsigned char*)"\xe5", /* 0xfd */ (unsigned char*)"\xe5\xf4\xd4\xe1\xe9", /* 0xfe */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_CP1251[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 4711, 935, 2406, 896, 1917, 5075, 570, 969, /* 0xe0 */ 3824, 819, 2062, 2651, 1688, 3538, 5972, 1529, /* 0xe8 */ 2752, 2929, 3628, 1580, 0, 597, 244, 754, /* 0xf0 */ 500, 0, 0, 1284, 1202, 0, 418, 1262, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char LETTER_CP1251[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 255, 255, 0, 255, 0, 0, 0, 0, /* 0x80 */ 0, 0, 255, 0, 255, 255, 255, 255, /* 0x88 */ 255, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 255, 0, 255, 255, 255, 255, /* 0x98 */ 0, 255, 255, 255, 0, 255, 0, 0, /* 0xa0 */ 255, 0, 255, 0, 0, 0, 0, 255, /* 0xa8 */ 0, 0, 255, 255, 255, 0, 0, 0, /* 0xb0 */ 255, 0, 255, 0, 255, 255, 255, 255, /* 0xb8 */ 33, 34, 53, 37, 35, 36, 52, 56, /* 0xc0 */ 39, 40, 41, 42, 43, 44, 45, 46, /* 0xc8 */ 48, 49, 50, 51, 255, 38, 255, 60, /* 0xd0 */ 57, 59, 255, 55, 54, 58, 32, 47, /* 0xd8 */ 2, 3, 24, 8, 5, 6, 23, 27, /* 0xe0 */ 10, 11, 12, 13, 14, 15, 16, 17, /* 0xe8 */ 19, 20, 21, 22, 7, 9, 4, 31, /* 0xf0 */ 28, 30, 255, 26, 25, 29, 1, 18, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char *PAIR_CP1251[] = { (unsigned char*)"\xef\xf1\xed\xe2\xee\xe8\xf2\xea\xe4\xe1\xec\xc2\xcd\xcf\xe7\xf0\xd1\xf7\xf3\xe3\xce\xca\xc8\xd2\xeb\xcc\xc4\xe5\xc0\xfd\xff\xd0\xc1\xe6\xe0\xc3\xc7\xdf\xd7\xf5\xd3\xdd\xcb\xf8\xc5\xd5\xf4\xc6\xd4\xf6\xd8", /* FILLCHAR */ (unsigned char*)".\xf2\xe4\xf9\xe1", /* 0xfe */ (unsigned char*)".\xeb\xf2\xea\xed\xe7\xf1\xec\xe2\xf0\xe4\xff\xe5\xfe\xe6\xf8\xf5\xe9\xe1\xf7\xef\xe3\xf3\xf9\xf6", /* 0xe0 */ (unsigned char*)"\xfb\xee\xe5\xf0\xf3\xe0\xe8\xeb\xff.\xed", /* 0xe1 */ (unsigned char*)"\xe5\xe8\xe0.\xee", /* 0xf6 */ (unsigned char*)"\xe5\xe0\xee\xe8\xf3\xed\xf0.\xe2\xfb\xfc\xeb\xff\xf1\xea\xf6", /* 0xe4 */ (unsigned char*)".\xed\xf0\xeb\xf2\xf1\xec\xe3\xe4\xe9\xea\xe2\xe7\xe1\xf7\xe5\xef\xf8\xe6\xf9\xf5\xf6\xee", /* 0xe5 */ (unsigned char*)"\xee\xe8", /* 0xf4 */ (unsigned char*)"\xee\xe0\xeb\xf0\xe4\xe8.\xf3\xed\xe5", /* 0xe3 */ (unsigned char*)".\xee\xe0\xe8\xed", /* 0xf5 */ (unsigned char*)".\xeb\xf2\xed\xea\xec\xf1\xe2\xe7\xe5\xf5\xe4\xf7\xe9\xff\xf0\xf6\xe3\xe8\xf8\xe1\xee\xe6\xef\xe0\xfe", /* 0xe8 */ (unsigned char*)".\xf1\xf2\xed\xf7\xe4", /* 0xe9 */ (unsigned char*)"\xe0\xee.\xe8\xf3\xf0\xf2\xeb\xf1\xe5\xed", /* 0xea */ (unsigned char*)".\xe8\xee\xe0\xe5\xfc\xf1\xff\xf3\xfe\xfb\xea\xed\xeb", /* 0xeb */ (unsigned char*)".\xee\xe5\xe0\xe8\xf3\xed\xfb\xff", /* 0xec */ (unsigned char*)"\xe0\xee\xe5\xe8.\xfb\xf3\xed\xff\xfc\xf2\xe4\xf1\xea\xf6", /* 0xed */ (unsigned char*)".\xe2\xf0\xf2\xeb\xf1\xed\xec\xe4\xe3\xe9\xe1\xea\xe6\xf7\xe5\xef\xe7\xf8\xe8\xff\xf5\xee\xf9\xfe", /* 0xee */ (unsigned char*)"\xee\xf0\xe5\xe0\xe8\xeb\xf3\xfb\xff", /* 0xef */ (unsigned char*)".\xf2\xeb\xe4\xed\xf1\xec\xe2\xe7\xf9", /* 0xff */ (unsigned char*)"\xee\xe0\xe5\xe8\xf3.\xfb\xed\xff\xf2\xfc\xe2\xec\xe4\xea\xe6\xf1\xfe", /* 0xf0 */ (unsigned char*)"\xf2\xff\xea\xe5.\xfc\xee\xeb\xe8\xef\xe0\xed\xe2\xec\xf1\xf3\xfb\xf7", /* 0xf1 */ (unsigned char*)"\xee.\xe0\xe5\xfc\xe8\xf0\xe2\xfb\xf3\xf1\xed\xea\xff\xeb", /* 0xf2 */ (unsigned char*)".\xeb\xe4\xf2\xf1\xec\xe6\xe3\xfe\xf7\xf0\xea\xe1\xef\xf8\xe2\xed\xf5\xe7\xf9", /* 0xf3 */ (unsigned char*)"\xe5\xe8\xe0\xed\xe4.\xf3", /* 0xe6 */ (unsigned char*)"\xe0\xee.\xe5\xe8\xfb\xf1\xed\xf0\xf3\xeb\xf8\xe7\xf2\xe4\xff\xea", /* 0xe2 */ (unsigned char*)".\xed\xea\xf1\xf8\xe5\xfe\xff", /* 0xfc */ (unsigned char*)".\xeb\xe9\xe5\xec\xf5\xe2\xf2\xf1\xf8\xf0\xe1", /* 0xfb */ (unsigned char*)"\xe0\xed.\xe4\xe2\xee\xe8\xe5\xf3\xfb\xec\xf0\xff\xe3\xeb", /* 0xe7 */ (unsigned char*)"\xe5\xe8\xe0\xfc\xea\xeb\xed\xee\xf3", /* 0xf8 */ (unsigned char*)"\xf2", /* 0xfd */ (unsigned char*)"\xe5\xe8\xe0", /* 0xf9 */ (unsigned char*)"\xe5\xf2\xe0\xe8\xed\xf3\xea.\xfc", /* 0xf7 */ (unsigned char*)".", /* 0xde */ (unsigned char*)".\xcb\xd2\xca\xcd\xc7\xc2\xd1\xcc\xd0\xdf\xc4\xed", /* 0xc0 */ (unsigned char*)"\xdb\xce\xc5", /* 0xc1 */ (unsigned char*)"\xc5\xc0\xce\xe0\xc8\xd3.\xee\xcd", /* 0xc4 */ (unsigned char*)".\xd0\xcd\xcb\xd2\xd1\xcc\xc4\xc3\xc2\xc9\xc1", /* 0xc5 */ (unsigned char*)"\xce\xee", /* 0xc3 */ (unsigned char*)".\xce", /* 0xd5 */ (unsigned char*)".\xcb\xd2\xcd\xd1\xca\xcc\xc2\xc4\xc5\xc7\xd7", /* 0xc8 */ (unsigned char*)".", /* 0xc9 */ (unsigned char*)"\xc0\xce.\xc8\xe0\xee\xd3\xd0", /* 0xca */ (unsigned char*)".\xc8\xce\xc0\xc5\xdc\xd1", /* 0xcb */ (unsigned char*)".\xe0\xc5\xce\xc0\xc8\xd3\xee\xcd", /* 0xcc */ (unsigned char*)"\xc5\xc0\xce\xc8\xe5.\xe0\xdb\xd3\xee\xcd\xf3\xdf", /* 0xcd */ (unsigned char*)".\xc2\xed\xd2\xcd\xd1\xcb\xd0\xcc\xc4\xc3\xc9\xc1\xc6\xc5\xca\xd7\xcf", /* 0xce */ (unsigned char*)"\xce\xd0\xee\xf0\xc5\xe0\xc0", /* 0xcf */ (unsigned char*)".\xd2", /* 0xdf */ (unsigned char*)"\xce\xc0\xc5\xc8\xd3.\xf3\xe0", /* 0xd0 */ (unsigned char*)"\xd2.\xdf\xca\xc5\xdc\xcb\xce\xcf\xf2\xc8\xea", /* 0xd1 */ (unsigned char*)"\xce.\xc0\xdc\xc5\xc8\xd0\xee\xc2\xe0\xdb\xd3", /* 0xd2 */ (unsigned char*)".\xc4\xcb\xd2", /* 0xd3 */ (unsigned char*)"\xc5", /* 0xc6 */ (unsigned char*)".\xce\xc0\xc5\xc8\xfb\xdb\xee\xd1\xe8\xf1\xe0", /* 0xc2 */ (unsigned char*)".", /* 0xdc */ (unsigned char*)".\xcb\xc9", /* 0xdb */ (unsigned char*)"\xc0\xe0\xcd.", /* 0xc7 */ (unsigned char*)"\xc5\xc8", /* 0xd8 */ (unsigned char*)"\xf2\xd2", /* 0xdd */ (unsigned char*)"\xc5", /* 0xd9 */ (unsigned char*)"\xc5\xd2\xf2\xc0\xc8", /* 0xd7 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_ISO88595[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 4711, 935, 2406, 896, 1917, 5075, 570, 969, /* 0xd0 */ 3824, 819, 2062, 2651, 1688, 3538, 5972, 1529, /* 0xd8 */ 2752, 2929, 3628, 1580, 0, 597, 244, 754, /* 0xe0 */ 500, 0, 0, 1284, 1202, 0, 418, 1262, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char LETTER_ISO88595[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 255, 255, 255, 255, 255, 255, 255, /* 0xa0 */ 255, 255, 255, 255, 255, 0, 255, 255, /* 0xa8 */ 33, 34, 53, 37, 35, 36, 52, 56, /* 0xb0 */ 39, 40, 41, 42, 43, 44, 45, 46, /* 0xb8 */ 48, 49, 50, 51, 255, 38, 255, 60, /* 0xc0 */ 57, 59, 255, 55, 54, 58, 32, 47, /* 0xc8 */ 2, 3, 24, 8, 5, 6, 23, 27, /* 0xd0 */ 10, 11, 12, 13, 14, 15, 16, 17, /* 0xd8 */ 19, 20, 21, 22, 7, 9, 4, 31, /* 0xe0 */ 28, 30, 255, 26, 25, 29, 1, 18, /* 0xe8 */ 0, 255, 255, 255, 255, 255, 255, 255, /* 0xf0 */ 255, 255, 255, 255, 255, 0, 255, 255, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char *PAIR_ISO88595[] = { (unsigned char*)"\xdf\xe1\xdd\xd2\xde\xd8\xe2\xda\xd4\xd1\xdc\xb2\xbd\xbf\xd7\xe0\xc1\xe7\xe3\xd3\xbe\xba\xb8\xc2\xdb\xbc\xb4\xd5\xb0\xed\xef\xc0\xb1\xd6\xd0\xb3\xb7\xcf\xc7\xe5\xc3\xcd\xbb\xe8\xb5\xc5\xe4\xb6\xc4\xe6\xc8", /* FILLCHAR */ (unsigned char*)".\xe2\xd4\xe9\xd1", /* 0xee */ (unsigned char*)".\xdb\xe2\xda\xdd\xd7\xe1\xdc\xd2\xe0\xd4\xef\xd5\xee\xd6\xe8\xe5\xd9\xd1\xe7\xdf\xd3\xe3\xe9\xe6", /* 0xd0 */ (unsigned char*)"\xeb\xde\xd5\xe0\xe3\xd0\xd8\xdb\xef.\xdd", /* 0xd1 */ (unsigned char*)"\xd5\xd8\xd0.\xde", /* 0xe6 */ (unsigned char*)"\xd5\xd0\xde\xd8\xe3\xdd\xe0.\xd2\xeb\xec\xdb\xef\xe1\xda\xe6", /* 0xd4 */ (unsigned char*)".\xdd\xe0\xdb\xe2\xe1\xdc\xd3\xd4\xd9\xda\xd2\xd7\xd1\xe7\xd5\xdf\xe8\xd6\xe9\xe5\xe6\xde", /* 0xd5 */ (unsigned char*)"\xde\xd8", /* 0xe4 */ (unsigned char*)"\xde\xd0\xdb\xe0\xd4\xd8.\xe3\xdd\xd5", /* 0xd3 */ (unsigned char*)".\xde\xd0\xd8\xdd", /* 0xe5 */ (unsigned char*)".\xdb\xe2\xdd\xda\xdc\xe1\xd2\xd7\xd5\xe5\xd4\xe7\xd9\xef\xe0\xe6\xd3\xd8\xe8\xd1\xde\xd6\xdf\xd0\xee", /* 0xd8 */ (unsigned char*)".\xe1\xe2\xdd\xe7\xd4", /* 0xd9 */ (unsigned char*)"\xd0\xde.\xd8\xe3\xe0\xe2\xdb\xe1\xd5\xdd", /* 0xda */ (unsigned char*)".\xd8\xde\xd0\xd5\xec\xe1\xef\xe3\xee\xeb\xda\xdd\xdb", /* 0xdb */ (unsigned char*)".\xde\xd5\xd0\xd8\xe3\xdd\xeb\xef", /* 0xdc */ (unsigned char*)"\xd0\xde\xd5\xd8.\xeb\xe3\xdd\xef\xec\xe2\xd4\xe1\xda\xe6", /* 0xdd */ (unsigned char*)".\xd2\xe0\xe2\xdb\xe1\xdd\xdc\xd4\xd3\xd9\xd1\xda\xd6\xe7\xd5\xdf\xd7\xe8\xd8\xef\xe5\xde\xe9\xee", /* 0xde */ (unsigned char*)"\xde\xe0\xd5\xd0\xd8\xdb\xe3\xeb\xef", /* 0xdf */ (unsigned char*)".\xe2\xdb\xd4\xdd\xe1\xdc\xd2\xd7\xe9", /* 0xef */ (unsigned char*)"\xde\xd0\xd5\xd8\xe3.\xeb\xdd\xef\xe2\xec\xd2\xdc\xd4\xda\xd6\xe1\xee", /* 0xe0 */ (unsigned char*)"\xe2\xef\xda\xd5.\xec\xde\xdb\xd8\xdf\xd0\xdd\xd2\xdc\xe1\xe3\xeb\xe7", /* 0xe1 */ (unsigned char*)"\xde.\xd0\xd5\xec\xd8\xe0\xd2\xeb\xe3\xe1\xdd\xda\xef\xdb", /* 0xe2 */ (unsigned char*)".\xdb\xd4\xe2\xe1\xdc\xd6\xd3\xee\xe7\xe0\xda\xd1\xdf\xe8\xd2\xdd\xe5\xd7\xe9", /* 0xe3 */ (unsigned char*)"\xd5\xd8\xd0\xdd\xd4.\xe3", /* 0xd6 */ (unsigned char*)"\xd0\xde.\xd5\xd8\xeb\xe1\xdd\xe0\xe3\xdb\xe8\xd7\xe2\xd4\xef\xda", /* 0xd2 */ (unsigned char*)".\xdd\xda\xe1\xe8\xd5\xee\xef", /* 0xec */ (unsigned char*)".\xdb\xd9\xd5\xdc\xe5\xd2\xe2\xe1\xe8\xe0\xd1", /* 0xeb */ (unsigned char*)"\xd0\xdd.\xd4\xd2\xde\xd8\xd5\xe3\xeb\xdc\xe0\xef\xd3\xdb", /* 0xd7 */ (unsigned char*)"\xd5\xd8\xd0\xec\xda\xdb\xdd\xde\xe3", /* 0xe8 */ (unsigned char*)"\xe2", /* 0xed */ (unsigned char*)"\xd5\xd8\xd0", /* 0xe9 */ (unsigned char*)"\xd5\xe2\xd0\xd8\xdd\xe3\xda.\xec", /* 0xe7 */ (unsigned char*)".", /* 0xce */ (unsigned char*)".\xbb\xc2\xba\xbd\xb7\xb2\xc1\xbc\xc0\xcf\xb4\xdd", /* 0xb0 */ (unsigned char*)"\xcb\xbe\xb5", /* 0xb1 */ (unsigned char*)"\xb5\xb0\xbe\xd0\xb8\xc3.\xde\xbd", /* 0xb4 */ (unsigned char*)".\xc0\xbd\xbb\xc2\xc1\xbc\xb4\xb3\xb2\xb9\xb1", /* 0xb5 */ (unsigned char*)"\xbe\xde", /* 0xb3 */ (unsigned char*)".\xbe", /* 0xc5 */ (unsigned char*)".\xbb\xc2\xbd\xc1\xba\xbc\xb2\xb4\xb5\xb7\xc7", /* 0xb8 */ (unsigned char*)".", /* 0xb9 */ (unsigned char*)"\xb0\xbe.\xb8\xd0\xde\xc3\xc0", /* 0xba */ (unsigned char*)".\xb8\xbe\xb0\xb5\xcc\xc1", /* 0xbb */ (unsigned char*)".\xd0\xb5\xbe\xb0\xb8\xc3\xde\xbd", /* 0xbc */ (unsigned char*)"\xb5\xb0\xbe\xb8\xd5.\xd0\xcb\xc3\xde\xbd\xe3\xcf", /* 0xbd */ (unsigned char*)".\xb2\xdd\xc2\xbd\xc1\xbb\xc0\xbc\xb4\xb3\xb9\xb1\xb6\xb5\xba\xc7\xbf", /* 0xbe */ (unsigned char*)"\xbe\xc0\xde\xe0\xb5\xd0\xb0", /* 0xbf */ (unsigned char*)".\xc2", /* 0xcf */ (unsigned char*)"\xbe\xb0\xb5\xb8\xc3.\xe3\xd0", /* 0xc0 */ (unsigned char*)"\xc2.\xcf\xba\xb5\xcc\xbb\xbe\xbf\xe2\xb8\xda", /* 0xc1 */ (unsigned char*)"\xbe.\xb0\xcc\xb5\xb8\xc0\xde\xb2\xd0\xcb\xc3", /* 0xc2 */ (unsigned char*)".\xb4\xbb\xc2", /* 0xc3 */ (unsigned char*)"\xb5", /* 0xb6 */ (unsigned char*)".\xbe\xb0\xb5\xb8\xeb\xcb\xde\xc1\xd8\xe1\xd0", /* 0xb2 */ (unsigned char*)".", /* 0xcc */ (unsigned char*)".\xbb\xb9", /* 0xcb */ (unsigned char*)"\xb0\xd0\xbd.", /* 0xb7 */ (unsigned char*)"\xb5\xb8", /* 0xc8 */ (unsigned char*)"\xe2\xc2", /* 0xcd */ (unsigned char*)"\xb5", /* 0xc9 */ (unsigned char*)"\xb5\xc2\xe2\xb0\xb8", /* 0xc7 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_IBM866[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 4711, 935, 2406, 896, 1917, 5075, 570, 969, /* 0xa0 */ 3824, 819, 2062, 2651, 1688, 3538, 5972, 1529, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 2752, 2929, 3628, 1580, 0, 597, 244, 754, /* 0xe0 */ 500, 0, 0, 1284, 1202, 0, 418, 1262, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char LETTER_IBM866[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 33, 34, 53, 37, 35, 36, 52, 56, /* 0x80 */ 39, 40, 41, 42, 43, 44, 45, 46, /* 0x88 */ 48, 49, 50, 51, 255, 38, 255, 60, /* 0x90 */ 57, 59, 255, 55, 54, 58, 32, 47, /* 0x98 */ 2, 3, 24, 8, 5, 6, 23, 27, /* 0xa0 */ 10, 11, 12, 13, 14, 15, 16, 17, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 19, 20, 21, 22, 7, 9, 4, 31, /* 0xe0 */ 28, 30, 255, 26, 25, 29, 1, 18, /* 0xe8 */ 255, 255, 255, 255, 255, 255, 255, 255, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char *PAIR_IBM866[] = { (unsigned char*)"\xaf\xe1\xad\xa2\xae\xa8\xe2\xaa\xa4\xa1\xac\x82\x8d\x8f\xa7\xe0\x91\xe7\xe3\xa3\x8e\x8a\x88\x92\xab\x8c\x84\xa5\x80\xed\xef\x90\x81\xa6\xa0\x83\x87\x9f\x97\xe5\x93\x9d\x8b\xe8\x85\x95\xe4\x86\x94\xe6\x98", /* FILLCHAR */ (unsigned char*)".\xe2\xa4\xe9\xa1", /* 0xee */ (unsigned char*)".\xab\xe2\xaa\xad\xa7\xe1\xac\xa2\xe0\xa4\xef\xa5\xee\xa6\xe8\xe5\xa9\xa1\xe7\xaf\xa3\xe3\xe9\xe6", /* 0xa0 */ (unsigned char*)"\xeb\xae\xa5\xe0\xe3\xa0\xa8\xab\xef.\xad", /* 0xa1 */ (unsigned char*)"\xa5\xa8\xa0.\xae", /* 0xe6 */ (unsigned char*)"\xa5\xa0\xae\xa8\xe3\xad\xe0.\xa2\xeb\xec\xab\xef\xe1\xaa\xe6", /* 0xa4 */ (unsigned char*)".\xad\xe0\xab\xe2\xe1\xac\xa3\xa4\xa9\xaa\xa2\xa7\xa1\xe7\xa5\xaf\xe8\xa6\xe9\xe5\xe6\xae", /* 0xa5 */ (unsigned char*)"\xae\xa8", /* 0xe4 */ (unsigned char*)"\xae\xa0\xab\xe0\xa4\xa8.\xe3\xad\xa5", /* 0xa3 */ (unsigned char*)".\xae\xa0\xa8\xad", /* 0xe5 */ (unsigned char*)".\xab\xe2\xad\xaa\xac\xe1\xa2\xa7\xa5\xe5\xa4\xe7\xa9\xef\xe0\xe6\xa3\xa8\xe8\xa1\xae\xa6\xaf\xa0\xee", /* 0xa8 */ (unsigned char*)".\xe1\xe2\xad\xe7\xa4", /* 0xa9 */ (unsigned char*)"\xa0\xae.\xa8\xe3\xe0\xe2\xab\xe1\xa5\xad", /* 0xaa */ (unsigned char*)".\xa8\xae\xa0\xa5\xec\xe1\xef\xe3\xee\xeb\xaa\xad\xab", /* 0xab */ (unsigned char*)".\xae\xa5\xa0\xa8\xe3\xad\xeb\xef", /* 0xac */ (unsigned char*)"\xa0\xae\xa5\xa8.\xeb\xe3\xad\xef\xec\xe2\xa4\xe1\xaa\xe6", /* 0xad */ (unsigned char*)".\xa2\xe0\xe2\xab\xe1\xad\xac\xa4\xa3\xa9\xa1\xaa\xa6\xe7\xa5\xaf\xa7\xe8\xa8\xef\xe5\xae\xe9\xee", /* 0xae */ (unsigned char*)"\xae\xe0\xa5\xa0\xa8\xab\xe3\xeb\xef", /* 0xaf */ (unsigned char*)".\xe2\xab\xa4\xad\xe1\xac\xa2\xa7\xe9", /* 0xef */ (unsigned char*)"\xae\xa0\xa5\xa8\xe3.\xeb\xad\xef\xe2\xec\xa2\xac\xa4\xaa\xa6\xe1\xee", /* 0xe0 */ (unsigned char*)"\xe2\xef\xaa\xa5.\xec\xae\xab\xa8\xaf\xa0\xad\xa2\xac\xe1\xe3\xeb\xe7", /* 0xe1 */ (unsigned char*)"\xae.\xa0\xa5\xec\xa8\xe0\xa2\xeb\xe3\xe1\xad\xaa\xef\xab", /* 0xe2 */ (unsigned char*)".\xab\xa4\xe2\xe1\xac\xa6\xa3\xee\xe7\xe0\xaa\xa1\xaf\xe8\xa2\xad\xe5\xa7\xe9", /* 0xe3 */ (unsigned char*)"\xa5\xa8\xa0\xad\xa4.\xe3", /* 0xa6 */ (unsigned char*)"\xa0\xae.\xa5\xa8\xeb\xe1\xad\xe0\xe3\xab\xe8\xa7\xe2\xa4\xef\xaa", /* 0xa2 */ (unsigned char*)".\xad\xaa\xe1\xe8\xa5\xee\xef", /* 0xec */ (unsigned char*)".\xab\xa9\xa5\xac\xe5\xa2\xe2\xe1\xe8\xe0\xa1", /* 0xeb */ (unsigned char*)"\xa0\xad.\xa4\xa2\xae\xa8\xa5\xe3\xeb\xac\xe0\xef\xa3\xab", /* 0xa7 */ (unsigned char*)"\xa5\xa8\xa0\xec\xaa\xab\xad\xae\xe3", /* 0xe8 */ (unsigned char*)"\xe2", /* 0xed */ (unsigned char*)"\xa5\xa8\xa0", /* 0xe9 */ (unsigned char*)"\xa5\xe2\xa0\xa8\xad\xe3\xaa.\xec", /* 0xe7 */ (unsigned char*)".", /* 0x9e */ (unsigned char*)".\x8b\x92\x8a\x8d\x87\x82\x91\x8c\x90\x9f\x84\xad", /* 0x80 */ (unsigned char*)"\x9b\x8e\x85", /* 0x81 */ (unsigned char*)"\x85\x80\x8e\xa0\x88\x93.\xae\x8d", /* 0x84 */ (unsigned char*)".\x90\x8d\x8b\x92\x91\x8c\x84\x83\x82\x89\x81", /* 0x85 */ (unsigned char*)"\x8e\xae", /* 0x83 */ (unsigned char*)".\x8e", /* 0x95 */ (unsigned char*)".\x8b\x92\x8d\x91\x8a\x8c\x82\x84\x85\x87\x97", /* 0x88 */ (unsigned char*)".", /* 0x89 */ (unsigned char*)"\x80\x8e.\x88\xa0\xae\x93\x90", /* 0x8a */ (unsigned char*)".\x88\x8e\x80\x85\x9c\x91", /* 0x8b */ (unsigned char*)".\xa0\x85\x8e\x80\x88\x93\xae\x8d", /* 0x8c */ (unsigned char*)"\x85\x80\x8e\x88\xa5.\xa0\x9b\x93\xae\x8d\xe3\x9f", /* 0x8d */ (unsigned char*)".\x82\xad\x92\x8d\x91\x8b\x90\x8c\x84\x83\x89\x81\x86\x85\x8a\x97\x8f", /* 0x8e */ (unsigned char*)"\x8e\x90\xae\xe0\x85\xa0\x80", /* 0x8f */ (unsigned char*)".\x92", /* 0x9f */ (unsigned char*)"\x8e\x80\x85\x88\x93.\xe3\xa0", /* 0x90 */ (unsigned char*)"\x92.\x9f\x8a\x85\x9c\x8b\x8e\x8f\xe2\x88\xaa", /* 0x91 */ (unsigned char*)"\x8e.\x80\x9c\x85\x88\x90\xae\x82\xa0\x9b\x93", /* 0x92 */ (unsigned char*)".\x84\x8b\x92", /* 0x93 */ (unsigned char*)"\x85", /* 0x86 */ (unsigned char*)".\x8e\x80\x85\x88\xeb\x9b\xae\x91\xa8\xe1\xa0", /* 0x82 */ (unsigned char*)".", /* 0x9c */ (unsigned char*)".\x8b\x89", /* 0x9b */ (unsigned char*)"\x80\xa0\x8d.", /* 0x87 */ (unsigned char*)"\x85\x88", /* 0x98 */ (unsigned char*)"\xe2\x92", /* 0x9d */ (unsigned char*)"\x85", /* 0x99 */ (unsigned char*)"\x85\x92\xe2\x80\x88", /* 0x97 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_MACCYR[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 1262, /* 0xd8 */ 4711, 935, 2406, 896, 1917, 5075, 570, 969, /* 0xe0 */ 3824, 819, 2062, 2651, 1688, 3538, 5972, 1529, /* 0xe8 */ 2752, 2929, 3628, 1580, 0, 597, 244, 754, /* 0xf0 */ 500, 0, 0, 1284, 1202, 0, 418, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char LETTER_MACCYR[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 33, 34, 53, 37, 35, 36, 52, 56, /* 0x80 */ 39, 40, 41, 42, 43, 44, 45, 46, /* 0x88 */ 48, 49, 50, 51, 255, 38, 255, 60, /* 0x90 */ 57, 59, 255, 55, 54, 58, 32, 47, /* 0x98 */ 0, 0, 255, 0, 0, 0, 0, 255, /* 0xa0 */ 0, 0, 0, 255, 255, 0, 255, 255, /* 0xa8 */ 0, 0, 0, 0, 255, 0, 255, 255, /* 0xb0 */ 255, 255, 255, 255, 255, 255, 255, 255, /* 0xb8 */ 255, 255, 0, 0, 255, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 255, 255, 255, 255, 255, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 255, 255, 255, 255, 0, 255, 255, 18, /* 0xd8 */ 2, 3, 24, 8, 5, 6, 23, 27, /* 0xe0 */ 10, 11, 12, 13, 14, 15, 16, 17, /* 0xe8 */ 19, 20, 21, 22, 7, 9, 4, 31, /* 0xf0 */ 28, 30, 255, 26, 25, 29, 1, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char *PAIR_MACCYR[] = { (unsigned char*)"\xef\xf1\xed\xe2\xee\xe8\xf2\xea\xe4\xe1\xec\x82\x8d\x8f\xe7\xf0\x91\xf7\xf3\xe3\x8e\x8a\x88\x92\xeb\x8c\x84\xe5\x80\xfd\xdf\x90\x81\xe6\xe0\x83\x87\x9f\x97\xf5\x93\x9d\x8b\xf8\x85\x95\xf4\x86\x94\xf6\x98", /* FILLCHAR */ (unsigned char*)".\xf2\xe4\xf9\xe1", /* 0xfe */ (unsigned char*)".\xeb\xf2\xea\xed\xe7\xf1\xec\xe2\xf0\xe4\xdf\xe5\xfe\xe6\xf8\xf5\xe9\xe1\xf7\xef\xe3\xf3\xf9\xf6", /* 0xe0 */ (unsigned char*)"\xfb\xee\xe5\xf0\xf3\xe0\xe8\xeb\xdf.\xed", /* 0xe1 */ (unsigned char*)"\xe5\xe8\xe0.\xee", /* 0xf6 */ (unsigned char*)"\xe5\xe0\xee\xe8\xf3\xed\xf0.\xe2\xfb\xfc\xeb\xdf\xf1\xea\xf6", /* 0xe4 */ (unsigned char*)".\xed\xf0\xeb\xf2\xf1\xec\xe3\xe4\xe9\xea\xe2\xe7\xe1\xf7\xe5\xef\xf8\xe6\xf9\xf5\xf6\xee", /* 0xe5 */ (unsigned char*)"\xee\xe8", /* 0xf4 */ (unsigned char*)"\xee\xe0\xeb\xf0\xe4\xe8.\xf3\xed\xe5", /* 0xe3 */ (unsigned char*)".\xee\xe0\xe8\xed", /* 0xf5 */ (unsigned char*)".\xeb\xf2\xed\xea\xec\xf1\xe2\xe7\xe5\xf5\xe4\xf7\xe9\xdf\xf0\xf6\xe3\xe8\xf8\xe1\xee\xe6\xef\xe0\xfe", /* 0xe8 */ (unsigned char*)".\xf1\xf2\xed\xf7\xe4", /* 0xe9 */ (unsigned char*)"\xe0\xee.\xe8\xf3\xf0\xf2\xeb\xf1\xe5\xed", /* 0xea */ (unsigned char*)".\xe8\xee\xe0\xe5\xfc\xf1\xdf\xf3\xfe\xfb\xea\xed\xeb", /* 0xeb */ (unsigned char*)".\xee\xe5\xe0\xe8\xf3\xed\xfb\xdf", /* 0xec */ (unsigned char*)"\xe0\xee\xe5\xe8.\xfb\xf3\xed\xdf\xfc\xf2\xe4\xf1\xea\xf6", /* 0xed */ (unsigned char*)".\xe2\xf0\xf2\xeb\xf1\xed\xec\xe4\xe3\xe9\xe1\xea\xe6\xf7\xe5\xef\xe7\xf8\xe8\xdf\xf5\xee\xf9\xfe", /* 0xee */ (unsigned char*)"\xee\xf0\xe5\xe0\xe8\xeb\xf3\xfb\xdf", /* 0xef */ (unsigned char*)".\xf2\xeb\xe4\xed\xf1\xec\xe2\xe7\xf9", /* 0xdf */ (unsigned char*)"\xee\xe0\xe5\xe8\xf3.\xfb\xed\xdf\xf2\xfc\xe2\xec\xe4\xea\xe6\xf1\xfe", /* 0xf0 */ (unsigned char*)"\xf2\xdf\xea\xe5.\xfc\xee\xeb\xe8\xef\xe0\xed\xe2\xec\xf1\xf3\xfb\xf7", /* 0xf1 */ (unsigned char*)"\xee.\xe0\xe5\xfc\xe8\xf0\xe2\xfb\xf3\xf1\xed\xea\xdf\xeb", /* 0xf2 */ (unsigned char*)".\xeb\xe4\xf2\xf1\xec\xe6\xe3\xfe\xf7\xf0\xea\xe1\xef\xf8\xe2\xed\xf5\xe7\xf9", /* 0xf3 */ (unsigned char*)"\xe5\xe8\xe0\xed\xe4.\xf3", /* 0xe6 */ (unsigned char*)"\xe0\xee.\xe5\xe8\xfb\xf1\xed\xf0\xf3\xeb\xf8\xe7\xf2\xe4\xdf\xea", /* 0xe2 */ (unsigned char*)".\xed\xea\xf1\xf8\xe5\xfe\xdf", /* 0xfc */ (unsigned char*)".\xeb\xe9\xe5\xec\xf5\xe2\xf2\xf1\xf8\xf0\xe1", /* 0xfb */ (unsigned char*)"\xe0\xed.\xe4\xe2\xee\xe8\xe5\xf3\xfb\xec\xf0\xdf\xe3\xeb", /* 0xe7 */ (unsigned char*)"\xe5\xe8\xe0\xfc\xea\xeb\xed\xee\xf3", /* 0xf8 */ (unsigned char*)"\xf2", /* 0xfd */ (unsigned char*)"\xe5\xe8\xe0", /* 0xf9 */ (unsigned char*)"\xe5\xf2\xe0\xe8\xed\xf3\xea.\xfc", /* 0xf7 */ (unsigned char*)".", /* 0x9e */ (unsigned char*)".\x8b\x92\x8a\x8d\x87\x82\x91\x8c\x90\x9f\x84\xed", /* 0x80 */ (unsigned char*)"\x9b\x8e\x85", /* 0x81 */ (unsigned char*)"\x85\x80\x8e\xe0\x88\x93.\xee\x8d", /* 0x84 */ (unsigned char*)".\x90\x8d\x8b\x92\x91\x8c\x84\x83\x82\x89\x81", /* 0x85 */ (unsigned char*)"\x8e\xee", /* 0x83 */ (unsigned char*)".\x8e", /* 0x95 */ (unsigned char*)".\x8b\x92\x8d\x91\x8a\x8c\x82\x84\x85\x87\x97", /* 0x88 */ (unsigned char*)".", /* 0x89 */ (unsigned char*)"\x80\x8e.\x88\xe0\xee\x93\x90", /* 0x8a */ (unsigned char*)".\x88\x8e\x80\x85\x9c\x91", /* 0x8b */ (unsigned char*)".\xe0\x85\x8e\x80\x88\x93\xee\x8d", /* 0x8c */ (unsigned char*)"\x85\x80\x8e\x88\xe5.\xe0\x9b\x93\xee\x8d\xf3\x9f", /* 0x8d */ (unsigned char*)".\x82\xed\x92\x8d\x91\x8b\x90\x8c\x84\x83\x89\x81\x86\x85\x8a\x97\x8f", /* 0x8e */ (unsigned char*)"\x8e\x90\xee\xf0\x85\xe0\x80", /* 0x8f */ (unsigned char*)".\x92", /* 0x9f */ (unsigned char*)"\x8e\x80\x85\x88\x93.\xf3\xe0", /* 0x90 */ (unsigned char*)"\x92.\x9f\x8a\x85\x9c\x8b\x8e\x8f\xf2\x88\xea", /* 0x91 */ (unsigned char*)"\x8e.\x80\x9c\x85\x88\x90\xee\x82\xe0\x9b\x93", /* 0x92 */ (unsigned char*)".\x84\x8b\x92", /* 0x93 */ (unsigned char*)"\x85", /* 0x86 */ (unsigned char*)".\x8e\x80\x85\x88\xfb\x9b\xee\x91\xe8\xf1\xe0", /* 0x82 */ (unsigned char*)".", /* 0x9c */ (unsigned char*)".\x8b\x89", /* 0x9b */ (unsigned char*)"\x80\xe0\x8d.", /* 0x87 */ (unsigned char*)"\x85\x88", /* 0x98 */ (unsigned char*)"\xf2\x92", /* 0x9d */ (unsigned char*)"\x85", /* 0x99 */ (unsigned char*)"\x85\x92\xf2\x80\x88", /* 0x97 */ }; /* THIS IS A GENERATED TABLE, see data/totals.pl. */ static const unsigned short int SIGNIFICANT[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 4711, 935, 2406, 896, 1917, 5075, 570, 969, /* 0xa0 */ 3824, 819, 2062, 2651, 1688, 3538, 5972, 1529, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 418, 4711, 935, 244, 1917, 5075, 0, 896, /* 0xc0 */ 597, 3824, 819, 2062, 2651, 1688, 3538, 5972, /* 0xc8 */ 6240, 2197, 5158, 3825, 5545, 6655, 1140, 3375, /* 0xd0 */ 5026, 2103, 3031, 3151, 1688, 3538, 6726, 2791, /* 0xd8 */ 14926, 7728, 12068, 4952, 3834, 11344, 1628, 3446, /* 0xe0 */ 8648, 1638, 4124, 7870, 5780, 7076, 12780, 5582, /* 0xe8 */ 5504, 5858, 7256, 3160, 0, 1194, 488, 1508, /* 0xf0 */ 1000, 0, 0, 2568, 2404, 0, 836, 1262, /* 0xf8 */ }; /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define WEIGHT_SUM 56712 /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const char *const CHARSET_NAMES[] = { "koi8r", "cp1251", "iso88595", "ibm866", "maccyr", }; /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const unsigned short int *const CHARSET_WEIGHTS[] = { RAW_KOI8R, RAW_CP1251, RAW_ISO88595, RAW_IBM866, RAW_MACCYR, }; /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const unsigned char *const CHARSET_LETTERS[] = { LETTER_KOI8R, LETTER_CP1251, LETTER_ISO88595, LETTER_IBM866, LETTER_MACCYR, }; /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const unsigned char **const CHARSET_PAIRS[] = { PAIR_KOI8R, PAIR_CP1251, PAIR_ISO88595, PAIR_IBM866, PAIR_MACCYR, }; /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define NCHARSETS 5 Project-OSS-Revival-enca-36defd7/data/slovak/000077500000000000000000000000001507545312400210165ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/data/slovak/cp1250.base000066400000000000000000000002251507545312400225630ustar00rootroot00000000000000 115 16 98 2984 2032 2996 33 1413 171 167 127 47 36 5864 254 3401 1955 3503 639 515 327 510 2386 2794 Project-OSS-Revival-enca-36defd7/data/slovak/doit.sh000077500000000000000000000001121507545312400223060ustar00rootroot00000000000000#! /bin/bash ../doit.sh cp1250 iso88592 ibm852 keybcs2 macce koi8cs2 cork Project-OSS-Revival-enca-36defd7/data/slovak/rawcounts.cp1250000066400000000000000000000025771507545312400237120ustar00rootroot000000000000001 . 1 9 . 201 10 . 23616 11 . 1 13 . 13008 21 . 1 32 113831 33 ! 530 34 " 28021 35 # 2569 37 % 1570 38 & 1912 39 ' 2040 40 ( 614 41 ) 614 42 * 64 43 + 115 44 , 5662 45 - 3732 46 . 11695 47 / 16782 48 0 19326 49 1 7045 50 2 5175 51 3 2695 52 4 2312 53 5 2269 54 6 1773 55 7 1126 56 8 2029 57 9 1670 58 : 2096 59 ; 2735 60 < 31532 61 = 29378 62 > 31538 63 ? 711 64 @ 2 65 A 4363 66 B 1671 67 C 1703 68 D 1624 69 E 4021 70 F 7397 71 G 878 72 H 1564 73 I 4131 74 J 819 75 K 727 76 L 1400 77 M 1912 78 N 3246 79 O 2089 80 P 3008 81 Q 31 82 R 2810 83 S 2527 84 T 5210 85 U 419 86 V 795 87 W 369 88 X 11 89 Y 329 90 Z 952 91 [ 1089 92 \ 12 93 ] 1089 95 _ 648 97 a 55954 98 b 20817 99 c 24135 100 d 33663 101 e 53988 102 f 8529 103 g 16023 104 h 17918 105 i 42125 106 j 6386 107 k 13990 108 l 38023 109 m 24196 110 n 38768 111 o 46286 112 p 27841 113 q 180 114 r 38766 115 s 32785 116 t 52644 117 u 12382 118 v 15540 119 w 7838 120 x 1790 121 y 7621 122 z 6971 123 { 140 124 | 16 125 } 140 126 ~ 1 132 160 133 51 138 115 141 16 142 98 145 7 146 5 147 182 148 39 150 77 154 2984 156 5 157 2032 158 2996 160 560 171 3 187 3 188 33 190 1413 193 171 200 167 201 127 205 6 207 8 211 1 218 47 221 2 224 36 225 5864 228 254 229 18 232 3401 233 1955 236 4 237 3503 239 639 242 515 243 327 244 510 246 5 248 3 250 2386 252 3 253 2794 Project-OSS-Revival-enca-36defd7/data/slovak/slovak.h000066400000000000000000000425341507545312400224760ustar00rootroot00000000000000/***** THIS IS A GENERATED FILE. DO NOT TOUCH! *****/ /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_CP1250[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 115, 0, 0, 16, 98, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 2984, 0, 0, 2032, 2996, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 33, 0, 1413, 0, /* 0xb8 */ 0, 171, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 167, 127, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 47, 0, 0, 0, 0, 0, /* 0xd8 */ 36, 5864, 0, 0, 254, 0, 0, 0, /* 0xe0 */ 3401, 1955, 0, 0, 0, 3503, 0, 639, /* 0xe8 */ 0, 0, 515, 327, 510, 0, 0, 0, /* 0xf0 */ 0, 0, 2386, 0, 0, 2794, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_ISO88592[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 33, 0, 0, /* 0xa0 */ 0, 115, 0, 16, 0, 0, 98, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 1413, 0, 0, /* 0xb0 */ 0, 2984, 0, 2032, 0, 0, 2996, 0, /* 0xb8 */ 0, 171, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 167, 127, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 47, 0, 0, 0, 0, 0, /* 0xd8 */ 36, 5864, 0, 0, 254, 0, 0, 0, /* 0xe0 */ 3401, 1955, 0, 0, 0, 3503, 0, 639, /* 0xe8 */ 0, 0, 515, 327, 510, 0, 0, 0, /* 0xf0 */ 0, 0, 2386, 0, 0, 2794, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_IBM852[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 1955, 0, 254, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 127, 0, 0, 510, 0, 33, 1413, 0, /* 0x90 */ 0, 0, 0, 16, 2032, 0, 0, 3401, /* 0x98 */ 5864, 3503, 327, 2386, 0, 0, 98, 2996, /* 0xa0 */ 0, 0, 0, 0, 167, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 171, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 639, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 0, 0, 0, 0, 515, 115, 2984, /* 0xe0 */ 0, 47, 36, 0, 2794, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_KEYBCS2[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 167, 0, 1955, 639, 254, 0, 16, 3401, /* 0x80 */ 0, 0, 0, 0, 1413, 0, 0, 171, /* 0x88 */ 127, 2996, 98, 510, 0, 0, 0, 47, /* 0x90 */ 2794, 0, 0, 115, 33, 0, 0, 2032, /* 0x98 */ 5864, 3503, 327, 2386, 515, 0, 0, 0, /* 0xa0 */ 2984, 0, 36, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_MACCE[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 127, 0, 0, 0, 5864, /* 0x80 */ 0, 167, 254, 3401, 0, 0, 1955, 0, /* 0x88 */ 0, 0, 3503, 639, 0, 0, 0, 327, /* 0x90 */ 0, 510, 0, 0, 2386, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 33, 1413, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 515, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 36, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 115, 0, 0, 2984, 0, 0, 171, /* 0xe0 */ 16, 2032, 0, 98, 2996, 0, 0, 0, /* 0xe8 */ 0, 0, 47, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 2794, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_KOI8CS2[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 5864, 0, 3401, 639, 0, 36, 0, /* 0xc0 */ 0, 3503, 0, 0, 1413, 0, 515, 327, /* 0xc8 */ 510, 254, 0, 2984, 2032, 2386, 0, 1955, /* 0xd0 */ 0, 2794, 2996, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 171, 0, 167, 0, 0, 0, 0, /* 0xe0 */ 0, 0, 0, 0, 33, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 115, 16, 47, 0, 127, /* 0xf0 */ 0, 0, 98, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_CORK[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 167, 0, 0, 0, 0, /* 0x80 */ 0, 33, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 115, 0, 16, 0, 0, 0, /* 0x90 */ 0, 0, 98, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 3401, 639, 0, 0, 0, /* 0xa0 */ 0, 1413, 0, 0, 515, 0, 0, 36, /* 0xa8 */ 0, 0, 2984, 0, 2032, 0, 0, 0, /* 0xb0 */ 0, 0, 2996, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 171, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 127, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 47, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 5864, 0, 0, 254, 0, 0, 0, /* 0xe0 */ 0, 1955, 0, 0, 0, 3503, 0, 0, /* 0xe8 */ 0, 0, 0, 327, 510, 0, 0, 0, /* 0xf0 */ 0, 0, 2386, 0, 0, 2794, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/totals.pl. */ static const unsigned short int SIGNIFICANT[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 167, 0, 3910, 933, 508, 0, 16, 9265, /* 0x80 */ 0, 200, 369, 3401, 1413, 16, 2053, 171, /* 0x88 */ 254, 2996, 3716, 1659, 16, 33, 1413, 374, /* 0x90 */ 2794, 510, 3082, 131, 4451, 2032, 2996, 5433, /* 0x98 */ 11728, 7006, 654, 8173, 1154, 33, 98, 2996, /* 0xa0 */ 2984, 1528, 36, 16, 682, 0, 98, 36, /* 0xa8 */ 0, 0, 2984, 0, 2032, 1584, 0, 0, /* 0xb0 */ 0, 2984, 2996, 2065, 1446, 0, 4409, 0, /* 0xb8 */ 0, 6377, 0, 3401, 639, 0, 36, 0, /* 0xc0 */ 334, 3884, 0, 515, 1413, 0, 515, 327, /* 0xc8 */ 510, 254, 0, 2984, 2671, 2386, 0, 1955, /* 0xd0 */ 0, 2794, 3173, 0, 0, 0, 0, 0, /* 0xd8 */ 72, 17878, 0, 167, 3746, 515, 115, 3155, /* 0xe0 */ 6818, 7944, 36, 98, 5823, 10509, 0, 1278, /* 0xe8 */ 0, 0, 1077, 1096, 1546, 47, 0, 127, /* 0xf0 */ 0, 2794, 7256, 0, 0, 8382, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define WEIGHT_SUM 32383 /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const char *const CHARSET_NAMES[] = { "cp1250", "iso88592", "ibm852", "keybcs2", "macce", "koi8cs2", "cork", }; /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const unsigned short int *const CHARSET_WEIGHTS[] = { RAW_CP1250, RAW_ISO88592, RAW_IBM852, RAW_KEYBCS2, RAW_MACCE, RAW_KOI8CS2, RAW_CORK, }; /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define CHARSET_LETTERS NULL /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define CHARSET_PAIRS NULL /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define NCHARSETS 7 Project-OSS-Revival-enca-36defd7/data/slovene/000077500000000000000000000000001507545312400211725ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/data/slovene/doit.sh000077500000000000000000000000721507545312400224670ustar00rootroot00000000000000#! /bin/bash ../doit.sh iso88592 cp1250 ibm852 macce cork Project-OSS-Revival-enca-36defd7/data/slovene/iso88592.base000066400000000000000000000000461507545312400232400ustar00rootroot00000000000000 162 96 4575 3045 214 5282 Project-OSS-Revival-enca-36defd7/data/slovene/rawcounts.iso88592000066400000000000000000000021311507545312400243500ustar00rootroot000000000000000x0a . 73238 0x0d . 13 0x20 559750 0x21 ! 8749 0x22 " 23311 0x23 # 14 0x25 % 1 0x26 & 2356 0x27 ' 312 0x28 ( 99 0x29 ) 100 0x2a * 179 0x2c , 54871 0x2d - 4155 0x2e . 45853 0x2f / 699 0x30 0 103 0x31 1 220 0x32 2 238 0x33 3 158 0x34 4 56 0x35 5 57 0x36 6 51 0x37 7 43 0x38 8 54 0x39 9 89 0x3a : 3177 0x3b ; 4195 0x3c < 20344 0x3d = 127 0x3e > 20344 0x3f ? 4268 0x40 @ 17 0x41 A 4497 0x42 B 3268 0x43 C 580 0x44 D 2738 0x45 E 1176 0x46 F 421 0x47 G 1781 0x48 H 1186 0x49 I 3306 0x4a J 2908 0x4b K 5995 0x4c L 3096 0x4d M 4254 0x4e N 5846 0x4f O 2643 0x50 P 12740 0x51 Q 17 0x52 R 2490 0x53 S 5530 0x54 T 6824 0x55 U 792 0x56 V 4574 0x57 W 91 0x58 X 63 0x59 Y 12 0x5a Z 3481 0x61 a 284926 0x62 b 49050 0x63 c 27041 0x64 d 91270 0x65 e 293898 0x66 f 1750 0x67 g 44249 0x68 h 25325 0x69 i 236489 0x6a j 127904 0x6b k 93275 0x6c l 143879 0x6d m 85266 0x6e n 161380 0x6f o 245743 0x70 p 96380 0x71 q 1995 0x72 r 134535 0x73 s 128693 0x74 t 107825 0x75 u 53301 0x76 v 95942 0x77 w 34 0x78 x 3 0x79 y 1084 0x7a z 53788 0x7c | 19 0x7d } 2 0x82 1 0xa9 976 0xae 580 0xb9 27453 0xbe 18270 0xc8 1286 0xe8 31697 Project-OSS-Revival-enca-36defd7/data/slovene/slovene.h000066400000000000000000000323141507545312400230210ustar00rootroot00000000000000/***** THIS IS A GENERATED FILE. DO NOT TOUCH! *****/ /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_ISO88592[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 162, 0, 0, 0, 0, 96, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 4575, 0, 0, 0, 0, 3045, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 214, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe0 */ 5282, 0, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_CP1250[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 162, 0, 0, 0, 96, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 4575, 0, 0, 0, 3045, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 214, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe0 */ 5282, 0, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_IBM852[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 5282, /* 0x98 */ 0, 0, 0, 0, 0, 0, 96, 3045, /* 0xa0 */ 0, 0, 0, 0, 214, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 0, 0, 0, 0, 0, 162, 4575, /* 0xe0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_MACCE[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 214, 0, 5282, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 162, 0, 0, 4575, 0, 0, 0, /* 0xe0 */ 0, 0, 0, 96, 3045, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_CORK[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 214, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 162, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 96, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 5282, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 4575, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 3045, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/totals.pl. */ static const unsigned short int SIGNIFICANT[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 214, 0, 0, 0, 0, /* 0x80 */ 0, 214, 162, 5282, 0, 0, 96, 0, /* 0x88 */ 0, 0, 162, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 4671, 0, 0, 0, 3045, 5282, /* 0x98 */ 0, 0, 0, 5282, 0, 0, 96, 3045, /* 0xa0 */ 0, 162, 0, 0, 214, 0, 96, 0, /* 0xa8 */ 0, 0, 4575, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 4575, 3045, 0, 0, 0, 3045, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 428, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 0, 162, 0, 0, 4575, 0, 162, 4575, /* 0xe0 */ 10564, 0, 0, 96, 3045, 0, 0, 0, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define WEIGHT_SUM 13374 /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const char *const CHARSET_NAMES[] = { "iso88592", "cp1250", "ibm852", "macce", "cork", }; /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const unsigned short int *const CHARSET_WEIGHTS[] = { RAW_ISO88592, RAW_CP1250, RAW_IBM852, RAW_MACCE, RAW_CORK, }; /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define CHARSET_LETTERS NULL /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define CHARSET_PAIRS NULL /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define NCHARSETS 5 Project-OSS-Revival-enca-36defd7/data/totals.pl000077500000000000000000000046161507545312400213740ustar00rootroot00000000000000#!/usr/bin/perl use warnings; use strict; my ($total, @significant); @significant = ( 0 ) x 0x100; foreach my $name (@ARGV) { open FH, "<$name.c"; local $/ = undef; my $file = ; close FH; $file =~ s/\/\*.*?\*\///sg; $file =~ s/^[[:space:]]*[[:alnum:]_ ]+\[\] = {[[:space:]]*//s; $file =~ s/,[[:space:]]}[[:space:]]*;[[:space:]]*$//s; my @data = split /[[:space:],]+/, $file; my $w = 0; for (my $i = 0; $i < 0x100; $i++) { $w += $data[$i]; $significant[$i] += $data[$i]; } die "$name: $w (expecting $total)\n" if defined $total && $total != $w; $total = $w; } open FH, ">totals.c"; print FH "/* THIS IS A GENERATED TABLE, see data/totals.pl. */\n"; print FH "static const unsigned short int SIGNIFICANT[] = {\n"; for (my $i = 0; $i < 0x100; $i++) { if ($i % 8 == 0) { printf FH " "; } printf FH "%5u", $significant[$i]; if ($i % 8 == 7) { printf FH ", /* 0x%02x */\n", $i-7; } else { print FH ", "; } } print FH "};\n\n"; print FH "/* THIS IS A GENERATED VALUE, see data/totals.pl */\n"; print FH "#define WEIGHT_SUM $total\n\n"; print FH "/* THIS IS A GENERATED TABLE, see data/totals.pl */\n"; print FH "static const char *const CHARSET_NAMES[] = {\n"; foreach my $name (@ARGV) { print FH " \"$name\",\n"; } print FH "};\n\n"; print FH "/* THIS IS A GENERATED TABLE, see data/totals.pl */\n"; print FH "static const unsigned short int *const CHARSET_WEIGHTS[] = {\n"; foreach my $name (@ARGV) { my $raw = "RAW_" . uc $name; print FH " $raw,\n"; } print FH "};\n\n"; if (<*.p.c>) { print FH "/* THIS IS A GENERATED TABLE, see data/totals.pl */\n"; print FH "static const unsigned char *const CHARSET_LETTERS[] = {\n"; foreach my $name (@ARGV) { my $raw = "LETTER_" . uc $name; print FH " $raw,\n"; } print FH "};\n\n"; print FH "/* THIS IS A GENERATED TABLE, see data/totals.pl */\n"; print FH "static const unsigned char **const CHARSET_PAIRS[] = {\n"; foreach my $name (@ARGV) { my $raw = "PAIR_" . uc $name; print FH " $raw,\n"; } print FH "};\n\n"; } else { print FH "/* THIS IS A GENERATED VALUE, see data/totals.pl */\n"; print FH "#define CHARSET_LETTERS NULL\n\n"; print FH "/* THIS IS A GENERATED VALUE, see data/totals.pl */\n"; print FH "#define CHARSET_PAIRS NULL\n\n"; } print FH "/* THIS IS A GENERATED VALUE, see data/totals.pl */\n"; print FH "#define NCHARSETS " . ($#ARGV + 1) . "\n"; close FH; Project-OSS-Revival-enca-36defd7/data/ukrainian/000077500000000000000000000000001507545312400215005ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/data/ukrainian/cp1251.base000066400000000000000000000003231507545312400232450ustar00rootroot00000000000000 3416 587 274 254 5321 774 3238 922 1857 3140 485 1219 3981 688 2410 2105 1772 4802 5884 1587 3331 2738 3518 1924 275 596 507 762 362 1116 424 1401 Project-OSS-Revival-enca-36defd7/data/ukrainian/doit.sh000077500000000000000000000001031507545312400227700ustar00rootroot00000000000000#! /bin/bash ../doit.sh cp1251 ibm855 iso88595 cp1125 koi8u maccyr Project-OSS-Revival-enca-36defd7/data/ukrainian/paircounts.cp1251000066400000000000000000000011161507545312400245230ustar00rootroot00000000000000.:ѿպ :. :. :. :. :. : :. : : : : : : : : : : : :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. : :. :. : :. :. :. Project-OSS-Revival-enca-36defd7/data/ukrainian/rawcounts.cp1251000066400000000000000000000042431507545312400243650ustar00rootroot000000000000000x09 . 1624 0x0a . 49700 0x0d . 16385 0x1b . 1 0x20 288088 0x21 ! 2075 0x22 " 65797 0x23 # 3845 0x24 $ 293 0x25 % 2338 0x26 & 4214 0x27 ' 5597 0x28 ( 3512 0x29 ) 3658 0x2a * 1074 0x2b + 1441 0x2c , 13783 0x2d - 19380 0x2e . 41029 0x2f / 72832 0x30 0 34382 0x31 1 18638 0x32 2 12058 0x33 3 5678 0x34 4 4653 0x35 5 5247 0x36 6 11769 0x37 7 3289 0x38 8 3758 0x39 9 3678 0x3a : 10976 0x3b ; 6106 0x3c < 73986 0x3d = 49987 0x3e > 74010 0x3f ? 2472 0x40 @ 278 0x41 A 10769 0x42 B 8612 0x43 C 6231 0x44 D 5484 0x45 E 10050 0x46 F 6403 0x47 G 2421 0x48 H 4529 0x49 I 6682 0x4a J 341 0x4b K 1172 0x4c L 5660 0x4d M 3883 0x4e N 6496 0x4f O 5833 0x50 P 5508 0x51 Q 229 0x52 R 9611 0x53 S 5563 0x54 T 12892 0x55 U 3077 0x56 V 1017 0x57 W 2125 0x58 X 267 0x59 Y 807 0x5a Z 580 0x5b [ 897 0x5c \ 207 0x5d ] 893 0x5f _ 3752 0x60 ` 191 0x61 a 73995 0x62 b 28857 0x63 c 37821 0x64 d 38407 0x65 e 70915 0x66 f 24117 0x67 g 33660 0x68 h 43096 0x69 i 71220 0x6a j 1402 0x6b k 8172 0x6c l 42019 0x6d m 34935 0x6e n 54244 0x6f o 50077 0x70 p 31315 0x71 q 497 0x72 r 65343 0x73 s 44368 0x74 t 88075 0x75 u 16502 0x76 v 8482 0x77 w 30309 0x78 x 3593 0x79 y 7047 0x7a z 2149 0x7b { 168 0x7c | 246 0x7d } 168 0x7e ~ 25 0x84 13 0x85 85 0x91 4 0x92 377 0x93 962 0x94 979 0x96 316 0x97 400 0xa0 8 0xa2 1 0xa5 7 0xa8 1 0xa9 16 0xaa 139 0xab 425 0xaf 89 0xb2 1368 0xb3 34166 0xb4 22 0xb7 89 0xb8 1 0xb9 72 0xba 2813 0xbb 423 0xbe 1 0xbf 5874 0xc0 1945 0xc1 802 0xc2 2744 0xc3 788 0xc4 1327 0xc5 607 0xc6 228 0xc7 1046 0xc8 788 0xc9 194 0xca 1965 0xcb 827 0xcc 1574 0xcd 2318 0xce 1899 0xcf 2545 0xd0 1623 0xd1 1902 0xd2 1503 0xd3 1995 0xd4 503 0xd5 517 0xd6 347 0xd7 344 0xd8 424 0xd9 152 0xdb 3 0xdc 150 0xdd 1 0xde 195 0xdf 497 0xe0 53211 0xe1 7746 0xe2 32383 0xe3 9221 0xe4 18570 0xe5 31407 0xe6 4855 0xe7 12190 0xe8 39817 0xe9 6882 0xea 24107 0xeb 21055 0xec 17725 0xed 48029 0xee 58846 0xef 15872 0xf0 33316 0xf1 27385 0xf2 35186 0xf3 19248 0xf4 2751 0xf5 5964 0xf6 5075 0xf7 7624 0xf8 3623 0xf9 2056 0xfa 4 0xfb 378 0xfc 11169 0xfd 44 0xfe 4245 0xff 14010 Project-OSS-Revival-enca-36defd7/data/ukrainian/ukrainian.h000066400000000000000000001347001507545312400236370ustar00rootroot00000000000000/***** THIS IS A GENERATED FILE. DO NOT TOUCH! *****/ /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_CP1251[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 3416, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 587, /* 0xb8 */ 0, 0, 274, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 254, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 5321, 774, 3238, 922, 1857, 3140, 485, 1219, /* 0xe0 */ 3981, 688, 2410, 2105, 1772, 4802, 5884, 1587, /* 0xe8 */ 3331, 2738, 3518, 1924, 275, 596, 507, 762, /* 0xf0 */ 362, 0, 0, 0, 1116, 0, 424, 1401, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char LETTER_CP1251[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 255, 255, 0, 255, 0, 0, 0, 0, /* 0x80 */ 0, 0, 255, 0, 255, 255, 255, 255, /* 0x88 */ 255, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 255, 0, 255, 255, 255, 255, /* 0x98 */ 0, 255, 255, 255, 0, 255, 0, 0, /* 0xa0 */ 255, 0, 255, 0, 0, 0, 0, 255, /* 0xa8 */ 0, 0, 1, 2, 255, 0, 0, 0, /* 0xb0 */ 255, 0, 3, 0, 255, 255, 255, 4, /* 0xb8 */ 5, 6, 7, 255, 8, 9, 255, 10, /* 0xc0 */ 255, 255, 11, 255, 12, 13, 255, 14, /* 0xc8 */ 15, 16, 17, 18, 255, 255, 255, 255, /* 0xd0 */ 255, 255, 255, 255, 255, 255, 255, 19, /* 0xd8 */ 20, 21, 22, 23, 24, 25, 26, 27, /* 0xe0 */ 28, 29, 30, 31, 32, 33, 34, 35, /* 0xe8 */ 36, 37, 38, 39, 40, 41, 42, 43, /* 0xf0 */ 44, 45, 255, 255, 46, 255, 47, 48, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char *PAIR_CP1251[] = { (unsigned char*)"\xe2\xef\xed\xf1\xe7\xf2\xe4\xec\xea\xe1\xf0\xee\xe3\xb3\xe9\xff\xf3\xeb\xf7\xf9\xc2\xe0\xcf\xf6\xf5\xe6\xcd\xc0\xcc\xd2\xce\xd1\xbf\xca\xc1\xb2\xd0\xf8\xc4\xc3\xc7\xf4\xd3\xdf\xd5\xba\xd7\xc5\xe5\xd8\xcb\xd6\xd4", /* FILLCHAR */ (unsigned char*)".", /* 0xb2 */ (unsigned char*)".\xe4\xe2\xeb\xed\xf2\xf1\xe9\xe7\xec\xea\xff\xf7\xf0\xf8\xbf\xba\xf5\xe1\xe6\xe3\xee\xfe\xe0", /* 0xb3 */ (unsigned char*)".\xf2", /* 0xba */ (unsigned char*)".\xed\xf5\xbf", /* 0xbf */ (unsigned char*)".\xeb", /* 0xc0 */ (unsigned char*)"\xe0", /* 0xc1 */ (unsigned char*)"\xe8\xee\xb3.", /* 0xc2 */ (unsigned char*)"\xee", /* 0xc4 */ (unsigned char*)"\xeb", /* 0xc5 */ (unsigned char*)"\xe0", /* 0xc7 */ (unsigned char*)"\xee", /* 0xca */ (unsigned char*)"\xe0\xee", /* 0xcc */ (unsigned char*)"\xe0\xe5", /* 0xcd */ (unsigned char*)"\xf0\xee", /* 0xcf */ (unsigned char*)"\xf3", /* 0xd0 */ (unsigned char*)"\xee", /* 0xd1 */ (unsigned char*)"\xe0\xf0", /* 0xd2 */ (unsigned char*)"\xea", /* 0xd3 */ (unsigned char*)".", /* 0xdf */ (unsigned char*)".\xeb\xed\xf2\xe2\xf0\xec\xea\xf1\xe4\xba\xe7\xe9\xf8\xf5\xf7\xe1\xfe\xef\xe3\xe6\xf6\xbf\xf4", /* 0xe0 */ (unsigned char*)"\xf3\xe0\xee\xb3\xe8\xe5\xeb\xf0.\xed", /* 0xe1 */ (unsigned char*)".\xe8\xe0\xb3\xee\xe5\xf1\xed\xf3\xeb\xe6\xf7\xf2\xf8\xe4\xea", /* 0xe2 */ (unsigned char*)"\xee\xe0\xf0\xf3\xeb\xb3\xe8.\xe5", /* 0xe3 */ (unsigned char*)"\xee\xe8\xe0\xe5\xed.\xb3\xf3\xf0\xe2\xea\xeb\xff\xf1\xe6", /* 0xe4 */ (unsigned char*)".\xf0\xed\xf1\xeb\xf2\xec\xe7\xea\xe4\xe2\xef\xe1\xe9\xf7\xe6\xf6\xe3\xee", /* 0xe5 */ (unsigned char*)"\xe5\xed.\xe8\xe0\xf3", /* 0xe6 */ (unsigned char*)"\xe0.\xed\xe2\xf3\xe8\xee\xe4\xe5\xb3\xec\xf0\xeb", /* 0xe7 */ (unsigned char*)".\xf2\xed\xf1\xec\xe9\xe2\xf5\xea\xeb\xf7\xf0\xe4\xf6\xf8\xef\xe1\xe7\xe3", /* 0xe8 */ (unsigned char*)".\xee\xed\xf1\xf2", /* 0xe9 */ (unsigned char*)"\xee\xe0\xe8.\xf3\xf0\xb3\xeb\xf2\xe5\xf1\xed", /* 0xea */ (unsigned char*)"\xe8\xe0\xee\xfc\xe5\xb3\xff\xfe\xf3.", /* 0xeb */ (unsigned char*)".\xe0\xe8\xee\xb3\xf3\xe5\xed", /* 0xec */ (unsigned char*)"\xe0\xee\xe5\xe8\xb3\xff\xed\xf3.\xfc\xea\xf2\xf6\xf1\xe4\xfe", /* 0xed */ (unsigned char*)".\xe2\xf0\xe3\xeb\xec\xe4\xf1\xed\xe1\xea\xf2\xe7\xf7\xbf\xfe\xe6\xef\xf5\xf8\xf6", /* 0xee */ (unsigned char*)"\xee\xf0\xe0\xe5\xb3\xe8\xeb\xf3.", /* 0xef */ (unsigned char*)"\xee\xe0\xe8\xe5\xf3\xb3.\xf2\xed\xff\xea\xf1\xe3\xec\xe2", /* 0xf0 */ (unsigned char*)"\xf2\xff\xfc\xe8\xb3\xee\xea\xe0\xef\xe5\xe2\xeb.\xed\xf3\xec", /* 0xf1 */ (unsigned char*)"\xe8\xe0\xfc\xee\xe5\xb3\xf0\xf3.\xe2\xff\xed\xea\xf2\xeb", /* 0xf2 */ (unsigned char*)".\xe2\xe4\xf2\xf1\xea\xeb\xec\xf0\xf5\xba\xef\xf8\xe6\xf7\xe3\xed\xe1\xe7\xfe", /* 0xf3 */ (unsigned char*)"\xb3.\xee\xe0", /* 0xf4 */ (unsigned char*)".\xee\xe0\xe8\xb3\xf3", /* 0xf5 */ (unsigned char*)"\xb3\xe5\xfc\xff\xfe", /* 0xf6 */ (unsigned char*)"\xe8\xe5\xe0\xed\xee\xb3\xf3\xea.", /* 0xf7 */ (unsigned char*)"\xe8\xe5\xe0\xea\xed.\xf3\xee\xb3\xf2\xeb", /* 0xf8 */ (unsigned char*)"\xee\xe5\xe0", /* 0xf9 */ (unsigned char*)".\xea\xf1\xed\xee\xf4", /* 0xfc */ (unsigned char*)".\xf2\xf7\xe4", /* 0xfe */ (unsigned char*)".\xea\xf2\xf7\xec\xe4\xed\xe2\xe3\xba", /* 0xff */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_IBM855[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 3416, 0, 587, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 424, 0, 0, 0, /* 0x98 */ 5321, 0, 774, 0, 507, 0, 1857, 0, /* 0xa0 */ 3140, 0, 275, 0, 922, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 596, 0, 3981, /* 0xb0 */ 0, 0, 0, 0, 0, 688, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 2410, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 2105, 0, 1772, 0, 4802, 0, 5884, 0, /* 0xd0 */ 1587, 0, 0, 0, 0, 254, 1401, 0, /* 0xd8 */ 0, 3331, 0, 2738, 0, 3518, 0, 1924, /* 0xe0 */ 0, 485, 0, 3238, 274, 1116, 0, 0, /* 0xe8 */ 0, 0, 0, 1219, 0, 362, 0, 0, /* 0xf0 */ 0, 0, 0, 762, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char LETTER_IBM855[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 255, 255, 255, 255, 255, 255, 3, 255, /* 0x80 */ 255, 255, 2, 1, 4, 255, 255, 255, /* 0x88 */ 255, 255, 255, 255, 255, 0, 255, 255, /* 0x90 */ 255, 255, 255, 255, 47, 255, 255, 255, /* 0x98 */ 20, 5, 21, 6, 42, 255, 24, 8, /* 0xa0 */ 25, 9, 40, 255, 23, 255, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 41, 255, 28, /* 0xb0 */ 255, 0, 0, 0, 0, 29, 255, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 30, 11, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 31, 255, 32, 12, 33, 13, 34, 255, /* 0xd0 */ 35, 0, 0, 0, 0, 14, 48, 0, /* 0xd8 */ 19, 36, 15, 37, 16, 38, 17, 39, /* 0xe0 */ 18, 26, 255, 22, 7, 46, 255, 0, /* 0xe8 */ 0, 255, 255, 27, 10, 44, 255, 255, /* 0xf0 */ 255, 45, 255, 43, 255, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char *PAIR_IBM855[] = { (unsigned char*)"\xeb\xd8\xd4\xe3\xf3\xe5\xa6\xd2\xc6\xa2\xe1\xd6\xac\x8a\xbd\xde\xe7\xd0\xfb\xf9\xec\xa0\xdd\xa4\xb5\xe9\xd5\xa1\xd3\xe6\xd7\xe4\x8c\xc7\xa3\x8b\xe2\xf5\xa7\xad\xf4\xaa\xe8\xe0\xb6\x86\xfc\xa9\xa8\xf6\xd1\xa5\xab", /* FILLCHAR */ (unsigned char*)".", /* 0x8b */ (unsigned char*)".\xa6\xeb\xd0\xd4\xe5\xe3\xbd\xf3\xd2\xc6\xde\xfb\xe1\xf5\x8c\x86\xb5\xa2\xe9\xac\xd6\x9c\xa0", /* 0x8a */ (unsigned char*)".\xe5", /* 0x86 */ (unsigned char*)".\xd4\xb5\x8c", /* 0x8c */ (unsigned char*)".\xd0", /* 0xa1 */ (unsigned char*)"\xa0", /* 0xa3 */ (unsigned char*)"\xb7\xd6\x8a.", /* 0xec */ (unsigned char*)"\xd6", /* 0xa7 */ (unsigned char*)"\xd0", /* 0xa9 */ (unsigned char*)"\xa0", /* 0xf4 */ (unsigned char*)"\xd6", /* 0xc7 */ (unsigned char*)"\xa0\xd6", /* 0xd3 */ (unsigned char*)"\xa0\xa8", /* 0xd5 */ (unsigned char*)"\xe1\xd6", /* 0xdd */ (unsigned char*)"\xe7", /* 0xe2 */ (unsigned char*)"\xd6", /* 0xe4 */ (unsigned char*)"\xa0\xe1", /* 0xe6 */ (unsigned char*)"\xc6", /* 0xe8 */ (unsigned char*)".", /* 0xe0 */ (unsigned char*)".\xd0\xd4\xe5\xeb\xe1\xd2\xc6\xe3\xa6\x86\xf3\xbd\xf5\xb5\xfb\xa2\x9c\xd8\xac\xe9\xa4\x8c\xaa", /* 0xa0 */ (unsigned char*)"\xe7\xa0\xd6\x8a\xb7\xa8\xd0\xe1.\xd4", /* 0xa2 */ (unsigned char*)".\xb7\xa0\x8a\xd6\xa8\xe3\xd4\xe7\xd0\xe9\xfb\xe5\xf5\xa6\xc6", /* 0xeb */ (unsigned char*)"\xd6\xa0\xe1\xe7\xd0\x8a\xb7.\xa8", /* 0xac */ (unsigned char*)"\xd6\xb7\xa0\xa8\xd4.\x8a\xe7\xe1\xeb\xc6\xd0\xde\xe3\xe9", /* 0xa6 */ (unsigned char*)".\xe1\xd4\xe3\xd0\xe5\xd2\xf3\xc6\xa6\xeb\xd8\xa2\xbd\xfb\xe9\xa4\xac\xd6", /* 0xa8 */ (unsigned char*)"\xa8\xd4.\xb7\xa0\xe7", /* 0xe9 */ (unsigned char*)"\xa0.\xd4\xeb\xe7\xb7\xd6\xa6\xa8\x8a\xd2\xe1\xd0", /* 0xf3 */ (unsigned char*)".\xe5\xd4\xe3\xd2\xbd\xeb\xb5\xc6\xd0\xfb\xe1\xa6\xa4\xf5\xd8\xa2\xf3\xac", /* 0xb7 */ (unsigned char*)".\xd6\xd4\xe3\xe5", /* 0xbd */ (unsigned char*)"\xd6\xa0\xb7.\xe7\xe1\x8a\xd0\xe5\xa8\xe3\xd4", /* 0xc6 */ (unsigned char*)"\xb7\xa0\xd6\xed\xa8\x8a\xde\x9c\xe7.", /* 0xd0 */ (unsigned char*)".\xa0\xb7\xd6\x8a\xe7\xa8\xd4", /* 0xd2 */ (unsigned char*)"\xa0\xd6\xa8\xb7\x8a\xde\xd4\xe7.\xed\xc6\xe5\xa4\xe3\xa6\x9c", /* 0xd4 */ (unsigned char*)".\xeb\xe1\xac\xd0\xd2\xa6\xe3\xd4\xa2\xc6\xe5\xf3\xfb\x8c\x9c\xe9\xd8\xb5\xf5\xa4", /* 0xd6 */ (unsigned char*)"\xd6\xe1\xa0\xa8\x8a\xb7\xd0\xe7.", /* 0xd8 */ (unsigned char*)"\xd6\xa0\xb7\xa8\xe7\x8a.\xe5\xd4\xde\xc6\xe3\xac\xd2\xeb", /* 0xe1 */ (unsigned char*)"\xe5\xde\xed\xb7\x8a\xd6\xc6\xa0\xd8\xa8\xeb\xd0.\xd4\xe7\xd2", /* 0xe3 */ (unsigned char*)"\xb7\xa0\xed\xd6\xa8\x8a\xe1\xe7.\xeb\xde\xd4\xc6\xe5\xd0", /* 0xe5 */ (unsigned char*)".\xeb\xa6\xe5\xe3\xc6\xd0\xd2\xe1\xb5\x86\xd8\xf5\xe9\xfb\xac\xd4\xa2\xf3\x9c", /* 0xe7 */ (unsigned char*)"\x8a.\xd6\xa0", /* 0xaa */ (unsigned char*)".\xd6\xa0\xb7\x8a\xe7", /* 0xb5 */ (unsigned char*)"\x8a\xa8\xed\xde\x9c", /* 0xa4 */ (unsigned char*)"\xb7\xa8\xa0\xd4\xd6\x8a\xe7\xc6.", /* 0xfb */ (unsigned char*)"\xb7\xa8\xa0\xc6\xd4.\xe7\xd6\x8a\xe5\xd0", /* 0xf5 */ (unsigned char*)"\xd6\xa8\xa0", /* 0xf9 */ (unsigned char*)".\xc6\xe3\xd4\xd6\xaa", /* 0xed */ (unsigned char*)".\xe5\xfb\xa6", /* 0x9c */ (unsigned char*)".\xc6\xe5\xfb\xd2\xa6\xd4\xeb\xac\x86", /* 0xde */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_ISO88595[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 274, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 254, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 5321, 774, 3238, 922, 1857, 3140, 485, 1219, /* 0xd0 */ 3981, 688, 2410, 2105, 1772, 4802, 5884, 1587, /* 0xd8 */ 3331, 2738, 3518, 1924, 275, 596, 507, 762, /* 0xe0 */ 362, 0, 0, 0, 1116, 0, 424, 1401, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 3416, 587, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char LETTER_ISO88595[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 255, 255, 255, 255, 255, 1, 255, /* 0xa0 */ 255, 255, 255, 255, 255, 0, 255, 255, /* 0xa8 */ 5, 6, 7, 255, 8, 9, 255, 10, /* 0xb0 */ 255, 255, 11, 255, 12, 13, 255, 14, /* 0xb8 */ 15, 16, 17, 18, 255, 255, 255, 255, /* 0xc0 */ 255, 255, 255, 255, 255, 255, 255, 19, /* 0xc8 */ 20, 21, 22, 23, 24, 25, 26, 27, /* 0xd0 */ 28, 29, 30, 31, 32, 33, 34, 35, /* 0xd8 */ 36, 37, 38, 39, 40, 41, 42, 43, /* 0xe0 */ 44, 45, 255, 255, 46, 255, 47, 48, /* 0xe8 */ 0, 255, 255, 255, 3, 255, 2, 4, /* 0xf0 */ 255, 255, 255, 255, 255, 0, 255, 255, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char *PAIR_ISO88595[] = { (unsigned char*)"\xd2\xdf\xdd\xe1\xd7\xe2\xd4\xdc\xda\xd1\xe0\xde\xd3\xf6\xd9\xef\xe3\xdb\xe7\xe9\xb2\xd0\xbf\xe6\xe5\xd6\xbd\xb0\xbc\xc2\xbe\xc1\xf7\xba\xb1\xa6\xc0\xe8\xb4\xb3\xb7\xe4\xc3\xcf\xc5\xf4\xc7\xb5\xd5\xc8\xbb\xc6\xc4", /* FILLCHAR */ (unsigned char*)".", /* 0xa6 */ (unsigned char*)".\xd4\xd2\xdb\xdd\xe2\xe1\xd9\xd7\xdc\xda\xef\xe7\xe0\xe8\xf7\xf4\xe5\xd1\xd6\xd3\xde\xee\xd0", /* 0xf6 */ (unsigned char*)".\xe2", /* 0xf4 */ (unsigned char*)".\xdd\xe5\xf7", /* 0xf7 */ (unsigned char*)".\xdb", /* 0xb0 */ (unsigned char*)"\xd0", /* 0xb1 */ (unsigned char*)"\xd8\xde\xf6.", /* 0xb2 */ (unsigned char*)"\xde", /* 0xb4 */ (unsigned char*)"\xdb", /* 0xb5 */ (unsigned char*)"\xd0", /* 0xb7 */ (unsigned char*)"\xde", /* 0xba */ (unsigned char*)"\xd0\xde", /* 0xbc */ (unsigned char*)"\xd0\xd5", /* 0xbd */ (unsigned char*)"\xe0\xde", /* 0xbf */ (unsigned char*)"\xe3", /* 0xc0 */ (unsigned char*)"\xde", /* 0xc1 */ (unsigned char*)"\xd0\xe0", /* 0xc2 */ (unsigned char*)"\xda", /* 0xc3 */ (unsigned char*)".", /* 0xcf */ (unsigned char*)".\xdb\xdd\xe2\xd2\xe0\xdc\xda\xe1\xd4\xf4\xd7\xd9\xe8\xe5\xe7\xd1\xee\xdf\xd3\xd6\xe6\xf7\xe4", /* 0xd0 */ (unsigned char*)"\xe3\xd0\xde\xf6\xd8\xd5\xdb\xe0.\xdd", /* 0xd1 */ (unsigned char*)".\xd8\xd0\xf6\xde\xd5\xe1\xdd\xe3\xdb\xd6\xe7\xe2\xe8\xd4\xda", /* 0xd2 */ (unsigned char*)"\xde\xd0\xe0\xe3\xdb\xf6\xd8.\xd5", /* 0xd3 */ (unsigned char*)"\xde\xd8\xd0\xd5\xdd.\xf6\xe3\xe0\xd2\xda\xdb\xef\xe1\xd6", /* 0xd4 */ (unsigned char*)".\xe0\xdd\xe1\xdb\xe2\xdc\xd7\xda\xd4\xd2\xdf\xd1\xd9\xe7\xd6\xe6\xd3\xde", /* 0xd5 */ (unsigned char*)"\xd5\xdd.\xd8\xd0\xe3", /* 0xd6 */ (unsigned char*)"\xd0.\xdd\xd2\xe3\xd8\xde\xd4\xd5\xf6\xdc\xe0\xdb", /* 0xd7 */ (unsigned char*)".\xe2\xdd\xe1\xdc\xd9\xd2\xe5\xda\xdb\xe7\xe0\xd4\xe6\xe8\xdf\xd1\xd7\xd3", /* 0xd8 */ (unsigned char*)".\xde\xdd\xe1\xe2", /* 0xd9 */ (unsigned char*)"\xde\xd0\xd8.\xe3\xe0\xf6\xdb\xe2\xd5\xe1\xdd", /* 0xda */ (unsigned char*)"\xd8\xd0\xde\xec\xd5\xf6\xef\xee\xe3.", /* 0xdb */ (unsigned char*)".\xd0\xd8\xde\xf6\xe3\xd5\xdd", /* 0xdc */ (unsigned char*)"\xd0\xde\xd5\xd8\xf6\xef\xdd\xe3.\xec\xda\xe2\xe6\xe1\xd4\xee", /* 0xdd */ (unsigned char*)".\xd2\xe0\xd3\xdb\xdc\xd4\xe1\xdd\xd1\xda\xe2\xd7\xe7\xf7\xee\xd6\xdf\xe5\xe8\xe6", /* 0xde */ (unsigned char*)"\xde\xe0\xd0\xd5\xf6\xd8\xdb\xe3.", /* 0xdf */ (unsigned char*)"\xde\xd0\xd8\xd5\xe3\xf6.\xe2\xdd\xef\xda\xe1\xd3\xdc\xd2", /* 0xe0 */ (unsigned char*)"\xe2\xef\xec\xd8\xf6\xde\xda\xd0\xdf\xd5\xd2\xdb.\xdd\xe3\xdc", /* 0xe1 */ (unsigned char*)"\xd8\xd0\xec\xde\xd5\xf6\xe0\xe3.\xd2\xef\xdd\xda\xe2\xdb", /* 0xe2 */ (unsigned char*)".\xd2\xd4\xe2\xe1\xda\xdb\xdc\xe0\xe5\xf4\xdf\xe8\xd6\xe7\xd3\xdd\xd1\xd7\xee", /* 0xe3 */ (unsigned char*)"\xf6.\xde\xd0", /* 0xe4 */ (unsigned char*)".\xde\xd0\xd8\xf6\xe3", /* 0xe5 */ (unsigned char*)"\xf6\xd5\xec\xef\xee", /* 0xe6 */ (unsigned char*)"\xd8\xd5\xd0\xdd\xde\xf6\xe3\xda.", /* 0xe7 */ (unsigned char*)"\xd8\xd5\xd0\xda\xdd.\xe3\xde\xf6\xe2\xdb", /* 0xe8 */ (unsigned char*)"\xde\xd5\xd0", /* 0xe9 */ (unsigned char*)".\xda\xe1\xdd\xde\xe4", /* 0xec */ (unsigned char*)".\xe2\xe7\xd4", /* 0xee */ (unsigned char*)".\xda\xe2\xe7\xdc\xd4\xdd\xd2\xd3\xf4", /* 0xef */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_CP1125[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 274, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 254, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 5321, 774, 3238, 922, 1857, 3140, 485, 1219, /* 0xa0 */ 3981, 688, 2410, 2105, 1772, 4802, 5884, 1587, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 3331, 2738, 3518, 1924, 275, 596, 507, 762, /* 0xe0 */ 362, 0, 0, 0, 1116, 0, 424, 1401, /* 0xe8 */ 0, 0, 0, 0, 0, 0, 0, 3416, /* 0xf0 */ 0, 587, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char LETTER_CP1125[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 5, 6, 7, 255, 8, 9, 255, 10, /* 0x80 */ 255, 255, 11, 255, 12, 13, 255, 14, /* 0x88 */ 15, 16, 17, 18, 255, 255, 255, 255, /* 0x90 */ 255, 255, 255, 255, 255, 255, 255, 19, /* 0x98 */ 20, 21, 22, 23, 24, 25, 26, 27, /* 0xa0 */ 28, 29, 30, 31, 32, 33, 34, 35, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd8 */ 36, 37, 38, 39, 40, 41, 42, 43, /* 0xe0 */ 44, 45, 255, 255, 46, 255, 47, 48, /* 0xe8 */ 255, 255, 255, 255, 255, 3, 1, 2, /* 0xf0 */ 255, 4, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char *PAIR_CP1125[] = { (unsigned char*)"\xa2\xaf\xad\xe1\xa7\xe2\xa4\xac\xaa\xa1\xe0\xae\xa3\xf7\xa9\xef\xe3\xab\xe7\xe9\x82\xa0\x8f\xe6\xe5\xa6\x8d\x80\x8c\x92\x8e\x91\xf9\x8a\x81\xf6\x90\xe8\x84\x83\x87\xe4\x93\x9f\x95\xf5\x97\x85\xa5\x98\x8b\x96\x94", /* FILLCHAR */ (unsigned char*)".", /* 0xf6 */ (unsigned char*)".\xa4\xa2\xab\xad\xe2\xe1\xa9\xa7\xac\xaa\xef\xe7\xe0\xe8\xf9\xf5\xe5\xa1\xa6\xa3\xae\xee\xa0", /* 0xf7 */ (unsigned char*)".\xe2", /* 0xf5 */ (unsigned char*)".\xad\xe5\xf9", /* 0xf9 */ (unsigned char*)".\xab", /* 0x80 */ (unsigned char*)"\xa0", /* 0x81 */ (unsigned char*)"\xa8\xae\xf7.", /* 0x82 */ (unsigned char*)"\xae", /* 0x84 */ (unsigned char*)"\xab", /* 0x85 */ (unsigned char*)"\xa0", /* 0x87 */ (unsigned char*)"\xae", /* 0x8a */ (unsigned char*)"\xa0\xae", /* 0x8c */ (unsigned char*)"\xa0\xa5", /* 0x8d */ (unsigned char*)"\xe0\xae", /* 0x8f */ (unsigned char*)"\xe3", /* 0x90 */ (unsigned char*)"\xae", /* 0x91 */ (unsigned char*)"\xa0\xe0", /* 0x92 */ (unsigned char*)"\xaa", /* 0x93 */ (unsigned char*)".", /* 0x9f */ (unsigned char*)".\xab\xad\xe2\xa2\xe0\xac\xaa\xe1\xa4\xf5\xa7\xa9\xe8\xe5\xe7\xa1\xee\xaf\xa3\xa6\xe6\xf9\xe4", /* 0xa0 */ (unsigned char*)"\xe3\xa0\xae\xf7\xa8\xa5\xab\xe0.\xad", /* 0xa1 */ (unsigned char*)".\xa8\xa0\xf7\xae\xa5\xe1\xad\xe3\xab\xa6\xe7\xe2\xe8\xa4\xaa", /* 0xa2 */ (unsigned char*)"\xae\xa0\xe0\xe3\xab\xf7\xa8.\xa5", /* 0xa3 */ (unsigned char*)"\xae\xa8\xa0\xa5\xad.\xf7\xe3\xe0\xa2\xaa\xab\xef\xe1\xa6", /* 0xa4 */ (unsigned char*)".\xe0\xad\xe1\xab\xe2\xac\xa7\xaa\xa4\xa2\xaf\xa1\xa9\xe7\xa6\xe6\xa3\xae", /* 0xa5 */ (unsigned char*)"\xa5\xad.\xa8\xa0\xe3", /* 0xa6 */ (unsigned char*)"\xa0.\xad\xa2\xe3\xa8\xae\xa4\xa5\xf7\xac\xe0\xab", /* 0xa7 */ (unsigned char*)".\xe2\xad\xe1\xac\xa9\xa2\xe5\xaa\xab\xe7\xe0\xa4\xe6\xe8\xaf\xa1\xa7\xa3", /* 0xa8 */ (unsigned char*)".\xae\xad\xe1\xe2", /* 0xa9 */ (unsigned char*)"\xae\xa0\xa8.\xe3\xe0\xf7\xab\xe2\xa5\xe1\xad", /* 0xaa */ (unsigned char*)"\xa8\xa0\xae\xec\xa5\xf7\xef\xee\xe3.", /* 0xab */ (unsigned char*)".\xa0\xa8\xae\xf7\xe3\xa5\xad", /* 0xac */ (unsigned char*)"\xa0\xae\xa5\xa8\xf7\xef\xad\xe3.\xec\xaa\xe2\xe6\xe1\xa4\xee", /* 0xad */ (unsigned char*)".\xa2\xe0\xa3\xab\xac\xa4\xe1\xad\xa1\xaa\xe2\xa7\xe7\xf9\xee\xa6\xaf\xe5\xe8\xe6", /* 0xae */ (unsigned char*)"\xae\xe0\xa0\xa5\xf7\xa8\xab\xe3.", /* 0xaf */ (unsigned char*)"\xae\xa0\xa8\xa5\xe3\xf7.\xe2\xad\xef\xaa\xe1\xa3\xac\xa2", /* 0xe0 */ (unsigned char*)"\xe2\xef\xec\xa8\xf7\xae\xaa\xa0\xaf\xa5\xa2\xab.\xad\xe3\xac", /* 0xe1 */ (unsigned char*)"\xa8\xa0\xec\xae\xa5\xf7\xe0\xe3.\xa2\xef\xad\xaa\xe2\xab", /* 0xe2 */ (unsigned char*)".\xa2\xa4\xe2\xe1\xaa\xab\xac\xe0\xe5\xf5\xaf\xe8\xa6\xe7\xa3\xad\xa1\xa7\xee", /* 0xe3 */ (unsigned char*)"\xf7.\xae\xa0", /* 0xe4 */ (unsigned char*)".\xae\xa0\xa8\xf7\xe3", /* 0xe5 */ (unsigned char*)"\xf7\xa5\xec\xef\xee", /* 0xe6 */ (unsigned char*)"\xa8\xa5\xa0\xad\xae\xf7\xe3\xaa.", /* 0xe7 */ (unsigned char*)"\xa8\xa5\xa0\xaa\xad.\xe3\xae\xf7\xe2\xab", /* 0xe8 */ (unsigned char*)"\xae\xa5\xa0", /* 0xe9 */ (unsigned char*)".\xaa\xe1\xad\xae\xe4", /* 0xec */ (unsigned char*)".\xe2\xe7\xa4", /* 0xee */ (unsigned char*)".\xaa\xe2\xe7\xac\xa4\xad\xa2\xa3\xf5", /* 0xef */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_KOI8U[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 3416, 587, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xb8 */ 424, 5321, 774, 507, 1857, 3140, 275, 922, /* 0xc0 */ 596, 3981, 688, 2410, 2105, 1772, 4802, 5884, /* 0xc8 */ 1587, 1401, 3331, 2738, 3518, 1924, 485, 3238, /* 0xd0 */ 1116, 0, 1219, 362, 0, 0, 762, 0, /* 0xd8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xe8 */ 254, 0, 0, 0, 0, 0, 0, 274, /* 0xf0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char LETTER_KOI8U[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 255, 3, 0, 2, 4, /* 0xa0 */ 0, 0, 0, 0, 0, 255, 0, 0, /* 0xa8 */ 0, 0, 0, 255, 255, 0, 1, 255, /* 0xb0 */ 0, 0, 0, 0, 0, 255, 0, 0, /* 0xb8 */ 47, 20, 21, 42, 24, 25, 40, 23, /* 0xc0 */ 41, 28, 29, 30, 31, 32, 33, 34, /* 0xc8 */ 35, 48, 36, 37, 38, 39, 26, 22, /* 0xd0 */ 46, 255, 27, 44, 255, 45, 43, 255, /* 0xd8 */ 255, 5, 6, 255, 8, 9, 255, 255, /* 0xe0 */ 255, 255, 255, 11, 255, 12, 13, 255, /* 0xe8 */ 14, 19, 15, 16, 17, 18, 255, 7, /* 0xf0 */ 255, 255, 10, 255, 255, 255, 255, 255, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char *PAIR_KOI8U[] = { (unsigned char*)"\xd7\xd0\xce\xd3\xda\xd4\xc4\xcd\xcb\xc2\xd2\xcf\xc7\xa6\xca\xd1\xd5\xcc\xde\xdd\xf7\xc1\xf0\xc3\xc8\xd6\xee\xe1\xed\xf4\xef\xf3\xa7\xeb\xe2\xb6\xf2\xdb\xe4\xe7\xfa\xc6\xf5\xf1\xe8\xa4\xfe\xe5\xc5\xfb\xec\xe3\xe6", /* FILLCHAR */ (unsigned char*)".", /* 0xb6 */ (unsigned char*)".\xc4\xd7\xcc\xce\xd4\xd3\xca\xda\xcd\xcb\xd1\xde\xd2\xdb\xa7\xa4\xc8\xc2\xd6\xc7\xcf\xc0\xc1", /* 0xa6 */ (unsigned char*)".\xd4", /* 0xa4 */ (unsigned char*)".\xce\xc8\xa7", /* 0xa7 */ (unsigned char*)".\xcc", /* 0xe1 */ (unsigned char*)"\xc1", /* 0xe2 */ (unsigned char*)"\xc9\xcf\xa6.", /* 0xf7 */ (unsigned char*)"\xcf", /* 0xe4 */ (unsigned char*)"\xcc", /* 0xe5 */ (unsigned char*)"\xc1", /* 0xfa */ (unsigned char*)"\xcf", /* 0xeb */ (unsigned char*)"\xc1\xcf", /* 0xed */ (unsigned char*)"\xc1\xc5", /* 0xee */ (unsigned char*)"\xd2\xcf", /* 0xf0 */ (unsigned char*)"\xd5", /* 0xf2 */ (unsigned char*)"\xcf", /* 0xf3 */ (unsigned char*)"\xc1\xd2", /* 0xf4 */ (unsigned char*)"\xcb", /* 0xf5 */ (unsigned char*)".", /* 0xf1 */ (unsigned char*)".\xcc\xce\xd4\xd7\xd2\xcd\xcb\xd3\xc4\xa4\xda\xca\xdb\xc8\xde\xc2\xc0\xd0\xc7\xd6\xc3\xa7\xc6", /* 0xc1 */ (unsigned char*)"\xd5\xc1\xcf\xa6\xc9\xc5\xcc\xd2.\xce", /* 0xc2 */ (unsigned char*)".\xc9\xc1\xa6\xcf\xc5\xd3\xce\xd5\xcc\xd6\xde\xd4\xdb\xc4\xcb", /* 0xd7 */ (unsigned char*)"\xcf\xc1\xd2\xd5\xcc\xa6\xc9.\xc5", /* 0xc7 */ (unsigned char*)"\xcf\xc9\xc1\xc5\xce.\xa6\xd5\xd2\xd7\xcb\xcc\xd1\xd3\xd6", /* 0xc4 */ (unsigned char*)".\xd2\xce\xd3\xcc\xd4\xcd\xda\xcb\xc4\xd7\xd0\xc2\xca\xde\xd6\xc3\xc7\xcf", /* 0xc5 */ (unsigned char*)"\xc5\xce.\xc9\xc1\xd5", /* 0xd6 */ (unsigned char*)"\xc1.\xce\xd7\xd5\xc9\xcf\xc4\xc5\xa6\xcd\xd2\xcc", /* 0xda */ (unsigned char*)".\xd4\xce\xd3\xcd\xca\xd7\xc8\xcb\xcc\xde\xd2\xc4\xc3\xdb\xd0\xc2\xda\xc7", /* 0xc9 */ (unsigned char*)".\xcf\xce\xd3\xd4", /* 0xca */ (unsigned char*)"\xcf\xc1\xc9.\xd5\xd2\xa6\xcc\xd4\xc5\xd3\xce", /* 0xcb */ (unsigned char*)"\xc9\xc1\xcf\xd8\xc5\xa6\xd1\xc0\xd5.", /* 0xcc */ (unsigned char*)".\xc1\xc9\xcf\xa6\xd5\xc5\xce", /* 0xcd */ (unsigned char*)"\xc1\xcf\xc5\xc9\xa6\xd1\xce\xd5.\xd8\xcb\xd4\xc3\xd3\xc4\xc0", /* 0xce */ (unsigned char*)".\xd7\xd2\xc7\xcc\xcd\xc4\xd3\xce\xc2\xcb\xd4\xda\xde\xa7\xc0\xd6\xd0\xc8\xdb\xc3", /* 0xcf */ (unsigned char*)"\xcf\xd2\xc1\xc5\xa6\xc9\xcc\xd5.", /* 0xd0 */ (unsigned char*)"\xcf\xc1\xc9\xc5\xd5\xa6.\xd4\xce\xd1\xcb\xd3\xc7\xcd\xd7", /* 0xd2 */ (unsigned char*)"\xd4\xd1\xd8\xc9\xa6\xcf\xcb\xc1\xd0\xc5\xd7\xcc.\xce\xd5\xcd", /* 0xd3 */ (unsigned char*)"\xc9\xc1\xd8\xcf\xc5\xa6\xd2\xd5.\xd7\xd1\xce\xcb\xd4\xcc", /* 0xd4 */ (unsigned char*)".\xd7\xc4\xd4\xd3\xcb\xcc\xcd\xd2\xc8\xa4\xd0\xdb\xd6\xde\xc7\xce\xc2\xda\xc0", /* 0xd5 */ (unsigned char*)"\xa6.\xcf\xc1", /* 0xc6 */ (unsigned char*)".\xcf\xc1\xc9\xa6\xd5", /* 0xc8 */ (unsigned char*)"\xa6\xc5\xd8\xd1\xc0", /* 0xc3 */ (unsigned char*)"\xc9\xc5\xc1\xce\xcf\xa6\xd5\xcb.", /* 0xde */ (unsigned char*)"\xc9\xc5\xc1\xcb\xce.\xd5\xcf\xa6\xd4\xcc", /* 0xdb */ (unsigned char*)"\xcf\xc5\xc1", /* 0xdd */ (unsigned char*)".\xcb\xd3\xce\xcf\xc6", /* 0xd8 */ (unsigned char*)".\xd4\xde\xc4", /* 0xc0 */ (unsigned char*)".\xcb\xd4\xde\xcd\xc4\xce\xd7\xc7\xa4", /* 0xd1 */ }; /* THIS IS A GENERATED TABLE, see data/basetoc.c. */ static const unsigned short int RAW_MACCYR[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 274, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 254, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x98 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8 */ 0, 0, 0, 0, 3416, 0, 0, 0, /* 0xb0 */ 0, 0, 0, 587, 0, 0, 0, 0, /* 0xb8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 0, 0, 0, 0, 0, 0, 0, 1401, /* 0xd8 */ 5321, 774, 3238, 922, 1857, 3140, 485, 1219, /* 0xe0 */ 3981, 688, 2410, 2105, 1772, 4802, 5884, 1587, /* 0xe8 */ 3331, 2738, 3518, 1924, 275, 596, 507, 762, /* 0xf0 */ 362, 0, 0, 0, 1116, 0, 424, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char LETTER_MACCYR[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 5, 6, 7, 255, 8, 9, 255, 10, /* 0x80 */ 255, 255, 11, 255, 12, 13, 255, 14, /* 0x88 */ 15, 16, 17, 18, 255, 255, 255, 255, /* 0x90 */ 255, 255, 255, 255, 255, 255, 255, 19, /* 0x98 */ 0, 0, 255, 0, 0, 0, 0, 1, /* 0xa0 */ 0, 0, 0, 255, 255, 0, 255, 255, /* 0xa8 */ 0, 0, 0, 0, 2, 0, 255, 255, /* 0xb0 */ 255, 3, 255, 4, 255, 255, 255, 255, /* 0xb8 */ 255, 255, 0, 0, 255, 0, 0, 0, /* 0xc0 */ 0, 0, 0, 255, 255, 255, 255, 255, /* 0xc8 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xd0 */ 255, 255, 255, 255, 0, 255, 255, 48, /* 0xd8 */ 20, 21, 22, 23, 24, 25, 26, 27, /* 0xe0 */ 28, 29, 30, 31, 32, 33, 34, 35, /* 0xe8 */ 36, 37, 38, 39, 40, 41, 42, 43, /* 0xf0 */ 44, 45, 255, 255, 46, 255, 47, 0, /* 0xf8 */ }; /* THIS IS A GENERATED TABLE, see data/pairtoc.c. */ static const unsigned char *PAIR_MACCYR[] = { (unsigned char*)"\xe2\xef\xed\xf1\xe7\xf2\xe4\xec\xea\xe1\xf0\xee\xe3\xb4\xe9\xdf\xf3\xeb\xf7\xf9\x82\xe0\x8f\xf6\xf5\xe6\x8d\x80\x8c\x92\x8e\x91\xbb\x8a\x81\xa7\x90\xf8\x84\x83\x87\xf4\x93\x9f\x95\xb9\x97\x85\xe5\x98\x8b\x96\x94", /* FILLCHAR */ (unsigned char*)".", /* 0xa7 */ (unsigned char*)".\xe4\xe2\xeb\xed\xf2\xf1\xe9\xe7\xec\xea\xdf\xf7\xf0\xf8\xbb\xb9\xf5\xe1\xe6\xe3\xee\xfe\xe0", /* 0xb4 */ (unsigned char*)".\xf2", /* 0xb9 */ (unsigned char*)".\xed\xf5\xbb", /* 0xbb */ (unsigned char*)".\xeb", /* 0x80 */ (unsigned char*)"\xe0", /* 0x81 */ (unsigned char*)"\xe8\xee\xb4.", /* 0x82 */ (unsigned char*)"\xee", /* 0x84 */ (unsigned char*)"\xeb", /* 0x85 */ (unsigned char*)"\xe0", /* 0x87 */ (unsigned char*)"\xee", /* 0x8a */ (unsigned char*)"\xe0\xee", /* 0x8c */ (unsigned char*)"\xe0\xe5", /* 0x8d */ (unsigned char*)"\xf0\xee", /* 0x8f */ (unsigned char*)"\xf3", /* 0x90 */ (unsigned char*)"\xee", /* 0x91 */ (unsigned char*)"\xe0\xf0", /* 0x92 */ (unsigned char*)"\xea", /* 0x93 */ (unsigned char*)".", /* 0x9f */ (unsigned char*)".\xeb\xed\xf2\xe2\xf0\xec\xea\xf1\xe4\xb9\xe7\xe9\xf8\xf5\xf7\xe1\xfe\xef\xe3\xe6\xf6\xbb\xf4", /* 0xe0 */ (unsigned char*)"\xf3\xe0\xee\xb4\xe8\xe5\xeb\xf0.\xed", /* 0xe1 */ (unsigned char*)".\xe8\xe0\xb4\xee\xe5\xf1\xed\xf3\xeb\xe6\xf7\xf2\xf8\xe4\xea", /* 0xe2 */ (unsigned char*)"\xee\xe0\xf0\xf3\xeb\xb4\xe8.\xe5", /* 0xe3 */ (unsigned char*)"\xee\xe8\xe0\xe5\xed.\xb4\xf3\xf0\xe2\xea\xeb\xdf\xf1\xe6", /* 0xe4 */ (unsigned char*)".\xf0\xed\xf1\xeb\xf2\xec\xe7\xea\xe4\xe2\xef\xe1\xe9\xf7\xe6\xf6\xe3\xee", /* 0xe5 */ (unsigned char*)"\xe5\xed.\xe8\xe0\xf3", /* 0xe6 */ (unsigned char*)"\xe0.\xed\xe2\xf3\xe8\xee\xe4\xe5\xb4\xec\xf0\xeb", /* 0xe7 */ (unsigned char*)".\xf2\xed\xf1\xec\xe9\xe2\xf5\xea\xeb\xf7\xf0\xe4\xf6\xf8\xef\xe1\xe7\xe3", /* 0xe8 */ (unsigned char*)".\xee\xed\xf1\xf2", /* 0xe9 */ (unsigned char*)"\xee\xe0\xe8.\xf3\xf0\xb4\xeb\xf2\xe5\xf1\xed", /* 0xea */ (unsigned char*)"\xe8\xe0\xee\xfc\xe5\xb4\xdf\xfe\xf3.", /* 0xeb */ (unsigned char*)".\xe0\xe8\xee\xb4\xf3\xe5\xed", /* 0xec */ (unsigned char*)"\xe0\xee\xe5\xe8\xb4\xdf\xed\xf3.\xfc\xea\xf2\xf6\xf1\xe4\xfe", /* 0xed */ (unsigned char*)".\xe2\xf0\xe3\xeb\xec\xe4\xf1\xed\xe1\xea\xf2\xe7\xf7\xbb\xfe\xe6\xef\xf5\xf8\xf6", /* 0xee */ (unsigned char*)"\xee\xf0\xe0\xe5\xb4\xe8\xeb\xf3.", /* 0xef */ (unsigned char*)"\xee\xe0\xe8\xe5\xf3\xb4.\xf2\xed\xdf\xea\xf1\xe3\xec\xe2", /* 0xf0 */ (unsigned char*)"\xf2\xdf\xfc\xe8\xb4\xee\xea\xe0\xef\xe5\xe2\xeb.\xed\xf3\xec", /* 0xf1 */ (unsigned char*)"\xe8\xe0\xfc\xee\xe5\xb4\xf0\xf3.\xe2\xdf\xed\xea\xf2\xeb", /* 0xf2 */ (unsigned char*)".\xe2\xe4\xf2\xf1\xea\xeb\xec\xf0\xf5\xb9\xef\xf8\xe6\xf7\xe3\xed\xe1\xe7\xfe", /* 0xf3 */ (unsigned char*)"\xb4.\xee\xe0", /* 0xf4 */ (unsigned char*)".\xee\xe0\xe8\xb4\xf3", /* 0xf5 */ (unsigned char*)"\xb4\xe5\xfc\xdf\xfe", /* 0xf6 */ (unsigned char*)"\xe8\xe5\xe0\xed\xee\xb4\xf3\xea.", /* 0xf7 */ (unsigned char*)"\xe8\xe5\xe0\xea\xed.\xf3\xee\xb4\xf2\xeb", /* 0xf8 */ (unsigned char*)"\xee\xe5\xe0", /* 0xf9 */ (unsigned char*)".\xea\xf1\xed\xee\xf4", /* 0xfc */ (unsigned char*)".\xf2\xf7\xe4", /* 0xfe */ (unsigned char*)".\xea\xf2\xf7\xec\xe4\xed\xe2\xe3\xb9", /* 0xdf */ }; /* THIS IS A GENERATED TABLE, see data/totals.pl. */ static const unsigned short int SIGNIFICANT[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x08 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x18 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x38 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x48 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x68 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x78 */ 0, 0, 548, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 3416, 0, 587, 0, 0, 508, /* 0x88 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 424, 0, 0, 0, /* 0x98 */ 10642, 774, 4012, 922, 2364, 3140, 5758, 1806, /* 0xa0 */ 7121, 688, 2685, 2105, 2694, 4802, 5884, 1587, /* 0xa8 */ 0, 0, 274, 3416, 3416, 596, 0, 3981, /* 0xb0 */ 0, 0, 0, 587, 0, 688, 0, 841, /* 0xb8 */ 424, 5321, 1048, 507, 1857, 3140, 2685, 922, /* 0xc0 */ 596, 3981, 688, 2410, 2105, 1772, 4802, 6138, /* 0xc8 */ 9013, 2175, 8341, 3660, 10177, 5064, 6854, 4457, /* 0xd0 */ 6684, 688, 3629, 2467, 1772, 5056, 8047, 2988, /* 0xd8 */ 17304, 10355, 13512, 8430, 4264, 10990, 1984, 5886, /* 0xe0 */ 8686, 1861, 4820, 7448, 6050, 10720, 12616, 5976, /* 0xe8 */ 6916, 5476, 7036, 5067, 550, 1554, 4430, 5801, /* 0xf0 */ 724, 587, 0, 762, 2232, 0, 848, 1401, /* 0xf8 */ }; /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define WEIGHT_SUM 61670 /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const char *const CHARSET_NAMES[] = { "cp1251", "ibm855", "iso88595", "cp1125", "koi8u", "maccyr", }; /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const unsigned short int *const CHARSET_WEIGHTS[] = { RAW_CP1251, RAW_IBM855, RAW_ISO88595, RAW_CP1125, RAW_KOI8U, RAW_MACCYR, }; /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const unsigned char *const CHARSET_LETTERS[] = { LETTER_CP1251, LETTER_IBM855, LETTER_ISO88595, LETTER_CP1125, LETTER_KOI8U, LETTER_MACCYR, }; /* THIS IS A GENERATED TABLE, see data/totals.pl */ static const unsigned char **const CHARSET_PAIRS[] = { PAIR_CP1251, PAIR_IBM855, PAIR_ISO88595, PAIR_CP1125, PAIR_KOI8U, PAIR_MACCYR, }; /* THIS IS A GENERATED VALUE, see data/totals.pl */ #define NCHARSETS 6 Project-OSS-Revival-enca-36defd7/data/xlt.c000066400000000000000000000020171507545312400204720ustar00rootroot00000000000000#include #define NO_CHR 0xffff int main(int argc, char *argv[]) { unsigned int target_map[0x100]; unsigned int source_map[0x100]; unsigned char xlt[0x100]; unsigned int ucs2_map[0x10000]; FILE *f; int i; int c; if (argc < 1) { fprintf(stderr, "Error: Missing arguments!\n"); return 0; } f = fopen(argv[1], "r"); for (i = 0; i < 0x100; i++) fscanf(f, "%x", source_map + i); fclose(f); f = fopen(argv[2], "r"); for (i = 0; i < 0x100; i++) fscanf(f, "%x", target_map + i); fclose(f); for (i = 0; i < 0x100; i++) xlt[i] = (unsigned char)i; for (i = 0; i < 0x10000; i++) ucs2_map[i] = NO_CHR; for (i = 0xff; i >= 0; i--) { if (target_map[i] != NO_CHR) ucs2_map[target_map[i]] = (unsigned int)i; } for (i = 0xff; i >= 0; i--) { if (source_map[i] != NO_CHR && ucs2_map[source_map[i]] != NO_CHR) xlt[i] = (unsigned char)ucs2_map[source_map[i]]; } while ((c = getchar()) != EOF) putchar(xlt[c]); return 0; } /* vim: ts=2 */ Project-OSS-Revival-enca-36defd7/depcomp000077500000000000000000000562171507545312400201760ustar00rootroot00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2024-06-19.01; # UTC # Copyright (C) 1999-2024 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . GNU Automake home page: . General help using GNU software: . EOF exit $? ;; -v | --v*) echo "depcomp (GNU Automake) $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interference from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsolete pre-3.x GCC compilers. ## but also to in-use compilers like IBM xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: Project-OSS-Revival-enca-36defd7/devel-docs/000077500000000000000000000000001507545312400206335ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/devel-docs/.gitignore000066400000000000000000000000101507545312400226120ustar00rootroot00000000000000*.stamp Project-OSS-Revival-enca-36defd7/devel-docs/Makefile.am000066400000000000000000000142201507545312400226660ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in # This is a blank Makefile.am for using gtk-doc. # Copy this to your project's API docs directory and modify the variables to # suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples # of using the various options. # The name of the module, e.g. 'glib'. DOC_MODULE = libenca # The top-level SGML file. Change it if you want. DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.sgml # The directory containing the source code. Relative to $(srcdir). # gtk-doc will search all .c & .h files beneath here for inline comments # documenting functions and macros. DOC_SOURCE_DIR = ${top_srcdir}/lib # Extra options to pass to gtkdoc-scanobj or gtkdoc-scangobj. SCANOBJ_OPTIONS = # Extra options to supply to gtkdoc-scan. SCAN_OPTIONS = # Extra options to supply to gtkdoc-mkdb. MKDB_OPTIONS = # Extra options to supply to gtkdoc-fixref. FIXXREF_OPTIONS = # Used for dependencies. HFILE_GLOB = $(DOC_SOURCE_DIR)/*.h CFILE_GLOB = $(DOC_SOURCE_DIR)/*.c # Header files to ignore when scanning. IGNORE_HFILES = # Images to copy into HTML directory. HTML_IMAGES = # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). content_files = # Other files to distribute. extra_files = # CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib # contains GtkObjects/GObjects and you want to document signals and properties. GTKDOC_CFLAGS = GTKDOC_LIBS = GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) # If you need to override some of the declarations, place them in the # $(DOC_MODULE)-overrides.txt file and uncomment the second line here. DOC_OVERRIDES = #DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt ########################################################################### # Everything below here is generic and you shouldn't need to change it. ########################################################################### TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) EXTRA_DIST = \ $(content_files) \ $(extra_files) \ $(HTML_IMAGES) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_OVERRIDES) DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ $(srcdir)/sgml.stamp $(srcdir)/html.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).signals \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).intefraces if ENABLE_GTK_DOC docs: html-build.stamp #### scan #### scan-build.stamp: $(HFILE_GLOB) @echo '*** Scanning header files ***' if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scanobj $(SCANOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ else \ cd $(srcdir) ; \ for i in $(SCANOBJ_FILES) ; do \ test -f $$i || touch $$i ; \ done \ fi cd $(srcdir) && \ gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp @true # #### templates #### # # tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES) # @echo '*** Rebuilding template files ***' # cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) # touch tmpl-build.stamp # # tmpl.stamp: tmpl-build.stamp # @true #### sgml #### sgml-build.stamp: $(CFILE_GLOB) $(wildcard $(srcdir)/tmpl/*.sgml) @echo '*** Building XML ***' cd $(srcdir) && \ gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml $(MKDB_OPTIONS) touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true #### html #### html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @echo '*** Building HTML ***' test -d $(srcdir)/html || mkdir $(srcdir)/html cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) @echo '-- Fixing Crossreferences' cd $(srcdir) && gtkdoc-fixxref --module=libenca --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) touch html-build.stamp endif ############## clean-local: rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS) maintainer-clean-local: clean cd $(srcdir) && rm -rf xml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt if ENABLE_GTK_DOC install-data-local: $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR) (installfiles=`echo $(srcdir)/html/*.*`; \ if test "$$installfiles" = '$(srcdir)/html/*.*'; \ then echo '-- Nothing to install' ; \ else \ for i in $$installfiles; do \ echo '-- Installing '$$i ; \ $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \ done; \ echo '-- Installing $(srcdir)/html/index.sgml' ; \ $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \ echo '-- Installing $(srcdir)/html/$(DOC_MODULE).devhelp2' ; \ $(INSTALL_DATA) $(srcdir)/html/$(DOC_MODULE).devhelp2 $(DESTDIR)$(TARGET_DIR); \ fi) uninstall-local: (installfiles=`cd $(srcdir)/html >/dev/null && echo *.*`; \ if test "$$installfiles" = '*.*'; \ then echo '-- Nothing to uninstall' ; \ else \ for i in $$installfiles; do \ echo '-- Removing '$$i ; \ rm -f $(DESTDIR)$(TARGET_DIR)/$$i; \ done; \ echo '-- Removing index.sgml' ; \ rm -f $(DESTDIR)$(TARGET_DIR)/index.sgml; \ echo '-- Removing $(DOC_MODULE).devhelp2' ; \ rm -f $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE).devhelp2; \ fi) endif # # Require gtk-doc when making dist # if ENABLE_GTK_DOC dist-check-gtkdoc: else dist-check-gtkdoc: @echo "*** gtk-doc must be installed and enabled in order to make dist" @false endif dist-hook: dist-check-gtkdoc dist-hook-local mkdir $(distdir)/tmpl mkdir $(distdir)/xml mkdir $(distdir)/html cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl cp $(srcdir)/xml/*.xml $(distdir)/xml cp $(srcdir)/html/index.sgml $(distdir)/html -cp $(srcdir)/html/$(DOC_MODULE).devhelp2 $(distdir)/html -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html images=$(HTML_IMAGES) ; \ for i in $$images ; do \ cp $(srcdir)/$$i $(distdir)/html ; \ done .PHONY : dist-hook-local Project-OSS-Revival-enca-36defd7/devel-docs/Makefile.in000066400000000000000000000515701507545312400227100ustar00rootroot00000000000000# Makefile.in generated by automake 1.17 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2024 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # This is a blank Makefile.am for using gtk-doc. # Copy this to your project's API docs directory and modify the variables to # suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples # of using the various options. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) am__rm_f = rm -f $(am__rm_f_notfound) am__rm_rf = rm -rf $(am__rm_f_notfound) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = devel-docs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gcov.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libiconv.m4 \ $(top_srcdir)/m4/libm.m4 $(top_srcdir)/m4/librecode.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/localias.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/m4_ax_prog_cc_for_build.m4 \ $(top_srcdir)/m4/tools.m4 $(top_srcdir)/m4/typevar.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_EXEEXT = @BUILD_EXEEXT@ BUILD_OBJEXT = @BUILD_OBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ CONVERTER_LIBS = @CONVERTER_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CSCOPE = @CSCOPE@ CSTOCS_PROG = @CSTOCS_PROG@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFAULT_CONVERTER_LIST = @DEFAULT_CONVERTER_LIST@ DEFAULT_EXTERNAL_CONVERTER = @DEFAULT_EXTERNAL_CONVERTER@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GCOV = @GCOV@ GCOV_CPPFLAGS = @GCOV_CPPFLAGS@ GCOV_FLAGS = @GCOV_FLAGS@ GCOV_LDFLAGS = @GCOV_LDFLAGS@ GREP = @GREP@ GTKDOC = @GTKDOC@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ LIBICONV = @LIBICONV@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAP_PROG = @MAP_PROG@ MKDIR_P = @MKDIR_P@ MKTEMP_PROG = @MKTEMP_PROG@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PICONV_PROG = @PICONV_PROG@ RANLIB = @RANLIB@ RECODE_PROG = @RECODE_PROG@ RELEASE = @RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHELL_RANDOM_FILENAME = @SHELL_RANDOM_FILENAME@ STRIP = @STRIP@ UMAP_PROG = @UMAP_PROG@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CC_FOR_BUILD = @ac_ct_CC_FOR_BUILD@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__rm_f_notfound = @am__rm_f_notfound@ am__tar = @am__tar@ am__untar = @am__untar@ am__xargs_n = @am__xargs_n@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # The name of the module, e.g. 'glib'. DOC_MODULE = libenca # The top-level SGML file. Change it if you want. DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.sgml # The directory containing the source code. Relative to $(srcdir). # gtk-doc will search all .c & .h files beneath here for inline comments # documenting functions and macros. DOC_SOURCE_DIR = ${top_srcdir}/lib # Extra options to pass to gtkdoc-scanobj or gtkdoc-scangobj. SCANOBJ_OPTIONS = # Extra options to supply to gtkdoc-scan. SCAN_OPTIONS = # Extra options to supply to gtkdoc-mkdb. MKDB_OPTIONS = # Extra options to supply to gtkdoc-fixref. FIXXREF_OPTIONS = # Used for dependencies. HFILE_GLOB = $(DOC_SOURCE_DIR)/*.h CFILE_GLOB = $(DOC_SOURCE_DIR)/*.c # Header files to ignore when scanning. IGNORE_HFILES = # Images to copy into HTML directory. HTML_IMAGES = # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE). content_files = # Other files to distribute. extra_files = # CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib # contains GtkObjects/GObjects and you want to document signals and properties. GTKDOC_CFLAGS = GTKDOC_LIBS = GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) # If you need to override some of the declarations, place them in the # $(DOC_MODULE)-overrides.txt file and uncomment the second line here. DOC_OVERRIDES = #DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt ########################################################################### # Everything below here is generic and you shouldn't need to change it. ########################################################################### TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE) EXTRA_DIST = \ $(content_files) \ $(extra_files) \ $(HTML_IMAGES) \ $(DOC_MAIN_SGML_FILE) \ $(DOC_MODULE)-sections.txt \ $(DOC_OVERRIDES) DOC_STAMPS = scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ $(srcdir)/sgml.stamp $(srcdir)/html.stamp SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).signals \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).intefraces all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits devel-docs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits devel-docs/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -$(am__rm_f) $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." @ENABLE_GTK_DOC_FALSE@install-data-local: @ENABLE_GTK_DOC_FALSE@uninstall-local: clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-local .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ clean-local cscopelist-am ctags-am dist-hook distclean \ distclean-generic distclean-libtool distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-data-local install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic maintainer-clean-local mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am uninstall-local .PRECIOUS: Makefile @ENABLE_GTK_DOC_TRUE@docs: html-build.stamp #### scan #### @ENABLE_GTK_DOC_TRUE@scan-build.stamp: $(HFILE_GLOB) @ENABLE_GTK_DOC_TRUE@ @echo '*** Scanning header files ***' @ENABLE_GTK_DOC_TRUE@ if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \ @ENABLE_GTK_DOC_TRUE@ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scanobj $(SCANOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ @ENABLE_GTK_DOC_TRUE@ else \ @ENABLE_GTK_DOC_TRUE@ cd $(srcdir) ; \ @ENABLE_GTK_DOC_TRUE@ for i in $(SCANOBJ_FILES) ; do \ @ENABLE_GTK_DOC_TRUE@ test -f $$i || touch $$i ; \ @ENABLE_GTK_DOC_TRUE@ done \ @ENABLE_GTK_DOC_TRUE@ fi @ENABLE_GTK_DOC_TRUE@ cd $(srcdir) && \ @ENABLE_GTK_DOC_TRUE@ gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) @ENABLE_GTK_DOC_TRUE@ touch scan-build.stamp @ENABLE_GTK_DOC_TRUE@$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp @ENABLE_GTK_DOC_TRUE@ @true # #### templates #### # # tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES) # @echo '*** Rebuilding template files ***' # cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) # touch tmpl-build.stamp # # tmpl.stamp: tmpl-build.stamp # @true #### sgml #### @ENABLE_GTK_DOC_TRUE@sgml-build.stamp: $(CFILE_GLOB) $(wildcard $(srcdir)/tmpl/*.sgml) @ENABLE_GTK_DOC_TRUE@ @echo '*** Building XML ***' @ENABLE_GTK_DOC_TRUE@ cd $(srcdir) && \ @ENABLE_GTK_DOC_TRUE@ gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml $(MKDB_OPTIONS) @ENABLE_GTK_DOC_TRUE@ touch sgml-build.stamp @ENABLE_GTK_DOC_TRUE@sgml.stamp: sgml-build.stamp @ENABLE_GTK_DOC_TRUE@ @true #### html #### @ENABLE_GTK_DOC_TRUE@html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) @ENABLE_GTK_DOC_TRUE@ @echo '*** Building HTML ***' @ENABLE_GTK_DOC_TRUE@ test -d $(srcdir)/html || mkdir $(srcdir)/html @ENABLE_GTK_DOC_TRUE@ cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) @ENABLE_GTK_DOC_TRUE@ test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) @ENABLE_GTK_DOC_TRUE@ @echo '-- Fixing Crossreferences' @ENABLE_GTK_DOC_TRUE@ cd $(srcdir) && gtkdoc-fixxref --module=libenca --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) @ENABLE_GTK_DOC_TRUE@ touch html-build.stamp ############## clean-local: rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS) maintainer-clean-local: clean cd $(srcdir) && rm -rf xml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @ENABLE_GTK_DOC_TRUE@install-data-local: @ENABLE_GTK_DOC_TRUE@ $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR) @ENABLE_GTK_DOC_TRUE@ (installfiles=`echo $(srcdir)/html/*.*`; \ @ENABLE_GTK_DOC_TRUE@ if test "$$installfiles" = '$(srcdir)/html/*.*'; \ @ENABLE_GTK_DOC_TRUE@ then echo '-- Nothing to install' ; \ @ENABLE_GTK_DOC_TRUE@ else \ @ENABLE_GTK_DOC_TRUE@ for i in $$installfiles; do \ @ENABLE_GTK_DOC_TRUE@ echo '-- Installing '$$i ; \ @ENABLE_GTK_DOC_TRUE@ $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \ @ENABLE_GTK_DOC_TRUE@ done; \ @ENABLE_GTK_DOC_TRUE@ echo '-- Installing $(srcdir)/html/index.sgml' ; \ @ENABLE_GTK_DOC_TRUE@ $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \ @ENABLE_GTK_DOC_TRUE@ echo '-- Installing $(srcdir)/html/$(DOC_MODULE).devhelp2' ; \ @ENABLE_GTK_DOC_TRUE@ $(INSTALL_DATA) $(srcdir)/html/$(DOC_MODULE).devhelp2 $(DESTDIR)$(TARGET_DIR); \ @ENABLE_GTK_DOC_TRUE@ fi) @ENABLE_GTK_DOC_TRUE@uninstall-local: @ENABLE_GTK_DOC_TRUE@ (installfiles=`cd $(srcdir)/html >/dev/null && echo *.*`; \ @ENABLE_GTK_DOC_TRUE@ if test "$$installfiles" = '*.*'; \ @ENABLE_GTK_DOC_TRUE@ then echo '-- Nothing to uninstall' ; \ @ENABLE_GTK_DOC_TRUE@ else \ @ENABLE_GTK_DOC_TRUE@ for i in $$installfiles; do \ @ENABLE_GTK_DOC_TRUE@ echo '-- Removing '$$i ; \ @ENABLE_GTK_DOC_TRUE@ rm -f $(DESTDIR)$(TARGET_DIR)/$$i; \ @ENABLE_GTK_DOC_TRUE@ done; \ @ENABLE_GTK_DOC_TRUE@ echo '-- Removing index.sgml' ; \ @ENABLE_GTK_DOC_TRUE@ rm -f $(DESTDIR)$(TARGET_DIR)/index.sgml; \ @ENABLE_GTK_DOC_TRUE@ echo '-- Removing $(DOC_MODULE).devhelp2' ; \ @ENABLE_GTK_DOC_TRUE@ rm -f $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE).devhelp2; \ @ENABLE_GTK_DOC_TRUE@ fi) # # Require gtk-doc when making dist # @ENABLE_GTK_DOC_TRUE@dist-check-gtkdoc: @ENABLE_GTK_DOC_FALSE@dist-check-gtkdoc: @ENABLE_GTK_DOC_FALSE@ @echo "*** gtk-doc must be installed and enabled in order to make dist" @ENABLE_GTK_DOC_FALSE@ @false dist-hook: dist-check-gtkdoc dist-hook-local mkdir $(distdir)/tmpl mkdir $(distdir)/xml mkdir $(distdir)/html cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl cp $(srcdir)/xml/*.xml $(distdir)/xml cp $(srcdir)/html/index.sgml $(distdir)/html -cp $(srcdir)/html/$(DOC_MODULE).devhelp2 $(distdir)/html -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html images=$(HTML_IMAGES) ; \ for i in $$images ; do \ cp $(srcdir)/$$i $(distdir)/html ; \ done .PHONY : dist-hook-local # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: # Tell GNU make to disable its built-in pattern rules. %:: %,v %:: RCS/%,v %:: RCS/% %:: s.% %:: SCCS/s.% Project-OSS-Revival-enca-36defd7/devel-docs/html/000077500000000000000000000000001507545312400215775ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/devel-docs/html/ch01.html000066400000000000000000000046461507545312400232320ustar00rootroot00000000000000 Enca Library API: Enca Library Reference Manual

Enca Library API

Analyser — Basic analyser interface.
Typedefs and Constants — Enca library typedefs, enums and constants.
Charsets and Surfaces — Functions and macros for getting something sensible from EncaEncoding.
Auxiliary Functions — Variouis auxiliary functions and informations about libenca.
Project-OSS-Revival-enca-36defd7/devel-docs/html/home.png000066400000000000000000000002511507545312400232330ustar00rootroot00000000000000PNG  IHDRapIDATxc@*o NbfbY9h&ӨěA @;\a gȀs A2{4E |0: `p%a;(ft6YIENDB`Project-OSS-Revival-enca-36defd7/devel-docs/html/index.html000066400000000000000000000036021507545312400235750ustar00rootroot00000000000000 Enca Library Reference Manual: Enca Library Reference Manual

Enca Library API
Analyser — Basic analyser interface.
Typedefs and Constants — Enca library typedefs, enums and constants.
Charsets and Surfaces — Functions and macros for getting something sensible from EncaEncoding.
Auxiliary Functions — Variouis auxiliary functions and informations about libenca.
Project-OSS-Revival-enca-36defd7/devel-docs/html/index.sgml000066400000000000000000000162051507545312400235760ustar00rootroot00000000000000 Project-OSS-Revival-enca-36defd7/devel-docs/html/left-insensitive.png000066400000000000000000000005161507545312400255770ustar00rootroot00000000000000PNG  IHDR(-S~PLTEe 1f$j(i 0h2*ip+hHpkH! v:adJIENDB`Project-OSS-Revival-enca-36defd7/devel-docs/html/left.png000066400000000000000000000002711507545312400232370ustar00rootroot00000000000000PNG  IHDRaIDATx! AaLUIO,z1=zFtj$w_߾zS:l R8I5FE<4(ݔ2{73͉҄':F 64I7JM>r"(!QuIENDB`Project-OSS-Revival-enca-36defd7/devel-docs/html/libenca-Analyser.html000066400000000000000000000136241507545312400256440ustar00rootroot00000000000000 Analyser: Enca Library Reference Manual

Analyser

Analyser — Basic analyser interface.

Description

Basically you want to allocate an analyser with enca_analyser_alloc() for some language, use enca_analyse() (or enca_analyse_const()) on a buffer to find its encoding, and interpret the results with something like enca_charset_name(). The analyser then can be used for another buffer. Once you no longer need it, call enca_analyser_free() to release it. A single working example is better than a hundred pages of reference manual.

A minimal Enca library application – Czech encoding detector.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <stdio.h>
#include <enca.h>
int main(void)
{
EncaAnalyser analyser;
EncaEncoding encoding;
unsigned char buffer[4096];
size_t buflen;

buflen = fread(buffer, 1, 4096, stdin);
analyser = enca_analyser_alloc("cs");
encoding = enca_analyse(analyser, buffer, buflen);
printf("Charset: %s\n", enca_charset_name(encoding.charset,
                                             ENCA_NAME_STYLE_HUMAN));
enca_analyser_free(analyser);

return 0;
}

Functions

Project-OSS-Revival-enca-36defd7/devel-docs/html/libenca-Auxiliary-Functions.html000066400000000000000000000044111507545312400277750ustar00rootroot00000000000000 Auxiliary Functions: Enca Library Reference Manual

Auxiliary Functions

Auxiliary Functions — Variouis auxiliary functions and informations about libenca.

Description

Functions

Project-OSS-Revival-enca-36defd7/devel-docs/html/libenca-Charsets-and-Surfaces.html000066400000000000000000000050631507545312400301510ustar00rootroot00000000000000 Charsets and Surfaces: Enca Library Reference Manual

Charsets and Surfaces

Charsets and Surfaces — Functions and macros for getting something sensible from EncaEncoding.

Description

Functions

Project-OSS-Revival-enca-36defd7/devel-docs/html/libenca-Typedefs-and-Constants.html000066400000000000000000000435061507545312400303650ustar00rootroot00000000000000 Typedefs and Constants: Enca Library Reference Manual

Typedefs and Constants

Typedefs and Constants — Enca library typedefs, enums and constants.

Types and Values

Description

Functions

Types and Values

EncaAnalyser

typedef struct _EncaAnalyserState *EncaAnalyser;

EncaEncoding

typedef struct _EncaEncoding EncaEncoding;

Encoding, i.e. charset and surface.

This is what enca_analyse() and enca_analyse_const() return.

The charset field is an opaque numerical charset identifier, which has no meaning outside Enca library. You will probably want to use it only as enca_charset_name() argument. It is only guaranteed not to change meaning during program execution time; change of its interpretation (e.g. due to addition of new charsets) is not considered API change.

The surface field is a combination of EncaSurface flags. You may want to ignore it completely; you should use enca_set_interpreted_surfaces() to disable weird surfaces then.

Members


ENCA_CS_UNKNOWN

#define ENCA_CS_UNKNOWN (-1)

Unknown character set id.

Use enca_charset_is_known() to check for unknown charset instead of direct comparsion.


enum EncaSurface

Surface flags.

Members

ENCA_SURFACE_EOL_CR

End-of-lines are represented with CR's.

 

ENCA_SURFACE_EOL_LF

End-of-lines are represented with LF's.

 

ENCA_SURFACE_EOL_CRLF

End-of-lines are represented with CRLF's.

 

ENCA_SURFACE_EOL_MIX

Several end-of-line types, mixed.

 

ENCA_SURFACE_EOL_BIN

End-of-line concept not applicable (binary data).

 

ENCA_SURFACE_MASK_EOL

Mask for end-of-line surfaces.

 

ENCA_SURFACE_PERM_21

Odd and even bytes swapped.

 

ENCA_SURFACE_PERM_4321

Reversed byte sequence in 4byte words.

 

ENCA_SURFACE_PERM_MIX

Chunks with both endianess, concatenated.

 

ENCA_SURFACE_MASK_PERM

Mask for permutation surfaces.

 

ENCA_SURFACE_QP

Quoted printables.

 

ENCA_SURFACE_REMOVE

Recode `remove' surface.

 

ENCA_SURFACE_UNKNOWN

Unknown surface.

 

ENCA_SURFACE_MASK_ALL

Mask for all bits, withnout ENCA_SURFACE_UNKNOWN.

 

enum EncaCharsetFlags

Charset properties.

Flags ENCA_CHARSET_7BIT, ENCA_CHARSET_8BIT, ENCA_CHARSET_16BIT, ENCA_CHARSET_32BIT tell how many bits a `fundamental piece' consists of. This is different from bits per character; r.g. UTF-8 consists of 8bit pieces (bytes), but character can be composed from 1 to 6 of them.

Members

ENCA_CHARSET_7BIT

Characters are represented with 7bit characters.

 

ENCA_CHARSET_8BIT

Characters are represented with bytes.

 

ENCA_CHARSET_16BIT

Characters are represented with 2byte words.

 

ENCA_CHARSET_32BIT

Characters are represented with 4byte words.

 

ENCA_CHARSET_FIXED

One characters consists of one fundamental piece.

 

ENCA_CHARSET_VARIABLE

One character consists of variable number of fundamental pieces.

 

ENCA_CHARSET_BINARY

Charset is binary from ASCII viewpoint.

 

ENCA_CHARSET_REGULAR

Language dependent (8bit) charset.

 

ENCA_CHARSET_MULTIBYTE

Multibyte charset.

 

enum EncaNameStyle

Charset naming styles and conventions.

Members

ENCA_NAME_STYLE_ENCA

Default, implicit charset name in Enca.

 

ENCA_NAME_STYLE_RFC1345

RFC 1345 or otherwise canonical charset name.

 

ENCA_NAME_STYLE_CSTOCS

Cstocs charset name (may not exist).

 

ENCA_NAME_STYLE_ICONV

Iconv charset name (may not exist).

 

ENCA_NAME_STYLE_HUMAN

Human comprehensible description.

 

ENCA_NAME_STYLE_MIME

Preferred MIME name (may not exist).

 

enum EncaErrno

Error codes.

Members

ENCA_EOK

OK.

 

ENCA_EINVALUE

Invalid value (usually of an option).

 

ENCA_EEMPTY

Sample is empty.

 

ENCA_EFILTERED

After filtering, (almost) nothing remained.

 

ENCA_ENOCS8

Mulitibyte tests failed and language contains no 8bit charsets.

 

ENCA_ESIGNIF

Too few significant characters.

 

ENCA_EWINNER

No clear winner.

 

ENCA_EGARBAGE

Sample is garbage.

 

ENCA_NOT_A_CHAR

#define ENCA_NOT_A_CHAR 0xffff

Not-a-character in unicode tables.

Project-OSS-Revival-enca-36defd7/devel-docs/html/libenca.devhelp2000066400000000000000000000137371507545312400246420ustar00rootroot00000000000000 Project-OSS-Revival-enca-36defd7/devel-docs/html/right-insensitive.png000066400000000000000000000003511507545312400257570ustar00rootroot00000000000000PNG  IHDRaIDATxc|`߾}޽{2Ԑ ـ;v\5={lI6d۶m@+` Yj3 z-04/@NA 2YfC Ȏ%Z͛6@5CC5j~)@go RafIENDB`Project-OSS-Revival-enca-36defd7/devel-docs/html/right.png000066400000000000000000000002701507545312400234210ustar00rootroot00000000000000PNG  IHDRaIDATx! AqaMI +^4YTM4D MyO/ɂ>E. Iץ"3!]l,(jE͇5DŖ<3'x0͌{nIu$2"]pf!N IENDB`Project-OSS-Revival-enca-36defd7/devel-docs/html/style.css000066400000000000000000000274711507545312400234640ustar00rootroot00000000000000body { font-family: cantarell, sans-serif; } .synopsis, .classsynopsis { /* tango:aluminium 1/2 */ background: #eeeeec; background: rgba(238, 238, 236, 0.5); border: solid 1px rgb(238, 238, 236); padding: 0.5em; } .programlisting { /* tango:sky blue 0/1 */ /* fallback for no rgba support */ background: #e6f3ff; border: solid 1px #729fcf; background: rgba(114, 159, 207, 0.1); border: solid 1px rgba(114, 159, 207, 0.2); padding: 0.5em; } .variablelist { padding: 4px; margin-left: 3em; } .variablelist td:first-child { vertical-align: top; } span.nowrap { white-space: nowrap; } div.gallery-float { float: left; padding: 10px; } div.gallery-float img { border-style: none; } div.gallery-spacer { clear: both; } a, a:visited { text-decoration: none; /* tango:sky blue 2 */ color: #3465a4; } a:hover { text-decoration: underline; /* tango:sky blue 1 */ color: #729fcf; } .function_type, .variable_type, .property_type, .signal_type, .parameter_name, .struct_member_name, .union_member_name, .define_keyword, .datatype_keyword, .typedef_keyword { text-align: right; } /* dim non-primary columns */ .c_punctuation, .function_type, .variable_type, .property_type, .signal_type, .define_keyword, .datatype_keyword, .typedef_keyword, .property_flags, .signal_flags, .parameter_annotations, .enum_member_annotations, .struct_member_annotations, .union_member_annotations { color: #888a85; } .function_type a, .function_type a:visited, .function_type a:hover, .property_type a, .property_type a:visited, .property_type a:hover, .signal_type a, .signal_type a:visited, .signal_type a:hover, .signal_flags a, .signal_flags a:visited, .signal_flags a:hover { color: #729fcf; } td p { margin: 0.25em; } div.informaltable table[border="1"], div.table table { border-collapse: collapse; border-spacing: 0px; /* tango:aluminium 3 */ border: solid 1px #babdb6; } div.informaltable table[border="1"] td, div.informaltable table th, div.table table td, div.table table th { /* tango:aluminium 3 */ border: solid 1px #babdb6; padding: 3px; vertical-align: top; } div.informaltable table[border="1"] th, div.table table th { /* tango:aluminium 2 */ background-color: #d3d7cf; } h4 { color: #555753; margin-top: 1em; margin-bottom: 1em; } hr { /* tango:aluminium 1 */ color: #d3d7cf; background: #d3d7cf; border: none 0px; height: 1px; clear: both; margin: 2.0em 0em 2.0em 0em; } dl.toc dt { padding-bottom: 0.25em; } dl.toc > dt { padding-top: 0.25em; padding-bottom: 0.25em; font-weight: bold; } dl.toc > dl { padding-bottom: 0.5em; } .parameter { font-style: normal; } .footer { padding-top: 3.5em; /* tango:aluminium 3 */ color: #babdb6; text-align: center; font-size: 80%; } .informalfigure, .figure { margin: 1em; } .informalexample, .example { margin-top: 1em; margin-bottom: 1em; } .warning { /* tango:orange 0/1 */ background: #ffeed9; background: rgba(252, 175, 62, 0.1); border-color: #ffb04f; border-color: rgba(252, 175, 62, 0.2); } .note { /* tango:chameleon 0/0.5 */ background: #d8ffb2; background: rgba(138, 226, 52, 0.1); border-color: #abf562; border-color: rgba(138, 226, 52, 0.2); } div.blockquote { border-color: #eeeeec; } .note, .warning, div.blockquote { padding: 0.5em; border-width: 1px; border-style: solid; margin: 2em; } .note p, .warning p { margin: 0; } div.warning h3.title, div.note h3.title { display: none; } p + div.section { margin-top: 1em; } div.refnamediv, div.refsynopsisdiv, div.refsect1, div.refsect2, div.toc, div.section { margin-bottom: 1em; } /* blob links */ h2 .extralinks, h3 .extralinks { float: right; /* tango:aluminium 3 */ color: #babdb6; font-size: 80%; font-weight: normal; } .lineart { color: #d3d7cf; font-weight: normal; } .annotation { /* tango:aluminium 5 */ color: #555753; font-weight: normal; } .structfield { font-style: normal; font-weight: normal; } acronym,abbr { border-bottom: 1px dotted gray; } .listing_frame { /* tango:sky blue 1 */ border: solid 1px #729fcf; border: solid 1px rgba(114, 159, 207, 0.2); padding: 0px; } .listing_lines, .listing_code { margin-top: 0px; margin-bottom: 0px; padding: 0.5em; } .listing_lines { /* tango:sky blue 0.5 */ background: #a6c5e3; background: rgba(114, 159, 207, 0.2); /* tango:aluminium 6 */ color: #2e3436; } .listing_code { /* tango:sky blue 0 */ background: #e6f3ff; background: rgba(114, 159, 207, 0.1); } .listing_code .programlisting { /* override from previous */ border: none 0px; padding: 0px; background: none; } .listing_lines pre, .listing_code pre { margin: 0px; } @media screen { /* these have a as a first child, but since there are no parent selectors * we can't use that. */ a.footnote { position: relative; top: 0em ! important; } /* this is needed so that the local anchors are displayed below the naviagtion */ div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name] { display: inline-block; position: relative; top:-5em; } /* this seems to be a bug in the xsl style sheets when generating indexes */ div.index div.index { top: 0em; } /* make space for the fixed navigation bar and add space at the bottom so that * link targets appear somewhat close to top */ body { padding-top: 2.5em; padding-bottom: 500px; max-width: 60em; } p { max-width: 60em; } /* style and size the navigation bar */ table.navigation#top { position: fixed; background: #e2e2e2; border-bottom: solid 1px #babdb6; border-spacing: 5px; margin-top: 0; margin-bottom: 0; top: 0; left: 0; z-index: 10; } table.navigation#top td { padding-left: 6px; padding-right: 6px; } .navigation a, .navigation a:visited { /* tango:sky blue 3 */ color: #204a87; } .navigation a:hover { /* tango:sky blue 2 */ color: #3465a4; } td.shortcuts { /* tango:sky blue 2 */ color: #3465a4; font-size: 80%; white-space: nowrap; } td.shortcuts .dim { color: #babdb6; } .navigation .title { font-size: 80%; max-width: none; margin: 0px; font-weight: normal; } } @media screen and (min-width: 60em) { /* screen larger than 60em */ body { margin: auto; } } @media screen and (max-width: 60em) { /* screen less than 60em */ #nav_hierarchy { display: none; } #nav_interfaces { display: none; } #nav_prerequisites { display: none; } #nav_derived_interfaces { display: none; } #nav_implementations { display: none; } #nav_child_properties { display: none; } #nav_style_properties { display: none; } #nav_index { display: none; } #nav_glossary { display: none; } .gallery_image { display: none; } .property_flags { display: none; } .signal_flags { display: none; } .parameter_annotations { display: none; } .enum_member_annotations { display: none; } .struct_member_annotations { display: none; } .union_member_annotations { display: none; } /* now that a column is hidden, optimize space */ col.parameters_name { width: auto; } col.parameters_description { width: auto; } col.struct_members_name { width: auto; } col.struct_members_description { width: auto; } col.enum_members_name { width: auto; } col.enum_members_description { width: auto; } col.union_members_name { width: auto; } col.union_members_description { width: auto; } .listing_lines { display: none; } } @media print { table.navigation { visibility: collapse; display: none; } div.titlepage table.navigation { visibility: visible; display: table; background: #e2e2e2; border: solid 1px #babdb6; margin-top: 0; margin-bottom: 0; top: 0; left: 0; height: 3em; } } pre { line-height: 125%; } td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .hll { background-color: #ffffcc } .c { color: #3D7B7B; font-style: italic } /* Comment */ .err { border: 1px solid #FF0000 } /* Error */ .k { color: #008000; font-weight: bold } /* Keyword */ .o { color: #666666 } /* Operator */ .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */ .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */ .cp { color: #9C6500 } /* Comment.Preproc */ .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */ .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */ .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */ .gd { color: #A00000 } /* Generic.Deleted */ .ge { font-style: italic } /* Generic.Emph */ .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ .gr { color: #E40000 } /* Generic.Error */ .gh { color: #000080; font-weight: bold } /* Generic.Heading */ .gi { color: #008400 } /* Generic.Inserted */ .go { color: #717171 } /* Generic.Output */ .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ .gs { font-weight: bold } /* Generic.Strong */ .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ .gt { color: #0044DD } /* Generic.Traceback */ .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ .kp { color: #008000 } /* Keyword.Pseudo */ .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ .kt { color: #B00040 } /* Keyword.Type */ .m { color: #666666 } /* Literal.Number */ .s { color: #BA2121 } /* Literal.String */ .na { color: #687822 } /* Name.Attribute */ .nb { color: #008000 } /* Name.Builtin */ .nc { color: #0000FF; font-weight: bold } /* Name.Class */ .no { color: #880000 } /* Name.Constant */ .nd { color: #AA22FF } /* Name.Decorator */ .ni { color: #717171; font-weight: bold } /* Name.Entity */ .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */ .nf { color: #0000FF } /* Name.Function */ .nl { color: #767600 } /* Name.Label */ .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ .nt { color: #008000; font-weight: bold } /* Name.Tag */ .nv { color: #19177C } /* Name.Variable */ .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ .w { color: #bbbbbb } /* Text.Whitespace */ .mb { color: #666666 } /* Literal.Number.Bin */ .mf { color: #666666 } /* Literal.Number.Float */ .mh { color: #666666 } /* Literal.Number.Hex */ .mi { color: #666666 } /* Literal.Number.Integer */ .mo { color: #666666 } /* Literal.Number.Oct */ .sa { color: #BA2121 } /* Literal.String.Affix */ .sb { color: #BA2121 } /* Literal.String.Backtick */ .sc { color: #BA2121 } /* Literal.String.Char */ .dl { color: #BA2121 } /* Literal.String.Delimiter */ .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ .s2 { color: #BA2121 } /* Literal.String.Double */ .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */ .sh { color: #BA2121 } /* Literal.String.Heredoc */ .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */ .sx { color: #008000 } /* Literal.String.Other */ .sr { color: #A45A77 } /* Literal.String.Regex */ .s1 { color: #BA2121 } /* Literal.String.Single */ .ss { color: #19177C } /* Literal.String.Symbol */ .bp { color: #008000 } /* Name.Builtin.Pseudo */ .fm { color: #0000FF } /* Name.Function.Magic */ .vc { color: #19177C } /* Name.Variable.Class */ .vg { color: #19177C } /* Name.Variable.Global */ .vi { color: #19177C } /* Name.Variable.Instance */ .vm { color: #19177C } /* Name.Variable.Magic */ .il { color: #666666 } /* Literal.Number.Integer.Long */Project-OSS-Revival-enca-36defd7/devel-docs/html/up-insensitive.png000066400000000000000000000004401507545312400252650ustar00rootroot00000000000000PNG  IHDR(-S`PLTEÿ[g&tRNS !1EMinoM3PIDATxڭJD1g,GԱ-5wn G7'30"vET!&~_b?rgԣ>1vIENDB`Project-OSS-Revival-enca-36defd7/devel-docs/html/up.png000066400000000000000000000002721507545312400227320ustar00rootroot00000000000000PNG  IHDRaIDATx0 `7#t:HPw(.QG)Dc2z}xa< 1_M!F(ZU c !,po-i $u{ 6VCī"Z7̵*׎IENDB`Project-OSS-Revival-enca-36defd7/devel-docs/libenca-decl-list.txt000066400000000000000000000025321507545312400246510ustar00rootroot00000000000000
enca EncaSurface EncaNameStyle EncaCharsetFlags EncaErrno ENCA_CS_UNKNOWN ENCA_NOT_A_CHAR EncaAnalyser EncaEncoding
internal EncaCharsetInfo EncaHookFunc EncaGuessFunc EncaLanguageInfo EncaAnalyserOptions EncaAnalyserState EncaLanguageHookData1CS EncaLanguageHookDataEOL EncaUTFCheckData FILL_NONLETTER EPSILON LF CR enca_ctype_test enca_isalnum enca_isalpha enca_iscntrl enca_isdigit enca_isgraph enca_islower enca_isprint enca_ispunct enca_isspace enca_isupper enca_isxdigit enca_isname enca_isbinary enca_istext ELEMENTS enca_malloc enca_realloc enca_free NEW RENEW MAKE_HOOK_LINE enca_strdup enca_strstr enca_stpcpy enca_csname enca_strconcat enca_strappend enca_name_to_charset enca_name_to_surface enca_language_init enca_language_destroy enca_get_charset_similarity_matrix enca_charsets_subset_identical enca_filter_boxdraw enca_language_hook_ncs enca_language_hook_eol enca_guess_init enca_guess_destroy enca_eol_surface enca_find_max_sec enca_double_utf8_init enca_double_utf8_destroy enca_pair_init enca_pair_destroy enca_pair_analyse ENCA_LANGUAGE_BE ENCA_LANGUAGE_BG ENCA_LANGUAGE_CS ENCA_LANGUAGE_ET ENCA_LANGUAGE_FI ENCA_LANGUAGE_HR ENCA_LANGUAGE_HU ENCA_LANGUAGE_LT ENCA_LANGUAGE_LV ENCA_LANGUAGE_PL ENCA_LANGUAGE_RU ENCA_LANGUAGE_SK ENCA_LANGUAGE_SL ENCA_LANGUAGE_UK ENCA_LANGUAGE_ZH
Project-OSS-Revival-enca-36defd7/devel-docs/libenca-decl.txt000066400000000000000000000262631507545312400237070ustar00rootroot00000000000000 EncaSurface typedef enum { /*< flags >*/ ENCA_SURFACE_EOL_CR = 1 << 0, ENCA_SURFACE_EOL_LF = 1 << 1, ENCA_SURFACE_EOL_CRLF = 1 << 2, ENCA_SURFACE_EOL_MIX = 1 << 3, ENCA_SURFACE_EOL_BIN = 1 << 4, ENCA_SURFACE_MASK_EOL = (ENCA_SURFACE_EOL_CR | ENCA_SURFACE_EOL_LF | ENCA_SURFACE_EOL_CRLF | ENCA_SURFACE_EOL_MIX | ENCA_SURFACE_EOL_BIN), ENCA_SURFACE_PERM_21 = 1 << 5, ENCA_SURFACE_PERM_4321 = 1 << 6, ENCA_SURFACE_PERM_MIX = 1 << 7, ENCA_SURFACE_MASK_PERM = (ENCA_SURFACE_PERM_21 | ENCA_SURFACE_PERM_4321 | ENCA_SURFACE_PERM_MIX), ENCA_SURFACE_QP = 1 << 8, ENCA_SURFACE_REMOVE = 1 << 13, ENCA_SURFACE_UNKNOWN = 1 << 14, ENCA_SURFACE_MASK_ALL = (ENCA_SURFACE_MASK_EOL | ENCA_SURFACE_MASK_PERM | ENCA_SURFACE_QP | ENCA_SURFACE_REMOVE) } EncaSurface; EncaNameStyle typedef enum { ENCA_NAME_STYLE_ENCA, ENCA_NAME_STYLE_RFC1345, ENCA_NAME_STYLE_CSTOCS, ENCA_NAME_STYLE_ICONV, ENCA_NAME_STYLE_HUMAN, ENCA_NAME_STYLE_MIME } EncaNameStyle; EncaCharsetFlags typedef enum { /*< flags >*/ ENCA_CHARSET_7BIT = 1 << 0, ENCA_CHARSET_8BIT = 1 << 1, ENCA_CHARSET_16BIT = 1 << 2, ENCA_CHARSET_32BIT = 1 << 3, ENCA_CHARSET_FIXED = 1 << 4, ENCA_CHARSET_VARIABLE = 1 << 5, ENCA_CHARSET_BINARY = 1 << 6, ENCA_CHARSET_REGULAR = 1 << 7, ENCA_CHARSET_MULTIBYTE = 1 << 8 } EncaCharsetFlags; EncaErrno typedef enum { ENCA_EOK = 0, ENCA_EINVALUE, ENCA_EEMPTY, ENCA_EFILTERED, ENCA_ENOCS8, ENCA_ESIGNIF, ENCA_EWINNER, ENCA_EGARBAGE } EncaErrno; ENCA_CS_UNKNOWN #define ENCA_CS_UNKNOWN (-1) ENCA_NOT_A_CHAR #define ENCA_NOT_A_CHAR 0xffff EncaAnalyser typedef struct _EncaAnalyserState *EncaAnalyser; EncaEncoding EncaCharsetInfo struct _EncaCharsetInfo { int enca; int rfc1345; int cstocs; int iconv; int mime; const char *human; unsigned int flags; unsigned int nsurface; }; EncaHookFunc int EncaAnalyserState *analyser EncaGuessFunc int EncaAnalyserState *analyser EncaLanguageInfo struct _EncaLanguageInfo { const char *name; const char *humanname; size_t ncharsets; const char *const *csnames; const unsigned short int *const *weights; const unsigned short int *significant; const unsigned char *const *letters; const unsigned char **const *pairs; long int weight_sum; EncaHookFunc hook; EncaHookFunc eolhook; EncaHookFunc lcuchook; EncaHookFunc ratinghook; }; EncaAnalyserOptions struct _EncaAnalyserOptions { int const_buffer; size_t min_chars; double threshold; int multibyte_enabled; int interpreted_surfaces; int ambiguous_mode; int filtering; int test_garbageness; int termination_strictness; }; EncaAnalyserState struct _EncaAnalyserState { /* Language data. */ const EncaLanguageInfo *lang; size_t ncharsets; int *charsets; /* Analyser state. */ EncaErrno gerrno; size_t size; unsigned char *buffer; EncaEncoding result; size_t *counts; size_t bin; size_t up; double *ratings; size_t *order; size_t size2; unsigned char *buffer2; /* Double-UTF-8 data. */ EncaUTFCheckData *utfch; int *utfbuf; /* Pair frequency data */ unsigned char *pair2bits; size_t *bitcounts; size_t *pairratings; /* LCUC data XXX: unused (yet) */ size_t *lcbits; size_t *ucbits; /* Options. */ EncaAnalyserOptions options; }; EncaLanguageHookData1CS struct _EncaLanguageHookData1CS { const char *name; size_t size; const unsigned char *list; size_t cs; }; EncaLanguageHookDataEOL struct _EncaLanguageHookDataEOL { const char *name; EncaSurface eol; size_t cs; }; EncaUTFCheckData struct _EncaUTFCheckData { double rating; size_t size; int result; int *ucs2; int *weights; }; FILL_NONLETTER #define FILL_NONLETTER '.' EPSILON #define EPSILON 0.000001 LF #define LF ((unsigned char)'\n') CR #define CR ((unsigned char)'\r') enca_ctype_test #define enca_ctype_test(c, t) ((enca_ctype_data[(unsigned char)c] & t) != 0) enca_isalnum #define enca_isalnum(c) enca_ctype_test((c), ENCA_CTYPE_ALNUM) enca_isalpha #define enca_isalpha(c) enca_ctype_test((c), ENCA_CTYPE_ALPHA) enca_iscntrl #define enca_iscntrl(c) enca_ctype_test((c), ENCA_CTYPE_CNTRL) enca_isdigit #define enca_isdigit(c) enca_ctype_test((c), ENCA_CTYPE_DIGIT) enca_isgraph #define enca_isgraph(c) enca_ctype_test((c), ENCA_CTYPE_GRAPH) enca_islower #define enca_islower(c) enca_ctype_test((c), ENCA_CTYPE_LOWER) enca_isprint #define enca_isprint(c) enca_ctype_test((c), ENCA_CTYPE_PRINT) enca_ispunct #define enca_ispunct(c) enca_ctype_test((c), ENCA_CTYPE_PUNCT) enca_isspace #define enca_isspace(c) enca_ctype_test((c), ENCA_CTYPE_SPACE) enca_isupper #define enca_isupper(c) enca_ctype_test((c), ENCA_CTYPE_UPPER) enca_isxdigit #define enca_isxdigit(c) enca_ctype_test((c), ENCA_CTYPE_XDIGIT) enca_isname #define enca_isname(c) enca_ctype_test((c), ENCA_CTYPE_NAME) enca_isbinary #define enca_isbinary(c) enca_ctype_test((c), ENCA_CTYPE_BINARY) enca_istext #define enca_istext(c) enca_ctype_test((c), ENCA_CTYPE_TEXT) ELEMENTS #define ELEMENTS(array) (sizeof(array)/sizeof((array)[0])) enca_malloc void * size_t size enca_realloc void * void *ptr, size_t size enca_free #define enca_free(ptr) \ { if (ptr) free(ptr); ptr=NULL; } NEW #define NEW(type,n) ((type*)enca_malloc((n)*sizeof(type))) RENEW #define RENEW(ptr,type,n) ((type*)enca_realloc((ptr),(n)*sizeof(type))) MAKE_HOOK_LINE #define MAKE_HOOK_LINE(name) \ { #name, ELEMENTS(list_##name), list_##name, (size_t)-1 } enca_strdup char * const char *s enca_strstr const char * const char *haystack, const char* needle enca_stpcpy char * char *dest, const char *src enca_csname #define enca_csname(cs) enca_charset_name((cs), ENCA_NAME_STYLE_ENCA) enca_strconcat char * const char *str, ... enca_strappend char * char *str, ... enca_name_to_charset int const char *csname enca_name_to_surface EncaSurface const char *sname enca_language_init int EncaAnalyserState *analyser, const char *langname enca_language_destroy void EncaAnalyserState *analyser enca_get_charset_similarity_matrix double * const EncaLanguageInfo *lang enca_charsets_subset_identical int int charset1, int charset2, const size_t *counts enca_filter_boxdraw size_t EncaAnalyserState *analyser, unsigned char fill_char enca_language_hook_ncs int EncaAnalyserState *analyser, size_t ncs, EncaLanguageHookData1CS *hookdata enca_language_hook_eol int EncaAnalyserState *analyser, size_t ncs, EncaLanguageHookDataEOL *hookdata enca_guess_init void EncaAnalyserState *analyser enca_guess_destroy void EncaAnalyserState *analyser enca_eol_surface EncaSurface const unsigned char *buffer, size_t size, const size_t *counts enca_find_max_sec void EncaAnalyserState *analyser enca_double_utf8_init void EncaAnalyserState *analyser enca_double_utf8_destroy void EncaAnalyserState *analyser enca_pair_init void EncaAnalyserState *analyser enca_pair_destroy void EncaAnalyserState *analyser enca_pair_analyse int EncaAnalyserState *analyser ENCA_LANGUAGE_BE extern const EncaLanguageInfo ENCA_LANGUAGE_BE; ENCA_LANGUAGE_BG extern const EncaLanguageInfo ENCA_LANGUAGE_BG; ENCA_LANGUAGE_CS extern const EncaLanguageInfo ENCA_LANGUAGE_CS; ENCA_LANGUAGE_ET extern const EncaLanguageInfo ENCA_LANGUAGE_ET; ENCA_LANGUAGE_FI extern const EncaLanguageInfo ENCA_LANGUAGE_FI; ENCA_LANGUAGE_HR extern const EncaLanguageInfo ENCA_LANGUAGE_HR; ENCA_LANGUAGE_HU extern const EncaLanguageInfo ENCA_LANGUAGE_HU; ENCA_LANGUAGE_LT extern const EncaLanguageInfo ENCA_LANGUAGE_LT; ENCA_LANGUAGE_LV extern const EncaLanguageInfo ENCA_LANGUAGE_LV; ENCA_LANGUAGE_PL extern const EncaLanguageInfo ENCA_LANGUAGE_PL; ENCA_LANGUAGE_RU extern const EncaLanguageInfo ENCA_LANGUAGE_RU; ENCA_LANGUAGE_SK extern const EncaLanguageInfo ENCA_LANGUAGE_SK; ENCA_LANGUAGE_SL extern const EncaLanguageInfo ENCA_LANGUAGE_SL; ENCA_LANGUAGE_UK extern const EncaLanguageInfo ENCA_LANGUAGE_UK; ENCA_LANGUAGE_ZH extern const EncaLanguageInfo ENCA_LANGUAGE_ZH; Project-OSS-Revival-enca-36defd7/devel-docs/libenca-docs.sgml000066400000000000000000000012271507545312400240440ustar00rootroot00000000000000 Enca Library Reference Manual Enca Library API Project-OSS-Revival-enca-36defd7/devel-docs/libenca-overrides.txt000066400000000000000000000000001507545312400247570ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/devel-docs/libenca-sections.txt000066400000000000000000000047371507545312400246310ustar00rootroot00000000000000
enums Typedefs and Constants EncaAnalyser EncaEncoding ENCA_CS_UNKNOWN EncaSurface EncaCharsetFlags EncaNameStyle EncaErrno ENCA_NOT_A_CHAR
analyser Analyser enca_analyser_alloc enca_analyser_free enca_analyse enca_analyse_const enca_errno enca_strerror enca_double_utf8_check enca_double_utf8_get_candidates enca_set_multibyte enca_get_multibyte enca_set_interpreted_surfaces enca_get_interpreted_surfaces enca_set_ambiguity enca_get_ambiguity enca_set_filtering enca_get_filtering enca_set_garbage_test enca_get_garbage_test enca_set_termination_strictness enca_get_termination_strictness enca_set_significant enca_get_significant enca_set_threshold enca_get_threshold
encodings Charsets and Surfaces enca_charset_name enca_get_charset_aliases enca_get_surface_name enca_parse_encoding_name enca_charset_natural_surface enca_charset_properties enca_charset_is_7bit enca_charset_is_8bit enca_charset_is_16bit enca_charset_is_32bit enca_charset_is_fixed enca_charset_is_variable enca_charset_is_binary enca_charset_is_regular enca_charset_is_multibyte enca_charset_is_known
auxiliary Auxiliary Functions enca_charset_has_ucs2_map enca_charset_ucs2_map enca_number_of_charsets enca_analyser_language enca_get_languages enca_language_english_name enca_get_language_charsets
internal Internal Functions EncaAnalyserOptions EncaAnalyserState EncaCharsetInfo EncaLanguageInfo EncaLanguageHookData1CS EncaLanguageHookDataEOL EncaHookFunc EncaGuessFunc EncaUTFCheckData ELEMENTS MAKE_HOOK_LINE EPSILON FILL_NONLETTER LF CR enca_malloc enca_realloc enca_free NEW RENEW enca_strdup enca_strstr enca_stpcpy enca_strconcat enca_strappend enca_csname enca_name_to_charset enca_name_to_surface enca_language_init enca_language_destroy enca_get_charset_similarity_matrix enca_charsets_subset_identical enca_filter_boxdraw enca_language_hook_ncs enca_language_hook_eol enca_guess_init enca_guess_destroy enca_eol_surface enca_find_max_sec ENCA_LANGUAGE_BE ENCA_LANGUAGE_BG ENCA_LANGUAGE_CS ENCA_LANGUAGE_ET ENCA_LANGUAGE_FI ENCA_LANGUAGE_HR ENCA_LANGUAGE_HU ENCA_LANGUAGE_LT ENCA_LANGUAGE_LV ENCA_LANGUAGE_PL ENCA_LANGUAGE_RU ENCA_LANGUAGE_SK ENCA_LANGUAGE_SL ENCA_LANGUAGE_UK ENCA_LANGUAGE_ZH enca_double_utf8_init enca_double_utf8_destroy enca_pair_init enca_pair_destroy enca_pair_analyse
Project-OSS-Revival-enca-36defd7/devel-docs/libenca-undeclared.txt000066400000000000000000000020341507545312400250740ustar00rootroot00000000000000enca_analyse enca_analyse_const enca_analyser_alloc enca_analyser_free enca_analyser_language enca_charset_has_ucs2_map enca_charset_is_16bit enca_charset_is_32bit enca_charset_is_7bit enca_charset_is_8bit enca_charset_is_binary enca_charset_is_fixed enca_charset_is_known enca_charset_is_multibyte enca_charset_is_regular enca_charset_is_variable enca_charset_name enca_charset_natural_surface enca_charset_properties enca_charset_ucs2_map enca_double_utf8_check enca_double_utf8_get_candidates enca_errno enca_get_ambiguity enca_get_charset_aliases enca_get_filtering enca_get_garbage_test enca_get_interpreted_surfaces enca_get_language_charsets enca_get_languages enca_get_multibyte enca_get_significant enca_get_surface_name enca_get_termination_strictness enca_get_threshold enca_language_english_name enca_number_of_charsets enca_parse_encoding_name enca_set_ambiguity enca_set_filtering enca_set_garbage_test enca_set_interpreted_surfaces enca_set_multibyte enca_set_significant enca_set_termination_strictness enca_set_threshold enca_strerror Project-OSS-Revival-enca-36defd7/devel-docs/libenca-undocumented.txt000066400000000000000000000004321507545312400254600ustar00rootroot0000000000000096% symbol docs coverage. 175 symbols documented. 1 symbols incomplete. 8 not documented. EncaAnalyser EncaLanguageInfo (lcuchook) count_bits tested auxiliary:long_description encodings:long_description enums:long_description internal:long_description internal:short_description Project-OSS-Revival-enca-36defd7/devel-docs/libenca-unused.txt000066400000000000000000000005271507545312400242760ustar00rootroot00000000000000enca_ctype_test enca_isalnum enca_isalpha enca_isbinary enca_iscntrl enca_isdigit enca_isgraph enca_islower enca_isname enca_isprint enca_ispunct enca_isspace enca_istext enca_isupper enca_isxdigit EncaEncoding(charset, surface) EncaLanguageHookData1CS(list) EncaLanguageInfo(weights, significant, letters, pairs) EncaSurface(ENCA_SURFACE_HZ) Project-OSS-Revival-enca-36defd7/devel-docs/libenca.args000066400000000000000000000000001507545312400230740ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/devel-docs/libenca.hierarchy000066400000000000000000000000001507545312400241160ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/devel-docs/libenca.intefraces000066400000000000000000000000001507545312400242630ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/devel-docs/libenca.prerequisites000066400000000000000000000000001507545312400250440ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/devel-docs/libenca.signals000066400000000000000000000000001507545312400236000ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/devel-docs/tmpl/000077500000000000000000000000001507545312400216075ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/devel-docs/tmpl/analyser.sgml000066400000000000000000000033631507545312400243160ustar00rootroot00000000000000 Analyser Basic analyser interface. Basically you want to allocate an analyser with enca_analyser_alloc() for some language, use enca_analyse() (or enca_analyse_const()) on a buffer to find its encoding, and interpret the results with something like enca_charset_name(). The analyser then can be used for another buffer. Once you no longer need it, call enca_analyser_free() to release it. A single working example is better than a hundred pages of reference manual. A minimal Enca library application – Czech encoding detector. #include <stdio.h> #include <enca.h> int main(void) { EncaAnalyser analyser; EncaEncoding encoding; unsigned char buffer[4096]; size_t buflen; buflen = fread(buffer, 1, 4096, stdin); analyser = enca_analyser_alloc("cs"); encoding = enca_analyse(analyser, buffer, buflen); printf("Charset: %s\n", enca_charset_name(encoding.charset, ENCA_NAME_STYLE_HUMAN)); enca_analyser_free(analyser); return 0; } The analyser has plenty of options, but generally you don't need to fiddle with them, except enca_set_termination_strictness(). All names prefixed with ENCA_, Enca, _Enca, or enca_ should be treated as reserved and not used for application function/variable/type/macro names. Project-OSS-Revival-enca-36defd7/devel-docs/tmpl/auxiliary.sgml000066400000000000000000000005571507545312400245110ustar00rootroot00000000000000 Auxiliary functions Variouis auxiliary functions and informations about libenca. Project-OSS-Revival-enca-36defd7/devel-docs/tmpl/encodings.sgml000066400000000000000000000005741507545312400244520ustar00rootroot00000000000000 Charsets and Surfaces Functions and macros for getting something sensible from #EncaEncoding. Project-OSS-Revival-enca-36defd7/devel-docs/tmpl/enums.sgml000066400000000000000000000031541507545312400236250ustar00rootroot00000000000000 Typedefs and Constants Enca library typedefs, enums and constants. @ENCA_SURFACE_EOL_CR: @ENCA_SURFACE_EOL_LF: @ENCA_SURFACE_EOL_CRLF: @ENCA_SURFACE_EOL_MIX: @ENCA_SURFACE_EOL_BIN: @ENCA_SURFACE_MASK_EOL: @ENCA_SURFACE_PERM_21: @ENCA_SURFACE_PERM_4321: @ENCA_SURFACE_PERM_MIX: @ENCA_SURFACE_MASK_PERM: @ENCA_SURFACE_QP: @ENCA_SURFACE_REMOVE: @ENCA_SURFACE_UNKNOWN: @ENCA_SURFACE_MASK_ALL: @ENCA_CHARSET_7BIT: @ENCA_CHARSET_8BIT: @ENCA_CHARSET_16BIT: @ENCA_CHARSET_32BIT: @ENCA_CHARSET_FIXED: @ENCA_CHARSET_VARIABLE: @ENCA_CHARSET_BINARY: @ENCA_CHARSET_REGULAR: @ENCA_CHARSET_MULTIBYTE: @ENCA_NAME_STYLE_ENCA: @ENCA_NAME_STYLE_RFC1345: @ENCA_NAME_STYLE_CSTOCS: @ENCA_NAME_STYLE_ICONV: @ENCA_NAME_STYLE_HUMAN: @ENCA_NAME_STYLE_MIME: @ENCA_EOK: @ENCA_EINVALUE: @ENCA_EEMPTY: @ENCA_EFILTERED: @ENCA_ENOCS8: @ENCA_ESIGNIF: @ENCA_EWINNER: @ENCA_EGARBAGE: Project-OSS-Revival-enca-36defd7/devel-docs/tmpl/internal.sgml000066400000000000000000000126711507545312400243160ustar00rootroot00000000000000 internal internal functions Do not use outside Enca library. @const_buffer: @min_chars: @threshold: @multibyte_enabled: @interpreted_surfaces: @ambiguous_mode: @filtering: @test_garbageness: @termination_strictness: @lang: @ncharsets: @charsets: @gerrno: @size: @buffer: @result: @counts: @bin: @up: @ratings: @order: @size2: @buffer2: @utfch: @utfbuf: @pair2bits: @bitcounts: @pairratings: @lcbits: @ucbits: @options: @enca: @rfc1345: @cstocs: @iconv: @mime: @human: @flags: @nsurface: @name: @humanname: @ncharsets: @csnames: @weight_sum: @hook: @eolhook: @lcuchook: @ratinghook: @name: @size: @cs: @name: @eol: @cs: @analyser: @Returns: @analyser: @Returns: @rating: @size: @result: @ucs2: @weights: @array: @Returns: @name: @size: @Returns: @ptr: @size: @Returns: @ptr: @type: @n: @Returns: @ptr: @type: @n: @Returns: @s: @Returns: @haystack: @needle: @Returns: @dest: @src: @Returns: @str: @...: @Returns: @str: @...: @Returns: @cs: @csname: @Returns: @sname: @Returns: @analyser: @langname: @Returns: @analyser: @lang: @Returns: @charset1: @charset2: @counts: @Returns: @analyser: @fill_char: @Returns: @analyser: @ncs: @hookdata: @Returns: @analyser: @ncs: @hookdata: @Returns: @analyser: @analyser: @buffer: @size: @counts: @Returns: @analyser: @analyser: @analyser: @analyser: @analyser: @analyser: @Returns: Project-OSS-Revival-enca-36defd7/devel-docs/tmpl/libenca-unused.sgml000066400000000000000000000127061507545312400253770ustar00rootroot00000000000000 enca libenca @size: @name1: @name2: @id1: @id2: @list1: @list2: @analyser: @buffer: @size: @Returns: @analyser: @buffer: @size: @Returns: @langname: @Returns: @analyser: @analyser: @Returns: @analyser: @Returns: @charset: @Returns: @cs: @cs: @cs: @cs: @cs: @cs: @cs: @cs: @cs: @cs: @charset: @whatname: @Returns: @charset: @Returns: @charset: @Returns: @charset: @buffer: @Returns: @analyser: @buffer: @size: @Returns: @analyser: @Returns: @analyser: @Returns: @analyser: @Returns: @charset: @n: @Returns: @analyser: @Returns: @analyser: @Returns: @analyser: @Returns: @langname: @n: @Returns: @n: @Returns: @analyser: @Returns: @analyser: @Returns: @surface: @whatname: @Returns: @analyser: @Returns: @analyser: @Returns: @lang: @Returns: @analyser: @hookdata: @Returns: @analyser: @csname: @csid: @Returns: @Returns: @name: @Returns: @analyser: @ambiguity: @analyser: @filtering: @analyser: @garabage_test: @analyser: @interpreted_surfaces: @analyser: @multibyte: @analyser: @significant: @Returns: @analyser: @termination_strictness: @analyser: @threshold: @Returns: @analyser: @errnum: @Returns: Project-OSS-Revival-enca-36defd7/devel-docs/xml/000077500000000000000000000000001507545312400214335ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/devel-docs/xml/analyser.xml000066400000000000000000000041331507545312400237740ustar00rootroot00000000000000 Analyser 3 LIBENCA Library Analyser Basic analyser interface. Description Basically you want to allocate an analyser with enca_analyser_alloc() for some language, use enca_analyse() (or enca_analyse_const()) on a buffer to find its encoding, and interpret the results with something like enca_charset_name(). The analyser then can be used for another buffer. Once you no longer need it, call enca_analyser_free() to release it. A single working example is better than a hundred pages of reference manual. A minimal Enca library application – Czech encoding detector. #include int main(void) { EncaAnalyser analyser; EncaEncoding encoding; unsigned char buffer[4096]; size_t buflen; buflen = fread(buffer, 1, 4096, stdin); analyser = enca_analyser_alloc("cs"); encoding = enca_analyse(analyser, buffer, buflen); printf("Charset: %s\n", enca_charset_name(encoding.charset, ENCA_NAME_STYLE_HUMAN)); enca_analyser_free(analyser); return 0; } ]]> Functions Project-OSS-Revival-enca-36defd7/devel-docs/xml/api-index-1.3..xml000066400000000000000000000003161507545312400244100ustar00rootroot00000000000000 Project-OSS-Revival-enca-36defd7/devel-docs/xml/api-index-deprecated.xml000066400000000000000000000003241507545312400261300ustar00rootroot00000000000000 Project-OSS-Revival-enca-36defd7/devel-docs/xml/api-index-full.xml000066400000000000000000000356331507545312400250050ustar00rootroot00000000000000 A EncaAnalyser, typedef in Typedefs and Constants EncaAnalyserOptions, struct in Internal Functions EncaAnalyserState, struct in Internal Functions C EncaCharsetFlags, enum in Typedefs and Constants EncaCharsetInfo, struct in Internal Functions enca_charsets_subset_identical, function in Internal Functions CR, macro in Internal Functions enca_csname, macro in Internal Functions ENCA_CS_UNKNOWN, macro in Typedefs and Constants D enca_double_utf8_destroy, function in Internal Functions enca_double_utf8_init, function in Internal Functions E ELEMENTS, macro in Internal Functions EncaEncoding, struct in Typedefs and Constants enca_eol_surface, function in Internal Functions EPSILON, macro in Internal Functions EncaErrno, enum in Typedefs and Constants F FILL_NONLETTER, macro in Internal Functions enca_filter_boxdraw, function in Internal Functions enca_find_max_sec, function in Internal Functions enca_free, macro in Internal Functions G enca_get_charset_similarity_matrix, function in Internal Functions EncaGuessFunc, user_function in Internal Functions enca_guess_destroy, function in Internal Functions enca_guess_init, function in Internal Functions H EncaHookFunc, user_function in Internal Functions L EncaLanguageHookData1CS, struct in Internal Functions EncaLanguageHookDataEOL, struct in Internal Functions EncaLanguageInfo, struct in Internal Functions ENCA_LANGUAGE_BE, variable in Internal Functions ENCA_LANGUAGE_BG, variable in Internal Functions ENCA_LANGUAGE_CS, variable in Internal Functions enca_language_destroy, function in Internal Functions ENCA_LANGUAGE_ET, variable in Internal Functions ENCA_LANGUAGE_FI, variable in Internal Functions enca_language_hook_eol, function in Internal Functions enca_language_hook_ncs, function in Internal Functions ENCA_LANGUAGE_HR, variable in Internal Functions ENCA_LANGUAGE_HU, variable in Internal Functions enca_language_init, function in Internal Functions ENCA_LANGUAGE_LT, variable in Internal Functions ENCA_LANGUAGE_LV, variable in Internal Functions ENCA_LANGUAGE_PL, variable in Internal Functions ENCA_LANGUAGE_RU, variable in Internal Functions ENCA_LANGUAGE_SK, variable in Internal Functions ENCA_LANGUAGE_SL, variable in Internal Functions ENCA_LANGUAGE_UK, variable in Internal Functions ENCA_LANGUAGE_ZH, variable in Internal Functions LF, macro in Internal Functions M MAKE_HOOK_LINE, macro in Internal Functions enca_malloc, function in Internal Functions N EncaNameStyle, enum in Typedefs and Constants enca_name_to_charset, function in Internal Functions enca_name_to_surface, function in Internal Functions NEW, macro in Internal Functions ENCA_NOT_A_CHAR, macro in Typedefs and Constants P enca_pair_analyse, function in Internal Functions enca_pair_destroy, function in Internal Functions enca_pair_init, function in Internal Functions R enca_realloc, function in Internal Functions RENEW, macro in Internal Functions S enca_stpcpy, function in Internal Functions enca_strappend, function in Internal Functions enca_strconcat, function in Internal Functions enca_strdup, function in Internal Functions enca_strstr, function in Internal Functions EncaSurface, enum in Typedefs and Constants U EncaUTFCheckData, struct in Internal Functions Project-OSS-Revival-enca-36defd7/devel-docs/xml/auxiliary.xml000066400000000000000000000015211507545312400241630ustar00rootroot00000000000000 Auxiliary Functions 3 LIBENCA Library Auxiliary Functions Variouis auxiliary functions and informations about libenca. Description Functions Project-OSS-Revival-enca-36defd7/devel-docs/xml/encodings.xml000066400000000000000000000016301507545312400241260ustar00rootroot00000000000000 Charsets and Surfaces 3 LIBENCA Library Charsets and Surfaces Functions and macros for getting something sensible from EncaEncoding. Description Functions Project-OSS-Revival-enca-36defd7/devel-docs/xml/enums.xml000066400000000000000000000433121507545312400233070ustar00rootroot00000000000000 Typedefs and Constants 3 LIBENCA Library Typedefs and Constants Enca library typedefs, enums and constants. Types and Values typedefEncaAnalyser EncaEncoding #defineENCA_CS_UNKNOWN enumEncaSurface enumEncaCharsetFlags enumEncaNameStyle enumEncaErrno #defineENCA_NOT_A_CHAR Description Functions Types and Values EncaAnalyser EncaAnalyser typedef struct _EncaAnalyserState *EncaAnalyser; EncaEncoding EncaEncoding typedef struct _EncaEncoding EncaEncoding; Encoding, i.e. charset and surface. This is what enca_analyse() and enca_analyse_const() return. The charset field is an opaque numerical charset identifier, which has no meaning outside Enca library. You will probably want to use it only as enca_charset_name() argument. It is only guaranteed not to change meaning during program execution time; change of its interpretation (e.g. due to addition of new charsets) is not considered API change. The surface field is a combination of EncaSurface flags. You may want to ignore it completely; you should use enca_set_interpreted_surfaces() to disable weird surfaces then. Members ENCA_CS_UNKNOWN ENCA_CS_UNKNOWN #define ENCA_CS_UNKNOWN (-1) Unknown character set id. Use enca_charset_is_known() to check for unknown charset instead of direct comparsion. enum EncaSurface EncaSurface Surface flags. Members ENCA_SURFACE_EOL_CR End-of-lines are represented with CR's. ENCA_SURFACE_EOL_LF End-of-lines are represented with LF's. ENCA_SURFACE_EOL_CRLF End-of-lines are represented with CRLF's. ENCA_SURFACE_EOL_MIX Several end-of-line types, mixed. ENCA_SURFACE_EOL_BIN End-of-line concept not applicable (binary data). ENCA_SURFACE_MASK_EOL Mask for end-of-line surfaces. ENCA_SURFACE_PERM_21 Odd and even bytes swapped. ENCA_SURFACE_PERM_4321 Reversed byte sequence in 4byte words. ENCA_SURFACE_PERM_MIX Chunks with both endianess, concatenated. ENCA_SURFACE_MASK_PERM Mask for permutation surfaces. ENCA_SURFACE_QP Quoted printables. ENCA_SURFACE_REMOVE Recode `remove' surface. ENCA_SURFACE_UNKNOWN Unknown surface. ENCA_SURFACE_MASK_ALL Mask for all bits, withnout ENCA_SURFACE_UNKNOWN. enum EncaCharsetFlags EncaCharsetFlags Charset properties. Flags ENCA_CHARSET_7BIT, ENCA_CHARSET_8BIT, ENCA_CHARSET_16BIT, ENCA_CHARSET_32BIT tell how many bits a `fundamental piece' consists of. This is different from bits per character; r.g. UTF-8 consists of 8bit pieces (bytes), but character can be composed from 1 to 6 of them. Members ENCA_CHARSET_7BIT Characters are represented with 7bit characters. ENCA_CHARSET_8BIT Characters are represented with bytes. ENCA_CHARSET_16BIT Characters are represented with 2byte words. ENCA_CHARSET_32BIT Characters are represented with 4byte words. ENCA_CHARSET_FIXED One characters consists of one fundamental piece. ENCA_CHARSET_VARIABLE One character consists of variable number of fundamental pieces. ENCA_CHARSET_BINARY Charset is binary from ASCII viewpoint. ENCA_CHARSET_REGULAR Language dependent (8bit) charset. ENCA_CHARSET_MULTIBYTE Multibyte charset. enum EncaNameStyle EncaNameStyle Charset naming styles and conventions. Members ENCA_NAME_STYLE_ENCA Default, implicit charset name in Enca. ENCA_NAME_STYLE_RFC1345 RFC 1345 or otherwise canonical charset name. ENCA_NAME_STYLE_CSTOCS Cstocs charset name (may not exist). ENCA_NAME_STYLE_ICONV Iconv charset name (may not exist). ENCA_NAME_STYLE_HUMAN Human comprehensible description. ENCA_NAME_STYLE_MIME Preferred MIME name (may not exist). enum EncaErrno EncaErrno Error codes. Members ENCA_EOK OK. ENCA_EINVALUE Invalid value (usually of an option). ENCA_EEMPTY Sample is empty. ENCA_EFILTERED After filtering, (almost) nothing remained. ENCA_ENOCS8 Mulitibyte tests failed and language contains no 8bit charsets. ENCA_ESIGNIF Too few significant characters. ENCA_EWINNER No clear winner. ENCA_EGARBAGE Sample is garbage. ENCA_NOT_A_CHAR ENCA_NOT_A_CHAR #define ENCA_NOT_A_CHAR 0xffff Not-a-character in unicode tables. Project-OSS-Revival-enca-36defd7/devel-docs/xml/internal.xml000066400000000000000000002756361507545312400240140ustar00rootroot00000000000000 Internal Functions 3 LIBENCA Library Internal Functions Functions int (*EncaHookFunc) () int (*EncaGuessFunc) () #defineELEMENTS() #defineMAKE_HOOK_LINE() void * enca_malloc () void * enca_realloc () #defineenca_free() #defineNEW() #defineRENEW() char * enca_strdup () const char * enca_strstr () char * enca_stpcpy () char * enca_strconcat () char * enca_strappend () #defineenca_csname() int enca_name_to_charset () EncaSurface enca_name_to_surface () int enca_language_init () void enca_language_destroy () double * enca_get_charset_similarity_matrix () int enca_charsets_subset_identical () size_t enca_filter_boxdraw () int enca_language_hook_ncs () int enca_language_hook_eol () void enca_guess_init () void enca_guess_destroy () EncaSurface enca_eol_surface () void enca_find_max_sec () void enca_double_utf8_init () void enca_double_utf8_destroy () void enca_pair_init () void enca_pair_destroy () int enca_pair_analyse () Types and Values structEncaAnalyserOptions structEncaAnalyserState structEncaCharsetInfo structEncaLanguageInfo structEncaLanguageHookData1CS structEncaLanguageHookDataEOL structEncaUTFCheckData #defineEPSILON #defineFILL_NONLETTER #defineLF #defineCR extern const EncaLanguageInfo ENCA_LANGUAGE_BE extern const EncaLanguageInfo ENCA_LANGUAGE_BG extern const EncaLanguageInfo ENCA_LANGUAGE_CS extern const EncaLanguageInfo ENCA_LANGUAGE_ET extern const EncaLanguageInfo ENCA_LANGUAGE_HR extern const EncaLanguageInfo ENCA_LANGUAGE_HU extern const EncaLanguageInfo ENCA_LANGUAGE_LT extern const EncaLanguageInfo ENCA_LANGUAGE_LV extern const EncaLanguageInfo ENCA_LANGUAGE_PL extern const EncaLanguageInfo ENCA_LANGUAGE_RU extern const EncaLanguageInfo ENCA_LANGUAGE_SK extern const EncaLanguageInfo ENCA_LANGUAGE_SL extern const EncaLanguageInfo ENCA_LANGUAGE_UK extern const EncaLanguageInfo ENCA_LANGUAGE_ZH Description Functions EncaHookFunc () EncaHookFunc int (*EncaHookFunc) (EncaAnalyserState *analyser); Language hook function type. Launches language specific hooks for a particular language. Parameters analyser Analyser state whose charset ratings are to be modified. Returns Nonzero if charset ratigns have been actually modified, zero otherwise. EncaGuessFunc () EncaGuessFunc int (*EncaGuessFunc) (EncaAnalyserState *analyser); Special (multibyte) encoding check function type. Parameters analyser Analyser state whose buffer should be checked. Returns Nonzero if analyser->result has been set, zero otherwise. ELEMENTS() ELEMENTS #define ELEMENTS(array) (sizeof(array)/sizeof((array)[0])) Compute the number of elements of a static array. Parameters array An array whose size is to be computed. Returns the number of elements. MAKE_HOOK_LINE() MAKE_HOOK_LINE #define MAKE_HOOK_LINE(name) Ugly code `beautifier' macro for language hooks. Parameters name A charset name in C-style identifier suitable form. enca_malloc () enca_malloc void * enca_malloc (size_t size); Allocates memory, always successfully (when fails, aborts program). Parameters size The number of bytes to allocate. Returns Pointer to the newly allocated memory. enca_realloc () enca_realloc void * enca_realloc (void *ptr, size_t size); Reallocates memory, always successfully (when fails, aborts program). Parameters ptr Pointer to block of previously allocated memory. size The number of bytes to resize the block. Returns Pointer to the newly allocated memory, NULL when size is zero. enca_free() enca_free #define enca_free(ptr) Frees memory pointed by ptr with free() hack and assigns it a safe value, thus may be called more than once. ptr MUST be l-value. Parameters ptr Pointer to memory to free. NEW() NEW #define NEW(type,n) ((type*)enca_malloc((n)*sizeof(type))) An enca_malloc() wrapper. Parameters type Data type to allocate. n Number of elements to allocate. Returns Pointer to the newly allocated memory. RENEW() RENEW #define RENEW(ptr,type,n) ((type*)enca_realloc((ptr),(n)*sizeof(type))) An enca_realloc() wrapper. Parameters ptr Pointer to already allocate memory or NULL. type Data type to allocate. n Number of elements to resize the memory to. Returns Pointer to the reallocated memory (or pointer safe to call free() on when n is zero). enca_strdup () enca_strdup char * enca_strdup (const char *s); Duplicates string. Will be defined as strdup() when system provides it. Parameters s A string. Returns The newly allocated string copy. enca_strstr () enca_strstr const char * enca_strstr (const char *haystack, const char *needle); Finds occurence of a substring in a string. Will be defined as strstr() when system provides it. Parameters haystack A string where to search. needle A string to find. Returns Pointer to the first occurence of needle in haystack ; NULL if not found. enca_stpcpy () enca_stpcpy char * enca_stpcpy (char *dest, const char *src); Appends a string to the end of another strings, returning pointer to the terminating zero byte. Will be defined as stpcpy() when system provides it. Caller is responisble for providing dest long enough to hold the result. Parameters dest A string. src A string to append. Returns Pointer to the terminating zero byte of resulting string. enca_strconcat () enca_strconcat char * enca_strconcat (const char *str, ...); Concatenates arbitrary (but at least one) number of strings. Parameters str A string. ... A NULL-terminated list of string to append. Returns All the strings concatenated together. enca_strappend () enca_strappend char * enca_strappend (char *str, ...); Appends arbitrary number of strings to a string. The string str is destroyed (reallocated), the others are kept. Parameters str A string. ... A NULL-terminated list of string to append. Returns All the strings concatenated together. enca_csname() enca_csname #define enca_csname(cs) enca_charset_name((cs), ENCA_NAME_STYLE_ENCA) A shorthand for printing names with ENCA_NAME_STYLE_ENCA. Parameters cs A charset id. enca_name_to_charset () enca_name_to_charset int enca_name_to_charset (const char *csname); Transforms charset name to numeric charset id. Parameters csname The charset name. Returns The charset id; ENCA_CS_UNKNOWN when the name is not recognized. enca_name_to_surface () enca_name_to_surface EncaSurface enca_name_to_surface (const char *sname); Transforms surface name to numeric surface id. Parameters sname The surface name. Returns The surface id; ENCA_SURFACE_UNKNOWN when the name is not recognized. enca_language_init () enca_language_init int enca_language_init (EncaAnalyserState *analyser, const char *langname); Initializes analyser for language langname . Assumes analyser is unitinialized, calling with an initialized analyser leads to memory leak. Parameters analyser Analyzer state to be initialized for this language. langname Two-letter ISO-639 language code. Returns Nonzero on success, zero otherwise. enca_language_destroy () enca_language_destroy void enca_language_destroy (EncaAnalyserState *analyser); Destroys the language part of analyser state analyser . Parameters analyser Analyzer state whose language part should be destroyed. enca_get_charset_similarity_matrix () enca_get_charset_similarity_matrix double * enca_get_charset_similarity_matrix (const EncaLanguageInfo *lang); Computes character weight similarity matrix for language lang . sim[i,j] is normalized to sim[i,i] thus: a row i contains ,probabilities` different languages will look like the i-th one a column i contains ,probabilities` the i-th language will look like the other languages. For all practical applications, the higher one of sim[i,j] and sim[j,i] is important. Note: this is not used anywhere, only by simtable. Parameters lang A language. Returns The matrix, its size is determined by lang->ncharsets ; NULL for language with no charsets. enca_charsets_subset_identical () enca_charsets_subset_identical int enca_charsets_subset_identical (int charset1, int charset2, const size_t *counts); Checks whether all characters with nonzero count have the same meaning in both charsets. In other words, it checks whether conversion of sample containing only these characters from charset1 to charset2 would be identity. Parameters charset1 A charset. charset2 Another charset. counts An array of size 0x100 containing character counts. Returns Nonzero if charsets are identical on the subset, zero otherwise. enca_filter_boxdraw () enca_filter_boxdraw size_t enca_filter_boxdraw (EncaAnalyserState *analyser, unsigned char fill_char); Runs boxdrawing characters filter on buffer for each charset in language . Parameters analyser Analyser whose charsets should be considered for filtration. fill_char Replacement character for filtered bytes. Returns Number of characters filtered out. enca_language_hook_ncs () enca_language_hook_ncs int enca_language_hook_ncs (EncaAnalyserState *analyser, size_t ncs, EncaLanguageHookData1CS *hookdata); Decide between two charsets differing only in a few characters. If the two most probable charsets correspond to hookdata charsets, give the characters they differ half the weight of all other characters together, thus allowing to decide between the two very similar charsets. It also recomputes order when something changes. Parameters analyser Analyser whose charset ratings are to be modified. ncs The number of charsets. hookdata What characters of which charsets should be given the extra weight. Returns Nonzero when ratings were actually modified, nonzero otherwise. enca_language_hook_eol () enca_language_hook_eol int enca_language_hook_eol (EncaAnalyserState *analyser, size_t ncs, EncaLanguageHookDataEOL *hookdata); Decide between two charsets differing only in EOL type or other surface. The (surface mask, charset) pairs are scanned in order. If a matching surface is found, ratings of all other charsets in the list are zeroed. So you can place a surface mask of all 1s at the end to match when nothing else matches. All the charsets have to have the same rating, or nothing happens. It also recomputes order when something changes. Parameters analyser Analyser whose charset ratings are to be modified. ncs The number of charsets. hookdata What characters of which charsets should be decided with based on the EOL type. Returns Nonzero when ratings were actually modified, nonzero otherwise. enca_guess_init () enca_guess_init void enca_guess_init (EncaAnalyserState *analyser); Allocates and initializes analyser state, sets options to defaults. Assumes analyser is unitinialized, calling with an initialized analyser leads to memory leak, but analyser->lang must be already initialized. Parameters analyser Analyser to initialize. enca_guess_destroy () enca_guess_destroy void enca_guess_destroy (EncaAnalyserState *analyser); Frees memory owned by analyser state. Parameters analyser Analyser to destroy. enca_eol_surface () enca_eol_surface EncaSurface enca_eol_surface (const unsigned char *buffer, size_t size, const size_t *counts); Find EOL type of sample in buffer . Parameters buffer A buffer whose EOL type is to be detected. size Size of buffer . counts Character counts. Returns The EOL surface flags. enca_find_max_sec () enca_find_max_sec void enca_find_max_sec (EncaAnalyserState *analyser); Updates analyser->order according to charset ratings . XXX: This should be stable sort. The ordering is defined by data/<lang>/<lang>.h header file which is in turn defined by odering in the appropriate script (doit.sh). Silly. Must not be called with analyser with no regular charsets. Parameters analyser An analyser. enca_double_utf8_init () enca_double_utf8_init void enca_double_utf8_init (EncaAnalyserState *analyser); Initializes double-UTF-8 check. In fact it initializes the fields to NULL's, they are actually initialized only when needed. Parameters analyser Analyzer state to be initialized. enca_double_utf8_destroy () enca_double_utf8_destroy void enca_double_utf8_destroy (EncaAnalyserState *analyser); Destroys the double-UTF-8 check part of analyser state analyser . Parameters analyser Analyzer state whose double-UTF-8 check part should be destroyed. enca_pair_init () enca_pair_init void enca_pair_init (EncaAnalyserState *analyser); Initializes pair statistics data. In fact it just sets everything to NULL, to be initialized when needed. Parameters analyser Analyzer state to be initialized. enca_pair_destroy () enca_pair_destroy void enca_pair_destroy (EncaAnalyserState *analyser); Destroys the pair statistics part of analyser state analyser . Parameters analyser Analyzer state whose pair statistics part should be destroyed. enca_pair_analyse () enca_pair_analyse int enca_pair_analyse (EncaAnalyserState *analyser); Performs pair-frequency based analysis, provided that the language supports it (does nothing otherwise). Parameters analyser Analysed containing the sample for pair frequency analysis. Returns Nonzero when the character set was succesfully determined, analyser ->result .charset is then directly modified. Types and Values struct EncaAnalyserOptions EncaAnalyserOptions struct EncaAnalyserOptions { int const_buffer; size_t min_chars; double threshold; int multibyte_enabled; int interpreted_surfaces; int ambiguous_mode; int filtering; int test_garbageness; int termination_strictness; }; Analyser options, a part of analyser state. Members int const_buffer; Treat buffer as const? Otherwise its content can be, and probably will be, modified. size_t min_chars; Minimal number significant characters. double threshold; Minimal ratio between winner and the second. int multibyte_enabled; Check for multibyte encodings? int interpreted_surfaces; Allow surfaces causing fundamental reinterpretation? int ambiguous_mode; Ambiguous mode? int filtering; Allow binary and box-drawing filters? int test_garbageness; Do test garbageness? int termination_strictness; Disallow broken multibyte sequences at buffer end? struct EncaAnalyserState EncaAnalyserState struct EncaAnalyserState { /* Language data. */ const EncaLanguageInfo *lang; size_t ncharsets; int *charsets; /* Analyser state. */ EncaErrno gerrno; size_t size; unsigned char *buffer; EncaEncoding result; size_t *counts; size_t bin; size_t up; double *ratings; size_t *order; size_t size2; unsigned char *buffer2; /* Double-UTF-8 data. */ EncaUTFCheckData *utfch; int *utfbuf; /* Pair frequency data */ unsigned char *pair2bits; size_t *bitcounts; size_t *pairratings; /* LCUC data XXX: unused (yet) */ size_t *lcbits; size_t *ucbits; /* Options. */ EncaAnalyserOptions options; }; The internal analyser state. Passed as an opaque object (`this') to analyser calls. Members const EncaLanguageInfo *lang; Language informations. size_t ncharsets; Number of 8bit charsets in this language. (Equal to lang->ncharsets .) int *charsets; 8bit charset id's [ncharsets ]. EncaErrno gerrno; Guessing gerrno. size_t size; Size of buffer. unsigned char *buffer; Buffer whose encoding is to be detected [size ]. (Owned by outer world.) EncaEncoding result; Result returned to caller. size_t *counts; Character counts [0x100]. size_t bin; Number of `binary' characters. size_t up; Number of 8bit characters. double *ratings; 8bit charset ratings [ncharsets ]. size_t *order; Charset indices (not id's) sorted by ratings in descending order [ncharsets]. size_t size2; Size of buffer2. unsigned char *buffer2; A temporary secondary buffer [size2 ]. EncaUTFCheckData *utfch; Double-UTF-8 test data [ncharsets ]. int *utfbuf; Double-UTF-8 buffer for various UCS-2 character counting [0x10000]. (Magic: see mark_scratch_buffer() for description.) unsigned char *pair2bits; Character pair map to charsets [0x100000] (indexed 0x100*first + second). Each bit corresponds to one charset, when set, the pair is `good' for the given charset. The type is char, so it breaks for ncharsets > 8, but it should not be accessed from outer world, so it can be easily enlarged to more bits. size_t *bitcounts; Counts for each possible bit combinations in pair2bits [0x1 << ncharsets]. size_t *pairratings; Counts of `good' pairs per charset [ncharsets ]. size_t *lcbits; If a character is lowercase in some charset, correspinding bit is set [0x100]. size_t *ucbits; If a character is uppercase in some charset, correspinding bit is set [0x100]. EncaAnalyserOptions options; Analyser options. struct EncaCharsetInfo EncaCharsetInfo struct EncaCharsetInfo { int enca; int rfc1345; int cstocs; int iconv; int mime; const char *human; unsigned int flags; unsigned int nsurface; }; General charset informnations. All the int fields are indices in ALIAS_LIST[]. Members int enca; Default, implicit name in enca. int rfc1345; RFC1345 charset name. (For charsets not in RFC1345, some canonical name is invented.) int cstocs; Cstocs charset name or -1. int iconv; Iconv charset name or -1. int mime; Preferred MIME charset name or -1. const char *human; Human comprehensible description. unsigned int flags; Charset properties (7bit, 8bit, multibyte, ...). unsigned int nsurface; Natural surface (`implied' in recode). struct EncaLanguageInfo EncaLanguageInfo struct EncaLanguageInfo { const char *name; const char *humanname; size_t ncharsets; const char *const *csnames; const unsigned short int *const *weights; const unsigned short int *significant; const unsigned char *const *letters; const unsigned char **const *pairs; long int weight_sum; EncaHookFunc hook; EncaHookFunc eolhook; EncaHookFunc lcuchook; EncaHookFunc ratinghook; }; Language specific data. Members const char *name; Language name, or more precisely, locale name. const char *humanname; Normal human-readable [English] language name. size_t ncharsets; Number of charsets in this language. const char *const  *csnames; Charset names [ncharsets ]. long int weight_sum; Sum of all weights (is the same for all charsets). EncaHookFunc hook; Hook function (deciding hard cases). EncaHookFunc eolhook; EOL hook function (deciding ambiguous cases based on EOL type). EncaHookFunc lcuchook; EncaHookFunc ratinghook; Helper to calculate ratings for weightingless languages. struct EncaLanguageHookData1CS EncaLanguageHookData1CS struct EncaLanguageHookData1CS { const char *name; size_t size; const unsigned char *list; size_t cs; }; Cointainer for data needed by enca_language_hook_ncs(). Members const char *name; Charset name. size_t size; Number of characters in list . size_t cs; Charset number. This is an index in analyser arrays (like charsets ), NOT a charset id. struct EncaLanguageHookDataEOL EncaLanguageHookDataEOL struct EncaLanguageHookDataEOL { const char *name; EncaSurface eol; size_t cs; }; Cointainer for data needed by enca_language_hook_eol(). Members const char *name; Charset name. EncaSurface eol; The corresponding EncaSurface bit. size_t cs; Charset number. This is an index in analyser arrays (like charsets ), NOT a charset id. struct EncaUTFCheckData EncaUTFCheckData struct EncaUTFCheckData { double rating; size_t size; int result; int *ucs2; int *weights; }; Data needed by double-UTF-8 check, per language charset. Members double rating; Total rating for this charset. size_t size; Number of UCS-2 characters. int result; Nonzero when the sample is probably Doubly-UTF-8 encoded from this charset. int *ucs2; List of significant UCS-2 characters, in order [size ]. int *weights; Weights for double-UTF-8 check [size ]. Positive means normal UTF-8, negative doubly-encoded. EPSILON EPSILON #define EPSILON 0.000001 `Zero' for float comparsion (and to prevent division by zero, etc.). FILL_NONLETTER FILL_NONLETTER #define FILL_NONLETTER '.' Replacement character for non-letters in pair frequencies. LF LF #define LF ((unsigned char)'\n') Line feed character (End-of-line on Unix). CR CR #define CR ((unsigned char)'\r') Carriage return character (End-of-line on Macintosh). ENCA_LANGUAGE_BE ENCA_LANGUAGE_BE extern const EncaLanguageInfo ENCA_LANGUAGE_BE; Belarusian language. Everything the world out there needs to know about this language. ENCA_LANGUAGE_BG ENCA_LANGUAGE_BG extern const EncaLanguageInfo ENCA_LANGUAGE_BG; Bulgarian language. Everything the world out there needs to know about this language. ENCA_LANGUAGE_CS ENCA_LANGUAGE_CS extern const EncaLanguageInfo ENCA_LANGUAGE_CS; Czech language. Everything the world out there needs to know about this language. ENCA_LANGUAGE_ET ENCA_LANGUAGE_ET extern const EncaLanguageInfo ENCA_LANGUAGE_ET; Estonian language. Everything the world out there needs to know about this language. ENCA_LANGUAGE_FI ENCA_LANGUAGE_FI extern const EncaLanguageInfo ENCA_LANGUAGE_FI; Finnish language. Everything the world out there needs to know about this language. ENCA_LANGUAGE_HR ENCA_LANGUAGE_HR extern const EncaLanguageInfo ENCA_LANGUAGE_HR; Croatian language. Everything the world out there needs to know about this language. ENCA_LANGUAGE_HU ENCA_LANGUAGE_HU extern const EncaLanguageInfo ENCA_LANGUAGE_HU; Hungarian language. Everything the world out there needs to know about this language. ENCA_LANGUAGE_LT ENCA_LANGUAGE_LT extern const EncaLanguageInfo ENCA_LANGUAGE_LT; Lithuanian language. Everything the world out there needs to know about this language. ENCA_LANGUAGE_LV ENCA_LANGUAGE_LV extern const EncaLanguageInfo ENCA_LANGUAGE_LV; Latvian language. Everything the world out there needs to know about this language. ENCA_LANGUAGE_PL ENCA_LANGUAGE_PL extern const EncaLanguageInfo ENCA_LANGUAGE_PL; Polish language. Everything the world out there needs to know about this language. ENCA_LANGUAGE_RU ENCA_LANGUAGE_RU extern const EncaLanguageInfo ENCA_LANGUAGE_RU; Russian language. Everything the world out there needs to know about this language. ENCA_LANGUAGE_SK ENCA_LANGUAGE_SK extern const EncaLanguageInfo ENCA_LANGUAGE_SK; Slovak language. Everything the world out there needs to know about this language. ENCA_LANGUAGE_SL ENCA_LANGUAGE_SL extern const EncaLanguageInfo ENCA_LANGUAGE_SL; Slovene language. Everything the world out there needs to know about this language. ENCA_LANGUAGE_UK ENCA_LANGUAGE_UK extern const EncaLanguageInfo ENCA_LANGUAGE_UK; Ukrainian language. Everything the world out there needs to know about this language. ENCA_LANGUAGE_ZH ENCA_LANGUAGE_ZH extern const EncaLanguageInfo ENCA_LANGUAGE_ZH; Chinese language. Everything the world out there needs to know about this language. Project-OSS-Revival-enca-36defd7/devel-docs/xml/libenca-doc.bottom000066400000000000000000000003211507545312400250150ustar00rootroot00000000000000 Project-OSS-Revival-enca-36defd7/devel-docs/xml/libenca-doc.top000066400000000000000000000000001507545312400243050ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/devel-docs/xml/object_index.sgml000066400000000000000000000005631507545312400247600ustar00rootroot00000000000000 Project-OSS-Revival-enca-36defd7/devel-docs/xml/tree_index.sgml000066400000000000000000000002651507545312400244500ustar00rootroot00000000000000 Project-OSS-Revival-enca-36defd7/enca.pc.in000066400000000000000000000004421507545312400204450ustar00rootroot00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ libexecdir=@libexecdir@ encaextconvdir=${libexecdir}/enca/extconv Name: Enca Description: Extermely Naive Charset Analyser library Version: @VERSION@ Libs: -L${libdir} -lenca @LIBM@ Cflags: -I${includedir} Project-OSS-Revival-enca-36defd7/enca.spec.in000066400000000000000000000157011507545312400210010ustar00rootroot00000000000000# RPM package for Enca, an Extremely Naive Charset Analyser. # # This RPM package suports conditional builds. Components can be # enabled/disabled in rpmbuild via --with/--without. Default is: # # rpmbuild -ba --without htmldocs --with static # # Check http://www.rpm.org/wiki/PackagerDocs/ConditionalBuilds for more info. # add --with htmldocs option, i.e. disable generation of HTML documentation by # default %bcond_with htmldocs # add --without static, i.e. enable generation of static libraries by # default %bcond_without static Summary: Detect encoding of text files and convert to other encodings. Name: @PACKAGE_TARNAME@ Version: @PACKAGE_VERSION@ Release: @RELEASE@%{?dist} License: GPLv2 Group: Applications/Text Source: https://github.com/Project-OSS-Revival/enca/releases/download/@PACKAGE_VERSION@/@PACKAGE_TARNAME@-@PACKAGE_VERSION@.tar.gz URL: https://github.com/nijel/@PACKAGE_TARNAME@ Prefix: %{_prefix} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description Enca is an Extremely Naive Charset Analyser. It detects character set and encoding of text files and can also convert them to other encodings using either a built-in converter or external libraries and tools like GNU recode (librecode), UNIX98 iconv (libiconv), perl Unicode::Map and cstocs. Currently, it has support for Belarusian, Bulgarian, Croatian, Czech, Estonian, Finnish, Latvian, Lithuanian, Polish, Russian, Slovak, Slovene, Ukrainian, Chinese, and some multibyte encodings (mostly variants of Unicode) independent on the language. This package contains enca, a command line frontend, as well as the shared Enca libraries other programs can make use of. Install enca if you need to cope with text files of dubious origin and unknown encoding and convert them to some reasonable encoding. %package devel Summary: Header files and libraries for Enca development. Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: pkgconfig %description devel The %{name}-devel package contains the static libraries, header files and documentation for writing programs using Enca, the Extremely Naive Charset Analyser. Install %{name}-devel if you are going to create applications using the Enca library. %prep %setup -q %build %configure \ --disable-dependency-tracking \ --without-librecode \ %{?_without_htmldocs:--disable-gtk-doc} \ %{?_without_static:--disable-static} %__make %{?_smp_mflags} %check #make check %install [ "%{buildroot}" != "/" ] && %__rm -rf %{buildroot} %make_install %__mv %{buildroot}/%{_datadir}/gtk-doc/ gtk-doc %if %{without static} %__rm -f %{buildroot}/%{_libdir}/libenca.a %__rm -f %{buildroot}/%{_libdir}/libenca.la %endif %clean [ "%{buildroot}" != "/" ] && %__rm -rf %{buildroot} %files %defattr(755,root,root) %{_bindir}/enca %{_bindir}/enconv %{_libdir}/libenca.so* # external converters %{_libexecdir}/%{name}/extconv/* %dir %{_libexecdir}/%{name}/extconv %dir %{_libexecdir}/%{name} # docs and man pages %defattr(644,root,root) %doc AUTHORS ChangeLog COPYING FAQ README THANKS TODO %doc %{_mandir}/man1/enca.1* %doc %{_mandir}/man1/enconv.1* %files devel %defattr(-,root,root) %{_includedir}/enca.h %{_libdir}/pkgconfig/enca.pc # static libs %if %{with static} %{_libdir}/libenca.a %{_libdir}/libenca.la %endif # README and HTML docs %doc DEVELOP.md %if %{with htmldocs} %doc gtk-doc/html %endif %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %changelog * Sat Jan 10 2015 Victor Foitzik (vifo) - updated spec to match information on Github and align with recent packaging guidelines from Fedora - added conditional builds for HTML documentation and static libraries * Sun Dec 18 2005 David Necas (Yeti) - fixed 0644 permissions on doc directory * Mon May 17 2004 David Necas (Yeti) - doubled percents in changelog * Mon Dec 22 2003 David Necas (Yeti) - moved wrappers to libexec * Thu Nov 6 2003 David Necas (Yeti) - added b-piconv - fixed HTML doc install paths * Tue Oct 14 2003 David Necas (Yeti) - testing whether $RPM_BUILD_ROOT is not / - updated for new HTML doc location - changed make -> %%__make, rm -> %%__rm * Sat Aug 2 2003 David Necas (Yeti) - cleaning $RPM_BUILD_ROOT in %%install * Sat Jun 28 2003 David Necas (Yeti) - removed --disable-gtk-doc, no longer needed * Fri Jun 20 2003 David Necas (Yeti) - added enca.pc to devel package * Sat Jun 14 2003 David Necas (Yeti) - updated description - added --disable-gtk-doc * Mon Dec 23 2002 David Necas (Yeti) - added libenca.so * Fri Dec 20 2002 David Necas (Yeti) - fixed URL and Source to trific.ath.cx * Mon Oct 21 2002 David Necas (Yeti) - added FAQ to docs * Thu Oct 10 2002 David Necas (Yeti) - removed twice-listed %%{docdir}/html * Sat Sep 21 2002 David Necas (Yeti) - added b-umap * Sun Sep 15 2002 David Necas (Yeti) - added enconv * Thu Aug 29 2002 David Necas (Yeti) - removed bzip2-devel buildprereq * Sat Aug 24 2002 David Necas (Yeti) - added postinstall and postuninstall scriptlets * Wed Aug 21 2002 David Necas (Yeti) - updated to enca-0.10.0-pre2 - added libenca - split into enca and enca-devel - removed cache - fixed HTML_DIR * Tue Jul 10 2001 David Necas (Yeti) - changed rpm macros in Source and URL to autoconf macros to ease debian/ stuff generation * Sun May 20 2001 David Necas (Yeti) - added BuildPrereq: bzip2-devel * Wed May 2 2001 David Necas (Yeti) - changed group to standard (but much less appropriate) Applications/Text - rpm macros are used instead of autoconf macros (after the first definition) * Sun Mar 11 2001 David Necas (Yeti) - added defattr, doc attributes - uses global configure cache - heavy use of predefined directories - configure moved to build section as is usual * Sun Feb 25 2001 David Necas (Yeti) - updated to enca-0.9.0pre4 (including files and descriptions) - added sed dependency * Sun Oct 25 2000 David Necas (Yeti) - updated to enca-0.7.5 * Sun Oct 11 2000 David Necas (Yeti) - removed redundant Provides: enca * Sun Oct 1 2000 David Necas (Yeti) - updated to enca-0.7.1 - man page forced to be intstalled to ${prefix}/share/man * Tue Sep 26 2000 David Necas (Yeti) - updated to enca-0.7.0 - spec autogenerated by configure * Tue Sep 19 2000 David Necas (Yeti) - fixed not installing bcstocs * Wed Sep 13 2000 David Necas (Yeti) - first packaged (0.6.2) Project-OSS-Revival-enca-36defd7/iconvcap.c000066400000000000000000000266011507545312400205610ustar00rootroot00000000000000/* * iconv capability checker by David Necas (Yeti). * This program is in the public domain. * * iconvcap has two modes of operation: * * 1. No command line argumets are given. * Iconvcap tries to find what charsets of interest iconv knows and under * what names. It prints #defines directly includable to C source for * any successfully detected charset (and #defines to NULL for the others). * It also prints some info to stderr, which then goes to config.log. It * returns success (0) iff following conditions are satified * -- iconv is able to convert ISO-8859-1 to some tested variant of Unicode * (see below)---so it's usable at all, and * -- iconv is able convert at least two of the other charsets of interest to * the same variant of Unicode (we then hope conversion in the opposite * direction will work too) * Otherwise, failure (1) is returned and the output should be ignored, if * any. * * 2. A file name is given on command line. * Iconvcap reads given file (should contain the just generated #define list) * and chcecks if conversion from any to any encoding is possible. If it is * OK it returns success (0), otherwise, it fails returning 1. * */ #include #include #include /* string.h or strings.h? That's a question! * Don't use const, the compiler may not like it. */ int strncmp(char *s1, char *s2, size_t n); char* strchr(char *s, int c); char* strrchr(char *s, int c); char* strncpy(char *dest, char *src, size_t n); #define DPREFIX "ICONV_NAME_" #define TEST_ENC_TO_UNICODE(x) \ fprintf(stderr, "iconvcap: checking for %s -> Unicode... ", #x); \ if (iconv_check(VARIANT_##x, unicode) == 0) { \ printf("#define "DPREFIX"%s \"%s\"\n", #x, FROM); \ ok++; \ } else printf("#define "DPREFIX"%s NULL\n", #x); /* ANY variant of unicode is good enough here particular surfaces are defined below */ char* VARIANT_UNICODE[] = { "UCS2", "UCS-2", "ISO10646/UCS2", "ISO-10646/UCS2", "ISO_10646/UCS2", "UNICODE", "ISO-10646", "ISO_10646", "ISO10646", "UCS4", "UCS-4", "ISO10646/UCS4", "ISO-10646/UCS4", "ISO_10646/UCS4", "UTF8", "UTF-8", "ISO10646/UTF8", "ISO-10646/UTF8", "ISO_10646/UTF8", "CSUCS2", "CSUCS4", NULL }; char* VARIANT_ASCII[] = { "ASCII", "CSASCII", "US-ASCII", "ISO646-US", "ISO_646.IRV:1991", "CP367", "IBM367", "CP367", "CSPC367", NULL }; char* VARIANT_ISO88591[] = { "ISO-8859-1", "ISO8859-1", "8859_1", "ISO_8859-1", "LATIN1", "ISOLATIN1", "CSLATIN1", "CSISOLATIN1", NULL }; char* VARIANT_ISO88592[] = { "ISO-8859-2", "ISO8859-2", "8859_2", "ISO_8859-2", "LATIN2", "ISOLATIN2", "CSLATIN2", "CSISOLATIN2", "ISO-IR-101", NULL }; char* VARIANT_ISO88594[] = { "ISO-8859-4", "ISO8859-4", "8859_4", "ISO_8859-4", "LATIN4", "ISOLATIN4", "CSLATIN4", "CSISOLATIN4", "ISO-IR-110", NULL }; char* VARIANT_ISO88595[] = { "ISO-8859-5", "ISO8859-5", "8859_5", "ISO_8859-5", "ISOCYRILLIC", "CSISOCYRILLIC", "ISO-IR-144", NULL }; char* VARIANT_ISO885913[] = { "ISO-8859-13", "ISO8859-13", "8859_13", "ISO_8859-13", "LATIN7", "ISOLATIN7", "CSLATIN7", "CSISOLATIN7", "ISO-IR-179A", "ISOBALTIC", "CSISOBALTIC", "CSISOLATINBALTIC", NULL }; char* VARIANT_ISO885916[] = { "ISO-8859-16", "ISO8859-16", "8859_16", "ISO_8859-16", "ISO-IR-226", "LATIN10", "ISOLATIN10", "CSLATIN10", "CSISOLATIN10", NULL }; char* VARIANT_BALTIC[] = { "BALTIC", "CSBALTIC", "ISO-IR-179", NULL }; char* VARIANT_IBM852[] = { "IBM852", "CP852", "CP-852", "CP_852", "852", "IBM-852", "IBM_852", "PC852", "CSPC852", "CSPCP852", NULL }; char* VARIANT_IBM855[] = { "IBM855", "CP855", "CP-855", "CP_855", "855", "IBM-855", "IBM_855", "PC855", "CSPC855", "CSPCP855", NULL }; char* VARIANT_IBM775[] = { "IBM775", "CP775", "CP-775", "CP_775", "775", "IBM-775", "IBM_775", "PC775", "CSPC775", "CSPCP775", NULL }; char* VARIANT_IBM866[] = { "IBM866", "CP866", "CP-866", "CP_866", "866", "IBM-866", "IBM_866", "PC866", "CSPC866", "CSPCP866", NULL }; char* VARIANT_CP1125[] = { "CP1125", "1125", "CP-1125", "CP_1125", "MS1125", "MS-1125", "WINDOWS-1125", NULL }; char* VARIANT_CP1250[] = { "CP1250", "1250", "CP-1250", "CP_1250", "MS-EE", "MS1250", "MS-1250", "WINDOWS-1250", NULL }; char* VARIANT_CP1251[] = { "CP1251", "1251", "CP-1251", "CP_1251", "MS-CYRL", "MS1251", "MS-1251", "WINDOWS-1251", NULL }; char* VARIANT_CP1257[] = { "CP1257", "1257", "CP-1257", "CP_1257", "MS-BALT", "MS1257", "MS-1257", "WINDOWS-1257", "WinBaltRim", NULL }; char* VARIANT_MACCE[] = { "MACCE", "MAC-CE", "MAC_CE", "MACINTOSH-CE", "MACEE", "MAC-EE", "MAC_EE", "MACINTOSH-EE", NULL }; char* VARIANT_MACCYR[] = { "MACCYR", "MAC-CYR", "MAC_CYR", "MACINTOSH-CYR", "MACCYRILLIC", "MAC-CYRILLIC", "MACINTOSH-CYRILLIC", NULL }; char* VARIANT_KOI8CS2[] = { "KOI8-CS2", "KOI8CS2", "KOI8_CS2", "KOI-8_CS2", "KOI8CS", "KOI8_CS", "KOI8-CS", "KOI-8-CS", "KOI_8-CS", "CSKOI8CS2", NULL }; char* VARIANT_KOI8R[] = { "KOI8-R", "KOI8_R", "KOI-8_R", "KOI8R", "KOI8_R", "CSKOI8R", NULL }; char* VARIANT_KOI8U[] = { "KOI8-U", "KOI8_U", "KOI-8_U", "KOI8U", "KOI8_U", "CSKOI8U", NULL }; char* VARIANT_KOI8UNI[] = { "KOI8-UNI", "KOI8_UNI", "KOI-8_UNI", "KOI8UNI", "KOI8_UNI", "CSKOI8UNI", NULL }; char* VARIANT_ECMA113[] = { "ECMA-113", "ECMA-cyrillic", "ECMA-113:1986", "ISO-IR-111", NULL }; char* VARIANT_KEYBCS2[] = { "KEYBCS2", "KEYBCS-2", "KAM", "KAMENICKY", "CP895", "895", "PC895", "csPC895", NULL }; char* VARIANT_LATEX[] = { "TEX", "LATEX", "LTEX", NULL }; char* VARIANT_UCS2[] = { "UCS-2", "UCS-2BE", "UCS2", "ISO10646/UCS2", "ISO-10646/UCS2", "ISO_10646/UCS2", "CSUCS2", NULL }; char* VARIANT_UCS4[] = { "UCS-4", "UCS-4BE", "UCS4", "ISO10646/UCS4", "ISO-10646/UCS4", "ISO_10646/UCS4", "CSUCS4", NULL }; char* VARIANT_UTF7[] = { "UTF-7", "UTF7", "ISO10646/UTF7", "ISO-10646/UTF7", "ISO_10646/UTF7", "UNICODE/UTF7", "CSUTF7", NULL }; char* VARIANT_UTF8[] = { "UTF-8", "UTF8", "ISO10646/UTF8", "ISO-10646/UTF8", "ISO_10646/UTF8", "UNICODE/UTF8", "CSUTF8", NULL }; char* VARIANT_CORK[] = { "CORK", "T1", NULL }; char* VARIANT_GBK[] = { "GBK", "GB18030", "GB2312", "CP936", NULL }; char* VARIANT_BIG5[] = { "BIG5", "CP950", NULL }; char* VARIANT_HZ[] = { "HZ", "HZ-GB-2312", "GB18030", "GB2312", NULL }; typedef struct S_EncList { char *enc; struct S_EncList *next; } T_EncList, *P_EncList; /* for the case we would be linked with braindead librecode */ char *program_name = "iconvcap"; char *FROM, *TO; /* Local protoypes. */ static int iconv_check (char **fromlist, char **tolist); static int iconv_check_one (char *from, char *to); static int check_transitivity (char *fname); /* main() */ int main(int argc, char *argv[]) { int ok; char *unicode[] = { NULL, NULL }; /* when we are called with some argument, run transitivity test and exit */ if (argc > 1) return check_transitivity(argv[1]); /* check for conversion ISO-8859-1 -> Unicode */ fprintf(stderr, "iconvcap: checking for ISO8859-1 -> Unicode... "); if ((ok = iconv_check(VARIANT_ISO88591, VARIANT_UNICODE)) == 0) { unicode[0] = TO; printf("#define "DPREFIX"UNICODE \"%s\"\n", unicode[0]); } else { fprintf(stderr, "iconvcap: iconv seems to be broken. aborting.\n"); exit(1); } /* create table of charset names how iconv uses them */ ok = 0; TEST_ENC_TO_UNICODE(ASCII); TEST_ENC_TO_UNICODE(BALTIC); TEST_ENC_TO_UNICODE(CP1125); TEST_ENC_TO_UNICODE(CP1250); TEST_ENC_TO_UNICODE(CP1251); TEST_ENC_TO_UNICODE(CP1257); TEST_ENC_TO_UNICODE(ECMA113); TEST_ENC_TO_UNICODE(IBM852); TEST_ENC_TO_UNICODE(IBM855); TEST_ENC_TO_UNICODE(IBM775); TEST_ENC_TO_UNICODE(IBM866); TEST_ENC_TO_UNICODE(ISO88592); TEST_ENC_TO_UNICODE(ISO88594); TEST_ENC_TO_UNICODE(ISO88595); TEST_ENC_TO_UNICODE(ISO885913); TEST_ENC_TO_UNICODE(ISO885916); TEST_ENC_TO_UNICODE(KEYBCS2); TEST_ENC_TO_UNICODE(KOI8CS2); TEST_ENC_TO_UNICODE(KOI8R); TEST_ENC_TO_UNICODE(KOI8U); TEST_ENC_TO_UNICODE(KOI8UNI); TEST_ENC_TO_UNICODE(MACCE); TEST_ENC_TO_UNICODE(MACCYR); TEST_ENC_TO_UNICODE(LATEX); TEST_ENC_TO_UNICODE(UCS2); TEST_ENC_TO_UNICODE(UCS4); TEST_ENC_TO_UNICODE(UTF7); TEST_ENC_TO_UNICODE(UTF8); TEST_ENC_TO_UNICODE(CORK); TEST_ENC_TO_UNICODE(GBK); TEST_ENC_TO_UNICODE(BIG5); TEST_ENC_TO_UNICODE(HZ); if (ok >= 2) exit(0); else exit(1); } /* return 0 if conversion from any charset from fromlist to any charset from tolist is possible and set FROM and TO (globals) to appropriate names (it's assumed fromlist and tolist are lists of charset aliases) */ static int iconv_check(char **fromlist, char **tolist) { char **from, **to; for (from = fromlist; *from != NULL; from++) { for (to = tolist; *to != NULL; to++) { if (iconv_check_one(*from, *to) == 0) { fprintf(stderr, "found %s -> %s\n", *from, *to); FROM = *from; TO = *to; return 0; } } } fprintf(stderr, "failed.\n"); FROM = NULL; TO = NULL; return 1; } static void free_enclist (P_EncList enclist) { P_EncList p_e = enclist; P_EncList p_e_next; while (p_e != NULL) { p_e_next = p_e->next; free(p_e->enc); free(p_e); p_e = p_e_next; } } /* check if conversion from any encoding not defined as NULL in file fname to any other defined there is possible, in other words check transitivity condition for all defined encodings (we then hope this condition holds also for encodings we don't know anything about) returns 0 on success 1 on failure */ static int check_transitivity(char *fname) { char *s, *sb, *se; FILE *f; P_EncList enclist = NULL; P_EncList p_e; s = (char*)malloc(1024); if ((f = fopen(fname, "r")) == NULL) { fprintf(stderr, "iconvcap: cannot open %s\n", fname); free(s); return 1; } while (fgets(s, 1024, f) != NULL) { p_e = (P_EncList)malloc(sizeof(T_EncList)); if (strncmp(s, "#define", 7) != 0) { fprintf(stderr, "iconvcap: malformed input line: %s", s); fclose(f); free(s); free(p_e); free_enclist(enclist); return 1; } if ((sb = strchr(s, '"')) != NULL) { if ((se = strrchr(s, '"')) == sb) { fprintf(stderr, "iconvcap: malformed input line: %s", s); fclose(f); free(s); free(p_e); free_enclist(enclist); return 1; } p_e->enc = strncpy((char*)malloc(se-sb), sb+1, se-sb-1); p_e->enc[se-sb-1] = '\0'; p_e->next = enclist; enclist = p_e; } } fclose(f); if (enclist == NULL) { fprintf(stderr, "no valid encodings\n"); free(s); return 1; } while (enclist != NULL) { for (p_e = enclist->next; p_e != NULL; p_e = p_e->next) { if (iconv_check_one(enclist->enc, p_e->enc) != 0) { fprintf(stderr, "iconvap: iconv_open(%s, %s) failed\n", enclist->enc, p_e->enc); free(s); free_enclist(enclist); return 1; } if (iconv_check_one(p_e->enc, enclist->enc) != 0) { fprintf(stderr, "iconvcap: iconv_open(%s, %s) failed\n", p_e->enc, enclist->enc); free(s); free_enclist(enclist); return 1; } } enclist = enclist->next; } fprintf(stderr, "iconvcap: transitivity OK\n"); free(s); free_enclist(enclist); return 0; } /* check whether conversion from `from' to `to' is possible */ static int iconv_check_one(char *from, char *to) { iconv_t id; id = iconv_open(from, to); if (id == (iconv_t)(-1)) return 1; iconv_close(id); return 0; } Project-OSS-Revival-enca-36defd7/install-sh000077500000000000000000000357761507545312400206340ustar00rootroot00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2020-11-14.01; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_mkdir= # Desired mode of installed file. mode=0755 # Create dirs (including intermediate dirs) using mode 755. # This is like GNU 'install' as of coreutils 8.32 (2020). mkdir_umask=22 backupsuffix= chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -p pass -p to $cpprog. -s $stripprog installed files. -S SUFFIX attempt to back up existing files, with suffix SUFFIX. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG By default, rm is invoked with -f; when overridden with RMPROG, it's up to you to specify -f if you want it. If -S is not specified, no backups are attempted. Email bug reports to bug-automake@gnu.org. Automake home page: https://www.gnu.org/software/automake/ " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -p) cpprog="$cpprog -p";; -s) stripcmd=$stripprog;; -S) backupsuffix="$2" shift;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? # Don't chown directories that already exist. if test $dstdir_status = 0; then chowncmd="" fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dstbase=`basename "$src"` case $dst in */) dst=$dst$dstbase;; *) dst=$dst/$dstbase;; esac dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi case $dstdir in */) dstdirslash=$dstdir;; *) dstdirslash=$dstdir/;; esac obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false # The $RANDOM variable is not portable (e.g., dash). Use it # here however when possible just to lower collision chance. tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap ' ret=$? rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null exit $ret ' 0 # Because "mkdir -p" follows existing symlinks and we likely work # directly in world-writeable /tmp, make sure that the '$tmpdir' # directory is successfully created first before we actually test # 'mkdir -p'. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. test_tmpdir="$tmpdir/a" ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi trap '' 0;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=${dstdirslash}_inst.$$_ rmtmp=${dstdirslash}_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && { test -z "$stripcmd" || { # Create $dsttmp read-write so that cp doesn't create it read-only, # which would cause strip to fail. if test -z "$doit"; then : >"$dsttmp" # No need to fork-exec 'touch'. else $doit touch "$dsttmp" fi } } && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # If $backupsuffix is set, and the file being installed # already exists, attempt a backup. Don't worry if it fails, # e.g., if mv doesn't support -f. if test -n "$backupsuffix" && test -f "$dst"; then $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null fi # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: Project-OSS-Revival-enca-36defd7/lib/000077500000000000000000000000001507545312400173545ustar00rootroot00000000000000Project-OSS-Revival-enca-36defd7/lib/.gitignore000066400000000000000000000000431507545312400213410ustar00rootroot00000000000000.deps .libs Makefile *.lo *.o *.la Project-OSS-Revival-enca-36defd7/lib/Makefile.am000066400000000000000000000014571507545312400214170ustar00rootroot00000000000000include_HEADERS = enca.h lib_LTLIBRARIES = libenca.la # In following order do: # Any code change C: R++: A # Any iface change C++: 0: A # Adding ifaces C: R: A++ # Changing ifaces C: R: 0 libenca_la_LDFLAGS = -version-info 5:1:5 libenca_la_SOURCES = \ common.c \ ctype.c \ enca.c \ enca.h \ encnames.c \ filters.c \ guess.c \ internal.h \ lang.c \ lang_be.c \ lang_bg.c \ lang_cs.c \ lang_et.c \ lang_fi.c \ lang_hr.c \ lang_hu.c \ lang_lt.c \ lang_lv.c \ lang_pl.c \ lang_ru.c \ lang_sk.c \ lang_sl.c \ lang_uk.c \ lang_zh.c \ multibyte.c \ pair.c \ unicodemap.c \ utf8_double.c AM_CPPFLAGS = -I$(top_srcdir) $(GCOV_CPPFLAGS) AM_LDFLAGS = $(GCOV_LDFLAGS) AM_CFLAGS = $(GCOV_FLAGS) clean-local: rm -f core.* *~ rm -f *.gc* Project-OSS-Revival-enca-36defd7/lib/Makefile.in000066400000000000000000000672511507545312400214340ustar00rootroot00000000000000# Makefile.in generated by automake 1.17 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2024 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) am__rm_f = rm -f $(am__rm_f_notfound) am__rm_rf = rm -rf $(am__rm_f_notfound) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = lib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gcov.m4 \ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libiconv.m4 \ $(top_srcdir)/m4/libm.m4 $(top_srcdir)/m4/librecode.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/localias.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/m4_ax_prog_cc_for_build.m4 \ $(top_srcdir)/m4/tools.m4 $(top_srcdir)/m4/typevar.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(include_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libenca_la_LIBADD = am_libenca_la_OBJECTS = common.lo ctype.lo enca.lo encnames.lo \ filters.lo guess.lo lang.lo lang_be.lo lang_bg.lo lang_cs.lo \ lang_et.lo lang_fi.lo lang_hr.lo lang_hu.lo lang_lt.lo \ lang_lv.lo lang_pl.lo lang_ru.lo lang_sk.lo lang_sl.lo \ lang_uk.lo lang_zh.lo multibyte.lo pair.lo unicodemap.lo \ utf8_double.lo libenca_la_OBJECTS = $(am_libenca_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libenca_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libenca_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/common.Plo ./$(DEPDIR)/ctype.Plo \ ./$(DEPDIR)/enca.Plo ./$(DEPDIR)/encnames.Plo \ ./$(DEPDIR)/filters.Plo ./$(DEPDIR)/guess.Plo \ ./$(DEPDIR)/lang.Plo ./$(DEPDIR)/lang_be.Plo \ ./$(DEPDIR)/lang_bg.Plo ./$(DEPDIR)/lang_cs.Plo \ ./$(DEPDIR)/lang_et.Plo ./$(DEPDIR)/lang_fi.Plo \ ./$(DEPDIR)/lang_hr.Plo ./$(DEPDIR)/lang_hu.Plo \ ./$(DEPDIR)/lang_lt.Plo ./$(DEPDIR)/lang_lv.Plo \ ./$(DEPDIR)/lang_pl.Plo ./$(DEPDIR)/lang_ru.Plo \ ./$(DEPDIR)/lang_sk.Plo ./$(DEPDIR)/lang_sl.Plo \ ./$(DEPDIR)/lang_uk.Plo ./$(DEPDIR)/lang_zh.Plo \ ./$(DEPDIR)/multibyte.Plo ./$(DEPDIR)/pair.Plo \ ./$(DEPDIR)/unicodemap.Plo ./$(DEPDIR)/utf8_double.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libenca_la_SOURCES) DIST_SOURCES = $(libenca_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(include_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_EXEEXT = @BUILD_EXEEXT@ BUILD_OBJEXT = @BUILD_OBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ CONVERTER_LIBS = @CONVERTER_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CSCOPE = @CSCOPE@ CSTOCS_PROG = @CSTOCS_PROG@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFAULT_CONVERTER_LIST = @DEFAULT_CONVERTER_LIST@ DEFAULT_EXTERNAL_CONVERTER = @DEFAULT_EXTERNAL_CONVERTER@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ GCOV = @GCOV@ GCOV_CPPFLAGS = @GCOV_CPPFLAGS@ GCOV_FLAGS = @GCOV_FLAGS@ GCOV_LDFLAGS = @GCOV_LDFLAGS@ GREP = @GREP@ GTKDOC = @GTKDOC@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ LIBICONV = @LIBICONV@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAP_PROG = @MAP_PROG@ MKDIR_P = @MKDIR_P@ MKTEMP_PROG = @MKTEMP_PROG@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PICONV_PROG = @PICONV_PROG@ RANLIB = @RANLIB@ RECODE_PROG = @RECODE_PROG@ RELEASE = @RELEASE@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SHELL_RANDOM_FILENAME = @SHELL_RANDOM_FILENAME@ STRIP = @STRIP@ UMAP_PROG = @UMAP_PROG@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CC_FOR_BUILD = @ac_ct_CC_FOR_BUILD@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__rm_f_notfound = @am__rm_f_notfound@ am__tar = @am__tar@ am__untar = @am__untar@ am__xargs_n = @am__xargs_n@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ include_HEADERS = enca.h lib_LTLIBRARIES = libenca.la # In following order do: # Any code change C: R++: A # Any iface change C++: 0: A # Adding ifaces C: R: A++ # Changing ifaces C: R: 0 libenca_la_LDFLAGS = -version-info 5:1:5 libenca_la_SOURCES = \ common.c \ ctype.c \ enca.c \ enca.h \ encnames.c \ filters.c \ guess.c \ internal.h \ lang.c \ lang_be.c \ lang_bg.c \ lang_cs.c \ lang_et.c \ lang_fi.c \ lang_hr.c \ lang_hu.c \ lang_lt.c \ lang_lv.c \ lang_pl.c \ lang_ru.c \ lang_sk.c \ lang_sl.c \ lang_uk.c \ lang_zh.c \ multibyte.c \ pair.c \ unicodemap.c \ utf8_double.c AM_CPPFLAGS = -I$(top_srcdir) $(GCOV_CPPFLAGS) AM_LDFLAGS = $(GCOV_LDFLAGS) AM_CFLAGS = $(GCOV_FLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits lib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits lib/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -$(am__rm_f) $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ echo rm -f $${locs}; \ $(am__rm_f) $${locs} libenca.la: $(libenca_la_OBJECTS) $(libenca_la_DEPENDENCIES) $(EXTRA_libenca_la_DEPENDENCIES) $(AM_V_CCLD)$(libenca_la_LINK) -rpath $(libdir) $(libenca_la_OBJECTS) $(libenca_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctype.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enca.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/encnames.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filters.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/guess.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_be.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_bg.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_cs.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_et.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_fi.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_hr.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_hu.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_lt.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_lv.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_pl.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_ru.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_sk.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_sl.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_uk.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_zh.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multibyte.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pair.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unicodemap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8_double.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @: >>$@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -$(am__rm_f) $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/common.Plo -rm -f ./$(DEPDIR)/ctype.Plo -rm -f ./$(DEPDIR)/enca.Plo -rm -f ./$(DEPDIR)/encnames.Plo -rm -f ./$(DEPDIR)/filters.Plo -rm -f ./$(DEPDIR)/guess.Plo -rm -f ./$(DEPDIR)/lang.Plo -rm -f ./$(DEPDIR)/lang_be.Plo -rm -f ./$(DEPDIR)/lang_bg.Plo -rm -f ./$(DEPDIR)/lang_cs.Plo -rm -f ./$(DEPDIR)/lang_et.Plo -rm -f ./$(DEPDIR)/lang_fi.Plo -rm -f ./$(DEPDIR)/lang_hr.Plo -rm -f ./$(DEPDIR)/lang_hu.Plo -rm -f ./$(DEPDIR)/lang_lt.Plo -rm -f ./$(DEPDIR)/lang_lv.Plo -rm -f ./$(DEPDIR)/lang_pl.Plo -rm -f ./$(DEPDIR)/lang_ru.Plo -rm -f ./$(DEPDIR)/lang_sk.Plo -rm -f ./$(DEPDIR)/lang_sl.Plo -rm -f ./$(DEPDIR)/lang_uk.Plo -rm -f ./$(DEPDIR)/lang_zh.Plo -rm -f ./$(DEPDIR)/multibyte.Plo -rm -f ./$(DEPDIR)/pair.Plo -rm -f ./$(DEPDIR)/unicodemap.Plo -rm -f ./$(DEPDIR)/utf8_double.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-includeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/common.Plo -rm -f ./$(DEPDIR)/ctype.Plo -rm -f ./$(DEPDIR)/enca.Plo -rm -f ./$(DEPDIR)/encnames.Plo -rm -f ./$(DEPDIR)/filters.Plo -rm -f ./$(DEPDIR)/guess.Plo -rm -f ./$(DEPDIR)/lang.Plo -rm -f ./$(DEPDIR)/lang_be.Plo -rm -f ./$(DEPDIR)/lang_bg.Plo -rm -f ./$(DEPDIR)/lang_cs.Plo -rm -f ./$(DEPDIR)/lang_et.Plo -rm -f ./$(DEPDIR)/lang_fi.Plo -rm -f ./$(DEPDIR)/lang_hr.Plo -rm -f ./$(DEPDIR)/lang_hu.Plo -rm -f ./$(DEPDIR)/lang_lt.Plo -rm -f ./$(DEPDIR)/lang_lv.Plo -rm -f ./$(DEPDIR)/lang_pl.Plo -rm -f ./$(DEPDIR)/lang_ru.Plo -rm -f ./$(DEPDIR)/lang_sk.Plo -rm -f ./$(DEPDIR)/lang_sl.Plo -rm -f ./$(DEPDIR)/lang_uk.Plo -rm -f ./$(DEPDIR)/lang_zh.Plo -rm -f ./$(DEPDIR)/multibyte.Plo -rm -f ./$(DEPDIR)/pair.Plo -rm -f ./$(DEPDIR)/unicodemap.Plo -rm -f ./$(DEPDIR)/utf8_double.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libLTLIBRARIES clean-libtool clean-local \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-includeHEADERS install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-includeHEADERS \ uninstall-libLTLIBRARIES .PRECIOUS: Makefile clean-local: rm -f core.* *~ rm -f *.gc* # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: # Tell GNU make to disable its built-in pattern rules. %:: %,v %:: RCS/%,v %:: RCS/% %:: s.% %:: SCCS/s.% Project-OSS-Revival-enca-36defd7/lib/common.c000066400000000000000000000116121507545312400210110ustar00rootroot00000000000000/* memory and string operations and some more common stuff Copyright (C) 2000-2002 David Necas (Yeti) This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include #include "enca.h" #include "internal.h" /** * enca_malloc: * @size: The number of bytes to allocate. * * Allocates memory, always successfully (when fails, aborts program). * * Returns: Pointer to the newly allocated memory. **/ void* enca_malloc(size_t size) { void *ptr; if (size == 0) size = 1; ptr = malloc(size); assert(ptr != NULL); return ptr; } /** * enca_realloc: * @ptr: Pointer to block of previously allocated memory. * @size: The number of bytes to resize the block. * * Reallocates memory, always successfully (when fails, aborts program). * * Returns: Pointer to the newly allocated memory, #NULL when @size is zero. **/ void* enca_realloc(void *ptr, size_t size) { if (size == 0) { free(ptr); return NULL; } ptr = realloc(ptr, size); assert(ptr != NULL); return ptr; } /** * enca_strdup: * @s: A string. * * Duplicates string. * * Will be defined as strdup() when system provides it. * * Returns: The newly allocated string copy. **/ char* enca_strdup(const char *s) { if (s == NULL) return NULL; else return strcpy(enca_malloc(strlen(s) + 1), s); } #ifndef HAVE_STRSTR /** * enca_strstr: * @haystack: A string where to search. * @needle: A string to find. * * Finds occurence of a substring in a string. * * Will be defined as strstr() when system provides it. * * Returns: Pointer to the first occurence of @needle in @haystack; #NULL if * not found. **/ const char* enca_strstr(const char *haystack, const char *needle) { char c; size_t n; /* handle singularities */ if (needle == NULL) return haystack; if ((n = strlen(needle)) == 0) return haystack; /* search */ c = needle[0]; while ((haystack = strchr(haystack, c)) != NULL) { if (strncmp(haystack, needle, n) == 0) return haystack; } return NULL; } #endif #ifndef HAVE_STPCPY /** * enca_stpcpy: * @dest: A string. * @src: A string to append. * * Appends a string to the end of another strings, returning pointer to * the terminating zero byte. * * Will be defined as stpcpy() when system provides it. * * Caller is responisble for providing @dest long enough to hold the result. * * Returns: Pointer to the terminating zero byte of resulting string. **/ char* enca_stpcpy(char *dest, const char *src) { const char *p = src; if (src == NULL) return dest; while (*p != '\0') *dest++ = *p++; *dest = '\0'; return dest; } #endif /** * enca_strconcat: * @str: A string. * @...: A #NULL-terminated list of string to append. * * Concatenates arbitrary (but at least one) number of strings. * * Returns: All the strings concatenated together. **/ char* enca_strconcat(const char *str, ...) { va_list ap; char *result = NULL; size_t n; const char *s; char *r; /* compute size of resulting string */ n = 1; va_start(ap, str); for (s = str; s != NULL; s = va_arg(ap, const char*)) n += strlen(s); va_end(ap); /* and construct it using the smart stpcpy() function */ r = result = (char*)enca_malloc(n); va_start(ap, str); for (s = str; s != NULL; s = va_arg(ap, const char*)) r = enca_stpcpy(r, s); va_end(ap); return result; } /** * enca_strappend: * @str: A string. * @...: A #NULL-terminated list of string to append. * * Appends arbitrary number of strings to a string. * * The string @str is destroyed (reallocated), the others are kept. * * Returns: All the strings concatenated together. **/ char* enca_strappend(char *str, ...) { va_list ap; size_t n, n1; const char *s; char *r; /* compute size of resulting string */ n1 = strlen(str); n = 1 + n1; va_start(ap, str); for (s = va_arg(ap, const char*); s != NULL; s = va_arg(ap, const char*)) n += strlen(s); va_end(ap); /* and construct it using the smart stpcpy() function */ str = (char*)enca_realloc(str, n); r = str + n1; va_start(ap, str); for (s = va_arg(ap, const char*); s != NULL; s = va_arg(ap, const char*)) r = enca_stpcpy(r, s); va_end(ap); return str; } /* vim: ts=2 */ Project-OSS-Revival-enca-36defd7/lib/ctype.c000066400000000000000000000070231507545312400206460ustar00rootroot00000000000000/* convert charset and surface names to internal representation and back Copyright (C) 2000-2003 David Necas (Yeti) Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald and the GLib team. This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "internal.h" /* Basically taken from GLib, some more flags were added. * Note glibc says isspace('\v'), GLib says it is not. */ const short int enca_ctype_data[0x100] = { 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, /* 0x00 */ 0x1004, 0x0104, 0x0104, 0x1004, 0x0104, 0x0104, 0x1004, 0x1004, /* 0x08 */ 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, /* 0x10 */ 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, /* 0x18 */ 0x0140, 0x00d0, 0x00d0, 0x00d0, 0x00d0, 0x00d0, 0x00d0, 0x00d0, /* 0x20 */ 0x00d0, 0x00d0, 0x00d0, 0x00d0, 0x00d0, 0x08d0, 0x08d0, 0x08d0, /* 0x28 */ 0x0c59, 0x0c59, 0x0c59, 0x0c59, 0x0c59, 0x0c59, 0x0c59, 0x0c59, /* 0x30 */ 0x0c59, 0x0c59, 0x08d0, 0x00d0, 0x00d0, 0x00d0, 0x00d0, 0x00d0, /* 0x38 */ 0x00d0, 0x2e53, 0x2e53, 0x2e53, 0x2e53, 0x2e53, 0x2e53, 0x2a53, /* 0x40 */ 0x2a53, 0x2a53, 0x2a53, 0x2a53, 0x2a53, 0x2a53, 0x2a53, 0x2a53, /* 0x48 */ 0x2a53, 0x2a53, 0x2a53, 0x2a53, 0x2a53, 0x2a53, 0x2a53, 0x2a53, /* 0x50 */ 0x2a53, 0x2a53, 0x2a53, 0x00d0, 0x00d0, 0x00d0, 0x00d0, 0x08d0, /* 0x58 */ 0x00d0, 0x2c73, 0x2c73, 0x2c73, 0x2c73, 0x2c73, 0x2c73, 0x2873, /* 0x60 */ 0x2873, 0x2873, 0x2873, 0x2873, 0x2873, 0x2873, 0x2873, 0x2873, /* 0x68 */ 0x2873, 0x2873, 0x2873, 0x2873, 0x2873, 0x2873, 0x2873, 0x2873, /* 0x70 */ 0x2873, 0x2873, 0x2873, 0x00d0, 0x00d0, 0x00d0, 0x00d0, 0x1004, /* 0x78 */ 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0x80 */ 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0x88 */ 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0x90 */ 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0x98 */ 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0xa0 */ 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0xa8 */ 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0xb0 */ 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0xb8 */ 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0xc0 */ 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0xc8 */ 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0xd0 */ 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0xd8 */ 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0xe0 */ 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0xe8 */ 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0xf0 */ 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0xf8 */ }; Project-OSS-Revival-enca-36defd7/lib/enca.c000066400000000000000000000110201507545312400204200ustar00rootroot00000000000000/* encoding-guessing libary; the high-level analyser interface Copyright (C) 2000-2003 David Necas (Yeti) This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "enca.h" #include "internal.h" /** * enca_analyser_alloc: * @langname: Language for which the analyser should be initialized. * * Allocates an analyser and initializes it for language @language. * * The analyser, once crerated, can be used only for language for which it * was initialized. If you need to detect encodings of texts in more than one * language, you must allocate an analyser for each one. Note however, an * analyser may occupy a considerable amount of memory (a few hundreds of kB), * so it's generally not a good idea to have several hundreds of them floating * around. * * @langname is two-letter ISO 639:1989 language code. Locale names in form * language_territory and ISO-639 English language names also may be accepted * in the future. To be on the safe side, use only names returned by * enca_get_languages(). * * Returns: The newly created #EncaAnalyser on success, #NULL on failure * (namely when @langname is unknown or otherwise invalid). **/ EncaAnalyser enca_analyser_alloc(const char *langname) { EncaAnalyserState *analyser; if (langname == NULL) return NULL; analyser = NEW(EncaAnalyserState, 1); if (!enca_language_init(analyser, langname)) { enca_free(analyser); return NULL; } enca_guess_init(analyser); enca_double_utf8_init(analyser); enca_pair_init(analyser); return analyser; } /** * enca_analyser_free: * @analyser: An analyser to be destroyed. * * Frees memory used by #EncaAnalyser @analyser. **/ void enca_analyser_free(EncaAnalyser analyser) { assert(analyser != NULL); enca_pair_destroy(analyser); enca_double_utf8_destroy(analyser); enca_guess_destroy(analyser); enca_language_destroy(analyser); enca_free(analyser); } /** * enca_errno: * @analyser: An analyser. * * Returns analyser error code. * * The error code is not modified. However, any other analyser call i.e. * call to a function taking @analyser as parameter can change the error code. * * Returns: Error code of reason why last analyser call failed. **/ int enca_errno(EncaAnalyser analyser) { assert(analyser != NULL); return analyser->gerrno; } /** * enca_strerror: * @analyser: An analyser. * @errnum: An analyser error code. * * Returns string describing the error code. * * The returned string must be considered constant and must NOT be freed. * It is however gauranteed not to be modified on invalidated by subsequent * calls to any libenca functions, including enca_strerror(). * * The analyser error code is not changed for a successful call, and it set * to #ENCA_EINVALUE upon error. * * Returns: String describing the error code. **/ const char* enca_strerror(EncaAnalyser analyser, int errnum) { static const char *const DESCRIPTION_LIST[] = { "OK", "Invalid value", "Sample is empty", "After filtering, (almost) nothing remained", "Multibyte tests failed, language contains no 8bit charsets", "Not enough significant characters", "No clear winner", "Sample is just garbage" }; if ((size_t)errnum >= ELEMENTS(DESCRIPTION_LIST)) { analyser->gerrno = ENCA_EINVALUE; return "Unknown error! (FIXME!)"; } return DESCRIPTION_LIST[errnum]; } /***** Documentation *********************************************************/ /** * EncaErrno: * @ENCA_EOK: OK. * @ENCA_EINVALUE: Invalid value (usually of an option). * @ENCA_EEMPTY: Sample is empty. * @ENCA_EFILTERED: After filtering, (almost) nothing remained. * @ENCA_ENOCS8: Mulitibyte tests failed and language contains no 8bit charsets. * @ENCA_ESIGNIF: Too few significant characters. * @ENCA_EWINNER: No clear winner. * @ENCA_EGARBAGE: Sample is garbage. * * Error codes. **/ /* vim: ts=2 sw=2 et */ Project-OSS-Revival-enca-36defd7/lib/enca.h000066400000000000000000000203721507545312400204370ustar00rootroot00000000000000/* This header file is in the public domain. */ #ifndef ENCA_H #define ENCA_H #include /* According to autoconf stdlib may not be enough for size_t */ #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** * SECTION:enums * @short_description: Enca library typedefs, enums and constants. * */ /* Enumerated types */ typedef enum { /*< flags >*/ ENCA_SURFACE_EOL_CR = 1 << 0, ENCA_SURFACE_EOL_LF = 1 << 1, ENCA_SURFACE_EOL_CRLF = 1 << 2, ENCA_SURFACE_EOL_MIX = 1 << 3, ENCA_SURFACE_EOL_BIN = 1 << 4, ENCA_SURFACE_MASK_EOL = (ENCA_SURFACE_EOL_CR | ENCA_SURFACE_EOL_LF | ENCA_SURFACE_EOL_CRLF | ENCA_SURFACE_EOL_MIX | ENCA_SURFACE_EOL_BIN), ENCA_SURFACE_PERM_21 = 1 << 5, ENCA_SURFACE_PERM_4321 = 1 << 6, ENCA_SURFACE_PERM_MIX = 1 << 7, ENCA_SURFACE_MASK_PERM = (ENCA_SURFACE_PERM_21 | ENCA_SURFACE_PERM_4321 | ENCA_SURFACE_PERM_MIX), ENCA_SURFACE_QP = 1 << 8, ENCA_SURFACE_REMOVE = 1 << 13, ENCA_SURFACE_UNKNOWN = 1 << 14, ENCA_SURFACE_MASK_ALL = (ENCA_SURFACE_MASK_EOL | ENCA_SURFACE_MASK_PERM | ENCA_SURFACE_QP | ENCA_SURFACE_REMOVE) } EncaSurface; typedef enum { ENCA_NAME_STYLE_ENCA, ENCA_NAME_STYLE_RFC1345, ENCA_NAME_STYLE_CSTOCS, ENCA_NAME_STYLE_ICONV, ENCA_NAME_STYLE_HUMAN, ENCA_NAME_STYLE_MIME } EncaNameStyle; typedef enum { /*< flags >*/ ENCA_CHARSET_7BIT = 1 << 0, ENCA_CHARSET_8BIT = 1 << 1, ENCA_CHARSET_16BIT = 1 << 2, ENCA_CHARSET_32BIT = 1 << 3, ENCA_CHARSET_FIXED = 1 << 4, ENCA_CHARSET_VARIABLE = 1 << 5, ENCA_CHARSET_BINARY = 1 << 6, ENCA_CHARSET_REGULAR = 1 << 7, ENCA_CHARSET_MULTIBYTE = 1 << 8 } EncaCharsetFlags; typedef enum { ENCA_EOK = 0, ENCA_EINVALUE, ENCA_EEMPTY, ENCA_EFILTERED, ENCA_ENOCS8, ENCA_ESIGNIF, ENCA_EWINNER, ENCA_EGARBAGE } EncaErrno; #define ENCA_CS_UNKNOWN (-1) #define ENCA_NOT_A_CHAR 0xffff /** * SECTION:analyser * @short_description: Basic analyser interface. * * Basically you want to allocate an analyser with enca_analyser_alloc() for some * language, use enca_analyse() (or enca_analyse_const()) on a buffer to find its * encoding, and interpret the results with something like enca_charset_name(). * The analyser then can be used for another buffer. Once you no longer need * it, call enca_analyser_free() to release it. * A single working example is better than a hundred pages of reference manual. * * A minimal Enca library application – Czech encoding detector. * * * |[ * #include * #include * int main(void) * { * EncaAnalyser analyser; * EncaEncoding encoding; * unsigned char buffer[4096]; * size_t buflen; * * buflen = fread(buffer, 1, 4096, stdin); * analyser = enca_analyser_alloc("cs"); * encoding = enca_analyse(analyser, buffer, buflen); * printf("Charset: %s\n", enca_charset_name(encoding.charset, ENCA_NAME_STYLE_HUMAN)); * enca_analyser_free(analyser); * return 0; * } * ]| */ /* Published (opaque) typedefs */ typedef struct _EncaAnalyserState *EncaAnalyser; /** * SECTION:encodings * @short_description: Functions and macros for getting something sensible from #EncaEncoding. * */ /* Public (transparent) typedefs */ typedef struct _EncaEncoding EncaEncoding; struct _EncaEncoding { int charset; EncaSurface surface; }; /* Basic interface. */ EncaAnalyser enca_analyser_alloc (const char *langname); void enca_analyser_free (EncaAnalyser analyser); EncaEncoding enca_analyse (EncaAnalyser analyser, unsigned char *buffer, size_t size); EncaEncoding enca_analyse_const (EncaAnalyser analyser, const unsigned char *buffer, size_t size); int enca_double_utf8_check (EncaAnalyser analyser, const unsigned char *buffer, size_t size); int* enca_double_utf8_get_candidates (EncaAnalyser analyser); int enca_errno (EncaAnalyser analyser); const char* enca_strerror (EncaAnalyser analyser, int errnum); /* Options. */ void enca_set_multibyte (EncaAnalyser analyser, int multibyte); int enca_get_multibyte (EncaAnalyser analyser); void enca_set_interpreted_surfaces (EncaAnalyser analyser, int interpreted_surfaces); int enca_get_interpreted_surfaces (EncaAnalyser analyser); void enca_set_ambiguity (EncaAnalyser analyser, int ambiguity); int enca_get_ambiguity (EncaAnalyser analyser); void enca_set_filtering (EncaAnalyser analyser, int filtering); int enca_get_filtering (EncaAnalyser analyser); void enca_set_garbage_test (EncaAnalyser analyser, int garabage_test); int enca_get_garbage_test (EncaAnalyser analyser); void enca_set_termination_strictness (EncaAnalyser analyser, int termination_strictness); int enca_get_termination_strictness (EncaAnalyser analyser); int enca_set_significant (EncaAnalyser analyser, size_t significant); size_t enca_get_significant (EncaAnalyser analyser); int enca_set_threshold (EncaAnalyser analyser, double threshold); double enca_get_threshold (EncaAnalyser analyser); /* Names and properties. */ const char* enca_charset_name (int charset, EncaNameStyle whatname); const char** enca_get_charset_aliases (int charset, size_t *n); char* enca_get_surface_name (EncaSurface surface, EncaNameStyle whatname); EncaEncoding enca_parse_encoding_name (const char *name); EncaSurface enca_charset_natural_surface (int charset); EncaCharsetFlags enca_charset_properties (int charset); #define enca_charset_is_known(cs) \ ((cs) != ENCA_CS_UNKNOWN) #define enca_charset_is_7bit(cs) \ (enca_charset_properties(cs) & ENCA_CHARSET_7BIT) #define enca_charset_is_8bit(cs) \ (enca_charset_properties(cs) & ENCA_CHARSET_8BIT) #define enca_charset_is_16bit(cs) \ (enca_charset_properties(cs) & ENCA_CHARSET_16BIT) #define enca_charset_is_32bit(cs) \ (enca_charset_properties(cs) & ENCA_CHARSET_32BIT) #define enca_charset_is_fixed(cs) \ (enca_charset_properties(cs) & ENCA_CHARSET_FIXED) #define enca_charset_is_variable(cs) \ (enca_charset_properties(cs) & ENCA_CHARSET_VARIABLE) #define enca_charset_is_binary(cs) \ (enca_charset_properties(cs) & ENCA_CHARSET_BINARY) #define enca_charset_is_regular(cs) \ (enca_charset_properties(cs) & ENCA_CHARSET_REGULAR) #define enca_charset_is_multibyte(cs) \ (enca_charset_properties(cs) & ENCA_CHARSET_MULTIBYTE) /** * SECTION:auxiliary * @short_description: Variouis auxiliary functions and informations about libenca. * */ /* Auxuliary functions. */ int enca_charset_has_ucs2_map (int charset); int enca_charset_ucs2_map (int charset, unsigned int *buffer); size_t enca_number_of_charsets (void); const char* enca_analyser_language (EncaAnalyser analyser); const char* enca_language_english_name (const char *lang); const char** enca_get_languages (size_t *n); int* enca_get_language_charsets (const char *langname, size_t *n); #ifdef __cplusplus } #endif /* __cplusplus */ #endif Project-OSS-Revival-enca-36defd7/lib/encnames.c000066400000000000000000000447221507545312400213220ustar00rootroot00000000000000/* convert charset and surface names to internal representation and back Copyright (C) 2000-2003 David Necas (Yeti) This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "enca.h" #include "internal.h" #include "tools/encodings.h" #define NCHARSETS (ELEMENTS(CHARSET_INFO)) #define NALIASES (ELEMENTS(ALIAS_LIST)) #define NSURFACES (ELEMENTS(SURFACE_INFO)) #define ENCODING_UNKNOWN { ENCA_CS_UNKNOWN, 0 } /* tolower() and toupper() which never fail. */ #define enca_tolower(c) (enca_isupper(c) ? (c) + ('a' - 'A') : (c)) #define enca_toupper(c) (enca_islower(c) ? (c) - ('a' - 'A') : (c)) static const char *UNKNOWN_CHARSET_NAME = "unknown"; static const char *UNKNOWN_CHARSET_HUMAN = "Unrecognized encoding"; static const char *UNKNOWN_CHARSET_SYM = "???"; /* Surface separator (sometimes we need a character, sometimes a string). */ #define SURF_SEPARATOR '/' #define SURF_SEPARATOR_STR "/" /** * EncaSurfaceInfo: * @enca: Canonical identifier (#NULL when not applicable). * @human: Human readable name. * @bit: Appropriate ENCA_SURFACE_. * * Surface information. **/ struct _EncaSurfaceInfo { const char *enca; const char *human; EncaSurface bit; }; typedef struct _EncaSurfaceInfo EncaSurfaceInfo; /* Local prototypes. */ static int squeeze_compare(const char *x, const char *y); static int alias_search(const char *const *alist, int n, const char *s); static int check_surface_consistency(EncaSurface surface); static int count_bits(unsigned long int x); static int check_encoding_name(const char *name); /* Surface information. */ static const EncaSurfaceInfo SURFACE_INFO[] = { { "CR", "CR line terminators", ENCA_SURFACE_EOL_CR }, { "LF", "LF line terminators", ENCA_SURFACE_EOL_LF }, { "CRLF", "CRLF line terminators", ENCA_SURFACE_EOL_CRLF }, { NULL, "Mixed line terminators", ENCA_SURFACE_EOL_MIX }, { NULL, "Surrounded by/intermixed with non-text data", ENCA_SURFACE_EOL_BIN }, { "21", "Byte order reversed in pairs (1,2 -> 2,1)", ENCA_SURFACE_PERM_21 }, { "4321", "Byte order reversed in quadruples (1,2,3,4 -> 4,3,2,1)", ENCA_SURFACE_PERM_4321 }, { NULL, "Both little and big endian chunks, concatenated", ENCA_SURFACE_PERM_MIX }, { "qp", "Quoted-printable encoded", ENCA_SURFACE_QP }, { "", "", ENCA_SURFACE_REMOVE }, }; /** * enca_charset_name: * @charset: A charset id. * @whatname: Teh type of name you request. * * Translates numeric charset id @charset to some kind of name. * * Returns: The requested charset name; #NULL for invalid @whatname or * @charset, or when @whatname name doesn't exist for charset @charset * (#ENCA_CS_UNKNOWN is OK). **/ const char* enca_charset_name(int charset, EncaNameStyle whatname) { const EncaCharsetInfo *cs; if (charset == ENCA_CS_UNKNOWN) { switch (whatname) { case ENCA_NAME_STYLE_RFC1345: case ENCA_NAME_STYLE_ENCA: case ENCA_NAME_STYLE_MIME: return UNKNOWN_CHARSET_NAME; case ENCA_NAME_STYLE_HUMAN: return UNKNOWN_CHARSET_HUMAN; case ENCA_NAME_STYLE_CSTOCS: case ENCA_NAME_STYLE_ICONV: return UNKNOWN_CHARSET_SYM; default: return NULL; } } if ((size_t)charset >= NCHARSETS) return NULL; cs = CHARSET_INFO + charset; switch (whatname) { case ENCA_NAME_STYLE_RFC1345: return ALIAS_LIST[cs->rfc1345]; case ENCA_NAME_STYLE_HUMAN: return cs->human; case ENCA_NAME_STYLE_ENCA: return ALIAS_LIST[cs->enca]; case ENCA_NAME_STYLE_CSTOCS: return cs->cstocs < 0 ? NULL : ALIAS_LIST[cs->cstocs]; case ENCA_NAME_STYLE_ICONV: return cs->iconv < 0 ? NULL : ALIAS_LIST[cs->iconv]; case ENCA_NAME_STYLE_MIME: return cs->mime < 0 ? NULL : ALIAS_LIST[cs->mime]; default: return NULL; } /* just to placate gcc */ return NULL; } /** * enca_get_charset_aliases: * @charset: A charset id. * @n: The number of aliases will be stored here. * * Returns list of accepted aliases for charset @charset. * * The list of aliases has to be freed by caller; the strings themselves * must be considered constant and must NOT be freed. * * Returns: The list of aliases, storing their number into *@n; #NULL for * invalid @charset (*@n is zero then). **/ const char** enca_get_charset_aliases(int charset, size_t *n) { const char **aliases; size_t i, j; /* Compute total length. * FIXME: The list is known at compile time. */ for (i = *n = 0; i < NALIASES; i++) if (INDEX_LIST[i] == charset) (*n)++; /* Create the list. */ aliases = NEW(const char*, *n); for (i = j = 0; i < NALIASES; i++) if (INDEX_LIST[i] == charset) aliases[j++] = ALIAS_LIST[i]; return aliases; } /** * enca_get_surface_name: * @surface: A surface. * @whatname: The type of name you request. * * Constructs surface name from surface flags @surface. * * Returns: The requested surface name; #NULL for invalid @whatname; empty * string for naming style not supporting surfaces. In all cases, the * returned string must be freed by caller when no longer used. **/ char* enca_get_surface_name(EncaSurface surface, EncaNameStyle whatname) { char *s; size_t i; switch (whatname) { /* these don't know/define surfaces so forget it */ case ENCA_NAME_STYLE_CSTOCS: case ENCA_NAME_STYLE_RFC1345: case ENCA_NAME_STYLE_ICONV: case ENCA_NAME_STYLE_MIME: s = enca_strdup(""); break; /* human readable name (each on separate line) */ case ENCA_NAME_STYLE_HUMAN: s = enca_strdup(""); for (i = 0; i < NSURFACES; i++) { if (SURFACE_INFO[i].bit & surface) { s = enca_strappend(s, SURFACE_INFO[i].human, "\n", NULL); } } break; /* canonical name (/recode style) */ case ENCA_NAME_STYLE_ENCA: s = enca_strdup(""); for (i = 0; i < NSURFACES; i++) { if ((SURFACE_INFO[i].bit & surface) && SURFACE_INFO[i].enca != NULL) { s = enca_strappend(s, SURF_SEPARATOR_STR, SURFACE_INFO[i].enca, NULL); } } break; default: s = NULL; break; } return s; } /** * enca_charset_properties: * @charset: A charset. * * Returns charset properties. * * Returns: The requested charset properties; zero for invalid @charset. **/ EncaCharsetFlags enca_charset_properties(int charset) { if ((size_t)charset >= NCHARSETS) return 0; return CHARSET_INFO[charset].flags; } /** * enca_charset_natural_surface: * @charset: A charset. * * Returns natural surface of a charset. * * Returns: The requested charset natural surface (called `implied' in recode), * zero for invalid @charset or for charsets with no natural surface. * * Natrual surface is the surface one expects for a given charset -- * e.g. CRLF EOLs for IBM/Microsoft charsets, CR EOLs for Macintosh * charsets and LF EOLs for ISO/Unix charsets. **/ EncaSurface enca_charset_natural_surface(int charset) { if ((size_t)charset >= NCHARSETS) return 0; else return CHARSET_INFO[charset].nsurface; } /** * enca_number_of_charsets: * * Returns number of known charsets. * * Charsets idetifiers are assigned successively starting from zero, so last * charset has identifier enca_number_of_charsets() - 1. * * Returns: The number of charsets. **/ size_t enca_number_of_charsets(void) { return NCHARSETS; } /** * enca_parse_encoding_name: * @name: An encoding specification. * * Transofrms encoding specification charset/surface into numeric #EncaEncoding. * * When the charset name is not recognized, surfaces are not parsed at all and * #ENCA_CS_UNKNOWN is returned as charset. However, unrecognized surfaces are * considered only a minor problem causing %ENCA_SURFACE_UNKNOWN flag to be * set in the result, beside recognized surface flags. * * Returns: The charset/surface pair. **/ EncaEncoding enca_parse_encoding_name(const char *name) { EncaEncoding enc = ENCODING_UNKNOWN; char *p, *q; if (name == NULL) return enc; p = enca_strdup(name); /* separate pure charset name into p */ q = strchr(p, SURF_SEPARATOR); if (q != NULL) *q++ = '\0'; enc.charset = enca_name_to_charset(p); /* surfaces, ony by one */ while (q != NULL && enc.charset != ENCA_CS_UNKNOWN) { unsigned int surface; char *r = strchr(p, SURF_SEPARATOR); if (r != NULL) *r++ = '\0'; enc.surface |= surface = enca_name_to_surface(q); q = r; } if (!check_surface_consistency(enc.surface)) enc.surface |= ENCA_SURFACE_UNKNOWN; free(p); return enc; } /** * squeeze_compare: * @x: A string. * @y: Another string. * * Compares two strings taking into account only alphanumeric characters. * * Returns: Less than zero, more than zero, or zero, when the first string is * squeeze-alphabeticaly before, after, or equal to second string. **/ static int squeeze_compare(const char *x, const char *y) { if (x == NULL || y == NULL) { if (x == NULL && y == NULL) return 0; if (x == NULL) return -1; else return 1; } while (*x != '\0' || *y != '\0') { while (*x != '\0' && !enca_isalnum(*x)) x++; while (*y != '\0' && !enca_isalnum(*y)) y++; if (enca_tolower(*x) != enca_tolower(*y)) return (int)enca_tolower(*x) - (int)enca_tolower(*y); if (*x != '\0') x++; if (*y != '\0') y++; } return 0; } #if 0 /** * stable_compare: * @x: A string. * @y: Another string. * * Compares two strings taking into account only alphanumeric characters first. * * When the strings are equal, compares them normally, too. Zero is thus * returned for really identical strings only. * * Returns: Less than zero, more than zero, or zero, when the first string is * squeeze-alphabeticaly before, after, or equal to second string. **/ static int stable_compare(const char *x, const char *y) { int i; i = squeeze_compare(x, y); /* to stabilize the sort */ if (i == 0) return strcmp(x, y); return i; } #endif /** * alias_search: * @alist: Sorted array of strings. * @n: Size of @alist. * @s: String to find. * * Finds string @s in stable-sorted array of strings. * * Returns: Index of @s in @alist; -1 if not found. **/ static int alias_search(const char *const *alist, int n, const char *s) { int i1 = 0; int i2 = n-1; int i; i = squeeze_compare(s, alist[i1]); if (i < 0) return -1; if (i == 0) return i1; i = squeeze_compare(s, alist[i2]); if (i > 0) return -1; if (i == 0) return i2; while (i1+1 < i2) { int im = (i1 + i2)/2; i = squeeze_compare(s, alist[im]); if (i == 0) return im; if (i > 0) i1 = im; else i2 = im; } if (squeeze_compare(s, alist[i1+1]) == 0) return i1+1; return -1; } /** * enca_name_to_charset: * @csname: The charset name. * * Transforms charset name to numeric charset id. * * Returns: The charset id; #ENCA_CS_UNKNOWN when the name is not recognized. **/ int enca_name_to_charset(const char *csname) { int i; if (check_encoding_name(csname) <= 0) return ENCA_CS_UNKNOWN; i = alias_search(ALIAS_LIST, NALIASES, csname); return i < 0 ? ENCA_CS_UNKNOWN : INDEX_LIST[i]; } /** * enca_name_to_surface: * @sname: The surface name. * * Transforms surface name to numeric surface id. * * Returns: The surface id; %ENCA_SURFACE_UNKNOWN when the name is not * recognized. **/ EncaSurface enca_name_to_surface(const char *sname) { size_t i; if (sname == NULL) return ENCA_SURFACE_UNKNOWN; for (i = 0; i < NSURFACES; i++) { if (SURFACE_INFO[i].enca == NULL || *(SURFACE_INFO[i].enca) == '\0') continue; if (squeeze_compare(SURFACE_INFO[i].enca, sname)) return SURFACE_INFO[i].bit; } return ENCA_SURFACE_UNKNOWN; } /** * check_surface_consistency: * @surface: The surface. * * Checks whether the specified surface makes sense. Unlike recode we don't * consider /cr/cr/crlf/cr/lf/lf/crlf a reasonable surface. * * Returns: Nonzero when the surface is OK, zero othewise. **/ static int check_surface_consistency(EncaSurface surface) { return count_bits((unsigned long int)surface & ENCA_SURFACE_MASK_EOL) <= 1 && count_bits((unsigned long int)surface & ENCA_SURFACE_MASK_PERM) <= 1 && (surface & ENCA_SURFACE_REMOVE) == 0 && (surface & ENCA_SURFACE_UNKNOWN) == 0; } /** * count_bits: * @x: A flag field. * * Returns: The number of bits set in @x. **/ static int count_bits(unsigned long int x) { int i = 0; while (x != 0) { if (x & 1UL) i++; x >>= 1; } return i; } /** * check_encoding_name: * @name: A charset/surface/encoding name. * * Checks whether @name contains only allowed characters and counts the * number of alphanumeric characters in @name. * * Returns: The number of alphanumeric characters in @name; -1 when @name * is invalid. **/ static int check_encoding_name(const char *name) { size_t i, n; if (name == NULL) return -1; for (i = n = 0; name[i] != '\0'; i++) { if (!enca_isname(name[i])) return -1; if (enca_isalnum(name[i])) n++; } return n; } /***** Documentation *********************************************************/ /** * EncaSurface: * @ENCA_SURFACE_EOL_CR: End-of-lines are represented with CR's. * @ENCA_SURFACE_EOL_LF: End-of-lines are represented with LF's. * @ENCA_SURFACE_EOL_CRLF: End-of-lines are represented with CRLF's. * @ENCA_SURFACE_EOL_MIX: Several end-of-line types, mixed. * @ENCA_SURFACE_EOL_BIN: End-of-line concept not applicable (binary data). * @ENCA_SURFACE_MASK_EOL: Mask for end-of-line surfaces. * @ENCA_SURFACE_PERM_21: Odd and even bytes swapped. * @ENCA_SURFACE_PERM_4321: Reversed byte sequence in 4byte words. * @ENCA_SURFACE_PERM_MIX: Chunks with both endianess, concatenated. * @ENCA_SURFACE_MASK_PERM: Mask for permutation surfaces. * @ENCA_SURFACE_QP: Quoted printables. * @ENCA_SURFACE_HZ: HZ encoded. * @ENCA_SURFACE_REMOVE: Recode `remove' surface. * @ENCA_SURFACE_UNKNOWN: Unknown surface. * @ENCA_SURFACE_MASK_ALL: Mask for all bits, withnout #ENCA_SURFACE_UNKNOWN. * * Surface flags. **/ /** * EncaNameStyle: * @ENCA_NAME_STYLE_ENCA: Default, implicit charset name in Enca. * @ENCA_NAME_STYLE_RFC1345: RFC 1345 or otherwise canonical charset name. * @ENCA_NAME_STYLE_CSTOCS: Cstocs charset name (may not exist). * @ENCA_NAME_STYLE_ICONV: Iconv charset name (may not exist). * @ENCA_NAME_STYLE_HUMAN: Human comprehensible description. * @ENCA_NAME_STYLE_MIME: Preferred MIME name (may not exist). * * Charset naming styles and conventions. **/ /** * EncaCharsetFlags: * @ENCA_CHARSET_7BIT: Characters are represented with 7bit characters. * @ENCA_CHARSET_8BIT: Characters are represented with bytes. * @ENCA_CHARSET_16BIT: Characters are represented with 2byte words. * @ENCA_CHARSET_32BIT: Characters are represented with 4byte words. * @ENCA_CHARSET_FIXED: One characters consists of one fundamental piece. * @ENCA_CHARSET_VARIABLE: One character consists of variable number of * fundamental pieces. * @ENCA_CHARSET_BINARY: Charset is binary from ASCII viewpoint. * @ENCA_CHARSET_REGULAR: Language dependent (8bit) charset. * @ENCA_CHARSET_MULTIBYTE: Multibyte charset. * * Charset properties. * * Flags %ENCA_CHARSET_7BIT, %ENCA_CHARSET_8BIT, %ENCA_CHARSET_16BIT, * %ENCA_CHARSET_32BIT tell how many bits a `fundamental piece' consists of. * This is different from bits per character; r.g. UTF-8 consists of 8bit * pieces (bytes), but character can be composed from 1 to 6 of them. **/ /** * ENCA_CS_UNKNOWN: * * Unknown character set id. * * Use enca_charset_is_known() to check for unknown charset instead of direct * comparsion. **/ /** * EncaEncoding: * @charset: Numeric charset identifier. * @surface: Surface flags. * * Encoding, i.e. charset and surface. * * This is what enca_analyse() and enca_analyse_const() return. * * The @charset field is an opaque numerical charset identifier, which has no * meaning outside Enca library. * You will probably want to use it only as enca_charset_name() argument. * It is only guaranteed not to change meaning * during program execution time; change of its interpretation (e.g. due to * addition of new charsets) is not considered API change. * * The @surface field is a combination of #EncaSurface flags. You may want * to ignore it completely; you should use enca_set_interpreted_surfaces() * to disable weird surfaces then. **/ /** * enca_charset_is_known: * @cs: Charset id. * * Expands to nonzero when the charset is known (i.e. it's not * ENCA_CS_UNKNOWN). **/ /** * enca_charset_is_7bit: * @cs: Charset id. * * Expands to nonzero when characters are represented with 7bit characters. **/ /** * enca_charset_is_8bit: * @cs: Charset id. * * Expands to nonzero when characters are represented with bytes. **/ /** * enca_charset_is_16bit: * @cs: Charset id. * * Expands to nonzero when characters are represented with 2byte words. **/ /** * enca_charset_is_32bit: * @cs: Charset id. * * Expands to nonzero when characters are represented with 4byte words. **/ /** * enca_charset_is_fixed: * @cs: Charset id. * * Expands to nonzero when one characters consists of one fundamental piece. **/ /** * enca_charset_is_variable: * @cs: Charset id. * * Expands to nonzero when one character consists of variable number of * fundamental pieces. **/ /** * enca_charset_is_binary: * @cs: Charset id. * * Expands to nonzero when charset is binary from ASCII viewpoint. **/ /** * enca_charset_is_regular: * @cs: Charset id. * * Expands to nonzero when charset is language dependent (8bit) charset. **/ /** * enca_charset_is_multibyte: * @cs: Charset id. * * Expands to nonzero when charset is multibyte. **/ /* vim: ts=2 sw=2 et */ Project-OSS-Revival-enca-36defd7/lib/filters.c000066400000000000000000000366021507545312400211770ustar00rootroot00000000000000/* filters and hooks that various languages can use Copyright (C) 2000-2003 David Necas (Yeti) This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include #include "enca.h" #include "internal.h" /** * EncaBoxDraw: * @csname: Charset name. * @isvbox: All other box drawing characters. * @h1: Horizontal line character (light). * @h2: Horizontal line character (heavy). * * Information about box-drawing characters for a charset. **/ struct _EncaBoxDraw { const char *csname; const unsigned char *isvbox; unsigned char h1; unsigned char h2; }; typedef struct _EncaBoxDraw EncaBoxDraw; /* THIS IS A GENERATED TABLE, see tools/expand_table.pl */ static const unsigned char BOXVERT_IBM852[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; /* These are identical */ #define BOXVERT_IBM775 BOXVERT_IBM852 /* THIS IS A GENERATED TABLE, see tools/expand_table.pl */ static const unsigned char BOXVERT_KEYBCS2[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; /* These are identical */ #define BOXVERT_IBM866 BOXVERT_KEYBCS2 #define BOXVERT_CP1125 BOXVERT_KEYBCS2 /* THIS IS A GENERATED TABLE, see tools/expand_table.pl */ static const unsigned char BOXVERT_KOI8R[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; #if 0 /* UNUSED */ /* THIS IS A GENERATED TABLE, see tools/expand_table.pl */ static const unsigned char BOXVERT_KOI8RU[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; #endif /* THIS IS A GENERATED TABLE, see tools/expand_table.pl */ static const unsigned char BOXVERT_KOI8U[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; /* THIS IS A GENERATED TABLE, see tools/expand_table.pl */ static const unsigned char BOXVERT_KOI8UNI[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; static const EncaBoxDraw BOXDRAW[] = { { "cp1125", BOXVERT_CP1125, 196, 205 }, { "ibm775", BOXVERT_IBM775, 196, 205 }, { "ibm852", BOXVERT_IBM852, 196, 205 }, { "ibm866", BOXVERT_IBM866, 196, 205 }, { "keybcs2", BOXVERT_KEYBCS2, 196, 205 }, { "koi8r", BOXVERT_KOI8R, 128, 160 }, { "koi8u", BOXVERT_KOI8U, 128, 160 }, { "koi8uni", BOXVERT_KOI8UNI, 128, 128 }, /* there's only one */ #if 0 { "koi8ru", BOXVERT_KOI8RU, 128, 160 }, #endif }; /* Local prototypes. */ static size_t filter_boxdraw_out(int charset, unsigned char *buffer, size_t size, unsigned char fill_char); /** * enca_filter_boxdraw: * @analyser: Analyser whose charsets should be considered for filtration. * @fill_char: Replacement character for filtered bytes. * * Runs boxdrawing characters filter on @buffer for each charset in @language. * * Returns: Number of characters filtered out. **/ size_t enca_filter_boxdraw(EncaAnalyserState *analyser, unsigned char fill_char) { size_t i; size_t filtered = 0; for (i = 0; i < analyser->ncharsets; i++) { filtered += filter_boxdraw_out(analyser->charsets[i], analyser->buffer, analyser->size, fill_char); } return filtered; } /** * filter_boxdraw_out: * @charset: Charset whose associated filter should be applied. * @buffer: Buffer to be filtered. * @size: Size of @buffer. * @fill_char: Replacement character for filtered bytes. * * Replaces box-drawing characters in @buffer with @fill_char. * * Not all possibly box-drawing characters are replaced, only those meeting * certain conditions to reduce false filtering. It's assumed * isspace(@fill_char) is true (it aborts when it isn't). * * It's OK to call with @charset which has no filter associated, it just * returns zero then. * * Returns: The number of characters filtered. **/ static size_t filter_boxdraw_out(int charset, unsigned char *buffer, size_t size, unsigned char fill_char) { static int charset_id[ELEMENTS(BOXDRAW)]; static int charset_id_initialized = 0; const EncaBoxDraw *bd; size_t i, n, xout; assert(enca_isspace(fill_char)); if (!charset_id_initialized) { for (i = 0; i < ELEMENTS(BOXDRAW); i++) { charset_id[i] = enca_name_to_charset(BOXDRAW[i].csname); assert(charset_id[i] != ENCA_CS_UNKNOWN); } charset_id_initialized = 1; } /* Find whether we have any filter associated with this charset. */ bd = NULL; for (i = 0; i < ELEMENTS(BOXDRAW); i++) { if (charset_id[i] == charset) { bd = BOXDRAW + i; break; } } if (bd == NULL) return 0; xout = 0; /* First stage: * Horizontal lines, they must occur at least two in a row. */ i = 0; while (i < size-1) { if (buffer[i] == bd->h1 || buffer[i] == bd->h2) { for (n = i+1; n < size && buffer[n] == buffer[i]; n++) ; if (n > i+1) { memset(buffer + i, fill_char, n - i); xout += n - i; } i = n; } else i++; } /* Second stage: * Vertical/mixed, they must occur separated by whitespace. * We assume isspace(fill_char) is true. */ if (size > 1 && bd->isvbox[buffer[0]] && enca_isspace(buffer[1])) { buffer[0] = fill_char; xout++; } for (i = 1; i < size-1; i++) { if (bd->isvbox[buffer[i]] && enca_isspace(buffer[i-1]) && enca_isspace(buffer[i+1])) { buffer[i] = fill_char; xout++; } } if (size > 1 && bd->isvbox[buffer[size-1]] && enca_isspace(buffer[size-2])) { buffer[size-1] = fill_char; xout++; } return xout; } /** * enca_language_hook_ncs: * @analyser: Analyser whose charset ratings are to be modified. * @ncs: The number of charsets. * @hookdata: What characters of which charsets should be given the extra * weight. * * Decide between two charsets differing only in a few characters. * * If the two most probable charsets correspond to @hookdata charsets, * give the characters they differ half the weight of all other characters * together, thus allowing to decide between the two very similar charsets. * * It also recomputes @order when something changes. * * Returns: Nonzero when @ratings were actually modified, nonzero otherwise. **/ int enca_language_hook_ncs(EncaAnalyserState *analyser, size_t ncs, EncaLanguageHookData1CS *hookdata) { const int *const ids = analyser->charsets; const size_t ncharsets = analyser->ncharsets; const size_t *counts = analyser->counts; const size_t *const order = analyser->order; double *const ratings = analyser->ratings; size_t maxcnt, j, k, m; double q; assert(ncharsets > 0); assert(ncs <= ncharsets); if (ncs < 2) return 0; /* for (j = 0; j < ncharsets; j++) { fprintf(stderr, "%s:\t%g\n", enca_csname(ids[order[j]]), ratings[order[j]]); } */ /* Find id's and check whether they are the first */ for (j = 0; j < ncs; j++) { EncaLanguageHookData1CS *h = hookdata + j; /* Find charset if unknown */ if (h->cs == (size_t)-1) { int id; id = enca_name_to_charset(h->name); assert(id != ENCA_CS_UNKNOWN); k = 0; while (k < ncharsets && id != ids[k]) k++; assert(k < ncharsets); h->cs = k; } /* If any charset is not between the first ncs ones, do nothing. */ k = 0; while (k < ncs && order[k] != h->cs) k++; if (k == ncs) return 0; } /* Sum the extra-important characters and find maximum. */ maxcnt = 0; for (j = 0; j < ncs; j++) { EncaLanguageHookData1CS const *h = hookdata + j; for (m = k = 0; k < h->size; k++) m += counts[h->list[k]]; if (m > maxcnt) maxcnt = m; } if (maxcnt == 0) return 0; /* Substract something from charsets that have less than maximum. */ q = 0.5 * ratings[order[0]]/(maxcnt + EPSILON); for (j = 0; j < ncs; j++) { EncaLanguageHookData1CS const *h = hookdata + j; m = maxcnt; for (k = 0; k < h->size; k++) m -= counts[h->list[k]]; ratings[h->cs] -= q*m; } enca_find_max_sec(analyser); return 1; } /** * enca_language_hook_eol: * @analyser: Analyser whose charset ratings are to be modified. * @ncs: The number of charsets. * @hookdata: What characters of which charsets should be decided with based * on the EOL type. * * Decide between two charsets differing only in EOL type or other surface. * * The (surface mask, charset) pairs are scanned in order. If a matching * surface is found, ratings of all other charsets in the list are zeroed. * So you can place a surface mask of all 1s at the end to match when nothing * else matches. * * All the charsets have to have the same rating, or nothing happens. * * It also recomputes @order when something changes. * * Returns: Nonzero when @ratings were actually modified, nonzero otherwise. **/ int enca_language_hook_eol(EncaAnalyserState *analyser, size_t ncs, EncaLanguageHookDataEOL *hookdata) { const int *const ids = analyser->charsets; const size_t ncharsets = analyser->ncharsets; const size_t *const order = analyser->order; double *const ratings = analyser->ratings; size_t j, k; assert(ncharsets > 0); assert(ncs <= ncharsets); if (ncs < 2) return 0; /* Rating equality check. */ for (j = 1; j < ncs; j++) { if (fabs(ratings[order[j-1]] - ratings[order[j]]) > EPSILON) return 0; } /* Find id's and check whether they are the first */ for (j = 0; j < ncs; j++) { EncaLanguageHookDataEOL *h = hookdata + j; /* Find charset if unknown */ if (h->cs == (size_t)-1) { int id; id = enca_name_to_charset(h->name); assert(id != ENCA_CS_UNKNOWN); k = 0; while (k < ncharsets && id != ids[k]) k++; assert(k < ncharsets); h->cs = k; } /* If any charset is not between the first ncs ones, do nothing. */ k = 0; while (k < ncs && order[k] != h->cs) k++; if (k == ncs) return 0; } /* Find first matching EOL type. */ for (j = 0; j < ncs; j++) { EncaLanguageHookDataEOL const *h = hookdata + j; if (h->eol & analyser->result.surface) { int chg = 0; for (k = 0; k < ncs; k++) { h = hookdata + k; if (k != j && ratings[h->cs] > 0.0) { ratings[h->cs] = 0.0; chg = 1; } } if (chg) enca_find_max_sec(analyser); return chg; } } return 0; } /* vim: ts=2 */ Project-OSS-Revival-enca-36defd7/lib/guess.c000066400000000000000000001036751507545312400206620ustar00rootroot00000000000000/* encoding-guesing engine Copyright (C) 2000-2002 David Necas (Yeti) This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include #include "enca.h" #include "internal.h" /* Number of text character needed to switch to text mode in binary filter. */ #define BIN_TEXT_CHAR_MIN 5 /** * FILL_CHARACTER: * * Replacement character for binary, box-drawing, etc.filters. * Note: enca_isspace(#FILL_CHARACTER) must be true. **/ #define FILL_CHARACTER ' ' static const EncaAnalyserOptions DEFAULTS = { 1, /* const_buffer (always set per call) */ 10, /* min_chars */ 1.4142, /* threshold */ 1, /* multibyte_enabled */ 1, /* interpreted_surfaces */ 0, /* ambiguous_mode */ 1, /* filtering */ 1, /* test_garbageness */ 1, /* termination_strictness */ }; static const EncaEncoding ENCODING_UNKNOWN = { ENCA_CS_UNKNOWN, 0 }; /* local prototypes */ static EncaEncoding analyse (EncaAnalyserState *analyser, unsigned char *buffer, size_t size); static EncaErrno make_guess (EncaAnalyserState *analyser); static int try_test_list (EncaAnalyserState *analyser, EncaGuessFunc *tests); static size_t filter_binary (unsigned char *buffer, size_t size, unsigned char fill_char); static int looks_like_qp (EncaAnalyserState *analyser); static EncaErrno ambiguous_hook (EncaAnalyserState *analyser); static void count_characters (EncaAnalyserState *analyser); static int test_garbage (EncaAnalyserState *analyser); static size_t check_significant (EncaAnalyserState *analyser); /** * enca_guess_init: * @analyser: Analyser to initialize. * * Allocates and initializes analyser state, sets options to defaults. * * Assumes @analyser is unitinialized, calling with an initialized @analyser * leads to memory leak, but @analyser->lang must be already initialized. **/ void enca_guess_init(EncaAnalyserState *analyser) { assert(analyser->lang != NULL); analyser->counts = NEW(size_t, 0x100); if (analyser->ncharsets == 0) { analyser->ratings = NULL; analyser->order = NULL; } else { analyser->ratings = NEW(double, analyser->ncharsets); analyser->order = NEW(size_t, analyser->ncharsets); } analyser->options = DEFAULTS; analyser->gerrno = 0; } /** * enca_guess_destroy: * @analyser: Analyser to destroy. * * Frees memory owned by analyser state. **/ void enca_guess_destroy(EncaAnalyserState *analyser) { enca_free(analyser->counts); enca_free(analyser->ratings); enca_free(analyser->order); } /** * enca_analyse: * @analyser: An analyser initialized for some language. * @buffer: Buffer to be analysed. * @size: Size of @buffer. * * Analyses @buffer and finds its encoding. * * The @buffer is checked for 8bit encodings of language for which @analyser * was initialized and for multibyte encodings, mostly independent on language * (unless disabled with enca_set_multibyte()). * * The contents of @buffer may be (and probably will be) modified during the * analyse. Use enca_analyse_const() instead if this discomforts you. * * Returns: Encoding of @buffer. When charset part of return value is * #ENCA_CS_UNKNOWN, encoding was not determined. Check * enca_errno() for reason. **/ EncaEncoding enca_analyse(EncaAnalyser analyser, unsigned char *buffer, size_t size) { assert(analyser != NULL); analyser->options.const_buffer = 0; return analyse(analyser, buffer, size); } /** * enca_analyse_const: * @analyser: An analyser initialized for some language. * @buffer: Buffer to be analysed. * @size: Size of @buffer. * * Analyses @buffer and finds its encoding. * * The @buffer is checked for 8bit encodings of language for which @analyser * was initialized and for multibyte encodings, mostly independent on language * (unless disabled with enca_set_multibyte()). * * This function never modifies @buffer (can be even used with string literal * @buffer) at the expense it's generally slower than enca_analyse(). * * Returns: Encoding of @buffer. When charset part of return value is * #ENCA_CS_UNKNOWN, encoding was not determined. Check * enca_errno() for reason. **/ EncaEncoding enca_analyse_const(EncaAnalyserState *analyser, const unsigned char *buffer, size_t size) { assert(analyser != NULL); analyser->options.const_buffer = 1; return analyse(analyser, (unsigned char *)buffer, size); } /** * analyse: * @analyser: An analyser initialized for some language. * @buffer: Buffer to be analysed. * @size: Size of @buffer. * * Analyses @buffer and finds its encoding. * * Returns: Encoding of @buffer. **/ static EncaEncoding analyse(EncaAnalyserState *analyser, unsigned char *buffer, size_t size) { analyser->result = ENCODING_UNKNOWN; /* Empty buffer? */ if (size == 0) { analyser->gerrno = ENCA_EEMPTY; return analyser->result; } assert(buffer != NULL); /* Initialize stuff. */ analyser->gerrno = 0; analyser->buffer = buffer; analyser->size = size; analyser->buffer2 = NULL; analyser->size2 = 0; analyser->gerrno = make_guess(analyser); if (analyser->gerrno) analyser->result = ENCODING_UNKNOWN; /* When buffer2 is not NULL, then it holds the original buffer, so we must * free the copy (i.e. buffer, not buffer2!). */ if (analyser->buffer2 != NULL) enca_free(analyser->buffer); return analyser->result; } /** * make_guess: * @analyser: An analyser whose buffer is to be analysed. * * Finds encoding of @buffer and stores it in @analyser->result. * * Returns: Zero on success, nonzero error code when the encoding was not * determined. **/ static EncaErrno make_guess(EncaAnalyserState *analyser) { const unsigned short int *const *const weights = analyser->lang->weights; const unsigned short int *const significant = analyser->lang->significant; size_t *const counts = analyser->counts; size_t *const order = analyser->order; double *const ratings = analyser->ratings; const EncaAnalyserOptions *const options = &(analyser->options); unsigned char *buffer = analyser->buffer; size_t size = analyser->size; static int ascii = ENCA_CS_UNKNOWN; /* ASCII charset id */ size_t fchars; /* characters filtered out */ size_t i, cs; /* Initialize when we are called the first time. */ if (ascii == ENCA_CS_UNKNOWN) { ascii = enca_name_to_charset("ascii"); assert(ascii != ENCA_CS_UNKNOWN); } /* Count characters. */ count_characters(analyser); /* Pure ascii file (but may be qp-encoded!). */ if (!analyser->bin && !analyser->up) { if (options->multibyte_enabled) { if (try_test_list(analyser, ENCA_MULTIBYTE_TESTS_ASCII)) return 0; } if (options->interpreted_surfaces && looks_like_qp(analyser)) { /* Quoted printables => recompute aliases and recount characters. */ buffer = analyser->buffer; size = analyser->size; count_characters(analyser); } if (!analyser->bin && !analyser->up) { /* Plain ascii. */ analyser->result.charset = ascii; analyser->result.surface |= enca_eol_surface(buffer, size, analyser->counts); return 0; } } /* Binary encodings (binary noise is handled later). */ if (analyser->bin && options->multibyte_enabled) { if (try_test_list(analyser, ENCA_MULTIBYTE_TESTS_BINARY)) return 0; } /* When interpreted surfaces are not allowed and sample contains binary data, * we can give it up right here. */ if (!options->interpreted_surfaces && analyser->bin) return ENCA_EGARBAGE; /* Multibyte 8bit sample (utf-8), this has to be tested before * filtering too -- no language independent multibyte encoding can be * assumed to survive it. */ if (!analyser->bin && analyser->up && options->multibyte_enabled) { if (try_test_list(analyser, ENCA_MULTIBYTE_TESTS_8BIT)) return 0; } /* Now it can still be a regular 8bit charset (w/ or w/o noise), language * dependent MBCS (w/ or w/o noise), ascii w/ noise or just garbage. */ /* When the buffer must be treated as const and filters are enabled * (and we didn't created a copy earlier), create a copy and store * original into buffer2 */ if (options->const_buffer && options->filtering && analyser->buffer2 == NULL) { analyser->buffer2 = buffer; analyser->size2 = size; analyser->buffer = memcpy(enca_malloc(size), buffer, size); buffer = analyser->buffer; } /* Filter out blocks of binary data and box-drawing characters. */ fchars = 0; if (options->filtering) { if (analyser->bin) { fchars = filter_binary(buffer, size, FILL_CHARACTER); if (fchars) analyser->result.surface |= ENCA_SURFACE_EOL_BIN; } fchars += enca_filter_boxdraw(analyser, FILL_CHARACTER); } /* At least something should remain after filtering. */ if (size - fchars < sqrt((double)size)) return ENCA_EFILTERED; /* Detect surface. */ analyser->result.surface |= enca_eol_surface(buffer, size, counts); /* When sample has been damaged by filters, recount characters. */ if (fchars) { count_characters(analyser); if (!analyser->up) { analyser->result.charset = ascii; /* FIXME: What if it's ASCII + box-drawing characters? */ analyser->result.surface |= ENCA_SURFACE_EOL_BIN; return 0; } } /* Check multibyte 8bit sample (utf-8) again. * Chances are filtering helped it, even if it most probably destroyed it. */ if (analyser->up && options->multibyte_enabled) { if (try_test_list(analyser, ENCA_MULTIBYTE_TESTS_8BIT_TOLERANT)) return 0; } /* When no regular charsets are present (i.e. language is `none') * nothing of the following procedure has sense so just quit. */ if (analyser->ncharsets == 0) return ENCA_ENOCS8; /* How many significant characters we caught? */ if (!check_significant(analyser)) return ENCA_ESIGNIF; /* Try pair analysis first. */ if (enca_pair_analyse(analyser)) return 0; /* Regular, language dependent 8bit charsets. * * When w_rs is relative occurence of character s in charset r we multiply * count[s] with factor (the sum in denominator is so-called significancy) * * w * rs * ---------------- * ___ * \ * eps + > w * /___ rs * r */ if (weights) { for (cs = 0; cs < analyser->ncharsets; cs++) { ratings[cs] = 0.0; for (i = 0; i < 0x100; i++) { ratings[cs] += weights[cs][i]/(significant[i] + EPSILON)*counts[i]; } } } else { assert(analyser->lang->ratinghook); analyser->lang->ratinghook(analyser); } /* Find winner and second best. */ enca_find_max_sec(analyser); /* Run langauge specific hooks. */ if (analyser->ncharsets > 1 && analyser->lang->hook) analyser->lang->hook(analyser); /* Now we have found charset with the best relative ratings but we need an absolute test to detect total garbage. */ if (options->test_garbageness && weights && test_garbage(analyser)) return ENCA_EGARBAGE; /* Do we have a winner? */ if (analyser->ncharsets == 1) { analyser->result.charset = analyser->charsets[order[0]]; return 0; } if (ratings[order[0]]/(ratings[order[1]] + EPSILON) < options->threshold + EPSILON) { /* Unfortunately no, but in ambiguous mode have the last chance. */ if (options->ambiguous_mode && weights) return ambiguous_hook(analyser); return ENCA_EWINNER; } analyser->result.charset = analyser->charsets[order[0]]; return 0; } /** * filter_binary: * @buffer: Buffer to be filtered. * @size: Size of @buffer. * @fill_char: Replacement character. * * Replace blocks of binary characters in @buffer with @fill_char. * * Returns: Number of characters filtered out. **/ static size_t filter_binary(unsigned char *buffer, size_t size, unsigned char fill_char) { int mode; /* Mode 0 == text; mode > 0 binary, contains number of character remaining to switch to text mode. */ size_t i, xout; unsigned char old[BIN_TEXT_CHAR_MIN - 1]; /* saved maybe-text characters */ mode = 0; xout = 0; for (i = 0; i < size; i++) { if (enca_isbinary(buffer[i])) mode = BIN_TEXT_CHAR_MIN; else { if (mode > 0) { if (enca_istext(buffer[i])) { mode--; if (mode == 0) { /* Restore saved characters. */ unsigned char *b = buffer + i+1 - BIN_TEXT_CHAR_MIN; size_t j; for (j = 0; j < BIN_TEXT_CHAR_MIN-1; j++) b[j] = old[j]; xout -= BIN_TEXT_CHAR_MIN-1; } else /* Save this text character. */ old[BIN_TEXT_CHAR_MIN - mode - 1] = buffer[i]; } else mode = BIN_TEXT_CHAR_MIN; } } /* Fill binary characters with FILL_CHARACTER */ if (mode > 0) { buffer[i] = fill_char; xout++; } } /* Return number of characters filled with fill_char. */ return xout; } /** * ambiguous_hook: * @analyser: An analyser. * * Checks whether we can determine the charset, allowing the result to be * ambiguous. * * I.e. checks wheter meaning of all present characters is the same in all * charsets under threshold, and if so, set @analyser->result accordingly. * * Returns: Zero on success, #ENCA_EWINNER when result cannot be determined. **/ static EncaErrno ambiguous_hook(EncaAnalyserState *analyser) { const double *const ratings = analyser->ratings; const size_t max = analyser->order[0]; const int csmax = analyser->charsets[max]; const double t = analyser->options.threshold; size_t i; for (i = 0; i < analyser->ncharsets; i++) { if (i != max && ratings[max]/(ratings[i] + EPSILON) < t + EPSILON) { if (!enca_charsets_subset_identical(csmax, analyser->charsets[i], analyser->counts)) return ENCA_EWINNER; } } if (analyser->lang->eolhook) analyser->lang->eolhook(analyser); analyser->result.charset = analyser->charsets[analyser->order[0]]; return 0; } /** * try_test_list: * @analyser: An analyser. * @tests: List of test functions, NULL-terminated. * * Sequentially try @tests until some succeed or the list is exhausted. * * Returns: Nonzero when some test succeeded (@analyser->result is then set * accordingly), zero otherwise. **/ static int try_test_list(EncaAnalyserState *analyser, EncaGuessFunc *tests) { int i; for (i = 0; tests[i] != NULL; i++) { if (tests[i](analyser)) return 1; } return 0; } /** * looks_like_qp: * @analyser: An analyser. * * Checks whether @analyser buffer is QP-encoded. * * If so, it sets ENCA_SURFACE_QP in result and removes this surface, saving * original buffer in @analyser->buffer2 (if not saved yet). * * Must be called with buffer containing only 7bit characters! * * Returns: Nonzero when @analyser buffer is QP-encoded. **/ static int looks_like_qp(EncaAnalyserState *analyser) { /* QP escape character. */ static const unsigned char QP_ESCAPE = '='; /* THIS IS A GENERATED TABLE, see tools/expand_table.pl */ static const short int HEXDIGITS[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 0, 0, 0, 0, 0, 0, 11, 12, 13, 14, 15, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; unsigned char *buffer = analyser->buffer; size_t size = analyser->size; size_t qpcount = 0; /* number of qp encoded characters */ size_t reduce = 0; /* how shorter will be the buffer after removing /qp */ unsigned char *buffer2; unsigned char *p, *p2, *p0; /* When the file doesn't contain enough escape characters, don't waste time scanning it. */ if (analyser->counts[(int)QP_ESCAPE] < analyser->options.min_chars) return 0; /* Count qp encoded characters. */ p = memchr(buffer, QP_ESCAPE, size); while (p != NULL && (size_t)(p-buffer) + 2 < size) { if (*p == QP_ESCAPE) { reduce++; p++; if (*p == CR || *p == LF) { while ((size_t)(p-buffer) < size && (*p == CR || *p == LF)) { reduce++; p++; } continue; } if (HEXDIGITS[*p] && HEXDIGITS[*(p+1)]) { qpcount++; reduce++; } else return 0; p += 2; continue; } p = memchr(p, QP_ESCAPE, size - (p - buffer)); } /* When we decide it is qp encoded text, extract the 8bit characters right now. */ if (qpcount < analyser->options.min_chars) return 0; analyser->result.surface |= ENCA_SURFACE_QP; /* When the buffer must be treated as const (and we didn't created a copy * earlier), create a copy and store original into buffer2 */ analyser->size -= reduce; if (analyser->options.const_buffer && analyser->buffer2 == NULL) { analyser->buffer2 = buffer; analyser->size2 = size; analyser->buffer = enca_malloc(analyser->size); buffer = analyser->buffer; buffer2 = analyser->buffer2; } else buffer2 = analyser->buffer; /* Don't mess with too much queer stuff, OTOH try to create something strict UTF-8 parser can accept. */ p2 = buffer2; p0 = buffer; p = memchr(buffer2, QP_ESCAPE, size); while (p != NULL && (size_t)(p-buffer2) + 2 < size) { memmove(p0, p2, p-p2); p0 += p - p2; p++; if (*p == CR || *p == LF) { while ((size_t)(p-buffer2) < size && (*p == CR || *p == LF)) p++; } else { *p0++ = ((HEXDIGITS[*p]-1) << 4) + HEXDIGITS[*(p+1)]-1; p += 2; } p2 = p; p = memchr(p, QP_ESCAPE, size - (p - buffer2)); } memmove(p0, p2, size - (p2 - buffer2)); return 1; } /** * enca_eol_surface: * @buffer: A buffer whose EOL type is to be detected. * @size: Size of @buffer. * @counts: Character counts. * * Find EOL type of sample in @buffer. * * Returns: The EOL surface flags. **/ EncaSurface enca_eol_surface(const unsigned char *buffer, size_t size, const size_t *counts) { unsigned char *p; size_t i; /* Return BINARY when the sample contains some strange characters. * Note this can happen only with filtering off. */ for (i = 0; i < 0x20; i++) { if (counts[i] && enca_isbinary(i)) return ENCA_SURFACE_EOL_BIN; } /* Return LF (Unix) also when the sample doesn't contain any EOLs at all. */ if (counts[CR] == 0) return ENCA_SURFACE_EOL_LF; /* But when it contain no LF's then it's Mac. */ if (counts[LF] == 0) return ENCA_SURFACE_EOL_CR; /* Otherwise it's MS-DOG or garbage. */ if (counts[CR] != counts[LF]) return ENCA_SURFACE_EOL_MIX; /* MS-DOS */ p = memchr(buffer+1, LF, size-1); while (p != NULL) { if (*(p-1) != CR) return ENCA_SURFACE_EOL_MIX; p++; p = memchr(p, LF, size - (p - buffer)); } return ENCA_SURFACE_EOL_CRLF; } /** * enca_find_max_sec: * @analyser: An analyser. * * Updates @analyser->order according to charset @ratings. * * XXX: This should be stable sort. The ordering is defined by * data//.h header file which is in turn defined by odering in * the appropriate script (doit.sh). Silly. * * Must not be called with @analyser with no regular charsets. **/ void enca_find_max_sec(EncaAnalyserState *analyser) { double *const ratings = analyser->ratings; size_t *const order = analyser->order; size_t i, j; assert(analyser->ncharsets >= 1); /* Always start from 0, 1, 2, 3, ... */ for (i = 0; i < analyser->ncharsets; i++) order[i] = i; /* Sort it with stable sort */ for (i = 0; i+1 < analyser->ncharsets; i++) { double m = ratings[order[i]]; for (j = i+1; j < analyser->ncharsets; j++) { if (m < ratings[order[j]]) { size_t z = order[j]; order[j] = order[i]; order[i] = z; m = ratings[z]; } } } } /** * count_characters: * @analyser: An analyser. * * Recomputes occurence tables in @analyser, updating @analyser->bin and * @analyser->up counts too. **/ static void count_characters(EncaAnalyserState *analyser) { const size_t size = analyser->size; const unsigned char *const buffer = analyser->buffer; size_t *const counts = analyser->counts; size_t i; analyser->bin = 0; analyser->up = 0; for (i = 0; i < 0x100; i++) counts[i] = 0; for (i = 0; i < size; i++) counts[buffer[i]]++; for (i = 0; i < 0x100; i++) { if (enca_isbinary(i)) analyser->bin += counts[i]; } for (i = 0x080; i < 0x100; i++) analyser->up += counts[i]; } /** * check_significant: * @analyser: An analyser. * * Counts significant characters in sample. * Currenly disabled for language depedent multibyte charsets. * * Returns: Nonzero when there are at least options.min_chars significant * characters, zero otherwise. **/ static size_t check_significant(EncaAnalyserState *analyser) { const unsigned short int *const significant = analyser->lang->significant; size_t *const counts = analyser->counts; size_t i; size_t sgnf = 0; if (!significant) return 1; for (i = 0; i < 0x100; i++) { if (significant[i]) sgnf += counts[i]; } return sgnf >= analyser->options.min_chars; } /** * test_garbage: * @analyser: An analyser. * * Checks whether sample is just garbage (near white noise) or not. * * The theory behind this test is shomewhat speculative. * * Returns: Nonzero when sample is garbage, zero otherwise. **/ static int test_garbage(EncaAnalyserState *analyser) { const unsigned short int *const *const weights = analyser->lang->weights; const unsigned short int *const w = weights[analyser->order[0]]; size_t *const counts = analyser->counts; double garbage, r; size_t i; /* 8bit white noise. */ r = analyser->lang->weight_sum/128.0*analyser->options.threshold; garbage = 0.0; for (i = 0x080; i < 0x100; i++) garbage += (r - w[i])*counts[i]; garbage /= analyser->lang->weight_sum; return garbage > 0.0; } /** * enca_set_multibyte: * @analyser: An analyser. * @multibyte: Whether multibyte encoding tests should be enabled (nonzero to * enable, zero to disable). * * Enables or disables multibyte encoding tests for @analyser. * * This option is enabled by default. * * When multibyte encodings are disabled, only 8bit charsets are checked. * Disabling them for language with no 8bit charsets leaves only one thing * enca_analyse() could test: whether the sample is purely 7bit ASCII or not * (the latter leading to analyser failure, of course). * * Multibyte encoding detection is also affected by * enca_set_termination_strictness(). **/ void enca_set_multibyte(EncaAnalyser analyser, int multibyte) { assert(analyser != NULL); analyser->options.multibyte_enabled = (multibyte != 0); } /** * enca_get_multibyte: * @analyser: An analyser. * * Returns whether @analyser can return multibyte encodings. * * See enca_set_multibyte() for more detailed description of multibyte * encoding checking. * * Returns: Nonzero when multibyte encoding are possible, zero otherwise. * * Since: 1.3. **/ int enca_get_multibyte(EncaAnalyser analyser) { assert(analyser != NULL); return analyser->options.multibyte_enabled; } /** * enca_set_interpreted_surfaces: * @analyser: An analyser. * @interpreted_surfaces: Whether interpreted surfaces tests should be enabled * (nonzero to allow, zero to disallow). * * Enables or disables interpeted surfaces tests for @analyser. * * This option is enabled by default. * * To allow simple applications which care about charset only and don't want * to wrestle with surfaces, neglecting surface information should not have * serious consequences. While ignoring EOL type surface is feasible, and * ignoring UCS byteorders may be acceptable in endian-homogenous environment; * ignoring the fact file is Quoted-Printable encoded can have disasterous * consequences. By disabling this option you can disable surfaces requiring * fundamental reinterpretation of the content, namely %ENCA_SURFACE_QP * and %ENCA_SURFACE_EOL_BIN (thus probably making enca_analyse() to fail on * such samples). **/ void enca_set_interpreted_surfaces(EncaAnalyser analyser, int interpreted_surfaces) { assert(analyser != NULL); analyser->options.interpreted_surfaces = (interpreted_surfaces != 0); } /** * enca_get_interpreted_surfaces: * @analyser: An analyser. * * Returns whether @analyser allows interpreted surfaces. * * See enca_set_interpreted_surfaces() for more detailed description of * interpreted surfaces. * * Returns: Nonzero when interpreted surfaces are possible, zero otherwise. * * Since: 1.3. **/ int enca_get_interpreted_surfaces(EncaAnalyser analyser) { assert(analyser != NULL); return analyser->options.interpreted_surfaces; } /** * enca_set_ambiguity: * @analyser: An analyser. * @ambiguity: Whether result can be ambiguous (nonzero to allow, zero to * disallow). * * Enables or disables ambiguous mode for @analyser. * * This option is disabled by default. * * In ambiguous mode some result is returned even when the charset cannot be * determined uniquely, provided that sample contains only characters which * have the same meaning in all charsets under consideration. **/ void enca_set_ambiguity(EncaAnalyser analyser, int ambiguity) { assert(analyser != NULL); analyser->options.ambiguous_mode = (ambiguity != 0); } /** * enca_get_ambiguity: * @analyser: An analyser. * * Returns whether @analyser can return ambiguous results. * * See enca_set_ambiguity() for more detailed description of ambiguous results. * * Returns: Nonzero when ambiguous results are allowed, zero otherwise. * * Since: 1.3. **/ int enca_get_ambiguity(EncaAnalyser analyser) { assert(analyser != NULL); return analyser->options.ambiguous_mode; } /** * enca_set_filtering: * @analyser: An analyser. * @filtering: Whether filters should be enabled (nonzero to enable, zero to * disable). * * Enables or disables filters for @analyser. * * This option is enabled by default. * * Various filters are used to filter out block of binary noise and box-drawing * characters that could otherwise confuse enca. In cases this is unwanted, * you can disable them by setting this option to zero. **/ void enca_set_filtering(EncaAnalyser analyser, int filtering) { assert(analyser != NULL); analyser->options.filtering = (filtering != 0); } /** * enca_get_filtering: * @analyser: An analyser. * * Returns whether @analyser has filtering enabled. * * See enca_set_filtering() for more detailed description of filtering. * * Returns: Nonzero when filtering is enabled, zero otherwise. * * Since: 1.3. **/ int enca_get_filtering(EncaAnalyser analyser) { assert(analyser != NULL); return analyser->options.filtering; } /** * enca_set_garbage_test: * @analyser: An analyser. * @garabage_test: Whether garbage test should be allowed (nonzero to enable, * nzero to disable). * * Enables or disables garbage test for @analyser. * * This option is enabled by default. * * To prevent white noise (and almost-white noise) from being accidentally * detected as some charset, a garbage test is used. In cases this is * unwanted, you can disable is by setting this option to zero. **/ void enca_set_garbage_test(EncaAnalyser analyser, int garabage_test) { assert(analyser != NULL); analyser->options.test_garbageness = (garabage_test != 0); } /** * enca_get_garbage_test: * @analyser: An analyser. * * Returns whether @analyser has garbage test enabled. * * See enca_set_garbage_test() for more detailed description of garbage test. * * Returns: Nonzero when garbage test is enabled, zero otherwise. * * Since: 1.3. **/ int enca_get_garbage_test(EncaAnalyser analyser) { assert(analyser != NULL); return analyser->options.test_garbageness; } /** * enca_set_termination_strictness: * @analyser: An analyser. * @termination_strictness: Whether multibyte sequences are required to be * terminated correctly at the end of sample * (nonzero to require, zero to relax). * * Enables or disables requiring multibyte sequences to be terminated correctly * at the end of sample. * * This option is enabled by default. * * The sample given to enca_analyse() generally may not be a complete text * (e.g. for efficiency reasons). As a result, it may end in the middle of a * multibyte sequence. In this case, you should disable this option to * prevent rejecting some charset just because the sample don't terminate * correctly. On the other hand, when given sample contains whole text, you * should always enable this option to assure correctness of the result. * * Note this option does NOT affect fixed character size encodings, like UCS-2 * and UCS-4; sample is never assumed to contain UCS-2 text when its size is * not even (and similarly for UCS-4). **/ void enca_set_termination_strictness(EncaAnalyser analyser, int termination_strictness) { assert(analyser != NULL); analyser->options.termination_strictness = (termination_strictness != 0); } /** * enca_get_termination_strictness: * @analyser: An analyser. * * Returns whether @analyser requires strict termination. * * See enca_set_termination_strictness() for more detailed description of * termination strictness. * * Returns: Nonzero when strict termination is required, zero otherwise. * * Since: 1.3. **/ int enca_get_termination_strictness(EncaAnalyser analyser) { assert(analyser != NULL); return analyser->options.termination_strictness; } /** * enca_set_significant: * @analyser: An analyser. * @significant: Minimal number of required significant characters. * * Sets the minimal number of required significant characters. * * The default value of this option is 10. * * enca_analyse() refuses to make a decision unles at least this number * of significant characters is found in sample. You may want to lower this * number for very short texts. * * Returns: Zero on success, nonzero on failure, i.e. when you passed zero * as @significant. It sets analyser errno to ENCA_EINVALUE on * failure. **/ int enca_set_significant(EncaAnalyser analyser, size_t significant) { assert(analyser != NULL); if (significant == 0) return analyser->gerrno = ENCA_EINVALUE; analyser->options.min_chars = significant; return 0; } /** * enca_get_significant: * @analyser: An analyser. * * Returns the minimum number of significant characters required by @analyser. * * See enca_set_significant() for more detailed description of required * significant characters. * * Returns: The minimum number of significant characters. * * Since: 1.3. **/ size_t enca_get_significant(EncaAnalyser analyser) { assert(analyser != NULL); return analyser->options.min_chars; } /** * enca_set_threshold: * @analyser: An analyser. * @threshold: Minimal ratio between winner and second best guess. * * Sets the minimal ratio between the most probable and the second most * probable charsets. * * The default value of this option is 1.4142. * * enca_analyse() consideres the result known only when there's a clear gap * between the most probable and the second most probable charset * proababilities. Lower @threshold values mean larger probability of a * mistake and smaller probability of not recognizing a charset; higher * @threshold values the contrary. Threshold value of 2 is almost infinity. * * Returns: Zero on success, nonzero on failure, i.e. when you passed value * smaller than 1.0 as @threshold. It sets analyser errno to * ENCA_EINVALUE on failure. **/ int enca_set_threshold(EncaAnalyser analyser, double threshold) { assert(analyser != NULL); if (threshold < 1.0) return analyser->gerrno = ENCA_EINVALUE; analyser->options.threshold = threshold; return 0; } /** * enca_get_threshold: * @analyser: An analyser. * * Returns the threshold value used by @analyser. * * See enca_set_threshold() for more detailed threshold description. * * Returns: The threshold value. * * Since: 1.3. **/ double enca_get_threshold(EncaAnalyser analyser) { assert(analyser != NULL); return analyser->options.threshold; } /* vim: ts=2 sw=2 et */ Project-OSS-Revival-enca-36defd7/lib/internal.h000066400000000000000000000373731507545312400213560ustar00rootroot00000000000000#ifndef LIBENCA_H #define LIBENCA_H /*************************************************************************** * * Do not use anything from this file in applications. * Or else don't be surprised when they mysteriously crash. * Changes in internal interfaces DON'T count as interface * changes and DON'T cause library API version changes. * ***************************************************************************/ #include #include "enca.h" /* str- an mem- function, theoretically they are all in string.h */ #ifdef HAVE_STRING_H # include #else /* HAVE_STRING_H */ # ifdef HAVE_STRINGS_H # include # endif /* HAVE_STRINGS_H */ #endif /* HAVE_STRING_H */ #ifdef HAVE_MEMORY_H # include #endif /* HAVE_MEMORY_H */ #ifdef DEBUG # include #endif /* DEBUG */ /* Flags for character type table. * 0-10 are standard ones, 11-13 Enca-specific. */ enum { ENCA_CTYPE_ALNUM = 1 << 0, ENCA_CTYPE_ALPHA = 1 << 1, ENCA_CTYPE_CNTRL = 1 << 2, ENCA_CTYPE_DIGIT = 1 << 3, ENCA_CTYPE_GRAPH = 1 << 4, ENCA_CTYPE_LOWER = 1 << 5, ENCA_CTYPE_PRINT = 1 << 6, ENCA_CTYPE_PUNCT = 1 << 7, ENCA_CTYPE_SPACE = 1 << 8, ENCA_CTYPE_UPPER = 1 << 9, ENCA_CTYPE_XDIGIT = 1 << 10, ENCA_CTYPE_NAME = 1 << 11, ENCA_CTYPE_BINARY = 1 << 12, ENCA_CTYPE_TEXT = 1 << 13 }; /* Forward delcarations of structured Enca types */ typedef struct _EncaAnalyserOptions EncaAnalyserOptions; typedef struct _EncaAnalyserState EncaAnalyserState; typedef struct _EncaCharsetInfo EncaCharsetInfo; typedef struct _EncaLanguageInfo EncaLanguageInfo; typedef struct _EncaLanguageHookData1CS EncaLanguageHookData1CS; typedef struct _EncaLanguageHookDataEOL EncaLanguageHookDataEOL; typedef struct _EncaUTFCheckData EncaUTFCheckData; /** * EncaCharsetInfo: * @enca: Default, implicit name in enca. * @rfc1345: RFC1345 charset name. * (For charsets not in RFC1345, some canonical name is invented.) * @cstocs: Cstocs charset name or -1. * @iconv: Iconv charset name or -1. * @mime: Preferred MIME charset name or -1. * @human: Human comprehensible description. * @flags: Charset properties (7bit, 8bit, multibyte, ...). * @nsurface: Natural surface (`implied' in recode). * * General charset informnations. * * All the #int fields are indices in #ALIAS_LIST[]. **/ struct _EncaCharsetInfo { int enca; int rfc1345; int cstocs; int iconv; int mime; const char *human; unsigned int flags; unsigned int nsurface; }; /** * EncaHookFunc: * @analyser: Analyser state whose charset ratings are to be modified. * * Language hook function type. * * Launches language specific hooks for a particular language. * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ typedef int (* EncaHookFunc)(EncaAnalyserState *analyser); /** * EncaGuessFunc: * @analyser: Analyser state whose buffer should be checked. * * Special (multibyte) encoding check function type. * * Returns: Nonzero if analyser->result has been set, zero otherwise. **/ typedef int (* EncaGuessFunc)(EncaAnalyserState *analyser); /** * EncaLanguageInfo: * @name: Language name, or more precisely, locale name. * @humanname: Normal human-readable [English] language name. * @ncharsets: Number of charsets in this language. * @csnames: Charset names [@ncharsets]. * @weights: Character weights for charsets [@ncharsets][0x100]. * @significant: Character significancy data [0x100]. * @letters: Characters considered letters (255's have no entry in @pairs, * zeroes are non-letters aka FILL_NONLETTERs) * @pairs: Frequent pair table [max number in @letters]. * @weight_sum: Sum of all @weights (is the same for all charsets). * @hook: Hook function (deciding hard cases). * @eolhook: EOL hook function (deciding ambiguous cases based on EOL type). * @ratinghook: Helper to calculate ratings for weightingless languages. * * Language specific data. **/ struct _EncaLanguageInfo { const char *name; const char *humanname; size_t ncharsets; const char *const *csnames; const unsigned short int *const *weights; const unsigned short int *significant; const unsigned char *const *letters; const unsigned char **const *pairs; long int weight_sum; EncaHookFunc hook; EncaHookFunc eolhook; EncaHookFunc lcuchook; EncaHookFunc ratinghook; }; /** * EncaAnalyserOptions: * @const_buffer: Treat buffer as const? Otherwise its content can be, * and probably will be, modified. * @min_chars: Minimal number significant characters. * @threshold: Minimal ratio between winner and the second. * @multibyte_enabled: Check for multibyte encodings? * @interpreted_surfaces: Allow surfaces causing fundamental reinterpretation? * @ambiguous_mode: Ambiguous mode? * @filtering: Allow binary and box-drawing filters? * @test_garbageness: Do test garbageness? * @termination_strictness: Disallow broken multibyte sequences at buffer end? * * Analyser options, a part of analyser state. **/ struct _EncaAnalyserOptions { int const_buffer; size_t min_chars; double threshold; int multibyte_enabled; int interpreted_surfaces; int ambiguous_mode; int filtering; int test_garbageness; int termination_strictness; }; /** * EncaAnalyserState: * @lang: Language informations. * @ncharsets: Number of 8bit charsets in this language. * (Equal to @lang->ncharsets.) * @charsets: 8bit charset id's [@ncharsets]. * @gerrno: Guessing gerrno. * @size: Size of buffer. * @buffer: Buffer whose encoding is to be detected [@size]. * (Owned by outer world.) * @result: Result returned to caller. * @counts: Character counts [0x100]. * @bin: Number of `binary' characters. * @up: Number of 8bit characters. * @ratings: 8bit charset ratings [@ncharsets]. * @order: Charset indices (not id's) sorted by ratings in descending order * [ncharsets]. * @size2: Size of buffer2. * @buffer2: A temporary secondary buffer [@size2]. * @utfch: Double-UTF-8 test data [@ncharsets]. * @utfbuf: Double-UTF-8 buffer for various UCS-2 character counting [0x10000]. * (Magic: see mark_scratch_buffer() for description.) * @pair2bits: Character pair map to charsets [0x100000] (indexed * 0x100*first + second). Each bit corresponds to one charset, * when set, the pair is `good' for the given charset. The * type is char, so it breaks for @ncharsets > 8, but it should * not be accessed from outer world, so it can be easily enlarged * to more bits. * @bitcounts: Counts for each possible bit combinations in @pair2bits * [0x1 << ncharsets]. * @pairratings: Counts of `good' pairs per charset [@ncharsets]. * @lcbits: If a character is lowercase in some charset, correspinding bit * is set [0x100]. * @ucbits: If a character is uppercase in some charset, correspinding bit * is set [0x100]. * @options: Analyser options. * * The internal analyser state. * * Passed as an opaque object (`this') to analyser calls. **/ struct _EncaAnalyserState { /* Language data. */ const EncaLanguageInfo *lang; size_t ncharsets; int *charsets; /* Analyser state. */ EncaErrno gerrno; size_t size; unsigned char *buffer; EncaEncoding result; size_t *counts; size_t bin; size_t up; double *ratings; size_t *order; size_t size2; unsigned char *buffer2; /* Double-UTF-8 data. */ EncaUTFCheckData *utfch; int *utfbuf; /* Pair frequency data */ unsigned char *pair2bits; size_t *bitcounts; size_t *pairratings; /* LCUC data XXX: unused (yet) */ size_t *lcbits; size_t *ucbits; /* Options. */ EncaAnalyserOptions options; }; /** * EncaLanguageHookData1CS: * @name: Charset name. * @size: Number of characters in @list. * @list: Extra-important character list for the charset. * @cs: Charset number. This is an index in @analyser arrays (like @charsets), * NOT a charset id. * * Cointainer for data needed by enca_language_hook_ncs(). **/ struct _EncaLanguageHookData1CS { const char *name; size_t size; const unsigned char *list; size_t cs; }; /** * EncaLanguageHookDataEOL: * @name: Charset name. * @eol: The corresponding #EncaSurface bit. * @cs: Charset number. This is an index in @analyser arrays (like @charsets), * NOT a charset id. * * Cointainer for data needed by enca_language_hook_eol(). **/ struct _EncaLanguageHookDataEOL { const char *name; EncaSurface eol; size_t cs; }; /** * EncaUTFCheckData: * @rating: Total rating for this charset. * @size: Number of UCS-2 characters. * @result: Nonzero when the sample is probably Doubly-UTF-8 encoded from * this charset. * @ucs2: List of significant UCS-2 characters, in order [@size]. * @weights: Weights for double-UTF-8 check [@size]. Positive means normal * UTF-8, negative doubly-encoded. * * Data needed by double-UTF-8 check, per language charset. **/ struct _EncaUTFCheckData { double rating; size_t size; int result; int *ucs2; int *weights; }; /** * FILL_NONLETTER: * * Replacement character for non-letters in pair frequencies. **/ #define FILL_NONLETTER '.' /** * EPSILON: * * `Zero' for float comparsion (and to prevent division by zero, etc.). **/ #define EPSILON 0.000001 /** * LF: * * Line feed character (End-of-line on Unix). **/ #define LF ((unsigned char)'\n') /** * CR: * * Carriage return character (End-of-line on Macintosh). **/ #define CR ((unsigned char)'\r') /* Character type macros. * * The `text' and `binary' flags mark characters that can cause switch to * binary/text mode in filter_binary(). The view of what is text and what * is binary is quite simplistic, as we don't know the charset... * * The `name' flag marks characters acceptable in charset identifiers. **/ #define enca_ctype_test(c, t) ((enca_ctype_data[(unsigned char)c] & t) != 0) #define enca_isalnum(c) enca_ctype_test((c), ENCA_CTYPE_ALNUM) #define enca_isalpha(c) enca_ctype_test((c), ENCA_CTYPE_ALPHA) #define enca_iscntrl(c) enca_ctype_test((c), ENCA_CTYPE_CNTRL) #define enca_isdigit(c) enca_ctype_test((c), ENCA_CTYPE_DIGIT) #define enca_isgraph(c) enca_ctype_test((c), ENCA_CTYPE_GRAPH) #define enca_islower(c) enca_ctype_test((c), ENCA_CTYPE_LOWER) #define enca_isprint(c) enca_ctype_test((c), ENCA_CTYPE_PRINT) #define enca_ispunct(c) enca_ctype_test((c), ENCA_CTYPE_PUNCT) #define enca_isspace(c) enca_ctype_test((c), ENCA_CTYPE_SPACE) #define enca_isupper(c) enca_ctype_test((c), ENCA_CTYPE_UPPER) #define enca_isxdigit(c) enca_ctype_test((c), ENCA_CTYPE_XDIGIT) #define enca_isname(c) enca_ctype_test((c), ENCA_CTYPE_NAME) #define enca_isbinary(c) enca_ctype_test((c), ENCA_CTYPE_BINARY) #define enca_istext(c) enca_ctype_test((c), ENCA_CTYPE_TEXT) /** * ELEMENTS: * @array: An array whose size is to be computed. * * Compute the number of elements of a static array. * * Returns: the number of elements. **/ #define ELEMENTS(array) (sizeof(array)/sizeof((array)[0])) void* enca_malloc (size_t size); void* enca_realloc (void *ptr, size_t size); /** * enca_free: * @ptr: Pointer to memory to free. * * Frees memory pointed by @ptr with free() hack and assigns it a safe value, * thus may be called more than once. * * @ptr MUST be l-value. **/ #define enca_free(ptr) \ { if (ptr) free(ptr); ptr=NULL; } /** * NEW: * @type: Data type to allocate. * @n: Number of elements to allocate. * * An enca_malloc() wrapper. * * Returns: Pointer to the newly allocated memory. **/ #define NEW(type,n) ((type*)enca_malloc((n)*sizeof(type))) /** * RENEW: * @ptr: Pointer to already allocate memory or #NULL. * @type: Data type to allocate. * @n: Number of elements to resize the memory to. * * An enca_realloc() wrapper. * * Returns: Pointer to the reallocated memory (or pointer safe to call free() * on when @n is zero). **/ #define RENEW(ptr,type,n) ((type*)enca_realloc((ptr),(n)*sizeof(type))) /** * MAKE_HOOK_LINE: * @name: A charset name in C-style identifier suitable form. * * Ugly code `beautifier' macro for language hooks. **/ #define MAKE_HOOK_LINE(name) \ { #name, ELEMENTS(list_##name), list_##name, (size_t)-1 } /* Always use our, since we rely on enca_strdup(NULL) -> NULL */ char* enca_strdup(const char *s); #ifndef HAVE_STRSTR const char* enca_strstr(const char *haystack, const char* needle); #else/* not HAVE_STRSTR */ # define enca_strstr strstr #endif /* not HAVE_STRSTR */ #ifndef HAVE_STPCPY char* enca_stpcpy(char *dest, const char *src); #else /* not HAVE_STPCPY */ # define enca_stpcpy stpcpy #endif /* not HAVE_STPCPY */ /** * enca_csname: * @cs: A charset id. * * A shorthand for printing names with #ENCA_NAME_STYLE_ENCA. **/ #define enca_csname(cs) enca_charset_name((cs), ENCA_NAME_STYLE_ENCA) /* common.c */ char* enca_strconcat (const char *str, ...); char* enca_strappend (char *str, ...); /* encnames.c */ int enca_name_to_charset (const char *csname); EncaSurface enca_name_to_surface (const char *sname); /* enca.c */ int enca_language_init (EncaAnalyserState *analyser, const char *langname); void enca_language_destroy (EncaAnalyserState *analyser); double* enca_get_charset_similarity_matrix(const EncaLanguageInfo *lang); /* unicodemap.c */ int enca_charsets_subset_identical (int charset1, int charset2, const size_t *counts); /* filters.c */ size_t enca_filter_boxdraw (EncaAnalyserState *analyser, unsigned char fill_char); int enca_language_hook_ncs (EncaAnalyserState *analyser, size_t ncs, EncaLanguageHookData1CS *hookdata); int enca_language_hook_eol (EncaAnalyserState *analyser, size_t ncs, EncaLanguageHookDataEOL *hookdata); /* guess.c */ void enca_guess_init (EncaAnalyserState *analyser); void enca_guess_destroy (EncaAnalyserState *analyser); EncaSurface enca_eol_surface (const unsigned char *buffer, size_t size, const size_t *counts); void enca_find_max_sec (EncaAnalyserState *analyser); /* utf8_double.c */ void enca_double_utf8_init (EncaAnalyserState *analyser); void enca_double_utf8_destroy (EncaAnalyserState *analyser); /* pair.c */ void enca_pair_init (EncaAnalyserState *analyser); void enca_pair_destroy (EncaAnalyserState *analyser); int enca_pair_analyse (EncaAnalyserState *analyser); /* Languages. */ extern const EncaLanguageInfo ENCA_LANGUAGE_BE; extern const EncaLanguageInfo ENCA_LANGUAGE_BG; extern const EncaLanguageInfo ENCA_LANGUAGE_CS; extern const EncaLanguageInfo ENCA_LANGUAGE_ET; extern const EncaLanguageInfo ENCA_LANGUAGE_FI; extern const EncaLanguageInfo ENCA_LANGUAGE_HR; extern const EncaLanguageInfo ENCA_LANGUAGE_HU; extern const EncaLanguageInfo ENCA_LANGUAGE_LT; extern const EncaLanguageInfo ENCA_LANGUAGE_LV; extern const EncaLanguageInfo ENCA_LANGUAGE_PL; extern const EncaLanguageInfo ENCA_LANGUAGE_RU; extern const EncaLanguageInfo ENCA_LANGUAGE_SK; extern const EncaLanguageInfo ENCA_LANGUAGE_SL; extern const EncaLanguageInfo ENCA_LANGUAGE_UK; extern const EncaLanguageInfo ENCA_LANGUAGE_ZH; /* Multibyte test lists. * These arrays must be NULL-terminated. */ extern EncaGuessFunc ENCA_MULTIBYTE_TESTS_ASCII[]; extern EncaGuessFunc ENCA_MULTIBYTE_TESTS_8BIT[]; extern EncaGuessFunc ENCA_MULTIBYTE_TESTS_BINARY[]; extern EncaGuessFunc ENCA_MULTIBYTE_TESTS_8BIT_TOLERANT[]; /* Locale-independent character type table. */ extern const short int enca_ctype_data[0x100]; #endif /* not LIBENCA_H */Project-OSS-Revival-enca-36defd7/lib/lang.c000066400000000000000000000206641507545312400204510ustar00rootroot00000000000000/* uniform interface to particular languages Copyright (C) 2000-2003 David Necas (Yeti) This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "enca.h" #include "internal.h" /** * Language `none'. * * This language has no regular charsets, so only multibyte encodings are * tested **/ static const EncaLanguageInfo ENCA_LANGUAGE___ = { "__", /* name */ "none", /* human name */ 0, /* number of charsets */ NULL, /* their names */ NULL, /* character weights */ NULL, /* significancy data */ NULL, /* letter data */ NULL, /* pair data */ 0, /* sum of weights */ NULL, /* hook function */ NULL, /* eolhook function */ NULL, /* lcuchook function */ NULL, /* ratinghook function */ }; /* All languages. */ static const EncaLanguageInfo *const LANGUAGE_LIST[] = { &ENCA_LANGUAGE_BE, /* Belarusian. */ &ENCA_LANGUAGE_BG, /* Bulgarian. */ &ENCA_LANGUAGE_CS, /* Czech. */ &ENCA_LANGUAGE_ET, /* Estonian. */ &ENCA_LANGUAGE_FI, /* Finnish. */ &ENCA_LANGUAGE_HR, /* Croatian. */ &ENCA_LANGUAGE_HU, /* Hungarian. */ &ENCA_LANGUAGE_LT, /* Latvian. */ &ENCA_LANGUAGE_LV, /* Lithuanian. */ &ENCA_LANGUAGE_PL, /* Polish. */ &ENCA_LANGUAGE_RU, /* Russian. */ &ENCA_LANGUAGE_SK, /* Slovak. */ &ENCA_LANGUAGE_SL, /* Slovene. */ &ENCA_LANGUAGE_UK, /* Ukrainian. */ &ENCA_LANGUAGE_ZH, /* Chinese. */ &ENCA_LANGUAGE___, /* None. */ }; #define NLANGUAGES (ELEMENTS(LANGUAGE_LIST)) /* Local prototypes. */ static int* language_charsets_ids(const EncaLanguageInfo *lang); static const EncaLanguageInfo* find_language(const char *langname); /** * enca_language_init: * @analyser: Analyzer state to be initialized for this language. * @langname: Two-letter ISO-639 language code. * * Initializes analyser for language @langname. * * Assumes @analyser is unitinialized, calling with an initialized @analyser * leads to memory leak. * * Returns: Nonzero on success, zero otherwise. **/ int enca_language_init(EncaAnalyserState *analyser, const char *langname) { const EncaLanguageInfo *lang; assert(langname != NULL); analyser->lang = NULL; analyser->ncharsets = 0; analyser->charsets = NULL; analyser->lcbits = NULL; analyser->ucbits = NULL; lang = find_language(langname); if (lang == NULL) return 0; analyser->lang = lang; if (lang->ncharsets == 0) return 1; analyser->ncharsets = lang->ncharsets; analyser->charsets = language_charsets_ids(lang); return 1; } /** * enca_language_destroy: * @analyser: Analyzer state whose language part should be destroyed. * * Destroys the language part of analyser state @analyser. **/ void enca_language_destroy(EncaAnalyserState *analyser) { enca_free(analyser->charsets); enca_free(analyser->lcbits); enca_free(analyser->ucbits); analyser->ncharsets = 0; analyser->lang = NULL; } /** * enca_get_languages: * @n: The number of languages will be stored here. * * Returns list of known languages. * * The returned strings are two-letter ISO-639 language codes, the same as * enca_analyser_alloc() accepts. * * The list of languages has to be freed by caller; the strings themselves * must be considered constant and must NOT be freed. * * Returns: The list of languages, storing their number into *@n. **/ const char** enca_get_languages(size_t *n) { const char **languages; size_t i; languages = NEW(const char*, NLANGUAGES); for (i = 0; i < NLANGUAGES; i++) languages[i] = LANGUAGE_LIST[i]->name; *n = NLANGUAGES; return languages; } /** * enca_analyser_language: * @analyser: An analyser. * * Returns name of language which was @analyser initialized for. * * The returned string must be considered constant and must NOT be freed. * * Returns: The language name. **/ const char* enca_analyser_language(EncaAnalyser analyser) { assert(analyser != NULL); return analyser->lang->name; } /** * enca_language_english_name: * @lang: A two-letter language code, such as obtained from * enca_analyser_language() or enca_get_languages(). * * Returns an English name of a language given its ISO-639 code. * * The returned string must be considered constant and must NOT be freed. * * Returns: The English language name. **/ const char* enca_language_english_name(const char *lang) { const EncaLanguageInfo *linfo; linfo = find_language(lang); if (!linfo) return NULL; return linfo->humanname; } /** * enca_get_language_charsets: * @langname: Two-letter ISO-639 language code. * @n: The number of charsets will be stored here. * * Returns list of identifiers of charsets supported for language @language. * * The list of charset identifiers has to be freed by caller. * * Returns: The list of charsets, storing their number into *@n. When language * contains no charsets or @langname is invalid, #NULL is returned * and zero stored into *@n. **/ int* enca_get_language_charsets(const char *langname, size_t *n) { const EncaLanguageInfo *lang; assert(langname != NULL); lang = find_language(langname); if (lang == NULL) { *n = 0; return NULL; } *n = lang->ncharsets; return language_charsets_ids(lang); } /** * language_charsets_ids: * @lang: A language. * * Creates and fills table of charset identifiers of charsets supported for * language @lang. * * The size of the table is determined by @lang->ncharsets. * * Returns: The charsets id table; #NULL when @lang has no charsets. **/ static int* language_charsets_ids(const EncaLanguageInfo *lang) { int *charsets; size_t i; assert(lang != NULL); if (lang->ncharsets == 0) return NULL; charsets = NEW(int, lang->ncharsets); for (i = 0; i < lang->ncharsets; i++) { charsets[i] = enca_name_to_charset(lang->csnames[i]); assert(charsets[i] != ENCA_CS_UNKNOWN); } return charsets; } /** * find_language: * @langname: Language (i.e. locale) name. * * Finds language @langname. * * Returns: Pointer to its language information data; #NULL if not found. **/ static const EncaLanguageInfo* find_language(const char *langname) { const EncaLanguageInfo *lang = NULL; size_t i; if (langname == NULL) return NULL; for (i = 0; i < NLANGUAGES; i++) { if (strcmp(langname, LANGUAGE_LIST[i]->name) == 0) { lang = LANGUAGE_LIST[i]; break; } } return lang; } /** * enca_get_charset_similarity_matrix: * @lang: A language. * * Computes character weight similarity matrix for language @lang. * * sim[i,j] is normalized to sim[i,i] thus: * - a row i contains ,probabilities` different languages will look like the * i-th one * - a column i contains ,probabilities` the i-th language will look like * the other languages. * * For all practical applications, the higher one of sim[i,j] and sim[j,i] * is important. * * Note: this is not used anywhere, only by simtable. * * Returns: The matrix, its size is determined by @lang->ncharsets; #NULL * for language with no charsets. **/ double* enca_get_charset_similarity_matrix(const EncaLanguageInfo *lang) { const size_t n = lang->ncharsets; const unsigned short int *const *w = lang->weights; const unsigned short int *s = lang->significant; double *smat; size_t i, j, c; assert(lang != NULL); if (n == 0) return NULL; /* Below diagonal. */ smat = NEW(double, n*n); for (i = 0; i < n; i++) { for (j = 0; j <= i; j++) { smat[i*n + j] = 0.0; for (c = 0; c < 0x100; c++) smat[i*n + j] += (double)w[i][c] * (double)w[j][c] / (s[c] + EPSILON); } } /* Above diagonal. */ for (i = 0; i < n; i++) { for (j = i+1; j < n; j++) smat[i*n + j] = smat[j*n + i]; } /* Normalize. */ for (i = 0; i < n; i++) { double wmax = smat[i*n + i]; for (j = 0; j < n; j++) { smat[i*n + j] /= wmax; } } return smat; } /* vim: ts=2 */ Project-OSS-Revival-enca-36defd7/lib/lang_be.c000066400000000000000000000077651507545312400211260ustar00rootroot00000000000000/* encoding data and routines dependent on language; belarusian Copyright (C) 2000-2003 David Necas (Yeti) This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "enca.h" #include "internal.h" #include "data/belarusian/belarusian.h" /* Local prototypes. */ static int hook(EncaAnalyserState *analyser); static int hook_macwin(EncaAnalyserState *analyser); static int hook_isokoi(EncaAnalyserState *analyser); static int hook_855866(EncaAnalyserState *analyser); /** * ENCA_LANGUAGE_BE: * * Belarusian language. * * Everything the world out there needs to know about this language. **/ const EncaLanguageInfo ENCA_LANGUAGE_BE = { "be", "belarusian", NCHARSETS, CHARSET_NAMES, CHARSET_WEIGHTS, SIGNIFICANT, CHARSET_LETTERS, CHARSET_PAIRS, WEIGHT_SUM, &hook, NULL, NULL, NULL, }; /** * hook: * @analyser: Analyser state whose charset ratings are to be modified. * * Launches language specific hooks for language "be". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook(EncaAnalyserState *analyser) { return hook_macwin(analyser) || hook_isokoi(analyser) || hook_855866(analyser); } /** * hook_macwin: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between maccyr and cp1251 charsets for language "be". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_macwin(EncaAnalyserState *analyser) { static const unsigned char list_maccyr[] = { 0xb4, 0xdf, 0xd9, 0xde, 0x80, 0x8d, 0x91, 0x8f, 0x81 }; static const unsigned char list_cp1251[] = { 0xb3, 0xff, 0xa2, 0xb8, 0xc0, 0xcd, 0xd1, 0xcf, 0xc1 }; static EncaLanguageHookData1CS hookdata[] = { MAKE_HOOK_LINE(maccyr), MAKE_HOOK_LINE(cp1251), }; return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata); } /** * hook_isokoi: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between iso8859-5 and koi8u charsets for language "be". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_isokoi(EncaAnalyserState *analyser) { static const unsigned char list_iso88595[] = { 0xdd, 0xd0, 0xe0, 0xf6, 0xeb, 0xef, 0xe3, 0xe2, 0xe1, 0xdf }; static const unsigned char list_koi8u[] = { 0xc1, 0xce, 0xc5, 0xcc, 0xcb, 0xcf, 0xa6, 0xc4, 0xcd, 0xae }; static EncaLanguageHookData1CS hookdata[] = { MAKE_HOOK_LINE(iso88595), MAKE_HOOK_LINE(koi8u), }; return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata); } /** * hook_855866: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between cp866 and ibm855 charsets for language "be". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_855866(EncaAnalyserState *analyser) { static const unsigned char list_ibm855[] = { 0xd4, 0xd0, 0xd6, 0x8a, 0xc6, 0xde, 0xd2, 0xf3, 0xd8, 0x98, 0xf1 }; static const unsigned char list_ibm866[] = { 0xad, 0xe0, 0xa5, 0xab, 0xae, 0xaa, 0xe2, 0xef, 0xa7, 0xaf, 0xe6 }; static EncaLanguageHookData1CS hookdata[] = { MAKE_HOOK_LINE(ibm855), MAKE_HOOK_LINE(ibm866), }; return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata); } /* vim: ts=2 */ Project-OSS-Revival-enca-36defd7/lib/lang_bg.c000066400000000000000000000057601507545312400211210ustar00rootroot00000000000000/* encoding data and routines dependent on language; bulgarian Copyright (C) 2003 David Necas (Yeti) This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "enca.h" #include "internal.h" #include "data/bulgarian/bulgarian.h" /* Local prototypes. */ static int hook(EncaAnalyserState *analyser); static int hook_1251mac(EncaAnalyserState *analyser); static int hook_winmac(EncaAnalyserState *analyser); /** * ENCA_LANGUAGE_BG: * * Bulgarian language. * * Everything the world out there needs to know about this language. **/ const EncaLanguageInfo ENCA_LANGUAGE_BG = { "bg", "bulgarian", NCHARSETS, CHARSET_NAMES, CHARSET_WEIGHTS, SIGNIFICANT, CHARSET_LETTERS, CHARSET_PAIRS, WEIGHT_SUM, &hook, &hook_winmac, NULL, NULL }; /** * hook: * @analyser: Analyser state whose charset ratings are to be modified. * * Launches language specific hooks for language "bg". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook(EncaAnalyserState *analyser) { return hook_1251mac(analyser); } /** * hook_winmac: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between cp1251 and maccyr charsets for language "bg". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_winmac(EncaAnalyserState *analyser) { static EncaLanguageHookDataEOL hookdata[] = { { "maccyr", ENCA_SURFACE_EOL_CR, (size_t)-1 }, { "cp1251", ENCA_SURFACE_MASK_EOL, (size_t)-1 }, }; return enca_language_hook_eol(analyser, ELEMENTS(hookdata), hookdata); } /** * hook_1251mac: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between cp1251 and maccyr charsets for language "bg". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_1251mac(EncaAnalyserState *analyser) { /* The characters. */ static const unsigned char list_cp1251[] = { 0xff, 0xcd, 0xd2, 0xc0, 0xd1, 0xc8, 0xcf, 0xc2 }; static const unsigned char list_maccyr[] = { 0xdf, 0x8d, 0x92, 0x80, 0x91, 0x88, 0x8f, 0x82 }; static EncaLanguageHookData1CS hookdata[] = { MAKE_HOOK_LINE(cp1251), MAKE_HOOK_LINE(maccyr), }; return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata); } /* vim: ts=2 */ Project-OSS-Revival-enca-36defd7/lib/lang_cs.c000066400000000000000000000100661507545312400211310ustar00rootroot00000000000000/* encoding data and routines dependent on language; czech Copyright (C) 2000-2003 David Necas (Yeti) This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "enca.h" #include "internal.h" #include "data/czech/czech.h" /* Local prototypes. */ static int hook(EncaAnalyserState *analyser); static int eol_hook(EncaAnalyserState *analyser); static int hook_iso1250(EncaAnalyserState *analyser); static int hook_ibmkam(EncaAnalyserState *analyser); static int hook_isowin(EncaAnalyserState *analyser); /** * ENCA_LANGUAGE_CS: * * Czech language. * * Everything the world out there needs to know about this language. **/ const EncaLanguageInfo ENCA_LANGUAGE_CS = { "cs", "czech", NCHARSETS, CHARSET_NAMES, CHARSET_WEIGHTS, SIGNIFICANT, CHARSET_LETTERS, CHARSET_PAIRS, WEIGHT_SUM, &hook, &eol_hook, NULL, NULL }; /** * hook: * @analyser: Analyser state whose charset ratings are to be modified. * * Launches language specific hooks for language "cs". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook(EncaAnalyserState *analyser) { return hook_iso1250(analyser) || hook_ibmkam(analyser); } /** * eol_hook: * @analyser: Analyser state whose charset ratings are to be modified. * * Launches language specific EOL hooks for language "cs". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int eol_hook(EncaAnalyserState *analyser) { return hook_isowin(analyser); } /** * hook_isowin: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between iso8859-2 and cp1250 charsets for language "cs". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_isowin(EncaAnalyserState *analyser) { static EncaLanguageHookDataEOL hookdata[] = { { "cp1250", ENCA_SURFACE_EOL_CRLF, (size_t)-1 }, { "iso88592", ENCA_SURFACE_MASK_EOL, (size_t)-1 }, }; return enca_language_hook_eol(analyser, ELEMENTS(hookdata), hookdata); } /** * hook_iso1250: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between iso8859-2 and cp1250 charsets for language "cs". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_iso1250(EncaAnalyserState *analyser) { static const unsigned char list_iso88592[] = { 0xbe, 0xb9, 0xbb, 0xa9, 0xae }; static const unsigned char list_cp1250[] = { 0x9e, 0x9a, 0x9d, 0x8a, 0x8e }; static EncaLanguageHookData1CS hookdata[] = { MAKE_HOOK_LINE(iso88592), MAKE_HOOK_LINE(cp1250), }; return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata); } /** * hook_ibmkam: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between ibm852 and keybcs2 charsets for language "cs". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_ibmkam(EncaAnalyserState *analyser) { static const unsigned char list_ibm852[] = { 0xd8, 0xa7, 0xfd, 0xe7, 0x9f, 0xec, 0x85 }; static const unsigned char list_keybcs2[] = { 0x88, 0x91, 0xa9, 0x87, 0xa8, 0x98, 0x96 }; static EncaLanguageHookData1CS hookdata[] = { MAKE_HOOK_LINE(ibm852), MAKE_HOOK_LINE(keybcs2), }; return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata); } /* vim: ts=2 */ Project-OSS-Revival-enca-36defd7/lib/lang_et.c000066400000000000000000000103661507545312400211370ustar00rootroot00000000000000/* encoding data and routines dependent on language; estonian Copyright (C) 2003 David Necas (Yeti) This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "enca.h" #include "internal.h" #include "data/estonian/estonian.h" /* Local prototypes. */ static int hook(EncaAnalyserState *analyser); static int eol_hook(EncaAnalyserState *analyser); static int hook_iso13win(EncaAnalyserState *analyser); static int hook_iso4win(EncaAnalyserState *analyser); static int hook_allinone(EncaAnalyserState *analyser); /** * ENCA_LANGUAGE_ET: * * Estonian language. * * Everything the world out there needs to know about this language. **/ const EncaLanguageInfo ENCA_LANGUAGE_ET = { "et", "estonian", NCHARSETS, CHARSET_NAMES, CHARSET_WEIGHTS, SIGNIFICANT, CHARSET_LETTERS, CHARSET_PAIRS, WEIGHT_SUM, &hook, &eol_hook, NULL, NULL }; /** * hook: * @analyser: Analyser state whose charset ratings are to be modified. * * Launches language specific hooks for language "et". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook(EncaAnalyserState *analyser) { int chg = 0; /* we may want to run both, and in this order */ chg += hook_allinone(analyser); chg += hook_iso13win(analyser); return chg; } /** * eol_hook: * @analyser: Analyser state whose charset ratings are to be modified. * * Launches language specific EOL hooks for language "et". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int eol_hook(EncaAnalyserState *analyser) { return hook_iso4win(analyser); } /** * hook_iso13win: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between iso8859-13 and cp1257 charsets for language "et". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_iso13win(EncaAnalyserState *analyser) { static EncaLanguageHookDataEOL hookdata[] = { { "iso885913", ENCA_SURFACE_EOL_LF, (size_t)-1 }, { "cp1257", ENCA_SURFACE_MASK_EOL, (size_t)-1 }, }; return enca_language_hook_eol(analyser, ELEMENTS(hookdata), hookdata); } /** * hook_iso4win: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between iso8859-4 and cp1257 charsets for language "et". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_iso4win(EncaAnalyserState *analyser) { static EncaLanguageHookDataEOL hookdata[] = { { "iso88594", ENCA_SURFACE_EOL_LF, (size_t)-1 }, { "cp1257", ENCA_SURFACE_MASK_EOL, (size_t)-1 }, }; return enca_language_hook_eol(analyser, ELEMENTS(hookdata), hookdata); } /** * hook_allinone: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between iso8859-4, iso8859-13, cp1257, and baltic charsets for * language "et". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_allinone(EncaAnalyserState *analyser) { static const unsigned char list_iso88594[] = { 0xb9, 0xbe, 0xa9, 0xae }; static const unsigned char list_iso885913[] = { 0xf0, 0xfe, 0xd0, 0xde }; static const unsigned char list_baltic[] = { 0xf9, 0xea, 0xd9, 0xca }; static const unsigned char list_cp1257[] = { 0xf0, 0xfe, 0xd0, 0xde }; static EncaLanguageHookData1CS hookdata[] = { MAKE_HOOK_LINE(iso88594), MAKE_HOOK_LINE(iso885913), MAKE_HOOK_LINE(baltic), MAKE_HOOK_LINE(cp1257), }; return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata); } /* vim: ts=2 */ Project-OSS-Revival-enca-36defd7/lib/lang_fi.c000066400000000000000000000045211507545312400211210ustar00rootroot00000000000000/* encoding data and routines dependent on language; finnish Copyright (C) 2025 This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include "enca.h" #include "internal.h" #include "data/finnish/finnish.h" /* Local prototypes. */ static int hook(EncaAnalyserState *analyser); static int hook_iso4cp1257(EncaAnalyserState *analyser); /** * ENCA_LANGUAGE_FI: * * Finnish language. * * Everything the world out there needs to know about this language. **/ const EncaLanguageInfo ENCA_LANGUAGE_FI = { "fi", "finnish", NCHARSETS, CHARSET_NAMES, CHARSET_WEIGHTS, SIGNIFICANT, CHARSET_LETTERS, CHARSET_PAIRS, WEIGHT_SUM, &hook, NULL, NULL, NULL, }; /** * hook: * @analyser: Analyser state whose charset ratings are to be modified. * * Launches language specific hooks for language "fi". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook(EncaAnalyserState *analyser) { return hook_iso4cp1257(analyser); } /** * hook_iso4cp1257: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between iso8859-4 and cp1257 charsets for language "fi". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_iso4cp1257(EncaAnalyserState *analyser) { static const unsigned char list_iso88594[] = { 0xb9, 0xbe, 0xa9, 0xae, 0xa8}; static const unsigned char list_cp1257[] = { 0xf0, 0xfe, 0xd0, 0xde, 0xb8}; static EncaLanguageHookData1CS hookdata[] = { MAKE_HOOK_LINE(iso88594), MAKE_HOOK_LINE(cp1257), }; return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata); } /* vim: ts=2 */Project-OSS-Revival-enca-36defd7/lib/lang_hr.c000066400000000000000000000064511507545312400211400ustar00rootroot00000000000000/* encoding data and routines dependent on language; croatian Copyright (C) 2003 David Necas (Yeti) This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "enca.h" #include "internal.h" #include "data/croatian/croatian.h" /* Local prototypes. */ static int hook(EncaAnalyserState *analyser); static int eol_hook(EncaAnalyserState *analyser); static int hook_iso1250(EncaAnalyserState *analyser); static int hook_isowin(EncaAnalyserState *analyser); /** * ENCA_LANGUAGE_HR: * * Croatian language. * * Everything the world out there needs to know about this language. **/ const EncaLanguageInfo ENCA_LANGUAGE_HR = { "hr", "croatian", NCHARSETS, CHARSET_NAMES, CHARSET_WEIGHTS, SIGNIFICANT, CHARSET_LETTERS, CHARSET_PAIRS, WEIGHT_SUM, &hook, &eol_hook, NULL, NULL }; /** * hook: * @analyser: Analyser state whose charset ratings are to be modified. * * Launches language specific hooks for language "hr". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook(EncaAnalyserState *analyser) { return hook_iso1250(analyser); } /** * eol_hook: * @analyser: Analyser state whose charset ratings are to be modified. * * Launches language specific EOL hooks for language "hr". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int eol_hook(EncaAnalyserState *analyser) { return hook_isowin(analyser); } /** * hook_isowin: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between iso8859-2 and cp1250 charsets for language "hr". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_isowin(EncaAnalyserState *analyser) { static EncaLanguageHookDataEOL hookdata[] = { { "cp1250", ENCA_SURFACE_EOL_CRLF, (size_t)-1 }, { "iso88592", ENCA_SURFACE_MASK_EOL, (size_t)-1 }, }; return enca_language_hook_eol(analyser, ELEMENTS(hookdata), hookdata); } /** * hook_iso1250: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between iso8859-2 and cp1250 charsets for language "hr". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_iso1250(EncaAnalyserState *analyser) { static const unsigned char list_iso88592[] = { 0xb9, 0xbe, 0xa9, 0xae }; static const unsigned char list_cp1250[] = { 0x9a, 0x9e, 0x8a, 0x8e }; static EncaLanguageHookData1CS hookdata[] = { MAKE_HOOK_LINE(iso88592), MAKE_HOOK_LINE(cp1250), }; return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata); } /* vim: ts=2 */ Project-OSS-Revival-enca-36defd7/lib/lang_hu.c000066400000000000000000000061741507545312400211450ustar00rootroot00000000000000/* encoding data and routines dependent on language; hungarian Copyright (C) 2003 David Necas (Yeti) This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "enca.h" #include "internal.h" #include "data/hungarian/hungarian.h" /* Local prototypes. */ static int hook(EncaAnalyserState *analyser); static int hook_iso1250(EncaAnalyserState *analyser); static int hook_isocork(EncaAnalyserState *analyser); /** * ENCA_LANGUAGE_HU: * * Hungarian language. * * Everything the world out there needs to know about this language. **/ const EncaLanguageInfo ENCA_LANGUAGE_HU = { "hu", "hungarian", NCHARSETS, CHARSET_NAMES, CHARSET_WEIGHTS, SIGNIFICANT, CHARSET_LETTERS, CHARSET_PAIRS, WEIGHT_SUM, &hook, NULL, NULL, NULL }; /** * hook: * @analyser: Analyser state whose charset ratings are to be modified. * * Launches language specific hooks for language "hu". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook(EncaAnalyserState *analyser) { int chg = 0; /* we may want to run both, and in this order */ chg += hook_isocork(analyser); chg += hook_iso1250(analyser); return chg; } /** * hook_iso1250: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between iso8859-2 and cp1250 charsets for language "hu". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_iso1250(EncaAnalyserState *analyser) { static EncaLanguageHookDataEOL hookdata[] = { { "cp1250", ENCA_SURFACE_EOL_CRLF, (size_t)-1 }, { "iso88592", ENCA_SURFACE_MASK_EOL, (size_t)-1 }, }; return enca_language_hook_eol(analyser, ELEMENTS(hookdata), hookdata); } /** * hook_isocork: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between iso8859-2, cp1250 and cork charsets for language "hu". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_isocork(EncaAnalyserState *analyser) { static const unsigned char list_iso88592[] = { 0xf5, 0xfb, 0xd5 }; static const unsigned char list_cp1250[] = { 0xf5, 0xfb, 0xd5 }; static const unsigned char list_cork[] = { 0xae, 0xb6, 0x8e }; static EncaLanguageHookData1CS hookdata[] = { MAKE_HOOK_LINE(iso88592), MAKE_HOOK_LINE(cp1250), MAKE_HOOK_LINE(cork), }; return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata); } /* vim: ts=2 */ Project-OSS-Revival-enca-36defd7/lib/lang_lt.c000066400000000000000000000077731507545312400211560ustar00rootroot00000000000000/* encoding data and routines dependent on language; lithuanian Copyright (C) 2003 David Necas (Yeti) This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "enca.h" #include "internal.h" #include "data/lithuanian/lithuanian.h" /* Local prototypes. */ static int hook(EncaAnalyserState *analyser); static int hook_iso13win(EncaAnalyserState *analyser); static int hook_baltwin(EncaAnalyserState *analyser); static int hook_lat4balt(EncaAnalyserState *analyser); /** * ENCA_LANGUAGE_LT: * * Lithuanian language. * * Everything the world out there needs to know about this language. **/ const EncaLanguageInfo ENCA_LANGUAGE_LT = { "lt", "lithuanian", NCHARSETS, CHARSET_NAMES, CHARSET_WEIGHTS, SIGNIFICANT, CHARSET_LETTERS, CHARSET_PAIRS, WEIGHT_SUM, &hook, NULL, NULL, NULL }; /** * hook: * @analyser: Analyser state whose charset ratings are to be modified. * * Launches language specific hooks for language "lt". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook(EncaAnalyserState *analyser) { int chg = 0; /* we may want to run both, and in this order */ chg += hook_baltwin(analyser) || hook_lat4balt(analyser); chg += hook_iso13win(analyser); return chg; } /** * hook_iso13win: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between iso8859-13 and cp1257 charsets for language "lt". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_iso13win(EncaAnalyserState *analyser) { static EncaLanguageHookDataEOL hookdata[] = { { "iso885913", ENCA_SURFACE_EOL_LF, (size_t)-1 }, { "cp1257", ENCA_SURFACE_MASK_EOL, (size_t)-1 }, }; return enca_language_hook_eol(analyser, ELEMENTS(hookdata), hookdata); } /** * hook_baltwin: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between cp1257, iso8859-13 and baltic charsets for language "lt". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_baltwin(EncaAnalyserState *analyser) { static const unsigned char list_cp1257[] = { 0xf0, 0xfe, 0xeb, 0xe8, 0xd0, 0xde, 0xc8 }; static const unsigned char list_iso885913[] = { 0xf0, 0xfe, 0xeb, 0xe8, 0xd0, 0xde, 0xc8 }; static const unsigned char list_baltic[] = { 0xf9, 0xea, 0xe7, 0xd9, 0xca, 0xc7, 0xc0 }; static EncaLanguageHookData1CS hookdata[] = { MAKE_HOOK_LINE(cp1257), MAKE_HOOK_LINE(iso885913), MAKE_HOOK_LINE(baltic), }; return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata); } /** * hook_lat4balt: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between iso8859-4 and baltic charsets for language "lt". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_lat4balt(EncaAnalyserState *analyser) { static const unsigned char list_iso88594[] = { 0xec, 0xb9, 0xbe, 0xb1, 0xfe, 0xe8, 0xa9, 0xae, 0xc8 }; static const unsigned char list_baltic[] = { 0xe1, 0xf8, 0xe6, 0xe0, 0xfb, 0xeb, 0xd9, 0xca, 0xc0 }; static EncaLanguageHookData1CS hookdata[] = { MAKE_HOOK_LINE(iso88594), MAKE_HOOK_LINE(baltic), }; return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata); } /* vim: ts=2 */ Project-OSS-Revival-enca-36defd7/lib/lang_lv.c000066400000000000000000000062651507545312400211530ustar00rootroot00000000000000/* encoding data and routines dependent on language; latvian Copyright (C) 2003 David Necas (Yeti) This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "enca.h" #include "internal.h" #include "data/latvian/latvian.h" /* Local prototypes. */ static int hook(EncaAnalyserState *analyser); static int hook_iso13win(EncaAnalyserState *analyser); static int hook_baltwin(EncaAnalyserState *analyser); /** * ENCA_LANGUAGE_LV: * * Latvian language. * * Everything the world out there needs to know about this language. **/ const EncaLanguageInfo ENCA_LANGUAGE_LV = { "lv", "latvian", NCHARSETS, CHARSET_NAMES, CHARSET_WEIGHTS, SIGNIFICANT, CHARSET_LETTERS, CHARSET_PAIRS, WEIGHT_SUM, &hook, NULL, NULL, NULL }; /** * hook: * @analyser: Analyser state whose charset ratings are to be modified. * * Launches language specific hooks for language "lv". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook(EncaAnalyserState *analyser) { int chg = 0; /* we may want to run both, and in this order */ chg += hook_baltwin(analyser); chg += hook_iso13win(analyser); return chg; } /** * hook_baltwin: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between cp1257, iso8859-13 and baltic charsets for language "lv". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_baltwin(EncaAnalyserState *analyser) { static const unsigned char list_cp1257[] = { 0xe7, 0xf0, 0xf2, 0xfe, 0xd0, 0xde }; static const unsigned char list_iso885913[] = { 0xe7, 0xf0, 0xf2, 0xfe, 0xd0, 0xde }; static const unsigned char list_baltic[] = { 0xec, 0xf9, 0xf1, 0xea, 0xd9, 0xcc }; static EncaLanguageHookData1CS hookdata[] = { MAKE_HOOK_LINE(cp1257), MAKE_HOOK_LINE(iso885913), MAKE_HOOK_LINE(baltic), }; return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata); } /** * hook_iso13win: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between iso8859-13 and cp1257 charsets for language "lv". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_iso13win(EncaAnalyserState *analyser) { static EncaLanguageHookDataEOL hookdata[] = { { "iso885913", ENCA_SURFACE_EOL_LF, (size_t)-1 }, { "cp1257", ENCA_SURFACE_MASK_EOL, (size_t)-1 }, }; return enca_language_hook_eol(analyser, ELEMENTS(hookdata), hookdata); } /* vim: ts=2 */ Project-OSS-Revival-enca-36defd7/lib/lang_pl.c000066400000000000000000000100221507545312400211270ustar00rootroot00000000000000/* encoding data and routines dependent on language; polish Copyright (C) 2000-2003 David Necas (Yeti) This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "enca.h" #include "internal.h" #include "data/polish/polish.h" /* Local prototypes. */ static int hook(EncaAnalyserState *analyser); static int eol_hook(EncaAnalyserState *analyser); static int hook_iso1250(EncaAnalyserState *analyser); static int hook_balt13(EncaAnalyserState *analyser); static int hook_isowin(EncaAnalyserState *analyser); /** * ENCA_LANGUAGE_PL: * * Polish language. * * Everything the world out there needs to know about this language. **/ const EncaLanguageInfo ENCA_LANGUAGE_PL = { "pl", "polish", NCHARSETS, CHARSET_NAMES, CHARSET_WEIGHTS, SIGNIFICANT, CHARSET_LETTERS, CHARSET_PAIRS, WEIGHT_SUM, &hook, &eol_hook, NULL, NULL }; /** * hook: * @analyser: Analyser state whose charset ratings are to be modified. * * Launches language specific hooks for language "pl". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook(EncaAnalyserState *analyser) { return hook_iso1250(analyser) || hook_balt13(analyser); } /** * eol_hook: * @analyser: Analyser state whose charset ratings are to be modified. * * Launches language specific EOL hooks for language "pl". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int eol_hook(EncaAnalyserState *analyser) { return hook_isowin(analyser); } /** * hook_isowin: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between iso8859-2 and cp1250 charsets for language "pl". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_isowin(EncaAnalyserState *analyser) { static EncaLanguageHookDataEOL hookdata[] = { { "cp1250", ENCA_SURFACE_EOL_CRLF, (size_t)-1 }, { "iso88592", ENCA_SURFACE_MASK_EOL, (size_t)-1 }, }; return enca_language_hook_eol(analyser, ELEMENTS(hookdata), hookdata); } /** * hook_iso1250: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between iso8859-2 and cp1250 charsets for language "pl". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_iso1250(EncaAnalyserState *analyser) { static const unsigned char list_iso88592[] = { 0xb1, 0xb6, 0xbc, 0xa6 }; static const unsigned char list_cp1250[] = { 0xb9, 0x9c, 0x9f, 0x8, }; static EncaLanguageHookData1CS hookdata[] = { MAKE_HOOK_LINE(iso88592), MAKE_HOOK_LINE(cp1250), }; return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata); } /** * hook_balt13: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between baltic and iso8859-13 charsets for language "pl". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_balt13(EncaAnalyserState *analyser) { static const unsigned char list_baltic[] = { 0xf0, 0xeb, 0xf2, 0xfe }; static const unsigned char list_iso885913[] = { 0xf9, 0xe0, 0xf1, 0xea }; static EncaLanguageHookData1CS hookdata[] = { MAKE_HOOK_LINE(baltic), MAKE_HOOK_LINE(iso885913), }; return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata); } /* vim: ts=2 */ Project-OSS-Revival-enca-36defd7/lib/lang_ru.c000066400000000000000000000065001507545312400211500ustar00rootroot00000000000000/* encoding data and routines dependent on language; russian Copyright (C) 2000-2002 David Necas (Yeti) This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "enca.h" #include "internal.h" #include "data/russian/russian.h" /* Local prototypes. */ static int hook(EncaAnalyserState *analyser); static int eol_hook(EncaAnalyserState *analyser); static int hook_mac1251(EncaAnalyserState *analyser); static int hook_macwin(EncaAnalyserState *analyser); /** * ENCA_LANGUAGE_RU: * * Russian language. * * Everything the world out there needs to know about this language. **/ const EncaLanguageInfo ENCA_LANGUAGE_RU = { "ru", "russian", NCHARSETS, CHARSET_NAMES, CHARSET_WEIGHTS, SIGNIFICANT, CHARSET_LETTERS, CHARSET_PAIRS, WEIGHT_SUM, &hook, &eol_hook, NULL, NULL }; /** * hook: * @analyser: Analyser state whose charset ratings are to be modified. * * Launches language specific hooks for language "ru". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook(EncaAnalyserState *analyser) { return hook_mac1251(analyser); } /** * eol_hook: * @analyser: Analyser state whose charset ratings are to be modified. * * Launches language specific EOL hooks for language "ru". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int eol_hook(EncaAnalyserState *analyser) { return hook_macwin(analyser); } /** * hook_macwin: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between maccyr and cp1251 charsets for language "ru". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_macwin(EncaAnalyserState *analyser) { static EncaLanguageHookDataEOL hookdata[] = { { "maccyr", ENCA_SURFACE_EOL_CR, (size_t)-1 }, { "cp1251", ENCA_SURFACE_MASK_EOL, (size_t)-1 }, }; return enca_language_hook_eol(analyser, ELEMENTS(hookdata), hookdata); } /** * hook_mac1251: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between maccyr and cp1251 charsets for language "ru". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_mac1251(EncaAnalyserState *analyser) { static const unsigned char list_maccyr[] = { 0xdf, 0x82, 0x8f, 0x8d, 0x80, 0x91, 0x88 }; static const unsigned char list_cp1251[] = { 0xff, 0xc2, 0xcf, 0xcd, 0xc0, 0xd1, 0xc8 }; static EncaLanguageHookData1CS hookdata[] = { MAKE_HOOK_LINE(maccyr), MAKE_HOOK_LINE(cp1251), }; return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata); } /* vim: ts=2 */ Project-OSS-Revival-enca-36defd7/lib/lang_sk.c000066400000000000000000000100721507545312400211360ustar00rootroot00000000000000/* encoding data and routines dependent on language; slovak Copyright (C) 2000-2003 David Necas (Yeti) This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "enca.h" #include "internal.h" #include "data/slovak/slovak.h" /* Local prototypes. */ static int hook(EncaAnalyserState *analyser); static int eol_hook(EncaAnalyserState *analyser); static int hook_iso1250(EncaAnalyserState *analyser); static int hook_ibmkam(EncaAnalyserState *analyser); static int hook_isowin(EncaAnalyserState *analyser); /** * ENCA_LANGUAGE_SK: * * Slovak language. * * Everything the world out there needs to know about this language. **/ const EncaLanguageInfo ENCA_LANGUAGE_SK = { "sk", "slovak", NCHARSETS, CHARSET_NAMES, CHARSET_WEIGHTS, SIGNIFICANT, CHARSET_LETTERS, CHARSET_PAIRS, WEIGHT_SUM, &hook, &eol_hook, NULL, NULL }; /** * hook: * @analyser: Analyser state whose charset ratings are to be modified. * * Launches language specific hooks for language "sk". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook(EncaAnalyserState *analyser) { return hook_iso1250(analyser) || hook_ibmkam(analyser); } /** * eol_hook: * @analyser: Analyser state whose charset ratings are to be modified. * * Launches language specific EOL hooks for language "sk". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int eol_hook(EncaAnalyserState *analyser) { return hook_isowin(analyser); } /** * hook_isowin: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between iso8859-2 and cp1250 charsets for language "sk". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_isowin(EncaAnalyserState *analyser) { static EncaLanguageHookDataEOL hookdata[] = { { "cp1250", ENCA_SURFACE_EOL_CRLF, (size_t)-1 }, { "iso88592", ENCA_SURFACE_MASK_EOL, (size_t)-1 }, }; return enca_language_hook_eol(analyser, ELEMENTS(hookdata), hookdata); } /** * hook_iso1250: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between iso8859-2 and cp1250 charsets for language "sk". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_iso1250(EncaAnalyserState *analyser) { static const unsigned char list_iso88592[] = { 0xb9, 0xbb, 0xb5, 0xa9, 0xae }; static const unsigned char list_cp1250[] = { 0x9e, 0x9a, 0x9d, 0x8a, 0x8e }; static EncaLanguageHookData1CS hookdata[] = { MAKE_HOOK_LINE(iso88592), MAKE_HOOK_LINE(cp1250), }; return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata); } /** * hook_ibmkam: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between ibm852 and keybcs2 charsets for language "sk". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_ibmkam(EncaAnalyserState *analyser) { static const unsigned char list_ibm852[] = { 0xa7, 0xe7, 0xec, 0x9c, 0x96, 0xd4, 0xe5 }; static const unsigned char list_keybcs2[] = { 0x87, 0x91, 0xa8, 0x98, 0x8c, 0x83, 0xa4 }; static EncaLanguageHookData1CS hookdata[] = { MAKE_HOOK_LINE(ibm852), MAKE_HOOK_LINE(keybcs2), }; return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata); } /* vim: ts=2 */ Project-OSS-Revival-enca-36defd7/lib/lang_sl.c000066400000000000000000000043571507545312400211500ustar00rootroot00000000000000/* encoding data and routines dependent on language; slovene Copyright (C) 2000-2003 David Necas (Yeti) This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "enca.h" #include "internal.h" #include "data/slovene/slovene.h" /* Local prototypes. */ static int eol_hook(EncaAnalyserState *analyser); static int hook_isowin(EncaAnalyserState *analyser); /** * ENCA_LANGUAGE_SL: * * Slovene language. * * Everything the world out there needs to know about this language. **/ const EncaLanguageInfo ENCA_LANGUAGE_SL = { "sl", "slovene", NCHARSETS, CHARSET_NAMES, CHARSET_WEIGHTS, SIGNIFICANT, CHARSET_LETTERS, CHARSET_PAIRS, WEIGHT_SUM, NULL, &eol_hook, NULL, NULL }; /** * eol_hook: * @analyser: Analyser state whose charset ratings are to be modified. * * Launches language specific EOL hooks for language "sl". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int eol_hook(EncaAnalyserState *analyser) { return hook_isowin(analyser); } /** * hook_isowin: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between iso8859-2 and cp1250 charsets for language "sl". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_isowin(EncaAnalyserState *analyser) { static EncaLanguageHookDataEOL hookdata[] = { { "cp1250", ENCA_SURFACE_EOL_CRLF, (size_t)-1 }, { "iso88592", ENCA_SURFACE_MASK_EOL, (size_t)-1 }, }; return enca_language_hook_eol(analyser, ELEMENTS(hookdata), hookdata); } /* vim: ts=2 */ Project-OSS-Revival-enca-36defd7/lib/lang_uk.c000066400000000000000000000116511507545312400211440ustar00rootroot00000000000000/* encoding data and routines dependent on language; ukrainian Copyright (C) 2000-2003 David Necas (Yeti) This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "enca.h" #include "internal.h" #include "data/ukrainian/ukrainian.h" /* Local prototypes. */ static int hook(EncaAnalyserState *analyser); static int eol_hook(EncaAnalyserState *analyser); static int hook_mac1251(EncaAnalyserState *analyser); static int hook_isokoi(EncaAnalyserState *analyser); static int hook_ibm1125(EncaAnalyserState *analyser); static int hook_macwin(EncaAnalyserState *analyser); /** * ENCA_LANGUAGE_UK: * * Ukrainian language. * * Everything the world out there needs to know about this language. **/ const EncaLanguageInfo ENCA_LANGUAGE_UK = { "uk", "ukrainian", NCHARSETS, CHARSET_NAMES, CHARSET_WEIGHTS, SIGNIFICANT, CHARSET_LETTERS, CHARSET_PAIRS, WEIGHT_SUM, &hook, &eol_hook, NULL, NULL }; /** * hook: * @analyser: Analyser state whose charset ratings are to be modified. * * Launches language specific hooks for language "uk". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook(EncaAnalyserState *analyser) { return hook_mac1251(analyser) || hook_isokoi(analyser) || hook_ibm1125(analyser); } /** * eol_hook: * @analyser: Analyser state whose charset ratings are to be modified. * * Launches language specific EOL hooks for language "uk". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int eol_hook(EncaAnalyserState *analyser) { return hook_macwin(analyser); } /** * hook_macwin: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between maccyr and cp1251 charsets for language "uk". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_macwin(EncaAnalyserState *analyser) { static EncaLanguageHookDataEOL hookdata[] = { { "maccyr", ENCA_SURFACE_EOL_CR, (size_t)-1 }, { "cp1251", ENCA_SURFACE_MASK_EOL, (size_t)-1 }, }; return enca_language_hook_eol(analyser, ELEMENTS(hookdata), hookdata); } /** * hook_mac1251: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between maccyr and cp1251 charsets for language "uk". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_mac1251(EncaAnalyserState *analyser) { static const unsigned char list_maccyr[] = { 0xb4, 0xdf, 0xbb, 0x82, 0x8f }; static const unsigned char list_cp1251[] = { 0xb3, 0xff, 0xbf, 0xc2, 0xcf }; static EncaLanguageHookData1CS hookdata[] = { MAKE_HOOK_LINE(maccyr), MAKE_HOOK_LINE(cp1251), }; return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata); } /** * hook_isokoi: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between iso8859-5 and koi8u charsets for language "uk". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_isokoi(EncaAnalyserState *analyser) { static const unsigned char list_iso88595[] = { 0xdd, 0xe2, 0xf6, 0xe0, 0xde, 0xe1, 0xe3, 0xdc, 0xdf, 0xef, 0xec }; static const unsigned char list_koi8u[] = { 0xcf, 0xc1, 0xce, 0xc9, 0xa6, 0xc5, 0xcb, 0xcc, 0xc4, 0xcd, 0xc7 }; static EncaLanguageHookData1CS hookdata[] = { MAKE_HOOK_LINE(iso88595), MAKE_HOOK_LINE(koi8u), }; return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata); } /** * hook_ibm1125: * @analyser: Analyser state whose charset ratings are to be modified. * * Decides between cp1125 and ibm855 charsets for language "uk". * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook_ibm1125(EncaAnalyserState *analyser) { static const unsigned char list_cp1125[] = { 0xae, 0xad, 0xe2, 0xf7, 0xe0, 0xa5, 0xab, 0xaf, 0xef, 0xaa, 0xa7 }; static const unsigned char list_ibm855[] = { 0xd6, 0xd4, 0xb7, 0x8a, 0xeb, 0xc6, 0xd0, 0xd2, 0xd8, 0xde, 0xf3 }; static EncaLanguageHookData1CS hookdata[] = { MAKE_HOOK_LINE(cp1125), MAKE_HOOK_LINE(ibm855), }; return enca_language_hook_ncs(analyser, ELEMENTS(hookdata), hookdata); } /* vim: ts=2 */ Project-OSS-Revival-enca-36defd7/lib/lang_zh.c000066400000000000000000000101261507545312400211420ustar00rootroot00000000000000/* language info: chinese Copyright (C) 2005 Meng Jie (Zuxy) This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "enca.h" #include "internal.h" #include "data/chinese/chinese.h" static int hook(EncaAnalyserState *analyser); static int calc_rating(EncaAnalyserState *analyser); /* Not 8-bit clean, can't be a HZ here */ static int is_hz(const unsigned char* str __attribute__((unused))) { return 0; } static const char *const CHARSET_NAMES[] = { "gbk", "big5", "hz" }; static ValidityFunc* validity_check_table[] = { is_gbk, is_big5, is_hz }; static RateFunc* rate_calc_table[] = { in_gbk, in_big5, NULL }; #define NCHARSETS (sizeof(CHARSET_NAMES)/sizeof(const char* const)) /** * ENCA_LANGUAGE_ZH: * * Chinese language. * * Everything the world out there needs to know about this language. **/ const EncaLanguageInfo ENCA_LANGUAGE_ZH = { "zh", "chinese", NCHARSETS, CHARSET_NAMES, 0, 0, 0, 0, 0, &hook, NULL, NULL, &calc_rating }; /** * hook: * @analyser: Analyser state whose charset ratings are to be modified. * * Adjust ratings for language "zh", see calc_rating below. * * Returns: Nonzero if charset ratigns have been actually modified, zero * otherwise. **/ static int hook(EncaAnalyserState *analyser) { const size_t* order = analyser->order; double* rating_first = &analyser->ratings[order[0]]; double* rating_second = &analyser->ratings[order[1]]; if (*rating_second < 0) { *rating_second = 0.; if (*rating_first < 0) *rating_first = 0.; else *rating_first = 1.; /* Make sure that the first won */ return 1; } return 0; } /** * calc_rating: * @analyser: An analyser. * * Calculating ratings for GBK and Big5, respectively, and * ratings may be set to negative values when invalid a character * for a charset was encoutered. This should not affect the result of * enca_find_max_sec, but must be adjust to positive by hook for * the final comparison. * * Returns: Always return 1 **/ static int calc_rating(EncaAnalyserState *analyser) { int islowbyte = 0; unsigned int i, j; unsigned char low; const size_t size = analyser->size; const unsigned char *buffer = analyser->buffer; double *ratings = analyser->ratings; int continue_check[NCHARSETS]; const struct zh_weight* pweight; assert(analyser->ncharsets == NCHARSETS && sizeof(rate_calc_table)/sizeof(RateFunc*) == NCHARSETS && sizeof(validity_check_table)/sizeof(ValidityFunc*) == NCHARSETS); for (i = 0; i < NCHARSETS; i++) { continue_check[i] = 1; ratings[i] = 0.; } for (i = 0; i < size; i++) { low = buffer[i]; /* low byte */ if (islowbyte) { const unsigned char* hanzi = buffer + i - 1; assert(i); for (j = 0; j < NCHARSETS; j++) { if (continue_check[j]) { continue_check[j] = validity_check_table[j](hanzi); if (!continue_check[j]) ratings[j] = -1.; else { pweight = rate_calc_table[j](hanzi); if (pweight) ratings[j] += pweight->freq; } } } islowbyte = 0; continue; } if (low & 0x80) islowbyte = 1; } #ifdef DEBUG printf("GBK: %f, BIG5: %f\n", ratings[0], ratings[1]); #endif /* Unfinished DBCS. */ if (islowbyte && analyser->options.termination_strictness > 0) { for (i = 0; i < NCHARSETS; i++) ratings[i] = 0.; } return 1; } /* vim: ts=2 */ Project-OSS-Revival-enca-36defd7/lib/multibyte.c000066400000000000000000000673311507545312400215500ustar00rootroot00000000000000/* multibyte character set checks Copyright (C) 2000-2003 David Necas (Yeti) This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include #include "enca.h" #include "internal.h" /* * See http://www.unicode.org/unicode/faq/utf_bom.html#25 for BOMs: * 00 00 FE FF UTF-32, big-endian * FF FE 00 00 UTF-32, little-endian * FE FF UTF-16, big-endian * FF FE UTF-16, little-endian * EF BB BF UTF-8 */ /* Local prototypes. */ static int is_valid_utf8 (EncaAnalyserState *analyser); static int looks_like_TeX (EncaAnalyserState *analyser); static int is_valid_utf7 (EncaAnalyserState *analyser); static int looks_like_hz (EncaAnalyserState *analyser); static int looks_like_ucs2 (EncaAnalyserState *analyser); static int looks_like_ucs4 (EncaAnalyserState *analyser); static int looks_like_utf8 (EncaAnalyserState *analyser); static size_t what_if_it_was_ucs4 (const unsigned char *buffer, size_t size, size_t min_chars, EncaSurface *crlf_surf); static void shuffle_byte_order (unsigned char *buffer, size_t size, EncaSurface permutation); /* Multibyte test lists. * These arrays must be NULL-terminated. */ EncaGuessFunc ENCA_MULTIBYTE_TESTS_ASCII[] = { &is_valid_utf7, &looks_like_TeX, &looks_like_hz, NULL }; EncaGuessFunc ENCA_MULTIBYTE_TESTS_8BIT[] = { &is_valid_utf8, NULL }; EncaGuessFunc ENCA_MULTIBYTE_TESTS_BINARY[] = { &looks_like_ucs4, &looks_like_ucs2, NULL }; EncaGuessFunc ENCA_MULTIBYTE_TESTS_8BIT_TOLERANT[] = { &looks_like_utf8, NULL }; /** * is_valid_utf8: * @analyser: Analyser whose buffer is to be checked. * * Checks whether @analyser->buffer contains valid UTF-8. * * Directly modifies @analyser->result on success. * * Returns: Nonzero when @analyser->result was set, zero othewrise. **/ static int is_valid_utf8(EncaAnalyserState *analyser) { static int utf8 = ENCA_CS_UNKNOWN; /* UTF-8 charset */ size_t size = analyser->size; const unsigned char *buffer = analyser->buffer; const size_t *const counts = analyser->counts; /* Bonus added when we catch a byte order marker. */ size_t bom_bonus; int remains_10xxxxxx = 0; /* how many next bytes have to be 10xxxxxx */ int utf8count = 0; /* number of UTF-8 encoded characters */ size_t i; unsigned char b; /* Bytes 0xfe and 0xff just cannot appear in utf-8 in any case. */ if (counts[0xfe] || counts[0xff]) return 0; /* Initialize when we are called the first time. */ if (utf8 == ENCA_CS_UNKNOWN) { utf8 = enca_name_to_charset("utf-8"); assert(utf8 != ENCA_CS_UNKNOWN); } /* Check BOM */ bom_bonus = (size_t)(sqrt((double)size) + size/10.0); if (size >= 3 && buffer[0] == 0xef && buffer[1] == 0xbb && buffer[2] == 0xbf) { utf8count += bom_bonus; buffer += 3; size -= 3; } /* Parse. */ for (i = 0; i < size; i++) { b = buffer[i]; if (!remains_10xxxxxx) { if ((b & 0x80) == 0) /* 7bit characters */ continue; if ((b & 0xe0) == 0xc0) { /* 110xxxxx 10xxxxxx sequence */ remains_10xxxxxx = 1; utf8count++; continue; } if ((b & 0xf0) == 0xe0) { /* 1110xxxx 2 x 10xxxxxx sequence */ remains_10xxxxxx = 2; utf8count++; continue; } /* Following are valid 32-bit UCS characters, but not 16-bit Unicode, they are very rare, nevertheless we accept them. */ if ((b & 0xf8) == 0xf0) { /* 1110xxxx 3 x 10xxxxxx sequence */ remains_10xxxxxx = 3; utf8count++; continue; } if ((b & 0xfc) == 0xf8) { /* 1110xxxx 4 x 10xxxxxx sequence */ remains_10xxxxxx = 4; utf8count++; continue; } if ((b & 0xfe) == 0xfc) { /* 1110xxxx 5 x 10xxxxxx sequence */ remains_10xxxxxx = 5; utf8count++; continue; } /* We can get here only when input is invalid: (b & 0xc0) == 0x80. */ return 0; } else { /* Broken 10xxxxxx sequence? */ if ((b & 0xc0) != 0x80) { return 0; } remains_10xxxxxx--; } } /* Unfinished 10xxxxxx sequence. */ if (remains_10xxxxxx != 0 && analyser->options.termination_strictness > 0) return 0; if (utf8count < (int)analyser->options.min_chars) return 0; analyser->result.charset = utf8; analyser->result.surface |= enca_eol_surface(buffer, size, counts); return 1; } /** * looks_like_TeX: * @analyser: Analyser whose buffer is to be checked. * * Checks whether @analyser->buffer contains TeX-encoded 8bit characters. * * Directly modifies @analyser->result on success. * * Returns: Nonzero when @analyser->result was set, zero othewrise. **/ static int looks_like_TeX(EncaAnalyserState *analyser) { /* TeX escape character, skip-characters, punctuation and alpha accents */ /* THIS IS A GENERATED TABLE, see tools/expand_table.pl */ static const unsigned char TEX_ACCPUNCT[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; /* THIS IS A GENERATED TABLE, see tools/expand_table.pl */ static const unsigned char TEX_ACCALPHA[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; static const unsigned char TEX_ESCAPE = '\\'; static const unsigned char TEX_BRACE = '{'; static int TeX = ENCA_CS_UNKNOWN; /* TeX charset */ const unsigned char *const buffer = analyser->buffer; const size_t size = analyser->size; const size_t *const counts = analyser->counts; size_t TeXaccents = 0; /* number of TeX accents */ const unsigned char *p; /* When the file doesn't contain enough escape characters, don't waste time scanning it. */ if (counts[TEX_ESCAPE] < analyser->options.min_chars) return 0; /* Initialize when we are called the first time. */ if (TeX == ENCA_CS_UNKNOWN) { TeX = enca_name_to_charset("TeX"); assert(TeX != ENCA_CS_UNKNOWN); } /* [roughly] count TeX accents */ p = memchr(buffer, TEX_ESCAPE, size); while (p != NULL && (size_t)(p-buffer) + 2 < size) { if (*p == TEX_ESCAPE) { p++; if (*p == TEX_ESCAPE) p++; /* catch \\ */ if (TEX_ACCPUNCT[*p] || (TEX_ACCALPHA[*p] && (*++p == TEX_BRACE || enca_isspace((char)*p)))) { while ((size_t)(p-buffer) + 1 < size && (*++p == TEX_BRACE || enca_isspace((char)*p))) ; if (enca_isalpha(*p)) TeXaccents++; } continue; } p = memchr(p, TEX_ESCAPE, size - (p - buffer)); } if (TeXaccents < analyser->options.min_chars) return 0; analyser->result.charset = TeX; analyser->result.surface |= enca_eol_surface(buffer, size, counts); return 1; } /** * is_valid_utf7: * @analyser: Analyser whose buffer is to be checked. * * Checks whether @analyser->buffer contains valid UTF-7 * * Directly modifies @analyser->result on success. * * Returns: Nonzero when @analyser->result was set, zero othewrise. **/ static int is_valid_utf7(EncaAnalyserState *analyser) { /* UTF-7 special characters. */ static const unsigned char UTF7_ESCAPE = '+'; /* This is not a bug. `+-' is `+' in UTF-7. */ static const unsigned char UTF7_PLUS = '-'; /* Base64 base (or so-called set B), see RFC1521, RFC1642 */ /* THIS IS A GENERATED TABLE, see tools/expand_table.pl */ static const short int BASE64[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 0, 0, 0, 0, 0, 0, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; static int utf7 = ENCA_CS_UNKNOWN; /* UTF-7 charset */ const unsigned char *const buffer = analyser->buffer; const size_t size = analyser->size; const size_t *const counts = analyser->counts; size_t utf7count = 0; /* number of >7bit characters */ unsigned char *p,*q; /* When the file doesn't contain enough UTF-7 shift characters, don't waste time scanning it. */ if (counts[UTF7_ESCAPE] < analyser->options.min_chars) return 0; /* Initialize when we are called the first time. */ if (utf7 == ENCA_CS_UNKNOWN) { utf7 = enca_name_to_charset("utf-7"); assert(utf7 != ENCA_CS_UNKNOWN); } p = memchr(buffer, UTF7_ESCAPE, size); while (p != NULL && (size_t)(p-buffer) + 1 < size) { p++; if (*p == UTF7_PLUS) { /* +- */ /* Don't count +- since it's often used for 0x00b1 in plain 7bit ascii. */ /* utf7count++; */ } else { for (q = p; (size_t)(q-buffer) < size && BASE64[*q]; q++) ; if ((size_t)(q-buffer) == size) { p = q; break; } /* check whether all padding bits are 0's (don't try to understand how) */ if (q-p == 0 || ((BASE64[*(q-1)]-1) & 0x3f>>(6 - 6*(q - p)%8))) return 0; utf7count += 6*(q - p)/16; p = q; } p = memchr(p, UTF7_ESCAPE, size - (p - buffer)); } /* p != NULL means unsinished sequence here. */ if (p != NULL && analyser->options.termination_strictness > 0) return 0; if (utf7count < analyser->options.min_chars) return 0; analyser->result.charset = utf7; analyser->result.surface |= enca_eol_surface(buffer, size, counts); return 1; } /** * looks_like_ucs2: * @analyser: Analyser whose buffer is to be checked. * * Checks whether @analyser->buffer contains UCS-2 encoded characters. * * Directly modifies @analyser->result on success. * * Returns: Nonzero when @analyser->result was set, zero othewrise. **/ static int looks_like_ucs2(EncaAnalyserState *analyser) { static int ucs2 = ENCA_CS_UNKNOWN; /* UCS-2 charset id */ const unsigned char *const buffer = analyser->buffer; const size_t size = analyser->size; const size_t *const counts = analyser->counts; /* Bonus added when we catch a byte order marker. */ size_t bom_bonus; size_t ucs2count = 0; /* something like number of good ucs-2 characters */ unsigned int byte_order = 0; /* default byte order is little endian * (msb first) */ unsigned int byte_order_changes = 0; /* how many times byte_order changed */ size_t cr = 0; /* number of CR's */ size_t lf = 0; /* number of LF's */ int crlf_ok = 1; /* are all LF's preceeded by CR's? */ unsigned char b1, b2; double r; size_t i; /* The number of bytes must be of course even */ if (size%2 != 0) return 0; bom_bonus = (size_t)(sqrt((double)size) + size/10.0); /* When the file doesn't contain enough zeros, don't waste time scanning it. */ r = (2.0*(counts[0] + counts[1] + counts[2] + counts[3] + counts[4]) + bom_bonus)/size; if (r < log(analyser->options.threshold + EPSILON)) return 0; /* Initialize when we are called the first time. */ if (ucs2 == ENCA_CS_UNKNOWN) { ucs2 = enca_name_to_charset("ucs-2"); assert(ucs2 != ENCA_CS_UNKNOWN); } /* Try to catch lsb even when it doesn't start with endian marker. */ if (buffer[1] == 0 && enca_isprint(buffer[0])) byte_order = 1; /* Scan buffer. */ for (i = 0; i < size; i += 2) { b1 = buffer[i + byte_order]; b2 = buffer[i+1 - byte_order]; /* Byte order marker detection. */ if (b1 == 0xfe && b2 == 0xff) { if (i == 0) ucs2count += bom_bonus; else byte_order_changes++; continue; } if (b1 == 0xff && b2 == 0xfe) { byte_order = 1-byte_order; if (i == 0) ucs2count += bom_bonus; else byte_order_changes++; continue; } /* Black magic. * When almost any word can be UCS-2 character, we have to assume some * are far more probable. */ if (b1 == 0) { ucs2count += (enca_isprint(b2) || enca_isspace(b2)) ? 2 : 0; /* check EOLs */ if (b2 == CR) cr++; if (b2 == LF) { lf++; if (i > 0 && (buffer[i-1-byte_order] != CR || buffer[i-2+byte_order] != 0)) crlf_ok = 0; } } else { if (b1 <= 4) ucs2count += 2; } } /* Now we have to decide what we tell to the caller. */ r = (double)ucs2count/size; if (r < log(analyser->options.threshold + EPSILON) || ucs2count/2 < analyser->options.min_chars) return 0; analyser->result.charset = ucs2; /* Byte order surface. */ if (byte_order_changes) analyser->result.surface |= ENCA_SURFACE_PERM_MIX; else analyser->result.surface |= byte_order ? ENCA_SURFACE_PERM_21: 0; /* EOL surface. */ if (cr == 0) analyser->result.surface |= ENCA_SURFACE_EOL_LF; else { if (lf == 0) analyser->result.surface |= ENCA_SURFACE_EOL_CR; else { analyser->result.surface |= crlf_ok ? ENCA_SURFACE_EOL_CRLF : ENCA_SURFACE_EOL_MIX; } } return 1; } /** * looks_like_ucs4: * @analyser: Analyser whose buffer is to be checked. * * Checks whether @analyser->buffer contains UCS-4 encoded characters. * * Directly modifies @analyser->result on success. * * Returns: Nonzero when @analyser->result was set, zero othewrise. **/ static int looks_like_ucs4(EncaAnalyserState *analyser) { static const EncaSurface PERMS[] = { ENCA_SURFACE_PERM_4321, ENCA_SURFACE_PERM_21 }; static int ucs4 = ENCA_CS_UNKNOWN; /* UCS-4 charset id */ unsigned char *buffer = analyser->buffer; const size_t size = analyser->size; const size_t *const counts = analyser->counts; ssize_t ucs4count = 0; /* ucs-4-icity */ size_t count_perm[4]; /* counts for various byteorders */ EncaSurface eol[4]; /* EOL types for various byteorders */ double r; /* rating */ size_t i, max; /* The number of bytes must be of course multiple of 4. */ if (size%4 != 0) return 0; /* When the file doesn't contain enough zeros (and other small bytes), don't waste time scanning it. */ r = (4.0*(counts[0] + counts[1] + counts[2] + counts[3] + counts[4])/3.0) /size; if (r < log(analyser->options.threshold + EPSILON)) return 0; /* Initialize when we are called the first time. */ if (ucs4 == ENCA_CS_UNKNOWN) { ucs4 = enca_name_to_charset("ucs-4"); assert(ucs4 != ENCA_CS_UNKNOWN); } /* Try all sensible unsigned charorders and find maximum. At the end the buffer has the same byteorder as it had, but when the buffer have to be considered const, work on copy. */ if (analyser->options.const_buffer) { buffer = memcpy(enca_malloc(size), buffer, size); } max = 0; for (i = 0; i < 4; i++) { count_perm[i] = what_if_it_was_ucs4(buffer, size, analyser->options.min_chars, eol + i); if (count_perm[i] > count_perm[max]) max = i; shuffle_byte_order(buffer, size, PERMS[i%2]); } if (analyser->options.const_buffer) enca_free(buffer); /* Use quite a cruel selection to restrain other byteorders. */ ucs4count = 2*count_perm[max]; for (i = 0; i < 4; i++) ucs4count -= count_perm[i]; /* Now we have to decide what we tell to the caller. */ r = (double)ucs4count/size; if (r < log(analyser->options.threshold + EPSILON) || ucs4count/4 < (int)analyser->options.min_chars) return 0; analyser->result.charset = ucs4; /* Compute what permutation corresponds to max. */ for (i = 0; i < max; i++) analyser->result.surface ^= PERMS[i%2]; analyser->result.surface |= eol[max]; return 1; } /** * what_if_it_was_ucs4: * @buffer: Buffer to be checked. * @size: Size of @buffer. * @min_chars: Minimal number of `nice' UCS-4 characters to succeede. * @crlf_surf: Where detected EOL surface type should be stored. * * Checks whether @buffer contains little endian UCS-4 encoded characters. * * Assumes @buffer contains little endian UCS-4 and returns the number of * `good' characters, and in case it's at least @min_chars, finds EOL surface * type too. * * Returns: The number of `good' UCS-4 characters with some bonus for a good * BOM. **/ static size_t what_if_it_was_ucs4(const unsigned char *buffer, size_t size, size_t min_chars, EncaSurface *crlf_surf) { /* Bonus added when we catch a byte order marker. */ size_t bom_bonus; size_t count = 0; /* ucs-4-icity */ size_t cr = 0; /* number of CR's */ size_t lf = 0; /* number of LF's */ int crlf_ok = 1; /* are all LF's preceeded by CR's? */ size_t i; /* check BOM */ bom_bonus = (size_t)(sqrt((double)size) + size/20.0); if (size) { if (buffer[0] == 0 && buffer[1] == 0 && buffer[2] == 0xfe && buffer[3] == 0xff) { count += bom_bonus; buffer += 4; size -= 4; } } for (i = 0; i < size; i += 4) { /* Does it look like little endian ucs-4? */ if (buffer[i] == 0 && buffer[i+1] == 0) { if (buffer[i+2] == 0) count += enca_isprint(buffer[i+3]) || enca_isspace(buffer[i+3]) ? 4 : 0; else { if (buffer[i+2] < 5) count += 4; } } } /* Detect EOL surface * To be 100% portable, we do it the ugly way: by testing individual bytes. */ if (count/4 >= min_chars) { for (i = 0; i < size; i += 4) { if (buffer[i+3] == CR && buffer[i+2] == 0 && buffer[i+1] == 0 && buffer[i] == 0) cr++; if (buffer[i+3] == LF && buffer[i+2] == 0 && buffer[i+1] == 0 && buffer[i] == 0) { lf++; if (crlf_ok && i > 0 && (buffer[i-1] != CR || buffer[i-2] != 0 || buffer[i-3] != 0 || buffer[i-4] != 0)) crlf_ok = 0; } } /* EOL surface result */ if (cr == 0) *crlf_surf = ENCA_SURFACE_EOL_LF; else { if (lf == 0) *crlf_surf = ENCA_SURFACE_EOL_CR; else *crlf_surf = crlf_ok ? ENCA_SURFACE_EOL_CRLF : ENCA_SURFACE_EOL_MIX; } } return count; } /** * shuffle_byte_order: * @buffer: Buffer to be shuffled. * @size: Size of @buffer. * @permutation: Permutation type, possible values mean * 0 no change * ENCA_SURFACE_PERM_4321 4321 * ENCA_SURFACE_PERM_21 21 (== 2143) * ENCA_SURFACE_PERM_21|ENCA_SURFACE_PERM_4321 3412 * * Performs given permutation on @buffer. **/ static void shuffle_byte_order(unsigned char *buffer, size_t size, EncaSurface permutation) { size_t i; unsigned char b; if (permutation & ENCA_SURFACE_PERM_4321) { for (i = 0; i < size; i += 4) { b = buffer[i]; buffer[i] = buffer[i+3]; buffer [i+3] = b; b = buffer[i+1]; buffer[i+1] = buffer[i+2]; buffer[i+2] = b; } } if (permutation & ENCA_SURFACE_PERM_21) { for (i = 0; i < size; i += 2) { b = buffer[i]; buffer[i] = buffer[i+1]; buffer [i+1] = b; } } } /** * looks_like_utf8: * @analyser: Analyser whose buffer is to be checked. * * Checks whether @analyser->buffer may contain UTF-8. * * This is a fault-tolerant version of is_valid_utf8, intended to be used after * filtering, when a few stray 8bit characters may appear in the sample. * * Directly modifies @analyser->result on success. * * Returns: Nonzero when @analyser->result was set, zero othewrise. **/ static int looks_like_utf8(EncaAnalyserState *analyser) { static int utf8 = ENCA_CS_UNKNOWN; /* UTF-8 charset */ size_t size = analyser->size; const unsigned char *buffer = analyser->buffer; const size_t *const counts = analyser->counts; /* Bonus added when we catch a byte order marker. */ size_t bom_bonus; int remains_10xxxxxx = 0; /* how many next bytes have to be 10xxxxxx */ int utf8count = 0; /* number of UTF-8 encoded characters */ int failures = 0; /* number of invalid sequences encountered */ size_t i; unsigned char b; /* Initialize when we are called the first time. */ if (utf8 == ENCA_CS_UNKNOWN) { utf8 = enca_name_to_charset("utf-8"); assert(utf8 != ENCA_CS_UNKNOWN); } /* Check BOM */ bom_bonus = (size_t)(sqrt((double)size) + size/10.0); if (size >= 3 && buffer[0] == 0xef && buffer[1] == 0xbb && buffer[2] == 0xbf) { utf8count += bom_bonus; buffer += 3; size -= 3; } /* Parse. */ for (i = 0; i < size; i++) { b = buffer[i]; if (!remains_10xxxxxx) { if ((b & 0x80) == 0) /* 7bit characters */ continue; if ((b & 0xe0) == 0xc0) { /* 110xxxxx 10xxxxxx sequence */ remains_10xxxxxx = 1; utf8count++; continue; } if ((b & 0xf0) == 0xe0) { /* 1110xxxx 2 x 10xxxxxx sequence */ remains_10xxxxxx = 2; utf8count++; continue; } /* Following are valid 32-bit UCS characters, but not 16-bit Unicode, they are very rare, nevertheless we accept them. */ if ((b & 0xf8) == 0xf0) { /* 1110xxxx 3 x 10xxxxxx sequence */ remains_10xxxxxx = 3; utf8count++; continue; } if ((b & 0xfc) == 0xf8) { /* 1110xxxx 4 x 10xxxxxx sequence */ remains_10xxxxxx = 4; utf8count++; continue; } if ((b & 0xfe) == 0xfc) { /* 1110xxxx 5 x 10xxxxxx sequence */ remains_10xxxxxx = 5; utf8count++; continue; } /* We can get here only when input is invalid: (b & 0xc0) == 0x80. */ failures++; remains_10xxxxxx = 0; } else { /* Broken 10xxxxxx sequence? */ if ((b & 0xc0) != 0x80) { failures++; utf8count--; remains_10xxxxxx = 0; } else remains_10xxxxxx--; } } /* Unfinished 10xxxxxx sequence. */ if (remains_10xxxxxx != 0 && analyser->options.termination_strictness > 0) failures += 2; /* Tolerate a small number of failures. */ if (failures > exp(-7*(analyser->options.threshold - 1.0))*utf8count/2.0) return 0; analyser->result.charset = utf8; analyser->result.surface |= enca_eol_surface(buffer, size, counts); if (failures > 0) analyser->result.surface |= ENCA_SURFACE_EOL_BIN; return 1; } /** * looks_like_hz: * @analyser: An analyser. * * Checks whether @analyser buffer is HZ-encoded. See RFC 1843 * * Directly modifies @analyser->result on success. * * Returns: Nonzero when @analyser->result was set, zero othewrise. **/ static int looks_like_hz(EncaAnalyserState *analyser) { unsigned char *buffer = analyser->buffer; size_t size = analyser->size; static int hz = ENCA_CS_UNKNOWN; /* HZ charset */ size_t hzcount = 0; /* number of qp encoded characters */ unsigned char *p = buffer; const size_t *const counts = analyser->counts; int escaped; /* true when we're in 8-bit mode */ unsigned int i; /* Initialize when we are called the first time. */ if (hz == ENCA_CS_UNKNOWN) { hz = enca_name_to_charset("hz"); assert(hz != ENCA_CS_UNKNOWN); } for (i = 0; i < analyser->ncharsets; i++) if (analyser->charsets[i] == hz) goto goahead; return 0; goahead: /* When the file doesn't contain escape characters, don't waste time scanning it. */ if (counts['{'] == 0 || counts['}'] == 0 || counts['~'] == 0) return 0; /* Move to first escaped-in */ /* FIXME: Things will be simpler if we have strnstr()? */ while ((size_t)(p - buffer) + 2 < size) { p = memchr(p, '~', size - (p - buffer)); if (p == NULL) return 0; if (p[1] == '{') { escaped = 1; p += 2; break; } else if (p[1] == '\n') { p += 2; } else if (p[1] == '~') { p += 2; } else p += 2; } /* Check if it's valid HZ and count hz encoded characters. */ while (p < buffer + size) { if (*p == '~' && p < buffer + size - 1) { switch (p[1]) { case '~': if (escaped) { p++; hzcount++; } else { p += 2; } break; case '{': if (!escaped) { p += 2; escaped = 1; } else { return 0; } break; case '}': if (escaped) { escaped = 0; p += 2; } else { return 0; } break; case '\n': if (escaped) { return 0; } p += 2; break; default: if (!escaped) { return 0; } p++; } } else { /* Spaces, CR or LF not allowed in escaped block */ if (escaped) { if (*p < ' ') { return 0; } hzcount++; } p++; } } if (hzcount < analyser->options.min_chars) return 0; /* Unfinished escaped block here. */ if (escaped && analyser->options.termination_strictness > 0) return 0; analyser->result.charset = hz; analyser->result.surface |= enca_eol_surface(buffer, size, counts); return 1; } Project-OSS-Revival-enca-36defd7/lib/pair.c000066400000000000000000000146211507545312400204570ustar00rootroot00000000000000/* pair-frequency based tests (used for 8bit-dense languages) Copyright (C) 2003 David Necas (Yeti) This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include "enca.h" #include "internal.h" /* Local prototypes. */ static size_t count_all_8bit_pairs(EncaAnalyserState *analyser); static void compute_pair2bits(EncaAnalyserState *analyser); static void count_good_pairs(EncaAnalyserState *analyser); /** * enca_pair_init: * @analyser: Analyzer state to be initialized. * * Initializes pair statistics data. * * In fact it just sets everything to #NULL, to be initialized when needed. **/ void enca_pair_init(EncaAnalyserState *analyser) { analyser->bitcounts = NULL; analyser->pairratings = NULL; analyser->pair2bits = NULL; } /** * enca_pair_destroy: * @analyser: Analyzer state whose pair statistics part should be destroyed. * * Destroys the pair statistics part of analyser state @analyser. **/ void enca_pair_destroy(EncaAnalyserState *analyser) { enca_free(analyser->pair2bits); enca_free(analyser->bitcounts); enca_free(analyser->pairratings); } /** * enca_pair_analyse: * @analyser: Analysed containing the sample for pair frequency analysis. * * Performs pair-frequency based analysis, provided that the language supports * it (does nothing otherwise). * * Returns: Nonzero when the character set was succesfully determined, * @analyser->@result.@charset is then directly modified. **/ int enca_pair_analyse(EncaAnalyserState *analyser) { const unsigned char *const *letters = analyser->lang->letters; const unsigned char **const *pairs = analyser->lang->pairs; size_t ncharsets = analyser->ncharsets; size_t i, best, all8bitpairs; double q; if (!letters || !pairs) return 0; if (!analyser->pairratings) analyser->pairratings = NEW(size_t, ncharsets); /* count the good pairs and find winner * initialize when we are called the first time */ if (!analyser->pair2bits) { compute_pair2bits(analyser); analyser->bitcounts = NEW(size_t, 1 << ncharsets); } memset(analyser->pairratings, 0, ncharsets*sizeof(size_t)); all8bitpairs = count_all_8bit_pairs(analyser); count_good_pairs(analyser); best = 0; for (i = 1; i < ncharsets; i++) { if (analyser->pairratings[i] > analyser->pairratings[best]) best = i; } /* Just a Right Value */ q = 1.0 - exp(3.0*(1.0 - analyser->options.threshold)); if (analyser->pairratings[best] >= analyser->options.min_chars && analyser->pairratings[best] >= q*all8bitpairs) { analyser->result.charset = analyser->charsets[best]; return 1; } /* I don't like saying it, but the sample seems to be garbage... */ return 0; } /** * count_all_8bit_pairs: * @analyser: An analyser. * * Count all pairs containing at least one 8bit characters. * * Returns: The number of such pairs. **/ static size_t count_all_8bit_pairs(EncaAnalyserState *analyser) { unsigned char *buffer = analyser->buffer; size_t size = analyser->size; size_t i, c, sum8bits; sum8bits = 0; c = FILL_NONLETTER; for (i = size; i; i--) { if ((c | *buffer) & 0x80) sum8bits++; c = *(buffer++); } if (size && (c & 0x80)) sum8bits++; return sum8bits; } /** * count_good_pairs: * @analyser: An analyser. * * Count `good' pairs for each charset. * * Makes use of @analyser->pair2bits. See compute_pair2bits() comment for * description of how it works. **/ static void count_good_pairs(EncaAnalyserState *analyser) { size_t *ratings = analyser->pairratings; unsigned char *pair2bits = analyser->pair2bits; size_t *bitcounts = analyser->bitcounts; size_t ncharsets = analyser->ncharsets; const unsigned char *buffer = analyser->buffer; size_t size = analyser->size; size_t i, j, c, cs; assert(ncharsets <= 8); assert(pair2bits); assert(bitcounts); assert(ratings); memset(bitcounts, 0, (1 << ncharsets)*sizeof(size_t)); c = FILL_NONLETTER << 8; for (i = size; i; i--) { bitcounts[pair2bits[c | *buffer]]++; c = *(buffer++) << 8; } if (size) bitcounts[pair2bits[c | FILL_NONLETTER]]++; memset(ratings, 0, ncharsets*sizeof(size_t)); for (cs = 0; cs < ncharsets; cs++) { size_t bit = 1 << cs; size_t rating = 0; for (i = 0; i < (1U << ncharsets); i += 2*bit) { for (j = i+bit; j < i+2*bit; j++) rating += bitcounts[j]; } ratings[cs] = rating; } } /** * compute_pair2bits: * @analyser: An analyser. * * Allocate and fill @analyser->@pair2bits. * * The meaning of pair2bits is following: it's indexed by pairs (0x100*first * + second) and each @pair2bits element has set a bit corresponding to a * charset when the pair is `good' for the charset. * * To determine `good' pair counts for all charsets we don't have to count * the pairs, we only have to count the bit combinations (@bitcounts) and the * per charset pair counts can be easily constructed from them -- by summing * those with the particular bit set. **/ static void compute_pair2bits(EncaAnalyserState *analyser) { size_t ncharsets = analyser->ncharsets; size_t cs, c; assert(analyser->pair2bits == NULL); assert(analyser->ncharsets <= 8); analyser->pair2bits = NEW(unsigned char, 0x10000); memset(analyser->pair2bits, 0, 0x10000); for (cs = 0; cs < ncharsets; cs++) { const unsigned char *letters = analyser->lang->letters[cs]; const unsigned char *const *pairs = analyser->lang->pairs[cs]; size_t bit = 1 << cs; for (c = 0; c < 0x100; c++) { size_t j = letters[c]; if (j != 255) { const unsigned char *s = pairs[j]; unsigned char *p = analyser->pair2bits + (c << 8); /* set the corresponding bit for all pairs */ do { p[(size_t)*(s++)] |= bit; } while (*s); } } } } Project-OSS-Revival-enca-36defd7/lib/unicodemap.c000066400000000000000000001031731507545312400216510ustar00rootroot00000000000000/* unicode (i.e. ucs-2) data and conversion table managment Copyright (C) 2000-2003 David Necas (Yeti) Unicode data in this module come from various free on-line resources. This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include "enca.h" #include "internal.h" /** * NO_CHR: * * Alias for ENCA_NOT_A_CHAR, which lines up with 0xabcd. **/ #define NO_CHR ENCA_NOT_A_CHAR /** * EncaUnicodeMap: * @name: Charset name (any, Enca's is best). * @tstart: Table start, character codes less than tstart maps to themselves. * @map: The map itself. * * 8bit charset -> Unicode mapping. **/ struct _EncaUnicodeMap { const char *name; size_t tstart; const unsigned short int *map; }; typedef struct _EncaUnicodeMap EncaUnicodeMap; /* Local prototypes. */ static const EncaUnicodeMap* find_charset_map(int charset); /* ISO-8859-2 */ static const unsigned short int unicode_map_iso88592[] = { 0x00a0, 0x0104, 0x02d8, 0x0141, 0x00a4, 0x013d, 0x015a, 0x00a7, /* 0xa0 */ 0x00a8, 0x0160, 0x015e, 0x0164, 0x0179, 0x00ad, 0x017d, 0x017b, /* 0xa8 */ 0x00b0, 0x0105, 0x02db, 0x0142, 0x00b4, 0x013e, 0x015b, 0x02c7, /* 0xb0 */ 0x00b8, 0x0161, 0x015f, 0x0165, 0x017a, 0x02dd, 0x017e, 0x017c, /* 0xb8 */ 0x0154, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0139, 0x0106, 0x00c7, /* 0xc0 */ 0x010c, 0x00c9, 0x0118, 0x00cb, 0x011a, 0x00cd, 0x00ce, 0x010e, /* 0xc8 */ 0x0110, 0x0143, 0x0147, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x00d7, /* 0xd0 */ 0x0158, 0x016e, 0x00da, 0x0170, 0x00dc, 0x00dd, 0x0162, 0x00df, /* 0xd8 */ 0x0155, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x013a, 0x0107, 0x00e7, /* 0xe0 */ 0x010d, 0x00e9, 0x0119, 0x00eb, 0x011b, 0x00ed, 0x00ee, 0x010f, /* 0xe8 */ 0x0111, 0x0144, 0x0148, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x00f7, /* 0xf0 */ 0x0159, 0x016f, 0x00fa, 0x0171, 0x00fc, 0x00fd, 0x0163, 0x02d9 /* 0xf8 */ }; /* ISO-8859-4 */ static const unsigned short int unicode_map_iso88594[] = { 0x00a0, 0x0104, 0x0138, 0x0156, 0x00a4, 0x0128, 0x013b, 0x00a7, /* 0xa0 */ 0x00a8, 0x0160, 0x0112, 0x0122, 0x0166, 0x00ad, 0x017d, 0x00af, /* 0xa8 */ 0x00b0, 0x0105, 0x02db, 0x0157, 0x00b4, 0x0129, 0x013c, 0x02c7, /* 0xb0 */ 0x00b8, 0x0161, 0x0113, 0x0123, 0x0167, 0x014a, 0x017e, 0x014b, /* 0xb8 */ 0x0100, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x012e, /* 0xc0 */ 0x010c, 0x00c9, 0x0118, 0x00cb, 0x0116, 0x00cd, 0x00ce, 0x012a, /* 0xc8 */ 0x0110, 0x0145, 0x014c, 0x0136, 0x00d4, 0x00d5, 0x00d6, 0x00d7, /* 0xd0 */ 0x00d8, 0x0172, 0x00da, 0x00db, 0x00dc, 0x0168, 0x016a, 0x00df, /* 0xd8 */ 0x0101, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x012f, /* 0xe0 */ 0x010d, 0x00e9, 0x0119, 0x00eb, 0x0117, 0x00ed, 0x00ee, 0x012b, /* 0xe8 */ 0x0111, 0x0146, 0x014d, 0x0137, 0x00f4, 0x00f5, 0x00f6, 0x00f7, /* 0xf0 */ 0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x0169, 0x016b, 0x02d9, /* 0xf8 */ }; /* ISO-8859-5 */ static const unsigned short int unicode_map_iso88595[] = { 0x00a0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, /* 0xa0 */ 0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x00ad, 0x040e, 0x040f, /* 0xa8 */ 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, /* 0xb0 */ 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, /* 0xb8 */ 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, /* 0xc0 */ 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, /* 0xc8 */ 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, /* 0xd0 */ 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, /* 0xd8 */ 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, /* 0xe0 */ 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f, /* 0xe8 */ 0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457, /* 0xf0 */ 0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x00a7, 0x045e, 0x045f, /* 0xf8 */ }; /* ISO-8859-13 */ static const unsigned short int unicode_map_iso885913[] = { 0x00a0, 0x201d, 0x00a2, 0x00a3, 0x00a4, 0x201e, 0x00a6, 0x00a7, /* 0xa0 */ 0x00d8, 0x00a9, 0x0156, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00c6, /* 0xa8 */ 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x201c, 0x00b5, 0x00b6, 0x00b7, /* 0xb0 */ 0x00f8, 0x00b9, 0x0157, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00e6, /* 0xb8 */ 0x0104, 0x012e, 0x0100, 0x0106, 0x00c4, 0x00c5, 0x0118, 0x0112, /* 0xc0 */ 0x010c, 0x00c9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012a, 0x013b, /* 0xc8 */ 0x0160, 0x0143, 0x0145, 0x00d3, 0x014c, 0x00d5, 0x00d6, 0x00d7, /* 0xd0 */ 0x0172, 0x0141, 0x015a, 0x016a, 0x00dc, 0x017b, 0x017d, 0x00df, /* 0xd8 */ 0x0105, 0x012f, 0x0101, 0x0107, 0x00e4, 0x00e5, 0x0119, 0x0113, /* 0xe0 */ 0x010d, 0x00e9, 0x017a, 0x0117, 0x0123, 0x0137, 0x012b, 0x013c, /* 0xe8 */ 0x0161, 0x0144, 0x0146, 0x00f3, 0x014d, 0x00f5, 0x00f6, 0x00f7, /* 0xf0 */ 0x0173, 0x0142, 0x015b, 0x016b, 0x00fc, 0x017c, 0x017e, 0x2019, /* 0xf8 */ }; /* ISO-8859-16 */ static const unsigned short int unicode_map_iso885916[] = { 0x00a0, 0x0104, 0x0105, 0x0141, 0x20ac, 0x00ab, 0x0160, 0x00a7, /* 0xa0 */ 0x0161, 0x00a9, 0x0218, 0x201e, 0x0179, 0x00ad, 0x017a, 0x017b, /* 0xa8 */ 0x00b0, 0x00b1, 0x010c, 0x0142, 0x017d, 0x201d, 0x00b6, 0x00b7, /* 0xb0 */ 0x017e, 0x010d, 0x0219, 0x00bb, 0x0152, 0x0153, 0x0178, 0x017c, /* 0xb8 */ 0x00c0, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0106, 0x00c6, 0x00c7, /* 0xc0 */ 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, /* 0xc8 */ 0x0110, 0x0143, 0x00d2, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x015a, /* 0xd0 */ 0x0170, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x0118, 0x021a, 0x00df, /* 0xd8 */ 0x00e0, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x0107, 0x00e6, 0x00e7, /* 0xe0 */ 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, /* 0xe8 */ 0x0111, 0x0144, 0x00f2, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x015b, /* 0xf0 */ 0x0171, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0119, 0x021b, 0x00ff, /* 0xf8 */ }; /* Windows 1125 */ static const unsigned short int unicode_map_cp1125[] = { 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, /* 0x80 */ 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, /* 0x88 */ 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, /* 0x90 */ 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, /* 0x98 */ 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, /* 0xa0 */ 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, /* 0xa8 */ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, /* 0xb0 */ 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, /* 0xb8 */ 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, /* 0xc0 */ 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, /* 0xc8 */ 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, /* 0xd0 */ 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, /* 0xd8 */ 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, /* 0xe0 */ 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f, /* 0xe8 */ 0x0401, 0x0451, 0x0490, 0x0491, 0x0404, 0x0454, 0x0406, 0x0456, /* 0xf0 */ 0x0407, 0x0457, 0x00b7, 0x221a, 0x2116, 0x00a4, 0x25a0, 0x00a0, /* 0xf8 */ }; /* Windows 1250 */ static const unsigned short int unicode_map_cp1250[] = { NO_CHR, NO_CHR, 0x201a, NO_CHR, 0x201e, 0x2026, 0x2020, 0x2021, /* 0x80 */ NO_CHR, 0x2030, 0x0160, 0x2039, 0x015a, 0x0164, 0x017d, 0x0179, /* 0x88 */ NO_CHR, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, /* 0x90 */ NO_CHR, 0x2122, 0x0161, 0x203a, 0x015b, 0x0165, 0x017e, 0x017a, /* 0x98 */ 0x00a0, 0x02c7, 0x02d8, 0x0141, 0x00a4, 0x0104, 0x00a6, 0x00a7, /* 0xa0 */ 0x00a8, 0x00a9, 0x015e, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x017b, /* 0xa8 */ 0x00b0, 0x00b1, 0x02db, 0x0142, 0x00b4, 0x00b5, 0x00b6, 0x00b7, /* 0xb0 */ 0x00b8, 0x0105, 0x015f, 0x00bb, 0x013d, 0x02dd, 0x013e, 0x017c, /* 0xb8 */ 0x0154, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0139, 0x0106, 0x00c7, /* 0xc0 */ 0x010c, 0x00c9, 0x0118, 0x00cb, 0x011a, 0x00cd, 0x00ce, 0x010e, /* 0xc8 */ 0x0110, 0x0143, 0x0147, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x00d7, /* 0xd0 */ 0x0158, 0x016e, 0x00da, 0x0170, 0x00dc, 0x00dd, 0x0162, 0x00df, /* 0xd8 */ 0x0155, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x013a, 0x0107, 0x00e7, /* 0xe0 */ 0x010d, 0x00e9, 0x0119, 0x00eb, 0x011b, 0x00ed, 0x00ee, 0x010f, /* 0xe8 */ 0x0111, 0x0144, 0x0148, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x00f7, /* 0xf0 */ 0x0159, 0x016f, 0x00fa, 0x0171, 0x00fc, 0x00fd, 0x0163, 0x02d9, /* 0xf8 */ }; /* Windows 1251 */ static const unsigned short int unicode_map_cp1251[] = { 0x0402, 0x0403, 0x201a, 0x0453, 0x201e, 0x2026, 0x2020, 0x2021, /* 0x80 */ 0x20ac, 0x2030, 0x0409, 0x2039, 0x040a, 0x040c, 0x040b, 0x040f, /* 0x88 */ 0x0452, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, /* 0x90 */ NO_CHR, 0x2122, 0x0459, 0x203a, 0x045a, 0x045c, 0x045b, 0x045f, /* 0x98 */ 0x00a0, 0x040e, 0x045e, 0x0408, 0x00a4, 0x0490, 0x00a6, 0x00a7, /* 0xa0 */ 0x0401, 0x00a9, 0x0404, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x0407, /* 0xa8 */ 0x00b0, 0x00b1, 0x0406, 0x0456, 0x0491, 0x00b5, 0x00b6, 0x00b7, /* 0xb0 */ 0x0451, 0x2116, 0x0454, 0x00bb, 0x0458, 0x0405, 0x0455, 0x0457, /* 0xb8 */ 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, /* 0xc0 */ 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, /* 0xc8 */ 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, /* 0xd0 */ 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, /* 0xd8 */ 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, /* 0xe0 */ 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, /* 0xe8 */ 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, /* 0xf0 */ 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f, /* 0xf8 */ }; /* Windows 1257 */ static const unsigned short int unicode_map_cp1257[] = { 0x20ac, NO_CHR, 0x201a, NO_CHR, 0x201e, 0x2026, 0x2020, 0x2021, /* 0x80 */ NO_CHR, 0x2030, NO_CHR, 0x2039, NO_CHR, NO_CHR, NO_CHR, NO_CHR, /* 0x88 */ NO_CHR, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, /* 0x90 */ NO_CHR, 0x2122, NO_CHR, 0x203a, NO_CHR, NO_CHR, NO_CHR, NO_CHR, /* 0x98 */ 0x00a0, NO_CHR, 0x00a2, 0x00a3, 0x00a4, NO_CHR, 0x00a6, 0x00a7, /* 0xa0 */ 0x00d8, 0x00a9, 0x0156, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00c6, /* 0xa8 */ 0x00b0, 0x00b1, 0x00b2, 0x00b3, NO_CHR, 0x00b5, 0x00b6, 0x00b7, /* 0xb0 */ 0x00f8, 0x00b9, 0x0157, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00e6, /* 0xb8 */ 0x0104, 0x012e, 0x0100, 0x0106, 0x00c4, 0x00c5, 0x0118, 0x0112, /* 0xc0 */ 0x010c, 0x00c9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012a, 0x013b, /* 0xc8 */ 0x0160, 0x0143, 0x0145, 0x00d3, 0x014c, 0x00d5, 0x00d6, 0x00d7, /* 0xd0 */ 0x0172, 0x0141, 0x015a, 0x016a, 0x00dc, 0x017b, 0x017d, 0x00df, /* 0xd8 */ 0x0105, 0x012f, 0x0101, 0x0107, 0x00e4, 0x00e5, 0x0119, 0x0113, /* 0xe0 */ 0x010d, 0x00e9, 0x017a, 0x0117, 0x0123, 0x0137, 0x012b, 0x013c, /* 0xe8 */ 0x0161, 0x0144, 0x0146, 0x00f3, 0x014d, 0x00f5, 0x00f6, 0x00f7, /* 0xf0 */ 0x0173, 0x0142, 0x015b, 0x016b, 0x00fc, 0x017c, 0x017e, NO_CHR, /* 0xf8 */ }; /* IBM 852 */ static const unsigned short int unicode_map_ibm852[] = { 0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e4, 0x016f, 0x0107, 0x00e7, /* 0x80 */ 0x0142, 0x00eb, 0x0150, 0x0151, 0x00ee, 0x0179, 0x00c4, 0x0106, /* 0x88 */ 0x00c9, 0x0139, 0x013a, 0x00f4, 0x00f6, 0x013d, 0x013e, 0x015a, /* 0x90 */ 0x015b, 0x00d6, 0x00dc, 0x0164, 0x0165, 0x0141, 0x00d7, 0x010d, /* 0x98 */ 0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x0104, 0x0105, 0x017d, 0x017e, /* 0xa0 */ 0x0118, 0x0119, 0x00ac, 0x017a, 0x010c, 0x015f, 0x00ab, 0x00bb, /* 0xa8 */ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00c1, 0x00c2, 0x011a, /* 0xb0 */ 0x015e, 0x2563, 0x2551, 0x2557, 0x255d, 0x017b, 0x017c, 0x2510, /* 0xb8 */ 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x0102, 0x0103, /* 0xc0 */ 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x00a4, /* 0xc8 */ 0x0111, 0x0110, 0x010e, 0x00cb, 0x010f, 0x0147, 0x00cd, 0x00ce, /* 0xd0 */ 0x011b, 0x2518, 0x250c, 0x2588, 0x2584, 0x0162, 0x016e, 0x2580, /* 0xd8 */ 0x00d3, 0x00df, 0x00d4, 0x0143, 0x0144, 0x0148, 0x0160, 0x0161, /* 0xe0 */ 0x0154, 0x00da, 0x0155, 0x0170, 0x00fd, 0x00dd, 0x0163, 0x00b4, /* 0xe8 */ 0x00ad, 0x02dd, 0x02db, 0x02c7, 0x02d8, 0x00a7, 0x00f7, 0x00b8, /* 0xf0 */ 0x00b0, 0x00a8, 0x02d9, 0x0171, 0x0158, 0x0159, 0x25a0, 0x00a0, /* 0xf8 */ }; /* IBM 855 */ static const unsigned short int unicode_map_ibm855[] = { 0x0452, 0x0402, 0x0453, 0x0403, 0x0451, 0x0401, 0x0454, 0x0404, /* 0x80 */ 0x0455, 0x0405, 0x0456, 0x0406, 0x0457, 0x0407, 0x0458, 0x0408, /* 0x88 */ 0x0459, 0x0409, 0x045a, 0x040a, 0x045b, 0x0093, 0x045c, 0x040c, /* 0x90 */ 0x045e, 0x040e, 0x045f, 0x040f, 0x044e, 0x042e, 0x044a, 0x042a, /* 0x98 */ 0x0430, 0x0410, 0x0431, 0x0411, 0x0446, 0x0426, 0x0434, 0x0414, /* 0xa0 */ 0x0435, 0x0415, 0x0444, 0x0424, 0x0433, 0x0413, 0x00ab, 0x00bb, /* 0xa8 */ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x0445, 0x0425, 0x0438, /* 0xb0 */ 0x0418, 0x2563, 0x2551, 0x2557, 0x255d, 0x0439, 0x0419, 0x2510, /* 0xb8 */ 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x043a, 0x041a, /* 0xc0 */ 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x00a4, /* 0xc8 */ 0x043b, 0x041b, 0x043c, 0x041c, 0x043d, 0x041d, 0x043e, 0x041e, /* 0xd0 */ 0x043f, 0x2518, 0x250c, 0x2588, 0x2584, 0x041f, 0x044f, 0x2580, /* 0xd8 */ 0x042f, 0x0440, 0x0420, 0x0441, 0x0421, 0x0442, 0x0422, 0x0443, /* 0xe0 */ 0x0423, 0x0436, 0x0416, 0x0432, 0x0412, 0x044c, 0x042c, 0x00b4, /* 0xe8 */ 0x00ad, 0x044b, 0x042b, 0x0437, 0x0417, 0x0448, 0x0428, 0x044d, /* 0xf0 */ 0x042d, 0x0449, 0x0429, 0x0447, 0x0427, NO_CHR, 0x25a0, 0x00a0, /* 0xf8 */ }; /* IBM 775 */ static const unsigned short int unicode_map_ibm775[] = { 0x0106, 0x00fc, 0x00e9, 0x0101, 0x00e4, 0x0123, 0x00e5, 0x0107, /* 0x80 */ 0x0142, 0x0113, 0x0156, 0x0157, 0x012b, 0x0179, 0x00c4, 0x00c5, /* 0x88 */ 0x00c9, 0x00e6, 0x00c6, 0x014d, 0x00f6, 0x0122, 0x00a2, 0x015a, /* 0x90 */ 0x015b, 0x00d6, 0x00dc, 0x00f8, 0x00a3, 0x00d8, 0x00d7, 0x00a4, /* 0x98 */ 0x0100, 0x012a, 0x00f3, 0x017b, 0x017c, 0x017a, 0x201d, 0x00a6, /* 0xa0 */ 0x00a9, 0x00ae, 0x00ac, 0x00bd, 0x00bc, 0x0141, 0x00ab, 0x00bb, /* 0xa8 */ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x0104, 0x010c, 0x0118, /* 0xb0 */ 0x0116, 0x2563, 0x2551, 0x2557, 0x255d, 0x012e, 0x0160, 0x2510, /* 0xb8 */ 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x0172, 0x016a, /* 0xc0 */ 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x017d, /* 0xc8 */ 0x0105, 0x010d, 0x0119, 0x0117, 0x012f, 0x0161, 0x0173, 0x016b, /* 0xd0 */ 0x017e, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, /* 0xd8 */ 0x00d3, 0x00df, 0x014c, 0x0143, 0x00f5, 0x00d5, 0x00b5, 0x0144, /* 0xe0 */ 0x0136, 0x0137, 0x013b, 0x013c, 0x0146, 0x0112, 0x0145, 0x2019, /* 0xe8 */ 0x00ad, 0x00b1, 0x201c, 0x00be, 0x00b6, 0x00a7, 0x00f7, 0x201e, /* 0xf0 */ 0x00b0, 0x2219, 0x00b7, 0x00b9, 0x00b3, 0x00b2, 0x25a0, 0x00a0, /* 0xf8 */ }; /* IBM 866 */ static const unsigned short int unicode_map_ibm866[] = { 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, /* 0x80 */ 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, /* 0x88 */ 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, /* 0x90 */ 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, /* 0x98 */ 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, /* 0xa0 */ 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, /* 0xa8 */ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, /* 0xb0 */ 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, /* 0xb8 */ 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, /* 0xc0 */ 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, /* 0xc8 */ 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, /* 0xd0 */ 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, /* 0xd8 */ 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, /* 0xe0 */ 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f, /* 0xe8 */ 0x0401, 0x0451, 0x0404, 0x0454, 0x0407, 0x0457, 0x040e, 0x045e, /* 0xf0 */ 0x00b0, 0x2219, 0x00b7, 0x221a, 0x2116, 0x00a4, 0x25a0, 0x00a0, /* 0xf8 */ }; /* Baltic */ static const unsigned short int unicode_map_baltic[] = { 0x00a0, 0x201d, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, /* 0xa0 */ 0x00d8, 0x00a9, 0x201e, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00c6, /* 0xa8 */ 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, /* 0xb0 */ 0x00f8, 0x00b9, 0x201c, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00e6, /* 0xb8 */ 0x012e, 0x0116, 0x0100, 0x0106, 0x00c4, 0x00c5, 0x0104, 0x010c, /* 0xc0 */ 0x0122, 0x00c9, 0x017d, 0x0118, 0x0112, 0x0136, 0x012a, 0x013b, /* 0xc8 */ 0x0141, 0x0145, 0x0143, 0x00d3, 0x014c, 0x00d5, 0x00d6, 0x00d7, /* 0xd0 */ 0x0172, 0x0160, 0x015a, 0x016a, 0x00dc, 0x017b, 0x0179, 0x00df, /* 0xd8 */ 0x012f, 0x0117, 0x0101, 0x0107, 0x00e4, 0x00e5, 0x0105, 0x010d, /* 0xe0 */ 0x0123, 0x00e9, 0x017e, 0x0119, 0x0113, 0x0137, 0x012b, 0x013c, /* 0xe8 */ 0x0142, 0x0146, 0x0144, 0x00f3, 0x014d, 0x00f5, 0x00f6, 0x00f7, /* 0xf0 */ 0x0173, 0x0161, 0x015b, 0x016b, 0x00fc, 0x017c, 0x017a, 0x0138, /* 0xf8 */ }; /* Kamenicky */ static const unsigned short int unicode_map_keybcs2[] = { 0x010c, 0x00fc, 0x00e9, 0x010f, 0x00e4, 0x010e, 0x0164, 0x010d, /* 0x80 */ 0x011b, 0x011a, 0x0139, 0x00cd, 0x013e, 0x013a, 0x00c4, 0x00c1, /* 0x88 */ 0x00c9, 0x017e, 0x017d, 0x00f4, 0x00f6, 0x00d3, 0x016f, 0x00da, /* 0x90 */ 0x00fd, 0x00d6, 0x00dc, 0x0160, 0x013d, 0x00dd, 0x0158, 0x0165, /* 0x98 */ 0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x0148, 0x0147, 0x016e, 0x00d4, /* 0xa0 */ 0x0161, 0x0159, 0x0155, 0x0154, 0x00bc, 0x00a7, 0x00ab, 0x00bb, /* 0xa8 */ 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, /* 0xb0 */ 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, /* 0xb8 */ 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, /* 0xc0 */ 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, /* 0xc8 */ 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, /* 0xd0 */ 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, /* 0xd8 */ 0x03b1, 0x03b2, 0x0393, 0x03c0, 0x03a3, 0x03c3, 0x03bc, 0x03c4, /* 0xe0 */ 0x03a6, 0x0398, 0x03a9, 0x03b4, 0x221e, 0x2205, 0x03b5, 0x2229, /* 0xe8 */ 0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248, /* 0xf0 */ 0x00b0, 0x00b7, 0x02d9, 0x221a, 0x207f, 0x00b2, 0x25a0, 0x00a0, /* 0xf8 */ }; /* Macintosh CE */ static const unsigned short int unicode_map_macce[] = { 0x00c4, 0x0100, 0x0101, 0x00c9, 0x0104, 0x00d6, 0x00dc, 0x00e1, /* 0x80 */ 0x0105, 0x010c, 0x00e4, 0x010d, 0x0106, 0x0107, 0x00e9, 0x0179, /* 0x88 */ 0x017a, 0x010e, 0x00ed, 0x010f, 0x0112, 0x0113, 0x0116, 0x00f3, /* 0x90 */ 0x0117, 0x00f4, 0x00f6, 0x00f5, 0x00fa, 0x011a, 0x011b, 0x00fc, /* 0x98 */ 0x2020, 0x00b0, 0x0118, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x00df, /* 0xa0 */ 0x00ae, 0x00a9, 0x2122, 0x0119, 0x00a8, 0x2260, 0x0123, 0x012e, /* 0xa8 */ 0x012f, 0x012a, 0x2264, 0x2265, 0x012b, 0x0136, 0x2202, 0x2211, /* 0xb0 */ 0x0142, 0x013b, 0x013c, 0x013d, 0x013e, 0x0139, 0x013a, 0x0145, /* 0xb8 */ 0x0146, 0x0143, 0x00ac, 0x221a, 0x0144, 0x0147, 0x2206, 0x00ab, /* 0xc0 */ 0x00bb, 0x2026, 0x00a0, 0x0148, 0x0150, 0x00d5, 0x0151, 0x014c, /* 0xc8 */ 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x25ca, /* 0xd0 */ 0x014d, 0x0154, 0x0155, 0x0158, 0x2039, 0x203a, 0x0159, 0x0156, /* 0xd8 */ 0x0157, 0x0160, 0x201a, 0x201e, 0x0161, 0x015a, 0x015b, 0x00c1, /* 0xe0 */ 0x0164, 0x0165, 0x00cd, 0x017d, 0x017e, 0x016a, 0x00d3, 0x00d4, /* 0xe8 */ 0x016b, 0x016e, 0x00da, 0x016f, 0x0170, 0x0171, 0x0172, 0x0173, /* 0xf0 */ 0x00dd, 0x00fd, 0x0137, 0x017b, 0x0141, 0x017c, 0x0122, 0x02c7, /* 0xf8 */ }; /* Macintosh Cyrillic */ static const unsigned short int unicode_map_maccyr[] = { 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, /* 0x80 */ 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, /* 0x88 */ 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, /* 0x90 */ 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, /* 0x98 */ 0x2020, 0x00b0, 0x0490, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x0406, /* 0xa0 */ 0x00ae, 0x00a9, 0x2122, 0x0402, 0x0452, 0x2260, 0x0403, 0x0453, /* 0xa8 */ 0x221e, 0x00b1, 0x2264, 0x2265, 0x0456, 0x00b5, 0x0491, 0x0408, /* 0xb0 */ 0x0404, 0x0454, 0x0407, 0x0457, 0x0409, 0x0459, 0x040a, 0x045a, /* 0xb8 */ 0x0458, 0x0405, 0x00ac, 0x221a, 0x0192, 0x2248, 0x2206, 0x00ab, /* 0xc0 */ 0x00bb, 0x2026, 0x00a0, 0x040b, 0x045b, 0x040c, 0x045c, 0x0455, /* 0xc8 */ 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x201e, /* 0xd0 */ 0x040e, 0x045e, 0x040f, 0x045f, 0x2116, 0x0401, 0x0451, 0x044f, /* 0xd8 */ 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, /* 0xe0 */ 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, /* 0xe8 */ 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, /* 0xf0 */ 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x20ac, /* 0xf8 */ }; /* ECMA Cyrillic */ static const unsigned short int unicode_map_ecma113[] = { 0x00a0, 0x0452, 0x0453, 0x0451, 0x0454, 0x0455, 0x0456, 0x0457, /* 0xa0 */ 0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x00ad, 0x045e, 0x045f, /* 0xa8 */ 0x2116, 0x0402, 0x0403, 0x0401, 0x0404, 0x0405, 0x0406, 0x0407, /* 0xb0 */ 0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x00a4, 0x040e, 0x040f, /* 0xb8 */ 0x044e, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, /* 0xc0 */ 0x0445, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, /* 0xc8 */ 0x043f, 0x044f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, /* 0xd0 */ 0x044c, 0x044b, 0x0437, 0x0448, 0x044d, 0x0449, 0x0447, 0x044a, /* 0xd8 */ 0x042e, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, /* 0xe0 */ 0x0425, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, /* 0xe8 */ 0x041f, 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, /* 0xf0 */ 0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a, /* 0xf8 */ }; /* KOI8-CS2 */ static const unsigned short int unicode_map_koi8cs2[] = { 0x00a0, NO_CHR, 0x00b4, NO_CHR, 0x007e, NO_CHR, 0x02d8, 0x02d9, /* 0xa0 */ 0x00a8, NO_CHR, 0x02da, 0x00b8, NO_CHR, 0x02dd, 0x02db, 0x02c7, /* 0xa8 */ 0x00a9, 0x00ae, 0x250c, 0x2510, 0x2514, 0x2518, 0x2500, 0x2193, /* 0xb0 */ 0x03a9, 0x00a7, 0x03b1, 0x03b3, 0x03b5, 0x03bc, 0x03c0, 0x03c9, /* 0xb8 */ 0x00e0, 0x00e1, 0x01ce, 0x010d, 0x010f, 0x011b, 0x0155, NO_CHR, /* 0xc0 */ 0x00fc, 0x00ed, 0x016f, 0x013a, 0x013e, 0x00f6, 0x0148, 0x00f3, /* 0xc8 */ 0x00f4, 0x00e4, 0x0159, 0x0161, 0x0165, 0x00fa, 0x00eb, 0x00e9, /* 0xd0 */ 0x0171, 0x00fd, 0x017e, NO_CHR, NO_CHR, 0x0151, 0x0117, 0x00df, /* 0xd8 */ 0x00c0, 0x00c1, 0x01cd, 0x010c, 0x010e, 0x011a, 0x0154, NO_CHR, /* 0xe0 */ 0x00dc, 0x00cd, 0x016e, 0x0139, 0x013d, 0x00d6, 0x0147, 0x00d3, /* 0xe8 */ 0x00d4, 0x00c4, 0x0158, 0x0160, 0x0164, 0x00da, 0x00cb, 0x00c9, /* 0xf0 */ 0x0170, 0x00dd, 0x017d, NO_CHR, NO_CHR, 0x0150, 0x0116, NO_CHR, /* 0xf8 */ }; /* KOI8-R */ static const unsigned short int unicode_map_koi8r[] = { 0x2500, 0x2502, 0x250c, 0x2510, 0x2514, 0x2518, 0x251c, 0x2524, /* 0x80 */ 0x252c, 0x2534, 0x253c, 0x2580, 0x2584, 0x2588, 0x258c, 0x2590, /* 0x88 */ 0x2591, 0x2592, 0x2593, 0x2320, 0x25a0, 0x2022, 0x221a, 0x2248, /* 0x90 */ 0x2264, 0x2265, 0x00a0, 0x2321, 0x00b0, 0x00b2, 0x00b7, 0x00f7, /* 0x98 */ 0x2550, 0x2551, 0x2552, 0x0451, 0x2553, 0x2554, 0x2555, 0x2556, /* 0xa0 */ 0x2557, 0x2558, 0x2559, 0x255a, 0x255b, 0x255c, 0x255d, 0x255e, /* 0xa8 */ 0x255f, 0x2560, 0x2561, 0x0401, 0x2562, 0x2563, 0x2564, 0x2565, /* 0xb0 */ 0x2566, 0x2567, 0x2568, 0x2569, 0x256a, 0x256b, 0x256c, 0x00a9, /* 0xb8 */ 0x044e, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, /* 0xc0 */ 0x0445, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, /* 0xc8 */ 0x043f, 0x044f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, /* 0xd0 */ 0x044c, 0x044b, 0x0437, 0x0448, 0x044d, 0x0449, 0x0447, 0x044a, /* 0xd8 */ 0x042e, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, /* 0xe0 */ 0x0425, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, /* 0xe8 */ 0x041f, 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, /* 0xf0 */ 0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a, /* 0xf8 */ }; /* KOI8-U */ static const unsigned short int unicode_map_koi8u[] = { 0x2500, 0x2502, 0x250c, 0x2510, 0x2514, 0x2518, 0x251c, 0x2524, /* 0x80 */ 0x252c, 0x2534, 0x253c, 0x2580, 0x2584, 0x2588, 0x258c, 0x2590, /* 0x88 */ 0x2591, 0x2592, 0x2593, 0x2320, 0x25a0, 0x2219, 0x221a, 0x2248, /* 0x90 */ 0x2264, 0x2265, 0x00a0, 0x2321, 0x00b0, 0x00b2, 0x00b7, 0x00f7, /* 0x98 */ 0x2550, 0x2551, 0x2552, 0x0451, 0x0454, 0x2554, 0x0456, 0x0457, /* 0xa0 */ 0x2557, 0x2558, 0x2559, 0x255a, 0x255b, 0x0491, 0x255d, 0x255e, /* 0xa8 */ 0x255f, 0x2560, 0x2561, 0x0401, 0x0404, 0x2563, 0x0406, 0x0407, /* 0xb0 */ 0x2566, 0x2567, 0x2568, 0x2569, 0x256a, 0x0490, 0x256c, 0x00a9, /* 0xb8 */ 0x044e, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, /* 0xc0 */ 0x0445, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, /* 0xc8 */ 0x043f, 0x044f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, /* 0xd0 */ 0x044c, 0x044b, 0x0437, 0x0448, 0x044d, 0x0449, 0x0447, 0x044a, /* 0xd8 */ 0x042e, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, /* 0xe0 */ 0x0425, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, /* 0xe8 */ 0x041f, 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, /* 0xf0 */ 0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a, /* 0xf8 */ }; /* KOI8-UNI */ static const unsigned short int unicode_map_koi8uni[] = { 0x2500, 0x2502, 0x250c, 0x2510, 0x2514, 0x2518, 0x251c, 0x2524, /* 0x80 */ 0x252c, 0x2534, 0x253c, 0x2580, 0x2584, 0x2588, 0x258c, 0x2590, /* 0x88 */ 0x2591, 0x2018, 0x2019, 0x201c, 0x201d, 0x2219, 0x2013, 0x2014, /* 0x90 */ 0x00a9, 0x2122, 0x00a0, 0x00bb, 0x00ae, 0x00ab, 0x00b7, 0x00a4, /* 0x98 */ 0x00a0, 0x0452, 0x0453, 0x0451, 0x0454, 0x0455, 0x0456, 0x0457, /* 0xa0 */ 0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x0491, 0x045e, 0x045f, /* 0xa8 */ 0x2116, 0x0402, 0x0403, 0x0401, 0x0404, 0x0405, 0x0406, 0x0407, /* 0xb0 */ 0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x0490, 0x040e, 0x040f, /* 0xb8 */ 0x044e, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, /* 0xc0 */ 0x0445, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, /* 0xc8 */ 0x043f, 0x044f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, /* 0xd0 */ 0x044c, 0x044b, 0x0437, 0x0448, 0x044d, 0x0449, 0x0447, 0x044a, /* 0xd8 */ 0x042e, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, /* 0xe0 */ 0x0425, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, /* 0xe8 */ 0x041f, 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, /* 0xf0 */ 0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a, /* 0xf8 */ }; /* Cork */ static const unsigned short int unicode_map_cork[] = { 0x0060, 0x00b4, 0x005e, 0x007e, 0x00a8, 0x02dd, 0x02da, 0x02c7, /* 0x00 */ 0x02d8, 0x0009, 0x000a, 0x00b8, 0x02db, 0x000d, 0x2039, 0x203a, /* 0x08 */ 0x201c, 0x201d, 0x201e, 0x00ab, 0x00bb, 0x2013, 0x2014, 0x2080, /* 0x10 */ 0x0131, 0x002e, 0xfb00, 0xfb01, 0xfb02, 0xfb00, 0x0069, 0xfb00, /* 0x18 */ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, /* 0x20 */ 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, /* 0x28 */ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, /* 0x30 */ 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f, /* 0x38 */ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, /* 0x40 */ 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, /* 0x48 */ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, /* 0x50 */ 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, /* 0x58 */ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, /* 0x60 */ 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, /* 0x68 */ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, /* 0x70 */ 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x2010, /* 0x78 */ 0x0102, 0x0104, 0x0106, 0x010c, 0x010e, 0x011a, 0x0118, 0x011e, /* 0x80 */ 0x0139, 0x013d, 0x0141, 0x0143, 0x0147, 0x014a, 0x0150, 0x0154, /* 0x88 */ 0x0158, 0x015a, 0x0160, 0x015e, 0x0164, 0x0162, 0x0170, 0x016e, /* 0x90 */ 0x0178, 0x0179, 0x017d, 0x017b, 0x0132, 0x0130, 0x0111, 0x00a7, /* 0x98 */ 0x0103, 0x0105, 0x0107, 0x010d, 0x010f, 0x011b, 0x0119, 0x011f, /* 0xa0 */ 0x013a, 0x013e, 0x0142, 0x0144, 0x0148, 0x014b, 0x0151, 0x0155, /* 0xa8 */ 0x0159, 0x015b, 0x0161, 0x015f, 0x0165, 0x0163, 0x0171, 0x016f, /* 0xb0 */ 0x00ff, 0x017a, 0x017e, 0x017c, 0x0133, 0x00a1, 0x00bf, 0x00a3, /* 0xb8 */ 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, /* 0xc0 */ 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, /* 0xc8 */ 0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x0152, /* 0xd0 */ 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x0053, /* 0xd8 */ 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, /* 0xe0 */ 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, /* 0xe8 */ 0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x0153, /* 0xf0 */ 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00df, /* 0xf8 */ }; #define MAKE_CS_LINE(name) \ { #name, \ 0x0100 - sizeof(unicode_map_##name)/sizeof(unsigned short int), \ unicode_map_##name } /* * Charset maps with names assigned. * Since we don't know the id's at compile time, find_charset_map() finds * them when first needed. */ static const EncaUnicodeMap UNICODE_MAP[] = { MAKE_CS_LINE(iso88592), MAKE_CS_LINE(iso88594), MAKE_CS_LINE(iso88595), MAKE_CS_LINE(iso885913), MAKE_CS_LINE(iso885916), MAKE_CS_LINE(cp1125), MAKE_CS_LINE(cp1250), MAKE_CS_LINE(cp1251), MAKE_CS_LINE(cp1257), MAKE_CS_LINE(ibm852), MAKE_CS_LINE(ibm855), MAKE_CS_LINE(ibm775), MAKE_CS_LINE(ibm866), MAKE_CS_LINE(baltic), MAKE_CS_LINE(keybcs2), MAKE_CS_LINE(macce), MAKE_CS_LINE(maccyr), MAKE_CS_LINE(ecma113), MAKE_CS_LINE(koi8cs2), MAKE_CS_LINE(koi8r), MAKE_CS_LINE(koi8u), MAKE_CS_LINE(koi8uni), MAKE_CS_LINE(cork), }; /** * enca_charset_has_ucs2_map: * @charset: An 8bit charset. * * Find whether we have charset -> UCS-2 map. * * Returns: Nonzero when the map is available, zero otherwise. **/ int enca_charset_has_ucs2_map(int charset) { return find_charset_map(charset) != NULL; } /** * enca_charset_ucs2_map: * @charset: An 8bit charset. * @buffer: Buffer to store the map to. * * Creates map from an 8bit charset to UCS-2. * * The buffer must be at least 256*sizeof(unsigned int) long to hold the map. * * Returns: Nonzero when the map was successfully created, zero otherwise. **/ int enca_charset_ucs2_map(int charset, unsigned int *buffer) { unsigned int i; const EncaUnicodeMap *umap = find_charset_map(charset); if (umap == NULL) return 0; for (i = 0; i < umap->tstart; i++) buffer[i] = i; for (i = umap->tstart; i < 0x0100; i++) buffer[i] = umap->map[i - umap->tstart]; return 1; } /** * find_charset_map: * @charset: An 8bit charset. * * Find charset -> UCS-2 map. * * Returns: Pointer to the map, #NULL when not found. **/ static const EncaUnicodeMap* find_charset_map(int charset) { static int charset_id[ELEMENTS(UNICODE_MAP)]; static int charset_id_initialized = 0; size_t i; if (charset < 0) return NULL; if (!charset_id_initialized) { for (i = 0; i < ELEMENTS(UNICODE_MAP); i++) { charset_id[i] = enca_name_to_charset(UNICODE_MAP[i].name); assert(charset_id[i] != ENCA_CS_UNKNOWN); } charset_id_initialized = 1; } for (i = 0; i < ELEMENTS(UNICODE_MAP); i++) { if (charset_id[i] == charset) return UNICODE_MAP + i; } return NULL; } /** * enca_charsets_subset_identical: * @charset1: A charset. * @charset2: Another charset. * @counts: An array of size 0x100 containing character counts. * * Checks whether all characters with nonzero count have the same meaning * in both charsets. * * In other words, it checks whether conversion of sample containing only * these characters from @charset1 to @charset2 would be identity. * * Returns: Nonzero if charsets are identical on the subset, zero otherwise. **/ int enca_charsets_subset_identical(int charset1, int charset2, const size_t *counts) { const EncaUnicodeMap *umap1 = find_charset_map(charset1); const EncaUnicodeMap *umap2 = find_charset_map(charset2); size_t ts1, ts2; const unsigned short int *m1, *m2; size_t i; assert(umap1 != NULL); assert(umap2 != NULL); m1 = umap1->map; m2 = umap2->map; ts1 = umap1->tstart; ts2 = umap2->tstart; for (i = 0; i < 0x100; i++) { unsigned short int u1 = i < ts1 ? i : m1[i - ts1]; unsigned short int u2 = i < ts2 ? i : m2[i - ts2]; if (counts[i] > 0 && u1 != u2 && u1 != ENCA_NOT_A_CHAR && u2 != ENCA_NOT_A_CHAR) return 0; } return 1; } /***** Documentation *********************************************************/ /** * ENCA_NOT_A_CHAR: * * Not-a-character in unicode tables. **/ /* vim: ts=2 sw=2 et */ Project-OSS-Revival-enca-36defd7/lib/utf8_double.c000066400000000000000000000274331507545312400217510ustar00rootroot00000000000000/* checks for doubly-encoded utf-8 Copyright (C) 2000-2002 David Necas (Yeti) This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include "enca.h" #include "internal.h" /* Local prototypes. */ static void compute_double_utf8_weights (EncaAnalyserState *analyser); static void create_ucs2_weight_table (EncaUTFCheckData *amap, size_t size, int *wbuf); static void mark_scratch_buffer (EncaAnalyserState *analyser); /** * enca_double_utf8_init: * @analyser: Analyzer state to be initialized. * * Initializes double-UTF-8 check. * * In fact it initializes the fields to #NULL's, they are actually initialized * only when needed. **/ void enca_double_utf8_init(EncaAnalyserState *analyser) { analyser->utfch = NULL; analyser->utfbuf = NULL; } /** * enca_double_utf8_destroy: * @analyser: Analyzer state whose double-UTF-8 check part should be destroyed. * * Destroys the double-UTF-8 check part of analyser state @analyser. **/ void enca_double_utf8_destroy(EncaAnalyserState *analyser) { size_t i; if (analyser->utfch == NULL) return; enca_free(analyser->utfbuf); for (i = 0; i < analyser->ncharsets; i++) { enca_free(analyser->utfch[i].ucs2); enca_free(analyser->utfch[i].weights); } enca_free(analyser->utfch); } /** * enca_double_utf8_check: * @analyser: Analyzer state determinig the language for double-UTF-8 check. * @buffer: The buffer to be checked [@size]. * @size: The size of @buffer. * * Checks buffer for double-UTF-8 encoding. * * Double-UTF-8 encoding is the result of [errorneous] conversion of UTF-8 text * to UTF-8 again, as if it was in some 8bit charset. This is quite hard to * recover from. * * The analayser mostly only determines what language will be assumed, * the rest of this test is independent on the main guessing routines. * When @buffer doesn't containing UTF-8 text, the result is undefined * (namely, false positives are possible). * * Calling this function when language is `none' has currently no effect. * * Returns: Nonzero, when @buffer probably contains doubly-UTF-8 encoded text. * More precisely, it returns the number of charsets which are * possible candidates for source charset. You can then use * enca_double_utf8_get_candidates() to retrieve the charsets. **/ int enca_double_utf8_check(EncaAnalyser analyser, const unsigned char *buffer, size_t size) { long int ucs4char = 0; int remains_10xxxxxx = 0; size_t i; if (analyser->ncharsets == 0 || analyser->lang->weights == 0) return 0; /* Compute weights when we are called the first time. */ if (analyser->utfch == NULL) compute_double_utf8_weights(analyser); mark_scratch_buffer(analyser); /* Parse. */ for (i = 0; i < size; i++) { unsigned char b = buffer[i]; if (!remains_10xxxxxx) { if ((b & 0x80) == 0) /* 7bit characters */ continue; if ((b & 0xe0) == 0xc0) { /* 110xxxxx 10xxxxxx sequence */ ucs4char = b & 0x1f; remains_10xxxxxx = 1; continue; } if ((b & 0xf0) == 0xe0) { /* 1110xxxx 2 x 10xxxxxx sequence */ ucs4char = b & 0x0f; remains_10xxxxxx = 2; continue; } /* Following are valid 32-bit UCS characters, but not 16-bit Unicode, nevertheless we accept them. */ if ((b & 0xf8) == 0xf0) { /* 1110xxxx 3 x 10xxxxxx sequence */ ucs4char = b & 0x07; remains_10xxxxxx = 3; continue; } if ((b & 0xfc) == 0xf8) { /* 1110xxxx 4 x 10xxxxxx sequence */ ucs4char = b & 0x03; remains_10xxxxxx = 4; continue; } if ((b & 0xfe) == 0xfc) { /* 1110xxxx 5 x 10xxxxxx sequence */ ucs4char = b & 0x01; remains_10xxxxxx = 5; continue; } /* We can get here only when input is invalid: (b & 0xc0) == 0x80. */ remains_10xxxxxx = 0; } else { /* Broken 10xxxxxx sequence? */ if ((b & 0xc0) != 0x80) { remains_10xxxxxx = 0; } else { /* Good 10xxxxxx continuation. */ ucs4char <<= 6; ucs4char |= b & 0x3f; remains_10xxxxxx--; /* Do we have a whole character? * (We must not touch positions in utfbuf containing zeroes.) */ if (remains_10xxxxxx == 0 && ucs4char < 0x10000 && analyser->utfbuf[ucs4char] != 0) { if (analyser->utfbuf[ucs4char] < 0) analyser->utfbuf[ucs4char] = 1; else analyser->utfbuf[ucs4char]++; } } } } /* Compute the ratings. */ for (i = 0; i < analyser->ncharsets; i++) { EncaUTFCheckData *amap = analyser->utfch + i; size_t j; amap->rating = 0.0; amap->result = 0; for (j = 0; j < amap->size; j++) amap->rating += analyser->utfbuf[amap->ucs2[j]] * amap->weights[j]; } /* Now check whether we've found some negative ratings. */ { size_t min = 0; size_t max = 0; for (i = 1; i < analyser->ncharsets; i++) { if (analyser->utfch[i].rating < analyser->utfch[min].rating) min = i; if (analyser->utfch[i].rating > analyser->utfch[max].rating) max = i; } if (analyser->utfch[min].rating < 0.0 && -analyser->utfch[min].rating > 0.5*analyser->utfch[max].rating) { size_t total = 0; double q = analyser->utfch[min].rating * (1.0 - 45.0*exp(-4.5*analyser->options.threshold)); for (i = 0; i < analyser->ncharsets; i++) { if (analyser->utfch[i].rating < q) { analyser->utfch[i].result = 1; total++; } } return total; } } return 0; } /** * enca_double_utf8_get_candidates: * @analyser: Analyzer state for which double-UTF-8 candidates are to be * returned. * * Returns array of double-UTF-8 source charset candidates from the last check. * * The returned array should be freed by caller then no longer needed. Its * is the return value of the preceding enca_double_utf8_check() call. * * When called before any double-UTF-8 test has been performed yet or after * and unsuccessfull double-UTF-8 test, it returns NULL, but the result after * an unsuccessfull check should be considered undefined. * * Returns: An array containing charset id's of possible source charsets from * which the sample was doubly-UTF-8 encoded. The array may contain * only one value, but usually enca is not able to decide between * e.g. ISO-8859-2 and Win1250, thus more candidates are returned. **/ int* enca_double_utf8_get_candidates(EncaAnalyser analyser) { size_t j = 0; size_t i; int *candidates; assert(analyser); if (analyser->utfch == NULL) return NULL; for (i = 0; i < analyser->ncharsets; i++) { if (analyser->utfch[i].result) j++; } if (j == 0) return NULL; candidates = NEW(int, j); j = 0; for (i = 0; i < analyser->ncharsets; i++) { if (analyser->utfch[i].result) { candidates[j] = analyser->charsets[i]; j++; } } return candidates; } /** * compute_double_utf8_weights: * @analyser: Analyzer state whose double-UTF-8 check weigths should be * computed. * * Computes UCS-2 character weights used in double-UTF-8 check. Must be * called at most once for a given analyser. It also allocates the scratch * buffer analyser->utfbuf and leaves it filled with zeroes. **/ static void compute_double_utf8_weights(EncaAnalyserState *analyser) { int *buf; unsigned int ucs2map[0x100]; size_t i, j; assert(analyser != NULL); assert(analyser->lang != NULL); assert(analyser->utfch == NULL); assert(analyser->utfbuf == NULL); if (analyser->ncharsets == 0) return; analyser->utfch = NEW(EncaUTFCheckData, analyser->ncharsets); analyser->utfbuf = NEW(int, 0x10000); buf = analyser->utfbuf; for (i = 0; i < 0x10000; i++) buf[i] = 0; /* For all charsets compute UTF-8 prefix byte occurence tables and select * those characters having the highest difference between occurrences when * counted as UTF-8 prefix and when counted as a regular character. */ for (j = 0; j < analyser->ncharsets; j++) { const unsigned short int *const w = analyser->lang->weights[j]; size_t table_size = 0; assert(enca_charset_has_ucs2_map(analyser->charsets[j])); enca_charset_ucs2_map(analyser->charsets[j], ucs2map); /* Go through all characters, some maps may map even 7bits to something * else. Compute required table size meanwhile. */ for (i = 0; i < 0x100; i++) { unsigned int ucs2c = ucs2map[i]; assert(ucs2c < 0x10000); if (w[i] == 0) continue; /* Count the character weight as positive. */ if (ucs2c < 0x80 || ucs2c == ENCA_NOT_A_CHAR) continue; if (buf[ucs2c] == 0) table_size++; buf[ucs2c] += w[i]; /* Transform the character and count UTF-8 transformed first byte weight * as negative. */ if (ucs2c < 0x800) ucs2c = ucs2map[0xc0 | (ucs2c >> 6)]; else ucs2c = ucs2map[0xe0 | (ucs2c >> 12)]; if (ucs2c < 0x80 || ucs2c == ENCA_NOT_A_CHAR) continue; if (buf[ucs2c] == 0) table_size++; buf[ucs2c] -= w[i]; if (buf[ucs2c] == 0) buf[ucs2c] = 1; } /* Build the table of significant UCS-2 characters, i.e. characters * having nonzero weight. */ create_ucs2_weight_table(analyser->utfch + j, table_size, buf); } } /** * create_ucs2_weight_table: * @amap: A pointer to Double-UTF8-check data to be filled. * @size: The number of UCS-2 characters with nonzero weight in @wbuf. * @wbuf: UCS-2 character weights [@size]. * * Creates `compressed' UCS-2 weight table. **/ static void create_ucs2_weight_table(EncaUTFCheckData *amap, size_t size, int *wbuf) { unsigned int ucs2c; size_t i; amap->size = size; amap->ucs2 = NEW(int, size); amap->weights = NEW(int, size); i = 0; for (ucs2c = 0; ucs2c < 0x10000; ucs2c++) { if (wbuf[ucs2c] != 0) { assert(i < size); amap->ucs2[i] = ucs2c; amap->weights[i] = wbuf[ucs2c]; wbuf[ucs2c] = 0; /* Fill the buffer with zeroes. */ i++; } } assert(i == size); } /** * mark_scratch_buffer: * @analyser: Analyzer whose significant ucs2 characters are to be marked in * @analyser->utfbuf. * * Marks significant characters in @analyser->utfbuf with -1. * * The @analyser->utfbuf buffer is magic. Once we found the significant * characters in compute_double_utf8_weights(), we always keep zeroes at * positions of nonsiginifant characters. This way we never have to scan * through the whole buffer, not even to fill it wit zeroes -- we put zeroes * only where we know we changed it. * * -1 is used to mark significant characters before counting, because it's not * zero. **/ static void mark_scratch_buffer(EncaAnalyserState *analyser) { size_t i, j; for (j = 0; j < analyser->ncharsets; j++) { EncaUTFCheckData *amap = analyser->utfch + j; for (i = 0; i < amap->size; i++) analyser->utfbuf[amap->ucs2[i]] = -1; } } Project-OSS-Revival-enca-36defd7/ltmain.sh000077500000000000000000012227651507545312400204500ustar00rootroot00000000000000#! /usr/bin/env sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2019-02-19.15 # libtool (GNU libtool) 2.5.4 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996-2019, 2021-2024 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . PROGRAM=libtool PACKAGE=libtool VERSION="2.5.4 Debian-2.5.4-4" package_revision=2.5.4 ## ------ ## ## Usage. ## ## ------ ## # Run './libtool --help' for help with using this script from the # command line. ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # After configure completes, it has a better idea of some of the # shell tools we need than the defaults used by the functions shared # with bootstrap, so set those here where they can still be over- # ridden by the user, but otherwise take precedence. : ${AUTOCONF="autoconf"} : ${AUTOMAKE="automake"} ## -------------------------- ## ## Source external libraries. ## ## -------------------------- ## # Much of our low-level functionality needs to be sourced from external # libraries, which are installed to $pkgauxdir. # Set a version string for this script. scriptversion=2024-12-01.17; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 # This is free software. There is NO warranty; not even for # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # Copyright (C) 2004-2019, 2021, 2023-2024 Bootstrap Authors # # This file is dual licensed under the terms of the MIT license # , and GPL version 2 or later # . You must apply one of # these licenses when using or redistributing this software or any of # the files within it. See the URLs above, or the file `LICENSE` # included in the Bootstrap distribution for the full license texts. # Please report bugs or propose patches to: # ## ------ ## ## Usage. ## ## ------ ## # Evaluate this file near the top of your script to gain access to # the functions and variables defined here: # # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh # # If you need to override any of the default environment variable # settings, do that before evaluating this file. ## -------------------- ## ## Shell normalisation. ## ## -------------------- ## # Some shells need a little help to be as Bourne compatible as possible. # Before doing anything else, make sure all that help has been provided! DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # NLS nuisances: We save the old values in case they are required later. _G_user_locale= _G_safe_locale= for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test set = \"\${$_G_var+set}\"; then save_$_G_var=\$$_G_var $_G_var=C export $_G_var _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done # These NLS vars are set unconditionally (bootstrap issue #24). Unset those # in case the environment reset is needed later and the $save_* variant is not # defined (see the code above). LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL # Make sure IFS has a sensible default sp=' ' nl=' ' IFS="$sp $nl" # There are apparently some systems that use ';' as a PATH separator! if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # func_unset VAR # -------------- # Portably unset VAR. # In some shells, an 'unset VAR' statement leaves a non-zero return # status if VAR is already unset, which might be problematic if the # statement is used at the end of a function (thus poisoning its return # value) or when 'set -e' is active (causing even a spurious abort of # the script in this case). func_unset () { { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; } } # Make sure CDPATH doesn't cause `cd` commands to output the target dir. func_unset CDPATH # Make sure ${,E,F}GREP behave sanely. func_unset GREP_OPTIONS ## ------------------------- ## ## Locate command utilities. ## ## ------------------------- ## # func_executable_p FILE # ---------------------- # Check that FILE is an executable regular file. func_executable_p () { test -f "$1" && test -x "$1" } # func_path_progs PROGS_LIST CHECK_FUNC [PATH] # -------------------------------------------- # Search for either a program that responds to --version with output # containing "GNU", or else returned by CHECK_FUNC otherwise, by # trying all the directories in PATH with each of the elements of # PROGS_LIST. # # CHECK_FUNC should accept the path to a candidate program, and # set $func_check_prog_result if it truncates its output less than # $_G_path_prog_max characters. func_path_progs () { _G_progs_list=$1 _G_check_func=$2 _G_PATH=${3-"$PATH"} _G_path_prog_max=0 _G_path_prog_found=false _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} for _G_dir in $_G_PATH; do IFS=$_G_save_IFS test -z "$_G_dir" && _G_dir=. for _G_prog_name in $_G_progs_list; do for _exeext in '' .EXE; do _G_path_prog=$_G_dir/$_G_prog_name$_exeext func_executable_p "$_G_path_prog" || continue case `"$_G_path_prog" --version 2>&1` in *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; *) $_G_check_func $_G_path_prog func_path_progs_result=$func_check_prog_result ;; esac $_G_path_prog_found && break 3 done done done IFS=$_G_save_IFS test -z "$func_path_progs_result" && { echo "no acceptable sed could be found in \$PATH" >&2 exit 1 } } # We want to be able to use the functions in this file before configure # has figured out where the best binaries are kept, which means we have # to search for them ourselves - except when the results are already set # where we skip the searches. # Unless the user overrides by setting SED, search the path for either GNU # sed, or the sed that truncates its output the least. test -z "$SED" && { _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for _G_i in 1 2 3 4 5 6 7; do _G_sed_script=$_G_sed_script$nl$_G_sed_script done echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed _G_sed_script= func_check_prog_sed () { _G_path_prog=$1 _G_count=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo '' >> conftest.nl "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin" rm -f conftest.sed SED=$func_path_progs_result } # Unless the user overrides by setting GREP, search the path for either GNU # grep, or the grep that truncates its output the least. test -z "$GREP" && { func_check_prog_grep () { _G_path_prog=$1 _G_count=0 _G_path_prog_max=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo 'GREP' >> conftest.nl "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin" GREP=$func_path_progs_result } ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # All uppercase variable names are used for environment variables. These # variables can be overridden by the user before calling a script that # uses them if a suitable command of that name is not already available # in the command search PATH. : ${CP="cp -f"} : ${ECHO="printf %s\n"} : ${EGREP="$GREP -E"} : ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} ## -------------------- ## ## Useful sed snippets. ## ## -------------------- ## sed_dirname='s|/[^/]*$||' sed_basename='s|^.*/||' # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s|\([`"$\\]\)|\\\1|g' # Same as above, but do not quote variable references. sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' # Sed substitution that converts a w32 file name or path # that contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-'\' parameter expansions in output of sed_double_quote_subst that # were '\'-ed in input to the same. If an odd number of '\' preceded a # '$' in input to sed_double_quote_subst, that '$' was protected from # expansion. Since each input '\' is now two '\'s, look for any number # of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. _G_bs='\\' _G_bs2='\\\\' _G_bs4='\\\\\\\\' _G_dollar='\$' sed_double_backslash="\ s/$_G_bs4/&\\ /g s/^$_G_bs2$_G_dollar/$_G_bs&/ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" # require_check_ifs_backslash # --------------------------- # Check if we can use backslash as IFS='\' separator, and set # $check_ifs_backshlash_broken to ':' or 'false'. require_check_ifs_backslash=func_require_check_ifs_backslash func_require_check_ifs_backslash () { _G_save_IFS=$IFS IFS='\' _G_check_ifs_backshlash='a\\b' for _G_i in $_G_check_ifs_backshlash do case $_G_i in a) check_ifs_backshlash_broken=false ;; '') break ;; *) check_ifs_backshlash_broken=: break ;; esac done IFS=$_G_save_IFS require_check_ifs_backslash=: } ## ----------------- ## ## Global variables. ## ## ----------------- ## # Except for the global variables explicitly listed below, the following # functions in the '^func_' namespace, and the '^require_' namespace # variables initialised in the 'Resource management' section, sourcing # this file will not pollute your global namespace with anything # else. There's no portable way to scope variables in Bourne shell # though, so actually running these functions will sometimes place # results into a variable named after the function, and often use # temporary variables in the '^_G_' namespace. If you are careful to # avoid using those namespaces casually in your sourcing script, things # should continue to work as you expect. And, of course, you can freely # overwrite any of the functions or variables defined here before # calling anything to customize them. EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. # Allow overriding, eg assuming that you follow the convention of # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # # debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: # By convention, finish your script with: # # exit $exit_status # # so that you can set exit_status to non-zero if you want to indicate # something went wrong during execution without actually bailing out at # the point of failure. exit_status=$EXIT_SUCCESS # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath=$0 # The name of this program. progname=`$ECHO "$progpath" |$SED "$sed_basename"` # Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` progpath=$progdir/$progname ;; *) _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS=$_G_IFS test -x "$progdir/$progname" && break done IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` progpath=$progdir/$progname ;; esac ## ----------------- ## ## Standard options. ## ## ----------------- ## # The following options affect the operation of the functions defined # below, and should be set appropriately depending on run-time para- # meters passed on the command line. opt_dry_run=false opt_quiet=false opt_verbose=false # Categories 'all' and 'none' are always available. Append any others # you will pass as the first argument to func_warning from your own # code. warning_categories= # By default, display warnings according to 'opt_warning_types'. Set # 'warning_func' to ':' to elide all warnings, or func_fatal_error to # treat the next displayed warning as a fatal error. warning_func=func_warn_and_continue # Set to 'all' to display all warnings, 'none' to suppress all # warnings, or a space delimited list of some subset of # 'warning_categories' to display only the listed warnings. opt_warning_types=all ## -------------------- ## ## Resource management. ## ## -------------------- ## # This section contains definitions for functions that each ensure a # particular resource (a file, or a non-empty configuration variable for # example) is available, and if appropriate to extract default values # from pertinent package files. Call them using their associated # 'require_*' variable to ensure that they are executed, at most, once. # # It's entirely deliberate that calling these functions can set # variables that don't obey the namespace limitations obeyed by the rest # of this file, in order that that they be as useful as possible to # callers. # require_term_colors # ------------------- # Allow display of bold text on terminals that support it. require_term_colors=func_require_term_colors func_require_term_colors () { $debug_cmd test -t 1 && { # COLORTERM and USE_ANSI_COLORS environment variables take # precedence, because most terminfo databases neglect to describe # whether color sequences are supported. test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} if test 1 = "$USE_ANSI_COLORS"; then # Standard ANSI escape sequences tc_reset='' tc_bold=''; tc_standout='' tc_red=''; tc_green='' tc_blue=''; tc_cyan='' else # Otherwise trust the terminfo database after all. test -n "`tput sgr0 2>/dev/null`" && { tc_reset=`tput sgr0` test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` tc_standout=$tc_bold test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` } fi } require_term_colors=: } ## ----------------- ## ## Function library. ## ## ----------------- ## # This section contains a variety of useful functions to call in your # scripts. Take note of the portable wrappers for features provided by # some modern shells, which will fall back to slower equivalents on # less featureful shells. # func_append VAR VALUE # --------------------- # Append VALUE onto the existing contents of VAR. # _G_HAVE_PLUSEQ_OP # Can be empty, in which case the shell is probed, "yes" if += is # usable or anything else if it does not work. if test -z "$_G_HAVE_PLUSEQ_OP" && \ __PLUSEQ_TEST="a" && \ __PLUSEQ_TEST+=" b" 2>/dev/null && \ test "a b" = "$__PLUSEQ_TEST"; then _G_HAVE_PLUSEQ_OP=yes fi if test yes = "$_G_HAVE_PLUSEQ_OP" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_append () { $debug_cmd eval "$1+=\$2" }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_append () { $debug_cmd eval "$1=\$$1\$2" } fi # func_append_quoted VAR VALUE # ---------------------------- # Quote VALUE and append to the end of shell variable VAR, separated # by a space. if test yes = "$_G_HAVE_PLUSEQ_OP"; then eval 'func_append_quoted () { $debug_cmd func_quote_arg pretty "$2" eval "$1+=\\ \$func_quote_arg_result" }' else func_append_quoted () { $debug_cmd func_quote_arg pretty "$2" eval "$1=\$$1\\ \$func_quote_arg_result" } fi # func_append_uniq VAR VALUE # -------------------------- # Append unique VALUE onto the existing contents of VAR, assuming # entries are delimited by the first character of VALUE. For example: # # func_append_uniq options " --another-option option-argument" # # will only append to $options if " --another-option option-argument " # is not already present somewhere in $options already (note spaces at # each end implied by leading space in second argument). func_append_uniq () { $debug_cmd eval _G_current_value='`$ECHO $'$1'`' _G_delim=`expr "$2" : '\(.\)'` case $_G_delim$_G_current_value$_G_delim in *"$2$_G_delim"*) ;; *) func_append "$@" ;; esac } # func_arith TERM... # ------------------ # Set func_arith_result to the result of evaluating TERMs. test -z "$_G_HAVE_ARITH_OP" \ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ && _G_HAVE_ARITH_OP=yes if test yes = "$_G_HAVE_ARITH_OP"; then eval 'func_arith () { $debug_cmd func_arith_result=$(( $* )) }' else func_arith () { $debug_cmd func_arith_result=`expr "$@"` } fi # func_basename FILE # ------------------ # Set func_basename_result to FILE with everything up to and including # the last / stripped. if test yes = "$_G_HAVE_XSI_OPS"; then # If this shell supports suffix pattern removal, then use it to avoid # forking. Hide the definitions single quotes in case the shell chokes # on unsupported syntax... _b='func_basename_result=${1##*/}' _d='case $1 in */*) func_dirname_result=${1%/*}$2 ;; * ) func_dirname_result=$3 ;; esac' else # ...otherwise fall back to using sed. _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` if test "X$func_dirname_result" = "X$1"; then func_dirname_result=$3 else func_append func_dirname_result "$2" fi' fi eval 'func_basename () { $debug_cmd '"$_b"' }' # func_dirname FILE APPEND NONDIR_REPLACEMENT # ------------------------------------------- # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. eval 'func_dirname () { $debug_cmd '"$_d"' }' # func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT # -------------------------------------------------------- # Perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value returned in "$func_basename_result" # For efficiency, we do not delegate to the functions above but instead # duplicate the functionality here. eval 'func_dirname_and_basename () { $debug_cmd '"$_b"' '"$_d"' }' # func_echo ARG... # ---------------- # Echo program name prefixed message. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname: $_G_line" done IFS=$func_echo_IFS } # func_echo_all ARG... # -------------------- # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_echo_infix_1 INFIX ARG... # ------------------------------ # Echo program name, followed by INFIX on the first line, with any # additional lines not showing INFIX. func_echo_infix_1 () { $debug_cmd $require_term_colors _G_infix=$1; shift _G_indent=$_G_infix _G_prefix="$progname: $_G_infix: " _G_message=$* # Strip color escape sequences before counting printable length for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" do test -n "$_G_tc" && { _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` } done _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes func_echo_infix_1_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_infix_1_IFS $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 _G_prefix=$_G_indent done IFS=$func_echo_infix_1_IFS } # func_error ARG... # ----------------- # Echo program name prefixed message to standard error. func_error () { $debug_cmd $require_term_colors func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } # func_fatal_error ARG... # ----------------------- # Echo program name prefixed message to standard error, and exit. func_fatal_error () { $debug_cmd func_error "$*" exit $EXIT_FAILURE } # func_grep EXPRESSION FILENAME # ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $debug_cmd $GREP "$1" "$2" >/dev/null 2>&1 } # func_len STRING # --------------- # Set func_len_result to the length of STRING. STRING may not # start with a hyphen. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_len () { $debug_cmd func_len_result=${#1} }' else func_len () { $debug_cmd func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } fi # func_mkdir_p DIRECTORY-PATH # --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { $debug_cmd _G_directory_path=$1 _G_dir_list= if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then # Protect directory names starting with '-' case $_G_directory_path in -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list in case some portion of path contains whitespace. _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` func_mkdir_p_IFS=$IFS; IFS=: for _G_dir in $_G_dir_list; do IFS=$func_mkdir_p_IFS # mkdir can fail with a 'File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$_G_dir" 2>/dev/null || : done IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. test -d "$_G_directory_path" || \ func_fatal_error "Failed to create '$1'" fi } # func_mktempdir [BASENAME] # ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, BASENAME is the basename for that directory. func_mktempdir () { $debug_cmd _G_template=${TMPDIR-/tmp}/${1-$progname} if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race _G_tmpdir=$_G_template-${RANDOM-0}$$ func_mktempdir_umask=`umask` umask 0077 $MKDIR "$_G_tmpdir" umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$_G_tmpdir" || \ func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi $ECHO "$_G_tmpdir" } # func_normal_abspath PATH # ------------------------ # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. func_normal_abspath () { $debug_cmd # These SED scripts presuppose an absolute path with a trailing slash. _G_pathcar='s|^/\([^/]*\).*$|\1|' _G_pathcdr='s|^/[^/]*||' _G_removedotparts=':dotsl s|/\./|/|g t dotsl s|/\.$|/|' _G_collapseslashes='s|/\{1,\}|/|g' _G_finalslash='s|/*$|/|' # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` while :; do # Processed it all yet? if test / = "$func_normal_abspath_tpath"; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result"; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_notquiet ARG... # -------------------- # Echo program name prefixed message only when not in quiet mode. func_notquiet () { $debug_cmd $opt_quiet || func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_relative_path SRCDIR DSTDIR # -------------------------------- # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. func_relative_path () { $debug_cmd func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=$func_dirname_result if test -z "$func_relative_path_tlibdir"; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test -n "$func_stripname_result"; then func_append func_relative_path_result "/$func_stripname_result" fi # Normalisation. If bindir is libdir, return '.' else relative path. if test -n "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result" func_relative_path_result=$func_stripname_result fi test -n "$func_relative_path_result" || func_relative_path_result=. : } # func_quote_portable EVAL ARG # ---------------------------- # Internal function to portably implement func_quote_arg. Note that we still # keep attention to performance here so we as much as possible try to avoid # calling sed binary (so far O(N) complexity as long as func_append is O(1)). func_quote_portable () { $debug_cmd $require_check_ifs_backslash func_quote_portable_result=$2 # one-time-loop (easy break) while true do if $1; then func_quote_portable_result=`$ECHO "$2" | $SED \ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` break fi # Quote for eval. case $func_quote_portable_result in *[\\\`\"\$]*) # Fallback to sed for $func_check_bs_ifs_broken=:, or when the string # contains the shell wildcard characters. case $check_ifs_backshlash_broken$func_quote_portable_result in :*|*[\[\*\?]*) func_quote_portable_result=`$ECHO "$func_quote_portable_result" \ | $SED "$sed_quote_subst"` break ;; esac func_quote_portable_old_IFS=$IFS for _G_char in '\' '`' '"' '$' do # STATE($1) PREV($2) SEPARATOR($3) set start "" "" func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy IFS=$_G_char for _G_part in $func_quote_portable_result do case $1 in quote) func_append func_quote_portable_result "$3$2" set quote "$_G_part" "\\$_G_char" ;; start) set first "" "" func_quote_portable_result= ;; first) set quote "$_G_part" "" ;; esac done done IFS=$func_quote_portable_old_IFS ;; *) ;; esac break done func_quote_portable_unquoted_result=$func_quote_portable_result case $func_quote_portable_result in # double-quote args containing shell metacharacters to delay # word splitting, command substitution and variable expansion # for a subsequent eval. # many bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_portable_result=\"$func_quote_portable_result\" ;; esac } # func_quotefast_eval ARG # ----------------------- # Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG', # but optimized for speed. Result is stored in $func_quotefast_eval. if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then printf -v _GL_test_printf_tilde %q '~' if test '\~' = "$_GL_test_printf_tilde"; then func_quotefast_eval () { printf -v func_quotefast_eval_result %q "$1" } else # Broken older Bash implementations. Make those faster too if possible. func_quotefast_eval () { case $1 in '~'*) func_quote_portable false "$1" func_quotefast_eval_result=$func_quote_portable_result ;; *) printf -v func_quotefast_eval_result %q "$1" ;; esac } fi else func_quotefast_eval () { func_quote_portable false "$1" func_quotefast_eval_result=$func_quote_portable_result } fi # func_quote_arg MODEs ARG # ------------------------ # Quote one ARG to be evaled later. MODEs argument may contain zero or more # specifiers listed below separated by ',' character. This function returns two # values: # i) func_quote_arg_result # double-quoted (when needed), suitable for a subsequent eval # ii) func_quote_arg_unquoted_result # has all characters that are still active within double # quotes backslashified. Available only if 'unquoted' is specified. # # Available modes: # ---------------- # 'eval' (default) # - escape shell special characters # 'expand' # - the same as 'eval'; but do not quote variable references # 'pretty' # - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might # be used later in func_quote to get output like: 'echo "a b"' instead # of 'echo a\ b'. This is slower than default on some shells. # 'unquoted' # - produce also $func_quote_arg_unquoted_result which does not contain # wrapping double-quotes. # # Examples for 'func_quote_arg pretty,unquoted string': # # string | *_result | *_unquoted_result # ------------+-----------------------+------------------- # " | \" | \" # a b | "a b" | a b # "a b" | "\"a b\"" | \"a b\" # * | "*" | * # z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\" # # Examples for 'func_quote_arg pretty,unquoted,expand string': # # string | *_result | *_unquoted_result # --------------+---------------------+-------------------- # z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\" func_quote_arg () { _G_quote_expand=false case ,$1, in *,expand,*) _G_quote_expand=: ;; esac case ,$1, in *,pretty,*|*,expand,*|*,unquoted,*) func_quote_portable $_G_quote_expand "$2" func_quote_arg_result=$func_quote_portable_result func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result ;; *) # Faster quote-for-eval for some shells. func_quotefast_eval "$2" func_quote_arg_result=$func_quotefast_eval_result ;; esac } # func_quote MODEs ARGs... # ------------------------ # Quote all ARGs to be evaled later and join them into single command. See # func_quote_arg's description for more info. func_quote () { $debug_cmd _G_func_quote_mode=$1 ; shift func_quote_result= while test 0 -lt $#; do func_quote_arg "$_G_func_quote_mode" "$1" if test -n "$func_quote_result"; then func_append func_quote_result " $func_quote_arg_result" else func_append func_quote_result "$func_quote_arg_result" fi shift done } # func_stripname PREFIX SUFFIX NAME # --------------------------------- # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_stripname () { $debug_cmd # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary variable first. func_stripname_result=$3 func_stripname_result=${func_stripname_result#"$1"} func_stripname_result=${func_stripname_result%"$2"} }' else func_stripname () { $debug_cmd case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; esac } fi # func_show_eval CMD [FAIL_EXP] # ----------------------------- # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} func_quote_arg pretty,expand "$_G_cmd" eval "func_notquiet $func_quote_arg_result" $opt_dry_run || { eval "$_G_cmd" _G_status=$? if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_show_eval_locale CMD [FAIL_EXP] # ------------------------------------ # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} $opt_quiet || { func_quote_arg expand,pretty "$_G_cmd" eval "func_echo $func_quote_arg_result" } $opt_dry_run || { eval "$_G_user_locale $_G_cmd" _G_status=$? eval "$_G_safe_locale" if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_tr_sh # ---------- # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { $debug_cmd case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_verbose ARG... # ------------------- # Echo program name prefixed message in verbose mode only. func_verbose () { $debug_cmd $opt_verbose && func_echo "$*" : } # func_warn_and_continue ARG... # ----------------------------- # Echo program name prefixed warning message to standard error. func_warn_and_continue () { $debug_cmd $require_term_colors func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 } # func_warning CATEGORY ARG... # ---------------------------- # Echo program name prefixed warning message to standard error. Warning # messages can be filtered according to CATEGORY, where this function # elides messages where CATEGORY is not listed in the global variable # 'opt_warning_types'. func_warning () { $debug_cmd # CATEGORY must be in the warning_categories list! case " $warning_categories " in *" $1 "*) ;; *) func_internal_error "invalid warning category '$1'" ;; esac _G_category=$1 shift case " $opt_warning_types " in *" $_G_category "*) $warning_func ${1+"$@"} ;; esac } # func_sort_ver VER1 VER2 # ----------------------- # 'sort -V' is not generally available. # Note this deviates from the version comparison in automake # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a # but this should suffice as we won't be specifying old # version formats or redundant trailing .0 in bootstrap.conf. # If we did want full compatibility then we should probably # use m4_version_compare from autoconf. func_sort_ver () { $debug_cmd printf '%s\n%s\n' "$1" "$2" \ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n } # func_lt_ver PREV CURR # --------------------- # Return true if PREV and CURR are in the correct order according to # func_sort_ver, otherwise false. Use it like this: # # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." func_lt_ver () { $debug_cmd test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: #! /bin/sh # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 # This is free software. There is NO warranty; not even for # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # Copyright (C) 2010-2019, 2021, 2023-2024 Bootstrap Authors # # This file is dual licensed under the terms of the MIT license # , and GPL version 2 or later # . You must apply one of # these licenses when using or redistributing this software or any of # the files within it. See the URLs above, or the file `LICENSE` # included in the Bootstrap distribution for the full license texts. # Please report bugs or propose patches to: # # Set a version string for this script. scriptversion=2019-02-19.15; # UTC ## ------ ## ## Usage. ## ## ------ ## # This file is a library for parsing options in your shell scripts along # with assorted other useful supporting features that you can make use # of too. # # For the simplest scripts you might need only: # # #!/bin/sh # . relative/path/to/funclib.sh # . relative/path/to/options-parser # scriptversion=1.0 # func_options ${1+"$@"} # eval set dummy "$func_options_result"; shift # ...rest of your script... # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file # starting with '# Written by ' and ending with '# Copyright'. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the # '# Written by ' line, like the one at the top of this file. # # The default options also support '--debug', which will turn on shell # execution tracing (see the comment above debug_cmd below for another # use), and '--verbose' and the func_verbose function to allow your script # to display verbose messages only when your user has specified # '--verbose'. # # After sourcing this file, you can plug in processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. ## -------------- ## ## Configuration. ## ## -------------- ## # You should override these variables in your script after sourcing this # file so that they reflect the customisations you have added to the # option parser. # The usage line for option parsing errors and the start of '-h' and # '--help' output messages. You can embed shell variables for delayed # expansion at the time the message is displayed, but you will need to # quote other shell meta-characters carefully to prevent them being # expanded when the contents are evaled. usage='$progpath [OPTION]...' # Short help message in response to '-h' and '--help'. Add to this or # override it after sourcing this library to reflect the full set of # options your script accepts. usage_message="\ --debug enable verbose shell tracing -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -v, --verbose verbosely report processing --version print version information and exit -h, --help print short or long help message and exit " # Additional text appended to 'usage_message' in response to '--help'. long_help_message=" Warning categories include: 'all' show all warnings 'none' turn off all the warnings 'error' warnings are treated as fatal errors" # Help message printed before fatal option parsing errors. fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## ## Hook function management. ## ## ------------------------- ## # This section contains functions for adding, removing, and running hooks # in the main code. A hook is just a list of function names that can be # run in order later on. # func_hookable FUNC_NAME # ----------------------- # Declare that FUNC_NAME will run hooks added with # 'func_add_hook FUNC_NAME ...'. func_hookable () { $debug_cmd func_append hookable_fns " $1" } # func_add_hook FUNC_NAME HOOK_FUNC # --------------------------------- # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must # first have been declared "hookable" by a call to 'func_hookable'. func_add_hook () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not accept hook functions." ;; esac eval func_append ${1}_hooks '" $2"' } # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ # Remove HOOK_FUNC from the list of hook functions to be called by # FUNC_NAME. func_remove_hook () { $debug_cmd eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' } # func_propagate_result FUNC_NAME_A FUNC_NAME_B # --------------------------------------------- # If the *_result variable of FUNC_NAME_A _is set_, assign its value to # *_result variable of FUNC_NAME_B. func_propagate_result () { $debug_cmd func_propagate_result_result=: if eval "test \"\${${1}_result+set}\" = set" then eval "${2}_result=\$${1}_result" else func_propagate_result_result=false fi } # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. # It's assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. func_run_hooks () { $debug_cmd _G_rc_run_hooks=false case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook functions." ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do func_unset "${_G_hook}_result" eval $_G_hook '${1+"$@"}' func_propagate_result $_G_hook func_run_hooks if $func_propagate_result_result; then eval set dummy "$func_run_hooks_result"; shift fi done } ## --------------- ## ## Option parsing. ## ## --------------- ## # In order to add your own option parsing hooks, you must accept the # full positional parameter list from your hook function. You may remove # or edit any options that you action, and then pass back the remaining # unprocessed options in '_result', escaped # suitably for 'eval'. # # The '_result' variable is automatically unset # before your hook gets called; for best performance, only set the # *_result variable when necessary (i.e. don't call the 'func_quote' # function unnecessarily because it can be an expensive operation on some # machines). # # Like this: # # my_options_prep () # { # $debug_cmd # # # Extend the existing usage message. # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' # # No change in '$@' (ignored completely by this hook). Leave # # my_options_prep_result variable intact. # } # func_add_hook func_options_prep my_options_prep # # # my_silent_option () # { # $debug_cmd # # args_changed=false # # # Note that, for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in # --silent|-s) opt_silent=: # args_changed=: # ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift # args_changed=: # ;; # *) # Make sure the first unrecognised option "$_G_opt" # # is added back to "$@" in case we need it later, # # if $args_changed was set to 'true'. # set dummy "$_G_opt" ${1+"$@"}; shift; break ;; # esac # done # # # Only call 'func_quote' here if we processed at least one argument. # if $args_changed; then # func_quote eval ${1+"$@"} # my_silent_option_result=$func_quote_result # fi # } # func_add_hook func_parse_options my_silent_option # # # my_option_validation () # { # $debug_cmd # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # } # func_add_hook func_validate_options my_option_validation # # You'll also need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. # func_options_finish [ARG]... # ---------------------------- # Finishing the option parse loop (call 'func_options' hooks ATM). func_options_finish () { $debug_cmd func_run_hooks func_options ${1+"$@"} func_propagate_result func_run_hooks func_options_finish } # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the # individual implementations for details. func_hookable func_options func_options () { $debug_cmd _G_options_quoted=false for my_func in options_prep parse_options validate_options options_finish do func_unset func_${my_func}_result func_unset func_run_hooks_result eval func_$my_func '${1+"$@"}' func_propagate_result func_$my_func func_options if $func_propagate_result_result; then eval set dummy "$func_options_result"; shift _G_options_quoted=: fi done $_G_options_quoted || { # As we (func_options) are top-level options-parser function and # nobody quoted "$@" for us yet, we need to do it explicitly for # caller. func_quote eval ${1+"$@"} func_options_result=$func_quote_result } } # func_options_prep [ARG]... # -------------------------- # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and # needs to propagate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before returning. func_hookable func_options_prep func_options_prep () { $debug_cmd # Option defaults: opt_verbose=false opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} func_propagate_result func_run_hooks func_options_prep } # func_parse_options [ARG]... # --------------------------- # The main option parsing loop. func_hookable func_parse_options func_parse_options () { $debug_cmd _G_parse_options_requote=false # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} func_propagate_result func_run_hooks func_parse_options if $func_propagate_result_result; then eval set dummy "$func_parse_options_result"; shift # Even though we may have changed "$@", we passed the "$@" array # down into the hook and it quoted it for us (because we are in # this if-branch). No need to quote it again. _G_parse_options_requote=false fi # Break out of the loop if we already parsed every option. test $# -gt 0 || break # We expect that one of the options parsed in this function matches # and thus we remove _G_opt from "$@" and need to re-quote. _G_match_parse_options=: _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' func_echo "enabling shell trace mode" >&2 $debug_cmd ;; --no-warnings|--no-warning|--no-warn) set dummy --warnings none ${1+"$@"} shift ;; --warnings|--warning|-W) if test $# = 0 && func_missing_arg $_G_opt; then _G_parse_options_requote=: break fi case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above func_append_uniq opt_warning_types " $1" ;; *all) opt_warning_types=$warning_categories ;; *none) opt_warning_types=none warning_func=: ;; *error) opt_warning_types=$warning_categories warning_func=func_fatal_error ;; *) func_fatal_error \ "unsupported warning category: '$1'" ;; esac shift ;; --verbose|-v) opt_verbose=: ;; --version) func_version ;; -\?|-h) func_usage ;; --help) func_help ;; # Separate optargs to long options (plugins may need this): --*=*) func_split_equals "$_G_opt" set dummy "$func_split_equals_lhs" \ "$func_split_equals_rhs" ${1+"$@"} shift ;; # Separate optargs to short options: -W*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "$func_split_short_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-v*|-x*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) _G_parse_options_requote=: ; break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; *) set dummy "$_G_opt" ${1+"$@"}; shift _G_match_parse_options=false break ;; esac if $_G_match_parse_options; then _G_parse_options_requote=: fi done if $_G_parse_options_requote; then # save modified positional parameters for caller func_quote eval ${1+"$@"} func_parse_options_result=$func_quote_result fi } # func_validate_options [ARG]... # ------------------------------ # Perform any sanity checks on option settings and/or unconsumed # arguments. func_hookable func_validate_options func_validate_options () { $debug_cmd # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} func_propagate_result func_run_hooks func_validate_options # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE } ## ----------------- ## ## Helper functions. ## ## ----------------- ## # This section contains the helper functions used by the rest of the # hookable option parser framework in ascii-betical order. # func_fatal_help ARG... # ---------------------- # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { $debug_cmd eval \$ECHO \""Usage: $usage"\" eval \$ECHO \""$fatal_help"\" func_error ${1+"$@"} exit $EXIT_FAILURE } # func_help # --------- # Echo long help message to standard output and exit. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message" exit 0 } # func_missing_arg ARGNAME # ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $debug_cmd func_error "Missing argument for '$1'." exit_cmd=exit } # func_split_equals STRING # ------------------------ # Set func_split_equals_lhs and func_split_equals_rhs shell variables # after splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_equals () { $debug_cmd func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} if test "x$func_split_equals_lhs" = "x$1"; then func_split_equals_rhs= fi }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_equals () { $debug_cmd func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= test "x$func_split_equals_lhs=" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals # func_split_short_opt SHORTOPT # ----------------------------- # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_short_opt () { $debug_cmd func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"} }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_short_opt () { $debug_cmd func_split_short_opt_name=`expr "x$1" : 'x\(-.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt # func_usage # ---------- # Echo short help message to standard output and exit. func_usage () { $debug_cmd func_usage_message $ECHO "Run '$progname --help |${PAGER-more}' for full usage" exit 0 } # func_usage_message # ------------------ # Echo short help message to standard output. func_usage_message () { $debug_cmd eval \$ECHO \""Usage: $usage"\" echo $SED -n 's|^# || /^Written by/{ x;p;x } h /^Written by/q' < "$progpath" echo eval \$ECHO \""$usage_message"\" } # func_version # ------------ # Echo version message to standard output and exit. # The version message is extracted from the calling file's header # comments, with leading '# ' stripped: # 1. First display the progname and version # 2. Followed by the header comment line matching /^# Written by / # 3. Then a blank line followed by the first following line matching # /^# Copyright / # 4. Immediately followed by any lines between the previous matches, # except lines preceding the intervening completely blank line. # For example, see the header comments of this file. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' /^# Written by /!b s|^# ||; p; n :fwd2blnk /./ { n b fwd2blnk } p; n :holdwrnt s|^# || s|^# *$|| /^Copyright /!{ /./H n b holdwrnt } s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| G s|\(\n\)\n*|\1|g p; q' < "$progpath" exit $? } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. scriptversion='(GNU libtool) 2.5.4' # func_version # ------------ # Echo version message to standard output and exit. func_version () { $debug_cmd year=`date +%Y` cat < This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Originally written by Gordon Matzigkeit, 1996 (See AUTHORS for complete contributor listing) EOF exit $? } # func_echo ARG... # ---------------- # Libtool also displays the current mode in messages, so override # funclib.sh func_echo with this custom definition. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" done IFS=$func_echo_IFS } ## ---------------- ## ## Options parsing. ## ## ---------------- ## # Hook in the functions to make sure our own options are parsed during # the option parsing loop. usage='$progpath [OPTION]... [MODE-ARG]...' # Short help message in response to '-h'. usage_message="Options: --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information --finish use operation '--mode=finish' --mode=MODE use operation mode MODE --no-finish don't update shared library cache --no-quiet, --no-silent print default informational messages --no-warnings equivalent to '-Wnone' --preserve-dup-deps don't remove duplicate dependency libraries --quiet, --silent don't print informational messages --reorder-cache=DIRS reorder shared library cache for preferred DIRS --tag=TAG use configuration variables from tag TAG -v, --verbose print more informational messages than default --version print version information -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -h, --help, --help-all print short, long, or detailed help message " # Additional text appended to 'usage_message' in response to '--help'. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. When passed as first option, '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. Try '$progname --help --mode=MODE' for a more detailed description of MODE. When reporting a bug, please describe a test case to reproduce it and include the following information: host-triplet: $host shell: $SHELL compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) version: $progname $scriptversion Debian-2.5.4-4 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . GNU libtool home page: . General help using GNU software: ." exit 0 } # func_lo2o OBJECT-NAME # --------------------- # Transform OBJECT-NAME from a '.lo' suffix to the platform specific # object suffix. lo2o=s/\\.lo\$/.$objext/ o2lo=s/\\.$objext\$/.lo/ if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_lo2o () { case $1 in *.lo) func_lo2o_result=${1%.lo}.$objext ;; * ) func_lo2o_result=$1 ;; esac }' # func_xform LIBOBJ-OR-SOURCE # --------------------------- # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) # suffix to a '.lo' libtool-object suffix. eval 'func_xform () { func_xform_result=${1%.*}.lo }' else # ...otherwise fall back to using sed. func_lo2o () { func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` } func_xform () { func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` } fi # func_fatal_configuration ARG... # ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } # func_config # ----------- # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # ------------- # Display the features supported by this script. func_features () { echo "host: $host" if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag TAGNAME # ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname=$1 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf=/$re_begincf/,/$re_endcf/p # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # libtool_options_prep [ARG]... # ----------------------------- # Preparation for options parsed by libtool. libtool_options_prep () { $debug_mode # Option defaults: opt_config=false opt_dlopen= opt_dry_run=false opt_help=false opt_mode= opt_reorder_cache=false opt_preserve_dup_deps=false opt_quiet=false opt_finishing=true opt_warning= nonopt= preserve_args= _G_rc_lt_options_prep=: _G_rc_lt_options_prep=: # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; *) _G_rc_lt_options_prep=false ;; esac if $_G_rc_lt_options_prep; then # Pass back the list of options. func_quote eval ${1+"$@"} libtool_options_prep_result=$func_quote_result fi } func_add_hook func_options_prep libtool_options_prep # libtool_parse_options [ARG]... # --------------------------------- # Provide handling for libtool specific options. libtool_parse_options () { $debug_cmd _G_rc_lt_parse_options=false # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do _G_match_lt_parse_options=: _G_opt=$1 shift case $_G_opt in --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) func_config ;; --dlopen|-dlopen) opt_dlopen="${opt_dlopen+$opt_dlopen }$1" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) func_features ;; --finish) set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $_G_opt && break opt_mode=$1 case $1 in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument '$1' for $_G_opt" exit_cmd=exit ;; esac shift ;; --no-finish) opt_finishing=false func_append preserve_args " $_G_opt" ;; --no-silent|--no-quiet) opt_quiet=false func_append preserve_args " $_G_opt" ;; --no-warnings|--no-warning|--no-warn) opt_warning=false func_append preserve_args " $_G_opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $_G_opt" ;; --reorder-cache) opt_reorder_cache=true shared_lib_dirs=$1 if test -n "$shared_lib_dirs"; then case $1 in # Must begin with /: /*) ;; # Catch anything else as an error (relative paths) *) func_error "invalid argument '$1' for $_G_opt" func_error "absolute paths are required for $_G_opt" exit_cmd=exit ;; esac fi shift ;; --silent|--quiet) opt_quiet=: opt_verbose=false func_append preserve_args " $_G_opt" ;; --tag) test $# = 0 && func_missing_arg $_G_opt && break opt_tag=$1 func_append preserve_args " $_G_opt $1" func_enable_tag "$1" shift ;; --verbose|-v) opt_quiet=false opt_verbose=: func_append preserve_args " $_G_opt" ;; # An option not handled by this hook function: *) set dummy "$_G_opt" ${1+"$@"} ; shift _G_match_lt_parse_options=false break ;; esac $_G_match_lt_parse_options && _G_rc_lt_parse_options=: done if $_G_rc_lt_parse_options; then # save modified positional parameters for caller func_quote eval ${1+"$@"} libtool_parse_options_result=$func_quote_result fi } func_add_hook func_parse_options libtool_parse_options # func_warning ARG... # ------------------- # Libtool warnings are not categorized, so override funclib.sh # func_warning with this simpler definition. func_warning () { if $opt_warning; then $debug_cmd $warning_func ${1+"$@"} fi } # libtool_validate_options [ARG]... # --------------------------------- # Perform any sanity checks on option settings and/or unconsumed # arguments. libtool_validate_options () { # save first non-option argument if test 0 -lt $#; then nonopt=$1 shift fi # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" case $host_os in # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 cygwin* | mingw* | windows* | pw32* | cegcc* | solaris2* | os2*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match test yes != "$build_libtool_libs" \ && test yes != "$build_old_libs" \ && func_fatal_configuration "not configured to build any kind of library" # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test execute != "$opt_mode"; then func_error "unrecognized option '-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help=$help help="Try '$progname --help --mode=$opt_mode' for more information." } # Pass back the unparsed argument list func_quote eval ${1+"$@"} libtool_validate_options_result=$func_quote_result } func_add_hook func_validate_options libtool_validate_options # Process options as early as possible so that --help and --version # can return quickly. func_options ${1+"$@"} eval set dummy "$func_options_result"; shift ## ----------- ## ## Main. ## ## ----------- ## magic='%%%MAGIC variable%%%' magic_exe='%%%MAGIC EXE variable%%%' # Global variables. extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # func_generated_by_libtool # True iff stdin has been generated by Libtool. This function is only # a basic sanity check; it will hardly flush out determined imposters. func_generated_by_libtool_p () { $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p } # func_lalib_unsafe_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test yes = "$lalib_p" } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { test -f "$1" && $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $debug_cmd save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # 'FILE.' does not work on cygwin managed mounts. func_source () { $debug_cmd case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case $lt_sysroot:$1 in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result='='$func_stripname_result ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $debug_cmd if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=$1 if test yes = "$build_libtool_libs"; then write_lobj=\'$2\' else write_lobj=none fi if test yes = "$build_old_libs"; then write_oldobj=\'$3\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, windows, cygwin, or some other w32 environment. Relies on a # correctly configured wine environment available, with the winepath program # in $build's $PATH. Assumes ARG has no leading or trailing path separator # characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $debug_cmd # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result= if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result"; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $debug_cmd if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $debug_cmd # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $debug_cmd if test -z "$2" && test -n "$1"; then func_error "Could not determine host file name corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result=$1 fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $debug_cmd if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " '$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result=$3 fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $debug_cmd case $4 in $1 ) func_to_host_path_result=$3$func_to_host_path_result ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep # func_convert_delimited_path PATH ORIG_DELIMITER NEW_DELIMITER # Replaces a delimiter for a given path. func_convert_delimited_path () { converted_path=`$ECHO "$1" | $SED "s#$2#$3#g"` } # end func_convert_delimited_path ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via '$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $debug_cmd $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $debug_cmd case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result=$1 } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result=$func_convert_core_file_wine_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via '$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $debug_cmd if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd=func_convert_path_$func_stripname_result fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $debug_cmd func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result=$1 } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_path_wine_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_dll_def_p FILE # True iff FILE is a Windows DLL '.def' file. # Keep in sync with _LT_DLL_DEF_P in libtool.m4 func_dll_def_p () { $debug_cmd func_dll_def_p_tmp=`$SED -n \ -e 's/^[ ]*//' \ -e '/^\(;.*\)*$/d' \ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ -e q \ "$1"` test DEF = "$func_dll_def_p_tmp" } # func_reorder_shared_lib_cache DIRS # Reorder the shared library cache by unconfiguring previous shared library cache # and configuring preferred search directories before previous search directories. # Previous shared library cache: /usr/lib /usr/local/lib # Preferred search directories: /tmp/testing # Reordered shared library cache: /tmp/testing /usr/lib /usr/local/lib func_reorder_shared_lib_cache () { $debug_cmd case $host_os in openbsd*) get_search_directories=`PATH="$PATH:/sbin" ldconfig -r | $GREP "search directories" | $SED "s#.*search directories:\ ##g"` func_convert_delimited_path "$get_search_directories" ':' '\ ' save_search_directories=$converted_path func_convert_delimited_path "$1" ':' '\ ' # Ensure directories exist for dir in $converted_path; do # Ensure each directory is an absolute path case $dir in /*) ;; *) func_error "Directory '$dir' is not an absolute path" exit $EXIT_FAILURE ;; esac # Ensure no trailing slashes func_stripname '' '/' "$dir" dir=$func_stripname_result if test -d "$dir"; then if test -n "$preferred_search_directories"; then preferred_search_directories="$preferred_search_directories $dir" else preferred_search_directories=$dir fi else func_error "Directory '$dir' does not exist" exit $EXIT_FAILURE fi done PATH="$PATH:/sbin" ldconfig -U $save_search_directories PATH="$PATH:/sbin" ldconfig -m $preferred_search_directories $save_search_directories get_search_directories=`PATH="$PATH:/sbin" ldconfig -r | $GREP "search directories" | $SED "s#.*search directories:\ ##g"` func_convert_delimited_path "$get_search_directories" ':' '\ ' reordered_search_directories=$converted_path $ECHO "Original: $save_search_directories" $ECHO "Reordered: $reordered_search_directories" exit $EXIT_SUCCESS ;; *) func_error "--reorder-cache is not supported for host_os=$host_os." exit $EXIT_FAILURE ;; esac } # end func_reorder_shared_lib_cache # func_mode_compile arg... func_mode_compile () { $debug_cmd # Get the compilation command and the source file. base_compile= srcfile=$nonopt # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg=$arg arg_mode=normal ;; target ) libobj=$arg arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs=$IFS; IFS=, for arg in $args; do IFS=$save_ifs func_append_quoted lastarg "$arg" done IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg=$srcfile srcfile=$arg ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj=$func_basename_result } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test yes = "$build_libtool_libs" \ || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_arg pretty "$libobj" test "X$libobj" != "X$func_quote_arg_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname=$func_basename_result xdir=$func_dirname_result lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | windows* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test no = "$compiler_c_o"; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext lockfile=$output_obj.lock else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test warn = "$need_locks"; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_arg pretty "$srcfile" qsrcfile=$func_quote_arg_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test yes = "$build_old_libs"; then if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test yes = "$compiler_c_o"; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking -Wc,FLAG -Xcompiler FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix '.c' with the library object suffix, '.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to '-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the '--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the 'install' or 'cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE use a list of object files found in FILE to specify objects -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wa,FLAG -Xassembler FLAG pass linker-specific FLAG directly to the assembler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with '-') are ignored. Every other argument is treated as a filename. Files ending in '.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in '.la', then a libtool library is created, only library objects ('.lo' files) may be specified, and '-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created using 'ar' and 'ranlib', or on Windows using 'lib'. If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test : = "$opt_help"; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | $SED -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | $SED '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # If option '--reorder-cache', reorder the shared library cache and exit. if $opt_reorder_cache; then func_reorder_shared_lib_cache $shared_lib_dirs fi # func_mode_execute arg... func_mode_execute () { $debug_cmd # The first argument is the command name. cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "'$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir=$func_dirname_result ;; *) func_warning "'-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir=$absdir # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic=$magic # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file=$progdir/$program fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if $opt_dry_run; then # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS else if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd=\$cmd$args fi } test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $debug_cmd libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "'$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument '$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and '=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs" && $opt_finishing; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_quiet && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done if test "false" = "$opt_finishing"; then echo echo "NOTE: finish_cmds were not executed during testing, so you must" echo "manually run ldconfig to add a given test directory, LIBDIR, to" echo "the search path for generated executables." fi echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the '-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the '$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the '$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the '$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $debug_cmd # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. func_quote_arg pretty "$nonopt" install_prog="$func_quote_arg_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_arg pretty "$arg" func_append install_prog "$func_quote_arg_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=false stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_arg pretty "$arg" func_append install_prog " $func_quote_arg_result" if test -n "$arg2"; then func_quote_arg pretty "$arg2" fi func_append install_shared_prog " $func_quote_arg_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_arg pretty "$install_override_mode" func_append install_shared_prog " -m $func_quote_arg_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=: if $isdir; then destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." destdir=$func_dirname_result destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "'$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic=$magic staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir=$func_dirname_result func_append dir "$objdir" if test -n "$relink_command"; then # Strip any trailing slash from the destination. func_stripname '' '/' "$libdir" destlibdir=$func_stripname_result func_stripname '' '/' "$destdir" s_destdir=$func_stripname_result # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking '$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname=$1 shift srcname=$realname test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme=$stripme case $host_os in cygwin* | mingw* | windows* | pw32* | cegcc*) case $realname in *.dll.a) tstripme= ;; esac ;; os2*) case $realname in *_dll.a) tstripme= ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try 'ln -sf' first, because the 'ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name=$func_basename_result instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest=$destfile destfile= ;; *) func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext= case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=.exe fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw* | *windows*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script '$wrapper'" finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then func_warning "'$lib' has not been installed in '$libdir'" finalize=false fi done relink_command= func_source "$wrapper" outputname= if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file=$func_basename_result outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { func_quote_arg expand,pretty "$relink_command" eval "func_echo $func_quote_arg_result" } if eval "$relink_command"; then : else func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file=$outputname else func_warning "cannot relink '$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name=$func_basename_result # Set up the ranlib parameters. oldlib=$destdir/$name func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $debug_cmd my_outputname=$1 my_originator=$2 my_pic_p=${3-false} my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* External symbol declarations for the compiler. */\ " if test yes = "$dlself"; then func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from '$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *windows* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *windows* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" name=$func_basename_result case $host in *cygwin* | *mingw* | *windows* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename= if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname"; then func_basename "$dlprefile_dlname" dlprefile_dlbasename=$func_basename_result else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename"; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 case $host in i[3456]86-*-mingw32*) eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" ;; *) eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/__nm_//' >> '$nlist'" ;; esac } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi func_show_eval '$RM "${nlist}I"' if test -n "$global_symbol_to_import"; then eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[];\ " if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ static void lt_syminit(void) { LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; for (; symbol->name; ++symbol) {" $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" echo >> "$output_objdir/$my_dlsyms" "\ } }" fi echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = { {\"$my_originator\", (void *) 0}," if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ {\"@INIT@\", (void *) <_syminit}," fi case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *windows* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for '$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $debug_cmd win32_libid_type=unknown win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)' >/dev/null; then case $nm_interface in "MS dumpbin") if func_cygming_ms_implib_p "$1" || func_cygming_gnu_implib_p "$1" then win32_nmres=import else win32_nmres= fi ;; *) func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s|.*|import| p q } }'` ;; esac case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $debug_cmd sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $debug_cmd match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive that possess that section. Heuristic: eliminate # all those that have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $debug_cmd if func_cygming_gnu_implib_p "$1"; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1"; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result= fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $debug_cmd f_ex_an_ar_dir=$1; shift f_ex_an_ar_oldlib=$1 if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $debug_cmd my_gentop=$1; shift my_oldlibs=${1+"$@"} my_oldobjs= my_xlib= my_xabs= my_xdir= for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir=$my_gentop/$my_xlib_u func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` func_basename "$darwin_archive" darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches; do func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" cd "unfat-$$/$darwin_base_archive-$darwin_arch" func_extract_an_archive "`pwd`" "$darwin_base_archive" cd "$darwin_curdir" $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result=$my_oldobjs } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw/windows # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw/windows-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" func_quote_arg pretty "$ECHO" qECHO=$func_quote_arg_result $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=$qECHO fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw* | *-*-windows* | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw/windows when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test yes = "$fast_install"; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else \$ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #if defined _WIN32 && !defined __GNUC__ # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* declarations of non-ANSI functions */ #if defined __MINGW32__ # ifdef __STRICT_ANSI__ _CRTIMP int __cdecl _putenv (const char *); # endif #elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ #if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC #elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined other platforms ... */ #endif #if defined PATH_MAX # define LT_PATHMAX PATH_MAX #elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ defined __OS2__ # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free (stale); stale = 0; } \ } while (0) #if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; size_t tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined HAVE_DOS_BASED_FILE_SYSTEM if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined HAVE_DOS_BASED_FILE_SYSTEM } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = (size_t) (q - p); p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (STREQ (str, pat)) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else size_t len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { size_t orig_value_len = strlen (orig_value); size_t add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ size_t len = strlen (new_value); while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw* | windows*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $debug_cmd case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_suncc_cstd_abi # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! # Several compiler flags select an ABI that is incompatible with the # Cstd library. Avoid specifying it if any are in CXXFLAGS. func_suncc_cstd_abi () { $debug_cmd case " $compile_command " in *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) suncc_use_cstd_abi=no ;; *) suncc_use_cstd_abi=yes ;; esac } # func_mode_link arg... func_mode_link () { $debug_cmd case $host in *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= compile_rpath_tail= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=false prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= temp_rpath_tail= thread_safe=no vinfo= vinfo_number=no weak_libs= rpath_arg= single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test yes != "$build_libtool_libs" \ && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg=$1 shift func_quote_arg pretty,unquoted "$arg" qarg=$func_quote_arg_unquoted_result func_append libtool_args " $func_quote_arg_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir=$arg prev= continue ;; dlfiles|dlprefiles) $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=: } case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test no = "$dlself"; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test dlprefiles = "$prev"; then dlself=yes elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test dlfiles = "$prev"; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols=$arg test -f "$arg" \ || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex=$arg prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir=$arg prev= continue ;; mllvm) # Clang does not use LLVM to link, so we can simply discard any # '-mllvm $arg' options when doing the link step. prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object fi # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; then arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; os2dllname) os2dllname=$arg prev= continue ;; precious_regex) precious_files_regex=$arg prev= continue ;; release) release=-$arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "argument to -rpath is not absolute: $arg" ;; esac if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds=$arg prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xassembler) func_append compiler_flags " -Xassembler $qarg" prev= func_append compile_command " -Xassembler $qarg" func_append finalize_command " -Xassembler $qarg" continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg=$arg case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between '-L' and '$1'" else func_fatal_error "need path for '-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of '$dir'" dir=$absdir ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test X-lc = "X$arg" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test X-lc = "X$arg" && continue ;; esac elif test X-lc_r = "X$arg"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -mllvm) prev=mllvm continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. # -q