pax_global_header00006660000000000000000000000064122222263060014507gustar00rootroot0000000000000052 comment=5c46d566bc069ac3a3ba5b6ba3e5437cc2856d0a enca-1.15/000077500000000000000000000000001222222630600123435ustar00rootroot00000000000000enca-1.15/.gitignore000066400000000000000000000002121222222630600143260ustar00rootroot00000000000000Makefile config.h config.log config.status enca.pc libtool stamp-h1 iconvenc.h enca.spec iconvcap autom4te.cache tags TAGS *.swp *~ *.bak enca-1.15/.travis.yml000066400000000000000000000004071222222630600144550ustar00rootroot00000000000000language: c compiler: - gcc - clang before_install: - sudo apt-get update -qq - sudo apt-get install -qq librecode-dev - sudo pip install cpp-coveralls --use-mirrors script: - ./configure --with-gcov && make && make test after_success: - coveralls enca-1.15/AUTHORS000066400000000000000000000007331222222630600134160ustar00rootroot00000000000000David 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. enca-1.15/COPYING000066400000000000000000000432451222222630600134060ustar00rootroot00000000000000 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. enca-1.15/ChangeLog000066400000000000000000000400441222222630600141170ustar00rootroot00000000000000#============================================================================ # Enca v1.15 (2013-09-30) guess and convert encoding of text files # Copyright (C) 2000-2003 David Necas (Yeti) # Copyright (C) 2009-2013 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.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 belarussian 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), Belarussian (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 enca-1.15/ChangeLog.old000066400000000000000000001461271222222630600147050ustar00rootroot00000000000000 # 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 enca-1.15/ChangeLog.prelib000066400000000000000000001427761222222630600154120ustar00rootroot00000000000000 # 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 occurences 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 enca-1.15/FAQ000066400000000000000000000070101222222630600126730ustar00rootroot00000000000000#============================================================================ # Enca v1.15 (2013-09-30) guess and convert encoding of text files # Copyright (C) 2000-2003 David Necas (Yeti) # Copyright (C) 2009-2013 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. enca-1.15/INSTALL000066400000000000000000000250641222222630600134030ustar00rootroot00000000000000#============================================================================ # Enca v1.15 (2013-09-30) guess and convert encoding of text files # Copyright (C) 2000-2003 David Necas (Yeti) # Copyright (C) 2009-2013 Michal Cihar #============================================================================ 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 Enca is known to compile and work on following systems: Version OS Compiler Tester 1.9 Fedora Core 3 gcc 3.4 (1) 0.99.4 RedHat Linux 9 gcc 3.2 (1) 1.6 Debian GNU/Linux 3.0 gcc 2.95.4 (1) 1.2 Mandrake Linux 9.0 gcc 3.2 (1) 0.10.6 BDS/OS 3.1 BSDI gcc 1.42 (2) 0.10.1 IRIX 6.5 MIPSpro 7.3.1.1m (1) 1.2 FreeBSD 4.8 gcc 2.95.4 (3) 0.10.7 Solaris 2.6 gcc (4) 1.6 MinGW, Cygwin gcc (5) 1.7 Mac OS X gcc (6) Testers: (1) (2) (3) (4) (5) (6) Generic GNU installation instructions follows: -------------------------------------------------------------------- Basic Installation ================== These are generic installation instructions. 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, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). 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 at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' 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. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. 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. 4. Type `make install' to install the programs and any data files and documentation. 5. 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. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure 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 must use a version of `make' that supports the `VPATH' variable, such as 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 `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have 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. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' 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. 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'. Optional Features ================= 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. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM 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 host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. 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. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--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. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. enca-1.15/Makefile.am000066400000000000000000000032331222222630600144000ustar00rootroot00000000000000# @(#) $Id: Makefile.am,v 1.35 2005/11/24 10:21:32 yeti Exp $ if 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 \ README.devel \ 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) $$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 enca-1.15/Makefile.in000066400000000000000000000776311222222630600144260ustar00rootroot00000000000000# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog THANKS \ $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ $(srcdir)/config.h.in mkinstalldirs $(srcdir)/enca.spec.in \ $(srcdir)/enca.pc.in COPYING TODO compile config.guess \ config.rpath config.sub depcomp install-sh missing ltmain.sh 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/tools.m4 $(top_srcdir)/m4/typevar.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ 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 -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } 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 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)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = tools script lib src devel-docs test data DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) 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.bz2 GZIP_ENV = --best DIST_TARGETS = dist-bzip2 dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERTER_LIBS = @CONVERTER_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTOCS_PROG = @CSTOCS_PROG@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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@ LIBICONV = @LIBICONV@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ 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_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ 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@ 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 # @(#) $Id: Makefile.am,v 1.35 2005/11/24 10:21:32 yeti Exp $ @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 \ README.devel \ 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 .PRECIOUS: 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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ 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 @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 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: $(DISTFILES) @case `sed 15q $(srcdir)/NEWS` in \ *"$(VERSION)"*) : ;; \ *) \ echo "NEWS not updated; not releasing" 1>&2; \ exit 1;; \ esac $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(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) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-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: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-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 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 ####################### 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) $$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: enca-1.15/NEWS000077700000000000000000000000001222222630600146072ChangeLogustar00rootroot00000000000000enca-1.15/README000077700000000000000000000000001222222630600144752README.mdustar00rootroot00000000000000enca-1.15/README.devel000066400000000000000000000077541222222630600143360ustar00rootroot00000000000000#============================================================================ # Enca v1.15 (2013-09-30) guess and convert encoding of text files # Copyright (C) 2000-2003 David Necas (Yeti) # Copyright (C) 2009-2013 Michal Cihar #============================================================================ Contents 0. Developing programs utilizing libenca 1. How to add a new charset/encoding to libenca 2. How to add a new surface to libenca 3. How to add a new language to libenca 4. Automake, autoconf, libtool, ... note 5. Repository and continuous integration 0. 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 1. 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. 2. 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(). 3. How to add a new language **************************** 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_.... src/lang.c: * Add a new LANGUAGE_LIST[] entry pointing to the ENCA_LANGUAGE_.... 4. 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/. 5. Repository and continuous integration **************************************** The git repository is located at GitHub: http://github.com/nijel/enca There is also continuous integration on Travis: https://travis-ci.org/nijel/enca enca-1.15/README.md000066400000000000000000000041521222222630600136240ustar00rootroot00000000000000# Enca - guess and convert encoding of text files [![build status](https://secure.travis-ci.org/nijel/enca.png)](https://travis-ci.org/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-2013 Michal Cihar ## Description Enca (Extremely Naive Charset Analyser) consists of two main components: * libenca, an encoding detection library. It currently supports Belarussian, Bulgarian, Croatian, Czech, Estonian, 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 Please see INSTALL for system requirements, detailed installation instructions and also for description of optional features that can be selected at ./configure time. For the impatient: Run ./configure make make check make install as usual. ## 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 http://github.com/nijel/enca/, you can download tarballs from http/dl.cihar.com/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. The file README.devel 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. enca-1.15/THANKS000066400000000000000000000026771222222630600132720ustar00rootroot00000000000000Daniel 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 Belarussian 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. enca-1.15/TODO000066400000000000000000000073241222222630600130410ustar00rootroot00000000000000#============================================================================ # Enca v1.15 (2013-09-30) guess and convert encoding of text files # Copyright (C) 2000-2003 David Necas (Yeti) # Copyright (C) 2009-2013 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 occurences, at least, with specificaly 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. enca-1.15/aclocal.m4000066400000000000000000002777261222222630600142300ustar00rootroot00000000000000# generated automatically by aclocal 1.14 -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # 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.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # iconv.m4 serial 18 (gettext-0.18.2) dnl Copyright (C) 2000-2002, 2007-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_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 am_save_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="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, dnl Solaris 10. am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include #include int main () { int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; 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 const char input[] = "\263"; char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 2; 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 const char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; const char *inptr = input; size_t inbytesleft = 1; char *outptr = buf; size_t outbytesleft = 1; size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 4; 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 const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 8; iconv_close (cd_88591_to_utf8); } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) result |= 16; return result; }]])], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], [ changequote(,)dnl case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac changequote([,])dnl ]) LIBS="$am_save_LIBS" ]) case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then AC_DEFINE([HAVE_ICONV], [1], [Define if you have the iconv() function and it works.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST([LIBICONV]) AC_SUBST([LTLIBICONV]) ]) dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to dnl avoid warnings like dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". dnl This is tricky because of the way 'aclocal' is implemented: dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. dnl Otherwise aclocal's initial scan pass would miss the macro definition. dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. dnl Otherwise aclocal would emit many "Use of uninitialized value $1" dnl warnings. m4_define([gl_iconv_AC_DEFUN], m4_version_prereq([2.64], [[AC_DEFUN_ONCE( [$1], [$2])]], [m4_ifdef([gl_00GNULIB], [[AC_DEFUN_ONCE( [$1], [$2])]], [[AC_DEFUN( [$1], [$2])]])])) gl_iconv_AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL([am_cv_proto_iconv], [ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ]], [[]])], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"]) am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([ $am_cv_proto_iconv]) AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], [Define as const if the declaration of iconv() needs const.]) dnl Also substitute ICONV_CONST in the gnulib generated . m4_ifdef([gl_ICONV_H_DEFAULTS], [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) if test -n "$am_cv_proto_iconv_arg1"; then ICONV_CONST="const" fi ]) fi ]) # lib-ld.m4 serial 6 dnl Copyright (C) 1996-2003, 2009-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Subroutines of libtool.m4, dnl with replacements s/_*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 ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL([acl_cv_path_LD], [if test -z "$LD"; then acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$acl_save_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 = 1.10 to complain if config.rpath is missing. m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE([rpath], [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_FROMPACKAGE(name, package) dnl declares that libname comes from the given package. The configure file dnl will then not have a --with-libname-prefix option but a dnl --with-package-prefix option. Several libraries can come from the same dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar dnl macro call that searches for libname. AC_DEFUN([AC_LIB_FROMPACKAGE], [ pushdef([NAME],[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 Autoconf >= 2.61 supports dots in --with options. pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_ARG_WITH(P_A_C_K[-prefix], [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi ]) dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= LTLIB[]NAME= INC[]NAME= LIB[]NAME[]_PREFIX= dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been dnl computed. So it has to be reset here. HAVE_LIB[]NAME= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" dnl The same code as in the loop below: dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$acl_hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = '$1'; then LIB[]NAME[]_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi popdef([P_A_C_K]) popdef([PACKLIBS]) popdef([PACKUP]) popdef([PACK]) popdef([NAME]) ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) dnl For those cases where a variable contains several -L and -l options dnl referring to unknown libraries and directories, this macro determines the dnl necessary additional linker options for the runtime path. dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) dnl sets LDADDVAR to linker options needed together with LIBSVALUE. dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, dnl otherwise linking without libtool is assumed. AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], [ AC_REQUIRE([AC_LIB_RPATH]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) $1= if test "$enable_rpath" != no; then if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode directories into the resulting dnl binary. rpathdirs= next= for opt in $2; do if test -n "$next"; then dir="$next" dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2"; then rpathdirs="$rpathdirs $dir" fi next= else case $opt in -L) next=yes ;; -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ && test "X$dir" != "X/usr/$acl_libdirstem2"; then rpathdirs="$rpathdirs $dir" fi next= ;; *) next= ;; esac fi done if test "X$rpathdirs" != "X"; then if test -n ""$3""; then dnl libtool is used for linking. Use -R options. for dir in $rpathdirs; do $1="${$1}${$1:+ }-R$dir" done else dnl The linker is used for linking directly. if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user dnl must pass all path elements in one option. alldirs= for dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="$flag" else dnl The -rpath options are cumulative. for dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="${$1}${$1:+ }$flag" done fi fi fi fi fi AC_SUBST([$1]) ]) # lib-prefix.m4 serial 7 (gettext-0.18) dnl Copyright (C) 2001-2005, 2008-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't dnl require excessive bracketing. ifdef([AC_HELP_STRING], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib-prefix], [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) dnl AC_LIB_PREPARE_MULTILIB creates dnl - a variable acl_libdirstem, containing the basename of the libdir, either dnl "lib" or "lib64" or "lib/64", dnl - a variable acl_libdirstem2, as a secondary possible value for dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or dnl "lib/amd64". AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ dnl There is no formal standard regarding lib and lib64. dnl On glibc systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine dnl the compiler's default mode by looking at the compiler's library search dnl path. If at least one of its elements ends in /lib64 or points to a dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. dnl Otherwise we use the default, namely "lib". dnl On Solaris systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. AC_REQUIRE([AC_CANONICAL_HOST]) acl_libdirstem=lib acl_libdirstem2= case "$host_os" in solaris*) dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment dnl . dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the dnl symlink is missing, so we set acl_libdirstem2 too. AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], [AC_EGREP_CPP([sixtyfour bits], [ #ifdef _LP64 sixtyfour bits #endif ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) ]) if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" ]) # Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_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.14' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.14], [], [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.14])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # 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], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_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-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # 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 thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_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. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # 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 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_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([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. 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 ]) 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 # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi]) 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-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # 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-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_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-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_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 case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --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-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_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-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_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) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_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-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [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 ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac 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]) 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 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 ]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_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-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_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-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_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 $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 $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 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/tools.m4]) m4_include([m4/typevar.m4]) enca-1.15/autogen.sh000077500000000000000000000126761222222630600143600ustar00rootroot00000000000000#!/bin/sh # @(#) $Id: autogen.sh,v 1.9 2004/11/17 18:11:49 yeti Exp $ # 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) && { (libtool --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`libtool' 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 README.devel." 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 README.devel." 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 README.devel." DIE=1 } if test -z "$NO_LIBTOOL"; then LT_VERSION=`libtool --version | sed -e '2,$ d' -e 's/ *([^()]*)$//' -e 's/.* \(.*\)/\1/' -e 's/-p[0-9]\+//'` 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 README.devel." 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 $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 README.devel?)" 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 "$@" enca-1.15/compile000077500000000000000000000070621222222630600137260ustar00rootroot00000000000000#! /bin/sh # Wrapper for compilers which do not understand `-c -o'. scriptversion=2004-09-10.20 # Copyright (C) 1999, 2000, 2003, 2004 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, 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. # This file is maintained in Automake, please report # bugs to or send patches to # . 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 . EOF exit 0 ;; -v | --v*) echo "compile $scriptversion" exit 0 ;; esac ofile= cfile= eat= 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 -e 's|^.*/||' -e '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 mv "$cofile" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: enca-1.15/config.guess000077500000000000000000001275341222222630600146770ustar00rootroot00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2008-01-23' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, 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. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: enca-1.15/config.h.in000066400000000000000000000160251222222630600143720ustar00rootroot00000000000000/* 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 `canonicalize_file_name' function. */ #undef HAVE_CANONICALIZE_FILE_NAME /* 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 `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_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 `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 to 1 if you have the file `/dev/arandom'. */ #undef HAVE__DEV_ARANDOM /* Define to 1 if you have the file `/dev/random'. */ #undef HAVE__DEV_RANDOM /* Define to 1 if you have the file `/dev/srandom'. */ #undef HAVE__DEV_SRANDOM /* Define to 1 if you have the file `/dev/urandom'. */ #undef HAVE__DEV_URANDOM /* 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 in which 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 you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define to path to the umap recoder. */ #undef UMAP_PROG /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Version number of package */ #undef VERSION /* Define to 1 if on MINIX. */ #undef _MINIX /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `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 to `int' if does not define. */ #undef pid_t /* Define to `unsigned int' if does not define. */ #undef size_t /* Define to `int' if does not define. */ #undef ssize_t /* Define to `int' if doesn't define. */ #undef uid_t /* Define as `fork' if `vfork' does not work. */ #undef vfork enca-1.15/config.rpath000077500000000000000000000352131222222630600146570ustar00rootroot00000000000000#! /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=/' <. Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: enca-1.15/configure000077500000000000000000020023111222222630600142510ustar00rootroot00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for Enca 1.15. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $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 fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Enca' PACKAGE_TARNAME='enca' PACKAGE_VERSION='1.15' PACKAGE_STRING='Enca 1.15' 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_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS 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 OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP SED host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBTOOL EGREP GREP CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_maintainer_mode enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock enable_external with_gcov with_html_dir enable_gtk_doc enable_rpath with_libiconv_prefix with_librecode ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures Enca 1.15 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/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.15:";; 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-fast-install[=PKGS] optimize for fast installation [default=yes] --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-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-gcov compile for coverage tests using gcov (default=no) --with-html-dir=PATH path to installed docs [DATADIR/gtk-doc/html] --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] Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF Enca configure 1.15 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## --------------------------------------------------- ## ## Report this to https://github.com/nijel/enca/issues ## ## --------------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { 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 () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES # --------------------------------------------- # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { #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 eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl 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.15, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_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.14' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else 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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } 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 AM_BACKSLASH='\' 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.15' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # 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. 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 -' # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" for k in m4 ; do ACLOCAL="$ACLOCAL -I $k" ; done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; 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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$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" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= fi if test "$MINIX" = yes; then $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "#define _MINIX 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h $as_echo "#define _ALL_SOURCE 1" >>confdefs.h $as_echo "#define _GNU_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 $as_echo_n "checking for library containing strerror... " >&6; } if ${ac_cv_search_strerror+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char strerror (); int main () { 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$ac_exeext if ${ac_cv_search_strerror+:} false; then : break fi done if ${ac_cv_search_strerror+:} false; then : else ac_cv_search_strerror=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 $as_echo "$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 *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.2' macro_revision='1.3337' ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ 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 $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 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=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; 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 "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | 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 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd* | 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__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/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' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; 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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$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= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # Extract the first word of "mktemp", so it can be a program name with args. set dummy mktemp; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MKTEMP_PROG+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MKTEMP_PROG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi MKTEMP_PROG=$ac_cv_path_MKTEMP_PROG if test -n "$MKTEMP_PROG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP_PROG" >&5 $as_echo "$MKTEMP_PROG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$GCC" = yes; then CFLAGS="-Wall -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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_CSTOCS_PROG+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CSTOCS_PROG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi CSTOCS_PROG=$ac_cv_path_CSTOCS_PROG if test -n "$CSTOCS_PROG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CSTOCS_PROG" >&5 $as_echo "$CSTOCS_PROG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "recode", so it can be a program name with args. set dummy recode; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_RECODE_PROG+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_RECODE_PROG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi RECODE_PROG=$ac_cv_path_RECODE_PROG if test -n "$RECODE_PROG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RECODE_PROG" >&5 $as_echo "$RECODE_PROG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "umap", so it can be a program name with args. set dummy umap; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_UMAP_PROG+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_UMAP_PROG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi UMAP_PROG=$ac_cv_path_UMAP_PROG if test -n "$UMAP_PROG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UMAP_PROG" >&5 $as_echo "$UMAP_PROG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "piconv", so it can be a program name with args. set dummy piconv; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PICONV_PROG+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PICONV_PROG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PICONV_PROG=$ac_cv_path_PICONV_PROG if test -n "$PICONV_PROG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PICONV_PROG" >&5 $as_echo "$PICONV_PROG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "map", so it can be a program name with args. set dummy map; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MAP_PROG+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MAP_PROG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi MAP_PROG=$ac_cv_path_MAP_PROG if test -n "$MAP_PROG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAP_PROG" >&5 $as_echo "$MAP_PROG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Check whether --enable-external was given. if test "${enable_external+set}" = set; 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 WANT_EXTERNAL=yes fi # Check whether --with-gcov was given. if test "${with_gcov+set}" = set; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GCOV+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GCOV=$ac_cv_path_GCOV if test -n "$GCOV"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5 $as_echo "$GCOV" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$GCOV" -a "$using_gcov" = "yes" then GCOV_FLAGS="--coverage" GCOV_CPPFLAGS=${GCOV_FLAGS} GCOV_LDFLAGS=${GCOV_FLAGS} fi if false; then cat >>confdefs.h <<_ACEOF #define CSTOCS_PROG "" _ACEOF cat >>confdefs.h <<_ACEOF #define MAP_PROG "" _ACEOF cat >>confdefs.h <<_ACEOF #define RECODE_PROG "" _ACEOF cat >>confdefs.h <<_ACEOF #define PICONV_PROG "" _ACEOF cat >>confdefs.h <<_ACEOF #define UMAP_PROG "" _ACEOF 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 cat >>confdefs.h <<_ACEOF #define $wPROG "$wPROGcv" _ACEOF 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+set}" = set; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_GTKDOC+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GTKDOC="true" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_GTKDOC" && ac_cv_prog_GTKDOC="false" fi fi GTKDOC=$ac_cv_prog_GTKDOC if test -n "$GTKDOC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC" >&5 $as_echo "$GTKDOC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi gtk_doc_min_version=1.0 if $GTKDOC ; then gtk_doc_version=`gtkdoc-mkdb --version` { $as_echo "$as_me:${as_lineno-$LINENO}: checking gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version" >&5 $as_echo_n "checking gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version... " >&6; } if perl <= "$gtk_doc_min_version") ? 0 : 1); EOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } GTKDOC=false fi fi # Check whether --enable-gtk-doc was given. if test "${enable_gtk_doc+set}" = set; then : enableval=$enable_gtk_doc; enable_gtk_doc="$enableval" else enable_gtk_doc=auto 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/random" >&5 $as_echo_n "checking for /dev/random... " >&6; } if ${ac_cv_file__dev_random+:} false; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/dev/random"; then ac_cv_file__dev_random=yes else ac_cv_file__dev_random=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_random" >&5 $as_echo "$ac_cv_file__dev_random" >&6; } if test "x$ac_cv_file__dev_random" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__DEV_RANDOM 1 _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5 $as_echo_n "checking for /dev/urandom... " >&6; } if ${ac_cv_file__dev_urandom+:} false; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/dev/urandom"; then ac_cv_file__dev_urandom=yes else ac_cv_file__dev_urandom=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5 $as_echo "$ac_cv_file__dev_urandom" >&6; } if test "x$ac_cv_file__dev_urandom" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__DEV_URANDOM 1 _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/srandom" >&5 $as_echo_n "checking for /dev/srandom... " >&6; } if ${ac_cv_file__dev_srandom+:} false; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/dev/srandom"; then ac_cv_file__dev_srandom=yes else ac_cv_file__dev_srandom=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_srandom" >&5 $as_echo "$ac_cv_file__dev_srandom" >&6; } if test "x$ac_cv_file__dev_srandom" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__DEV_SRANDOM 1 _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/arandom" >&5 $as_echo_n "checking for /dev/arandom... " >&6; } if ${ac_cv_file__dev_arandom+:} false; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/dev/arandom"; then ac_cv_file__dev_arandom=yes else ac_cv_file__dev_arandom=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_arandom" >&5 $as_echo "$ac_cv_file__dev_arandom" >&6; } if test "x$ac_cv_file__dev_arandom" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__DEV_ARANDOM 1 _ACEOF fi if test "$prefix" = "NONE"; then LDFLAGS="$LDFLAGS -L$ac_default_prefix/lib" CPPFLAGS="$CPPFLAGS -I$ac_default_prefix/include" else LDFLAGS="$LDFLAGS -L$prefix/lib" CPPFLAGS="$CPPFLAGS -I$prefix/include" 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*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5 $as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; } if ${ac_cv_lib_mw__mwvalidcheckl+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char _mwvalidcheckl (); int main () { return _mwvalidcheckl (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_mw__mwvalidcheckl=yes else ac_cv_lib_mw__mwvalidcheckl=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5 $as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; } if test "x$ac_cv_lib_mw__mwvalidcheckl" = xyes; then : LIBM="-lmw" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 $as_echo_n "checking for sqrt in -lm... " >&6; } if ${ac_cv_lib_m_sqrt+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char sqrt (); int main () { return sqrt (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_sqrt=yes else ac_cv_lib_m_sqrt=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 $as_echo "$ac_cv_lib_m_sqrt" >&6; } if test "x$ac_cv_lib_m_sqrt" = xyes; then : LIBM="$LIBM -lm" fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 $as_echo_n "checking for sqrt in -lm... " >&6; } if ${ac_cv_lib_m_sqrt+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char sqrt (); int main () { return sqrt (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_sqrt=yes else ac_cv_lib_m_sqrt=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 $as_echo "$ac_cv_lib_m_sqrt" >&6; } if test "x$ac_cv_lib_m_sqrt" = xyes; then : LIBM="-lm" fi ;; esac LIBS="$LIBS $LIBM" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } if ${ac_cv_header_sys_wait_h+:} false; then : $as_echo_n "(cached) " >&6 else 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 () { 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 ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 $as_echo "$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } if ${ac_cv_header_stat_broken+:} false; then : $as_echo_n "(cached) " >&6 else 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 ac_cv_header_stat_broken=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 $as_echo "$ac_cv_header_stat_broken" >&6; } if test $ac_cv_header_stat_broken = yes; then $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if ${ac_cv_header_stdbool_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdbool_h=yes else ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi if test $ac_cv_header_stdbool_h = yes; then $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h fi for ac_header in \ 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 do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #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}; /* AIX 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; } { /* AIX 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 ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#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 cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF 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 cat >>confdefs.h <<_ACEOF #define mode_t int _ACEOF 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 cat >>confdefs.h <<_ACEOF #define off_t long int _ACEOF 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 cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 $as_echo_n "checking for uid_t in sys/types.h... " >&6; } if ${ac_cv_type_uid_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "uid_t" >/dev/null 2>&1; then : ac_cv_type_uid_t=yes else ac_cv_type_uid_t=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 $as_echo "$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then $as_echo "#define uid_t int" >>confdefs.h $as_echo "#define gid_t int" >>confdefs.h 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 cat >>confdefs.h <<_ACEOF #define ssize_t int _ACEOF fi # FIXME: This is crude. It seems to work on Linux, though. ac_fn_c_check_decl "$LINENO" "LC_MESSAGES" "ac_cv_have_decl_LC_MESSAGES" "#include " if test "x$ac_cv_have_decl_LC_MESSAGES" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_LC_MESSAGES $ac_have_decl _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for program_invocation_short_name" >&5 $as_echo_n "checking for program_invocation_short_name... " >&6; } if ${yeti_cv_lib_c_program_invocation_short_name+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { 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 yeti_cv_lib_c_program_invocation_short_name=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $yeti_cv_lib_c_program_invocation_short_name" >&5 $as_echo "$yeti_cv_lib_c_program_invocation_short_name" >&6; } if test "$yeti_cv_lib_c_program_invocation_short_name" = yes; then $as_echo "#define HAVE_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h fi for ac_header in vfork.h do : ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" if test "x$ac_cv_header_vfork_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VFORK_H 1 _ACEOF fi done for ac_func in fork vfork do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 $as_echo_n "checking for working fork... " >&6; } if ${ac_cv_func_fork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_fork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* By Ruediger Kuhlmann. */ return fork () < 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_fork_works=yes else ac_cv_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 $as_echo_n "checking for working vfork... " >&6; } if ${ac_cv_func_vfork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_vfork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include #ifdef HAVE_VFORK_H # include #endif /* 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 #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { 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 () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); 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); /* 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 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 ac_cv_func_vfork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 $as_echo "$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 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h else $as_echo "#define vfork fork" >>confdefs.h fi if test "x$ac_cv_func_fork_works" = xyes; then $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h fi for ac_func in \ canonicalize_file_name \ ftruncate \ gettimeofday \ isatty \ nl_langinfo \ random \ realpath \ strstr \ stpcpy \ setlocale \ ttyname \ wordexp do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long" if test "x$ac_cv_func_getopt_long" = xyes; then : $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h else case " $LIBOBJS " in *" getopt_long.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext" ;; 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_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # 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 ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${acl_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$acl_save_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 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${acl_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 $as_echo_n "checking for shared library run path origin... " >&6; } if ${acl_cv_rpath+:} false; then : $as_echo_n "(cached) " >&6 else CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 $as_echo "$acl_cv_rpath" >&6; } wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then : enableval=$enable_rpath; : else enable_rpath=yes fi acl_libdirstem=lib acl_libdirstem2= case "$host_os" in solaris*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 $as_echo_n "checking for 64-bit host... " >&6; } if ${gl_cv_solaris_64bit+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef _LP64 sixtyfour bits #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "sixtyfour bits" >/dev/null 2>&1; then : gl_cv_solaris_64bit=yes else gl_cv_solaris_64bit=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 $as_echo "$gl_cv_solaris_64bit" >&6; } if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 case "$host_cpu" in sparc*) acl_libdirstem2=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libiconv-prefix was given. if test "${with_libiconv_prefix+set}" = set; then : withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" if test "$acl_libdirstem2" != "$acl_libdirstem" \ && ! test -d "$withval/$acl_libdirstem"; then additional_libdir="$withval/$acl_libdirstem2" fi fi fi fi LIBICONV= LTLIBICONV= INCICONV= LIBICONV_PREFIX= HAVE_LIBICONV= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='iconv ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" else LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ;; esac done fi else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" done fi am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } if ${am_cv_func_iconv+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_lib_iconv=yes am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 $as_echo "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 $as_echo_n "checking for working iconv... " >&6; } if ${am_cv_func_iconv_works+:} false; then : $as_echo_n "(cached) " >&6 else am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi if test "$cross_compiling" = yes; then : case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; 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 const char input[] = "\263"; char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 2; 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 const char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; const char *inptr = input; size_t inbytesleft = 1; char *outptr = buf; size_t outbytesleft = 1; size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 4; 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 const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 8; iconv_close (cd_88591_to_utf8); } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) result |= 16; return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : am_cv_func_iconv_works=yes else am_cv_func_iconv_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi LIBS="$am_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 $as_echo "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then $as_echo "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 $as_echo_n "checking how to link with libiconv... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 $as_echo "$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi if test "$am_cv_func_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 $as_echo_n "checking for iconv declaration... " >&6; } if ${am_cv_proto_iconv+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : am_cv_proto_iconv_arg1="" else am_cv_proto_iconv_arg1="const" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" fi am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_proto_iconv" >&5 $as_echo " $am_cv_proto_iconv" >&6; } cat >>confdefs.h <<_ACEOF #define ICONV_CONST $am_cv_proto_iconv_arg1 _ACEOF fi CONVERTER_LIBS="$CONVERTER_LIBS $LIBICONV" libiconv_ok="$am_cv_func_iconv" if test "$libiconv_ok" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iconv implementation is usable" >&5 $as_echo_n "checking whether iconv implementation is usable... " >&6; } if $CC -o iconvcap$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS $srcdir/iconvcap.c $LIBS $CONVERTER_LIBS 1>&5 2>&5 && test -s ./iconvcap$ac_exeext 2>&5; then if ./iconvcap 2>&5 >iconvenc.h; then libiconv_ok=yes else libiconv_ok=no fi else libiconv_ok=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libiconv_ok" >&5 $as_echo "$libiconv_ok" >&6; } if test "$libiconv_ok" = yes; then $as_echo "#define HAVE_GOOD_ICONV 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iconv is transitive" >&5 $as_echo_n "checking whether iconv is transitive... " >&6; } if ${yeti_cv_lib_c_iconv_transitive+:} false; then : $as_echo_n "(cached) " >&6 else if ./iconvcap iconvenc.h 2>&5; then yeti_cv_lib_c_iconv_transitive=yes else yeti_cv_lib_c_iconv_transitive=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $yeti_cv_lib_c_iconv_transitive" >&5 $as_echo "$yeti_cv_lib_c_iconv_transitive" >&6; } if test "$yeti_cv_lib_c_iconv_transitive" = yes; then $as_echo "#define ICONV_IS_TRANSITIVE 1" >>confdefs.h else { $as_echo "$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 $as_echo "$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 if test "$libiconv_ok" != "yes"; then cat $srcdir/tools/iconvenc.null >iconvenc.h fi # Check whether --with-librecode was given. if test "${with_librecode+set}" = set; 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 WANT_LIBRECODE=1 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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recode_new_outer in librecode" >&5 $as_echo_n "checking for recode_new_outer in librecode... " >&6; } if ${yeti_cv_lib_recode_new_outer+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ char* program_name = ""; int main () { recode_new_outer(0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : yeti_cv_lib_recode_new_outer=yes else yeti_cv_lib_recode_new_outer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $yeti_cv_lib_recode_new_outer" >&5 $as_echo "$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 librecode_ok=no 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 librecode_ok=no fi fi if test "$librecode_ok" = yes; then $as_echo "#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 cat >>confdefs.h <<_ACEOF #define DEFAULT_CONVERTER_LIST "$DEFAULT_CONVERTER_LIST" _ACEOF if test "$WANT_EXTERNAL" = "yes" -a "$ac_cv_func_fork_works" = "yes"; then $as_echo "#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 cat >>confdefs.h <<_ACEOF #define DEFAULT_EXTERNAL_CONVERTER "$DEFAULT_EXTERNAL_CONVERTER" _ACEOF locale_alias_ok=no if test "$ac_cv_func_setlocale" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale.alias" >&5 $as_echo_n "checking for locale.alias... " >&6; } if ${yeti_cv_file_locale_alias+:} false; then : $as_echo_n "(cached) " >&6 else 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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $yeti_cv_file_locale_alias" >&5 $as_echo "$yeti_cv_file_locale_alias" >&6; } if test -n "$yeti_cv_file_locale_alias"; then locale_alias_ok=yes $as_echo "#define HAVE_LOCALE_ALIAS 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define LOCALE_ALIAS_PATH "$yeti_cv_file_locale_alias" _ACEOF 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_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${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 "${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" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by Enca $as_me 1.15, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ Enca config.status 1.15 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' 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"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "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+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # 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. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="" # ### BEGIN LIBTOOL CONFIG # 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 # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi 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 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expect build to fail since we depend on \"ISO C headers\"" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expect build to fail since we depend on \"unistd.h\"" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expect build to fail since we depend on \"sys/types.h\"" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expect build to fail since we depend on \"sys/stat.h\"" >&5 $as_echo "$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'." enca-1.15/configure.ac000066400000000000000000000170311222222630600146330ustar00rootroot00000000000000dnl configure.in by David Necas (Yeti) dnl @(#) $Id: configure.ac,v 1.34 2005/12/18 12:07:46 yeti Exp $ 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.15, [https://github.com/nijel/enca/issues]) AC_PREREQ(2.52) 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-bzip2]) 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 AC_GNU_SOURCE AC_AIX AC_ISC_POSIX AC_PROG_LIBTOOL 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 -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 Check for good random number sources AC_CHECK_FILES(/dev/random /dev/urandom /dev/srandom /dev/arandom) dnl Dirty path hack. Helps some people with badly set up search paths. if test "$prefix" = "NONE"; then LDFLAGS="$LDFLAGS -L$ac_default_prefix/lib" CPPFLAGS="$CPPFLAGS -I$ac_default_prefix/include" else LDFLAGS="$LDFLAGS -L$prefix/lib" CPPFLAGS="$CPPFLAGS -I$prefix/include" fi 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( \ canonicalize_file_name \ 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 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'." enca-1.15/data/000077500000000000000000000000001222222630600132545ustar00rootroot00000000000000enca-1.15/data/.gitignore000066400000000000000000000000171222222630600152420ustar00rootroot00000000000000.deps Makefile enca-1.15/data/Letters000066400000000000000000000127211222222630600146240ustar00rootroot0000000000000000c0 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 enca-1.15/data/Makefile.am000066400000000000000000000062461222222630600153200ustar00rootroot00000000000000# @(#) $Id: Makefile.am,v 1.22 2005/12/01 10:13:50 yeti Exp $ noinst_PROGRAMS = \ basetoc \ countall \ countpair \ findletters \ mystrings \ pairtoc \ xlt noinst_DATA = $(BASES) $(RAWCOUNTS) $(PAIRCOUNTS) $(MAPS) Letters noinst_HEADERS = \ belarussian/belarussian.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 \ 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 \ belarussian/doit.sh \ bulgarian/doit.sh \ croatian/doit.sh \ czech/doit.sh \ estonian/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 = \ belarussian/cp1251.base \ bulgarian/cp1251.base \ croatian/cp1250.base \ czech/iso88592.base \ estonian/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 = \ belarussian/rawcounts.cp1251 \ bulgarian/rawcounts.cp1251 \ croatian/rawcounts.cp1250 \ czech/rawcounts.iso88592 \ estonian/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 = \ belarussian/paircounts.cp1251 \ belarussian/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) enca-1.15/data/Makefile.in000066400000000000000000000563251222222630600153340ustar00rootroot00000000000000# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = basetoc$(EXEEXT) countall$(EXEEXT) \ countpair$(EXEEXT) findletters$(EXEEXT) mystrings$(EXEEXT) \ pairtoc$(EXEEXT) xlt$(EXEEXT) subdir = data DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp \ $(noinst_HEADERS) README 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/tools.m4 $(top_srcdir)/m4/typevar.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h 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__depfiles_maybe = depfiles 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)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERTER_LIBS = @CONVERTER_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTOCS_PROG = @CSTOCS_PROG@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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@ LIBICONV = @LIBICONV@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ 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_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ 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@ 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 = \ belarussian/belarussian.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 \ 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 \ belarussian/doit.sh \ bulgarian/doit.sh \ croatian/doit.sh \ czech/doit.sh \ estonian/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 = \ belarussian/cp1251.base \ bulgarian/cp1251.base \ croatian/cp1250.base \ czech/iso88592.base \ estonian/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 = \ belarussian/rawcounts.cp1251 \ bulgarian/rawcounts.cp1251 \ croatian/rawcounts.cp1250 \ czech/rawcounts.iso88592 \ estonian/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 = \ belarussian/paircounts.cp1251 \ belarussian/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 .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @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: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list 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@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/countall.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/countpair.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findletters.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mystrings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pairtoc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xlt.Po@am__quote@ .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: $(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: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-local clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -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 -rf ./$(DEPDIR) -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 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 # 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: enca-1.15/data/README000066400000000000000000000070361222222630600141420ustar00rootroot00000000000000=== 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 occurences: $ ./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/Belarussian). 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 enca-1.15/data/basetoc.c000066400000000000000000000013501222222630600150370ustar00rootroot00000000000000#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; } enca-1.15/data/belarussian/000077500000000000000000000000001222222630600155645ustar00rootroot00000000000000enca-1.15/data/belarussian/belarussian.h000066400000000000000000001534241222222630600202560ustar00rootroot00000000000000/***** 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 enca-1.15/data/belarussian/cp1251.base000066400000000000000000000003221222222630600173300ustar00rootroot00000000000000 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 enca-1.15/data/belarussian/doit.sh000077500000000000000000000003501222222630600170600ustar00rootroot00000000000000#! /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 enca-1.15/data/belarussian/paircounts.cp1251000066400000000000000000000011241222222630600206060ustar00rootroot00000000000000.:òר :. : :. :. :. :. : : : : : : : : : : :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. : :. :. :. :. :. :. :. :. :. enca-1.15/data/belarussian/paircounts.ibm866000066400000000000000000000011351222222630600207100ustar00rootroot00000000000000.:i᧠⪣耫另I񓌊䖘 I:. i:.⢧ :. : : : : : : : : : : :. :. :. :. :.橡i :력i. :i :i. :.ઢ :.୫碯 :. :.iଡ :. :i. :i. :.i뭫 :i.㭮 :.ࢭᩣ祧 :८i :.謣 :猪i㫢. :. :.ᤫ塣 :i :.i :i :. :. :.孪i੯褧 :. :. :. :.૤⡧ : :. :.᭫覢 enca-1.15/data/belarussian/rawcounts.cp1251000066400000000000000000000042761222222630600204570ustar00rootroot000000000000000x09 . 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 enca-1.15/data/bulgarian/000077500000000000000000000000001222222630600152205ustar00rootroot00000000000000enca-1.15/data/bulgarian/bulgarian.h000066400000000000000000001103551222222630600173420ustar00rootroot00000000000000/***** 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 enca-1.15/data/bulgarian/cp1251.base000066400000000000000000000003311222222630600167640ustar00rootroot00000000000000 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 enca-1.15/data/bulgarian/doit.sh000077500000000000000000000000761222222630600165210ustar00rootroot00000000000000#! /bin/bash ../doit.sh cp1251 iso88595 ibm855 maccyr ecma113 enca-1.15/data/bulgarian/paircounts.cp1251000066400000000000000000000007531222222630600202510ustar00rootroot00000000000000.: :. :. : :. : : : : : :. : :. :. :. :. :. :. :. :. :. :. :. :. :. : :. :. :. :. : :. : : :. : : :. enca-1.15/data/bulgarian/rawcounts.cp1251000066400000000000000000000036321222222630600201060ustar00rootroot000000000000000x00 . 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 enca-1.15/data/chinese/000077500000000000000000000000001222222630600146725ustar00rootroot00000000000000enca-1.15/data/chinese/chinese.h000066400000000000000000000005411222222630600164610ustar00rootroot00000000000000/* This header file is in the public domain. */ #ifndef CHINESE_H #define CHINESE_H #include struct zh_weight { unsigned char name[2]; 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 enca-1.15/data/chinese/zh_weight_big5.h000066400000000000000000000605431222222630600177510ustar00rootroot00000000000000/* 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)); } enca-1.15/data/chinese/zh_weight_big5.txt000066400000000000000000000145441222222630600203410ustar00rootroot00000000000000struct 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 enca-1.15/data/chinese/zh_weight_gb.txt000066400000000000000000000145441222222630600201030ustar00rootroot00000000000000struct 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 enca-1.15/data/chinese/zh_weight_gbk.h000066400000000000000000000632461222222630600176710ustar00rootroot00000000000000/* 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; } enca-1.15/data/clean.sh000077500000000000000000000004431222222630600146760ustar00rootroot00000000000000#! /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 *~ 2>/dev/null enca-1.15/data/countall.c000066400000000000000000000006701222222630600152440ustar00rootroot00000000000000#include #include #define isbinary(x) (iscntrl(x) || (x) == 127) #define FILL_CHARACTER '.' int main(void) { unsigned long int count[0x100]; int i, c; 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; } enca-1.15/data/countpair.c000066400000000000000000000044011222222630600154230ustar00rootroot00000000000000#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; int i, killme, c, last; unsigned long j, sum; /* 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 = (c == EOF); if (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:", c); while (i < last && count[2*i+1]/0x100 == c) { printf("%c", count[2*i+1]%0x100); i++; } printf("\n"); } return 0; } /* vim: ts=2 */ enca-1.15/data/croatian/000077500000000000000000000000001222222630600150545ustar00rootroot00000000000000enca-1.15/data/croatian/cp1250.base000066400000000000000000000001001222222630600166110ustar00rootroot00000000000000 414 409 5188 3876 263 587 84 5403 6857 1415 enca-1.15/data/croatian/croatian.h000066400000000000000000000323141222222630600170300ustar00rootroot00000000000000/***** 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 enca-1.15/data/croatian/doit.sh000077500000000000000000000000721222222630600163510ustar00rootroot00000000000000#! /bin/bash ../doit.sh cp1250 iso88592 ibm852 macce cork enca-1.15/data/croatian/rawcounts.cp1250000066400000000000000000000030261222222630600177360ustar00rootroot000000000000000x09 . 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 enca-1.15/data/czech/000077500000000000000000000000001222222630600143505ustar00rootroot00000000000000enca-1.15/data/czech/czech.h000066400000000000000000000425341222222630600156250ustar00rootroot00000000000000/***** 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 enca-1.15/data/czech/doit.sh000077500000000000000000000001121222222630600156400ustar00rootroot00000000000000#! /bin/bash ../doit.sh iso88592 cp1250 ibm852 keybcs2 macce koi8cs2 cork enca-1.15/data/czech/iso88592.base000066400000000000000000000002171222222630600164160ustar00rootroot00000000000000 37 33 1751 121 2506 56 63 14 14 56 42 34 4600 2110 1874 3563 5975 129 121 73 2421 987 193 1618 enca-1.15/data/czech/rawcounts.iso88592000066400000000000000000000027731222222630600175420ustar00rootroot000000000000000 . 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 enca-1.15/data/doit.sh000077500000000000000000000031051222222630600145510ustar00rootroot00000000000000#! /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. enca-1.15/data/estonian/000077500000000000000000000000001222222630600150745ustar00rootroot00000000000000enca-1.15/data/estonian/doit.sh000077500000000000000000000001061222222630600163670ustar00rootroot00000000000000#! /bin/bash ../doit.sh iso88594 cp1257 ibm775 iso885913 macce baltic enca-1.15/data/estonian/estonian.h000066400000000000000000000364401222222630600170740ustar00rootroot00000000000000/***** 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 enca-1.15/data/estonian/iso88594.base000066400000000000000000000001031222222630600171360ustar00rootroot00000000000000 8 6 143 63 33 66 8 169 5657 5588 2041 3469 enca-1.15/data/estonian/rawcounts.iso88594000066400000000000000000000027051222222630600202630ustar00rootroot000000000000000x0a . 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 enca-1.15/data/extreme.pl000077500000000000000000000016341222222630600152710ustar00rootroot00000000000000#!/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; } } enca-1.15/data/findletters.c000066400000000000000000000007221222222630600157440ustar00rootroot00000000000000#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; } enca-1.15/data/hungarian/000077500000000000000000000000001222222630600152305ustar00rootroot00000000000000enca-1.15/data/hungarian/doit.sh000077500000000000000000000000721222222630600165250ustar00rootroot00000000000000#! /bin/bash ../doit.sh iso88592 cp1250 ibm852 macce cork enca-1.15/data/hungarian/hungarian.h000066400000000000000000000323141222222630600173600ustar00rootroot00000000000000/***** 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 enca-1.15/data/hungarian/iso88592.base000066400000000000000000000001261222222630600172750ustar00rootroot00000000000000 65 162 28 49 35 5950 5523 846 1611 1444 2019 612 316 1016 enca-1.15/data/hungarian/rawcounts.iso88592000066400000000000000000000032501222222630600204110ustar00rootroot000000000000000x09 . 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 enca-1.15/data/latvian/000077500000000000000000000000001222222630600147125ustar00rootroot00000000000000enca-1.15/data/latvian/cp1257.base000066400000000000000000000002041222222630600164630ustar00rootroot00000000000000 0 172 11 14 6 2 68 22 6 102 3 11 6 5926 3448 145 69 567 3465 837 2015 1786 1363 382 enca-1.15/data/latvian/doit.sh000077500000000000000000000001061222222630600162050ustar00rootroot00000000000000#! /bin/bash ../doit.sh cp1257 iso88594 ibm775 iso885913 macce baltic enca-1.15/data/latvian/latvian.h000066400000000000000000000364401222222630600165300ustar00rootroot00000000000000/***** 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 enca-1.15/data/latvian/rawcounts.cp1257000066400000000000000000000031501222222630600176010ustar00rootroot000000000000000x0a . 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 enca-1.15/data/lithuanian/000077500000000000000000000000001222222630600154105ustar00rootroot00000000000000enca-1.15/data/lithuanian/cp1257.base000066400000000000000000000001501222222630600171610ustar00rootroot00000000000000 4 51 1 40 9 313 3 4 188 2811 2122 866 1527 5758 5069 3943 1589 3408 enca-1.15/data/lithuanian/doit.sh000077500000000000000000000001061222222630600167030ustar00rootroot00000000000000#! /bin/bash ../doit.sh cp1257 iso88594 ibm775 iso885913 macce baltic enca-1.15/data/lithuanian/lithuanian.h000066400000000000000000000364401222222630600177240ustar00rootroot00000000000000/***** 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 enca-1.15/data/lithuanian/rawcounts.cp1257000066400000000000000000000035311222222630600203020ustar00rootroot000000000000000x09 . 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 enca-1.15/data/makepaircounts.sh000077500000000000000000000010451222222630600166400ustar00rootroot00000000000000#! /bin/bash textdir=/none/tmp/texts maps=maps letters=letters subdirs="belarussian 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" = "belarussian"; 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 enca-1.15/data/map2letters.sh000077500000000000000000000002401222222630600160510ustar00rootroot00000000000000#! /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 enca-1.15/data/maps/000077500000000000000000000000001222222630600142145ustar00rootroot00000000000000enca-1.15/data/maps/baltic.map000066400000000000000000000024001222222630600161450ustar00rootroot000000000000000000 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 enca-1.15/data/maps/cork.map000066400000000000000000000024001222222630600156450ustar00rootroot000000000000000060 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 enca-1.15/data/maps/cp1125.map000066400000000000000000000024001222222630600156220ustar00rootroot000000000000000000 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 enca-1.15/data/maps/cp1250.map000066400000000000000000000024001222222630600156210ustar00rootroot000000000000000000 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 enca-1.15/data/maps/cp1251.map000066400000000000000000000024001222222630600156220ustar00rootroot000000000000000000 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 enca-1.15/data/maps/cp1257.map000066400000000000000000000024001222222630600156300ustar00rootroot000000000000000000 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 enca-1.15/data/maps/ecma113.map000066400000000000000000000024001222222630600160410ustar00rootroot000000000000000000 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 enca-1.15/data/maps/ibm775.map000066400000000000000000000024001222222630600157210ustar00rootroot000000000000000000 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 enca-1.15/data/maps/ibm852.map000066400000000000000000000024001222222630600157150ustar00rootroot000000000000000000 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 enca-1.15/data/maps/ibm855.map000066400000000000000000000024001222222630600157200ustar00rootroot000000000000000000 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 enca-1.15/data/maps/ibm866-bad.map000066400000000000000000000024001222222630600164460ustar00rootroot000000000000000000 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 enca-1.15/data/maps/ibm866.map000066400000000000000000000024001222222630600157220ustar00rootroot000000000000000000 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 enca-1.15/data/maps/iso885913.map000066400000000000000000000024001222222630600162030ustar00rootroot000000000000000000 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 enca-1.15/data/maps/iso885916.map000066400000000000000000000024001222222630600162060ustar00rootroot000000000000000000 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 enca-1.15/data/maps/iso88592.map000066400000000000000000000024001222222630600161210ustar00rootroot000000000000000000 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 enca-1.15/data/maps/iso88594.map000066400000000000000000000024001222222630600161230ustar00rootroot000000000000000000 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 enca-1.15/data/maps/iso88595.map000066400000000000000000000024001222222630600161240ustar00rootroot000000000000000000 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 enca-1.15/data/maps/keybcs2.map000066400000000000000000000024001222222630600162510ustar00rootroot000000000000000000 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 enca-1.15/data/maps/koi8cs2.map000066400000000000000000000024001222222630600161710ustar00rootroot000000000000000000 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 enca-1.15/data/maps/koi8r.map000066400000000000000000000024001222222630600157430ustar00rootroot000000000000000000 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 enca-1.15/data/maps/koi8u.map000066400000000000000000000024001222222630600157460ustar00rootroot000000000000000000 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 enca-1.15/data/maps/koi8ub.map000066400000000000000000000024001222222630600161100ustar00rootroot000000000000000000 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 enca-1.15/data/maps/koi8uni.map000066400000000000000000000024001222222630600162750ustar00rootroot000000000000000000 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 enca-1.15/data/maps/macce.map000066400000000000000000000024001222222630600157570ustar00rootroot000000000000000000 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 enca-1.15/data/maps/maccyr.map000066400000000000000000000024001222222630600161650ustar00rootroot000000000000000000 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 enca-1.15/data/mystrings.c000066400000000000000000000014451222222630600154630ustar00rootroot00000000000000#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; } enca-1.15/data/normalize.pl000077500000000000000000000023751222222630600156230ustar00rootroot00000000000000#!/usr/bin/perl use warnings; use strict; my $n = 0; my $q; my $max = 0; my (@char, @count); if (!defined $ARGV[0]) { while () { ($char[$n], $count[$n]) = split /\s+/, $_, 2; if ($max < $count[$n]) { $max = $count[$n]; } $n++; } for ($q = 1; $max/$q >= 6000; $q++) { } for (my $i = 0; $i < $n; $i++) { 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 () { ($char[$n], $count[$n]) = split /\s+/, $_, 2; $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++) { printf "%s %u\n", $char[$i], $count[$i]; } } enca-1.15/data/pairtoc.c000066400000000000000000000037371222222630600150730ustar00rootroot00000000000000#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, j, k; int first, second; /* 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++] = (unsigned char*)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; } enca-1.15/data/polish/000077500000000000000000000000001222222630600145525ustar00rootroot00000000000000enca-1.15/data/polish/doit.sh000077500000000000000000000001251222222630600160460ustar00rootroot00000000000000#! /bin/bash ../doit.sh iso88592 cp1250 ibm852 macce iso885913 iso885916 baltic cork enca-1.15/data/polish/iso88592.base000066400000000000000000000001141222222630600166140ustar00rootroot00000000000000 23 31 70 2437 5859 1720 211 2137 1351 3257 401 1816 enca-1.15/data/polish/polish.h000066400000000000000000000466551222222630600162410ustar00rootroot00000000000000/***** 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 enca-1.15/data/polish/rawcounts.iso88592000066400000000000000000000034421222222630600177360ustar00rootroot000000000000000x09 . 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 enca-1.15/data/russian/000077500000000000000000000000001222222630600147405ustar00rootroot00000000000000enca-1.15/data/russian/doit.sh000077500000000000000000000000741222222630600162370ustar00rootroot00000000000000#! /bin/bash ../doit.sh koi8r cp1251 iso88595 ibm866 maccyr enca-1.15/data/russian/koi8r.base000066400000000000000000000002721222222630600166310ustar00rootroot00000000000000 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 enca-1.15/data/russian/paircounts.koi8r000066400000000000000000000014371222222630600201120ustar00rootroot00000000000000.: :. :. :. :. :. :. : :. :. :. :. :. :. :. :. :. : :. :. :. :. :. :. :. :. :. :. : : : :. :. :. : :. :. : :. :. :. :. :. :. :. :. : :. :. :. :. :. : :. :. :. :. : : : : enca-1.15/data/russian/rawcounts.koi8r000066400000000000000000000014061222222630600177440ustar00rootroot0000000000000013520 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 enca-1.15/data/russian/russian.h000066400000000000000000001305701222222630600166030ustar00rootroot00000000000000/***** 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 enca-1.15/data/slovak/000077500000000000000000000000001222222630600145535ustar00rootroot00000000000000enca-1.15/data/slovak/cp1250.base000066400000000000000000000002251222222630600163200ustar00rootroot00000000000000 115 16 98 2984 2032 2996 33 1413 171 167 127 47 36 5864 254 3401 1955 3503 639 515 327 510 2386 2794 enca-1.15/data/slovak/doit.sh000077500000000000000000000001121222222630600160430ustar00rootroot00000000000000#! /bin/bash ../doit.sh cp1250 iso88592 ibm852 keybcs2 macce koi8cs2 cork enca-1.15/data/slovak/rawcounts.cp1250000066400000000000000000000025771222222630600174470ustar00rootroot000000000000001 . 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 enca-1.15/data/slovak/slovak.h000066400000000000000000000425341222222630600162330ustar00rootroot00000000000000/***** 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 enca-1.15/data/slovene/000077500000000000000000000000001222222630600147275ustar00rootroot00000000000000enca-1.15/data/slovene/doit.sh000077500000000000000000000000721222222630600162240ustar00rootroot00000000000000#! /bin/bash ../doit.sh iso88592 cp1250 ibm852 macce cork enca-1.15/data/slovene/iso88592.base000066400000000000000000000000461222222630600167750ustar00rootroot00000000000000 162 96 4575 3045 214 5282 enca-1.15/data/slovene/rawcounts.iso88592000066400000000000000000000021311222222630600201050ustar00rootroot000000000000000x0a . 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 enca-1.15/data/slovene/slovene.h000066400000000000000000000323141222222630600165560ustar00rootroot00000000000000/***** 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 enca-1.15/data/totals.pl000077500000000000000000000046161222222630600151310ustar00rootroot00000000000000#!/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; enca-1.15/data/ukrainian/000077500000000000000000000000001222222630600152355ustar00rootroot00000000000000enca-1.15/data/ukrainian/cp1251.base000066400000000000000000000003231222222630600170020ustar00rootroot00000000000000 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 enca-1.15/data/ukrainian/doit.sh000077500000000000000000000001031222222630600165250ustar00rootroot00000000000000#! /bin/bash ../doit.sh cp1251 ibm855 iso88595 cp1125 koi8u maccyr enca-1.15/data/ukrainian/paircounts.cp1251000066400000000000000000000011161222222630600202600ustar00rootroot00000000000000.:ѿպ :. :. :. :. :. : :. : : : : : : : : : : : :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. :. : :. :. : :. :. :. enca-1.15/data/ukrainian/rawcounts.cp1251000066400000000000000000000042431222222630600201220ustar00rootroot000000000000000x09 . 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 enca-1.15/data/ukrainian/ukrainian.h000066400000000000000000001347001222222630600173740ustar00rootroot00000000000000/***** 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 enca-1.15/data/xlt.c000066400000000000000000000016661222222630600142400ustar00rootroot00000000000000#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; 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 */ enca-1.15/depcomp000077500000000000000000000355451222222630600137340ustar00rootroot00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2004-05-31.23 # Copyright (C) 1999, 2000, 2003, 2004 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, 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. # 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 outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit 0 ;; -v | --v*) echo "depcomp $scriptversion" exit 0 ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi 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. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; 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. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "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" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # Dependencies are output in .lo.d with libtool 1.4. # With libtool 1.5 they are output both in $dir.libs/$base.o.d # and in $dir.libs/$base.o.d and $dir$base.o.d. We process the # latter, because the former will be cleaned when $dir.libs is # erased. tmpdepfile1="$dir.libs/$base.lo.d" tmpdepfile2="$dir$base.o.d" tmpdepfile3="$dir.libs/$base.d" "$@" -Wc,-MD else tmpdepfile1="$dir$base.o.d" tmpdepfile2="$dir$base.d" tmpdepfile3="$dir$base.d" "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" elif test -f "$tmpdepfile2"; then tmpdepfile="$tmpdepfile2" else tmpdepfile="$tmpdepfile3" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #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 $1 != '--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:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac 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. -*|$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" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--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 '/^# [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, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: enca-1.15/devel-docs/000077500000000000000000000000001222222630600143705ustar00rootroot00000000000000enca-1.15/devel-docs/.gitignore000066400000000000000000000002011222222630600163510ustar00rootroot00000000000000html tmpl xml *.stamp libenca-unused.txt libenca.args libenca.hierarchy libenca.intefraces libenca.prerequisites libenca.signals enca-1.15/devel-docs/Makefile.am000066400000000000000000000142761222222630600164360ustar00rootroot00000000000000# @(#) $Id: Makefile.am,v 1.8 2004/05/27 17:17:15 yeti Exp $ ## 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)/tmpl.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: tmpl.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-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 install-data-local: $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR) (installfiles=`echo $(srcdir)/html/*.html`; \ if test "$$installfiles" = '$(srcdir)/html/*.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).devhelp' ; \ $(INSTALL_DATA) $(srcdir)/html/$(DOC_MODULE).devhelp $(DESTDIR)$(TARGET_DIR); \ fi) uninstall-local: (installfiles=`cd $(srcdir)/html >/dev/null && echo *.html`; \ if test "$$installfiles" = '*.html'; \ 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).devhelp' ; \ rm -f $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE).devhelp; \ fi) # # 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).devhelp $(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 enca-1.15/devel-docs/Makefile.in000066400000000000000000000467451222222630600164550ustar00rootroot00000000000000# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # @(#) $Id: Makefile.am,v 1.8 2004/05/27 17:17:15 yeti Exp $ # 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 = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = devel-docs DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/mkinstalldirs 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/tools.m4 $(top_srcdir)/m4/typevar.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h 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) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERTER_LIBS = @CONVERTER_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTOCS_PROG = @CSTOCS_PROG@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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@ LIBICONV = @LIBICONV@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ 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_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ 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@ 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)/tmpl.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 .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @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: $(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: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool 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 @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 #### @ENABLE_GTK_DOC_TRUE@tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES) @ENABLE_GTK_DOC_TRUE@ @echo '*** Rebuilding template files ***' @ENABLE_GTK_DOC_TRUE@ cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) @ENABLE_GTK_DOC_TRUE@ touch tmpl-build.stamp @ENABLE_GTK_DOC_TRUE@tmpl.stamp: tmpl-build.stamp @ENABLE_GTK_DOC_TRUE@ @true #### sgml #### @ENABLE_GTK_DOC_TRUE@sgml-build.stamp: tmpl.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-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 install-data-local: $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR) (installfiles=`echo $(srcdir)/html/*.html`; \ if test "$$installfiles" = '$(srcdir)/html/*.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).devhelp' ; \ $(INSTALL_DATA) $(srcdir)/html/$(DOC_MODULE).devhelp $(DESTDIR)$(TARGET_DIR); \ fi) uninstall-local: (installfiles=`cd $(srcdir)/html >/dev/null && echo *.html`; \ if test "$$installfiles" = '*.html'; \ 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).devhelp' ; \ rm -f $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE).devhelp; \ 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).devhelp $(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: enca-1.15/devel-docs/libenca-decl-list.txt000066400000000000000000000046031222222630600204070ustar00rootroot00000000000000
internal ENCA_STMT_START ENCA_STMT_END EncaAnalyserOptions EncaAnalyserState EncaCharsetInfo EncaLanguageInfo EncaLanguageHookData1CS EncaLanguageHookDataEOL EncaUTFCheckData EncaHookFunc EncaGuessFunc 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_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 EncaSurface EncaNameStyle EncaCharsetFlags EncaErrno ENCA_CS_UNKNOWN ENCA_NOT_A_CHAR EncaAnalyser EncaEncoding enca_analyser_alloc enca_analyser_free enca_analyse enca_analyse_const enca_double_utf8_check enca_double_utf8_get_candidates enca_errno enca_strerror 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 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_known 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_has_ucs2_map enca_charset_ucs2_map enca_number_of_charsets enca_analyser_language enca_language_english_name enca_get_languages enca_get_language_charsets
enca-1.15/devel-docs/libenca-decl.txt000066400000000000000000000434131222222630600174400ustar00rootroot00000000000000 ENCA_STMT_START #define ENCA_STMT_START do ENCA_STMT_END #define ENCA_STMT_END while (0) EncaAnalyserOptions EncaAnalyserState EncaCharsetInfo EncaLanguageInfo EncaLanguageHookData1CS EncaLanguageHookDataEOL EncaUTFCheckData 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) \ ENCA_STMT_START{ if (ptr) free(ptr); ptr=NULL; }ENCA_STMT_END 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_strstr # define enca_strstr strstr enca_stpcpy char* char *dest, const char *src enca_stpcpy # define enca_stpcpy stpcpy 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_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; 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 EncaEncoding struct _EncaEncoding { int charset; EncaSurface surface; }; enca_analyser_alloc EncaAnalyser const char *langname enca_analyser_free void EncaAnalyser analyser enca_analyse EncaEncoding EncaAnalyser analyser, unsigned char *buffer, size_t size enca_analyse_const EncaEncoding EncaAnalyser analyser, const unsigned char *buffer, size_t size enca_double_utf8_check int EncaAnalyser analyser, const unsigned char *buffer, size_t size enca_double_utf8_get_candidates int* EncaAnalyser analyser enca_errno int EncaAnalyser analyser enca_strerror const char* EncaAnalyser analyser, int errnum enca_set_multibyte void EncaAnalyser analyser, int multibyte enca_get_multibyte int EncaAnalyser analyser enca_set_interpreted_surfaces void EncaAnalyser analyser, int interpreted_surfaces enca_get_interpreted_surfaces int EncaAnalyser analyser enca_set_ambiguity void EncaAnalyser analyser, int ambiguity enca_get_ambiguity int EncaAnalyser analyser enca_set_filtering void EncaAnalyser analyser, int filtering enca_get_filtering int EncaAnalyser analyser enca_set_garbage_test void EncaAnalyser analyser, int garabage_test enca_get_garbage_test int EncaAnalyser analyser enca_set_termination_strictness void EncaAnalyser analyser, int termination_strictness enca_get_termination_strictness int EncaAnalyser analyser enca_set_significant int EncaAnalyser analyser, size_t significant enca_get_significant size_t EncaAnalyser analyser enca_set_threshold int EncaAnalyser analyser, double threshold enca_get_threshold double EncaAnalyser analyser enca_charset_name const char* int charset, EncaNameStyle whatname enca_get_charset_aliases const char** int charset, size_t *n enca_get_surface_name char* EncaSurface surface, EncaNameStyle whatname enca_parse_encoding_name EncaEncoding const char *name enca_charset_natural_surface EncaSurface int charset enca_charset_properties EncaCharsetFlags int charset enca_charset_is_known #define enca_charset_is_known(cs) \ ((cs) != ENCA_CS_UNKNOWN) enca_charset_is_7bit #define enca_charset_is_7bit(cs) \ (enca_charset_properties(cs) & ENCA_CHARSET_7BIT) enca_charset_is_8bit #define enca_charset_is_8bit(cs) \ (enca_charset_properties(cs) & ENCA_CHARSET_8BIT) enca_charset_is_16bit #define enca_charset_is_16bit(cs) \ (enca_charset_properties(cs) & ENCA_CHARSET_16BIT) enca_charset_is_32bit #define enca_charset_is_32bit(cs) \ (enca_charset_properties(cs) & ENCA_CHARSET_32BIT) enca_charset_is_fixed #define enca_charset_is_fixed(cs) \ (enca_charset_properties(cs) & ENCA_CHARSET_FIXED) enca_charset_is_variable #define enca_charset_is_variable(cs) \ (enca_charset_properties(cs) & ENCA_CHARSET_VARIABLE) enca_charset_is_binary #define enca_charset_is_binary(cs) \ (enca_charset_properties(cs) & ENCA_CHARSET_BINARY) enca_charset_is_regular #define enca_charset_is_regular(cs) \ (enca_charset_properties(cs) & ENCA_CHARSET_REGULAR) enca_charset_is_multibyte #define enca_charset_is_multibyte(cs) \ (enca_charset_properties(cs) & ENCA_CHARSET_MULTIBYTE) enca_charset_has_ucs2_map int int charset enca_charset_ucs2_map int int charset, unsigned int *buffer enca_number_of_charsets size_t void enca_analyser_language const char* EncaAnalyser analyser enca_language_english_name const char* const char *lang enca_get_languages const char** size_t *n enca_get_language_charsets int* const char *langname, size_t *n enca-1.15/devel-docs/libenca-docs.sgml000066400000000000000000000012271222222630600176010ustar00rootroot00000000000000 Enca Library Reference Manual Enca Library API enca-1.15/devel-docs/libenca-overrides.txt000066400000000000000000000000001222222630600205140ustar00rootroot00000000000000enca-1.15/devel-docs/libenca-sections.txt000066400000000000000000000047011222222630600203550ustar00rootroot00000000000000
enums Typedefs and Constants 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_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
enca-1.15/devel-docs/libenca-undeclared.txt000066400000000000000000000000001222222630600206200ustar00rootroot00000000000000enca-1.15/devel-docs/libenca-undocumented.txt000066400000000000000000000005721222222630600212220ustar00rootroot0000000000000094% symbol docs coverage. 171 symbols documented. 1 symbols incomplete. 11 not documented. EncaLanguageInfo (lcuchook) count_bits tested analyser:Long_Description analyser:Short_Description auxiliary:Long_Description auxiliary:Short_Description encodings:Long_Description encodings:Short_Description enums:Long_Description enums:Short_Description internal:Short_Description enca-1.15/enca.pc.in000066400000000000000000000004421222222630600142020ustar00rootroot00000000000000prefix=@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} enca-1.15/enca.spec.in000066400000000000000000000134341222222630600145370ustar00rootroot00000000000000# @(#) $Id: enca.spec.in,v 1.28 2005/12/18 12:05:30 yeti Exp $ Summary: A program detecting encoding of text files. Name: @PACKAGE_TARNAME@ Version: @PACKAGE_VERSION@ Release: @RELEASE@ License: GNU GPL v2 Group: Applications/Text Requires: sed Source: http://trific.ath.cx/Ftp/enca/@PACKAGE_TARNAME@-@PACKAGE_VERSION@.tar.bz2 URL: http://trific.ath.cx/software/@PACKAGE_TARNAME@/ Packager: @PACKAGE_BUGREPORT@ Vendor: Trific soft. Prefix: %{_prefix} BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot %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 libiconv, librecode, or cstocs. Currently, it has support for Belarussian, Bulgarian, Croatian, Czech, Estonian, Latvian, Lithuanian, Polish, Russian, Slovak, Slovene, Ukrainian, Chinese, and some multibyte encodings (mostly variants of Unicode) independent on the language. This package also contains shared Enca library 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} %description devel The enca-devel package contains the static libraries and header files for writing programs using the Extremely Naive Charset Analyser library, and its API documentation. Install enca-devel if you are going to create applications using the Enca library. %prep %setup %build %configure %__make %install [ "$RPM_BUILD_ROOT" != "/" ] && %__rm -rf $RPM_BUILD_ROOT %makeinstall HTML_DIR=$RPM_BUILD_ROOT/%{_datadir}/gtk-doc/html %clean [ "$RPM_BUILD_ROOT" != "/" ] && %__rm -rf $RPM_BUILD_ROOT %files %defattr(755,root,root) %{_bindir}/enca %{_bindir}/enconv %{_libexecdir}/%{name}/extconv/* %dir %{_libexecdir}/%{name}/extconv %dir %{_libexecdir}/%{name} %{_libdir}/libenca.so.* %defattr(644,root,root) %doc %{_mandir}/man1/enca.1* %doc %{_mandir}/man1/enconv.1* %defattr(-,root,root) %doc AUTHORS COPYING ChangeLog ChangeLog.prelib FAQ INSTALL ChangeLog.old README README.devel THANKS TODO %files devel %defattr(-,root,root) %{_includedir}/enca.h %{_libdir}/pkgconfig/enca.pc %{_libdir}/libenca.a %{_libdir}/libenca.la %{_libdir}/libenca.so %doc %{_datadir}/gtk-doc/html/libenca/* %doc %dir %{_datadir}/gtk-doc/html/libenca %doc %dir %{_datadir}/gtk-doc/html %doc %dir %{_datadir}/gtk-doc %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %changelog * 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) enca-1.15/iconvcap.c000066400000000000000000000260731222222630600143210ustar00rootroot00000000000000/* * @(#) $Id: iconvcap.c,v 1.10 2005/12/01 10:08:53 yeti Exp $ * 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", "GB2312", "CP936", NULL }; char* VARIANT_BIG5[] = { "BIG5", "CP950", NULL }; char* VARIANT_HZ[] = { "HZ", "HZ-GB-2312", 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; } /* 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); 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); 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); 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); return 1; } } enclist = enclist->next; } fprintf(stderr, "iconvcap: transitivity OK\n"); free(s); 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; } enca-1.15/install-sh000077500000000000000000000217661222222630600143630ustar00rootroot00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2004-09-10.20 # 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. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" chmodcmd="$chmodprog 0755" chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= dstarg= no_target_directory= usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: -c (ignored) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test -n "$1"; do case $1 in -c) shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit 0;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t) dstarg=$2 shift shift continue;; -T) no_target_directory=true shift continue;; --version) echo "$0 $scriptversion"; exit 0;; *) # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. test -n "$dir_arg$dstarg" && break # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done break;; esac done if test -z "$1"; 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 for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src src= if test -d "$dst"; then mkdircmd=: chmodcmd= else mkdircmd=$mkdirprog 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 "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dstarg: Is a directory" >&2 exit 1 fi dst=$dst/`basename "$src"` fi fi # This sed command emulates the dirname command. dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # Skip lots of stat calls in the usual case. if test ! -d "$dstdir"; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` IFS=$oIFS pathcomp= while test $# -ne 0 ; do pathcomp=$pathcomp$1 shift if test ! -d "$pathcomp"; then $mkdirprog "$pathcomp" # mkdir can fail with a `File exist' error in case several # install-sh are creating the directory concurrently. This # is OK. test -d "$pathcomp" || exit fi pathcomp=$pathcomp/ done fi if test -n "$dir_arg"; then $doit $mkdircmd "$dst" \ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } else dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. $doit $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 "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 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. { if test -f "$dstdir/$dstfile"; then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" } } fi || { (exit 1); exit; } done # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit } # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: enca-1.15/lib/000077500000000000000000000000001222222630600131115ustar00rootroot00000000000000enca-1.15/lib/.gitignore000066400000000000000000000000431222222630600150760ustar00rootroot00000000000000.deps .libs Makefile *.lo *.o *.la enca-1.15/lib/Makefile.am000066400000000000000000000015371222222630600151530ustar00rootroot00000000000000# @(#) $Id: Makefile.am,v 1.29 2005/11/24 20:11:20 yeti Exp $ 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_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* enca-1.15/lib/Makefile.in000066400000000000000000000576511222222630600151740ustar00rootroot00000000000000# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = lib DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp \ $(include_HEADERS) 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/tools.m4 $(top_srcdir)/m4/typevar.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h 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 -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(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_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__depfiles_maybe = depfiles 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)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERTER_LIBS = @CONVERTER_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTOCS_PROG = @CSTOCS_PROG@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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@ LIBICONV = @LIBICONV@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ 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_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ 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@ 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@ # @(#) $Id: Makefile.am,v 1.29 2005/11/24 20:11:20 yeti Exp $ 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_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 .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @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: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } 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@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctype.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enca.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/encnames.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filters.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/guess.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_be.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_bg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_cs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_et.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_hr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_hu.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_lt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_lv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_pl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_ru.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_sk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_sl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_uk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang_zh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multibyte.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pair.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unicodemap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utf8_double.Plo@am__quote@ .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: $(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: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -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 -rf ./$(DEPDIR) -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 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 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: enca-1.15/lib/common.c000066400000000000000000000117041222222630600145500ustar00rootroot00000000000000/* @(#) $Id: common.c,v 1.4 2003/11/17 12:27:39 yeti Exp $ 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 */ enca-1.15/lib/ctype.c000066400000000000000000000071141222222630600144040ustar00rootroot00000000000000/* @(#) $Id: ctype.c,v 1.1 2004/05/11 16:14:02 yeti Exp $ 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 */ }; enca-1.15/lib/enca.c000066400000000000000000000111101222222630600141550ustar00rootroot00000000000000/* @(#) $Id: enca.c,v 1.9 2003/12/22 22:24:33 yeti Exp $ 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 */ enca-1.15/lib/enca.h000066400000000000000000000156141222222630600141770ustar00rootroot00000000000000/* @(#) $Id: enca.h,v 1.11 2005/02/27 12:08:55 yeti Exp $ */ /* 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 */ /* 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 /* Published (opaque) typedefs */ typedef struct _EncaAnalyserState *EncaAnalyser; /* 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) /* Auxiliary 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 enca-1.15/lib/encnames.c000066400000000000000000000450171222222630600150550ustar00rootroot00000000000000/* @(#) $Id: encnames.c,v 1.11 2005/12/01 10:08:53 yeti Exp $ 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 */ enca-1.15/lib/filters.c000066400000000000000000000366761222222630600147470ustar00rootroot00000000000000/* @(#) $Id: filters.c,v 1.13 2004/05/11 16:14:02 yeti Exp $ 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; buffer[n] == buffer[i] && n < size; 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 */ enca-1.15/lib/guess.c000066400000000000000000001040071222222630600144050ustar00rootroot00000000000000/* @(#) $Id: guess.c,v 1.19 2005/12/01 10:08:53 yeti Exp $ 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 */ enca-1.15/lib/internal.h000066400000000000000000000377751222222630600151210ustar00rootroot00000000000000/* @(#) $Id: internal.h,v 1.25 2005/12/01 10:08:53 yeti Exp $ */ #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 */ /* Simple macro statement wrappers. Use do / while (0) since the other cases * tend to produce an incredible amount of gcc warnings with -pedantic. */ #define ENCA_STMT_START do #define ENCA_STMT_END while (0) /* 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) \ ENCA_STMT_START{ if (ptr) free(ptr); ptr=NULL; }ENCA_STMT_END /** * 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_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 */ enca-1.15/lib/lang.c000066400000000000000000000207131222222630600142010ustar00rootroot00000000000000/* @(#) $Id: lang.c,v 1.18 2005/12/01 10:08:53 yeti Exp $ 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, /* Belarussian. */ &ENCA_LANGUAGE_BG, /* Bulgarian. */ &ENCA_LANGUAGE_CS, /* Czech. */ &ENCA_LANGUAGE_ET, /* Estonian. */ &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 */ enca-1.15/lib/lang_be.c000066400000000000000000000100661222222630600146470ustar00rootroot00000000000000/* @(#) $Id: lang_be.c,v 1.10 2005/12/01 10:08:53 yeti Exp $ encoding data and routines dependent on language; belarussian 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/belarussian/belarussian.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: * * Belarussian language. * * Everything the world out there needs to know about this language. **/ const EncaLanguageInfo ENCA_LANGUAGE_BE = { "be", "belarussian", 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 */ enca-1.15/lib/lang_bg.c000066400000000000000000000060541222222630600146530ustar00rootroot00000000000000/* @(#) $Id: lang_bg.c,v 1.12 2005/12/01 10:08:53 yeti Exp $ 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 */ enca-1.15/lib/lang_cs.c000066400000000000000000000101621222222630600146630ustar00rootroot00000000000000/* @(#) $Id: lang_cs.c,v 1.10 2005/12/01 10:08:53 yeti Exp $ 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 */ enca-1.15/lib/lang_et.c000066400000000000000000000104621222222630600146710ustar00rootroot00000000000000/* @(#) $Id: lang_et.c,v 1.11 2005/12/01 10:08:53 yeti Exp $ 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 */ enca-1.15/lib/lang_hr.c000066400000000000000000000065441222222630600147000ustar00rootroot00000000000000/* @(#) $Id: lang_hr.c,v 1.7 2005/12/01 10:08:53 yeti Exp $ 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 */ enca-1.15/lib/lang_hu.c000066400000000000000000000062701222222630600146770ustar00rootroot00000000000000/* @(#) $Id: lang_hu.c,v 1.13 2005/12/01 10:08:53 yeti Exp $ 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 */ enca-1.15/lib/lang_lt.c000066400000000000000000000100671222222630600147010ustar00rootroot00000000000000/* @(#) $Id: lang_lt.c,v 1.12 2005/12/01 10:08:53 yeti Exp $ 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 */ enca-1.15/lib/lang_lv.c000066400000000000000000000063611222222630600147050ustar00rootroot00000000000000/* @(#) $Id: lang_lv.c,v 1.13 2005/12/01 10:08:53 yeti Exp $ 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 */ enca-1.15/lib/lang_pl.c000066400000000000000000000101161222222630600146700ustar00rootroot00000000000000/* @(#) $Id: lang_pl.c,v 1.11 2005/12/01 10:08:53 yeti Exp $ 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 */ enca-1.15/lib/lang_ru.c000066400000000000000000000065741222222630600147200ustar00rootroot00000000000000/* @(#) $Id: lang_ru.c,v 1.11 2005/12/01 10:08:53 yeti Exp $ 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 */ enca-1.15/lib/lang_sk.c000066400000000000000000000101661222222630600146770ustar00rootroot00000000000000/* @(#) $Id: lang_sk.c,v 1.10 2005/12/01 10:08:53 yeti Exp $ 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 */ enca-1.15/lib/lang_sl.c000066400000000000000000000044521222222630600147010ustar00rootroot00000000000000/* @(#) $Id: lang_sl.c,v 1.9 2005/12/01 10:08:53 yeti Exp $ 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 */ enca-1.15/lib/lang_uk.c000066400000000000000000000117451222222630600147050ustar00rootroot00000000000000/* @(#) $Id: lang_uk.c,v 1.10 2005/12/01 10:08:53 yeti Exp $ 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 */ enca-1.15/lib/lang_zh.c000066400000000000000000000100761222222630600147030ustar00rootroot00000000000000/* 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) { 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 */ enca-1.15/lib/multibyte.c000066400000000000000000000675761222222630600153200ustar00rootroot00000000000000/* @(#) $Id: multibyte.c,v 1.13 2005/12/01 10:08:53 yeti Exp $ 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; if (utf8count < (int)analyser->options.min_chars) return 0; /* 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; } enca-1.15/lib/pair.c000066400000000000000000000147111222222630600142140ustar00rootroot00000000000000/* @(#) $Id: pair.c,v 1.6 2003/11/17 12:27:39 yeti Exp $ 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); } } } } enca-1.15/lib/unicodemap.c000066400000000000000000001032721222222630600154060ustar00rootroot00000000000000/* @(#) $Id: unicodemap.c,v 1.14 2003/12/22 22:24:33 yeti Exp $ 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 */ enca-1.15/lib/utf8_double.c000066400000000000000000000275311222222630600155050ustar00rootroot00000000000000/* @(#) $Id: utf8_double.c,v 1.5 2005/11/24 10:09:03 yeti Exp $ 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 occurences 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; } } enca-1.15/ltmain.sh000066400000000000000000010520261222222630600141710ustar00rootroot00000000000000 # libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.3 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION="2.4.2 Debian-2.4.2-1.3" TIMESTAMP="" package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_features () { echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-warning|--no-warn) opt_warning=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then # Remove ${wl} instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" func_resolve_sysroot "$deplib" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 enca-1.15/m4/000077500000000000000000000000001222222630600126635ustar00rootroot00000000000000enca-1.15/m4/crash-me000066400000000000000000000034541222222630600143130ustar00rootroot00000000000000\indexentry{pohyb!hmotn\'eho bodu}{17} \indexentry{ud\'alost}{17} \indexentry{hodiny!ide\'aln\IeC {\'\i }}{17} \indexentry{interval}{17} \indexentry{sou\v casnost!absolutn\IeC {\'\i }}{18} \indexentry{prostor!t\v r\IeC {\'\i }rozm\v ern\'y}{18} \indexentry{geometrie!euklidovsk\'a}{18} \indexentry{soustava!vzta\v zn\'a}{18} \indexentry{syst\'em!vzta\v zn\'y}{18} \indexentry{bod!hmotn\'y}{18} \indexentry{vzd\'alenost!vzta\v zn\'ych bod\r u}{18} \indexentry{soustava!tuh\'a}{18} \indexentry{soustava!kart\'ezsk\'a sou\v radnicov\'a}{18} \indexentry{vektor!ortonorm\'aln\IeC {\'\i }}{18} \indexentry{osa!sou\v radnic}{18} \indexentry{vektor!polohov\'y}{18} \indexentry{sou\v radnice}{18} \indexentry{d\'elka trajektorie}{18} \indexentry{dr\'aha}{18} \indexentry{rychlost}{19} \indexentry{vektor!rychlosti}{19} \indexentry{zrychlen\IeC {\'\i }}{19} \indexentry{vektor!zrychlen\IeC {\'\i }}{19} \indexentry{rychlost!kart\'ezsk\'e slo\v zky}{19} \indexentry{zrychlen\IeC {\'\i }}{19} \indexentry{pohyb!fyzik\'aln\IeC {\'\i } studium}{19} \indexentry{vektor!jednotkov\'y}{19} \indexentry{vektor!te\v cn\'y}{19} \indexentry{formule!Frenetova}{19} \indexentry{polom\v er k\v rivosti trajektorie}{19} \indexentry{zrychlen\IeC {\'\i }!norm\'alov\'e}{19} \indexentry{symetrie}{20} \indexentry{sou\v radnice!kart\'ezsk\'a}{20} \indexentry{transformace!inverzn\IeC {\'\i }}{20} \indexentry{tenzor!metrick\'y}{20} \indexentry{sou\v radnice!k\v rivo\v car\'a}{20} \indexentry{\v c\'ara!sou\v radnicov\'a}{20} \indexentry{vektor!te\v cn\'y}{20} \indexentry{b\'aze!kovariantn\IeC {\'\i }}{20} \indexentry{plocha!sou\v radnicov\'a}{20} \indexentry{b\'aze!kontravariantn\IeC {\'\i }}{21} \indexentry{matice!jednotkov\'a}{21} \indexentry{tenzor!metrick\'y}{21} \indexentry{sou\v cin!skal\'arn\IeC {\'\i }}{21} \indexentry{matice!inverzn\IeC {\'\i }}{22} enca-1.15/m4/gcov.m4000066400000000000000000000007161222222630600140670ustar00rootroot00000000000000# AM_GCOV AC_DEFUN([AM_GCOV], [ AC_ARG_WITH( gcov, [ --with-gcov compile for coverage tests using gcov (default=no)], [ if test "$GCC" = "yes" then using_gcov=$with_gcov fi ] ) AC_PATH_PROG([GCOV], [gcov]) if test "$GCOV" -a "$using_gcov" = "yes" then GCOV_FLAGS="--coverage" GCOV_CPPFLAGS=${GCOV_FLAGS} GCOV_LDFLAGS=${GCOV_FLAGS} AC_SUBST(GCOV_FLAGS) AC_SUBST(GCOV_CPPFLAGS) AC_SUBST(GCOV_LDFLAGS) fi ]) enca-1.15/m4/gtk-doc.m4000066400000000000000000000025201222222630600144540ustar00rootroot00000000000000## Gtk-doc tests. This file is in public domain. ## Check for gtk-doc. ## Defines: ## HTML_DIR to direcotry to install HTML docs into ## GTKDOC to whether gtkdoc-mkdb is found ## ENABLE_GTK_DOC to yes when gtk-doc should be enabled AC_DEFUN([gtk_CHECK_GTK_DOC], [dnl AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs @<:@DATADIR/gtk-doc/html@:>@]) if test "x$with_html_dir" = "x" ; then HTML_DIR=$datadir/gtk-doc/html else HTML_DIR=$with_html_dir fi AC_SUBST(HTML_DIR) AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false) gtk_doc_min_version=1.0 if $GTKDOC ; then gtk_doc_version=`gtkdoc-mkdb --version` AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version]) if perl <= "$gtk_doc_min_version") ? 0 : 1); EOF AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) GTKDOC=false fi fi dnl Let people disable the gtk-doc stuff. AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc use gtk-doc to build documentation @<:@auto@:>@], enable_gtk_doc="$enableval", enable_gtk_doc=auto) 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 AM_CONDITIONAL([ENABLE_GTK_DOC], test x$enable_gtk_doc = xyes) ]) enca-1.15/m4/libiconv.m4000066400000000000000000000045661222222630600147450ustar00rootroot00000000000000## Several iconv tests. This file is in public domain. ## N.B.: Following test relies on files iconvcap.c and has to compile and ## run it. ## Defines: ## HAVE_GOOD_ICONV when have iconv_open(), iconv.h and it's usable ## ICONV_IS_TRANSITIVE when it seems no triangulation is needed. ## CONVERTER_LIBS (adds library when needed) ## Creates file iconvenc.h (to be included only if defined(HAVE_ICONV))---it ## would be cleaner to put all the definitions to config.h, but then ## (1) we would have to check for every charset separately ## (2) config.h would get polluted by dozens of charset aliases ## Note we need tools/iconvenc.null AC_DEFUN([ye_CHECK_FUNC_ICONV_USABLE], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_HEADER_STDC])dnl AC_REQUIRE([AC_C_CONST])dnl dnl dnl Use standard iconv test AM_ICONV CONVERTER_LIBS="$CONVERTER_LIBS $LIBICONV" dnl Compile iconvcap.c and run it to determine what encodings iconv actually dnl knows an under what names. This is not needed with GNU iconv. HAVE_ICONV dnl is finally defined _only_ if iconv prove at least some minimal reasonable dnl capabilities. libiconv_ok="$am_cv_func_iconv" if test "$libiconv_ok" = yes; then AC_MSG_CHECKING([whether iconv implementation is usable]) if $CC -o iconvcap$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS $srcdir/iconvcap.c $LIBS $CONVERTER_LIBS 1>&5 2>&5 && test -s ./iconvcap$ac_exeext 2>&5; then if ./iconvcap 2>&5 >iconvenc.h; then libiconv_ok=yes else libiconv_ok=no fi else libiconv_ok=no fi AC_MSG_RESULT($libiconv_ok) if test "$libiconv_ok" = yes; then AC_DEFINE(HAVE_GOOD_ICONV,1,[Define if you have the UNIX98 iconv functions.]) AC_CACHE_CHECK([whether iconv is transitive], yeti_cv_lib_c_iconv_transitive, if ./iconvcap iconvenc.h 2>&5; then yeti_cv_lib_c_iconv_transitive=yes else yeti_cv_lib_c_iconv_transitive=no fi) if test "$yeti_cv_lib_c_iconv_transitive" = yes; then AC_DEFINE(ICONV_IS_TRANSITIVE,1,[Define if iconv is transitive.]) else AC_MSG_WARN([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.]) fi else echo >iconvenc.h fi else libiconv_ok=no fi if test "$libiconv_ok" != "yes"; then cat $srcdir/tools/iconvenc.null >iconvenc.h fi]) enca-1.15/m4/libm.m4000066400000000000000000000010511222222630600140450ustar00rootroot00000000000000## Check for math library. Taken from libtool.m4. ## Defines: ## LIBM ## LIBS (adds library when needed) AC_DEFUN([ye_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl 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*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, sqrt, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, sqrt, LIBM="-lm") ;; esac AC_SUBST(LIBM) LIBS="$LIBS $LIBM"]) enca-1.15/m4/librecode.m4000066400000000000000000000041501222222630600150550ustar00rootroot00000000000000## GNU recode library test. This file is in public domain. ## Defines: ## HAVE_LIBRECODE when have recode_new_outer() and recode.h ## LIBS (adds library when needed) AC_DEFUN([ye_CHECK_LIB_RECODE], [AC_REQUIRE([AC_PROG_CC])dnl dnl dnl Test for librecode. dnl Braindead librecode depends on symbol program_name defined in main program dnl this makes the test braindead too. In header file test, we have to use dnl a whole load of fakes, since it depends e.g. on bool and FILE defined. AC_ARG_WITH(librecode, [ --with-librecode@<:@=DIR@:>@ look for librecode in DIR/lib and DIR/include @<:@auto@:>@], [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], [WANT_LIBRECODE=1]) 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" AC_CACHE_CHECK([for recode_new_outer in librecode], yeti_cv_lib_recode_new_outer, AC_TRY_LINK([char* program_name = "";], [recode_new_outer(0);], yeti_cv_lib_recode_new_outer=yes, yeti_cv_lib_recode_new_outer=no)) librecode_ok="$yeti_cv_lib_recode_new_outer"; if test "$librecode_ok" = yes; then AC_CHECK_HEADER(recode.h, librecode_ok=yes, librecode_ok=no, [#define bool int #define size_t int #define FILE void]) fi if test "$librecode_ok" = yes; then AC_CHECK_HEADER(recodext.h, librecode_ok=yes, librecode_ok=no, [#define bool int #define size_t int #define FILE void]) fi if test "$librecode_ok" = yes; then AC_DEFINE(HAVE_LIBRECODE,1,[Define if you have the recode library (-lrecode).]) 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]) enca-1.15/m4/libtool.m4000066400000000000000000010600071222222630600145750ustar00rootroot00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ 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 $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/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' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 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=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS enca-1.15/m4/localias.m4000066400000000000000000000020431222222630600147130ustar00rootroot00000000000000## Locale alias location. This file is in public domain. ## Defines: ## HAVE_LOCALE_ALIAS when locale.alias is found ## LOCALE_ALIAS_PATH to path to locale.alias (has sense iff HAVE_LOCALE_ALIAS) AC_DEFUN([ye_PATH_LOCALE_ALIAS], [dnl Check for locale.alias locale_alias_ok=no if test "$ac_cv_func_setlocale" = yes; then AC_CACHE_CHECK([for locale.alias], yeti_cv_file_locale_alias, 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) if test -n "$yeti_cv_file_locale_alias"; then locale_alias_ok=yes AC_DEFINE(HAVE_LOCALE_ALIAS,1,[Define if you have locale.alias file.]) AC_DEFINE_UNQUOTED(LOCALE_ALIAS_PATH,"$yeti_cv_file_locale_alias",[Define to the path to locale.alias file.]) fi fi]) enca-1.15/m4/long-text.l2000066400000000000000000000100061222222630600150400ustar00rootroot000000000000003. kapitola Stopav prvodce po Galaxii ml v dob, kter z legrace kme minulost, hodn co ct k problmu paralelnch vesmr. Pro vechny, kdo nedosahuj rovn Zkuenho Boha, je z toho ovem srozumiteln velmi mlo. A ponvad je nyn prokzno, e vichni znm bohov vznikli dobrou tmiliontinu vteiny po zatku vesmru, a ne minul tden, jak obvykle tvrdvali, ek je u tak hodn vysvtlovn, take k zleitostem kosmologie se te nedostanou. Prvodce na tma paraleln vesmry sdluje i jednu povzbudivou vc, a sice nemte nejmen anci to pochopit. A tak nemuste mt strach, e se ztrapnte, a klidn mete kat 'Prosm?' a 'Coe?' a tpat a podle libosti plcat nesmysly. Pedn je poteba si v souvislosti s paralelnmi vesmry uvdomit, uvd Prvodce, e nejsou paraleln. Dle je dleit si uvdomit, e to v pesnm slova smyslu nejsou vesmry, ale nejlep bude, kdy se budete snait si toto uvdomit a trochu pozdji, a si uvdomte, e vechno, co jste si a do tto chvle uvdomili, je nepravdiv. Dvodem, pro to nejsou vesmry, je to, e dn konkrtn vesmr vlastn neexistuje jako takov, jako jedna vc, ale je to zpsob, jakm pohlme na to, emu se odborn k NVM, neboli 'Naprost a veobecn mima'. Naprost a veobecn mima tak ve skutenosti neexistuje. Je to prost souet vech rozdlnch nhled na nj, kter by se vyskytly, kdyby existoval. Dvodem, pro nejsou paraleln, je tent dvod, ze kterho nen paraleln moe. Nem to dn vznam. A rozlente Naprost a veobecn mima jakkoli, vdycky vm vyjde nco, emu nkdo bude kat domov. Prosm, poslute si a klidn plcejte nesmysly. Do Zem, kter ns te zajm pro svou specifickou polohu v Naprostm a veobecnm mimai, narazilo neutrino, kter nenarazilo do jinch Zem. Neutrino nen velk. V podstat tko pijdete na nco menho, co vs me jak tak zashnout. A ne e by nraz neutrina do objektu zvcho velikosti Zem byl sm o sob njakou extra zvltnost. Kdepak. Extra zvltn by byla ta nanosekunda, pi n by Zemi nezashlo nkolik miliard letcch neutrin. Samozejm e vechno zle na tom, co si pedstavte pod pojmem 'narazit', kdy uvte, e se ta vcika neskld u skoro vbec z nieho. ance, e se neutrino na cest nedozrnou przdnotou opravdu do neho tref, jsou zhruba podobn, jako kdy v libovolnm okamiku spadne z letcho Boeingu kulikov loisko a tref, eknme, sendvi s vajkem. Ale zptky k vci. Toto neutrino nco zashlo. Mete namtnout: Co to je v porovnn s celm tm nedozrnem? Ale takov nmitka m hek - je to toti tchoovina na entou. Jakmile se toti nco stane v nem tak sloitm, jako je vesmr, Kevin v, k emu vemu to povede - kde 'Kevin' je jakkoli nhodn bytost, kter nev nic 'o niem'. Toto neutrino zashlo atom. Atom byl st molekuly. Molekula byla st nukleov kyseliny. Nukleov kyselina byla st genu. Gen byl st genetick vbavy rstu... a tak dle. V konenm dsledku to vedlo k tomu, e jedn rostlin narostl list navc. V Essexu. Lpe eeno tam, kde po veker mraven prci a pekonn loklnch problm geologick povahy, bude Essex. Tou rostlinou byl jetel. Nesmrn inn rozhazoval po okol sv st, nebo sp semnka, a brzy se stal dominantnm typem jetele. Pesn pinn spojitost mezi tmto nhodnm biologickm vskytem a nkolika jinmi drobnmi odchylkami, kter v tom dleku Naprostho a veobecnho mimae existuj napklad nevydaen odlet Tricie McMillanov se Zafodem Bblbroxem, abnormln patn odbyt zmrzliny s pchut pekanovch ok a skutenost, e Zemi, na kter se toto vechno nachzelo, nezniili Vogoni kvli vstavb novho hyperprostorovho obchvatu - je te na seznamu vzkumnch projekt seazench podle dleitosti na katede historie Maximegalonsk univerzity (vlastn tam, kde kdysi bvala) na pce slo 4 763 984 132, a nikdo z tch, kdo se v tto chvli astn u baznu modlitby, nem, zd se, pocit, e je teba ten problm urychlen eit. enca-1.15/m4/ltoptions.m4000066400000000000000000000300731222222630600151630ustar00rootroot00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) enca-1.15/m4/ltsugar.m4000066400000000000000000000104241222222630600146070ustar00rootroot00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) enca-1.15/m4/ltversion.m4000066400000000000000000000012621222222630600151530ustar00rootroot00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 3337 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.2]) m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.2' macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) enca-1.15/m4/lt~obsolete.m4000066400000000000000000000137561222222630600155130ustar00rootroot00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) enca-1.15/m4/recode-bugs.m4000066400000000000000000000127261222222630600153340ustar00rootroot00000000000000## GNU recode well-known bugs test. This file is in public domain. ## Defines: ## RECODE_PROG_BUGGY when at least one of the bugs is present ## ## Checks for: ## whether conversion to UTF-7 loses the `-' in `+-' ## (reported in Feb 2001) ## whether recode crashes on i/o errors ## (reported in Feb 2001) ## whether conversion to UCS*/CRLF forgets the last EOL ## (reported in Mar 2001) ## whether conversion to UTF-8 corrupts files ## (reported in Mar 2001) ## whether recode crashes on TeX/..ISO-8859-2 conversions ## (reported in Jul 2001) ## whether recode MacCE map is broken for Latvian ## whether recode built-in KOI8-U map is broken ## whether recode ISO8859-13 to Unicode map is broken. ## GNU recode broken test. ## Prints a warning for broken recode -- no sensible workaround known ;-( ## Maybe we should at least not to use recode for some conversions. ## Defines: ## RECODE_PROG_BUGGY when at least one of the bugs is present AC_DEFUN([ye_RECODE_BROKEN], [dnl Check for recode bugs and print a warning if found. ye_RECODE_BROKEN_UTF8PM if test "$yeti_cv_prog_recode_utf7pm" = "yes"; then yeti_recode_buggy=yes; fi ye_RECODE_BROKEN_IOSEGV if test "$yeti_cv_prog_recode_iosegv" = "yes"; then yeti_recode_buggy=yes; fi ye_RECODE_BROKEN_UCSCRLF if test "$yeti_cv_prog_recode_ucscrlf" = "yes"; then yeti_recode_buggy=yes; fi ye_RECODE_BROKEN_UTF8CORR if test "$yeti_cv_prog_recode_utf8corr" = "yes"; then yeti_recode_buggy=yes; fi ye_RECODE_BROKEN_TEXL2SEGV if test "$yeti_cv_prog_recode_texl2segv" = "yes"; then yeti_recode_buggy=yes; fi ye_RECODE_BROKEN_MACCELV if test "$yeti_cv_prog_recode_maccelv" = "yes"; then yeti_recode_buggy=yes; fi ye_RECODE_BROKEN_KOI8U if test "$yeti_cv_prog_recode_koi8u" = "yes"; then yeti_recode_buggy=yes; fi ye_RECODE_BROKEN_ISO885913 if test "$yeti_cv_prog_recode_iso885913" = "yes"; then yeti_recode_buggy=yes; fi if test "$yeti_recode_buggy" = "yes"; then AC_DEFINE(RECODE_PROG_BUGGY,1,[Define if the recode recoder is incredibily buggy.]) fi]) ## GNU recode bug test AC_DEFUN([ye_RECODE_BROKEN_UTF8PM], [dnl Check whether conversion to UTF-7 loses the - in +- AC_CACHE_CHECK([whether recode loses - in +- in to-UTF-7 conversion], yeti_cv_prog_recode_utf7pm, if test "`echo +- | recode l1..utf7 | recode utf7..l1`" = "+-"; then yeti_cv_prog_recode_utf7pm=no else yeti_cv_prog_recode_utf7pm=yes fi) ]) ## GNU recode bug test AC_DEFUN([ye_RECODE_BROKEN_IOSEGV], [dnl Check whether recode crashes on i/o errors dnl FIXME: this obviously can't work when one is root! AC_CACHE_CHECK([whether recode crashes on i/o errors], yeti_cv_prog_recode_iosegv, rm -f core* mkdir ac_tmp_dir echo >ac_tmp_dir/ac_tmp.txt chmod 0555 ac_tmp_dir yeti_cv_prog_recode_iosegv=no { recode l2..ascii ac_tmp_dir/ac_tmp.txt; } 2>&5 || yeti_cv_prog_recode_iosegv=yes if test -n "`ls | grep '^core\(\.[0-9]\+\)\?'`"; then yeti_cv_prog_recode_iosegv=yes fi rm -f core* chmod 0777 ac_tmp_dir rm -f ac_tmp_dir/ac_tmp.txt rmdir ac_tmp_dir) ]) ## GNU recode bug test AC_DEFUN([ye_RECODE_BROKEN_UCSCRLF], [dnl Check whether conversion to UCS*/CRLF forgets the last EOL AC_CACHE_CHECK([whether conversion to UCS/CRLF results in odd-sized files], yeti_cv_prog_recode_ucscrlf, if test "`echo | recode l2..ucs2/crlf | wc -c | sed -e 's: ::g'`" = "5"; then yeti_cv_prog_recode_ucscrlf=yes else yeti_cv_prog_recode_ucscrlf=no fi) ]) ## GNU recode bug test AC_DEFUN([ye_RECODE_BROKEN_UTF8CORR], [dnl Check whether conversion to UTF-8 corrupts files AC_CACHE_CHECK([whether conversion to UTF-8 corrupts files], yeti_cv_prog_recode_utf8corr, recode l2..utf8 <$srcdir/m4/long-text.l2 | recode utf8..l2 >ac_tmp.txt if diff ac_tmp.txt $srcdir/m4/long-text.l2 1>&5 2>&5; then yeti_cv_prog_recode_utf8corr=no else yeti_cv_prog_recode_utf8corr=yes fi rm -f ac_tmp.txt) ]) ## GNU recode bug test AC_DEFUN([ye_RECODE_BROKEN_TEXL2SEGV], [dnl Check whether recode crashes on TeX/..ISO-8859-2 conversion AC_CACHE_CHECK([whether recode crashes on TeX/..ISO-8859-2 conversions], yeti_cv_prog_recode_texl2segv, rm -f core* crash-me-a crash-me-b cat $srcdir/m4/crash-me >crash-me-a cat $srcdir/m4/crash-me >crash-me-b yeti_cv_prog_recode_texl2segv=no { recode TeX/..ISO-8859-2 crash-me-a crash-me-b; } 2>&5 || yeti_cv_prog_recode_texl2segv=yes if test -n "`ls | grep '^core\(\.[0-9]\+\)\?'`"; then yeti_cv_prog_recode_texl2segv=yes fi rm -f core* crash-me-a crash-me-b) ]) ## GNU recode bug test AC_DEFUN([ye_RECODE_BROKEN_MACCELV], [dnl Check whether recode MacCE map is broken for Latvian AC_CACHE_CHECK([whether recode MacCE map is broken for Latvian], yeti_cv_prog_recode_maccelv, if test "`echo | recode 1257/..macce/`" != ""; then yeti_cv_prog_recode_maccelv=yes else yeti_cv_prog_recode_maccelv=no fi) ]) ## GNU recode bug test AC_DEFUN([ye_RECODE_BROKEN_KOI8U], [dnl Check whether recode KOI8-U map is broken. AC_CACHE_CHECK([whether recode built-in KOI8-U map is broken], yeti_cv_prog_recode_koi8u, if test "`echo | recode -x:libiconv: koi8u..iso88595`" != ""; then yeti_cv_prog_recode_koi8u=yes else yeti_cv_prog_recode_koi8u=no fi) ]) ## GNU recode bug test AC_DEFUN([ye_RECODE_BROKEN_ISO885913], [dnl Check whether recode ISO8859-13 to Unicode map is broken. AC_CACHE_CHECK([whether recode ISO8859-13 to Unicode map is broken], yeti_cv_prog_recode_iso885913, if test "`echo | recode iso8859-13..ucs2 | recode ucs2..l1`" = ""; then yeti_cv_prog_recode_iso885913=yes else yeti_cv_prog_recode_iso885913=no fi) ]) enca-1.15/m4/tools.m4000066400000000000000000000011331222222630600142630ustar00rootroot00000000000000## Some non-test macros. This file is in public domain. ## Set directories containing automake m4 macros (bootstraping). ## Defines: (nothing) dnl AM_ACLOCAL_INCLUDE(macrodir) AC_DEFUN([AM_ACLOCAL_INCLUDE], [dnl Append aclocal flags and then add all specified dirs. test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" for k in $1 ; do ACLOCAL="$ACLOCAL -I $k" ; done ]) ## Print warning. ## Defines: (nothing) AC_DEFUN([ye_WARN_FAIL], [dnl Test if given variable is yes and possibly print warning. if test "$1" != yes; then AC_MSG_WARN(expect build to fail since we depend on $2) fi]) enca-1.15/m4/typevar.m4000066400000000000000000000015471222222630600146260ustar00rootroot00000000000000## `Small' checks for typedefs and variables. This file is in public domain. ## program_invocation_short_name test. ## Defines: ## HAVE_PROGRAM_INVOCATION_SHORT_NAME when program_invocation_short_name is ## defined in errno.h AC_DEFUN([ye_CHECK_VAR_PROGRAM_INVOCATION_SHORT_NAME], [AC_REQUIRE([AC_PROG_CC])dnl dnl dnl Check for program_invocation_short_name (present on GNU systems only?) AC_CACHE_CHECK([for program_invocation_short_name], yeti_cv_lib_c_program_invocation_short_name, AC_TRY_LINK([#include ], [if (!program_invocation_short_name) return 1;], yeti_cv_lib_c_program_invocation_short_name=yes, yeti_cv_lib_c_program_invocation_short_name=no)) if test "$yeti_cv_lib_c_program_invocation_short_name" = yes; then AC_DEFINE(HAVE_PROGRAM_INVOCATION_SHORT_NAME,1,[Define if you have program_invocation_short_name variable.]) fi]) enca-1.15/man/000077500000000000000000000000001222222630600131165ustar00rootroot00000000000000enca-1.15/man/enca.1000066400000000000000000000763521222222630600141230ustar00rootroot00000000000000.de XA .RS .PP \\$1 .RE .PP .. .TH "enca" "1" "Sep 2009" "enca 1.11" " " .SH "NAME" .PP enca \-\- detect and convert encoding of text files . . .SH "SYNOPSIS" .PP \fBenca\fR [\fB\-L\fR \fILANGUAGE\fR] [\fIOPTION\fR]... [\fIFILE\fR]... .br \fBenconv\fR [\fB\-L\fR \fILANGUAGE\fR] [\fIOPTION\fR]... [\fIFILE\fR]... . .SH "INTRODUCTION AND EXAMPLES" .PP If you are lucky enough, the only two things you will ever need to know are: command .XA "enca \fIFILE\fR" will tell you which encoding file \fIFILE\fR uses (without changing it), and .XA "enconv \fIFILE\fR" will convert file \fIFILE\fR to your locale native encoding. To convert the file to some other encoding use the \fB-x\fR option (see \fB\-x\fR entry in section \fBOPTIONS\fR and sections \fBCONVERSION\fR and \fBENCODINGS\fR for details). .PP Both work with multiple files and standard input (output) too. E.g. .XA "enca \-x latin2 2,1) /4321@Byte order reversed in quadruples (1,2,3,4 -> 4,3,2,1) N.A.@Both little and big endian chunks, concatenated /qp@Quoted-printable encoded .TE .PP Note some surfaces have N.A. in place of identifier\-\-they cannot be specified on command line, they can only be reported by Enca. This is intentional because they only inform you why the file cannot be considered surface-consistent instead of representing a real surface. .PP Each charset has its natural surface (called `implied' in recode) which is not reported, e.g., for IBM 852 charset it's `CRLF line terminators'. For UCS encodings, big endian is considered as natural surface; unusual byte orders are constructed from 21 and 4321 permutations: 2143 is reported simply as 21, while 3412 is reported as combination of 4321 and 21. .PP Doubly-encoded UTF-8 is neither charset nor surface, it's just reported. .PP . .SS About charsets, encodings and surfaces .PP Charset is a set of character entities while encoding is its representation in the terms of bytes and bits. In Enca, the word \fIencoding\fR means the same as `representation of text', i.e. the relation between sequence of character entities constituting the text and sequence of bytes (bits) constituting the file. .PP So, encoding is both character set and so-called surface (line terminators, byte order, combining, Base64 transformation, etc.). Nevertheless, it proves convenient to work with some {charset,surface} pairs as with genuine charsets. So, as in \fIrecode\fR(1), all UCS- and UTF- encodings of Universal character set are called charsets. Please see recode documentation for more details of this issue. .PP The only good thing about surfaces is: when you don't start playing with them, neither Enca won't start and it will try to behave as much as possible as a surface-unaware program, even when talking to recode. .PP . . .SH "LANGUAGES" .PP Enca needs to know the language of input files to work reliably, at least in case of regular 8bit encoding. Multibyte encodings should be recognised for any Latin, Cyrillic or Greek language. .PP You can (or have to) use \fB\-L\fR option to tell Enca the language. Since people most often work with files in the same language for which they have configured locales, Enca tries tries to guess the language by examining value of \fBLC_CTYPE\fR and other locale categories (please see \fIlocale\fR(7)) and using it for the language when you don't specify any. Of course, it may be completely wrong and will give you nonsense answers and damage your files, so please don't forget to use the \fB\-L\fR option. You can also use \fBENCAOPT\fR environment variable to set a default language (see section \fBENVIRONMENT\fR). .PP Following languages are supported by Enca (each language is listed together with supported 8bit encodings). .PP .TS tab (@); l l. Belarussian@CP1251 IBM866 ISO\-8859\-5 KOI8\-UNI maccyr IBM855 Bulgarian @CP1251 ISO\-8859\-5 IBM855 maccyr ECMA\-113 Czech @ISO\-8859\-2 CP1250 IBM852 KEYBCS2 macce KOI\-8_CS_2 CORK Estonian @ISO\-8859\-4 CP1257 IBM775 ISO\-8859\-13 macce baltic Croatian @CP1250 ISO\-8859\-2 IBM852 macce CORK Hungarian @ISO\-8859\-2 CP1250 IBM852 macce CORK Lithuanian @CP1257 ISO\-8859\-4 IBM775 ISO\-8859\-13 macce baltic Latvian @CP1257 ISO\-8859\-4 IBM775 ISO\-8859\-13 macce baltic Polish @ISO\-8859\-2 CP1250 IBM852 macce ISO\-8859\-13 ISO\-8859\-16 baltic CORK Russian @KOI8\-R CP1251 ISO\-8859\-5 IBM866 maccyr Slovak @CP1250 ISO\-8859\-2 IBM852 KEYBCS2 macce KOI\-8_CS_2 CORK Slovene @ISO\-8859\-2 CP1250 IBM852 macce CORK Ukrainian @CP1251 IBM855 ISO\-8859\-5 CP1125 KOI8\-U maccyr Chinese @GBK BIG5 HZ none @ .TE .PP The special language \fBnone\fR can be shortened to \fB__\fR, it contains no 8bit encodings, so only multibyte encodings are detected. .PP You can also use locale names instead of languages: .TS tab (@); l l. Belarussian @be Bulgarian @bg Czech @cs Estonian @et Croatian @hr Hungarian @hu Lithuanian @lt Latvian @lv Polish @pl Russian @ru Slovak @sk Slovene @sl Ukrainian @uk Chinese @zh .TE .PP . . .SH "FEATURES" .PP Several Enca's features depend on what is available on your system and how it was compiled. You can get their list with .XA "enca \-\-version" Plus sign before a feature name means it's available, minus sign means this build lacks the particular feature. .PP \fBlibrecode\-interface\fR. Enca has interface to GNU recode library charset conversion functions. .sp \fBiconv\-interface\fR. Enca has interface to UNIX98 iconv charset conversion functions. .sp \fBexternal\-converter\fR. Enca can use external conversion programs (if you have some suitable installed). .sp \fBlanguage\-detection\fR. Enca tries to guess language (\fB\-L\fR) from locales. You don't need the \fB\-\-language\fR option, at least in principle. .sp \fBlocale\-alias\fR. Enca is able to decrypt locale aliases used for language names. .sp \fBtarget\-charset\-auto\fR. Enca tries to detect your preferred charset from locales. Option \fB\-\-auto\-convert\fR and calling Enca as \fBenconv\fR works, at least in principle. .sp \fBENCAOPT\fR. Enca is able to correctly parse this environment variable before command line parameters. Simple stuff like \fBENCAOPT="\-L uk"\fR will work even without this feature. .PP . . .SH "ENVIRONMENT" .PP The variable \fBENCAOPT\fR can hold set of default Enca options. Its content is interpreted before command line arguments. Unfortunately, this doesn't work everywhere (must have +ENCAOPT feature). .PP \fBLC_CTYPE\fR, \fBLC_COLLATE\fR, \fBLC_MESSAGES\fR (possibly inherited from \fBLC_ALL\fR or \fBLANG\fR) is used for guessing your language (must have +language-detection feature). .PP The variable \fBDEFAULT_CHARSET\fR can be used by \fBenconv\fR as the default target charset. .PP . . .SH "DIAGNOSTICS" .PP Enca returns exit code\~0 when all input files were successfully proceeded (i.e. all encodings were detected and all files were converted to required encoding, if conversion was asked for). Exit code\~1 is returned when Enca wasn't able to either guess encoding or perform conversion on any input file because it's not clever enough. Exit code\~2 is returned in case of serious (e.g. I/O) troubles. .PP . . .SH "SECURITY" .PP It should be possible to let Enca work unattended, it's its goal. However: .PP There's no warranty the detection works 100%. Don't bet on it, you can easily lose valuable data. .PP Don't use enca (the program), link to libenca instead if you want anything resembling security. You have to perform the eventual conversion yourself then. .PP Don't use external converters. Ideally, disable them compile-time. .PP Be aware of \fBENCAOPT\fR and all the built-in automagic guessing various things from environment, namely locales. .PP . . .SH "SEE ALSO" .PP \fIautoconvert\fR(1), \fIcstocs\fR(1), \fIfile\fR(1), \fIiconv\fR(1), \fIiconv\fR(3), \fInl_langinfo\fR(3), \fImap\fR(1), \fIpiconv\fR(1), \fIrecode\fR(1), \fIlocale\fR(5), \fIlocale\fR(7), \fIltt\fR(1), \fIumap\fR(1), \fIunicode\fR(7), \fIutf-8\fR(7), \fIxcode\fR(1) .PP . . .SH "KNOWN BUGS" .PP It has too many \fIunknown\fR bugs. .PP The idea of using \fBLC_*\fR value for language is certainly braindead. However I like it. .PP It can't backup files before mangling them. .PP In certain situations, it may behave incorrectly on >31bit file systems and/or over NFS (both untested but shouldn't cause problems in practice). .PP Built\-in converter does not convert character `ch' from \fIKOI8-CS2\fR, and possibly some other characters you've probably never heard about anyway. .PP EOL type recognition works poorly on Quoted-printable encoded files. This should be fixed someday. .PP There are no command line options to tune libenca parameters. This is intentional (Enca should DWIM) but sometimes this is a nuisance. .PP The manual page is too long, especially this section. This doesn't matter since nobody does read it. .PP Send bug reports to . . . .SH "TRIVIA" .PP Enca is Extremely Naive Charset Analyser. Nevertheless, the `enc' originally comes from `encoding' so the leading\~`e' should be read as in `encoding' not as in `extreme'. . . .SH "AUTHORS" .PP David Necas (Yeti) .PP Michal Cihar .sp Unicode data has been generated from various (free) on\-line resources or using GNU recode. Statistical data has been generated from various texts on the Net, I hope character counting doesn't break anyone's copyright. . . .SH "ACKNOWLEDGEMENTS" .PP Please see the file THANKS in distribution. . . .SH "COPYRIGHT" .PP Copyright (C) 2000-2003 David Necas (Yeti). .PP Copyright (C) 2009 Michal Cihar . .sp Enca 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. .sp Enca 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. .sp You should have received a copy of the GNU General Public License along with Enca; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. . enca-1.15/missing000077500000000000000000000245331222222630600137510ustar00rootroot00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2004-09-07.08 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, 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. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." exit 0 ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit 0 ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case "$1" in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: enca-1.15/mkinstalldirs000077500000000000000000000013261222222630600151530ustar00rootroot00000000000000#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain # $Id: mkinstalldirs,v 1.1.1.1 2001/05/23 19:55:09 yeti Exp $ errstatus=0 for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr fi fi pathcomp="$pathcomp/" done done exit $errstatus # mkinstalldirs ends here enca-1.15/script/000077500000000000000000000000001222222630600136475ustar00rootroot00000000000000enca-1.15/script/.gitignore000066400000000000000000000001171222222630600156360ustar00rootroot00000000000000b-cstocs b-map b-piconv b-recode b-umap Makefile cstocs map piconv recode umap enca-1.15/script/Makefile.am000066400000000000000000000006001222222630600156770ustar00rootroot00000000000000# @(#) $Id: Makefile.am,v 1.7 2003/12/22 15:32:37 yeti Exp $ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = $(extconv_SCRIPTS) extconvdir = $(libexecdir)/enca/extconv extconv_SCRIPTS = \ cstocs \ map \ piconv \ recode \ umap EXTRA_DIST = \ b-recode \ b-cstocs.in \ b-map.in \ b-piconv.in \ b-umap.in %: b-% cat $< >$@ clean-local: rm -f $(extconv_SCRIPTS) *~ core.* enca-1.15/script/Makefile.in000066400000000000000000000415001222222630600157140ustar00rootroot00000000000000# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # @(#) $Id: Makefile.am,v 1.7 2003/12/22 15:32:37 yeti Exp $ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = script DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/mkinstalldirs $(srcdir)/b-cstocs.in \ $(srcdir)/b-map.in $(srcdir)/b-piconv.in $(srcdir)/b-umap.in 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/tools.m4 $(top_srcdir)/m4/typevar.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = b-cstocs b-map b-piconv b-umap 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 -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(extconvdir)" SCRIPTS = $(extconv_SCRIPTS) 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) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERTER_LIBS = @CONVERTER_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTOCS_PROG = @CSTOCS_PROG@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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@ LIBICONV = @LIBICONV@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ 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_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ 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@ 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@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = $(extconv_SCRIPTS) extconvdir = $(libexecdir)/enca/extconv extconv_SCRIPTS = \ cstocs \ map \ piconv \ recode \ umap EXTRA_DIST = \ b-recode \ b-cstocs.in \ b-map.in \ b-piconv.in \ b-umap.in 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 script/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits script/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @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): b-cstocs: $(top_builddir)/config.status $(srcdir)/b-cstocs.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ b-map: $(top_builddir)/config.status $(srcdir)/b-map.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ b-piconv: $(top_builddir)/config.status $(srcdir)/b-piconv.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ b-umap: $(top_builddir)/config.status $(srcdir)/b-umap.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-extconvSCRIPTS: $(extconv_SCRIPTS) @$(NORMAL_INSTALL) @list='$(extconv_SCRIPTS)'; test -n "$(extconvdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(extconvdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(extconvdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(extconvdir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(extconvdir)$$dir" || exit $$?; \ } \ ; done uninstall-extconvSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(extconv_SCRIPTS)'; test -n "$(extconvdir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(extconvdir)'; $(am__uninstall_files_from_dir) installcheck-extconvSCRIPTS: $(extconv_SCRIPTS) bad=0; pid=$$$$; list="$(extconv_SCRIPTS)"; for p in $$list; do \ case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ esac; \ f=`echo "$$p" | sed 's,^.*/,,;$(transform)'`; \ for opt in --help --version; do \ if "$(DESTDIR)$(extconvdir)/$$f" $$opt >c$${pid}_.out \ 2>c$${pid}_.err &2; bad=1; fi; \ done; \ done; rm -f c$${pid}_.???; exit $$bad mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(extconvdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool 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-extconvSCRIPTS 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: installcheck-extconvSCRIPTS maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-extconvSCRIPTS .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ clean-local cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am \ install-extconvSCRIPTS 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 installcheck-extconvSCRIPTS \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags-am uninstall uninstall-am \ uninstall-extconvSCRIPTS %: b-% cat $< >$@ clean-local: rm -f $(extconv_SCRIPTS) *~ core.* # 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: enca-1.15/script/b-cstocs.in000066400000000000000000000026371222222630600157240ustar00rootroot00000000000000#! /bin/sh # @(#) $Id: b-cstocs.in,v 1.3 2003/12/22 15:32:37 yeti Exp $ # cstocs batch-call wrapper. # To be called by enca, don't use directly. See enca(1) for calling convention. # # Copyright (C) 2000-2003 David Necas (Yeti) . # This is free software; it can be copied and/or modified under the terms of # version 2 of GNU General Public License, see COPYING for details. There is # NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. transform_enc_name() { case "$1" in ASCII*) echo ascii ; return ;; CP1250*) echo 1250 ; return ;; IBM852*) echo pc2 ; return ;; ISO-8859-2*) echo il2 ; return ;; KEYBCS2*) echo kam ; return ;; KOI-8_CS2*) echo koi ; return ;; UTF-8*) echo utf8 ; return ;; TeX*) echo tex ; return ;; esac echo "$1"|sed -e 's:/.*::' } if test "x$3" = "x"; then echo "$0 has to be called by enca" 1>&2 exit 1 fi umask 077 inenc=`transform_enc_name "$1"` outenc=`transform_enc_name "$2"` if test "$4" = "-"; then if cstocs "$inenc" "$outenc" <"$3"; then rm -- "$3" else echo "$0: cstocs $inenc $outenc failed" 1>&2 rm -- "$3" exit 1 fi else temp=@SHELL_RANDOM_FILENAME@ || exit 1 if cstocs "$inenc" "$outenc" <"$3" >>"$temp"; then # use cat > to preserve permissions cat $temp >"$3" else echo "$0: cstocs $inenc $outenc $3 failed, file $3 unchanged" 1>&2 rm -f $temp exit 1 fi rm -f $temp fi enca-1.15/script/b-map.in000066400000000000000000000024111222222630600151710ustar00rootroot00000000000000#! /bin/sh # @(#) $Id: b-map.in,v 1.4 2003/12/22 15:32:37 yeti Exp $ # map batch-call wrapper. # To be called by enca, don't use directly. See enca(1) for calling convention. # # Copyright (C) 2000-2003 David Necas (Yeti) . # This is free software; it can be copied and/or modified under the terms of # version 2 of GNU General Public License, see COPYING for details. There is # NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. transform_enc_name() { echo "$1" | sed -e 's:/.*::' } if test "x$3" = "x"; then echo "$0 has to be called by enca" 1>&2 exit 1 fi umask 077 inenc=`transform_enc_name "$1"` outenc=`transform_enc_name "$2"` if test "$4" = "-"; then # Note map returns 0 on failure and 1 on success! if map --from "$inenc" --to "$outenc" <"$3"; then echo "$0: map --from $inenc --to $outenc failed" 1>&2 rm -- "$3" exit 1 else rm -- "$3" fi else temp=@SHELL_RANDOM_FILENAME@ || exit 1 # Note map returns 0 on failure and 1 on success! if map --from "$inenc" --to "$outenc" <"$3" >"$temp"; then echo "$0: map --from $inenc --to $outenc <$3 failed, file $3 unchanged" 1>&2 rm -f $temp exit 1 else # use cat > to preserve permissions cat $temp >"$3" fi rm -f $temp fi enca-1.15/script/b-piconv.in000066400000000000000000000022211222222630600157110ustar00rootroot00000000000000#! /bin/sh # @(#) $Id: b-piconv.in,v 1.3 2003/12/22 15:32:37 yeti Exp $ # piconv wrapper. # To be called by enca, don't use directly. See enca(1) for calling convention. # # Copyright (C) 2000-2003 David Necas (Yeti) . # This is free software; it can be copied and/or modified under the terms of # version 2 of GNU General Public License, see COPYING for details. There is # NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. transform_enc_name() { echo "$1" | sed -e 's:/.*::' } if test "x$3" = "x"; then echo "$0 has to be called by enca" 1>&2 exit 1 fi umask 077 inenc=`transform_enc_name "$1"` outenc=`transform_enc_name "$2"` if test "$4" = "-"; then if piconv -f "$inenc" -t "$outenc" <"$3"; then rm -- "$3" else echo "$0: piconv -f $inenc -t $outenc failed" 1>&2 rm -- "$3" exit 1 fi else temp=@SHELL_RANDOM_FILENAME@ || exit 1 if piconv -f "$inenc" -t "$outenc" <"$3" >"$temp"; then # use cat > to preserve permissions cat $temp >"$3" else echo "$0: piconv -f $inenc -t $outenc <$3 failed, file $3 unchanged" 1>&2 rm -f $temp exit 1 fi rm -f $temp fi enca-1.15/script/b-recode000066400000000000000000000016761222222630600152640ustar00rootroot00000000000000#! /bin/sh # @(#) $Id: b-recode,v 1.5 2003/12/22 15:32:37 yeti Exp $ # recode braindead wrapper. # To be called by enca, don't use directly. See enca(1) for calling convention. # # Copyright (C) 2000-2001 David Necas (Yeti) . # This is free software; it can be copied and/or modified under the terms of # version 2 of GNU General Public License, see COPYING for details. There is # NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. transform_enc_name() { echo "$1" | sed -e 's:/.*::' } if test "x$3" = "x"; then echo "$0 has to be called by enca" 1>&2 exit 1 fi umask 077 inenc=`transform_enc_name "$1"` outenc="$2" if test "$4" = "-"; then recode -f "$inenc..$outenc" <"$3" \ || { echo "$0: recode -f $inenc..$outenc failed" 1>&2 exit 1; } else recode -f "$inenc..$outenc" -- "$3" \ || { echo "$0: recode -f $inenc..$outenc $3 failed, file $3 may be damaged" 1>&2 exit 1; } fi enca-1.15/script/b-umap.in000066400000000000000000000021631222222630600153620ustar00rootroot00000000000000#! /bin/sh # @(#) $Id: b-umap.in,v 1.4 2003/12/22 15:32:37 yeti Exp $ # umap batch-call wrapper. # To be called by enca, don't use directly. See enca(1) for calling convention. # # Copyright (C) 2000-2003 David Necas (Yeti) . # This is free software; it can be copied and/or modified under the terms of # version 2 of GNU General Public License, see COPYING for details. There is # NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. transform_enc_name() { echo "$1" | sed -e 's:/.*::' } if test "x$3" = "x"; then echo "$0 has to be called by enca" 1>&2 exit 1 fi umask 077 inenc=`transform_enc_name "$1"` outenc=`transform_enc_name "$2"` if test "$4" = "-"; then if umap "$inenc:$outenc" <"$3"; then rm -- "$3" else echo "$0: umap $inenc:$outenc failed" 1>&2 rm -- "$3" exit 1 fi else temp=@SHELL_RANDOM_FILENAME@ || exit 1 if umap "$inenc:$outenc" <"$3" >"$temp"; then # use cat > to preserve permissions cat $temp >"$3" else echo "$0: umap $inenc:$outenc <$3 failed, file $3 unchanged" 1>&2 rm -f $temp exit 1 fi rm -f $temp fi enca-1.15/src/000077500000000000000000000000001222222630600131325ustar00rootroot00000000000000enca-1.15/src/.gitignore000066400000000000000000000000641222222630600151220ustar00rootroot00000000000000.deps .libs HELP Makefile enca *.o COPYING.c HELP.c enca-1.15/src/HELP.in000066400000000000000000000044751222222630600142240ustar00rootroot00000000000000Usage: enca [-L LANGUAGE] [OPTION]... [FILE]... enconv [-L LANGUAGE] [OPTION]... [FILE]... Detect encoding of text files and convert them if required. Operation modes: -g, --guess Behave as `enca' (just detect encoding by default) -c, --auto-convert Behave as `enconv' (autoconvert by default) Output type selectors: -d, --details Print failure reason when encoding was not recognized -e, --enca-name Print enca's encoding name (passed to converters) -f, --human-readable Print full (descriptive) encoding name (default) -i, --iconv-name Print how iconv calls the encoding -m, --mime-name Print preferred MIME encoding name -r, --rfc1345-name Print RFC 1345 (or otherwise canonized) encoding name -s, --cstocs-name Print how cstocs calls the encoding -n, --name=WORD Print required name (enca-name, human-readable, etc.) -x, --convert-to=ENC Convert file to some other encoding ENC Guessing parameters: -L, --language=LANG Set language of FILEs; obligatory, when cannot be determined from locale settings Conversion parameters: -E, --external-converter-program=PATH Set external converter program name (default: @DEFAULT_EXTERNAL_CONVERTER@) -C, --try-converters=LIST Converters to be tried (associative) (default: @DEFAULT_CONVERTER_LIST@) General options: -p, --with-filename Print the file name for each result -P, --no-filename Suppress the prefixing filename on output -V, --verbose Increase verbosity level Listings: -G, --license Print full enca license and terminate -h, --help Print this help and terminate -l, --list=WORD Print required list (built-in-charsets, converters, charsets, languages, lists, names, surfaces) and terminate -v, --version Print version and build information and terminate With no FILE, reads standard input and possibly writes converted stream to standard output. Exit status is 0 if all files were successfully proceeded, 1 if some were not recognized or converted, 2 in real troubles. When called as `enconv' without -x, target encoding it guessed from locales. Report bugs to @PACKAGE_BUGREPORT@ enca-1.15/src/Makefile.am000066400000000000000000000025531222222630600151730ustar00rootroot00000000000000# @(#) $Id: Makefile.am,v 1.22 2004/07/22 16:18:42 yeti Exp $ bin_PROGRAMS = enca noinst_SCRIPTS = text2c.sh enca_SOURCES = \ COPYING.c \ HELP.c \ common.h \ convert.c \ convert_extern.c \ convert_recode.c \ convert_iconv.c \ enca.c \ filebuf.c \ locale_detect.c \ options.c EXTRA_enca_SOURCES = \ getopt.h BUILT_SOURCES = \ COPYING.c \ HELP.c EXTRA_DIST = \ HELP.in \ text2c.sh enca_LDADD = @LIBOBJS@ @CONVERTER_LIBS@ ../lib/libenca.la enca_LDFLAGS = @LDFLAGS@ @LIBS@ enca_DEPENDENCIES = @LIBOBJS@ ../lib/libenca.la enca_CPPFLAGS = -DEXTCONV_DIR=\"@libexecdir@/enca/extconv\" AM_CPPFLAGS = -I$(top_srcdir)/lib $(GCOV_CPPFLAGS) AM_LDFLAGS = $(GCOV_LDFLAGS) AM_CFLAGS = $(GCOV_FLAGS) # BUILT_SOURCES. How we build them: # For inclusion of GNU General Public License directly into Enca COPYING.c: $(top_srcdir)/COPYING $(srcdir)/text2c.sh $(srcdir)/text2c.sh $(top_srcdir)/COPYING >COPYING.c HELP.c: HELP $(srcdir)/text2c.sh $(srcdir)/text2c.sh HELP >HELP.c install-exec-hook: cd $(DESTDIR)$(bindir); \ inst1=`echo enca | sed '$(transform)'`; \ inst2=`echo enconv | sed '$(transform)'`; \ $(LN_S) $$inst1$(EXEEXT) $$inst2$(EXEEXT) uninstall-hook: inst=`echo enconv | sed '$(transform)'`; \ rm -f $(DESTDIR)$(bindir)/$$inst$(EXEEXT) clean-local: rm -f core.* *~ HELP.c COPYING.c rm -f *.gc* dist-hook: rm -f $(distdir)/HELP.c $(distdir)/COPYING.c enca-1.15/src/Makefile.in000066400000000000000000001207611222222630600152060ustar00rootroot00000000000000# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = enca$(EXEEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/mkinstalldirs $(srcdir)/HELP.in getopt_long.c \ $(top_srcdir)/depcomp 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/tools.m4 $(top_srcdir)/m4/typevar.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = HELP CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_enca_OBJECTS = enca-COPYING.$(OBJEXT) enca-HELP.$(OBJEXT) \ enca-convert.$(OBJEXT) enca-convert_extern.$(OBJEXT) \ enca-convert_recode.$(OBJEXT) enca-convert_iconv.$(OBJEXT) \ enca-enca.$(OBJEXT) enca-filebuf.$(OBJEXT) \ enca-locale_detect.$(OBJEXT) enca-options.$(OBJEXT) enca_OBJECTS = $(am_enca_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 = enca_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(enca_LDFLAGS) $(LDFLAGS) -o $@ SCRIPTS = $(noinst_SCRIPTS) 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__depfiles_maybe = depfiles 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 = $(enca_SOURCES) $(EXTRA_enca_SOURCES) DIST_SOURCES = $(enca_SOURCES) $(EXTRA_enca_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) # 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)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERTER_LIBS = @CONVERTER_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTOCS_PROG = @CSTOCS_PROG@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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@ LIBICONV = @LIBICONV@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ 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_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ 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@ 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_SCRIPTS = text2c.sh enca_SOURCES = \ COPYING.c \ HELP.c \ common.h \ convert.c \ convert_extern.c \ convert_recode.c \ convert_iconv.c \ enca.c \ filebuf.c \ locale_detect.c \ options.c EXTRA_enca_SOURCES = \ getopt.h BUILT_SOURCES = \ COPYING.c \ HELP.c EXTRA_DIST = \ HELP.in \ text2c.sh enca_LDADD = @LIBOBJS@ @CONVERTER_LIBS@ ../lib/libenca.la enca_LDFLAGS = @LDFLAGS@ @LIBS@ enca_DEPENDENCIES = @LIBOBJS@ ../lib/libenca.la enca_CPPFLAGS = -DEXTCONV_DIR=\"@libexecdir@/enca/extconv\" AM_CPPFLAGS = -I$(top_srcdir)/lib $(GCOV_CPPFLAGS) AM_LDFLAGS = $(GCOV_LDFLAGS) AM_CFLAGS = $(GCOV_FLAGS) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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 src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @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): HELP: $(top_builddir)/config.status $(srcdir)/HELP.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list installcheck-binPROGRAMS: $(bin_PROGRAMS) bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \ case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ esac; \ f=`echo "$$p" | \ sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ for opt in --help --version; do \ if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \ 2>c$${pid}_.err &2; bad=1; fi; \ done; \ done; rm -f c$${pid}_.???; exit $$bad enca$(EXEEXT): $(enca_OBJECTS) $(enca_DEPENDENCIES) $(EXTRA_enca_DEPENDENCIES) @rm -f enca$(EXEEXT) $(AM_V_CCLD)$(enca_LINK) $(enca_OBJECTS) $(enca_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt_long.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enca-COPYING.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enca-HELP.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enca-convert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enca-convert_extern.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enca-convert_iconv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enca-convert_recode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enca-enca.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enca-filebuf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enca-locale_detect.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enca-options.Po@am__quote@ .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 $@ $< enca-COPYING.o: COPYING.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT enca-COPYING.o -MD -MP -MF $(DEPDIR)/enca-COPYING.Tpo -c -o enca-COPYING.o `test -f 'COPYING.c' || echo '$(srcdir)/'`COPYING.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/enca-COPYING.Tpo $(DEPDIR)/enca-COPYING.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='COPYING.c' object='enca-COPYING.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o enca-COPYING.o `test -f 'COPYING.c' || echo '$(srcdir)/'`COPYING.c enca-COPYING.obj: COPYING.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT enca-COPYING.obj -MD -MP -MF $(DEPDIR)/enca-COPYING.Tpo -c -o enca-COPYING.obj `if test -f 'COPYING.c'; then $(CYGPATH_W) 'COPYING.c'; else $(CYGPATH_W) '$(srcdir)/COPYING.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/enca-COPYING.Tpo $(DEPDIR)/enca-COPYING.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='COPYING.c' object='enca-COPYING.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o enca-COPYING.obj `if test -f 'COPYING.c'; then $(CYGPATH_W) 'COPYING.c'; else $(CYGPATH_W) '$(srcdir)/COPYING.c'; fi` enca-HELP.o: HELP.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT enca-HELP.o -MD -MP -MF $(DEPDIR)/enca-HELP.Tpo -c -o enca-HELP.o `test -f 'HELP.c' || echo '$(srcdir)/'`HELP.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/enca-HELP.Tpo $(DEPDIR)/enca-HELP.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='HELP.c' object='enca-HELP.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o enca-HELP.o `test -f 'HELP.c' || echo '$(srcdir)/'`HELP.c enca-HELP.obj: HELP.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT enca-HELP.obj -MD -MP -MF $(DEPDIR)/enca-HELP.Tpo -c -o enca-HELP.obj `if test -f 'HELP.c'; then $(CYGPATH_W) 'HELP.c'; else $(CYGPATH_W) '$(srcdir)/HELP.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/enca-HELP.Tpo $(DEPDIR)/enca-HELP.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='HELP.c' object='enca-HELP.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o enca-HELP.obj `if test -f 'HELP.c'; then $(CYGPATH_W) 'HELP.c'; else $(CYGPATH_W) '$(srcdir)/HELP.c'; fi` enca-convert.o: convert.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT enca-convert.o -MD -MP -MF $(DEPDIR)/enca-convert.Tpo -c -o enca-convert.o `test -f 'convert.c' || echo '$(srcdir)/'`convert.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/enca-convert.Tpo $(DEPDIR)/enca-convert.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='convert.c' object='enca-convert.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o enca-convert.o `test -f 'convert.c' || echo '$(srcdir)/'`convert.c enca-convert.obj: convert.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT enca-convert.obj -MD -MP -MF $(DEPDIR)/enca-convert.Tpo -c -o enca-convert.obj `if test -f 'convert.c'; then $(CYGPATH_W) 'convert.c'; else $(CYGPATH_W) '$(srcdir)/convert.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/enca-convert.Tpo $(DEPDIR)/enca-convert.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='convert.c' object='enca-convert.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o enca-convert.obj `if test -f 'convert.c'; then $(CYGPATH_W) 'convert.c'; else $(CYGPATH_W) '$(srcdir)/convert.c'; fi` enca-convert_extern.o: convert_extern.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT enca-convert_extern.o -MD -MP -MF $(DEPDIR)/enca-convert_extern.Tpo -c -o enca-convert_extern.o `test -f 'convert_extern.c' || echo '$(srcdir)/'`convert_extern.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/enca-convert_extern.Tpo $(DEPDIR)/enca-convert_extern.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='convert_extern.c' object='enca-convert_extern.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o enca-convert_extern.o `test -f 'convert_extern.c' || echo '$(srcdir)/'`convert_extern.c enca-convert_extern.obj: convert_extern.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT enca-convert_extern.obj -MD -MP -MF $(DEPDIR)/enca-convert_extern.Tpo -c -o enca-convert_extern.obj `if test -f 'convert_extern.c'; then $(CYGPATH_W) 'convert_extern.c'; else $(CYGPATH_W) '$(srcdir)/convert_extern.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/enca-convert_extern.Tpo $(DEPDIR)/enca-convert_extern.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='convert_extern.c' object='enca-convert_extern.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o enca-convert_extern.obj `if test -f 'convert_extern.c'; then $(CYGPATH_W) 'convert_extern.c'; else $(CYGPATH_W) '$(srcdir)/convert_extern.c'; fi` enca-convert_recode.o: convert_recode.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT enca-convert_recode.o -MD -MP -MF $(DEPDIR)/enca-convert_recode.Tpo -c -o enca-convert_recode.o `test -f 'convert_recode.c' || echo '$(srcdir)/'`convert_recode.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/enca-convert_recode.Tpo $(DEPDIR)/enca-convert_recode.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='convert_recode.c' object='enca-convert_recode.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o enca-convert_recode.o `test -f 'convert_recode.c' || echo '$(srcdir)/'`convert_recode.c enca-convert_recode.obj: convert_recode.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT enca-convert_recode.obj -MD -MP -MF $(DEPDIR)/enca-convert_recode.Tpo -c -o enca-convert_recode.obj `if test -f 'convert_recode.c'; then $(CYGPATH_W) 'convert_recode.c'; else $(CYGPATH_W) '$(srcdir)/convert_recode.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/enca-convert_recode.Tpo $(DEPDIR)/enca-convert_recode.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='convert_recode.c' object='enca-convert_recode.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o enca-convert_recode.obj `if test -f 'convert_recode.c'; then $(CYGPATH_W) 'convert_recode.c'; else $(CYGPATH_W) '$(srcdir)/convert_recode.c'; fi` enca-convert_iconv.o: convert_iconv.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT enca-convert_iconv.o -MD -MP -MF $(DEPDIR)/enca-convert_iconv.Tpo -c -o enca-convert_iconv.o `test -f 'convert_iconv.c' || echo '$(srcdir)/'`convert_iconv.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/enca-convert_iconv.Tpo $(DEPDIR)/enca-convert_iconv.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='convert_iconv.c' object='enca-convert_iconv.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o enca-convert_iconv.o `test -f 'convert_iconv.c' || echo '$(srcdir)/'`convert_iconv.c enca-convert_iconv.obj: convert_iconv.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT enca-convert_iconv.obj -MD -MP -MF $(DEPDIR)/enca-convert_iconv.Tpo -c -o enca-convert_iconv.obj `if test -f 'convert_iconv.c'; then $(CYGPATH_W) 'convert_iconv.c'; else $(CYGPATH_W) '$(srcdir)/convert_iconv.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/enca-convert_iconv.Tpo $(DEPDIR)/enca-convert_iconv.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='convert_iconv.c' object='enca-convert_iconv.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o enca-convert_iconv.obj `if test -f 'convert_iconv.c'; then $(CYGPATH_W) 'convert_iconv.c'; else $(CYGPATH_W) '$(srcdir)/convert_iconv.c'; fi` enca-enca.o: enca.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT enca-enca.o -MD -MP -MF $(DEPDIR)/enca-enca.Tpo -c -o enca-enca.o `test -f 'enca.c' || echo '$(srcdir)/'`enca.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/enca-enca.Tpo $(DEPDIR)/enca-enca.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='enca.c' object='enca-enca.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o enca-enca.o `test -f 'enca.c' || echo '$(srcdir)/'`enca.c enca-enca.obj: enca.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT enca-enca.obj -MD -MP -MF $(DEPDIR)/enca-enca.Tpo -c -o enca-enca.obj `if test -f 'enca.c'; then $(CYGPATH_W) 'enca.c'; else $(CYGPATH_W) '$(srcdir)/enca.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/enca-enca.Tpo $(DEPDIR)/enca-enca.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='enca.c' object='enca-enca.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o enca-enca.obj `if test -f 'enca.c'; then $(CYGPATH_W) 'enca.c'; else $(CYGPATH_W) '$(srcdir)/enca.c'; fi` enca-filebuf.o: filebuf.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT enca-filebuf.o -MD -MP -MF $(DEPDIR)/enca-filebuf.Tpo -c -o enca-filebuf.o `test -f 'filebuf.c' || echo '$(srcdir)/'`filebuf.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/enca-filebuf.Tpo $(DEPDIR)/enca-filebuf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='filebuf.c' object='enca-filebuf.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o enca-filebuf.o `test -f 'filebuf.c' || echo '$(srcdir)/'`filebuf.c enca-filebuf.obj: filebuf.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT enca-filebuf.obj -MD -MP -MF $(DEPDIR)/enca-filebuf.Tpo -c -o enca-filebuf.obj `if test -f 'filebuf.c'; then $(CYGPATH_W) 'filebuf.c'; else $(CYGPATH_W) '$(srcdir)/filebuf.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/enca-filebuf.Tpo $(DEPDIR)/enca-filebuf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='filebuf.c' object='enca-filebuf.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o enca-filebuf.obj `if test -f 'filebuf.c'; then $(CYGPATH_W) 'filebuf.c'; else $(CYGPATH_W) '$(srcdir)/filebuf.c'; fi` enca-locale_detect.o: locale_detect.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT enca-locale_detect.o -MD -MP -MF $(DEPDIR)/enca-locale_detect.Tpo -c -o enca-locale_detect.o `test -f 'locale_detect.c' || echo '$(srcdir)/'`locale_detect.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/enca-locale_detect.Tpo $(DEPDIR)/enca-locale_detect.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='locale_detect.c' object='enca-locale_detect.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o enca-locale_detect.o `test -f 'locale_detect.c' || echo '$(srcdir)/'`locale_detect.c enca-locale_detect.obj: locale_detect.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT enca-locale_detect.obj -MD -MP -MF $(DEPDIR)/enca-locale_detect.Tpo -c -o enca-locale_detect.obj `if test -f 'locale_detect.c'; then $(CYGPATH_W) 'locale_detect.c'; else $(CYGPATH_W) '$(srcdir)/locale_detect.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/enca-locale_detect.Tpo $(DEPDIR)/enca-locale_detect.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='locale_detect.c' object='enca-locale_detect.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o enca-locale_detect.obj `if test -f 'locale_detect.c'; then $(CYGPATH_W) 'locale_detect.c'; else $(CYGPATH_W) '$(srcdir)/locale_detect.c'; fi` enca-options.o: options.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT enca-options.o -MD -MP -MF $(DEPDIR)/enca-options.Tpo -c -o enca-options.o `test -f 'options.c' || echo '$(srcdir)/'`options.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/enca-options.Tpo $(DEPDIR)/enca-options.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='options.c' object='enca-options.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o enca-options.o `test -f 'options.c' || echo '$(srcdir)/'`options.c enca-options.obj: options.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT enca-options.obj -MD -MP -MF $(DEPDIR)/enca-options.Tpo -c -o enca-options.obj `if test -f 'options.c'; then $(CYGPATH_W) 'options.c'; else $(CYGPATH_W) '$(srcdir)/options.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/enca-options.Tpo $(DEPDIR)/enca-options.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='options.c' object='enca-options.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(enca_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o enca-options.obj `if test -f 'options.c'; then $(CYGPATH_W) 'options.c'; else $(CYGPATH_W) '$(srcdir)/options.c'; fi` 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: $(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: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -rf $(DEPDIR) ./$(DEPDIR) -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-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook 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: installcheck-binPROGRAMS maintainer-clean: maintainer-clean-am -rm -rf $(DEPDIR) ./$(DEPDIR) -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-binPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: all check install install-am install-exec-am install-strip \ uninstall-am .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool clean-local \ cscopelist-am ctags ctags-am dist-hook distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-exec-hook install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installcheck-binPROGRAMS \ 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-binPROGRAMS uninstall-hook # BUILT_SOURCES. How we build them: # For inclusion of GNU General Public License directly into Enca COPYING.c: $(top_srcdir)/COPYING $(srcdir)/text2c.sh $(srcdir)/text2c.sh $(top_srcdir)/COPYING >COPYING.c HELP.c: HELP $(srcdir)/text2c.sh $(srcdir)/text2c.sh HELP >HELP.c install-exec-hook: cd $(DESTDIR)$(bindir); \ inst1=`echo enca | sed '$(transform)'`; \ inst2=`echo enconv | sed '$(transform)'`; \ $(LN_S) $$inst1$(EXEEXT) $$inst2$(EXEEXT) uninstall-hook: inst=`echo enconv | sed '$(transform)'`; \ rm -f $(DESTDIR)$(bindir)/$$inst$(EXEEXT) clean-local: rm -f core.* *~ HELP.c COPYING.c rm -f *.gc* dist-hook: rm -f $(distdir)/HELP.c $(distdir)/COPYING.c # 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: enca-1.15/src/common.h000066400000000000000000000145311222222630600145770ustar00rootroot00000000000000/* @(#) $Id: common.h,v 1.28 2005/02/27 12:08:56 yeti Exp $ */ #ifndef COMMON_H #define COMMON_H 1 #ifndef PACKAGE_NAME # ifdef HAVE_CONFIG_H # include "config.h" # else /* HAVE_CONFIG_H */ # define PACKAGE_NAME "Enca" # define PACKAGE_TARNAME "enca" # define PACKAGE_VERSION "" # define DEFAULT_EXTERNAL_CONVERTER "" # define DEFAULT_CONVERTER_LIST "built-in" # endif /* HAVE_CONFIG_H */ #endif /* not PACKAGE_NAME */ #include #include #include #include #include #include #include "../lib/internal.h" /* define or correctly redefine EXIT_* values */ #if !(defined EXIT_SUCCESS) || (EXIT_SUCCESS != 0) # define EXIT_SUCCESS 0 # define EXIT_FAILURE 1 #endif /* !(defined EXIT_SUCCESS) || (EXIT_SUCCESS != 0) */ #define EXIT_TROUBLE 2 /* 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 HAVE_ERRNO_H # include #else /* HAVE_ERRNO_H */ extern int errno; #endif /* HAVE_ERRNO_H */ /* portable isatty(), assume never on tty when neither isatty/ttyname is available */ #ifdef HAVE_ISATTY # define enca_isatty(fd) (isatty(fd)) #elif HAVE_TTYNAME # define enca_isatty (ttyname(fd) != NULL) #else /* HAVE_ISATTY || HAVE_TTYNAME */ # define enca_isatty (0) #endif /* HAVE_ISATTY || HAVE_TTYNAME */ /* make sure STDIN_FILENO and STDOUT_FILENO are defined */ #ifndef STDIN_FILENO # define STDIN_FILENO 0 #endif /* not STDIN_FILENO */ #ifndef STDOUT_FILENO # define STDOUT_FILENO 1 #endif /* not STDOUT_FILENO */ /* Conversion error codes: ok conversion between these encodings is not possible i/o failure, child died converter library is cheating malformed input, cannot exec external converter FIXME: this is an ISO C violation E[a-z0-9]+ are reserved for error names */ typedef enum { ERR_OK = 0, ERR_CANNOT, ERR_IOFAIL, ERR_CHILD, ERR_LIBCOM, ERR_MALFORM, ERR_EXEC = 15 } ConvertErrorCode; /* Output type. */ typedef enum { OTYPE_CS2CS = 0, OTYPE_RFC1345, OTYPE_HUMAN, OTYPE_DETAILS, OTYPE_CANON, OTYPE_ICONV, OTYPE_MIME, OTYPE_CONVERT, OTYPE_ALIASES } OutputType; typedef void *pointer; /* untyped pointer */ typedef const void *cpointer; /* constant untyped pointer */ typedef unsigned char byte; /* byte */ /* Forward type declarations. */ typedef struct _Abbreviation Abbreviation; typedef struct _Buffer Buffer; typedef struct _File File; typedef struct _Options Options; /* Struct abbreviation. */ struct _Abbreviation { const char *name; /* full name */ cpointer data; /* corresponding value */ }; /* Struct I/O buffer. */ struct _Buffer { size_t size; /* buffer size */ ssize_t pos; /* position in buffer */ byte *data; /* the buffer itself buffer */ }; /* Struct file stream. */ struct _File { char *name; /* file name, NULL if stdin/stdout */ Buffer *buffer; /* buffer for i/o operations */ FILE *stream; /* the stream, NULL when not opened */ off_t size; /* file size, nonsense when name == NULL */ }; /* Struct options. */ struct _Options { int verbosity_level; /* Verbosity level. */ char *language; /* Language of analysed files. */ OutputType output_type; /* What kind of action is expected after guess. */ EncaEncoding target_enc; /* Target encoding for conversion. */ char *target_enc_str; /* How user specified the target encoding. */ int prefix_filename; /* Do prepend filename: before results? */ }; /* Enca options. */ extern Options options; /* Path-stripped argv[0] for everybody. */ extern char *program_name; /* size of the main i/o buffer */ extern size_t buffer_size; /* Function prototypes. */ Buffer *buffer_new(size_t size); void buffer_free(Buffer *buf); const Abbreviation* expand_abbreviation(const char *name, const Abbreviation *atable, size_t size, const char *object_name); const char* ffname_r(const char *fname); const char* ffname_w(const char *fname); ssize_t file_read(File *file); byte* file_getline(File *file); ssize_t file_write(File *file); File* file_temporary(Buffer *buffer, int ulink); off_t file_seek(File *file, off_t offset, int whence); int file_truncate(File *file, off_t length); int file_unlink(const char *fname); int file_open(File *file, const char *mode); int file_close(File *file); File* file_new(const char *fname, Buffer *buffer); void file_free(File *file); char** process_opt(int argc, char *argv[]); void print_aliases(size_t cs); OutputType get_output_type(void); int copy_and_convert (File *file_from, File *file_to, const byte *xlat); const char* format_request_string (EncaEncoding e1, EncaEncoding e2, EncaSurface mask); int convert (File *file, EncaEncoding from_enc); int add_converter (const char *cname); int external_converter_listed (void); void print_converter_list (void); void set_requested_enc (EncaEncoding enc); #ifdef HAVE_LIBRECODE int convert_recode (File *file, EncaEncoding from_enc); #endif /* HAVE_LIBRECODE */ #ifdef HAVE_GOOD_ICONV int convert_iconv (File *file, EncaEncoding from_enc); #endif /* HAVE_GOOD_ICONV */ #ifdef ENABLE_EXTERNAL int convert_external (File *file, EncaEncoding from_enc); void set_external_converter (const char *extc); int check_external_converter (void); #endif /* ENABLE_EXTERNAL */ char* detect_lang (const char *lang); #ifdef HAVE_NL_LANGINFO const char* get_lang_codeset (void); #endif /* HAVE_NL_LANGINFO */ #endif /* not COMMON_H */ /* vim: ts=2 */ enca-1.15/src/convert.c000066400000000000000000000400641222222630600147620ustar00rootroot00000000000000/* @(#) $Id: convert.c,v 1.28 2005/12/01 10:08:53 yeti Exp $ conversion to other encodings 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. */ #include "common.h" #ifdef HAVE_SYS_WAIT_H # include #else pid_t waitpid(pid_t pid, int *status, int options); #endif /* We can't go on w/o this, defining struct stat manually is braindamaged. */ #include #include /* converter flags */ #define CONV_EXTERN 0x0001 /* converter-type (filename, input encoding, output encoding) */ typedef int (* ConverterFunc)(File*, EncaEncoding); /* struct converter data */ typedef struct _ConverterData ConverterData; struct _ConverterData { unsigned long int flags; /* flags */ ConverterFunc convfunc; /* pointer to converter function */ }; /* struct converter list */ typedef struct _Converter Converter; struct _Converter { const Abbreviation *conv; /* the converter (an abbreviation table entry) */ Converter *next; /* next in the list */ }; /* converter list */ static Converter *converters = NULL; /* data for xtable */ static struct { size_t ncharsets; /* number of charsets */ int *charsets; /* charset id's for active language [ncharsets] */ byte *tables; /* tables from charsets to target_charset [ncharsets * 0x100] */ int *have_table; /* whether particular table is already cached [ncharsets] */ unsigned int *ucs2_map; /* temporary space for map computation [0x10000] */ unsigned int target_map[0x100]; } xdata = { 0, NULL, NULL, NULL, NULL, { 0 } }; /* Local prototypes. */ static int convert_builtin (File *file, EncaEncoding from_enc); static const byte* xtable (int from_charset); static void xdata_free (void); static const ConverterData cdata_builtin = { 0, &convert_builtin }; #ifdef HAVE_LIBRECODE static const ConverterData cdata_librecode = { 0, &convert_recode }; #endif /* HAVE_LIBRECODE */ #ifdef HAVE_GOOD_ICONV static const ConverterData cdata_iconv = { 0, &convert_iconv }; #endif /* HAVE_GOOD_ICONV */ #ifdef ENABLE_EXTERNAL static const ConverterData cdata_extern = { CONV_EXTERN, &convert_external }; #endif /* ENABLE_EXTERNAL */ static const Abbreviation CONVERTERS[] = { { "built-in", &cdata_builtin }, #ifdef HAVE_LIBRECODE { "librecode", &cdata_librecode }, #endif /* HAVE_LIBRECODE */ #ifdef HAVE_GOOD_ICONV { "iconv", &cdata_iconv }, #endif /* HAVE_GOOD_ICONV */ #ifdef ENABLE_EXTERNAL { "extern", &cdata_extern } #endif /* ENABLE_EXTERNAL */ }; /* decide which converter should be run and do common checks from_enc, to_enc are current and requested encoding returns error code it doesn't open the file (guess() did it) and doesn't close it (caller does it) */ int convert(File *file, EncaEncoding from_enc) { Converter *conv; int extern_failed = 0; int err; if (options.verbosity_level) { fprintf(stderr, "%s: converting `%s': %s\n", program_name, ffname_r(file->name), format_request_string(from_enc, options.target_enc, 0)); } /* do nothing when requested encoding is current encoding (`nothing' may include copying stdin to stdout) */ if (from_enc.charset == options.target_enc.charset && from_enc.surface == options.target_enc.surface) { if (file->name != NULL) return ERR_OK; else return copy_and_convert(file, file, NULL); } /* try sequentially all allowed converters until we find some that can perform the conversion or exahust the list */ conv = converters; while (conv != NULL) { if (options.verbosity_level > 1) { fprintf(stderr, " trying to convert `%s' using %s\n", ffname_r(file->name), conv->conv->name); } err = ((ConverterData *)conv->conv->data)->convfunc(file, from_enc); if (err == ERR_OK) return ERR_OK; if ((((ConverterData *)conv->conv->data)->flags & CONV_EXTERN) != 0) { fprintf(stderr, "%s: external converter failed on `%s', " "probably destroying it\n", program_name, ffname_w(file->name)); extern_failed = 1; } /* don't tempt fate in case of i/o or other serious problems */ if (err != ERR_CANNOT) return ERR_IOFAIL; conv = conv->next; } /* no converter able/allowed to perform given conversion, that's bad */ fprintf(stderr, "%s: no converter is able/allowed to perform " "conversion %s on file `%s'\n", program_name, format_request_string(from_enc, options.target_enc, 0), ffname_r(file->name)); /* nevertheless stdin should be copied to stdout anyway it cannot make more mess */ if (file->name == NULL) copy_and_convert(file, file, NULL); return ERR_CANNOT; } /* built-in converter performs conversion by in place modification of file named fname or by calling copy_and_convert() for stdin -> stdout conversion returns zero on success, error code otherwise */ static int convert_builtin(File *file, EncaEncoding from_enc) { static int ascii = ENCA_CS_UNKNOWN; Buffer *buf; /* file->buffer alias */ const byte *xlat; /* conversion table */ if (!enca_charset_is_known(ascii)) { ascii = enca_name_to_charset("ascii"); assert(enca_charset_is_known(ascii)); } /* surfaces can cause fail iff user specificaly requested some * or when they are other type than EOLs */ { EncaSurface srf = options.target_enc.surface ^ from_enc.surface; if ((options.target_enc.surface && from_enc.surface != options.target_enc.surface) || srf != (srf & ENCA_SURFACE_MASK_EOL)) { if (options.verbosity_level > 2) fprintf(stderr, "%s: built-in: cannot convert between " "different surfaces\n", program_name); return ERR_CANNOT; } } /* catch trivial conversions */ { int identity = 0; if (from_enc.charset == options.target_enc.charset) identity = 1; if (from_enc.charset == ascii && enca_charset_is_8bit(options.target_enc.charset) && !enca_charset_is_binary(options.target_enc.charset)) identity = 1; if (identity) { if (file->name == NULL) return copy_and_convert(file, file, NULL); else return ERR_OK; } } xlat = xtable(from_enc.charset); if (xlat == NULL) return ERR_CANNOT; if (file->name == NULL) return copy_and_convert(file, file, xlat); /* read buffer_size bytes, convert, write back, etc. to death (or eof, whichever come first) */ buf = file->buffer; buf->pos = 0; file_seek(file, 0, SEEK_SET); do { if (file_read(file) == -1) return ERR_IOFAIL; if (buf->pos == 0) break; { size_t len = buf->pos; byte *p = buf->data; do { *p = xlat[*p]; p++; } while (--len); } if (file_seek(file, -(buf->pos), SEEK_CUR) == -1) return ERR_IOFAIL; if (file_write(file) == -1) return ERR_IOFAIL; /* XXX: apparent no-op but ISO C requires fseek() or ftell() between subsequent fwrite() and fread(), or else the latter _may_ read nonsense -- and it actually does read nonsense with glibc-2.2 (at least); see fopen(3) */ if (file_seek(file, 0, SEEK_CUR) == -1) return ERR_IOFAIL; } while (1); return ERR_OK; } /* copy file file_from to file file_to, optionally performing xlat conversion (if not NULL) file_from has to be already opened for reading, file_to has to be already opened for writing they have to share common buffer returns 0 on success, nonzero on failure */ int copy_and_convert(File *file_from, File *file_to, const byte *xlat) { Buffer *buf; /* file_from->buffer alias */ if (xlat == NULL && options.verbosity_level > 3) fprintf(stderr, " copying `%s' to `%s'\n", ffname_r(file_from->name), ffname_w(file_to->name)); assert(file_from->buffer == file_to->buffer); buf = file_from->buffer; /* If there's something in the buffer, process it first. */ if (file_from->buffer->pos != 0) { if (xlat != NULL) { size_t len = buf->pos; byte *p = buf->data; do { *p = xlat[*p]; p++; } while (--len); } if (file_write(file_to) == -1) return ERR_IOFAIL; } /* Then copy the rest. */ do { if (file_read(file_from) == -1) return ERR_IOFAIL; if (buf->pos == 0) break; if (xlat != NULL) { size_t len = buf->pos; byte *p = buf->data; do { *p = xlat[*p]; p++; } while (--len); } if (file_write(file_to) == -1) return ERR_IOFAIL; } while (1); fflush(file_to->stream); return ERR_OK; } /* add converter to list of converters (note `none' adds nothing and causes removing of all converters instead) returns zero if everything went ok, nonzero otherwise */ int add_converter(const char *cname) { /* no converters symbolic name */ static const char *CONVERTER_NAME_NONE = "none"; const Abbreviation *data; Converter *conv = NULL, *conv1; /* remove everything when we got `none' */ if (strcmp(CONVERTER_NAME_NONE, cname) == 0) { if (options.verbosity_level > 3) fprintf(stderr, "Removing all converters\n"); while (converters != NULL) { conv = converters->next; enca_free(converters); converters = conv; } return 0; } /* find converter data */ data = expand_abbreviation(cname, CONVERTERS, ELEMENTS(CONVERTERS), "converter"); if (data == NULL) return 1; /* add it to the end of converter list */ if (options.verbosity_level > 3) fprintf(stderr, "Adding converter `%s'\n", data->name); if (converters == NULL) converters = conv = NEW(Converter, 1); else { for (conv1 = converters; conv1 != NULL; conv1 = conv1->next) { /* reject duplicities */ if (data == conv1->conv->data) { fprintf(stderr, "%s: converter %s specified more than once\n", program_name, conv1->conv->name); return 1; } conv = conv1; } conv->next = NEW(Converter, 1); conv = conv->next; } conv->next = NULL; conv->conv = data; return 0; } /* return nonzero if the list contains external converter */ int external_converter_listed(void) { Converter *conv; for (conv = converters; conv; conv = conv->next) { if (((ConverterData*)conv->conv->data)->flags & CONV_EXTERN) return 1; } return 0; } /* print white separated list of all valid converter names */ void print_converter_list(void) { size_t i; for (i = 0; i < sizeof(CONVERTERS)/sizeof(Abbreviation); i++) printf("%s\n", CONVERTERS[i].name); } /* create and return request string for conversion from e1 to e2 filters out natrual surfaces || mask is NOT thread-safe returned string must NOT be freed and must be cosidered volatile */ const char* format_request_string(EncaEncoding e1, EncaEncoding e2, EncaSurface mask) { static char *s = NULL; char *p, *q; const char *e2_name, *e1_name; enca_free(s); /* build s sequentially since value returned by surface_name() is lost by the second call */ e1_name = enca_charset_name(e1.charset, ENCA_NAME_STYLE_ENCA); p = enca_get_surface_name(e1.surface & ~(enca_charset_natural_surface(e1.charset) | mask), ENCA_NAME_STYLE_ENCA); if (!enca_charset_is_known(e2.charset)) { q = enca_strdup(""); e2_name = options.target_enc_str; } else { q = enca_get_surface_name(e2.surface & ~(enca_charset_natural_surface(e2.charset) | mask), ENCA_NAME_STYLE_ENCA); e2_name = enca_charset_name(e2.charset, ENCA_NAME_STYLE_ENCA); } s = enca_strconcat(e1_name, p, "..", e2_name, q, NULL); enca_free(p); enca_free(q); return s; } /** * xtable: * @from_charset: Charset id for which the conversion table should be returned. * * Returns translation table from charset @from to (global) target charset. * * The returned table must be considered constant and must NOT be freed. * * Only conversion between charsets of one language is supported. We assume * a language contains all known charsets usable for represenation of texts, * so other charsets are taken as incompatible. * * Globals used: options.target_enc.charset, options.language. * * Returns: The conversion table [0x100]; #NULL on failure. **/ static const byte* xtable(int from_charset) { static int xtable_initialized = 0; unsigned int from_map[0x100]; size_t i; ssize_t fidx; if (!enca_charset_has_ucs2_map(options.target_enc.charset) || !enca_charset_has_ucs2_map(from_charset)) return NULL; /* Initialize when we are called the first time. */ if (!xtable_initialized) { /* Allocate various tables. Never freed. */ xdata.charsets = enca_get_language_charsets(options.language, &xdata.ncharsets); assert(xdata.ncharsets > 1); xdata.have_table = NEW(int, xdata.ncharsets); xdata.tables = NEW(byte, 0x100*xdata.ncharsets); xdata.ucs2_map = NEW(unsigned int, 0x10000); for (i = 0; i < xdata.ncharsets; i++) xdata.have_table[i] = 0; /* Initialize tables to identity */ for (i = 0; i < 0x100; i++) xdata.tables[i] = (byte)i; for (i = 1; i < xdata.ncharsets; i++) memcpy(xdata.tables + 0x100*i, xdata.tables, 0x100); /* Check whether target_charset belongs to given language */ fidx = -1; for (i = 0; i < xdata.ncharsets; i++) { if (xdata.charsets[i] == options.target_enc.charset) { fidx = i; break; } } if (fidx < 0) return NULL; { int map_created; map_created = enca_charset_ucs2_map(options.target_enc.charset, xdata.target_map); assert(map_created); } atexit(xdata_free); } /* Check whether from_charset belongs to given language */ fidx = -1; for (i = 0; i < xdata.ncharsets; i++) { if (xdata.charsets[i] == from_charset) { fidx = i; break; } } if (fidx < 0) return NULL; /* Return table if cached. */ if (xdata.have_table[fidx]) return xdata.tables + 0x100*fidx; /* Otherwise it must be generated */ { int map_created; map_created = enca_charset_ucs2_map(from_charset, from_map); assert(map_created); } for (i = 0; i < 0x10000; i++) xdata.ucs2_map[i] = ENCA_NOT_A_CHAR; for (i = 0; i < 0x100; i++) { size_t j = 0xff - i; if (xdata.target_map[j] != ENCA_NOT_A_CHAR) xdata.ucs2_map[xdata.target_map[j]] = (unsigned int)j; } /* XXX XXX XXX XXX XXX Warning: Extreme brain damage! XXX XXX XXX XXX XXX * When converting to ibm866 we have to replace Belarussian/Ukrainian i/I * with Latin versions. I've been told everybody expect this. */ if (options.target_enc.charset == enca_name_to_charset("ibm866")) { xdata.ucs2_map[0x0406] = (byte)'I'; xdata.ucs2_map[0x0456] = (byte)'i'; } for (i = 0; i < 0x100; i++) { size_t j = 0xff - i; if (from_map[j] != ENCA_NOT_A_CHAR && xdata.ucs2_map[from_map[j]] != ENCA_NOT_A_CHAR) xdata.tables[0x100*fidx + j] = (byte)xdata.ucs2_map[from_map[j]]; } return xdata.tables + 0x100*fidx; } static void xdata_free(void) { enca_free(xdata.charsets); enca_free(xdata.tables); enca_free(xdata.have_table); enca_free(xdata.ucs2_map); } /* vim: ts=2 */ enca-1.15/src/convert_extern.c000066400000000000000000000204471222222630600163520ustar00rootroot00000000000000/* @(#) $Id: convert_extern.c,v 1.9 2003/12/23 23:08:10 yeti Exp $ interface to external converter programs 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. */ #include "common.h" #ifdef ENABLE_EXTERNAL #ifdef HAVE_SYS_WAIT_H # include #else pid_t waitpid(pid_t pid, int *status, int options); #endif /* We can't go on w/o this, defining struct stat manually is braindamaged. */ #include #include #ifdef HAVE_LIMITS_H # include #endif /* HAVE_LIMITS_H */ /* Resolve all the forking mess. */ #ifdef HAVE_WORKING_VFORK # ifdef HAVE_VFORK_H # include # endif /* HAVE_VFORK_H */ #else /* HAVE_WORKING_VFORK */ # define vfork fork #endif /* HAVE_WORKING_VFORK */ #ifndef HAVE_CANONICALIZE_FILE_NAME # ifdef HAVE_REALPATH static char* canonicalize_file_name(const char *fname); # else /* HAVE_REALPATH */ # define canonicalize_file_name enca_strdup # endif /* HAVE_REALPATH */ #endif /* HAVE_CANONICALIZE_FILE_NAME */ /* external converter command */ static char *extern_converter = NULL; /* Local prototypes. */ static int check_executability_one(const char *progpath); /* fork and the child executes Settings.Converter on fname create temporary file containing stdin when fname == NULL and convert it passing special option STDOUT to converter (that is assumed to delete the temporary file itself) from_enc, to_enc are encoding names as should be passed to converter returns 0 on success, nonzero on failure; on critical failure (like we cannot fork()) it simply aborts */ int convert_external(File *file, const EncaEncoding from_enc) { /* special fourth parameter passed to external converter to instruct it to send result to stdout */ static const char *STDOUT_CONV = "-"; pid_t pid; int status; File *tempfile = NULL; char *from_name, *target_name; if (*extern_converter == '\0') { fprintf(stderr, "%s: No external converter defined!\n", program_name); return ERR_CANNOT; } if (options.verbosity_level > 2) fprintf(stderr, " launching `%s' to convert `%s'\n", extern_converter, ffname_r(file->name)); /* Is conversion of stdin requested? */ if (file->name == NULL) { /* Then we have to copy it to a temporary file. */ tempfile = file_temporary(file->buffer, 0); if (tempfile == NULL) return ERR_IOFAIL; if (copy_and_convert(file, tempfile, NULL) != 0) { file_unlink(tempfile->name); file_free(tempfile); return ERR_IOFAIL; } } /* Construct the charset names before fork() */ from_name = enca_strconcat(enca_charset_name(from_enc.charset, ENCA_NAME_STYLE_ENCA), enca_get_surface_name(from_enc.surface, ENCA_NAME_STYLE_ENCA), NULL); if (enca_charset_is_known(options.target_enc.charset) && (options.target_enc.surface & ENCA_SURFACE_UNKNOWN) == 0) { target_name = enca_strconcat(enca_charset_name(options.target_enc.charset, ENCA_NAME_STYLE_ENCA), enca_get_surface_name(options.target_enc.surface, ENCA_NAME_STYLE_ENCA), NULL); } else target_name = enca_strdup(options.target_enc_str); /* Fork. */ pid = vfork(); if (pid == 0) { /* Child. */ if (tempfile) execlp(extern_converter, extern_converter, from_name, target_name, tempfile->name, STDOUT_CONV, NULL); else execlp(extern_converter, extern_converter, from_name, target_name, file->name, NULL); exit(ERR_EXEC); } /* Parent. */ if (pid == -1) { fprintf(stderr, "%s: Cannot fork() to execute converter: %s\n", program_name, strerror(errno)); exit(EXIT_TROUBLE); } /* Wait until the child returns. */ if (waitpid(pid, &status, 0) == -1) { /* Error. */ fprintf(stderr, "%s: wait_pid() error while waiting for converter: %s\n", program_name, strerror(errno)); exit(EXIT_TROUBLE); } if (!WIFEXITED(status)) { /* Child exited abnormally. */ fprintf(stderr, "%s: Child converter process has been murdered.\n", program_name); exit(EXIT_TROUBLE); } enca_free(from_name); enca_free(target_name); if (tempfile) { unlink(tempfile->name); file_free(tempfile); } /* Child exited normally, test exit status. */ if (WEXITSTATUS(status) != EXIT_SUCCESS) { /* This means child was unable to execute converter or converter failed. */ fprintf(stderr, "%s: External converter failed (error code %d)\n", program_name, WEXITSTATUS(status)); if (WEXITSTATUS(status) == ERR_EXEC) return ERR_EXEC; else return ERR_CANNOT; } /* Success! Wow! */ return ERR_OK; } /* set external converter to extc */ void set_external_converter(const char *extc) { enca_free(extern_converter); if (strchr(extc, '/') == NULL) { if (extc[0] == 'b' && extc[1] == '-') { extc += 2; fprintf(stderr, "%s: The `b-' prefix for standard external converters " "is deprecated.\n" "I'll pretend you said `%s'.\n", program_name, extc); } extern_converter = enca_strconcat(EXTCONV_DIR, "/", extc, NULL); } else extern_converter = enca_strdup(extc); } /* return nonzero if external converter seems ok */ int check_external_converter(void) { /* FIXME: This creates a race condition. However we don't want to do all * the checking before every execlp() when conveting 500 files in a row, * and even if doing that, something can still sneak between stat() and * execlp(), so what. This is just a simple sanity check, nothing strict. */ if (*extern_converter == '\0' || !check_executability_one(extern_converter)) { fprintf(stderr, "%s: Converter `%s' doesn't seem to be executable.\n" "Note as of enca-1.3 external converters must be\n" "(a) one of the standard ones residing in %s\n" "(b) specified with full path\n", program_name, extern_converter, EXTCONV_DIR); return 0; } return 1; } /** * Checks whether @progpath is and executable we can execute it. * Tries to resolve relative paths and symlinks. **/ static int check_executability_one(const char *progpath) { static uid_t uid; static gid_t gid; static int check_executability_one_initialized = 0; struct stat st; char *fname = canonicalize_file_name(progpath); /* Is it a regular file at all? */ if (stat(fname, &st) != 0 || (st.st_mode & S_IFREG) == 0) { enca_free(fname); return 0; } /* Check executability by anyone, user, group. */ enca_free(fname); if (st.st_mode & S_IXOTH) return 1; if (!check_executability_one_initialized) { uid = getuid(); gid = getgid(); check_executability_one_initialized = 1; } if ((st.st_mode & S_IXUSR) && st.st_uid == gid) return 1; if ((st.st_mode & S_IXGRP) && st.st_uid == uid) return 1; return 0; } #ifndef HAVE_CANONICALIZE_FILE_NAME # ifdef HAVE_REALPATH # ifndef FILENAME_MAX # define FILENAME_MAX 4096 # endif /* FILENAME_MAX */ static char* canonicalize_file_name(const char *fname) { char *resolved = enca_malloc(FILENAME_MAX + 1); return realpath(fname, resolved); } # endif /* HAVE_REALPATH */ #endif /* not HAVE_CANONICALIZE_FILE_NAME */ #endif /* ENABLE_EXTERNAL */ /* vim: ts=2 */ enca-1.15/src/convert_iconv.c000066400000000000000000000211371222222630600161600ustar00rootroot00000000000000/* @(#) $Id: convert_iconv.c,v 1.19 2005/02/27 12:40:50 yeti Exp $ interface to UNIX98 iconv conversion functions 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. */ #include "common.h" #ifdef HAVE_GOOD_ICONV #include #include "iconvenc.h" /* Local prototypes. */ static int iconv_one_step (File *file_from, File *file_to, iconv_t icd); static int do_iconv_open (EncaEncoding from_enc, EncaEncoding to_enc, iconv_t *icd); static void do_iconv_close (iconv_t icd); static int acceptable_surface (EncaEncoding enc); /* Second buffer needed for iconv(). */ static Buffer *buffer_iconv = NULL; /* convert file using UNIX98 iconv functions returns 0 on success, nonzero error code otherwise when iconv implementation is not transitive (ICONV_TRANSITIVE is not defined), it may help to perform conversion via Unicode, so we try it too (probably UCS-2/ISO-10646, but maybe UTF-8---whatever has been detected at configure time) */ int convert_iconv(File *file, EncaEncoding from_enc) { static int ascii = ENCA_CS_UNKNOWN; File *tempfile = NULL; int err; iconv_t icd; if (!enca_charset_is_known(ascii)) { ascii = enca_name_to_charset("ascii"); assert(enca_charset_is_known(ascii)); } /* When iconv doesn't know the encodings, it can't convert between them. * We also don't try conversion to ASCII, it can only damage the files and * upset users, nothing else. * And fail early on really silly surfaces. */ if (!enca_charset_name(from_enc.charset, ENCA_NAME_STYLE_ICONV) || (enca_charset_is_known(options.target_enc.charset) && !enca_charset_name(options.target_enc.charset, ENCA_NAME_STYLE_ICONV)) || options.target_enc.charset == ascii || !acceptable_surface(from_enc) || !acceptable_surface(options.target_enc)) return ERR_CANNOT; /* Is the conversion possible? */ if (do_iconv_open(from_enc, options.target_enc, &icd) != 0) return ERR_CANNOT; /* Since iconv doesn't recode files in place, we make a temporary file and copy contents of file fname to it. save the current content first, then copy the rest. When the file is stdin, fake-reopen it to stdout. */ err = ERR_IOFAIL; if ((tempfile = file_temporary(file->buffer, 1)) && file_write(tempfile) != -1 && copy_and_convert(file, tempfile, NULL) == 0 && (!file->name || file_seek(file, 0, SEEK_SET) == 0) && file_seek(tempfile, 0, SEEK_SET) == 0 && (!file->name || file_truncate(file, 0) == 0) && (file->name || (file_close(file) == 0 && file_open(file, "wb") == 0))) { /* Create the second buffer when we don't have any yet but don't make it unnecessarily large, system default suffices */ if (!buffer_iconv) buffer_iconv = buffer_new(0); tempfile->buffer = buffer_iconv; err = iconv_one_step(tempfile, file, icd); } file_free(tempfile); do_iconv_close(icd); return err; } /* perform one conversion step using conversion descriptor icd reading for file_from and putting result to file_to */ static int iconv_one_step(File *file_from, File *file_to, iconv_t icd) { size_t size_from, size_to, n; char *p_from, *p_to; int hit_eof; /* convert */ do { /* read to io_buffer */ if (file_read(file_from) == -1) return ERR_IOFAIL; p_from = (char*)file_from->buffer->data; size_from = file_from->buffer->pos; hit_eof = (ssize_t)file_from->buffer->size > file_from->buffer->pos; /* convert without reading more data until io_buffer is exhausted or some error occurs */ do { p_to = (char*)file_to->buffer->data; size_to = file_to->buffer->size; n = iconv(icd, (ICONV_CONST char**)&p_from, &size_from, &p_to, &size_to); file_to->buffer->pos = file_to->buffer->size - size_to; if (n != (size_t)-1 || errno != E2BIG) break; if (file_write(file_to) == -1) return ERR_IOFAIL; } while (1); if (n == (size_t)-1) { /* EINVAL means some multibyte sequence has been splitted---that's ok, move it to the begining and go on */ if (errno == EINVAL) { memmove(file_from->buffer->data, p_from, size_from); file_from->buffer->pos = size_from; } else { /* but other errors are critical, conversion and try to recover */ fprintf(stderr, "%s: Iconv conversion error on `%s': %s\n", program_name, ffname_r(file_from->name), strerror(errno)); if (file_from->name && file_to->name) { Buffer *buf; int err; /* regular file */ fprintf(stderr, "Trying to recover... "); if (file_seek(file_from, 0, SEEK_SET) != 0 || file_seek(file_to, 0, SEEK_SET) != 0 || file_truncate(file_to, file_to->size) != 0) { fprintf(stderr, "failed\n"); return ERR_IOFAIL; } file_from->buffer->pos = 0; buf = file_to->buffer; file_to->buffer = file_from->buffer; err = copy_and_convert(file_from, file_to, NULL); file_to->buffer = buf; if (err != 0) { fprintf(stderr, "failed\n"); return ERR_IOFAIL; } fprintf(stderr, "succeeded.\n"); } else { fprintf(stderr, "No way to recover in a pipe.\n"); return ERR_IOFAIL; } return ERR_MALFORM; } } else file_from->buffer->pos = 0; /* write the remainder */ if (file_write(file_to) == -1) return ERR_IOFAIL; } while (!hit_eof); /* file might end with an unfinished multibyte sequence */ if (size_from > 0) { fprintf(stderr, "%s: File `%s' seems to be truncated, " "the trailing incomplete multibyte sequence " "has been lost\n", program_name, ffname_r(file_from->name)); return ERR_MALFORM; } return ERR_OK; } /* try to ask for conversion from from_enc to to_enc returns 0 on success, nonzero on failure on fatal error simply aborts program */ static int do_iconv_open(EncaEncoding from_enc, EncaEncoding to_enc, iconv_t *icd) { const char *to_name, *from_name; if (!enca_charset_is_known(to_enc.charset)) to_name = options.target_enc_str; else to_name = enca_charset_name(to_enc.charset, ENCA_NAME_STYLE_ICONV); from_name = enca_charset_name(from_enc.charset, ENCA_NAME_STYLE_ICONV); assert(from_name != NULL); assert(to_name != NULL); /* Iconv_open() paramters has reverse order than we use. */ *icd = iconv_open(to_name, from_name); if (*icd != (iconv_t)-1) return 0; /* Failure, EINVAL means this conversion is not possible. */ if (errno == EINVAL) return ERR_CANNOT; /* But otherwise we are in deep trouble, we've got out of memory or file descriptors. */ fprintf(stderr, "%s: Aborting: %s\n", program_name, strerror(errno)); exit(EXIT_TROUBLE); return 0; } /* close iconv descriptor icd abort if it is not possible */ static void do_iconv_close(iconv_t icd) { if (iconv_close(icd) != 0) { fprintf(stderr, "%s: Cannot close iconv descriptor (memory leak): %s\n", program_name, strerror(errno)); exit(EXIT_TROUBLE); } } /** * Do we think iconv will accept given encoding as a source or target? * * This is a somewhat less strict condition than natural surface requirement. **/ static int acceptable_surface(EncaEncoding enc) { EncaSurface mask; mask = enca_charset_natural_surface(enc.charset) | ENCA_SURFACE_MASK_EOL; return (enc.surface & ~mask) == 0; } #endif /* HAVE_GOOD_ICONV */ /* vim: ts=2 */ enca-1.15/src/convert_recode.c000066400000000000000000000230141222222630600162770ustar00rootroot00000000000000/* @(#) $Id: convert_recode.c,v 1.13 2003/11/17 12:27:39 yeti Exp $ interface to GNU recode library (`librecode') 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. */ #include "common.h" #ifdef HAVE_LIBRECODE #if HAVE_STDBOOL_H # include #else /* HAVE_STDBOOL_H */ # if ! HAVE__BOOL typedef unsigned char _Bool; # endif /* HAVE__BOOL */ # define bool _Bool # define false 0 # define true 1 # define __bool_true_false_are_defined 1 #endif /* HAVE_STDBOOL_H */ #include #define enca_recode_fail_level RECODE_NOT_CANONICAL /* request list struct (they are cached between convert_recode() calls) auto-deallocated at exit */ typedef struct _RecRequest RecRequest; struct _RecRequest { RECODE_REQUEST request; /* the recode request itself */ char *request_string; /* request string */ unsigned long int count; /* count, for caching optimization */ RecRequest *next; }; /* recode outer (allocated only once, auto-deallocated at exit) */ static RECODE_OUTER outer = NULL; /* Local prototypes */ static RECODE_REQUEST get_recode_request(const char *encreq); static void print_recode_warning(enum recode_error err, const char *fname); /* convert file using GNU recode library returns 0 on success, nonzero error code otherwise */ int convert_recode(File *file, EncaEncoding from_enc) { RECODE_REQUEST request; RECODE_TASK task; File *tempfile = NULL; bool success; const char *encreq; /* Allocate librecode outer if we are called first time. */ if (outer == NULL) { if ((outer = recode_new_outer(false)) == NULL) { fprintf(stderr, "%s: recode library doesn't like us\n", program_name); return ERR_LIBCOM; } } /* Construct recode request string, try to mimic surfaceless converter now. */ { EncaEncoding enc; enc.charset = from_enc.charset; enc.surface = from_enc.surface | ENCA_SURFACE_REMOVE; encreq = format_request_string(enc, options.target_enc, ENCA_SURFACE_EOL_LF); } /* Create a recode request from it. */ request = get_recode_request(encreq); if (request == NULL) return ERR_CANNOT; /* Now we have to distinguish between file and stdin, namely because * in case of stdin, it's first part is already loaded in the buffer. */ if (file->name != NULL) { /* File is a regular file. Since recode doesn't recode files in place, we make a temporary file and copy contents of file fname to it. */ if (file_seek(file, 0, SEEK_SET) != 0) return ERR_IOFAIL; file->buffer->pos = 0; if ((tempfile = file_temporary(file->buffer, 1)) == NULL || file_seek(file, 0, SEEK_SET) != 0) { file_free(tempfile); return ERR_IOFAIL; } /* Create a task from the request. */ task = recode_new_task(request); task->fail_level = enca_recode_fail_level; task->abort_level = RECODE_SYSTEM_ERROR; task->input.name = NULL; task->input.file = file->stream; task->output.name = NULL; task->output.file = tempfile->stream; /* Now run conversion original -> temporary file. */ success = recode_perform_task(task); /* If conversion wasn't successfull, original file is probably damaged (damned librecode!) try to restore it from the temporary copy. */ if (!success) { print_recode_warning(task->error_so_far, file->name); } else { if (file_seek(file, 0, SEEK_SET) != 0 || file_seek(tempfile, 0, SEEK_SET) != 0 || file_truncate(file, 0) != 0 || copy_and_convert(tempfile, file, NULL) != 0) { fprintf(stderr, "failed to rename temporary file back\n"); file_free(tempfile); return ERR_IOFAIL; } } recode_delete_task(task); file_free(tempfile); } else { /* File is stdin. First recode begining saved in io_buffer, then append rest of stdin. */ enum recode_error errmax = RECODE_NO_ERROR; /* Create a task from the request. * Set it up for buffer -> stdout conversion */ task = recode_new_task(request); task->fail_level = enca_recode_fail_level; task->abort_level = RECODE_SYSTEM_ERROR; task->input.name = NULL; task->input.file = NULL; task->input.buffer = (char*)file->buffer->data; task->input.cursor = (char*)file->buffer->data; task->input.limit = (char*)file->buffer->data + file->buffer->pos; task->output.name = NULL; task->output.file = stdout; success = recode_perform_task(task); if (!success) { if (task->error_so_far >= RECODE_SYSTEM_ERROR) { fprintf(stderr, "%s: librecode probably damaged `%s'. " "No way to recover in a pipe.\n", program_name, ffname_r(NULL)); recode_delete_task(task); return ERR_IOFAIL; } else errmax = task->error_so_far; } recode_delete_task(task); /* Create a task from the request. * Set it up for stdin -> stdout conversion */ task = recode_new_task(request); task->fail_level = enca_recode_fail_level; task->abort_level = RECODE_SYSTEM_ERROR; task->input.name = NULL; task->input.file = stdin; task->output.name = NULL; task->output.file = stdout; success = recode_perform_task(task); if (!success) { if (task->error_so_far >= RECODE_SYSTEM_ERROR) { fprintf(stderr, "%s: librecode probably damaged `%s'. " "No way to recover in a pipe.\n", program_name, ffname_r(NULL)); recode_delete_task(task); return ERR_IOFAIL; } else { if (errmax < task->error_so_far) errmax = task->error_so_far; } } if (errmax >= enca_recode_fail_level) print_recode_warning(errmax, ffname_r(NULL)); recode_delete_task(task); } /* return ERR_IOFAIL on failure since it means file-related problems */ return success ? ERR_OK : ERR_IOFAIL; } /* caching request creator returns recode request either found in cache or, if not found, a newly created (and immediately put into the cache) returns NULL on failure */ static RECODE_REQUEST get_recode_request(const char *encreq) { static RecRequest *request_cache = NULL; /* recode request cache */ RECODE_REQUEST request; RecRequest *req; /* try to find the request in cache (bubble sorting it meanwhile) */ for (req = request_cache; req != NULL; req = req->next) { if (strcmp(req->request_string, encreq) == 0) break; if (req->next != NULL && req->count < req->next->count) { RecRequest tmpreq; /* it's easier to exchange contents instead of pointers here */ tmpreq.request = req->request; tmpreq.count = req->count; tmpreq.request_string = req->request_string; req->request = req->next->request; req->count = req->next->count; req->request_string = req->next->request_string; req->next->request = tmpreq.request; req->next->count = tmpreq.count; req->next->request_string = tmpreq.request_string; } } /* found, increment usage count and return it */ if (req != NULL) { req->count++; return req->request; } /* request not found, ask for a new one */ if ((request = recode_new_request(outer)) == NULL) { fprintf(stderr, "%s: recode library doesn't accept new requests\n", program_name); return NULL; /* maybe we could simply abort */ } /* Set some options. */ request->diacritics_only = request->ascii_graphics = true; /* create request from request string */ if (!recode_scan_request(request, encreq)) { if (options.verbosity_level) { fprintf(stderr, "%s: errorneous recoding request `%s'\n", program_name,encreq); } recode_delete_request(request); return NULL; } /* add it to end of cache */ if ((req = request_cache) != NULL) { while (req->next != NULL) req = req->next; req->next = NEW(RecRequest, 1); req = req->next; } else { req = NEW(RecRequest, 1); request_cache = req; } req->request = request; req->request_string = enca_strdup(encreq); req->count = 1; req->next = NULL; return request; } static void print_recode_warning(enum recode_error err, const char *fname) { const char *msg; if (options.verbosity_level < 1) return; switch (err) { case RECODE_NOT_CANONICAL: msg = "Input is not canonical"; break; case RECODE_AMBIGUOUS_OUTPUT: msg = "Conversion leads to ambiguous output"; break; case RECODE_UNTRANSLATABLE: msg = "Untranslatable input"; break; case RECODE_INVALID_INPUT: msg = "Invalid input"; break; default: msg = "Unknown error"; break; } fprintf(stderr, "%s: librecode warning: %s in `%s'\n", program_name, msg, fname); } #endif /* HAVE_LIBRECODE */ /* vim: ts=2 */ enca-1.15/src/enca.c000066400000000000000000000223211222222630600142040ustar00rootroot00000000000000/* @(#) $Id: enca.c,v 1.18 2005/02/27 12:08:56 yeti Exp $ Extremely Naive Charset Analyser. main module 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. */ #include #include "common.h" /* Local prototypes. */ static int process_file (EncaAnalyser an, const char *fname); static void dwim_libenca_options(EncaAnalyser an, const File *file); static void print_results (const char *fname, EncaAnalyser an, EncaEncoding result, int gerrno); static void indent_surface (const char *s); static void double_utf8_chk (EncaAnalyser an, const unsigned char *sample, size_t size); /* process options and do some other initializations, then go through the file list and process files one by one at the end, exit and return 0 on succes, 1 on failure, 2 on troubles */ int main(int argc, char *argv[]) { char **pp_file, **flist; /* filename list pointer */ long int err; /* nonzero if process_file() ever returned nonzero */ EncaAnalyser an; /* Process command line arguments. */ pp_file = flist = process_opt(argc, argv); /* Initialization. */ if (options.verbosity_level > 2) fprintf(stderr, "Initializing language %s\n", options.language); an = enca_analyser_alloc(options.language); if (!an) { fprintf(stderr, "%s: Language `%s' is unknown or not supported.\n" "Run `%s --list languages' to get list " "of supported languages.\n" "Run `%s -L none' to test only language independent, " "multibyte encodings.\n", program_name, options.language, program_name, program_name); exit(EXIT_TROUBLE); } enca_set_threshold(an, 1.38); enca_set_multibyte(an, 1); enca_set_ambiguity(an, 1); enca_set_garbage_test(an, 1); /* Any files specified on command line? */ if (pp_file == NULL) { /* No => read stdin. */ err = process_file(an, NULL); } else { /* Process file list, cumultate the worst error in err. */ err = 0; while (*pp_file != NULL) { err |= process_file(an, *pp_file); enca_free(*pp_file); pp_file++; } } process_file(NULL, NULL); enca_analyser_free(an); enca_free(options.language); enca_free(options.target_enc_str); enca_free(flist); if (err & EXIT_TROUBLE) err = EXIT_TROUBLE; return err; } /* process file named fname this is the `boss' function returns 0 on succes, 1 on failure, 2 on troubles */ static int process_file(EncaAnalyser an, const char *fname) { static int utf8 = ENCA_CS_UNKNOWN; static Buffer *buffer = NULL; /* persistent i/o buffer */ int ot_is_convert = (options.output_type == OTYPE_CONVERT); EncaEncoding result; /* the guessed encoding */ File *file; /* the processed file */ if (!an) { buffer_free(buffer); return 0; } /* Initialize when we are called the first time. */ if (buffer == NULL) buffer = buffer_new(buffer_size); if (!enca_charset_is_known(utf8)) { utf8 = enca_name_to_charset("utf8"); assert(enca_charset_is_known(utf8)); } /* Read sample. */ file = file_new(fname, buffer); if (file_open(file, ot_is_convert ? "r+b" : "rb") != 0) { file_free(file); return EXIT_TROUBLE; } if (file_read(file) == -1) { file_free(file); return EXIT_TROUBLE; } if (!ot_is_convert) file_close(file); /* Guess encoding. */ dwim_libenca_options(an, file); if (ot_is_convert) result = enca_analyse_const(an, buffer->data, buffer->pos); else result = enca_analyse(an, buffer->data, buffer->pos); /* Is conversion required? */ if (ot_is_convert) { int err = 0; if (enca_charset_is_known(result.charset)) err = convert(file, result); else { if (enca_errno(an) != ENCA_EEMPTY) { fprintf(stderr, "%s: Cannot convert `%s' from unknown encoding\n", program_name, ffname_r(file->name)); } /* Copy stdin to stdout unchanged. */ if (file->name == NULL) err = copy_and_convert(file, file, NULL); } file_free(file); if ((err == ERR_OK && !enca_charset_is_known(result.charset) && enca_errno(an) != ENCA_EEMPTY) || err == ERR_CANNOT) return 1; return (err == ERR_OK) ? EXIT_SUCCESS : EXIT_TROUBLE; } /* Print results. */ print_results(file->name, an, result, enca_errno(an)); if (result.charset == utf8) double_utf8_chk(an, buffer->data, buffer->pos); file_free(file); return enca_charset_is_known(result.charset) ? EXIT_SUCCESS : EXIT_FAILURE; } /* * DWIM * * Choose some suitable values of all the libenca tuning parameters. */ static void dwim_libenca_options(EncaAnalyser an, const File *file) { const double mu = 0.005; /* derivation in 0 */ const double m = 15.0; /* value in infinity */ ssize_t size = file->buffer->pos; size_t sgnf; /* The number of significant characters */ if (!size) sgnf = 1; else sgnf = ceil((double)size/(size/m + 1.0/mu)); enca_set_significant(an, sgnf); /* When buffer contains whole file, require correct termination. */ if (file->size == size) enca_set_termination_strictness(an, 1); else enca_set_termination_strictness(an, 0); enca_set_filtering(an, sgnf > 2); } /** * Prints results. **/ static void print_results(const char *fname, EncaAnalyser an, EncaEncoding result, int gerrno) { char *s; EncaSurface surf = result.surface & ~enca_charset_natural_surface(result.charset); if (options.prefix_filename) printf("%s: ", ffname_r(fname)); switch (options.output_type) { case OTYPE_ALIASES: print_aliases(result.charset); break; case OTYPE_CANON: if (surf) { s = enca_get_surface_name(surf, ENCA_NAME_STYLE_ENCA); fputs(enca_charset_name(result.charset, ENCA_NAME_STYLE_ENCA), stdout); puts(s); enca_free(s); } else puts(enca_charset_name(result.charset, ENCA_NAME_STYLE_ENCA)); break; case OTYPE_HUMAN: case OTYPE_DETAILS: if (surf) { s = enca_get_surface_name(surf, ENCA_NAME_STYLE_HUMAN); puts(enca_charset_name(result.charset, ENCA_NAME_STYLE_HUMAN)); indent_surface(s); enca_free(s); } else puts(enca_charset_name(result.charset, ENCA_NAME_STYLE_HUMAN)); break; case OTYPE_RFC1345: puts(enca_charset_name(result.charset, ENCA_NAME_STYLE_RFC1345)); break; case OTYPE_CS2CS: if (enca_charset_name(result.charset, ENCA_NAME_STYLE_CSTOCS) != NULL) puts(enca_charset_name(result.charset, ENCA_NAME_STYLE_CSTOCS)); else puts(enca_charset_name(ENCA_CS_UNKNOWN, ENCA_NAME_STYLE_CSTOCS)); break; case OTYPE_ICONV: if (enca_charset_name(result.charset, ENCA_NAME_STYLE_ICONV) != NULL) puts(enca_charset_name(result.charset, ENCA_NAME_STYLE_ICONV)); else puts(enca_charset_name(ENCA_CS_UNKNOWN, ENCA_NAME_STYLE_ICONV)); break; case OTYPE_MIME: if (enca_charset_name(result.charset, ENCA_NAME_STYLE_MIME) != NULL) puts(enca_charset_name(result.charset, ENCA_NAME_STYLE_MIME)); else puts(enca_charset_name(ENCA_CS_UNKNOWN, ENCA_NAME_STYLE_MIME)); break; default: abort(); break; } if (gerrno && options.output_type == OTYPE_DETAILS) { printf(" Failure reason: %s.\n", enca_strerror(an, gerrno)); } } /** * Reformats surface names as returned from enca_get_surface_name() one * per line to be indented and prints them. **/ static void indent_surface(const char *s) { const char *p; while ((p = strchr(s, '\n')) != NULL) { p++; printf(" %.*s", (int)(p-s), s); s = p; } } /** * Checks for doubly-encoded UTF-8 and prints a line when it looks so. **/ static void double_utf8_chk(EncaAnalyser an, const unsigned char *sample, size_t size) { size_t dbl, i; int *candidates; if (options.output_type != OTYPE_DETAILS && options.output_type != OTYPE_HUMAN) return; dbl = enca_double_utf8_check(an, sample, size); if (!dbl) return; candidates = enca_double_utf8_get_candidates(an); if (dbl == 1) printf(" Doubly-encoded to UTF-8 from"); else printf(" Doubly-encoded to UTF-8 from one of:"); for (i = 0; i < dbl; i++) printf(" %s", enca_charset_name(candidates[i], ENCA_NAME_STYLE_ENCA)); putchar('\n'); enca_free(candidates); } /* vim: ts=2 */ enca-1.15/src/filebuf.c000066400000000000000000000456701222222630600147260ustar00rootroot00000000000000/* @(#) $Id: filebuf.c,v 1.20 2004/07/20 19:30:01 yeti Exp $ buffers, input/output operations with magic buffering and small utils 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. */ #include "common.h" /* XXX: We can't go on w/o this, defining struct stat manually is * braindamaged. */ #include #include /* These are mutually exclusive, define exactly one. */ #undef RANDOM_FILE #undef RANDOM_GETTIMEOFDAY #undef RANDOM_TIME /* Good random seed source, prefer urandom, this is not a crypto app. */ #if !(defined RANDOM_FILE) && (defined HAVE__DEV_URANDOM) # define RANDOM_FILE "/dev/urandom" #endif /* HAVE__DEV_URANDOM */ #if !(defined RANDOM_FILE) && (defined HAVE__DEV_ARANDOM) # define RANDOM_FILE "/dev/arandom" #endif /* HAVE__DEV_ARANDOM */ #if !(defined RANDOM_FILE) && (defined HAVE__DEV_RANDOM) # define RANDOM_FILE "/dev/random" #endif /* HAVE__DEV_RANDOM */ #if !(defined RANDOM_FILE) && (defined HAVE__DEV_SRANDOM) # define RANDOM_FILE "/dev/srandom" #endif /* HAVE__DEV_SRANDOM */ #ifndef RANDOM_FILE # ifdef HAVE_GETTIMEOFDAY # define RANDOM_GETTIMEOFDAY # ifdef HAVE_SYS_TIME_H # include # else /* HAVE_SYS_TIME_H */ struct timeval { long tv_sec; long tv_usec; }; int gettimeofday(struct timeval *tv, void *tz); /* Wrong, but we pass NULL. */ # endif /* HAVE_SYS_TIME_H */ # else /* HAVE_GETTIMEOFDAY */ # define RANDOM_TIME # ifdef HAVE_TIME_H # include # else /* HAVE_TIME_H */ long int time(void *); /* Wrong, but we pass NULL. */ # endif /* HAVE_TIME_H */ # endif /* HAVE_SYS_TIME_H */ #endif /* not RANDOM_FILE */ #ifndef HAVE_RANDOM # define random rand # define srandom srand #endif /* HAVE_RANDOM */ #if HAVE_FCNTL_H # include #else /* HAVE_FCNTL_H */ int open(const char *pathname, int flags, mode_t mode); #endif /* HAVE_FCNTL_H */ /* MS simply cannot use the same function names as everyone else... */ #ifndef HAVE_FTRUNCATE # ifdef WIN32 # include # define ftruncate _chsize # else /* XXX: We are in trouble. */ # endif #endif /* stdin and stdout names */ static const char *stdin_fname = "STDIN"; static const char *stdout_fname = "STDOUT"; /* Local prototypes. */ void random_seed_init(void); static off_t file_size(File *file); static int file_fileno(File *file); static char* temporary_file_name(const char *prefix, size_t chars); static ssize_t file_read_limited(File *file, ssize_t limit); /* I/O buffer size. */ size_t buffer_size = 0x10000; /* Module global, since more than function can potentially seed the * generator. */ static int random_generator_seeded = 0; /* Implementation notes: All the file_* functions below contain a considerable amount of magic. This means you don't have to care about many things when using them; unfortunately, some other things you would intuitively expect to work, don't work and can break them totally. So be careful and RTFS in case of doubts. */ /* create and return a new byte buffer of size size when size is zero use size provided by the system as `good' */ Buffer* buffer_new(size_t size) { Buffer *buf; buf = NEW(Buffer, 1); buf->size = (size == 0 ? BUFSIZ : size); buf->data = (byte*)enca_malloc(buf->size); buf->pos = 0; return buf; } /* destroy a buffer object buf can be safely called repeatedly */ void buffer_free(Buffer *buf) { if (buf == NULL) return; enca_free(buf->data); enca_free(buf); } /* Find abbreviated name in atable and return pointer to corresponding data. * When name is NULL, print list of all abbreviations, instead (and * return NULL too). * * Returns NULL when no unique abbreviation is found (or when name * is NULL too), object_name is then used as object name for diagnostics. */ const Abbreviation* expand_abbreviation(const char *name, const Abbreviation *atable, size_t size, const char *object_name) { size_t n, i, pos, acount; /* Print list for NULL name. */ if (name == NULL) { for (i = 0; i < size; i++) puts(atable[i].name); return NULL; } /* Find all matching abbreviations. */ n = strlen(name); pos = 0; acount = 0; for (i = 0; i < size; i++) { if (strncmp(name, atable[i].name, n) == 0) { acount++; pos = i; } } /* No match? */ if (acount == 0) { fprintf(stderr, "%s: `%s' doesn't look like a valid %s name\n", program_name, name, object_name); return NULL; } /* More than one match? */ if (acount > 1) { fprintf(stderr, "%s: Abbreviation `%s' is ambiguous, matches:\n", program_name, name); for (i = 0; i < size; i++) { if (strncmp(name, atable[i].name, n) == 0) fprintf(stderr, " %s\n", atable[i].name); } return NULL; } /* OK, exactly one. */ return atable + pos; } /* filename wrapper, return STDIN_FNAME on NULL */ const char* ffname_r(const char *fname) { return (fname == NULL) ? stdin_fname : fname; } /* filename wrapper, return STDOUT_FNAME on NULL */ const char* ffname_w(const char *fname) { return (fname == NULL) ? stdout_fname : fname; } /* create a temporary file name begining with prefix returns the file name as newly created string, that should be destroyed by caller */ static char* temporary_file_name(const char *prefix, size_t chars) { /* characters allowed in temporary file name */ static const char TMP_FNAME_CHARS[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; static const size_t NCH = sizeof(TMP_FNAME_CHARS)/sizeof(char); char *fname; size_t i,n; if (!random_generator_seeded) { random_seed_init(); random_generator_seeded = 1; } /* generate random name by adding chars random characters after prefix */ n = strlen(prefix); fname = (char*)enca_malloc(n+chars+1); strcpy(fname, prefix); for (i = 0; i < chars; i++) fname[n+i] = TMP_FNAME_CHARS[(random()/83UL) % NCH]; fname[n+chars] = '\0'; return fname; } /* file_read_limited() wrapper, limit is buffer size */ ssize_t file_read(File *file) { return file_read_limited(file, file->buffer->size); } /* read from file file storing data to the associated buffer limit is the desired total number of bytes that should be in the buffer (not maximum bytes to read) returns the number of bytes in file's buffer after read, -1 on failure is up to caller to provide a limit value not greater than buffer size */ static ssize_t file_read_limited(File *file, ssize_t limit) { FILE *stream; assert(limit >= 0); assert(file != NULL); assert(file->buffer != NULL); if (limit < file->buffer->pos) return file->buffer->pos; assert((size_t)limit <= file->buffer->size); if (file->name == NULL) stream = stdin; else stream = file->stream; file->buffer->pos += fread(file->buffer->data + file->buffer->pos, 1, limit - file->buffer->pos, stream); /* read failed? */ if (file->buffer->pos < limit && ferror(stream)) { fprintf(stderr, "%s: Cannot read file `%s': %s\n", program_name, ffname_r(file->name), strerror(errno)); file_close(file); file->buffer->pos = -1; } return file->buffer->pos; } /* file_read_limited() wrapper, is like fgets(), but generates MUCH less * system calls (usually exactly two per call) than GNU libc's fgets() due to * buffering. Anyway, getline() is not available on non-GNU. * XXX: must NOT be used on non-seekable streams! */ byte* file_getline(File *file) { static const size_t READ_AHEAD = 256; /* 256 is the minimum guaranteed value of BUFSIZE and also a good maximum expected line length */ ssize_t err; size_t want_bytes,old; Buffer *buf; /* file->buffer alias */ byte *p = NULL; assert(file != NULL); assert(file->buffer != NULL); /* overwrite what could remain in the buffer */ buf = file->buffer; buf->pos = want_bytes = old = 0; /* read chunks of approximately one line size until we hit EOF or find an EOL */ do { want_bytes += READ_AHEAD; if (want_bytes >= buf->size) want_bytes = buf->size - 1; err = file_read_limited(file, want_bytes); if (err == -1 || buf->pos == 0) return NULL; p = memchr(buf->data + old, '\n', buf->pos - old); if (p != NULL || (size_t)(buf->pos) < want_bytes) break; old = buf->pos; } while (1); /* something found? */ if (p != NULL) { *(p+1) = '\0'; file_seek(file, (off_t)(p - buf->data - buf->pos) + 1, SEEK_CUR); } /* or just EOF? */ else file->buffer->data[file->buffer->pos + 1] = '\0'; return file->buffer->data; } /* write to file @file the associated buffer and reset buffer position returns nonzero if it was successfully written, -1 on failure */ ssize_t file_write(File *file) { ssize_t bw; FILE *stream; assert(file != NULL); assert(file->buffer != NULL); if (file->buffer->pos == 0) return 0; if (file->name == NULL) stream = stdout; else stream = file->stream; bw = fwrite(file->buffer->data, 1, file->buffer->pos, stream); /* write failed? */ if (bw < file->buffer->pos) { fprintf(stderr, "%s: Cannot write to file `%s': %s\n", program_name, ffname_w(file->name), strerror(errno)); file_close(file); return -1; } file->buffer->pos = 0; return bw; } /* create temporary file, open it readwrite and return the created File retuns NULL when we are unable to create a temporary file when ulink is true, delete it right after opening (XXX: this requires POSIX-conformant system) (glibc provides about eight similar routines, but all are either deprecated for security reasons or nonportable) FIXME: we always create temporary files in /tmp */ File* file_temporary(Buffer *buffer, int ulink) { /* `template' for temporary file creation */ static const char *TMP_PREFIX = "/tmp/" PACKAGE_TARNAME; File *file = NULL; char *pfname = NULL; int fd; int i; /* try thrice to generate a unique file name */ for (i = 0; i < 16; i++) { file_free(file); pfname = temporary_file_name(TMP_PREFIX, 8); file = file_new(pfname, buffer); enca_free(pfname); /* try to open it */ if (options.verbosity_level > 8) fprintf(stderr, "Trying to create temporary file `%s'\n", file->name); if ((fd = open(file->name, O_RDWR | O_CREAT | O_EXCL, 0600)) < 0) continue; /* fdopen it to get the stream */ if ((file->stream = fdopen(fd, "w+b")) == NULL) { fprintf(stderr, "%s: Cannot get stream for an open filedescriptor %d: %s\n", program_name, fd, strerror(errno)); exit(EXIT_TROUBLE); } /* here, we have a unique temporary file opened readwrite */ if (ulink) file_unlink(file->name); return file; } /* trieed heavy without success? that's bad */ fprintf(stderr, "%s: Unable to create a temporary file\n" "do you have write permissions in /tmp?\n", program_name); file_free(file); return NULL; } /* reposition file file see lseek(2) for description returns current position from begining of file, -1 on failure */ off_t file_seek(File *file, off_t offset, int whence) { off_t i; assert(file != NULL); i = fseek(file->stream, offset, whence); if (i == -1) { fprintf(stderr, "%s: Cannot seek in file `%s': %s\n", program_name, file->name, strerror(errno)); file_close(file); } return i; } /* truncate file file see truncate(2) for description returns zero on success, -1 on failure */ int file_truncate(File *file, off_t length) { int fd; assert(file != NULL); assert(file->name != NULL); /* we should not be called on stdin/stdout */ fd = file_fileno(file); if (options.verbosity_level > 8) fprintf(stderr, "Truncating `%s' to %ld\n", file->name, (long int)length); if (ftruncate(fd, length) == 0) return 0; fprintf(stderr, "%s: Cannot truncate file `%s' to %ld: %s\n", program_name, file->name, (long int)length, strerror(errno)); file_close(file); return -1; } /* unlink file fname see unlink(2) for description returns 0 on success, nonzero on failure */ int file_unlink(const char *fname) { int err; assert(fname != NULL); if (options.verbosity_level > 8) fprintf(stderr, "Unlinking `%s'\n", fname); err = unlink(fname); if (err != 0) { fprintf(stderr, "%s: Cannot unlink file `%s': %s\n", program_name, fname, strerror(errno)); } return err; } /* open a file file in mode mode see fopen(3) for description however, we disable buffering by default and opening file whose name is NULL assings the `magic' stdin/stdout returns 0 on success, nonzero otherwise */ int file_open(File *file, const char *mode) { assert(file != NULL); assert(file->buffer != NULL); assert(mode != NULL); assert(*mode); if (mode[0] == 'r') file->buffer->pos = 0; /* fake stdin/stdout opening */ if (file->name == NULL) { if (options.verbosity_level > 8) fprintf(stderr, "Fake-opening stdin/stdout in mode %s\n", mode); if (mode[0] == 'r' || mode[0] =='w') { file->stream = NULL; file->size = -1; return 0; } fprintf(stderr, "%s: Cannot open stdin/stdout in mode %s\n", program_name, mode); return 1; } /* open a regular file */ if (options.verbosity_level > 8) fprintf(stderr, "Opening file `%s' in mode %s\n", file->name, mode); file->stream = fopen(file->name, mode); if (file->stream == NULL) { fprintf(stderr, "%s: Cannot open file `%s' in mode %s: %s\n", program_name, file->name, mode, strerror(errno)); return 1; } /* get length */ if (mode[0] == 'r') { file->size = file_size(file); if (options.verbosity_level > 8) fprintf(stderr, "File `%s' size is %ld\n", file->name, (long int)file->size); if (file->size == -1) return 1; } else file->size = -1; return 0; } /* close file file see fclose(3) for description but this one can be safely called repeatedly on the same stream or on a not-yet-opened stream */ int file_close(File *file) { assert(file != NULL); /* it's OK to close files any times we want and to close files that have never been opened also fake `magic' stdin/stdout closing */ if (file->name == NULL) { if (options.verbosity_level > 8) fprintf(stderr, "Fake-closing stdin/stdout\n"); return 0; } if (file->stream == NULL) { if (options.verbosity_level > 8) fprintf(stderr, "Closing an already closed file (noop)\n"); return 0; } /* close a regular file */ if (options.verbosity_level > 8) fprintf(stderr, "Closing file `%s'\n", file->name); if (fclose(file->stream) == EOF) { fprintf(stderr, "%s: Cannot close file `%s': %s\n", program_name, file->name, strerror(errno)); exit(EXIT_TROUBLE); } file->stream = NULL; return 0; } /* return the size of an open stream (by stat()-ing it) returns -1 on failure */ static off_t file_size(File *file) { int fd; struct stat st; assert(file != NULL); if (file->name == NULL) return -1; fd = file_fileno(file); if (options.verbosity_level > 8) fprintf(stderr, "stat()-ing `%s' (fd %d) for its size\n", file->name, fd); if (fstat(fd, &st) != 0) { fprintf(stderr, "%s: Cannot stat file `%s': %s\n", program_name, ffname_r(file->name), strerror(errno)); return -1; } return st.st_size; } /* return a filedescriptor given a stream, see fileno(3) for description * never fails, on failure aborts program. */ static int file_fileno(File *file) { int fd; fd = fileno(file->stream); if (fd != -1) return fd; fprintf(stderr, "%s: Cannot get filedescriptor for an open stream `%s': %s\n", program_name, ffname_r(file->name), strerror(errno)); exit(EXIT_TROUBLE); return -1; } /* create and return a file object whose filename is fname and which uses buffer buffer for i/o operations */ File* file_new(const char *fname, Buffer *buffer) { File *file; file = NEW(File, 1); file->name = enca_strdup(fname); file->stream = NULL; file->size = -1; file->buffer = buffer; return file; } /* destroy a file object file, possibly closing it when opened does NOT destroy the associated buffer can be safely called repeatedly */ void file_free(File *file) { if (file == NULL) return; if (file->stream != NULL) file_close(file); enca_free(file->name); enca_free(file); } /** * Initialize ranom number generator with some pseudo-random bits from * the environment. **/ void random_seed_init(void) { unsigned int seed; #ifdef RANDOM_FILE Buffer buf; File *file; buf.data = (void*)&seed; buf.pos = 0; buf.size = sizeof(unsigned int); if (options.verbosity_level > 8) fprintf(stderr, "Initializing random seed from `%s'\n", RANDOM_FILE); file = file_new(RANDOM_FILE, &buf); if (file_open(file, "rb") || file_read(file) == -1 || file_close(file)) exit(EXIT_TROUBLE); file_free(file); #endif /* RANDOM_FILE */ #ifdef RANDOM_GETTIMEOFDAY struct timeval tv; if (options.verbosity_level > 8) fprintf(stderr, "Initializing random seed from time of the day ;-(\n"); if (gettimeofday(&tv, NULL)) { fprintf(stderr, "%s: Cannot get time of day: %s\n", program_name, strerror(errno)); exit(EXIT_TROUBLE); } seed = (unsigned int)(tv.tv_usec ^ tv.tv_sec ^ (getpid() << 4)); #endif /* RANDOM_GETTIMEOFDAY */ #ifdef RANDOM_TIME if (options.verbosity_level > 8) fprintf(stderr, "Initializing random seed an exteremely lame way ;-(\n"); seed = (unsigned int)time(NULL) ^ (getpid() << 4); #endif /* RANDOM_TIME */ srandom(seed); } /* vim: ts=2 */ enca-1.15/src/getopt.h000066400000000000000000000144401222222630600146100ustar00rootroot00000000000000/* Declarations for getopt. Copyright (C) 1989,90,91,92,93,94,96,97,98,99 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _GETOPT_H #ifndef __need_getopt # define _GETOPT_H 1 #endif /* If __GNU_LIBRARY__ is not already defined, either we are being used standalone, or this is the first header included in the source file. If we are being used with glibc, we need to include , but that does not exist if we are standalone. So: if __GNU_LIBRARY__ is not defined, include , which will pull in for us if it's from glibc. (Why ctype.h? It's guaranteed to exist and it doesn't flood the namespace with stuff the way some other headers do.) */ #if !defined __GNU_LIBRARY__ # include #endif #ifdef __cplusplus extern "C" { #endif /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ extern int opterr; /* Set to an option character which was unrecognized. */ extern int optopt; #ifndef __need_getopt /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector of `struct option' terminated by an element containing a name which is zero. The field `has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. If the field `flag' is not NULL, it points to a variable that is set to the value given in the field `val' when the option is found, but left unchanged if the option is not found. To have a long-named option do something other than set an `int' to a compiled-in constant, such as set a value from `optarg', set the option's `flag' field to zero and its `val' field to a nonzero value (the equivalent single-letter option character, if there is one). For long options that have a zero `flag' field, `getopt' returns the contents of the `val' field. */ struct option { # if defined __STDC__ && __STDC__ const char *name; # else char *name; # endif /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; /* Names for the values of the `has_arg' field of `struct option'. */ # define no_argument 0 # define required_argument 1 # define optional_argument 2 #endif /* need getopt */ /* Get definitions and prototypes for functions to process the arguments in ARGV (ARGC of them, minus the program name) for options given in OPTS. Return the option character from OPTS just read. Return -1 when there are no more options. For unrecognized options, or options missing arguments, `optopt' is set to the option letter, and '?' is returned. The OPTS string is a list of characters which are recognized option letters, optionally followed by colons, specifying that that letter takes an argument, to be placed in `optarg'. If a letter in OPTS is followed by two colons, its argument is optional. This behavior is specific to the GNU `getopt'. The argument `--' causes premature termination of argument scanning, explicitly telling `getopt' that there are no more options. If OPTS begins with `--', then non-option arguments are treated as arguments to the option '\0'. This behavior is specific to the GNU `getopt'. */ #if defined __STDC__ && __STDC__ # ifdef __GNU_LIBRARY__ /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ extern int getopt (int __argc, char *const *__argv, const char *__shortopts); # else /* not __GNU_LIBRARY__ */ extern int getopt (); # endif /* __GNU_LIBRARY__ */ # ifndef __need_getopt extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind); extern int getopt_long_only (int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind); /* Internal only. Users should not call this directly. */ extern int _getopt_internal (int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only); # endif #else /* not __STDC__ */ extern int getopt (); # ifndef __need_getopt extern int getopt_long (); extern int getopt_long_only (); extern int _getopt_internal (); # endif #endif /* __STDC__ */ #ifdef __cplusplus } #endif /* Make sure we later can get all the definitions and declarations. */ #undef __need_getopt #endif /* getopt.h */ enca-1.15/src/getopt_long.c000066400000000000000000000636051222222630600156310ustar00rootroot00000000000000/* Note: This file has been created from getopt.c and getopt1.c in order to have only one file called the same as the function it implements (getopt_long) by David Necas . During that, some stuff not needed when building standalone getopt has been removed. No other changes have been made. */ /* Getopt for GNU. NOTE: getopt is now part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This tells Alpha OSF/1 not to define a getopt prototype in . Ditto for AIX 3.2 and . */ #ifndef _NO_PROTO # define _NO_PROTO #endif #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #ifndef NULL #define NULL 0 #endif #if !defined __STDC__ || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ # ifndef const # define const # endif #endif #include /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ /* Don't include stdlib.h for non-GNU C libraries because some of them contain conflicting prototypes for getopt. */ # include # include #endif /* GNU C library. */ #ifdef VMS # include # if HAVE_STRING_H - 0 # include # endif #endif #ifndef _ /* This is for other GNU distributions with internationalized messages. */ # if defined HAVE_LIBINTL_H # include # ifndef _ # define _(msgid) gettext (msgid) # endif # else # define _(msgid) (msgid) # endif #endif /* This version of `getopt' appears to the caller like standard Unix `getopt' but it behaves differently for the user, since it allows the user to intersperse the options with the other arguments. As `getopt' works, it permutes the elements of ARGV so that, when it is done, all the options precede everything else. Thus all application programs are extended to handle flexible argument order. Setting the environment variable POSIXLY_CORRECT disables permutation. Then the behavior is completely standard. GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ #include "getopt.h" /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ /* 1003.2 says this must be 1 before any call. */ int optind = 1; /* Formerly, initialization of getopt depended on optind==0, which causes problems with re-calling getopt as programs generally don't know that. */ int __getopt_initialized; /* The next char to be scanned in the option-element in which the last option character we returned was found. This allows us to pick up the scan where we left off. If this is zero, or a null string, it means resume the scan by advancing to the next ARGV-element. */ static char *nextchar; /* Callers store zero here to inhibit the error message for unrecognized options. */ int opterr = 1; /* Set to an option character which was unrecognized. This must be initialized on some systems to avoid linking in the system's own getopt implementation. */ int optopt = '?'; /* Describe how to deal with options that follow non-option ARGV-elements. If the caller did not specify anything, the default is REQUIRE_ORDER if the environment variable POSIXLY_CORRECT is defined, PERMUTE otherwise. REQUIRE_ORDER means don't recognize them as options; stop option processing when the first non-option is seen. This is what Unix does. This mode of operation is selected by either setting the environment variable POSIXLY_CORRECT, or using `+' as the first character of the list of option characters. PERMUTE is the default. We permute the contents of ARGV as we scan, so that eventually all the non-options are at the end. This allows options to be given in any order, even with programs that were not written to expect this. RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option with character code 1. Using `-' as the first character of the list of option characters selects this mode of operation. The special argument `--' forces an end of option-scanning regardless of the value of `ordering'. In the case of RETURN_IN_ORDER, only `--' can cause `getopt' to return -1 with `optind' != ARGC. */ static enum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } ordering; /* Value of POSIXLY_CORRECT environment variable. */ static char *posixly_correct; #ifdef __GNU_LIBRARY__ /* We want to avoid inclusion of string.h with non-GNU libraries because there are many ways it can cause trouble. On some systems, it contains special magic macros that don't work in GCC. */ # include # define my_index strchr #else # if HAVE_STRING_H # include # else # include # endif /* Avoid depending on library functions or files whose names are inconsistent. */ #ifndef getenv extern char *getenv (); #endif static char * my_index (str, chr) const char *str; int chr; { while (*str) { if (*str == chr) return (char *) str; str++; } return 0; } /* If using GCC, we can safely declare strlen this way. If not using GCC, it is ok not to declare it. */ #ifdef __GNUC__ /* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. That was relevant to code that was here before. */ # if (!defined __STDC__ || !__STDC__) && !defined strlen /* gcc with -traditional declares the built-in strlen to return int, and has done so at least since version 2.4.5. -- rms. */ extern int strlen (const char *); # endif /* not __STDC__ */ #endif /* __GNUC__ */ #endif /* not __GNU_LIBRARY__ */ /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have been skipped. `first_nonopt' is the index in ARGV of the first of them; `last_nonopt' is the index after the last of them. */ static int first_nonopt; static int last_nonopt; #define SWAP_FLAGS(ch1, ch2) /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. The other is elements [last_nonopt,optind), which contains all the options processed since those non-options were skipped. `first_nonopt' and `last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ #if defined __STDC__ && __STDC__ static void exchange (char **); #endif static void exchange (argv) char **argv; { int bottom = first_nonopt; int middle = last_nonopt; int top = optind; char *tem; /* Exchange the shorter segment with the far end of the longer segment. That puts the shorter segment into the right place. It leaves the longer segment in the right place overall, but it consists of two parts that need to be swapped next. */ while (top > middle && middle > bottom) { if (top - middle > middle - bottom) { /* Bottom segment is the short one. */ int len = middle - bottom; register int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[top - (middle - bottom) + i]; argv[top - (middle - bottom) + i] = tem; SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); } /* Exclude the moved bottom segment from further swapping. */ top -= len; } else { /* Top segment is the short one. */ int len = top - middle; register int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[middle + i]; argv[middle + i] = tem; SWAP_FLAGS (bottom + i, middle + i); } /* Exclude the moved top segment from further swapping. */ bottom += len; } } /* Update records for the slots the non-options now occupy. */ first_nonopt += (optind - last_nonopt); last_nonopt = optind; } /* Initialize the internal data when the first call is made. */ #if defined __STDC__ && __STDC__ static const char *_getopt_initialize (int, char *const *, const char *); #endif static const char * _getopt_initialize (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ first_nonopt = last_nonopt = optind; nextchar = NULL; posixly_correct = getenv ("POSIXLY_CORRECT"); /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') { ordering = RETURN_IN_ORDER; ++optstring; } else if (optstring[0] == '+') { ordering = REQUIRE_ORDER; ++optstring; } else if (posixly_correct != NULL) ordering = REQUIRE_ORDER; else ordering = PERMUTE; return optstring; } /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. If an element of ARGV starts with '-', and is not exactly "-" or "--", then it is an option element. The characters of this element (aside from the initial '-') are option characters. If `getopt' is called repeatedly, it returns successively each of the option characters from each of the option elements. If `getopt' finds another option character, it returns that character, updating `optind' and `nextchar' so that the next call to `getopt' can resume the scan with the following option character or ARGV-element. If there are no more option characters, `getopt' returns -1. Then `optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) OPTSTRING is a string containing the legitimate option characters. If an option character is seen that is not listed in OPTSTRING, return '?' after printing an error message. If you set `opterr' to zero, the error message is suppressed but we still return '?'. If a char in OPTSTRING is followed by a colon, that means it wants an arg, so the following text in the same ARGV-element, or the text of the following ARGV-element, is returned in `optarg'. Two colons mean an option that wants an optional arg; if there is text in the current ARGV-element, it is returned in `optarg', otherwise `optarg' is set to zero. If OPTSTRING starts with `-' or `+', it requests different methods of handling the non-option ARGV-elements. See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. Long-named options begin with `--' instead of `-'. Their names may be abbreviated as long as the abbreviation is unique or is an exact match for some defined option. If they have an argument, it follows the option name in the same ARGV-element, separated from the option name by a `=', or else the in next ARGV-element. When `getopt' finds a long-named option, it returns 0 if that option's `flag' field is nonzero, the value of the option's `val' field if the `flag' field is zero. The elements of ARGV aren't really const, because we permute them. But we pretend they're const in the prototype to be compatible with other systems. LONGOPTS is a vector of `struct option' terminated by an element containing a name which is zero. LONGIND returns the index in LONGOPT of the long-named option found. It is only valid when a long-named option has been found by the most recent call. If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. */ int _getopt_internal (argc, argv, optstring, longopts, longind, long_only) int argc; char *const *argv; const char *optstring; const struct option *longopts; int *longind; int long_only; { int print_errors = opterr; if (optstring[0] == ':') print_errors = 0; if (argc < 1) return -1; optarg = NULL; if (optind == 0 || !__getopt_initialized) { if (optind == 0) optind = 1; /* Don't scan ARGV[0], the program name. */ optstring = _getopt_initialize (argc, argv, optstring); __getopt_initialized = 1; } /* Test whether ARGV[optind] points to a non-option argument. Either it does not have option syntax, or there is an environment flag from the shell indicating it is not an option. The later information is only used when the used in the GNU libc. */ #define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0') if (nextchar == NULL || *nextchar == '\0') { /* Advance to the next ARGV-element. */ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been moved back by the user (who may also have changed the arguments). */ if (last_nonopt > optind) last_nonopt = optind; if (first_nonopt > optind) first_nonopt = optind; if (ordering == PERMUTE) { /* If we have just processed some options following some non-options, exchange them so that the options come first. */ if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (last_nonopt != optind) first_nonopt = optind; /* Skip any additional non-options and extend the range of non-options previously skipped. */ while (optind < argc && NONOPTION_P) optind++; last_nonopt = optind; } /* The special ARGV-element `--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ if (optind != argc && !strcmp (argv[optind], "--")) { optind++; if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (first_nonopt == last_nonopt) first_nonopt = optind; last_nonopt = argc; optind = argc; } /* If we have done all the ARGV-elements, stop the scan and back over any non-options that we skipped and permuted. */ if (optind == argc) { /* Set the next-arg-index to point at the non-options that we previously skipped, so the caller will digest them. */ if (first_nonopt != last_nonopt) optind = first_nonopt; return -1; } /* If we have come to a non-option and did not permute it, either stop the scan or describe it to the caller and pass it by. */ if (NONOPTION_P) { if (ordering == REQUIRE_ORDER) return -1; optarg = argv[optind++]; return 1; } /* We have found another option-ARGV-element. Skip the initial punctuation. */ nextchar = (argv[optind] + 1 + (longopts != NULL && argv[optind][1] == '-')); } /* Decode the current option-ARGV-element. */ /* Check whether the ARGV-element is a long option. If long_only and the ARGV-element has the form "-f", where f is a valid short option, don't consider it an abbreviated form of a long option that starts with f. Otherwise there would be no way to give the -f short option. On the other hand, if there's a long option "fubar" and the ARGV-element is "-fu", do consider that an abbreviation of the long option, just like "--fu", and not "-f" with arg "u". This distinction seems to be the most useful approach. */ if (longopts != NULL && (argv[optind][1] == '-' || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = -1; int option_index; for (nameend = nextchar; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == (unsigned int) strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else if (long_only || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val) /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) fprintf (stderr, _("%s: option `%s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; optopt = 0; return '?'; } if (pfound != NULL) { option_index = indfound; optind++; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (print_errors) { if (argv[optind - 1][1] == '-') /* --option */ fprintf (stderr, _("%s: option `--%s' doesn't allow an argument\n"), argv[0], pfound->name); else /* +option or -option */ fprintf (stderr, _("%s: option `%c%s' doesn't allow an argument\n"), argv[0], argv[optind - 1][0], pfound->name); } nextchar += strlen (nextchar); optopt = pfound->val; return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (print_errors) fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); optopt = pfound->val; return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } /* Can't find it as a long option. If this is not getopt_long_only, or the option starts with '--' or is not a valid short option, then it's an error. Otherwise interpret it as a short option. */ if (!long_only || argv[optind][1] == '-' || my_index (optstring, *nextchar) == NULL) { if (print_errors) { if (argv[optind][1] == '-') /* --option */ fprintf (stderr, _("%s: unrecognized option `--%s'\n"), argv[0], nextchar); else /* +option or -option */ fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), argv[0], argv[optind][0], nextchar); } nextchar = (char *) ""; optind++; optopt = 0; return '?'; } } /* Look at and handle the next short option-character. */ { char c = *nextchar++; char *temp = my_index (optstring, c); /* Increment `optind' when we start to process its last character. */ if (*nextchar == '\0') ++optind; if (temp == NULL || c == ':') { if (print_errors) { if (posixly_correct) /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c); else fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c); } optopt = c; return '?'; } /* Convenience. Treat POSIX -W foo same as long option --foo */ if (temp[0] == 'W' && temp[1] == ';') { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = 0; int option_index; /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (print_errors) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; return c; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; /* optarg is now the argument, see if it's in the table of longopts. */ for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; return '?'; } if (pfound != NULL) { option_index = indfound; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (print_errors) fprintf (stderr, _("\ %s: option `-W %s' doesn't allow an argument\n"), argv[0], pfound->name); nextchar += strlen (nextchar); return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (print_errors) fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } nextchar = NULL; return 'W'; /* Let the application handle it. */ } if (temp[1] == ':') { if (temp[2] == ':') { /* This is an option that accepts an argument optionally. */ if (*nextchar != '\0') { optarg = nextchar; optind++; } else optarg = NULL; nextchar = NULL; } else { /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (print_errors) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; nextchar = NULL; } } return c; } } int getopt (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, (int *) 0, 0); } int getopt_long (argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal (argc, argv, options, long_options, opt_index, 0); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. If an option that starts with '-' (not '--') doesn't match a long option, but does match a short option, it is parsed as a short option instead. */ int getopt_long_only (argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal (argc, argv, options, long_options, opt_index, 1); } enca-1.15/src/locale_detect.c000066400000000000000000000230601222222630600160660ustar00rootroot00000000000000/* @(#) $Id: locale_detect.c,v 1.24 2004/07/20 20:15:09 yeti Exp $ try to guess user's native language from locale 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. */ #include "common.h" #ifdef HAVE_SETLOCALE # ifdef HAVE_LOCALE_H # include # else /* HAVE_LOCALE_H */ char* setlocale(int category, const char *locale); # endif /* HAVE_LOCALE_H */ #endif /* HAVE_SETLOCALE */ #ifdef HAVE_NL_LANGINFO # ifdef HAVE_LANGINFO_H # include # else /* HAVE_LANGINFO_H */ char *nl_langinfo(nl_item *item); # endif /* HAVE_LANGINFO_H */ #endif /* HAVE_NL_LANGINFO */ static char *codeset = NULL; /* Local prototypes. */ static char* locale_alias_convert(const char *locname); static char* strip_locale_name(const char *locname); static char* static_iso639_alias_convert(const char *locname); #ifdef HAVE_SETLOCALE static char* detect_target_charset(const char *locname); static char* detect_user_language(void); #endif /* HAVE_SETLOCALE */ static void codeset_free(void); /* * when lang is not NULL converts it to two-character language code * othwerise, tries to guess what language user wants from locale settings. * returns string of length 2 containig language code (to be freed by caller) * or NULL if not detected or unable to convert. */ char* detect_lang(const char *lang) { char *locname, *result, *cvt; atexit(codeset_free); #ifdef HAVE_SETLOCALE /* No lang, detect locale, then CODESET, then try to transform it */ if (!lang) { locname = detect_user_language(); /* HERE: locname is (a) newly allocated (b) NULL */ codeset = detect_target_charset(locname); /* HERE: codeset is (a) newly allocated, different from locname (b) NULL */ cvt = locale_alias_convert(locname); result = strip_locale_name(cvt); enca_free(cvt); enca_free(locname); return result; } /* We have lang, try it first untransformed, then transformed for CODESET */ codeset = detect_target_charset(lang); locname = locale_alias_convert(lang); if (!codeset) codeset = detect_target_charset(locname); result = strip_locale_name(locname); enca_free(locname); return result; #else /* HAVE_SETLOCALE */ cvt = locale_alias_convert(lang); result = strip_locale_name(cvt); enca_free(cvt); return result; #endif /* HAVE_SETLOCALE */ } #ifdef HAVE_SETLOCALE /** * detect_target_charset: * * Detect target charset from LC_CTYPE for user's language. * * Returns: A string (to be freed) with charset name or NULL on failure. **/ static char* detect_target_charset(const char *locname) { char *s = NULL; #ifdef HAVE_NL_LANGINFO if (!locname) return NULL; if ((s = setlocale(LC_CTYPE, locname)) == NULL) return NULL; s = enca_strdup(nl_langinfo(CODESET)); if (setlocale(LC_CTYPE, "C") == NULL) { fprintf(stderr, "%s: Cannot set LC_CTYPE to the portable \"C\" locale\n", program_name); exit(EXIT_TROUBLE); } if (options.verbosity_level > 2) fprintf(stderr, "Detected locale native charset: %s\n", s); #endif /* HAVE_NL_LANGINFO */ return s; } /** * detect_user_language: * * Detect user's locale by querying several LC categories. * * NB: this is conceptually wrong, the string returned by setlocale should * be taken as opaque -- but then we would be in deep shit^Wtrouble. This * seems to actually happen on Win32. * * Returns: A string (to be freed) with locale name or NULL on failure. **/ static char* detect_user_language(void) { static const int test_categories[] = { LC_CTYPE, LC_COLLATE, #if HAVE_LC_MESSAGES LC_MESSAGES, #endif }; char *s = NULL; size_t i; for (i = 0; i < ELEMENTS(test_categories); i++) { enca_free(s); if ((s = setlocale(test_categories[i], "")) == NULL) continue; s = enca_strdup(s); if (setlocale(test_categories[i], "C") == NULL) { fprintf(stderr, "%s: Cannot set locale to the portable \"C\" locale\n", program_name); exit(EXIT_TROUBLE); } if (strcmp(s, "") == 0 || strcmp(s, "C") == 0 || strcmp(s, "POSIX") == 0 || (strncmp(s, "en", 2) == 0 && !isalpha(s[2]))) continue; if (options.verbosity_level > 2) fprintf(stderr, "Locale inherited from environment: %s\n", s); return s; } return NULL; } #endif /* HAVE_SETLOCALE */ /* convert locale alias to canonical name using LOCALE_ALIAS_FILE (presumably /usr/share/locale/locale.alias) and return it Returned string should be freed by caller. FIXME: this function can get easily confused by lines longer than BUFSIZE (but the worst thing that can happen is we return wrong locale name) the locale.alias format is nowhere described, so we assume every line consists of alias (row 1), some whitespace and canonical name */ static char* locale_alias_convert(const char *locname) { #ifdef HAVE_LOCALE_ALIAS File *fla; /* locale.alias file */ Buffer *buf; char *s,*p,*q; size_t n; #endif /* HAVE_LOCALE_ALIAS */ if (!locname) return NULL; /* Catch the special language name `none' */ if (strcmp(locname, "none") == 0) return enca_strdup("__"); #ifdef HAVE_LOCALE_ALIAS /* try to read locale.alias */ buf = buffer_new(0); fla = file_new(LOCALE_ALIAS_PATH, buf); if (file_open(fla, "r") != 0) { if (options.verbosity_level) { fprintf(stderr, "Cannot find locale.alias file.\n" "This build of enca probably has been configured for " "quite a different system\n"); } file_free(fla); buffer_free(buf); return enca_strdup(locname); } /* scan locale.alias somewhat crude now */ n = strlen(locname); p = NULL; s = (char*)buf->data; /* alias */ while (file_getline(fla) != NULL) { if (strncmp(s, locname, n) == 0 && (isspace(s[n]) || (s[n] == ':' && isspace(s[n+1])))) { p = s + n; /* skip any amount of whitespace */ while (isspace(*p)) p++; q = p; /* anything up to next whitespace is the canonical locale name */ while (*q != '\0' && !isspace(*q)) q++; *q = '\0'; p = enca_strdup(p); break; } } file_close(fla); file_free(fla); buffer_free(buf); return p != NULL ? p : static_iso639_alias_convert(locname); #else /* HAVE_LOCALE_ALIAS */ return static_iso639_alias_convert(locname); #endif /* HAVE_LOCALE_ALIAS */ } /** * get_lang_codeset: * * Returns locale native charset. * * MUST be called after detect_lang. * * Returns: the codeset name. **/ const char* get_lang_codeset(void) { if (!codeset) codeset = enca_strdup(""); return codeset; } /** * Returns `language' component of locale name locname (if successfully * parsed), NULL otherwise * * Returned string should be freed by caller. **/ static char* strip_locale_name(const char *locname) { /* Some supported languages can also appear as dialects of some other * language */ struct { const char *dialect; const char *iso639; } const DIALECTS[] = { { "cs_SK", "sk" }, { "ru_UA", "uk" }, }; size_t n; char *s; if (!locname) return NULL; s = enca_strdup(locname); n = strlen(s); /* Just language: en, de, fr, cs, sk, ru, etc. */ if (n == 2) return s; /* Some long specification (either X/Open or CEN). */ if (n >= 5 && s[2] == '_' && (s[5] == '\0' || s[5] == '.' || s[5] == '+')) { size_t i; /* Convert dialects. */ for (i = 0; i < ELEMENTS(DIALECTS); i++) { if (strncmp(DIALECTS[i].dialect, s, 5) == 0) { s[0] = DIALECTS[i].iso639[0]; s[1] = DIALECTS[i].iso639[1]; break; } } s[2] = '\0'; } else { /* Just garbage or some unresolved locale alias. */ enca_free(s); } return s; } /** * Tries to translate language names statically. * * Also catches some bad and alternative spellings. * * Returned string should be freed by caller. **/ static char* static_iso639_alias_convert(const char *locname) { struct { const char *alias; const char *iso639; } const ALIASES[] = { { "byelarussian", "be" }, { "belarussian", "be" }, { "belarusian", "be" }, { "byelorussian", "be" }, { "belorussian", "be" }, { "bulgarian", "bg" }, { "croatian", "hr" }, { "czech", "cs" }, { "estonian", "et" }, { "hungarian", "hu" }, { "magyar", "hu" }, { "lativan", "lt" }, { "lettic", "lv" }, { "lettish", "lv" }, { "lithuanian", "lt" }, { "polish", "pl" }, { "russian", "ru" }, { "slovak", "sk" }, { "slovene", "sl" }, { "slovenian", "sl" }, { "ukrainian", "uk" } }; size_t i; if (!locname) return NULL; for (i = 0; i < ELEMENTS(ALIASES); i++) { if (strcmp(ALIASES[i].alias, locname) == 0) { if (options.verbosity_level > 2) fprintf(stderr, "Decrypted locale alias using built-in table: %s\n", ALIASES[i].iso639); return enca_strdup(ALIASES[i].iso639); } } return enca_strdup(locname); } static void codeset_free(void) { enca_free(codeset); } /* vim: ts=2 */ enca-1.15/src/options.c000066400000000000000000000644241222222630600150030ustar00rootroot00000000000000/* @(#) $Id: options.c,v 1.31 2005/12/18 12:07:46 yeti Exp $ command line option processing 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. */ #include "common.h" #ifdef HAVE_GETOPT_H # include #else /* HAVE_GETOPT_H */ # include "getopt.h" #endif /* HAVE_GETOPT_H */ #ifdef HAVE_WORDEXP # ifdef HAVE_WORDEXP_H # include # else /* HAVE_WORDEXP_H */ /* don't declare all the stuff from wordexp.h when not present, it would probably not work anyway---just don't use it */ # undef HAVE_WORDEXP # endif /* HAVE_WORDEXP_H */ #endif /* HAVE_WORDEXP */ typedef void (* ReportFunc)(void); /* Program behaviour: enca or enconv. */ typedef enum { BEHAVE_ENCA, BEHAVE_ENCONV } ProgramBehaviour; /* Settings. */ char *program_name = NULL; static ProgramBehaviour behaviour = BEHAVE_ENCA; Options options; /* Environment variable containing default options. */ static const char *ENCA_ENV_VAR = "ENCAOPT"; /* Environment variable containing default target charset (think recode). */ static const char *RECODE_CHARSET_VAR = "DEFAULT_CHARSET"; /* Default option values. */ static const Options DEFAULTS = { 0, /* verbosity_level */ NULL, /* language */ OTYPE_HUMAN, /* output_type */ { ENCA_CS_UNKNOWN, 0 }, /* target_enc */ NULL, /* target_enc_str */ -1, /* prefix_filename */ }; extern const char *const COPYING_text[]; extern const char *const HELP_text[]; /* Version/copyright text. */ static const char *VERSION_TEXT = /* {{{ */ "Features: " #ifdef HAVE_LIBRECODE "+" #else /* HAVE_LIBRECODE */ "-" #endif /* HAVE_LIBRECODE */ "librecode-interface " #ifdef HAVE_GOOD_ICONV "+" #else /* HAVE_GOOD_ICONV */ "-" #endif /* HAVE_GOOD_ICONV */ "iconv-interface " #ifdef ENABLE_EXTERNAL "+" #else /* ENABLE_EXTERNAL */ "-" #endif /* ENABLE_EXTERNAL */ "external-converter " #ifdef HAVE_SETLOCALE "+" #else /* HAVE_SETLOCALE */ "-" #endif /* HAVE_SETLOCALE */ "language-detection " #ifdef HAVE_LOCALE_ALIAS "+" #else /* HAVE_LOCALE_ALIAS */ "-" #endif /* HAVE_LOCALE_ALIAS */ "locale-alias " #ifdef HAVE_NL_LANGINFO "+" #else /* HAVE_NL_LANGINFO */ "-" #endif /* HAVE_NL_LANGINFO */ "target-charset-auto " #ifdef HAVE_WORDEXP "+" #else /* HAVE_WORDEXP */ "-" #endif /* HAVE_WORDEXP */ "ENCAOPT " "\n\n" "Copyright (C) 2000-2005 David Necas (Yeti) (),\n" " 2005 Zuxy Meng ().\n" "\n" PACKAGE_NAME " is free software; it can be copied and/or modified under the terms of\n" "version 2 of GNU General Public License, run `enca --license' to see the full\n" "license text. There is NO WARRANTY; not even for MERCHANTABILITY or FITNESS\n" "FOR A PARTICULAR PURPOSE."; /* }}} */ /* Local prototypes. */ static char** interpret_opt (int argc, char *argv[], int cmdl_argc); static int prepend_env (int argc, char *argv[], int *newargc, char *(*newargv[])); static OutputType optchar_to_otype (const char c); static void set_otype_from_name (const char *otname); static void set_program_behaviour (void); static int parse_arg_x (const char *s); static int add_parsed_converters (const char *list); static void print_some_list (const char *listname); static char** make_filelist (const int n, char *argvrest[]); static int prefix_filename (int pfx); #ifndef HAVE_PROGRAM_INVOCATION_SHORT_NAME # define program_invocation_short_name strip_path(argv[0]) static char* strip_path (const char *fullpath); #endif /* not HAVE_PROGRAM_INVOCATION_SHORT_NAME */ static void print_version (void); static void print_all_charsets (void); static void print_builtin_charsets (void); static void print_surfaces (void); static void print_languages (void); static void print_lists (void); static void print_names (void); static void print_charsets (int only_builtin); static void print_text_and_exit (const char *const *text, int exitcode); /* merge all sources of options (ENCAOPT and command line arguments) and process them returns list of file to process (or NULL for stdin) */ char** process_opt(const int argc, char *argv[]) { int newargc; char **newargv; char **flist; /* Assign defaults. */ options = DEFAULTS; program_name = program_invocation_short_name; set_program_behaviour(); #ifdef ENABLE_EXTERNAL set_external_converter(DEFAULT_EXTERNAL_CONVERTER); #endif /* ENABLE_EXTERNAL */ /* Prepend options in $ENCAOPT. */ prepend_env(argc, argv, &newargc, &newargv); /* Interpret them. */ flist = interpret_opt(newargc, newargv, argc); /* prefix result with file name iff we are about to process stdin or the file list contains only one file and we don't print result */ if (prefix_filename(-1) == -1) { if ((flist == NULL || flist[1] == NULL) && options.output_type != OTYPE_DETAILS) prefix_filename(0); else prefix_filename(1); } return flist; } /* process options, return file list (i.e. all remaining arguments) FIXME: this function is infinitely ugly */ static char** interpret_opt(int argc, char *argv[], int cmdl_argc) { /* Short command line options. */ static const char *short_options = "cC:deE:fgGhil:L:mn:pPrsvVx:"; /* Long `GNU style' command line options {{{. */ static const struct option long_options[] = { { "auto-convert", no_argument, NULL, 'c' }, { "convert-to", required_argument, NULL, 'x' }, { "cstocs-name", no_argument, NULL, 's' }, { "details", no_argument, NULL, 'd' }, { "enca-name", no_argument, NULL, 'e' }, { "external-converter-program", required_argument, NULL, 'E' }, { "guess", no_argument, NULL, 'g' }, { "help", no_argument, NULL, 'h' }, { "human-readable", no_argument, NULL, 'f' }, { "iconv-name", no_argument, NULL, 'i' }, { "language", required_argument, NULL, 'L' }, { "license", no_argument, NULL, 'G' }, { "list", required_argument, NULL, 'l' }, { "mime-name", no_argument, NULL, 'm' }, { "name", required_argument, NULL, 'n' }, { "no-filename", no_argument, NULL, 'P' }, { "rfc1345-name", no_argument, NULL, 'r' }, { "try-converters", required_argument, NULL, 'C' }, { "verbose", no_argument, NULL, 'V' }, { "version", no_argument, NULL, 'v' }, { "with-filename", no_argument, NULL, 'p' }, { NULL, 0, NULL, 0 } }; /* }}} */ int c; char **filelist; int otype_set = 0; /* Whether output type was explicitely set. */ /* Process options. */ opterr = 0; /* Getopt() shouldn't print errors, we do it ourself. */ while ((c = getopt_long(argc, argv, short_options, long_options, NULL)) != -1) { switch (c) { case '?': /* Unknown option. */ fprintf(stderr, "%s: Unknown option -%c%s.\n" "Run `%s --help' to get brief help.\n", program_name, optopt, optopt == '\0' ? " or misspelt/ambiguous long option" : "", program_name); exit(EXIT_TROUBLE); break; case ':': /* Missing paramter. */ fprintf(stderr, "%s: Option -%c requires an argument.\n" "Run `%s --help' to get brief help.\n", program_name, optopt, program_name); exit(EXIT_TROUBLE); break; case 'h': /* Help (and exit). */ print_text_and_exit(HELP_text, EXIT_SUCCESS); break; case 'v': /* Version (and exit). */ print_version(); exit(EXIT_SUCCESS); break; case 'G': /* License (and exit). */ print_text_and_exit(COPYING_text, EXIT_SUCCESS); break; case 'l': /* Print required list (and exit). */ print_some_list(optarg); exit(EXIT_SUCCESS); break; case 'd': /* Detailed output. */ case 'e': /* Canonical name. */ case 'f': /* Full (descriptive) output. */ case 'i': /* Iconv name. */ case 'm': /* MIME name. */ case 'r': /* RFC 1345 name as output. */ case 's': /* Cstocs name as output. */ options.output_type = optchar_to_otype(c); otype_set = 1; break; case 'n': /* Output type by name. */ set_otype_from_name(optarg); otype_set = 1; break; case 'p': /* Prefix filename on. */ case 'P': /* Prefix filename off. */ prefix_filename(islower(c)); break; case 'g': /* Behave enca. */ behaviour = BEHAVE_ENCA; break; case 'c': /* Behave enconv. */ behaviour = BEHAVE_ENCONV; break; case 'V': /* Increase verbosity level. */ options.verbosity_level++; break; case 'x': /* Convert to. */ options.output_type = OTYPE_CONVERT; parse_arg_x(optarg); otype_set = 1; break; case 'L': /* Language. */ options.language = optarg; break; case 'C': /* Add converters to converter list. */ add_parsed_converters(optarg); break; case 'E': /* Converter name. */ #ifdef ENABLE_EXTERNAL set_external_converter(optarg); #else /* ENABLE_EXTERNAL */ fprintf(stderr, "%s: Cannot set external converter.\n" "Enca was built without support " "for external converters.\n", program_name); #endif /* ENABLE_EXTERNAL */ break; default: abort(); break; } } /* Set and initialize language. */ options.language = detect_lang(options.language); if (options.language == NULL) { fprintf(stderr, "%s: Cannot determine (or understand) " "your language preferences.\n" "Please use `-L language', or `-L none' if your language is not supported\n" "(only a few multibyte encodings can be recognized then).\n" "Run `%s --list languages' to get a list of supported languages.\n", program_name, program_name); exit(EXIT_TROUBLE); } /* Behaviour. */ /* With an explicit output type doesn't matter how we were called. */ if (otype_set) { behaviour = BEHAVE_ENCA; if (options.output_type == OTYPE_CONVERT && options.verbosity_level > 2) fprintf(stderr, "Explicitly specified target charset: %s\n", options.target_enc_str); } switch (behaviour) { case BEHAVE_ENCA: /* Nothing special here. */ break; case BEHAVE_ENCONV: { const char *charset; /* Try recode's default target charset. */ charset = getenv(RECODE_CHARSET_VAR); if (charset != NULL) { if (options.verbosity_level > 2) fprintf(stderr, "Inherited recode's %s target charset: %s\n", RECODE_CHARSET_VAR, charset); } else { /* Then locale native charset. */ charset = get_lang_codeset(); assert(charset != NULL); } parse_arg_x(charset); } if (options.target_enc_str[0] == '\0') { fprintf(stderr, "%s: Cannot detect native charset for locale %s.\n" "You have to use the `-x' option " "or the %s environment variable " "to set the target encoding manually.\n", program_name, options.language, RECODE_CHARSET_VAR); exit(EXIT_TROUBLE); } options.output_type = OTYPE_CONVERT; break; default: abort(); break; } /* Set up default list of converters. */ if (add_parsed_converters(NULL) == 0) add_parsed_converters(DEFAULT_CONVERTER_LIST); /* Create file list from remaining options. */ filelist = make_filelist(argc-optind, argv+optind); /* When run without any arguments and input is a tty, print help. */ if (filelist == NULL && enca_isatty(STDIN_FILENO) && cmdl_argc == 1) print_text_and_exit(HELP_text, EXIT_SUCCESS); #ifdef ENABLE_EXTERNAL if (options.output_type == OTYPE_CONVERT && external_converter_listed() && !check_external_converter()) exit(EXIT_TROUBLE); #endif return filelist; } /* prepend parsed contents of environment variable containing default options (ENCAOPT) before command line arguments (but after argv[0]) and return the new list of arguments in newargv (its length is newargc) */ static int prepend_env(int argc, char *argv[], int *newargc, char *(*newargv[])) #ifdef HAVE_WORDEXP { char *msg; char *encaenv; wordexp_t encaenv_parsed; size_t i; *newargc = argc; *newargv = argv; /* Fetch value of ENCA_ENV_VAR, if set. */ encaenv = getenv(ENCA_ENV_VAR); if (encaenv == NULL) return 0; /* Parse encaenv. */ if ((i = wordexp(encaenv, &encaenv_parsed, WRDE_NOCMD)) != 0) { switch (i) { case WRDE_NOSPACE: wordfree(&encaenv_parsed); fprintf(stderr, "%s: Cannot allocate memory.\n", program_name); exit(EXIT_TROUBLE); break; case WRDE_BADCHAR: msg = "invalid characters"; break; case WRDE_CMDSUB: msg = "command substitution is disabled"; break; case WRDE_SYNTAX: msg = "syntax error"; break; default: msg = NULL; break; } fprintf(stderr, "%s: Cannot parse value of %s (", program_name, ENCA_ENV_VAR); if (msg == NULL) fprintf(stderr, "error %zd", i); else fprintf(stderr, "%s", msg); fputs("), ignoring it\n", stderr); return 1; } /* create newargv starting from argv[0], then encaenv_parsed, and last rest of argv; note we copy addresses, not strings themselves from argv */ *newargc = argc + encaenv_parsed.we_wordc; *newargv = (char**)enca_malloc((*newargc)*sizeof(char*)); (*newargv)[0] = argv[0]; for (i = 0; i < encaenv_parsed.we_wordc; i++) (*newargv)[i+1] = enca_strdup(encaenv_parsed.we_wordv[i]); for (i = 1; i < (size_t)argc; i++) (*newargv)[i + encaenv_parsed.we_wordc] = argv[i]; /* Free memory. */ wordfree(&encaenv_parsed); return 0; } #else /* HAVE_WORDEXP */ { char *encaenv; size_t nitems; size_t i, state; const char *p; *newargc = argc; *newargv = argv; /* Fetch value of ENCA_ENV_VAR, if set. */ encaenv = getenv(ENCA_ENV_VAR); if (encaenv == NULL) return 0; /* Count the number of tokens in ENCA_ENV_VAR. */ encaenv = enca_strdup(encaenv); nitems = 0; state = 0; for (i = 0; encaenv[i] != '\0'; i++) { if (state == 0) { if (!isspace(encaenv[i])) nitems += ++state; } else { if (isspace(encaenv[i])) { encaenv[i] = '\0'; state = 0; } } } /* Extend argv[]. (see above) */ *newargc = argc + nitems; *newargv = (char**)enca_malloc((*newargc)*sizeof(char*)); (*newargv)[0] = argv[0]; p = encaenv; for (i = 0; i < nitems; i++) { while (isspace(*p)) p++; (*newargv)[i+1] = enca_strdup(p); while (*p != '\0') p++; p++; } enca_free(encaenv); for (i = 1; i < argc; i++) (*newargv)[i + nitems] = argv[i]; return 0; } #endif /* HAVE_WORDEXP */ /* Return output type appropriate for given option character. */ static OutputType optchar_to_otype(const char c) { switch (c) { case 'd': return OTYPE_DETAILS; /* Detailed output. */ case 'e': return OTYPE_CANON; /* Enca's name. */ case 'f': return OTYPE_HUMAN; /* Full (descriptive) output. */ case 'i': return OTYPE_ICONV; /* Iconv name. */ case 'r': return OTYPE_RFC1345; /* RFC 1345 name as output */ case 's': return OTYPE_CS2CS; /* Cstocs name as output. */ case 'm': return OTYPE_MIME; /* Preferred MIME name as output. */ } abort(); return 0; } /* if otname represents a valid output type name, assign it to *otype, otherwise do nothing when gets NULL as the name, prints list of valid names instead */ static void set_otype_from_name(const char *otname) { /* Abbreviations table stores pointers, we need something to point to. */ static const OutputType OTS[] = { OTYPE_DETAILS, OTYPE_CANON, OTYPE_HUMAN, OTYPE_RFC1345, OTYPE_ICONV, OTYPE_CS2CS, OTYPE_MIME, OTYPE_ALIASES }; /* Output type names. */ static const Abbreviation OTNAMES[] = { { "aliases", OTS+7 }, { "cstocs", OTS+4 }, { "details", OTS }, { "enca", OTS+1 }, { "human-readable", OTS+2 }, { "iconv", OTS+5 }, { "mime", OTS+6 }, { "rfc1345", OTS+3 }, }; const Abbreviation *p; p = expand_abbreviation(otname, OTNAMES, sizeof(OTNAMES)/sizeof(Abbreviation), "output type"); if (p != NULL) options.output_type = *(OutputType*)p->data; } /* parse -x argument, assign output encoding */ static int parse_arg_x(const char *s) { /* Encoding separator for -x argument. */ static const char XENC_SEPARATOR[] = ".."; static const size_t XENC_SEPARATOR_LEN = sizeof(XENC_SEPARATOR); /* Strip leading `..' if present. */ if (strncmp(s, XENC_SEPARATOR, XENC_SEPARATOR_LEN) == 0) s += XENC_SEPARATOR_LEN; /* Assign target encoding. */ enca_free(options.target_enc_str); options.target_enc_str = enca_strdup(s); /* We have to check for `..CHARSET/SURFACE..CHARSET2/SURFACE2' which would * enca_parse_encoding_name() split as * charset = CHARSET * surfaces = SURFACE..CHARSET2, SURFACE2 * which is aboviously not what we want. */ if (enca_strstr(s, XENC_SEPARATOR) == NULL) options.target_enc = enca_parse_encoding_name(s); else { options.target_enc.charset = ENCA_CS_UNKNOWN; options.target_enc.surface = 0; } return 0; } /* add comma separated list of converters to list of converters returns zero on success, nonzero otherwise when list is NULL return number of successfully added converters instead */ static int add_parsed_converters(const char *list) { /* Converter list separator for -E argument. */ static const char CONVERTER_SEPARATOR = ','; char *s; char *p_c,*p_c1; static int nc = 0; if (list == NULL) return nc; s = enca_strdup(list); /* Add converter names one by one. */ p_c = s; while ((p_c1 = strchr(p_c, CONVERTER_SEPARATOR)) != NULL) { *p_c1++ = '\0'; if (add_converter(p_c) == 0) nc++; p_c = p_c1; } if (add_converter(p_c) == 0) nc++; enca_free(s); return 0; } /* create NULL-terminated file list from remaining fields in argv[] and return it */ static char** make_filelist(const int n, char *argvrest[]) { int i; char **flist = NULL; /* Accept `-' as stdin. */ if (n == 0 || (n == 1 && strcmp(argvrest[0], "-") == 0)) return NULL; flist = (char**)enca_malloc((n+1)*sizeof(char*)); for (i = 0; i < n; i++) flist[i] = enca_strdup(argvrest[i]); flist[n] = NULL; return flist; } static int prefix_filename(int pfx) { if (pfx != -1) options.prefix_filename = pfx; return options.prefix_filename; } /* prints some list user asked for (--list) -- just calls appropriate * functions from appropriate module (with funny abbreviation expansion) * when listname is NULL prints list of available lists instead */ static void print_some_list(const char *listname) { /* ISO C forbids initialization between function pointers and void* so we use one more level of indirection to comply (and hope gracious complier will forgive us our sins, amen) */ static const ReportFunc printer_bics = print_builtin_charsets; static const ReportFunc printer_conv = print_converter_list; static const ReportFunc printer_char = print_all_charsets; static const ReportFunc printer_lang = print_languages; static const ReportFunc printer_list = print_lists; static const ReportFunc printer_name = print_names; static const ReportFunc printer_surf = print_surfaces; /* List names and pointers to pointers to list-printers. */ static const Abbreviation LISTS[] = { { "built-in-charsets", &printer_bics }, { "converters", &printer_conv }, { "charsets", &printer_char }, { "languages", &printer_lang }, { "lists", &printer_list }, { "names", &printer_name }, { "surfaces", &printer_surf }, }; const Abbreviation *p = NULL; ReportFunc list_printer; /* Pointer to list printing functions. */ /* Get the abbreviation data. */ p = expand_abbreviation(listname, LISTS, sizeof(LISTS)/sizeof(Abbreviation), "list"); /* p can be NULL in weird situations, e.g. when print_some_list() was * called recursively by itself through print_lists. * In all cases, return. */ if (p == NULL) return; list_printer = *(ReportFunc*)p->data; list_printer(); } #ifndef HAVE_PROGRAM_INVOCATION_SHORT_NAME /* Create and return string containing only last component of path fullpath. */ static char* strip_path(const char *fullpath) { char *p; p = strrchr(fullpath, '/'); if (p == NULL) p = (char*)fullpath; else p++; return enca_strdup(p); } #endif /* Print version information. */ static void print_version(void) { printf("%s %s\n\n%s\n", PACKAGE_TARNAME, PACKAGE_VERSION, VERSION_TEXT); } /** * Prints builtin charsets. * Must be of type ReportFunc. **/ static void print_builtin_charsets(void) { print_charsets(1); } /** * Prints all charsets. * Must be of type ReportFunc. **/ static void print_all_charsets(void) { print_charsets(0); } /** * Prints list of charsets using name style from options.output_type. * * It prints all charsets, except: * - charsets without given name, and * - charsets without UCS-2 map when only_builtin is set. **/ static void print_charsets(int only_builtin) { size_t ncharsets, i; ncharsets = enca_number_of_charsets(); for (i = 0; i < ncharsets; i++) { if (only_builtin && !enca_charset_has_ucs2_map(i)) continue; switch (options.output_type) { case OTYPE_ALIASES: print_aliases(i); break; case OTYPE_CANON: case OTYPE_CONVERT: puts(enca_charset_name(i, ENCA_NAME_STYLE_ENCA)); break; case OTYPE_HUMAN: case OTYPE_DETAILS: puts(enca_charset_name(i, ENCA_NAME_STYLE_HUMAN)); break; case OTYPE_RFC1345: puts(enca_charset_name(i, ENCA_NAME_STYLE_RFC1345)); break; case OTYPE_CS2CS: if (enca_charset_name(i, ENCA_NAME_STYLE_CSTOCS) != NULL) puts(enca_charset_name(i, ENCA_NAME_STYLE_CSTOCS)); break; case OTYPE_ICONV: if (enca_charset_name(i, ENCA_NAME_STYLE_ICONV) != NULL) puts(enca_charset_name(i, ENCA_NAME_STYLE_ICONV)); break; case OTYPE_MIME: if (enca_charset_name(i, ENCA_NAME_STYLE_MIME) != NULL) puts(enca_charset_name(i, ENCA_NAME_STYLE_MIME)); break; default: abort(); break; } } } /** * Prints all aliases of given charset. **/ void print_aliases(size_t cs) { size_t i, na; const char **aliases = enca_get_charset_aliases(cs, &na); for (i = 0; i < na; i++) printf("%s ", aliases[i]); putchar('\n'); enca_free(aliases); } /** * Prints all [public] surfaces. * Must be of type ReportFunc. **/ static void print_surfaces(void) { EncaNameStyle ns; char *s; unsigned int i; /* Only these two know surfaces. */ if (options.output_type == OTYPE_HUMAN) ns = ENCA_NAME_STYLE_HUMAN; else ns = ENCA_NAME_STYLE_ENCA; for (i = 1; i != 0; i <<= 1) { s = enca_get_surface_name(i, ns); if (s != NULL && s[0] != '\0') { fputs(s, stdout); if (ns == ENCA_NAME_STYLE_ENCA) putchar('\n'); enca_free(s); } } } /* Magically print the list of lists. */ static void print_lists(void) { print_some_list(NULL); } /** * Prints all languages list of charsets of each. * Must be of type ReportFunc. * Quite illogically affected by options.output_type: it changes *language* * name style, instead of charset name style. **/ static void print_languages(void) { size_t nl, nc, i, j, maxlen; const char **l; int *c; int english; l = enca_get_languages(&nl); english = options.output_type == OTYPE_HUMAN || options.output_type == OTYPE_DETAILS; /* Find max. language name length for English. */ maxlen = 0; if (english) { for (i = 0; i < nl; i++) { j = strlen(enca_language_english_name(l[i])); if (j > maxlen) maxlen = j; } } /* Print the names. */ for (i = 0; i < nl; i++) { if (english) printf("%*s:", (int)maxlen, enca_language_english_name(l[i])); else printf("%s:", l[i]); c = enca_get_language_charsets(l[i], &nc); for (j = 0; j < nc; j++) printf(" %s", enca_charset_name(c[j], ENCA_NAME_STYLE_ENCA)); putchar('\n'); enca_free(c); } enca_free(l); } /** * Prints list of all encoding name styles. * Must be of type ReportFunc. **/ static void print_names(void) { set_otype_from_name(NULL); } /** * Print some text (help, copying, ...) and exit with given code. **/ static void print_text_and_exit(const char *const *text, int exitcode) { assert(text); for (; *text; text++) puts(*text); exit(exitcode); } /** * set_program_behaviour: * * Sets behaviour according to name we were called. **/ static void set_program_behaviour(void) { static const char enca_name[] = "enca"; static const char enconv_name[] = "enconv"; static const size_t nenca = sizeof(enca_name) - 1; static const size_t nenconv = sizeof(enconv_name) - 1; if (strncmp(program_name, enca_name, nenca) == 0 && !isalpha(program_name[nenca])) { behaviour = BEHAVE_ENCA; return; } if (strncmp(program_name, enconv_name, nenconv) == 0 && !isalpha(program_name[nenconv])) { behaviour = BEHAVE_ENCONV; return; } } /* vim: ts=2 */ enca-1.15/src/text2c.sh000077500000000000000000000004041222222630600147000ustar00rootroot00000000000000#! /bin/sh name=`echo $1 | sed -e 's/.*\///'` cat <. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . # Make unconditional expansion of undefined variables an error. This # helps a lot in preventing typo-related bugs. set -u usage_error () { echo "$0: $*" >&2 print_usage >&2 exit 2 } print_usage () { cat <$log_file 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then estatus=1 fi case $estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac # Report outcome to console. echo "${col}${res}${std}: $test_name" # Register the test result, and other relevant metadata. echo ":test-result: $res" > $trs_file echo ":global-test-result: $res" >> $trs_file echo ":recheck: $recheck" >> $trs_file echo ":copy-in-global-log: $gcopy" >> $trs_file # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: enca-1.15/test/000077500000000000000000000000001222222630600133225ustar00rootroot00000000000000enca-1.15/test/.gitignore000066400000000000000000000000171222222630600153100ustar00rootroot00000000000000.deps Makefile enca-1.15/test/Makefile.am000066400000000000000000000076661222222630600153750ustar00rootroot00000000000000# @(#) $Id: Makefile.am,v 1.26 2005/12/01 10:12:10 yeti Exp $ TESTS_ENVIRONMENT = srcdir=@srcdir@ top_srcdir=@top_srcdir@ top_builddir=@top_builddir@ TESTS = \ ./test-lists.sh \ ./test-long-texts.sh \ ./test-convlist.sh \ ./test-guess-short.sh \ ./test-guess-stdin.sh \ ./test-guess-utf8.sh \ ./test-pP.sh \ ./test-aliases.sh \ ./test-empty.sh \ ./test-convert-64.sh \ ./test-convert-filter.sh \ ./test-errors.sh \ ./test-ENCAOPT.sh \ ./test-default-cs.sh \ ./test-external.sh \ ./test-iconv.sh \ ./test-recode.sh noinst_SCRIPTS = \ dummy-converter.sh \ failing-converter.sh \ failing-converter2.sh \ finish.sh \ setup.sh if MAINTAINER_MODE noinst_PROGRAMS = simtable simtable_SOURCES = simtable.c simtable_LDFLAGS = @LDFLAGS@ @LIBS@ simtable_LDADD = $(top_builddir)/lib/libenca.la simtable_DEPENDENCIES = $(top_builddir)/lib/libenca.la AM_CPPFLAGS = -I$(top_srcdir)/lib $(GCOV_CPPFLAGS) AM_LDFLAGS = $(GCOV_LDFLAGS) AM_CFLAGS = $(GCOV_FLAGS) endif EXTRA_DIST = $(TEST_SAMPLES) $(TESTS) $(TEST_RESULTS) $(noinst_SCRIPTS) TEST_RESULTS = \ test-guess-short.expected \ test-guess-utf8.expected \ test-external.expected \ test-pP.expected TEST_SAMPLES = \ be-s.cp1251 \ be-s.ibm855 \ be-s.ibm866 \ be-s.iso88595 \ be-s.koi8uni \ be-s.maccyr \ be-s.utf8 \ be-utf8.ibm855 \ be-utf8.iso88595 \ bg-s.cp1251 \ bg-s.cp1251.qp \ bg-s.ecma113 \ bg-s.ibm855 \ bg-s.iso88595 \ bg-s.maccyr \ bg-s.utf8 \ bg-utf8.bin \ bg-utf8.cp1251 \ bg-utf8.ecma113 \ bg-utf8.ibm855 \ bg-utf8.iso88595 \ bg-utf8.maccyr \ cs-s.cork \ cs-s.cp1250 \ cs-s.ibm852 \ cs-s.ibm852.qp \ cs-s.iso88592 \ cs-s.keybcs2 \ cs-s.koi8cs2 \ cs-s.macce \ cs-s.utf8 \ cs-utf8.bin \ cs-utf8.cork \ cs-utf8.ibm852 \ cs-utf8.iso88592 \ et-s.baltic \ et-s.cp1257 \ et-s.ibm775 \ et-s.iso885913 \ et-s.iso88594 \ et-s.iso88594.qp \ et-s.macce \ et-s.utf8 \ et-utf8.bin \ et-utf8.ibm775 \ et-utf8.iso885913 \ et-utf8.iso88594 \ hr-s.cork \ hr-s.cp1250 \ hr-s.ibm852 \ hr-s.iso88592 \ hr-s.iso88592.qp \ hr-s.macce \ hr-s.utf8 \ hr-utf8.cp1250 \ hr-utf8.ibm852 \ hu-s.cork \ hu-s.cp1250 \ hu-s.ibm852 \ hu-s.iso88592 \ hu-s.macce \ hu-s.macce.qp \ hu-s.utf8 \ hu-utf8.cork \ hu-utf8.cp1250 \ hu-utf8.ibm852 \ hu-utf8.macce \ lt-s.baltic \ lt-s.cp1257 \ lt-s.ibm775 \ lt-s.iso885913 \ lt-s.iso88594 \ lt-s.macce \ lt-s.utf8 \ lt-utf8.ibm775 \ lt-utf8.iso88594 \ lt-utf8.macce \ lv-s.baltic \ lv-s.cp1257 \ lv-s.ibm775 \ lv-s.iso885913 \ lv-s.iso885913.qp \ lv-s.iso88594 \ lv-s.macce \ lv-s.utf8 \ lv-utf8.ibm775 \ lv-utf8.iso88594 \ lv-utf8.macce \ none-s.ucs2 \ none-s.ucs2le \ none-s.ucs2le.qp \ none-s.ucs4 \ none-s.ucs4le \ none-s.utf7 \ none-s.utf8 \ none-utf8.messy \ pl-s.baltic \ pl-s.baltic.qp \ pl-s.cork \ pl-s.cp1250 \ pl-s.ibm852 \ pl-s.iso885913 \ pl-s.iso885916 \ pl-s.iso88592 \ pl-s.utf8 \ pl-utf8.baltic \ pl-utf8.ibm852 \ pl-utf8.iso885916 \ ru-s.cp1251 \ ru-s.cp866 \ ru-s.iso88595 \ ru-s.koi8r \ ru-s.maccyr \ ru-s.maccyr.qp \ ru-s.utf8 \ ru-utf8.cp866 \ ru-utf8.koi8r \ ru-utf8.maccyr \ sk-s.cork \ sk-s.cp1250 \ sk-s.cp1250.qp \ sk-s.ibm852 \ sk-s.iso88592 \ sk-s.keybcs2 \ sk-s.koi8cs2 \ sk-s.macce \ sk-s.utf8 \ sk-utf8.cp1250 \ sk-utf8.keybcs2 \ sl-s.cork \ sl-s.cp1250 \ sl-s.ibm852 \ sl-s.ibm852.qp \ sl-s.iso88592 \ sl-s.macce \ sl-s.utf8 \ sl-utf8.cork \ sl-utf8.ibm852 \ sl-utf8.iso88592 \ sl-utf8.macce \ uk-s.cp1125 \ uk-s.cp1251 \ uk-s.ibm855 \ uk-s.iso88595 \ uk-s.koi8u \ uk-s.maccyr \ uk-s.utf8 \ uk-utf8.bin \ uk-utf8.cp1251 \ zh-s.big5 \ zh-s.gbk \ zh-s.hz \ zh-s.utf8 # alias test=check test: check .PHONY: test clean-local: rm -f test-*.actual core.* core *.tmp *~ *-big.* test-guess-stdin.expected test-ENCAOPT.expected dist-hook: chmod 755 $(distdir)/test-*.sh enca-1.15/test/Makefile.in000066400000000000000000001205341222222630600153740ustar00rootroot00000000000000# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @MAINTAINER_MODE_TRUE@noinst_PROGRAMS = simtable$(EXEEXT) subdir = test DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp \ $(top_srcdir)/test-driver 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/tools.m4 $(top_srcdir)/m4/typevar.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am__simtable_SOURCES_DIST = simtable.c @MAINTAINER_MODE_TRUE@am_simtable_OBJECTS = simtable.$(OBJEXT) simtable_OBJECTS = $(am_simtable_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 = simtable_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(simtable_LDFLAGS) $(LDFLAGS) -o $@ SCRIPTS = $(noinst_SCRIPTS) 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__depfiles_maybe = depfiles 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 = $(simtable_SOURCES) DIST_SOURCES = $(am__simtable_SOURCES_DIST) 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) # 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)` ETAGS = etags CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* # A command that, given a newline-separated list of test names on the # standard input, print the name of the tests that are to be re-run # upon "make recheck". am__list_recheck_tests = $(AWK) '{ \ recheck = 1; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ { \ if ((getline line2 < ($$0 ".log")) < 0) \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ { \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ { \ break; \ } \ }; \ if (recheck) \ print $$0; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # A command that, given a newline-separated list of test names on the # standard input, create the global log from their .trs and .log files. am__create_global_log = $(AWK) ' \ function fatal(msg) \ { \ print "fatal: making $@: " msg | "cat >&2"; \ exit 1; \ } \ function rst_section(header) \ { \ print header; \ len = length(header); \ for (i = 1; i <= len; i = i + 1) \ printf "="; \ printf "\n\n"; \ } \ { \ copy_in_global_log = 1; \ global_test_result = "RUN"; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".trs"); \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ sub("[ ]*$$", "", line); \ global_test_result = line; \ } \ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ copy_in_global_log = 0; \ }; \ if (copy_in_global_log) \ { \ rst_section(global_test_result ": " $$0); \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".log"); \ print line; \ }; \ printf "\n"; \ }; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # Restructured Text title. am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ case "$@" in \ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ *) am__odir=.;; \ esac; \ test "x$$am__odir" = x"." || test -d "$$am__odir" \ || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the '.log' extension removed). The result is saved in the shell variable # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ case '$*' in \ */*) b='$*';; \ *) b=`echo '$@' | sed 's/\.log$$//'`; \ esac;; \ *) \ b='$*';; \ esac am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.test.log=.log) TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERTER_LIBS = @CONVERTER_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTOCS_PROG = @CSTOCS_PROG@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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@ LIBICONV = @LIBICONV@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ 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_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ 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@ 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@ # @(#) $Id: Makefile.am,v 1.26 2005/12/01 10:12:10 yeti Exp $ TESTS_ENVIRONMENT = srcdir=@srcdir@ top_srcdir=@top_srcdir@ top_builddir=@top_builddir@ TESTS = \ ./test-lists.sh \ ./test-long-texts.sh \ ./test-convlist.sh \ ./test-guess-short.sh \ ./test-guess-stdin.sh \ ./test-guess-utf8.sh \ ./test-pP.sh \ ./test-aliases.sh \ ./test-empty.sh \ ./test-convert-64.sh \ ./test-convert-filter.sh \ ./test-errors.sh \ ./test-ENCAOPT.sh \ ./test-default-cs.sh \ ./test-external.sh \ ./test-iconv.sh \ ./test-recode.sh noinst_SCRIPTS = \ dummy-converter.sh \ failing-converter.sh \ failing-converter2.sh \ finish.sh \ setup.sh @MAINTAINER_MODE_TRUE@simtable_SOURCES = simtable.c @MAINTAINER_MODE_TRUE@simtable_LDFLAGS = @LDFLAGS@ @LIBS@ @MAINTAINER_MODE_TRUE@simtable_LDADD = $(top_builddir)/lib/libenca.la @MAINTAINER_MODE_TRUE@simtable_DEPENDENCIES = $(top_builddir)/lib/libenca.la @MAINTAINER_MODE_TRUE@AM_CPPFLAGS = -I$(top_srcdir)/lib $(GCOV_CPPFLAGS) @MAINTAINER_MODE_TRUE@AM_LDFLAGS = $(GCOV_LDFLAGS) @MAINTAINER_MODE_TRUE@AM_CFLAGS = $(GCOV_FLAGS) EXTRA_DIST = $(TEST_SAMPLES) $(TESTS) $(TEST_RESULTS) $(noinst_SCRIPTS) TEST_RESULTS = \ test-guess-short.expected \ test-guess-utf8.expected \ test-external.expected \ test-pP.expected TEST_SAMPLES = \ be-s.cp1251 \ be-s.ibm855 \ be-s.ibm866 \ be-s.iso88595 \ be-s.koi8uni \ be-s.maccyr \ be-s.utf8 \ be-utf8.ibm855 \ be-utf8.iso88595 \ bg-s.cp1251 \ bg-s.cp1251.qp \ bg-s.ecma113 \ bg-s.ibm855 \ bg-s.iso88595 \ bg-s.maccyr \ bg-s.utf8 \ bg-utf8.bin \ bg-utf8.cp1251 \ bg-utf8.ecma113 \ bg-utf8.ibm855 \ bg-utf8.iso88595 \ bg-utf8.maccyr \ cs-s.cork \ cs-s.cp1250 \ cs-s.ibm852 \ cs-s.ibm852.qp \ cs-s.iso88592 \ cs-s.keybcs2 \ cs-s.koi8cs2 \ cs-s.macce \ cs-s.utf8 \ cs-utf8.bin \ cs-utf8.cork \ cs-utf8.ibm852 \ cs-utf8.iso88592 \ et-s.baltic \ et-s.cp1257 \ et-s.ibm775 \ et-s.iso885913 \ et-s.iso88594 \ et-s.iso88594.qp \ et-s.macce \ et-s.utf8 \ et-utf8.bin \ et-utf8.ibm775 \ et-utf8.iso885913 \ et-utf8.iso88594 \ hr-s.cork \ hr-s.cp1250 \ hr-s.ibm852 \ hr-s.iso88592 \ hr-s.iso88592.qp \ hr-s.macce \ hr-s.utf8 \ hr-utf8.cp1250 \ hr-utf8.ibm852 \ hu-s.cork \ hu-s.cp1250 \ hu-s.ibm852 \ hu-s.iso88592 \ hu-s.macce \ hu-s.macce.qp \ hu-s.utf8 \ hu-utf8.cork \ hu-utf8.cp1250 \ hu-utf8.ibm852 \ hu-utf8.macce \ lt-s.baltic \ lt-s.cp1257 \ lt-s.ibm775 \ lt-s.iso885913 \ lt-s.iso88594 \ lt-s.macce \ lt-s.utf8 \ lt-utf8.ibm775 \ lt-utf8.iso88594 \ lt-utf8.macce \ lv-s.baltic \ lv-s.cp1257 \ lv-s.ibm775 \ lv-s.iso885913 \ lv-s.iso885913.qp \ lv-s.iso88594 \ lv-s.macce \ lv-s.utf8 \ lv-utf8.ibm775 \ lv-utf8.iso88594 \ lv-utf8.macce \ none-s.ucs2 \ none-s.ucs2le \ none-s.ucs2le.qp \ none-s.ucs4 \ none-s.ucs4le \ none-s.utf7 \ none-s.utf8 \ none-utf8.messy \ pl-s.baltic \ pl-s.baltic.qp \ pl-s.cork \ pl-s.cp1250 \ pl-s.ibm852 \ pl-s.iso885913 \ pl-s.iso885916 \ pl-s.iso88592 \ pl-s.utf8 \ pl-utf8.baltic \ pl-utf8.ibm852 \ pl-utf8.iso885916 \ ru-s.cp1251 \ ru-s.cp866 \ ru-s.iso88595 \ ru-s.koi8r \ ru-s.maccyr \ ru-s.maccyr.qp \ ru-s.utf8 \ ru-utf8.cp866 \ ru-utf8.koi8r \ ru-utf8.maccyr \ sk-s.cork \ sk-s.cp1250 \ sk-s.cp1250.qp \ sk-s.ibm852 \ sk-s.iso88592 \ sk-s.keybcs2 \ sk-s.koi8cs2 \ sk-s.macce \ sk-s.utf8 \ sk-utf8.cp1250 \ sk-utf8.keybcs2 \ sl-s.cork \ sl-s.cp1250 \ sl-s.ibm852 \ sl-s.ibm852.qp \ sl-s.iso88592 \ sl-s.macce \ sl-s.utf8 \ sl-utf8.cork \ sl-utf8.ibm852 \ sl-utf8.iso88592 \ sl-utf8.macce \ uk-s.cp1125 \ uk-s.cp1251 \ uk-s.ibm855 \ uk-s.iso88595 \ uk-s.koi8u \ uk-s.maccyr \ uk-s.utf8 \ uk-utf8.bin \ uk-utf8.cp1251 \ zh-s.big5 \ zh-s.gbk \ zh-s.hz \ zh-s.utf8 all: all-am .SUFFIXES: .SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs $(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 test/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits test/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @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: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list simtable$(EXEEXT): $(simtable_OBJECTS) $(simtable_DEPENDENCIES) $(EXTRA_simtable_DEPENDENCIES) @rm -f simtable$(EXEEXT) $(AM_V_CCLD)$(simtable_LINK) $(simtable_OBJECTS) $(simtable_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simtable.Po@am__quote@ .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 # Recover from deleted '.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not # expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ if $(am__make_dryrun); then :; else \ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ fi; \ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ else \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ test $$st -eq 0 || exit 1; \ fi @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for b in $$bases; do echo $$b; done \ | $(am__create_global_log); \ } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ trs_list=`for i in $$bases; do echo $$i.trs; done`; \ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ log_list=`for i in $$bases; do echo $$i.log; done`; \ log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? ./test-lists.sh.log: ./test-lists.sh @p='./test-lists.sh'; \ b='./test-lists.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ./test-long-texts.sh.log: ./test-long-texts.sh @p='./test-long-texts.sh'; \ b='./test-long-texts.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ./test-convlist.sh.log: ./test-convlist.sh @p='./test-convlist.sh'; \ b='./test-convlist.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ./test-guess-short.sh.log: ./test-guess-short.sh @p='./test-guess-short.sh'; \ b='./test-guess-short.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ./test-guess-stdin.sh.log: ./test-guess-stdin.sh @p='./test-guess-stdin.sh'; \ b='./test-guess-stdin.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ./test-guess-utf8.sh.log: ./test-guess-utf8.sh @p='./test-guess-utf8.sh'; \ b='./test-guess-utf8.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ./test-pP.sh.log: ./test-pP.sh @p='./test-pP.sh'; \ b='./test-pP.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ./test-aliases.sh.log: ./test-aliases.sh @p='./test-aliases.sh'; \ b='./test-aliases.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ./test-empty.sh.log: ./test-empty.sh @p='./test-empty.sh'; \ b='./test-empty.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ./test-convert-64.sh.log: ./test-convert-64.sh @p='./test-convert-64.sh'; \ b='./test-convert-64.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ./test-convert-filter.sh.log: ./test-convert-filter.sh @p='./test-convert-filter.sh'; \ b='./test-convert-filter.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ./test-errors.sh.log: ./test-errors.sh @p='./test-errors.sh'; \ b='./test-errors.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ./test-ENCAOPT.sh.log: ./test-ENCAOPT.sh @p='./test-ENCAOPT.sh'; \ b='./test-ENCAOPT.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ./test-default-cs.sh.log: ./test-default-cs.sh @p='./test-default-cs.sh'; \ b='./test-default-cs.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ./test-external.sh.log: ./test-external.sh @p='./test-external.sh'; \ b='./test-external.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ./test-iconv.sh.log: ./test-iconv.sh @p='./test-iconv.sh'; \ b='./test-iconv.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ./test-recode.sh.log: ./test-recode.sh @p='./test-recode.sh'; \ b='./test-recode.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.test$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; \ @am__EXEEXT_TRUE@ $(am__set_b); \ @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) 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: -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-local clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -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-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 -rf ./$(DEPDIR) -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: check-am install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ clean-generic clean-libtool clean-local clean-noinstPROGRAMS \ cscopelist-am ctags ctags-am dist-hook distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-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 recheck tags tags-am uninstall \ uninstall-am # alias test=check test: check .PHONY: test clean-local: rm -f test-*.actual core.* core *.tmp *~ *-big.* test-guess-stdin.expected test-ENCAOPT.expected dist-hook: chmod 755 $(distdir)/test-*.sh # 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: enca-1.15/test/be-s.cp1251000066400000000000000000000000311222222630600147770ustar00rootroot00000000000000 ? enca-1.15/test/be-s.ibm855000066400000000000000000000000311222222630600150750ustar00rootroot00000000000000 Ԩ ؠަ󨤨? enca-1.15/test/be-s.ibm866000066400000000000000000000000311222222630600150770ustar00rootroot00000000000000 蠟? enca-1.15/test/be-s.iso88595000066400000000000000000000000301222222630600153000ustar00rootroot00000000000000 ? enca-1.15/test/be-s.koi8uni000066400000000000000000000000311222222630600154520ustar00rootroot00000000000000 ? enca-1.15/test/be-s.maccyr000066400000000000000000000000301222222630600153410ustar00rootroot00000000000000 ? enca-1.15/test/be-s.utf8000066400000000000000000000000531222222630600147560ustar00rootroot00000000000000Ну што вы не пасядзеце? enca-1.15/test/be-utf8.ibm855000066400000000000000000000001221222222630600155220ustar00rootroot00000000000000лЮЛЃ ЛѕЛѓлЙ л▓ЛІ лйлх л┐л░ЛЂЛЈл┤лилхЛєлх? enca-1.15/test/be-utf8.iso88595000066400000000000000000000001161222222630600157310ustar00rootroot00000000000000абƒ бˆб‚аО аВб‹ аНаЕ аПаАббаДаЗаЕб†аЕ? enca-1.15/test/bg-s.cp1251000066400000000000000000000000651222222630600150100ustar00rootroot00000000000000 - , - . enca-1.15/test/bg-s.cp1251.qp000066400000000000000000000002001222222630600154160ustar00rootroot00000000000000=CA=EE=E9=F2=EE =EC=EE=E6=E5 - =EF=F0=E0=E2=E8 =E3=EE, =EA=EE=E9=F2=EE =ED= =E5 =EC=EE=E6=E5 - =F3=F7=E8 =E4=F0=F3=E3=E8=F2=E5. enca-1.15/test/bg-s.ecma113000066400000000000000000000000641222222630600152260ustar00rootroot00000000000000 - , - . enca-1.15/test/bg-s.ibm855000066400000000000000000000000651222222630600151060ustar00rootroot00000000000000ֽ - , ֽ Ԩ - 笷. enca-1.15/test/bg-s.iso88595000066400000000000000000000000641222222630600153110ustar00rootroot00000000000000 - , - . enca-1.15/test/bg-s.maccyr000066400000000000000000000000641222222630600153520ustar00rootroot00000000000000 - , - . enca-1.15/test/bg-s.utf8000066400000000000000000000001321222222630600147560ustar00rootroot00000000000000Който може - прави го, който не може - учи другите. enca-1.15/test/bg-utf8.bin000066400000000000000000000001341222222630600152660ustar00rootroot00000000000000Който може - прави го, който не може - учи другите. enca-1.15/test/bg-utf8.cp1251000066400000000000000000000002511222222630600154310ustar00rootroot00000000000000Който РјРѕР¶Рµ - прави РіРѕ, който РЅРµ РјРѕР¶Рµ - учи другите. enca-1.15/test/bg-utf8.ecma113000066400000000000000000000002441222222630600156520ustar00rootroot00000000000000пšпЎпЉя‚пЎ пЌпЎпІпЅ - пЏя€п№пЃпЈ пЁпЎ, пЊпЎпЉя‚пЎ п¤пЅ пЌпЎпІпЅ - яƒя‡пЈ пЄя€яƒпЁпЈя‚пЅ. enca-1.15/test/bg-utf8.ibm855000066400000000000000000000002561222222630600155340ustar00rootroot00000000000000лџлЙл╣ЛѓлЙ л╝лЙлХлх - л┐Лђл░л▓лИ л│лЙ, л║лЙл╣ЛѓлЙ лйлх л╝лЙлХлх - ЛЃЛЄлИ л┤ЛђЛЃл│лИЛѓлх. enca-1.15/test/bg-utf8.iso88595000066400000000000000000000002431222222630600157340ustar00rootroot00000000000000аšаОаЙб‚аО аМаОаЖаЕ - аПб€аАаВаИ аГаО, аКаОаЙб‚аО аНаЕ аМаОаЖаЕ - бƒб‡аИ аДб€бƒаГаИб‚аЕ. enca-1.15/test/bg-utf8.maccyr000066400000000000000000000003141222222630600157740ustar00rootroot00000000000000–Ъ–Њ–є—В–Њ –Љ–Њ–ґ–µ - –њ—А–∞–≤–Є –≥–Њ, –Ї–Њ–є—В–Њ –љ–µ –Љ–Њ–ґ–µ - —Г—З–Є –і—А—Г–≥–Є—В–µ. enca-1.15/test/cs-s.cork000066400000000000000000000000721222222630600150460ustar00rootroot00000000000000npor poouchlch lutch an pehluil i zuc orkn enca-1.15/test/cs-s.cp1250000066400000000000000000000000731222222630600150230ustar00rootroot00000000000000npor poouchlch lutch an pehluil i zuc orkn enca-1.15/test/cs-s.ibm852000066400000000000000000000000731222222630600151170ustar00rootroot00000000000000npor poouchlch lutch an pehluil i zuc orkn enca-1.15/test/cs-s.ibm852.qp000066400000000000000000000001351222222630600155350ustar00rootroot00000000000000n=A0por po=9Couchl=ECch =A7lut=ECch =9F=A1=E5an=85 p=FDehlu=E7il i zu=FD=A1= c=A1 ork=A0n=0D enca-1.15/test/cs-s.iso88592000066400000000000000000000000721222222630600153220ustar00rootroot00000000000000npor poouchlch lutch an pehluil i zuc orkn enca-1.15/test/cs-s.keybcs2000066400000000000000000000000731222222630600154530ustar00rootroot00000000000000npor poouchlch lutch an pehluil i zuc orkn enca-1.15/test/cs-s.koi8cs2000066400000000000000000000000731222222630600153730ustar00rootroot00000000000000npor poouchlch lutch an pehluil i zuc orkn enca-1.15/test/cs-s.macce000066400000000000000000000000721222222630600151600ustar00rootroot00000000000000npor poouchlch lutch an pehluil i zuޒc orkn enca-1.15/test/cs-s.utf8000066400000000000000000000001121222222630600147710ustar00rootroot00000000000000nápor poťouchlých žlutých číňanů přehlušil i zuřící orkán enca-1.15/test/cs-utf8.bin000066400000000000000000000001651222222630600153070ustar00rootroot00000000000000899600Kód _oblasti:Kód _oblasti:Ak_tivovatProbíhá aktivace síťového zařízení %s, čekejte prosím... enca-1.15/test/cs-utf8.cork000066400000000000000000000001521222222630600154710ustar00rootroot00000000000000nÃąpor poÅěouchlách Å¿lutách ÄŊÃŋÅĹanÅŕ pÅŹehluÅąil i zuÅŹÃŋcÃŋ orkÃąnËŹenca-1.15/test/cs-utf8.ibm852000066400000000000000000000001661222222630600155460ustar00rootroot00000000000000n├ípor po┼ąouchl├Żch ┼żlut├Żch ─Ź├ş┼łan┼» p┼Öehlu┼íil i zu┼Ö├şc├ş ork├ín enca-1.15/test/cs-utf8.iso88592000066400000000000000000000001471222222630600157510ustar00rootroot00000000000000nĂĄpor poĹĽouchlĂ˝ch ĹžlutĂ˝ch číňanĹŻ přehluĹĄil i zuřícĂ­ orkĂĄn enca-1.15/test/dummy-converter.sh000077500000000000000000000000231222222630600170140ustar00rootroot00000000000000#! /bin/sh echo $@ enca-1.15/test/et-s.baltic000066400000000000000000000001201222222630600153430ustar00rootroot00000000000000...dispeteri kohustusetega, luues kgiviljapeenardel ettenhtud veereiimi... enca-1.15/test/et-s.cp1257000066400000000000000000000001211222222630600150270ustar00rootroot00000000000000...dispeteri kohustusetega, luues kgiviljapeenardel ettenhtud veereiimi... enca-1.15/test/et-s.ibm775000066400000000000000000000001211222222630600151200ustar00rootroot00000000000000...dispeteri kohustusetega, luues kgiviljapeenardel ettenhtud veereiimi... enca-1.15/test/et-s.iso885913000066400000000000000000000001201222222630600154010ustar00rootroot00000000000000...dispeteri kohustusetega, luues kgiviljapeenardel ettenhtud veereiimi... enca-1.15/test/et-s.iso88594000066400000000000000000000001201222222630600153210ustar00rootroot00000000000000...dispeteri kohustusetega, luues kgiviljapeenardel ettenhtud veereiimi... enca-1.15/test/et-s.iso88594.qp000066400000000000000000000001341222222630600157450ustar00rootroot00000000000000...dispet=B9eri kohustusetega, luues k=F6=F6giviljapeenardel etten=E4htud v= eere=BEiimi... enca-1.15/test/et-s.macce000066400000000000000000000001201222222630600151550ustar00rootroot00000000000000...dispeteri kohustusetega, luues kgiviljapeenardel ettenhtud veereiimi... enca-1.15/test/et-s.utf8000066400000000000000000000001261222222630600150010ustar00rootroot00000000000000...dispetšeri kohustusetega, luues köögiviljapeenardel ettenähtud veerežiimi... enca-1.15/test/et-utf8.bin000066400000000000000000000001241222222630600153050ustar00rootroot00000000000000dispetšeri kohustusetega, luues köögiviljapeenardel ettenähtud veerežiimi enca-1.15/test/et-utf8.ibm775000066400000000000000000000001451222222630600155520ustar00rootroot00000000000000...dispet┼Īeri kohustusetega, luues k├Č├Čgiviljapeenardel etten├żhtud veere┼Šiimi... enca-1.15/test/et-utf8.iso885913000066400000000000000000000001401222222630600160270ustar00rootroot00000000000000...dispetÅ”eri kohustusetega, luues kƶƶgiviljapeenardel ettenƤhtud veerežiimi... enca-1.15/test/et-utf8.iso88594000066400000000000000000000001371222222630600157550ustar00rootroot00000000000000...dispetÅĄeri kohustusetega, luues kÃļÃļgiviljapeenardel ettenähtud veereÅžiimi... enca-1.15/test/failing-converter.sh000077500000000000000000000000221222222630600172710ustar00rootroot00000000000000#! /bin/sh exit 1 enca-1.15/test/failing-converter2.sh000077500000000000000000000000261222222630600173570ustar00rootroot00000000000000#! /bin/sh kill -9 $$ enca-1.15/test/finish.sh000066400000000000000000000007251222222630600151420ustar00rootroot00000000000000# @(#) $Id: finish.sh,v 1.5 2003/11/17 12:27:39 yeti Exp $ if test -n "$E77"; then exit 77 fi if test -f $TESTNAME.expected; then diff $TESTNAME.expected $TESTNAME.actual || DIE=1 else if test -f $srcdir/$TESTNAME.expected; then diff $srcdir/$TESTNAME.expected $TESTNAME.actual || DIE=1 fi fi if test -z "$DIE"; then rm -f $TESTNAME.actual $TESTNAME.tmp 2>/dev/null fi ls | grep 'core' >/dev/null && DIE=1 rm -f core* 2>/dev/null test -z "$DIE" || exit 1 enca-1.15/test/hr-s.cork000066400000000000000000000001771222222630600150600ustar00rootroot00000000000000...strunih tematskih teajeva radi ostvarenja vre suradnje izmeu nacionalnih arhivskih slubi zemalja jugoistone Europe. enca-1.15/test/hr-s.cp1250000066400000000000000000000002011222222630600150200ustar00rootroot00000000000000...strunih tematskih teajeva radi ostvarenja vre suradnje izmeu nacionalnih arhivskih slubi zemalja jugoistone Europe. enca-1.15/test/hr-s.ibm852000066400000000000000000000002011222222630600151140ustar00rootroot00000000000000...strunih tematskih teajeva radi ostvarenja vre suradnje izmeu nacionalnih arhivskih slubi zemalja jugoistone Europe. enca-1.15/test/hr-s.iso88592000066400000000000000000000001771222222630600153340ustar00rootroot00000000000000...strunih tematskih teajeva radi ostvarenja vre suradnje izmeu nacionalnih arhivskih slubi zemalja jugoistone Europe. enca-1.15/test/hr-s.iso88592.qp000066400000000000000000000002211222222630600157410ustar00rootroot00000000000000...stru=E8nih tematskih te=E8ajeva radi ostvarenja =E8vr=B9=E6e suradnje iz= me=F0u nacionalnih arhivskih slu=BEbi zemalja jugoisto=E8ne Europe. enca-1.15/test/hr-s.macce000066400000000000000000000001771222222630600151720ustar00rootroot00000000000000...strunih tematskih teajeva radi ostvarenja vre suradnje izmedu nacionalnih arhivskih slubi zemalja jugoistone Europe. enca-1.15/test/hr-s.utf8000066400000000000000000000002111222222630600147750ustar00rootroot00000000000000...stručnih tematskih tečajeva radi ostvarenja čvršće suradnje između nacionalnih arhivskih službi zemalja jugoistočne Europe. enca-1.15/test/hr-utf8.cp1250000066400000000000000000000002311222222630600154470ustar00rootroot00000000000000...struÄŤnih tematskih teÄŤajeva radi ostvarenja ÄŤvršće suradnje izmeÄ‘u nacionalnih arhivskih sluĹľbi zemalja jugoistoÄŤne Europe. enca-1.15/test/hr-utf8.ibm852000066400000000000000000000002411222222630600155440ustar00rootroot00000000000000...stru─Źnih tematskih te─Źajeva radi ostvarenja ─Źvr┼í─çe suradnje izme─Ĺu nacionalnih arhivskih slu┼żbi zemalja jugoisto─Źne Europe. enca-1.15/test/hu-s.cork000066400000000000000000000001011222222630600150460ustar00rootroot00000000000000Hajnalonta a kertsz kiltet tz t rzst a ftrre. Vrslenek enca-1.15/test/hu-s.cp1250000066400000000000000000000001021222222630600150230ustar00rootroot00000000000000Hajnalonta a kertsz kiltet tz t rzst a ftrre. Vrslenek enca-1.15/test/hu-s.ibm852000066400000000000000000000001021222222630600151170ustar00rootroot00000000000000Hajnalonta a kertsz kiltet tz t rzst a ftrre. Vrslenek enca-1.15/test/hu-s.iso88592000066400000000000000000000001011222222630600153220ustar00rootroot00000000000000Hajnalonta a kertsz kiltet tz t rzst a ftrre. Vrslenek enca-1.15/test/hu-s.macce000066400000000000000000000001011222222630600151600ustar00rootroot00000000000000Hajnalonta a kertsz kiltet tz t rzst a ftrre. Vrslenek enca-1.15/test/hu-s.macce.qp000066400000000000000000000001271222222630600156070ustar00rootroot00000000000000Hajnalonta a kert=8Esz ki=9Fltet t=92z t=CE r=97zs=87t a f=CEt=8Erre. V=9Ar= =9Aslenek enca-1.15/test/hu-s.utf8000066400000000000000000000001141222222630600150020ustar00rootroot00000000000000Hajnalonta a kertész kiültet tíz tő rózsát a főtérre. Vöröslenek enca-1.15/test/hu-utf8.cork000066400000000000000000000001431222222630600155000ustar00rootroot00000000000000Hajnalonta a kertÃľsz kiÃijltet tÃŋz tÅŚ rÃşzsÃąt a fÅŚtÃľrre. VÃűrÃűslenek‚˙enca-1.15/test/hu-utf8.cp1250000066400000000000000000000001421222222630600154530ustar00rootroot00000000000000Hajnalonta a kertĂ©sz kiĂĽltet tĂ­z tĹ‘ rĂłzsát a fĹ‘tĂ©rre. Vöröslenek enca-1.15/test/hu-utf8.ibm852000066400000000000000000000001541222222630600155520ustar00rootroot00000000000000Hajnalonta a kert├ęsz ki├╝ltet t├şz t┼Ĺ r├│zs├ít a f┼Ĺt├ęrre. V├Âr├Âslenek enca-1.15/test/hu-utf8.macce000066400000000000000000000001531222222630600156130ustar00rootroot00000000000000Hajnalonta a kert√©sz ki√ľltet t√≠z tŇĎ r√≥zs√°t a fŇĎt√©rre. V√∂r√∂slenek enca-1.15/test/lt-s.baltic000066400000000000000000000001151222222630600153560ustar00rootroot00000000000000Kaip prastai, kart nakt ijs pasivaikioti, Dirolamas namo nebegro. enca-1.15/test/lt-s.cp1257000066400000000000000000000001161222222630600150420ustar00rootroot00000000000000Kaip prastai, kart nakt ijs pasivaikioti, Dirolamas namo nebegro. enca-1.15/test/lt-s.ibm775000066400000000000000000000001161222222630600151330ustar00rootroot00000000000000Kaip prastai, kart nakt ijs pasivaikioti, Dirolamas namo nebegro. enca-1.15/test/lt-s.iso885913000066400000000000000000000001151222222630600154140ustar00rootroot00000000000000Kaip prastai, kart nakt ijs pasivaikioti, Dirolamas namo nebegro. enca-1.15/test/lt-s.iso88594000066400000000000000000000001151222222630600153340ustar00rootroot00000000000000Kaip prastai, kart nakt ijs pasivaikioti, Dirolamas namo nebegro. enca-1.15/test/lt-s.macce000066400000000000000000000001151222222630600151700ustar00rootroot00000000000000Kaip prastai, kart nakt ijs pasivaikioti, Dirolamas namo nebegro. enca-1.15/test/lt-s.utf8000066400000000000000000000001311222222630600150040ustar00rootroot00000000000000Kaip įprastai, kartą naktį išėjęs pasivaikščioti, Džirolamas namo nebegrįžo. enca-1.15/test/lt-utf8.ibm775000066400000000000000000000001721222222630600155610ustar00rootroot00000000000000Kaip ─»prastai, kart─ģ nakt─» i┼Ī─Śj─Ös pasivaik┼Ī─Źioti, D┼Širolamas namo nebegr─»┼Šo. enca-1.15/test/lt-utf8.iso88594000066400000000000000000000001561222222630600157650ustar00rootroot00000000000000Kaip įprastai, kartą naktį iÅĄÄ—jęs pasivaikÅĄÄioti, DÅžirolamas namo nebegrįŞo. enca-1.15/test/lt-utf8.macce000066400000000000000000000001541222222630600156170ustar00rootroot00000000000000Kaip ńIprastai, kartńÖ naktńI iҰńójńôs pasivaikҰńćioti, DŇĺirolamas namo nebegrńIŇĺo. enca-1.15/test/lv-s.baltic000066400000000000000000000001071222222630600153610ustar00rootroot00000000000000bet vri, kamr ie saceas, paem duktus - ieliek zrk, paem du enca-1.15/test/lv-s.cp1257000066400000000000000000000001101222222630600150360ustar00rootroot00000000000000bet vri, kamr ie saceas, paem duktus - ieliek zrk, paem du enca-1.15/test/lv-s.ibm775000066400000000000000000000001101222222630600151270ustar00rootroot00000000000000bet vri, kamr ie saceas, paem duktus - ieliek zrk, paem du enca-1.15/test/lv-s.iso885913000066400000000000000000000001071222222630600154170ustar00rootroot00000000000000bet vri, kamr ie saceas, paem duktus - ieliek zrk, paem du enca-1.15/test/lv-s.iso885913.qp000066400000000000000000000001411222222630600160340ustar00rootroot00000000000000bet v=EEri=F2=F0, kam=E7r =F0ie sace=EFas, pa=F2em duk=E2tus - ieliek z=E2r= k=E2, pa=F2em =E2du enca-1.15/test/lv-s.iso88594000066400000000000000000000001071222222630600153370ustar00rootroot00000000000000bet vri, kamr ie saceas, paem duktus - ieliek zrk, paem du enca-1.15/test/lv-s.macce000066400000000000000000000001071222222630600151730ustar00rootroot00000000000000bet vri, kamr ie saceas, paem duktus - ieliek zrk, paem du enca-1.15/test/lv-s.utf8000066400000000000000000000001241222222630600150100ustar00rootroot00000000000000bet vīriņš, kamēr šie saceļas, paņem dukātus - ieliek zārkā, paņem ādu enca-1.15/test/lv-utf8.ibm775000066400000000000000000000001711222222630600155620ustar00rootroot00000000000000bet v─½ri┼å┼Ī, kam─ōr ┼Īie sace─╝as, pa┼åem duk─ütus - ieliek z─ürk─ü, pa┼åem ─üdu enca-1.15/test/lv-utf8.iso88594000066400000000000000000000001531222222630600157640ustar00rootroot00000000000000bet vÄĢriÅ†ÅĄ, kamēr ÅĄie saceÄŧas, paņem dukātus - ieliek zārkā, paņem ādu enca-1.15/test/lv-utf8.macce000066400000000000000000000001501222222630600156150ustar00rootroot00000000000000bet vńęriŇÜҰ, kamńďr Ұie saceńľas, paŇÜem dukńAtus - ieliek zńArkńA, paŇÜem ńAdu enca-1.15/test/none-s.ucs2000066400000000000000000000003501222222630600153150ustar00rootroot00000000000000Daniel Polansk David Ne as Franois Pinard Jan Martnek JiY Polcar Vclav Xkal ;5:A0=4@ 1>:>2>9 8E08; (83>@8= enca-1.15/test/none-s.ucs2le000066400000000000000000000003501222222630600156360ustar00rootroot00000000000000Daniel Polansk David Ne as Franois Pinard Jan Martnek JiY Polcar Vclav Xkal ;5:A0=4@ 1>:>2>9 8E08; (83>@8= enca-1.15/test/none-s.ucs2le.qp000066400000000000000000000007501222222630600162610ustar00rootroot00000000000000D=00a=00n=00i=00e=00l=00 =00P=00o=00l=00a=00n=00s=00k=00=FD=00 =00D=00a=00v=00i=00d=00 =00N=00e=00=0D=01a=00s=00 =00F=00r=00a=00n=00=E7=00o=00i=00s=00 =00P=00i=00n=00a=00r=00d=00 =00J=00a=00n=00 =00M=00a=00r=00t=00=ED=00n=00e=00k=00 =00J=00i=00Y=01=ED=00 =00P=00o=00l=00c=00a=00r=00 =00V=00=E1=00c=00l=00a=00v=00 =00X=01=ED=00k=00a=00l=00 =00=10=04;=045=04:=04A=040=04=3D=044=04@=04 =001=04>=04:=04>=042=04>=049=04 =00=1C=048=04E=040=048=04;=04 =00(=048=043=04>=04@=048=04=3D=04 =00 =00= enca-1.15/test/none-s.ucs4000066400000000000000000000007201222222630600153200ustar00rootroot00000000000000Daniel Polansk David Ne as Franois Pinard Jan Martnek JiY Polcar Vclav Xkal ;5:A0=4@ 1>:>2>9 8E08; (83>@8= enca-1.15/test/none-s.ucs4le000066400000000000000000000007201222222630600156410ustar00rootroot00000000000000Daniel Polansk David Ne as Franois Pinard Jan Martnek JiY Polcar Vclav Xkal ;5:A0=4@ 1>:>2>9 8E08; (83>@8= enca-1.15/test/none-s.utf7000066400000000000000000000003071222222630600153300ustar00rootroot00000000000000Daniel Polansk+AP0 David Ne+AQ0-as Fran+AOc-ois Pinard Jan Mart+AO0-nek Ji+AVkA7Q Polcar V+AOE-clav +AVgA7Q-kal +BBAEOwQ1BDoEQQQwBD0ENARA +BDEEPgQ6BD4EMgQ+BDk +BBwEOARFBDAEOAQ7 +BCgEOAQzBD4EQAQ4BD0 enca-1.15/test/none-s.utf8000066400000000000000000000002321222222630600153260ustar00rootroot00000000000000Daniel Polanský David Nečas François Pinard Jan Martínek Jiří Polcar Václav Říkal Александр боковой Михаил Шигорин enca-1.15/test/none-utf8.messy000066400000000000000000000003031222222630600162230ustar00rootroot00000000000000Daniel PolanskýVáclav Říkal JiříPolcarJan Martínek (Johny)МихаилШигоринАлександр БоковойАлександр КоваленкоFrançois Pinard enca-1.15/test/pl-s.baltic000066400000000000000000000001521222222630600153530ustar00rootroot00000000000000Podejrzewam, e przedmioty robi to ze wzgldw wychowawczych, aby wci nam wypomina nasz niestao. enca-1.15/test/pl-s.baltic.qp000066400000000000000000000002041222222630600157700ustar00rootroot00000000000000Podejrzewam, =FDe przedmioty robi=E6 to ze wzgl=EBd=F3w wychowawczych, aby = wci=E6=FD nam wypomina=E3 nasz=E6 niesta=F0o=FA=E3.=0D enca-1.15/test/pl-s.cork000066400000000000000000000001511222222630600150520ustar00rootroot00000000000000Podejrzewam, e przedmioty robi to ze wzgldw wychowawczych, aby wci nam wypomina nasz niestao. enca-1.15/test/pl-s.cp1250000066400000000000000000000001521222222630600150270ustar00rootroot00000000000000Podejrzewam, e przedmioty robi to ze wzgldw wychowawczych, aby wci nam wypomina nasz niestao. enca-1.15/test/pl-s.ibm852000066400000000000000000000001521222222630600151230ustar00rootroot00000000000000Podejrzewam, e przedmioty robi to ze wzgldw wychowawczych, aby wci nam wypomina nasz niestao. enca-1.15/test/pl-s.iso885913000066400000000000000000000001511222222630600154100ustar00rootroot00000000000000Podejrzewam, e przedmioty robi to ze wzgldw wychowawczych, aby wci nam wypomina nasz niestao. enca-1.15/test/pl-s.iso885916000066400000000000000000000001511222222630600154130ustar00rootroot00000000000000Podejrzewam, e przedmioty robi to ze wzgldw wychowawczych, aby wci nam wypomina nasz niestao. enca-1.15/test/pl-s.iso88592000066400000000000000000000001511222222630600153260ustar00rootroot00000000000000Podejrzewam, e przedmioty robi to ze wzgldw wychowawczych, aby wci nam wypomina nasz niestao. enca-1.15/test/pl-s.utf8000066400000000000000000000001651222222630600150070ustar00rootroot00000000000000Podejrzewam, że przedmioty robią to ze względów wychowawczych, aby wciąż nam wypominać naszą niestałość. enca-1.15/test/pl-utf8.baltic000066400000000000000000000002131222222630600157750ustar00rootroot00000000000000Podejrzewam, że przedmioty robią to ze względów wychowawczych, aby wciąż nam wypominać naszą niestałość. enca-1.15/test/pl-utf8.ibm852000066400000000000000000000002301222222630600155440ustar00rootroot00000000000000Podejrzewam, ┼╝e przedmioty robi─ů to ze wzgl─Öd├│w wychowawczych, aby wci─ů┼╝ nam wypomina─ç nasz─ů niesta┼éo┼Ť─ç. enca-1.15/test/pl-utf8.iso885916000066400000000000000000000002121222222630600160350ustar00rootroot00000000000000Podejrzewam, ĆŒe przedmioty robią to ze względĂłw wychowawczych, aby wciÄ…ĆŒ nam wypominać naszą niestaƂoƛć. enca-1.15/test/ru-s.cp1251000066400000000000000000000000441222222630600150430ustar00rootroot00000000000000 xcode . enca-1.15/test/ru-s.cp866000066400000000000000000000000441222222630600147760ustar00rootroot00000000000000 xcode 㫨. enca-1.15/test/ru-s.iso88595000066400000000000000000000000431222222630600153440ustar00rootroot00000000000000 xcode . enca-1.15/test/ru-s.koi8r000066400000000000000000000000441222222630600151640ustar00rootroot00000000000000 xcode . enca-1.15/test/ru-s.maccyr000066400000000000000000000000431222222630600154050ustar00rootroot00000000000000 xcode . enca-1.15/test/ru-s.maccyr.qp000066400000000000000000000001251222222630600160250ustar00rootroot00000000000000=92=E0=EA =F7=F2=EE =E4=EB=DF =EC=E5=ED=DF =EF=EE=EA=E0 xcode =F0=F3=EB=E8= =F2.=0D= enca-1.15/test/ru-s.utf8000066400000000000000000000000721222222630600150170ustar00rootroot00000000000000Так что для меня пока xcode рулит. enca-1.15/test/ru-utf8.cp866000066400000000000000000000002121222222630600154170ustar00rootroot00000000000000╨в╨░╨║ ╤З╤В╨╛ ╨┤╨╗╤П ╨╝╨╡╨╜╤П ╨┐╨╛╨║╨░ xcode ╤А╤Г╨╗╨╕╤В. enca-1.15/test/ru-utf8.koi8r000066400000000000000000000001731222222630600156130ustar00rootroot00000000000000п╒п╟п╨ я┤я┌п╬ п╢п╩я▐ п╪п╣п╫я▐ п©п╬п╨п╟ xcode я─я┐п╩п╦я┌. enca-1.15/test/ru-utf8.maccyr000066400000000000000000000001751222222630600160370ustar00rootroot00000000000000–¢–∞–Ї —З—В–Њ –і–ї—П –Љ–µ–љ—П –њ–Њ–Ї–∞ xcode —А—Г–ї–Є—В. enca-1.15/test/setup.sh000066400000000000000000000013311222222630600150140ustar00rootroot00000000000000# @(#) $Id: setup.sh,v 1.8 2005/11/24 11:42:47 yeti Exp $ ENCA=$top_builddir/src/enca TEST_LANGUAGES="be bg cs et 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_hr="ibm852 cp1250" TEST_PAIR_hu="cp1250 ibm852" TEST_PAIR_lt="iso88594 baltic" TEST_PAIR_lv="ibm775 cp1257" TEST_PAIR_pl="iso88592 iso885916" TEST_PAIR_ru="koi8r cp866" TEST_PAIR_sk="keybcs2 koi8cs2" TEST_PAIR_sl="cp1250 ibm852" TEST_PAIR_uk="koi8u cp1125" # Only lucky people have basename TESTNAME=`echo $0 | sed -e 's/.*\///' -e 's/.sh$//'` DIE= E77= cat $TESTNAME.actual rm -f core* 2>/dev/null enca-1.15/test/simtable.c000066400000000000000000000032521222222630600152700ustar00rootroot00000000000000/* @(#) $Id: simtable.c,v 1.11 2003/11/17 12:27:39 yeti Exp $ */ #include #include #include #include "enca.h" /* To cheat... */ #include "internal.h" int myargc; char **myargv; static void prl(const EncaLanguageInfo *l, const char *hooks) { double *m; size_t i, j; if (myargc > 1) { i = 1; while (i < myargc && strcmp(myargv[i], l->name)) i++; if (i == myargc) return; } printf("\n==\x1b[1m%s\x1b[m==\n", l->name); m = enca_get_charset_similarity_matrix(l); for (i = 0; i < l->ncharsets; i++) { for (j = 0; j < l->ncharsets; j++) { double q = 1000.0*m[i*l->ncharsets + j]; if (i == j) printf("\x1b[36m"); else if (q > 500) printf("\x1b[1;31m"); else if (q > 333) printf("\x1b[31m"); else if (q > 200) printf("\x1b[34m"); else if (q < 50) printf("\x1b[30m"); printf("%4.0f ", q); printf("\x1b[m"); } printf(" %s\n", l->csnames[i]); } printf("Hooks: \x1b[32m%s\x1b[m\n", hooks); } int main(int argc, char *argv[]) { myargc = argc; myargv = argv; prl(&ENCA_LANGUAGE_BE, "macwin isokoi 855866"); prl(&ENCA_LANGUAGE_BG, "1251mac"); prl(&ENCA_LANGUAGE_CS, "isowin 852kam"); prl(&ENCA_LANGUAGE_ET, ""); prl(&ENCA_LANGUAGE_HR, "isowin"); prl(&ENCA_LANGUAGE_HU, "isocork isowin[XXX]"); prl(&ENCA_LANGUAGE_LT, "winbalt lat4balt iso13win[XXX]"); prl(&ENCA_LANGUAGE_LV, "winbalt iso13win[XXX]"); prl(&ENCA_LANGUAGE_PL, "isowin balt13"); prl(&ENCA_LANGUAGE_RU, "macwin"); prl(&ENCA_LANGUAGE_SK, "isowin 852kam"); prl(&ENCA_LANGUAGE_SL, ""); prl(&ENCA_LANGUAGE_UK, "macwin isokoi ibm1125"); return 0; } enca-1.15/test/sk-s.cork000066400000000000000000000002071222222630600150560ustar00rootroot00000000000000Nevedel vbec ni. Vedel iba to, e ak chce osta naive mus sa stara o to, aby naive neostali t, ktor ho chc o ivot pripravi. enca-1.15/test/sk-s.cp1250000066400000000000000000000002101222222630600150240ustar00rootroot00000000000000Nevedel vbec ni. Vedel iba to, e ak chce osta naive mus sa stara o to, aby naive neostali t, ktor ho chc o ivot pripravi. enca-1.15/test/sk-s.cp1250.qp000066400000000000000000000002501222222630600154470ustar00rootroot00000000000000Nevedel v=F4bec ni=E8. Vedel iba to, =9Ee ak chce osta=9D na=9Eive mus=ED s= a stara=9D o to, aby na=9Eive neostali t=ED, ktor=ED ho chc=FA o =9Eivot pr= ipravi=9D.=0D enca-1.15/test/sk-s.ibm852000066400000000000000000000002101222222630600151200ustar00rootroot00000000000000Nevedel vbec ni. Vedel iba to, e ak chce osta naive mus sa stara o to, aby naive neostali t, ktor ho chc o ivot pripravi. enca-1.15/test/sk-s.iso88592000066400000000000000000000002071222222630600153320ustar00rootroot00000000000000Nevedel vbec ni. Vedel iba to, e ak chce osta naive mus sa stara o to, aby naive neostali t, ktor ho chc o ivot pripravi. enca-1.15/test/sk-s.keybcs2000066400000000000000000000002101222222630600154540ustar00rootroot00000000000000Nevedel vbec ni. Vedel iba to, e ak chce osta naive mus sa stara o to, aby naive neostali t, ktor ho chc o ivot pripravi. enca-1.15/test/sk-s.koi8cs2000066400000000000000000000002101222222630600153740ustar00rootroot00000000000000Nevedel vbec ni. Vedel iba to, e ak chce osta naive mus sa stara o to, aby naive neostali t, ktor ho chc o ivot pripravi. enca-1.15/test/sk-s.macce000066400000000000000000000002071222222630600151700ustar00rootroot00000000000000Nevedel vbec ni. Vedel iba to, e ak chce osta naive mus sa stara o to, aby naive neostali t, ktor ho chc o ivot pripravi. enca-1.15/test/sk-s.utf8000066400000000000000000000002251222222630600150060ustar00rootroot00000000000000Nevedel vôbec nič. Vedel iba to, že ak chce ostať nažive musí sa starať o to, aby nažive neostali tí, ktorí ho chcú o život pripraviť. enca-1.15/test/sk-utf8.cp1250000066400000000000000000000002561222222630600154620ustar00rootroot00000000000000Nevedel vĂ´bec niÄŤ. Vedel iba to, Ĺľe ak chce ostaĹĄ naĹľive musĂ­ sa staraĹĄ o to, aby naĹľive neostali tĂ­, ktorĂ­ ho chcĂş o Ĺľivot pripraviĹĄ. enca-1.15/test/sk-utf8.keybcs2000066400000000000000000000003021222222630600161020ustar00rootroot00000000000000Nevedel v├┤bec ni─ĺ. Vedel iba to, ┼╛e ak chce osta┼Ň na┼╛ive mus├§ sa stara┼Ň o to, aby na┼╛ive neostali t├§, ktor├§ ho chc├║ o ┼╛ivot pripravi┼Ň. enca-1.15/test/sl-s.cork000066400000000000000000000001121222222630600150520ustar00rootroot00000000000000Ko je zazoril jemen in je priel as konje, so dolinci eli e penico. enca-1.15/test/sl-s.cp1250000066400000000000000000000001131222222630600150270ustar00rootroot00000000000000Ko je zazoril jemen in je priel as konje, so dolinci eli e penico. enca-1.15/test/sl-s.ibm852000066400000000000000000000001131222222630600151230ustar00rootroot00000000000000Ko je zazoril jemen in je priel as konje, so dolinci eli e penico. enca-1.15/test/sl-s.ibm852.qp000066400000000000000000000001321222222630600155430ustar00rootroot00000000000000Ko je zazoril je=9Fmen in je pri=E7el =9Fas ko=E7nje, so dolinci =A7eli =A7= e p=E7enico. enca-1.15/test/sl-s.iso88592000066400000000000000000000001121222222630600153260ustar00rootroot00000000000000Ko je zazoril jemen in je priel as konje, so dolinci eli e penico. enca-1.15/test/sl-s.macce000066400000000000000000000001121222222630600151640ustar00rootroot00000000000000Ko je zazoril jemen in je priel as konje, so dolinci eli e penico. enca-1.15/test/sl-s.utf8000066400000000000000000000001211222222630600150020ustar00rootroot00000000000000Ko je zazoril ječmen in je prišel čas košnje, so dolinci želi že pšenico. enca-1.15/test/sl-utf8.cork000066400000000000000000000001401222222630600154770ustar00rootroot00000000000000Ko je zazoril jeÄŊmen in je priÅąel ÄŊas koÅąnje, so dolinci Å¿eli Å¿e pÅąenico.˙enca-1.15/test/sl-utf8.ibm852000066400000000000000000000001461222222630600155550ustar00rootroot00000000000000Ko je zazoril je─Źmen in je pri┼íel ─Źas ko┼ínje, so dolinci ┼żeli ┼że p┼íenico. enca-1.15/test/sl-utf8.iso88592000066400000000000000000000001371222222630600157610ustar00rootroot00000000000000Ko je zazoril ječmen in je priĹĄel čas koĹĄnje, so dolinci Ĺželi Ĺže pĹĄenico. enca-1.15/test/sl-utf8.macce000066400000000000000000000001371222222630600156170ustar00rootroot00000000000000Ko je zazoril jeńćmen in je priҰel ńćas koҰnje, so dolinci Ňĺeli Ňĺe pҰenico. enca-1.15/test/test-ENCAOPT.sh000077500000000000000000000010221222222630600157220ustar00rootroot00000000000000#! /bin/sh # @(#) $Id: test-ENCAOPT.sh,v 1.5 2003/11/17 12:27:39 yeti Exp $ # Purpose: test whether ENCAOPT works. . $srcdir/setup.sh DATATESTNAME=test-guess-short rm -f $TESTNAME.expected 2>/dev/null ln -s $srcdir/$DATATESTNAME.expected $TESTNAME.expected for l in $ALL_TEST_LANGUAGES; do ENCAOPT="-L $l -p -e" # This is necessary when $ENCA is in fact a libtool script export ENCAOPT $ENCA $srcdir/$l-s.* | sed -e "s#^$srcdir/##" >>$TESTNAME.actual || DIE=1 done . $srcdir/finish.sh rm -f $TESTNAME.expected 2>/dev/null enca-1.15/test/test-aliases.sh000077500000000000000000000004301222222630600162540ustar00rootroot00000000000000#! /bin/sh # @(#) $Id: test-aliases.sh,v 1.5 2003/11/17 12:27:39 yeti Exp $ # Purpose: check for iconv charsets, namely without libiconv. Enca used to # keep the @...@ in alias list. . $srcdir/setup.sh $ENCA --name aliases --list charsets | grep '@' && DIE=1 . $srcdir/finish.sh enca-1.15/test/test-convert-64.sh000077500000000000000000000021711222222630600165460ustar00rootroot00000000000000#! /bin/sh # @(#) $Id: test-convert-64.sh,v 1.6 2005/11/24 11:42:47 yeti Exp $ # Purpose: test whether built-in converter works. We need files larger than # 64kb, because enca used to have problems with them (the generated big samples # are between 100k and 600k, depending on original small sample size). . $srcdir/setup.sh for l in $TEST_LANGUAGES; do # Create big files form the fragments. lname=TEST_PAIR_$l # Is this POSIX? But even ash supports it. eval lname=$`echo $lname` if test "x$lname" != x; then src= for c in $lname; do cp -f $srcdir/$l-s.$c $l-big.$c for i in 1 2 3 4 5 6; do cat $l-big.$c $l-big.$c $l-big.$c $l-big.$c >test.tmp mv -f test.tmp $l-big.$c done if test -z "$src"; then src=$c else tgt=$c fi done # The test itself. DIE_THIS=0 $ENCA -L $l -x $tgt $l-big.$src || DIE_THIS=1 diff $l-big.$src $l-big.$tgt >/dev/null || DIE_THIS=1 if test "$DIE_THIS" = "1"; then echo "Conversion $l: $src -> $tgt failed." DIE=1 else rm -f $l-big.$src $l-big.$tgt fi fi done . $srcdir/finish.sh enca-1.15/test/test-convert-filter.sh000077500000000000000000000020301222222630600175740ustar00rootroot00000000000000#! /bin/sh # @(#) $Id: test-convert-filter.sh,v 1.6 2005/11/24 11:42:47 yeti Exp $ # Purpose: test whether built-in converter works on stdin (see test-convert-64 # for details). . $srcdir/setup.sh for l in $TEST_LANGUAGES; do # Create big files form the fragments. lname=TEST_PAIR_$l # Is this POSIX? But even ash supports it. eval lname=$`echo $lname` if test "x$lname" != x; then src= for c in $lname; do cp -f $srcdir/$l-s.$c $l-big.$c for i in 1 2 3 4 5 6; do cat $l-big.$c $l-big.$c $l-big.$c $l-big.$c >test.tmp mv -f test.tmp $l-big.$c done if test -z "$src"; then src=$c else tgt=$c fi done # The test itself. DIE_THIS=0 $ENCA -L $l -x $tgt <$l-big.$src >$THISTEST.tmp || DIE_THIS=1 diff $THISTEST.tmp $l-big.$tgt >/dev/null || DIE_THIS=1 if test "$DIE_THIS" = "1"; then echo "Conversion $l: $src -> $tgt failed." DIE=1 else rm -f $l-big.$src $l-big.$tgt $THISTEST.tmp fi fi done . $srcdir/finish.sh enca-1.15/test/test-convlist.sh000077500000000000000000000013721222222630600165020ustar00rootroot00000000000000#! /bin/sh # @(#) $Id: test-convlist.sh,v 1.2 2003/11/17 12:27:39 yeti Exp $ # Purpose: check whether --list converters and --version are consistent . $srcdir/setup.sh rm -f $TESTNAME.expected 2>/dev/null $ENCA --list converters | grep "^librecode$" >>$TESTNAME.expected if $ENCA --version | grep " +librecode-interface " >/dev/null; then echo librecode >>$TESTNAME.actual fi $ENCA --list converters | grep "^iconv$" >>$TESTNAME.expected if $ENCA --version | grep " +iconv-interface " >/dev/null; then echo iconv >>$TESTNAME.actual fi $ENCA --list converters | grep "^extern$" >>$TESTNAME.expected if $ENCA --version | grep " +external-converter " >/dev/null; then echo extern >>$TESTNAME.actual fi . $srcdir/finish.sh rm -f $TESTNAME.expected 2>/dev/null enca-1.15/test/test-default-cs.sh000077500000000000000000000015621222222630600166710ustar00rootroot00000000000000#! /bin/sh # @(#) $Id: test-default-cs.sh,v 1.8 2005/11/24 11:42:47 yeti Exp $ # Purpose: test whether DEFAULT_CHARSET works. . $srcdir/setup.sh for l in $TEST_LANGUAGES; do lname=TEST_PAIR_$l # Is this POSIX? But even ash supports it. eval lname=$`echo $lname` if test "x$lname" != x; then src= for c in $lname; do if test -z "$src"; then src=$c else tgt=$c fi done cat $srcdir/$l-s.$src >$TESTNAME-$l.tmp DEFAULT_CHARSET=$tgt # This is necessary when $ENCA is in fact a libtool script export DEFAULT_CHARSET DIE_THIS=0 $ENCA -c -L $l $TESTNAME-$l.tmp || DIE=1 diff $TESTNAME-$l.tmp $srcdir/$l-s.$tgt >/dev/null || DIE_THIS=1 if test "$DIE_THIS" = "1"; then echo "Conversion $l: $src -> $tgt failed." DIE=1 else rm -f $TESTNAME-$l.tmp fi fi done . $srcdir/finish.sh enca-1.15/test/test-empty.sh000077500000000000000000000006021222222630600157720ustar00rootroot00000000000000#! /bin/sh # @(#) $Id: test-empty.sh,v 1.4 2003/11/17 12:27:39 yeti Exp $ # Purpose: check how enca reacts on various incorrect inputs . $srcdir/setup.sh # These should succeede $ENCA -L cs -x koi8cs2 /dev/null 2>&1 || DIE=1 $ENCA -L ru -x anoldoak /dev/null 2>&1 || DIE=1 # These should fail. $ENCA -L pl /dev/null 2>&1 && DIE=1 . $srcdir/finish.sh enca-1.15/test/test-errors.sh000077500000000000000000000014711222222630600161550ustar00rootroot00000000000000#! /bin/sh # @(#) $Id: test-errors.sh,v 1.6 2003/11/17 12:27:39 yeti Exp $ # Purpose: check how enca reacts on various incorrect inputs . $srcdir/setup.sh TEST_TEXT=$srcdir/cs-s.iso88592 LC_CTYPE= LC_COLLATE= LC_MESSAGES= LC_ALL= LANG= # This is necessary when $ENCA is in fact a libtool script export LC_CTYPE LC_ALL LC_COLLATE LC_MESSAGES LANG # These should succeede # If they set some options, they should keep defaults. $ENCA -L cs --name puskin >/dev/null 2>/dev/null <$TEST_TEXT || DIE=1 $ENCA -L cs -C gogol >/dev/null 2>/dev/null <$TEST_TEXT || DIE=1 # These should fail. $ENCA -L bulgakov >/dev/null 2>/dev/null <$TEST_TEXT && DIE=1 $ENCA -L none dostojevskij 2>/dev/null && DIE=1 touch zombie chmod 000 zombie $ENCA -L none zombie 2>/dev/null && DIE=1 chmod 700 zombie rm -f zombie 2>/dev/null . $srcdir/finish.sh enca-1.15/test/test-external.expected000066400000000000000000000000471222222630600176450ustar00rootroot00000000000000ISO-8859-2/LF CP1250 test-external.tmp enca-1.15/test/test-external.sh000077500000000000000000000017751222222630600164720ustar00rootroot00000000000000#! /bin/sh # @(#) $Id: test-external.sh,v 1.4 2003/11/17 12:27:39 yeti Exp $ # Purpose: test whether external converter is executed with correct arguments, # whether enca fails when it cannot find it iff there's something to convert, # whether converter errors are correctly propagated . $srcdir/setup.sh if $ENCA --list converters | grep '^extern$' >/dev/null; then TEST_TEXT=$srcdir/cs-s.iso88592 cat $TEST_TEXT >$TESTNAME.tmp OPTS="-L cs -x 1250" $ENCA -E $srcdir/dummy-converter.sh $OPTS -C extern $TESTNAME.tmp >>$TESTNAME.actual || DIE=1 $ENCA -E tolstoj-mumble-mumble $OPTS -C built-in <$TEST_TEXT >/dev/null || DIE=1 $ENCA -E tolstoj-mumble-mumble $OPTS -C extern <$TEST_TEXT >/dev/null 2>/dev/null && DIE=1 $ENCA -E '' $OPTS -C extern <$TEST_TEXT >/dev/null 2>/dev/null && DIE=1 $ENCA -E $srcdir/failing-converter.sh $OPTS -C extern $TESTNAME.tmp 2>/dev/null && DIE=1 $ENCA -E $srcdir/failing-converter2.sh $OPTS -C extern $TESTNAME.tmp 2>/dev/null && DIE=1 else E77=1 fi . $srcdir/finish.sh enca-1.15/test/test-guess-short.expected000066400000000000000000000046141222222630600203120ustar00rootroot00000000000000be-s.cp1251: CP1251 be-s.ibm855: IBM855 be-s.ibm866: IBM866 be-s.iso88595: ISO-8859-5 be-s.koi8uni: KOI8-UNI be-s.maccyr: maccyr be-s.utf8: UTF-8/CRLF bg-s.cp1251: CP1251 bg-s.cp1251.qp: CP1251/LF/qp bg-s.ecma113: ECMA-113 bg-s.ibm855: IBM855 bg-s.iso88595: ISO-8859-5 bg-s.maccyr: maccyr bg-s.utf8: UTF-8/CRLF cs-s.cork: CORK/LF cs-s.cp1250: CP1250 cs-s.ibm852: IBM852 cs-s.ibm852.qp: IBM852/qp cs-s.iso88592: ISO-8859-2 cs-s.keybcs2: KEYBCS2 cs-s.koi8cs2: KOI-8_CS_2 cs-s.macce: macce cs-s.utf8: UTF-8/CRLF et-s.baltic: baltic et-s.cp1257: CP1257 et-s.ibm775: IBM775 et-s.iso885913: ISO-8859-13 et-s.iso88594: ISO-8859-4 et-s.iso88594.qp: ISO-8859-4/qp et-s.macce: macce et-s.utf8: UTF-8/CRLF hr-s.cork: CORK/LF hr-s.cp1250: CP1250 hr-s.ibm852: IBM852 hr-s.iso88592: ISO-8859-2 hr-s.iso88592.qp: ISO-8859-2/qp hr-s.macce: macce hr-s.utf8: UTF-8/CRLF hu-s.cork: CORK/LF hu-s.cp1250: CP1250 hu-s.ibm852: IBM852 hu-s.iso88592: ISO-8859-2 hu-s.macce: macce hu-s.macce.qp: macce/LF/qp hu-s.utf8: UTF-8/CRLF lt-s.baltic: baltic lt-s.cp1257: CP1257 lt-s.ibm775: IBM775 lt-s.iso885913: ISO-8859-13 lt-s.iso88594: ISO-8859-4 lt-s.macce: macce lt-s.utf8: UTF-8/CRLF lv-s.baltic: baltic lv-s.cp1257: CP1257 lv-s.ibm775: IBM775 lv-s.iso885913: ISO-8859-13 lv-s.iso885913.qp: ISO-8859-13/qp lv-s.iso88594: ISO-8859-4 lv-s.macce: macce lv-s.utf8: UTF-8/CRLF pl-s.baltic: baltic/CRLF pl-s.baltic.qp: baltic/CRLF/qp pl-s.cork: CORK/LF pl-s.cp1250: CP1250 pl-s.ibm852: IBM852 pl-s.iso885913: ISO-8859-13 pl-s.iso885916: ISO-8859-16 pl-s.iso88592: ISO-8859-2 pl-s.utf8: UTF-8/CRLF ru-s.cp1251: CP1251 ru-s.cp866: IBM866 ru-s.iso88595: ISO-8859-5 ru-s.koi8r: KOI8-R ru-s.maccyr: maccyr ru-s.maccyr.qp: maccyr/qp ru-s.utf8: UTF-8/CRLF sk-s.cork: CORK/LF sk-s.cp1250: CP1250 sk-s.cp1250.qp: CP1250/qp sk-s.ibm852: IBM852 sk-s.iso88592: ISO-8859-2 sk-s.keybcs2: KEYBCS2 sk-s.koi8cs2: KOI-8_CS_2 sk-s.macce: macce sk-s.utf8: UTF-8/CRLF sl-s.cork: CORK/LF sl-s.cp1250: CP1250 sl-s.ibm852: IBM852 sl-s.ibm852.qp: IBM852/LF/qp sl-s.iso88592: ISO-8859-2 sl-s.macce: macce sl-s.utf8: UTF-8 uk-s.cp1125: CP1125 uk-s.cp1251: CP1251 uk-s.ibm855: IBM855 uk-s.iso88595: ISO-8859-5 uk-s.koi8u: KOI8-U uk-s.maccyr: maccyr uk-s.utf8: UTF-8/CRLF zh-s.big5: BIG5 zh-s.gbk: GBK zh-s.hz: HZ zh-s.utf8: UTF-8 none-s.ucs2: UCS-2/LF none-s.ucs2le: UCS-2/LF/21 none-s.ucs2le.qp: UCS-2/LF/21/qp none-s.ucs4: UCS-4/LF none-s.ucs4le: UCS-4/LF/4321 none-s.utf7: UTF-7/LF none-s.utf8: UTF-8 enca-1.15/test/test-guess-short.sh000077500000000000000000000004611222222630600171220ustar00rootroot00000000000000#! /bin/sh # @(#) $Id: test-guess-short.sh,v 1.6 2003/11/17 12:27:40 yeti Exp $ # Purpose: test charset recognition on tiny text fragments. . $srcdir/setup.sh for l in $ALL_TEST_LANGUAGES; do $ENCA -p -e -L $l $srcdir/$l-s.* | sed -e "s#^$srcdir/##" >>$TESTNAME.actual || DIE=1 done . $srcdir/finish.sh enca-1.15/test/test-guess-stdin.sh000077500000000000000000000010351222222630600171020ustar00rootroot00000000000000#! /bin/sh # @(#) $Id: test-guess-stdin.sh,v 1.5 2003/11/17 12:27:40 yeti Exp $ # Purpose: test charset recognition of samples coming from stdin. . $srcdir/setup.sh DATATESTNAME=test-guess-short rm -f $TESTNAME.expected 2>/dev/null ln -s $srcdir/$DATATESTNAME.expected $TESTNAME.expected for l in $ALL_TEST_LANGUAGES; do for f in $srcdir/$l-s.*; do sf=`echo $f | sed -e "s#^$srcdir/##"` x="$sf: "`$ENCA -P -e -L $l <$f` || DIE=1 echo "$x" >>$TESTNAME.actual done done . $srcdir/finish.sh rm -f $TESTNAME.expected 2>/dev/null enca-1.15/test/test-guess-utf8.expected000066400000000000000000000115071222222630600200400ustar00rootroot00000000000000be-utf8.ibm855: Universal transformation format 8 bits; UTF-8 Doubly-encoded to UTF-8 from IBM855 be-utf8.iso88595: Universal transformation format 8 bits; UTF-8 Doubly-encoded to UTF-8 from ISO-8859-5 bg-utf8.bin: Universal transformation format 8 bits; UTF-8 Surrounded by/intermixed with non-text data bg-utf8.cp1251: Universal transformation format 8 bits; UTF-8 Doubly-encoded to UTF-8 from CP1251 bg-utf8.ecma113: Universal transformation format 8 bits; UTF-8 Doubly-encoded to UTF-8 from ECMA-113 bg-utf8.ibm855: Universal transformation format 8 bits; UTF-8 Doubly-encoded to UTF-8 from IBM855 bg-utf8.iso88595: Universal transformation format 8 bits; UTF-8 Doubly-encoded to UTF-8 from ISO-8859-5 bg-utf8.maccyr: Universal transformation format 8 bits; UTF-8 Doubly-encoded to UTF-8 from maccyr cs-utf8.bin: Universal transformation format 8 bits; UTF-8 Surrounded by/intermixed with non-text data cs-utf8.cork: Universal transformation format 8 bits; UTF-8 Doubly-encoded to UTF-8 from CORK cs-utf8.ibm852: Universal transformation format 8 bits; UTF-8 Doubly-encoded to UTF-8 from one of: IBM852 KEYBCS2 cs-utf8.iso88592: Universal transformation format 8 bits; UTF-8 Doubly-encoded to UTF-8 from one of: ISO-8859-2 CP1250 et-utf8.bin: Universal transformation format 8 bits; UTF-8 Surrounded by/intermixed with non-text data et-utf8.ibm775: Universal transformation format 8 bits; UTF-8 CRLF line terminators Doubly-encoded to UTF-8 from IBM775 et-utf8.iso885913: Universal transformation format 8 bits; UTF-8 Doubly-encoded to UTF-8 from one of: CP1257 ISO-8859-13 baltic et-utf8.iso88594: Universal transformation format 8 bits; UTF-8 Doubly-encoded to UTF-8 from ISO-8859-4 hr-utf8.cp1250: Universal transformation format 8 bits; UTF-8 Doubly-encoded to UTF-8 from one of: CP1250 ISO-8859-2 hr-utf8.ibm852: Universal transformation format 8 bits; UTF-8 CRLF line terminators Doubly-encoded to UTF-8 from IBM852 hu-utf8.cork: Universal transformation format 8 bits; UTF-8 Doubly-encoded to UTF-8 from CORK hu-utf8.cp1250: Universal transformation format 8 bits; UTF-8 CRLF line terminators Doubly-encoded to UTF-8 from one of: ISO-8859-2 CP1250 hu-utf8.ibm852: Universal transformation format 8 bits; UTF-8 CRLF line terminators Doubly-encoded to UTF-8 from IBM852 hu-utf8.macce: Universal transformation format 8 bits; UTF-8 CR line terminators Doubly-encoded to UTF-8 from macce lt-utf8.ibm775: Universal transformation format 8 bits; UTF-8 CRLF line terminators Doubly-encoded to UTF-8 from IBM775 lt-utf8.iso88594: Universal transformation format 8 bits; UTF-8 Doubly-encoded to UTF-8 from one of: CP1257 ISO-8859-4 ISO-8859-13 baltic lt-utf8.macce: Universal transformation format 8 bits; UTF-8 CRLF line terminators Doubly-encoded to UTF-8 from macce lv-utf8.ibm775: Universal transformation format 8 bits; UTF-8 CRLF line terminators Doubly-encoded to UTF-8 from IBM775 lv-utf8.iso88594: Universal transformation format 8 bits; UTF-8 Doubly-encoded to UTF-8 from one of: CP1257 ISO-8859-4 ISO-8859-13 baltic lv-utf8.macce: Universal transformation format 8 bits; UTF-8 CRLF line terminators Doubly-encoded to UTF-8 from macce pl-utf8.baltic: Universal transformation format 8 bits; UTF-8 CRLF line terminators Doubly-encoded to UTF-8 from one of: ISO-8859-13 baltic CORK pl-utf8.ibm852: Universal transformation format 8 bits; UTF-8 Doubly-encoded to UTF-8 from IBM852 pl-utf8.iso885916: Universal transformation format 8 bits; UTF-8 Doubly-encoded to UTF-8 from ISO-8859-16 ru-utf8.cp866: Universal transformation format 8 bits; UTF-8 CRLF line terminators Doubly-encoded to UTF-8 from IBM866 ru-utf8.koi8r: Universal transformation format 8 bits; UTF-8 CRLF line terminators Doubly-encoded to UTF-8 from KOI8-R ru-utf8.maccyr: Universal transformation format 8 bits; UTF-8 CR line terminators Doubly-encoded to UTF-8 from maccyr sk-utf8.cp1250: Universal transformation format 8 bits; UTF-8 Doubly-encoded to UTF-8 from one of: CP1250 ISO-8859-2 sk-utf8.keybcs2: Universal transformation format 8 bits; UTF-8 CRLF line terminators Doubly-encoded to UTF-8 from one of: IBM852 KEYBCS2 sl-utf8.cork: Universal transformation format 8 bits; UTF-8 Doubly-encoded to UTF-8 from CORK sl-utf8.ibm852: Universal transformation format 8 bits; UTF-8 Doubly-encoded to UTF-8 from IBM852 sl-utf8.iso88592: Universal transformation format 8 bits; UTF-8 Doubly-encoded to UTF-8 from one of: ISO-8859-2 CP1250 sl-utf8.macce: Universal transformation format 8 bits; UTF-8 Doubly-encoded to UTF-8 from macce uk-utf8.bin: Universal transformation format 8 bits; UTF-8 Surrounded by/intermixed with non-text data uk-utf8.cp1251: Universal transformation format 8 bits; UTF-8 Doubly-encoded to UTF-8 from CP1251 none-utf8.messy: Universal transformation format 8 bits; UTF-8 Surrounded by/intermixed with non-text data enca-1.15/test/test-guess-utf8.sh000077500000000000000000000005561222222630600166560ustar00rootroot00000000000000#! /bin/sh # @(#) $Id: test-guess-utf8.sh,v 1.5 2005/11/24 11:42:47 yeti Exp $ # Purpose: various UTF-8 variant recognition. . $srcdir/setup.sh for l in $ALL_TEST_LANGUAGES; do x=`ls $srcdir/$l-utf8.* 2>/dev/null` if test "x$x" != x; then $ENCA -p -f -L $l $srcdir/$l-utf8.* | sed -e "s#^$srcdir/##" >>$TESTNAME.actual || DIE=1 fi done . $srcdir/finish.sh enca-1.15/test/test-iconv.sh000077500000000000000000000025441222222630600157610ustar00rootroot00000000000000#! /bin/sh # @(#) $Id: test-iconv.sh,v 1.4 2003/11/17 12:27:40 yeti Exp $ # Purpose: test whether libiconv interface works. # FIXME: this may fail when the interface works but libiconv is broken! . $srcdir/setup.sh if $ENCA --list converters | grep '^iconv$' >/dev/null; then TEST_TEXT=$srcdir/cs-s.iso88592 OPTS="-L cs -C iconv" # File cp $TEST_TEXT $TESTNAME.actual $ENCA $OPTS -x UTF-8 $TESTNAME.actual || DIE=1 $ENCA -L none $TESTNAME.actual | grep UTF-8 >/dev/null || DIE=1 $ENCA $OPTS -x ISO-8859-2 $TESTNAME.actual || DIE=1 diff $TEST_TEXT $TESTNAME.actual || DIE=1 # Pipe cp $TEST_TEXT $TESTNAME.actual $ENCA $OPTS -x UTF-8 <$TESTNAME.actual >$TESTNAME.tmp || DIE=1 $ENCA -L none $TESTNAME.tmp | grep UTF-8 >/dev/null || DIE=1 $ENCA $OPTS -x ISO-8859-2 <$TESTNAME.tmp >$TESTNAME.actual || DIE=1 diff $TEST_TEXT $TESTNAME.actual || DIE=1 # Failures cp $TEST_TEXT $TESTNAME.actual $ENCA $OPTS -x solzenicyn $TESTNAME.actual 2>/dev/null && DIE=1 diff $TEST_TEXT $TESTNAME.actual || DIE=1 # One copy doesn't contain enough characters to overweight the noise cat $TESTNAME.tmp $TESTNAME.tmp $TESTNAME.tmp >$TESTNAME.actual echo '' >>$TESTNAME.actual cat $TESTNAME.actual >$TESTNAME.tmp $ENCA $OPTS -x ISO-8859-2 $TESTNAME.tmp 2>/dev/null && DIE=1 diff $TESTNAME.tmp $TESTNAME.actual || DIE=1 else E77=1 fi . $srcdir/finish.sh enca-1.15/test/test-lists.sh000077500000000000000000000005011222222630600157700ustar00rootroot00000000000000#! /bin/sh # @(#) $Id: test-lists.sh,v 1.5 2003/11/17 12:27:40 yeti Exp $ # Purpose: check whether enca can list all the lists. It used to crash ;-) . $srcdir/setup.sh $ENCA --list lists >$TESTNAME.actual || DIE=1 for l in `$ENCA --list lists`; do $ENCA --list $l >>$TESTNAME.actual || DIE=1 done . $srcdir/finish.sh enca-1.15/test/test-long-texts.sh000077500000000000000000000012231222222630600167400ustar00rootroot00000000000000#! /bin/sh # @(#) $Id: test-long-texts.sh,v 1.5 2003/11/17 12:27:40 yeti Exp $ # Purpose: check whether enca correctly prints license, help, version. . $srcdir/setup.sh $ENCA --version >$TESTNAME.actual || DIE=1 version=`grep '^AC_INIT' $top_srcdir/configure.ac | sed -e 's/AC_INIT(Enca, \([0-9.]*\).*/\1/' -e 's/\./\\./'` grep '^enca '$version $TESTNAME.actual >/dev/null || DIE=1 $ENCA --license >$TESTNAME.actual || DIE=1 diff $top_srcdir/COPYING $TESTNAME.actual || DIE=1 $ENCA --help >$TESTNAME.actual || DIE=1 diff $top_builddir/src/HELP $TESTNAME.actual || DIE=1 grep '^Report bugs to .*http.*' $TESTNAME.actual >/dev/null || DIE=1 . $srcdir/finish.sh enca-1.15/test/test-pP.expected000066400000000000000000000004521222222630600164020ustar00rootroot00000000000000ISO-8859-2 AAA cs-s.iso88592: ISO-8859-2 BBB ISO-8859-2 CCC ISO-8859-2 DDD STDIN: ISO-8859-2 EEE ISO-8859-2 FFF ISO-8859-2 GGG STDIN: ISO-8859-2 HHH ISO-8859-2 III cs-s.iso88592: ISO-8859-2 cs-s.iso88592: ISO-8859-2 JJJ cs-s.iso88592: ISO-8859-2 cs-s.iso88592: ISO-8859-2 KKK ISO-8859-2 ISO-8859-2 enca-1.15/test/test-pP.sh000077500000000000000000000027471222222630600152270ustar00rootroot00000000000000#! /bin/sh # @(#) $Id: test-pP.sh,v 1.2 2003/11/17 12:27:40 yeti Exp $ # Purpose: test whether -p, -P and default file prefixing works . $srcdir/setup.sh TEST_TEXT=$srcdir/cs-s.iso88592 OPTS="-e -L cs" $ENCA $OPTS $TEST_TEXT | sed -e "s#^$srcdir/##" >>$TESTNAME.actual || DIE=1 echo AAA >>$TESTNAME.actual $ENCA $OPTS -p $TEST_TEXT | sed -e "s#^$srcdir/##" >>$TESTNAME.actual || DIE=1 echo BBB >>$TESTNAME.actual $ENCA $OPTS -P $TEST_TEXT | sed -e "s#^$srcdir/##" >>$TESTNAME.actual || DIE=1 echo CCC >>$TESTNAME.actual $ENCA $OPTS <$TEST_TEXT | sed -e "s#^$srcdir/##" >>$TESTNAME.actual || DIE=1 echo DDD >>$TESTNAME.actual $ENCA $OPTS -p <$TEST_TEXT | sed -e "s#^$srcdir/##" >>$TESTNAME.actual || DIE=1 echo EEE >>$TESTNAME.actual $ENCA $OPTS -P <$TEST_TEXT | sed -e "s#^$srcdir/##" >>$TESTNAME.actual || DIE=1 echo FFF >>$TESTNAME.actual $ENCA $OPTS - <$TEST_TEXT | sed -e "s#^$srcdir/##" >>$TESTNAME.actual || DIE=1 echo GGG >>$TESTNAME.actual $ENCA $OPTS -p - <$TEST_TEXT | sed -e "s#^$srcdir/##" >>$TESTNAME.actual || DIE=1 echo HHH >>$TESTNAME.actual $ENCA $OPTS -P - <$TEST_TEXT | sed -e "s#^$srcdir/##" >>$TESTNAME.actual || DIE=1 echo III >>$TESTNAME.actual $ENCA $OPTS $TEST_TEXT $TEST_TEXT | sed -e "s#^$srcdir/##" >>$TESTNAME.actual || DIE=1 echo JJJ >>$TESTNAME.actual $ENCA $OPTS -p $TEST_TEXT $TEST_TEXT | sed -e "s#^$srcdir/##" >>$TESTNAME.actual || DIE=1 echo KKK >>$TESTNAME.actual $ENCA $OPTS -P $TEST_TEXT $TEST_TEXT | sed -e "s#^$srcdir/##" >>$TESTNAME.actual || DIE=1 . $srcdir/finish.sh enca-1.15/test/test-recode.sh000077500000000000000000000027201222222630600161000ustar00rootroot00000000000000#! /bin/sh # @(#) $Id: test-recode.sh,v 1.2 2003/11/17 12:27:40 yeti Exp $ # Purpose: test whether librecode interface works. # FIXME: this may fail when the interface works but librecode is broken! . $srcdir/setup.sh if $ENCA --list converters | grep '^librecode$' >/dev/null; then TEST_TEXT=$srcdir/cs-s.iso88592 OPTS="-L cs -C librecode" # File cp $TEST_TEXT $TESTNAME.actual $ENCA $OPTS -x UTF-8 $TESTNAME.actual || DIE=1 $ENCA -L none $TESTNAME.actual | grep UTF-8 >/dev/null || DIE=1 $ENCA $OPTS -x ISO-8859-2 $TESTNAME.actual || DIE=1 diff $TEST_TEXT $TESTNAME.actual || DIE=1 # Pipe cp $TEST_TEXT $TESTNAME.actual $ENCA $OPTS -x UTF-8 <$TESTNAME.actual >$TESTNAME.tmp || DIE=1 $ENCA -L none $TESTNAME.tmp | grep UTF-8 >/dev/null || DIE=1 $ENCA $OPTS -x ISO-8859-2 <$TESTNAME.tmp >$TESTNAME.actual || DIE=1 diff $TEST_TEXT $TESTNAME.actual || DIE=1 # Failures cp $TEST_TEXT $TESTNAME.actual $ENCA $OPTS -x solzenicyn $TESTNAME.actual 2>/dev/null && DIE=1 diff $TEST_TEXT $TESTNAME.actual || DIE=1 # TODO: this is not enough for recode to fail, it just wipes out the # offending characters # One copy doesn't contain enough characters to overweight the noise #cat $TESTNAME.tmp $TESTNAME.tmp $TESTNAME.tmp >$TESTNAME.actual #echo '' >>$TESTNAME.actual #cat $TESTNAME.actual >$TESTNAME.tmp #$ENCA $OPTS -x ISO-8859-2 $TESTNAME.tmp && DIE=1 #diff $TESTNAME.tmp $TESTNAME.actual || DIE=1 else E77=1 fi . $srcdir/finish.sh enca-1.15/test/uk-s.cp1125000066400000000000000000000001401222222630600150310ustar00rootroot00000000000000 ⥬ GNU/Linux: ॡ ஫ root. enca-1.15/test/uk-s.cp1251000066400000000000000000000001401222222630600150310ustar00rootroot00000000000000 GNU/Linux: root. enca-1.15/test/uk-s.ibm855000066400000000000000000000001401222222630600151270ustar00rootroot00000000000000 Ԡ з뷽 Ҩ بƷ ֌ ҷ GNU/Linux: ᨢ ؠ root. enca-1.15/test/uk-s.iso88595000066400000000000000000000001371222222630600153410ustar00rootroot00000000000000 GNU/Linux: root. enca-1.15/test/uk-s.koi8u000066400000000000000000000001401222222630600151550ustar00rootroot00000000000000 ¦ ϧ GNU/Linux: root. enca-1.15/test/uk-s.maccyr000066400000000000000000000001371222222630600154020ustar00rootroot00000000000000 GNU/Linux: root. enca-1.15/test/uk-s.utf8000066400000000000000000000002421222222630600150070ustar00rootroot00000000000000Це найбільш важливий момент для безпеки вашої системи GNU/Linux: вам треба ввести пароль root. enca-1.15/test/uk-utf8.bin000066400000000000000000000001301222222630600153110ustar00rootroot00000000000000Вхідні помилкиВихідні помилкиВсього помилок enca-1.15/test/uk-utf8.cp1251000066400000000000000000000004571222222630600154700ustar00rootroot00000000000000Це найбільш важливий момент для безпеки вашої системи GNU/Linux: вам треба ввести пароль root. enca-1.15/test/zh-s.big5000066400000000000000000000003451222222630600147550ustar00rootroot00000000000000XɦHsݫCѡCѤWcAiO~CڱkhASãӥɦtABӴHC_R˲MvAbHI শաACAӵLvCAƪVOɶHHdwXA릳ʡAƥjC@H[Ad̦@`SCenca-1.15/test/zh-s.gbk000066400000000000000000000003451222222630600146720ustar00rootroot00000000000000¼ʱУѾ졣֪ϹڣϦǺꡣ˷ȥֿ¥ߴʤŪӰ˼䣡 ת󣬵粻ߡӦкޣ³ʱԲбϣԲȱ¹ȫԸ˳ãǧﹲ濾ꡣenca-1.15/test/zh-s.hz000066400000000000000000000003551222222630600145510ustar00rootroot00000000000000~{CwTB<8J1SP#?0Q>FNJG`Ll!#2;V*LlIO9,cZ#,=qO&JG:NDj!#NRS{3K7g9iH%#,SV?VGmB%SqSn#,8_4&2;J$:.!#FpNhE*GeS0#,:NKFTZHKC#,G'@o92f?>j!#~}enca-1.15/test/zh-s.utf8000066400000000000000000000005271222222630600150170ustar00rootroot00000000000000明月几时有?把酒问青天。不知天上宫阙,今夕是何年。我欲乘风归去,又恐琼楼玉宇,高处不胜寒。起舞弄清影,何似在人间! 转朱阁,低绮户,照无眠。不应有恨,何事长向别时圆?人有悲欢离合,月有阴晴圆缺,此事古难全。但愿人长久,千里共婵娟。enca-1.15/tools/000077500000000000000000000000001222222630600135035ustar00rootroot00000000000000enca-1.15/tools/.gitignore000066400000000000000000000000671222222630600154760ustar00rootroot00000000000000.deps Makefile encodings.h encodings.sed make_hash *.o enca-1.15/tools/ACCEPTED_CHARS.t000066400000000000000000000001061222222630600157550ustar00rootroot00000000000000"abcdefghijklnmopqrstuvwxyzABCDEFGHIJKLNMOPQRSTUVWXYZ0123456789-_.:/" enca-1.15/tools/BASE64.ti000066400000000000000000000001031222222630600147170ustar00rootroot00000000000000"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" enca-1.15/tools/BOXVERT_CP1125.t000066400000000000000000000002751222222630600157200ustar00rootroot00000000000000179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 197, 198, 199, 200, 201, 202, 203, 204, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218 enca-1.15/tools/BOXVERT_IBM852.t000066400000000000000000000001431222222630600157450ustar00rootroot00000000000000179, 180, 185, 186, 187, 188, 191, 192, 193, 194, 195, 197, 200, 201, 202, 203, 204, 206, 217, 218 enca-1.15/tools/BOXVERT_KEYBCS2.t000066400000000000000000000002751222222630600161470ustar00rootroot00000000000000179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 197, 198, 199, 200, 201, 202, 203, 204, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218 enca-1.15/tools/BOXVERT_KOI8R.t000066400000000000000000000002751222222630600157410ustar00rootroot00000000000000129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 161, 162, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190 enca-1.15/tools/BOXVERT_KOI8RU.t000066400000000000000000000002131222222630600160560ustar00rootroot00000000000000129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 161, 162, 165, 168, 169, 170, 171, 172, 175, 176, 177, 178, 181, 184, 185, 186, 187, 188 enca-1.15/tools/BOXVERT_KOI8U.t000066400000000000000000000002321222222630600157350ustar00rootroot00000000000000128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 161, 162, 165, 168, 169, 170, 171, 172, 174, 175, 176, 177, 178, 181, 184, 185, 186, 187, 188, 190 enca-1.15/tools/BOXVERT_KOI8UNI.t000066400000000000000000000000611222222630600161640ustar00rootroot00000000000000129, 130, 131, 132, 133, 134, 135, 136, 137, 138 enca-1.15/tools/HEXDIGITS.ti000066400000000000000000000000231222222630600153640ustar00rootroot00000000000000"0123456789ABCDEF" enca-1.15/tools/Makefile.am000066400000000000000000000032161222222630600155410ustar00rootroot00000000000000# @(#) $Id: Makefile.am,v 1.10 2003/11/17 12:27:40 yeti Exp $ noinst_PROGRAMS = make_hash noinst_HEADERS = encodings.h noinst_SCRIPTS = expand_table.pl make_hash_SOURCES = make_hash.c BUILT_SOURCES = $(noinst_HEADERS) TABLE_SRC = \ ACCEPTED_CHARS.t \ BASE64.ti \ BOXVERT_CP1125.t \ BOXVERT_IBM852.t \ BOXVERT_KEYBCS2.t \ BOXVERT_KOI8R.t \ BOXVERT_KOI8RU.t \ BOXVERT_KOI8U.t \ BOXVERT_KOI8UNI.t \ HEXDIGITS.ti \ TEX_ACCALPHA.t \ TEX_ACCPUNCT.t \ TEX_SKIP.t \ encodings.dat EXTRA_DIST = $(TABLE_SRC) $(noinst_SCRIPTS) iconvenc.null all: encodings.h encodings.sed: $(top_builddir)/iconvenc.h sed -e 's/^#define \([A-Z0-9_]*\) \(.*\)/@\1@ \2/' -e 's/"//g' -e 's/NULL$$//' -e 's/ /\//' -e 's/^\(.*\)$$/s\/\1\//' $(top_builddir)/iconvenc.h >encodings.sed encodings.h: encodings.sed $(srcdir)/encodings.dat make_hash sed -f encodings.sed $(srcdir)/encodings.dat | ./make_hash >encodings.h # Normally there's no need to regenerate tables, they are copy-and-pasted # into the C source manually, but the rules are here. Run `make tables' # to create them. TABLES = \ ACCEPTED_CHARS.h \ BOXVERT_CP1125.h \ BOXVERT_IBM852.h \ BOXVERT_KEYBCS2.h \ BOXVERT_KOI8R.h \ BOXVERT_KOI8RU.h \ BOXVERT_KOI8U.h \ BOXVERT_KOI8UNI.h \ TEX_ACCALPHA.h \ TEX_ACCPUNCT.h \ TEX_SKIP.h TABLES_INCR = BASE64.h HEXDIGITS.h if MAINTAINER_MODE tables: $(TABLES) $(TABLES_INCR) %.h: $(srcdir)/%.t $(srcdir)/expand_table.pl $(srcdir)/expand_table.pl $< >$@ %.h: $(srcdir)/%.ti $(srcdir)/expand_table.pl $(srcdir)/expand_table.pl $< >$@ endif clean-local: rm -f $(TABLES) $(TABLES_INCR) encodings.sed *~ core.* distclean-local: rm -f encodings.h enca-1.15/tools/Makefile.in000066400000000000000000000470721222222630600155620ustar00rootroot00000000000000# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = make_hash$(EXEEXT) subdir = tools DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/mkinstalldirs $(top_srcdir)/depcomp \ $(noinst_HEADERS) 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/tools.m4 $(top_srcdir)/m4/typevar.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_make_hash_OBJECTS = make_hash.$(OBJEXT) make_hash_OBJECTS = $(am_make_hash_OBJECTS) make_hash_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 = SCRIPTS = $(noinst_SCRIPTS) 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__depfiles_maybe = depfiles 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 = $(make_hash_SOURCES) DIST_SOURCES = $(make_hash_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVERTER_LIBS = @CONVERTER_LIBS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTOCS_PROG = @CSTOCS_PROG@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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@ LIBICONV = @LIBICONV@ LIBM = @LIBM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ 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_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ 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@ 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_HEADERS = encodings.h noinst_SCRIPTS = expand_table.pl make_hash_SOURCES = make_hash.c BUILT_SOURCES = $(noinst_HEADERS) TABLE_SRC = \ ACCEPTED_CHARS.t \ BASE64.ti \ BOXVERT_CP1125.t \ BOXVERT_IBM852.t \ BOXVERT_KEYBCS2.t \ BOXVERT_KOI8R.t \ BOXVERT_KOI8RU.t \ BOXVERT_KOI8U.t \ BOXVERT_KOI8UNI.t \ HEXDIGITS.ti \ TEX_ACCALPHA.t \ TEX_ACCPUNCT.t \ TEX_SKIP.t \ encodings.dat EXTRA_DIST = $(TABLE_SRC) $(noinst_SCRIPTS) iconvenc.null # Normally there's no need to regenerate tables, they are copy-and-pasted # into the C source manually, but the rules are here. Run `make tables' # to create them. TABLES = \ ACCEPTED_CHARS.h \ BOXVERT_CP1125.h \ BOXVERT_IBM852.h \ BOXVERT_KEYBCS2.h \ BOXVERT_KOI8R.h \ BOXVERT_KOI8RU.h \ BOXVERT_KOI8U.h \ BOXVERT_KOI8UNI.h \ TEX_ACCALPHA.h \ TEX_ACCPUNCT.h \ TEX_SKIP.h TABLES_INCR = BASE64.h HEXDIGITS.h all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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 tools/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnits tools/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @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: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list make_hash$(EXEEXT): $(make_hash_OBJECTS) $(make_hash_DEPENDENCIES) $(EXTRA_make_hash_DEPENDENCIES) @rm -f make_hash$(EXEEXT) $(AM_V_CCLD)$(LINK) $(make_hash_OBJECTS) $(make_hash_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/make_hash.Po@am__quote@ .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: $(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: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(HEADERS) installdirs: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libtool clean-local clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -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 -rf ./$(DEPDIR) -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: all check install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am 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 all: encodings.h encodings.sed: $(top_builddir)/iconvenc.h sed -e 's/^#define \([A-Z0-9_]*\) \(.*\)/@\1@ \2/' -e 's/"//g' -e 's/NULL$$//' -e 's/ /\//' -e 's/^\(.*\)$$/s\/\1\//' $(top_builddir)/iconvenc.h >encodings.sed encodings.h: encodings.sed $(srcdir)/encodings.dat make_hash sed -f encodings.sed $(srcdir)/encodings.dat | ./make_hash >encodings.h @MAINTAINER_MODE_TRUE@tables: $(TABLES) $(TABLES_INCR) @MAINTAINER_MODE_TRUE@%.h: $(srcdir)/%.t $(srcdir)/expand_table.pl @MAINTAINER_MODE_TRUE@ $(srcdir)/expand_table.pl $< >$@ @MAINTAINER_MODE_TRUE@%.h: $(srcdir)/%.ti $(srcdir)/expand_table.pl @MAINTAINER_MODE_TRUE@ $(srcdir)/expand_table.pl $< >$@ clean-local: rm -f $(TABLES) $(TABLES_INCR) encodings.sed *~ core.* distclean-local: rm -f encodings.h # 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: enca-1.15/tools/TEX_ACCALPHA.t000066400000000000000000000000141222222630600155370ustar00rootroot00000000000000"bcdHkrtuv" enca-1.15/tools/TEX_ACCPUNCT.t000066400000000000000000000000131222222630600156020ustar00rootroot00000000000000"'`^\"~=." enca-1.15/tools/TEX_SKIP.t000066400000000000000000000000131222222630600151500ustar00rootroot00000000000000" \t\n\r{" enca-1.15/tools/encodings.dat000066400000000000000000000217461222222630600161600ustar00rootroot00000000000000#1:enca name (namestring) # -- basic symbolic name #2:RFC-1345 name (namestring) # -- must exist, use the most canonical name if RFC-1345 doesn't define it #3:cstocs name (namestring) # -- left empty for new charsets, all cstocs charsets are present #4:iconv name (namestring) # -- REPLACED FROM iconvenc.h, use @ICONV_NAME_...@ #5:preferred MIME name (namestring) # -- http://www.iana.org/assignments/character-sets #6:Alias list (space separated namestring list) #7:Human readable name (any string) #8:Charset flags (| joined C identifiers) # -- see enca.h or API docs for flag list #9:Natural surface (C identifier) # -- see enca.h or API docs for surface list enca:ASCII rfc:ANSI_X3.4-1968 cstocs:ascii iconv:@ICONV_NAME_ASCII@ mime:US-ASCII aliases:ASCII ANSI_X3.4-1986 367 CP367 IBM367 CSPC367 7bit ISO-646-US iso-ir-6 ISO_646.irv:1991 us US-ASCII csASCII human:7bit ASCII characters flags:ENCA_CHARSET_7BIT | ENCA_CHARSET_FIXED nsurface:ENCA_SURFACE_EOL_LF enca:ISO-8859-2 rfc:ISO_8859-2:1987 cstocs:il2 iconv:@ICONV_NAME_ISO88592@ mime:ISO-8859-2 aliases:ISO-8859-2 8859-2 912 CP912 IBM912 ISO_8859-2:1987 il2 l2 Latin2 iso-ir-101 csISOLatin2 ISOLatin2 csLatin2 human:ISO 8859-2 standard; ISO Latin 2 flags:ENCA_CHARSET_8BIT | ENCA_CHARSET_FIXED | ENCA_CHARSET_REGULAR nsurface:ENCA_SURFACE_EOL_LF enca:ISO-8859-4 rfc:ISO_8859-4:1988 cstocs: iconv:@ICONV_NAME_ISO88594@ mime:ISO-8859-4 aliases:ISO-8859-4 8859-4 ISO_8859-4:1988 iso-ir-110 l4 Latin4 csLatin4 ISOLatin4 human:ISO 8859-4 standard; Latin 4 flags:ENCA_CHARSET_8BIT | ENCA_CHARSET_FIXED | ENCA_CHARSET_REGULAR nsurface:ENCA_SURFACE_EOL_LF enca:ISO-8859-5 rfc:ISO_8859-5:1988 cstocs: iconv:@ICONV_NAME_ISO88595@ mime:ISO-8859-5 aliases:ISO-8859-5 8859-5 Cyrillic ISO_8859-5:1988 iso-ir-144 csISOLatinCyrillic csLatin5 ISOLatin5 human:ISO 8859-5 standard; ISO Cyrillic flags:ENCA_CHARSET_8BIT | ENCA_CHARSET_FIXED | ENCA_CHARSET_REGULAR nsurface:ENCA_SURFACE_EOL_LF enca:ISO-8859-13 rfc:ISO_8859-13:1998 cstocs: iconv:@ICONV_NAME_ISO885913@ mime:ISO-8859-13 aliases:ISO-8859-13 ISO8859-13 iso-baltic iso-ir-179a ISO_8859-13 ISO_8859-13:1998 l7 Latin7 csLatin7 human:ISO 8859-13 standard; ISO Baltic; Latin 7 flags:ENCA_CHARSET_8BIT | ENCA_CHARSET_FIXED | ENCA_CHARSET_REGULAR nsurface:ENCA_SURFACE_EOL_LF enca:ISO-8859-16 rfc:ISO_8859-16:2000 cstocs: iconv:@ICONV_NAME_ISO885916@ mime:ISO-8859-16 aliases:ISO-8859-16 ISO-IR-226 ISO_8859-16 ISO_8859-16:2000 latin10 l10 csLatin10 human:ISO 8859-16 standard flags:ENCA_CHARSET_8BIT | ENCA_CHARSET_FIXED | ENCA_CHARSET_REGULAR nsurface:ENCA_SURFACE_EOL_LF enca:CP1125 rfc:CP1125 cstocs: iconv:@ICONV_NAME_CP1125@ mime:windows-1125 aliases:CP1125 1125 MS-1125 Win-1125 Windows-1125 human:MS-Windows code page 1125 flags:ENCA_CHARSET_8BIT | ENCA_CHARSET_FIXED | ENCA_CHARSET_REGULAR nsurface:ENCA_SURFACE_EOL_CRLF enca:CP1250 rfc:CP1250 cstocs:1250 iconv:@ICONV_NAME_CP1250@ mime:windows-1250 aliases:CP1250 1250 ms-ee MS-1250 Win-1250 Windows-1250 human:MS-Windows code page 1250 flags:ENCA_CHARSET_8BIT | ENCA_CHARSET_FIXED | ENCA_CHARSET_REGULAR nsurface:ENCA_SURFACE_EOL_CRLF enca:CP1251 rfc:CP1251 cstocs: iconv:@ICONV_NAME_CP1251@ mime:windows-1251 aliases:CP1251 1251 ms-cyrl MS-1251 Win-1251 Windows-1251 human:MS-Windows code page 1251 flags:ENCA_CHARSET_8BIT | ENCA_CHARSET_FIXED | ENCA_CHARSET_REGULAR nsurface:ENCA_SURFACE_EOL_CRLF enca:CP1257 rfc:CP1257 cstocs: iconv:@ICONV_NAME_CP1257@ mime:windows-1257 aliases:CP1257 1257 ms-balt MS-1257 Win-1257 Windows-1257 WinBaltRim human:MS-Windows code page 1257; WinBaltRim flags:ENCA_CHARSET_8BIT | ENCA_CHARSET_FIXED | ENCA_CHARSET_REGULAR nsurface:ENCA_SURFACE_EOL_CRLF enca:IBM852 rfc:IBM852 cstocs:pc2 iconv:@ICONV_NAME_IBM852@ mime:IBM852 aliases:IBM852 852 CP852 pc2 pcl2 pclatin2 pl2 PC852 csPC852 csIBM852 human:IBM/MS code page 852; PC (DOS) Latin 2 flags:ENCA_CHARSET_8BIT | ENCA_CHARSET_FIXED | ENCA_CHARSET_REGULAR nsurface:ENCA_SURFACE_EOL_CRLF enca:IBM855 rfc:IBM855 cstocs: iconv:@ICONV_NAME_IBM855@ mime:IBM855 aliases:IBM855 855 CP855 PC855 csPC855 csIBM855 human:IBM/MS code page 855 flags:ENCA_CHARSET_8BIT | ENCA_CHARSET_FIXED | ENCA_CHARSET_REGULAR nsurface:ENCA_SURFACE_EOL_CRLF enca:IBM775 rfc:IBM775 cstocs: iconv:@ICONV_NAME_IBM775@ mime:IBM775 aliases:IBM775 775 CP775 PC775 csPC775 csIBM775 human:IBM/MS code page 775 flags:ENCA_CHARSET_8BIT | ENCA_CHARSET_FIXED | ENCA_CHARSET_REGULAR nsurface:ENCA_SURFACE_EOL_CRLF enca:IBM866 rfc:IBM866 cstocs: iconv:@ICONV_NAME_IBM866@ mime:IBM866 aliases:IBM866 866 CP866 PC866 csPC866 csIBM866 human:IBM/MS code page 866 flags:ENCA_CHARSET_8BIT | ENCA_CHARSET_FIXED | ENCA_CHARSET_REGULAR nsurface:ENCA_SURFACE_EOL_CRLF enca:baltic rfc:iso-ir-179 cstocs: iconv:@ICONV_NAME_BALTIC@ mime: aliases:ISO-IR-179 baltic human:ISO-IR-179; Baltic flags:ENCA_CHARSET_8BIT | ENCA_CHARSET_FIXED | ENCA_CHARSET_REGULAR nsurface:ENCA_SURFACE_EOL_LF enca:KEYBCS2 rfc:KEYBCS2 cstocs:kam iconv:@ICONV_NAME_KEYBCS2@ mime: aliases:KEYBCS2 Kamenicky kam 895 CP895 PC895 csPC895 human:Kamenicky encoding; KEYBCS2 flags:ENCA_CHARSET_8BIT | ENCA_CHARSET_FIXED | ENCA_CHARSET_REGULAR nsurface:ENCA_SURFACE_EOL_CRLF enca:macce rfc:macintosh_ce cstocs:macce iconv:@ICONV_NAME_MACCE@ mime: aliases:macce macintoshce macee macintoshee human:Macintosh Central European flags:ENCA_CHARSET_8BIT | ENCA_CHARSET_FIXED | ENCA_CHARSET_REGULAR nsurface:ENCA_SURFACE_EOL_CR enca:maccyr rfc:mac_cyrillic cstocs: iconv:@ICONV_NAME_MACCYR@ mime: aliases:maccyr maccyrillic macintoshcyr macintoshcyrillic human:Macintosh Cyrillic flags:ENCA_CHARSET_8BIT | ENCA_CHARSET_FIXED | ENCA_CHARSET_REGULAR nsurface:ENCA_SURFACE_EOL_CR enca:ECMA-113 rfc:ECMA-113:1986 cstocs: iconv:@ICONV_NAME_ECMA113@ mime:ECMA-cyrillic aliases:ecma-cyrillic ECMA-113:1986 iso-ir-111 human:ECMA Cyrillic; ECMA-113 flags:ENCA_CHARSET_8BIT | ENCA_CHARSET_FIXED | ENCA_CHARSET_REGULAR nsurface:ENCA_SURFACE_EOL_LF enca:KOI-8_CS_2 rfc:KOI-8_CS_2 cstocs:koi8 iconv:@ICONV_NAME_KOI8CS2@ mime:KOI8-CS2 aliases:KOI-8_CS2 koi8cs koi8cz T602 human:KOI8-CS2 code (`T602') flags:ENCA_CHARSET_8BIT | ENCA_CHARSET_FIXED | ENCA_CHARSET_REGULAR nsurface:ENCA_SURFACE_EOL_CRLF enca:KOI8-R rfc:KOI8-R cstocs: iconv:@ICONV_NAME_KOI8R@ mime:KOI8-R aliases:KOI8-R csKOI8R human:KOI8-R Cyrillic flags:ENCA_CHARSET_8BIT | ENCA_CHARSET_FIXED | ENCA_CHARSET_REGULAR nsurface:ENCA_SURFACE_EOL_CRLF enca:KOI8-U rfc:KOI8-U cstocs: iconv:@ICONV_NAME_KOI8U@ mime:KOI8-U aliases:KOI8-U human:KOI8-U Cyrillic flags:ENCA_CHARSET_8BIT | ENCA_CHARSET_FIXED | ENCA_CHARSET_REGULAR nsurface:ENCA_SURFACE_EOL_CRLF enca:KOI8-UNI rfc:KOI8-UNI cstocs: iconv:@ICONV_NAME_KOI8UNI@ mime: aliases:KOI8-UNI human:KOI8-Unified Cyrillic flags:ENCA_CHARSET_8BIT | ENCA_CHARSET_FIXED | ENCA_CHARSET_REGULAR nsurface:ENCA_SURFACE_EOL_CRLF enca:TeX rfc:LaTeX cstocs: tex iconv:@ICONV_NAME_LATEX@ mime: aliases:TeX latex ltex human:(La)TeX control sequences flags:ENCA_CHARSET_7BIT | ENCA_CHARSET_VARIABLE | ENCA_CHARSET_MULTIBYTE nsurface:ENCA_SURFACE_EOL_LF enca:UCS-2 rfc:ISO-10646-UCS-2 cstocs: iconv:@ICONV_NAME_UCS2@ mime:ISO-10646-UCS-2 aliases:UCS-2 ISO-10646-UCS-2 BMP u2 UNICODE-1-1 csUnicode11 csUnicode rune csUCS2 human:Universal character set 2 bytes; UCS-2; BMP flags:ENCA_CHARSET_16BIT | ENCA_CHARSET_FIXED | ENCA_CHARSET_BINARY | ENCA_CHARSET_MULTIBYTE nsurface: enca:UCS-4 rfc:ISO-10646-UCS-4 cstocs: iconv:@ICONV_NAME_UCS4@ mime:ISO-10646-UCS-4 aliases:UCS-4 ISO-10646-UCS-4 10646 u4 UCS ISO-10646 csUCS4 human:Universal character set 4 bytes; UCS-4; ISO-10646 flags:ENCA_CHARSET_32BIT | ENCA_CHARSET_FIXED | ENCA_CHARSET_BINARY | ENCA_CHARSET_MULTIBYTE nsurface: enca:UTF-7 rfc:UNICODE-1-1-UTF-7 cstocs: iconv:@ICONV_NAME_UTF7@ mime:UNICODE-1-1-UTF-7 aliases:UTF-7 UNICODE-1-1-UTF-7 TF-7 u7 csUnicode11UTF7 csUTF7 ISO-10646-UTF7 human:Universal transformation format 7 bits; UTF-7 flags:ENCA_CHARSET_7BIT | ENCA_CHARSET_VARIABLE | ENCA_CHARSET_MULTIBYTE nsurface:ENCA_SURFACE_EOL_CRLF enca:UTF-8 rfc:UTF-8 cstocs: utf8 iconv:@ICONV_NAME_UTF8@ mime:UTF-8 aliases:UTF-8 FSS_UTF TF-8 u8 UTF-2 UTF-FSS ISO-10646-UTF8 csUTF8 human:Universal transformation format 8 bits; UTF-8 flags:ENCA_CHARSET_8BIT | ENCA_CHARSET_VARIABLE | ENCA_CHARSET_MULTIBYTE nsurface:ENCA_SURFACE_EOL_LF enca:CORK rfc:CORK cstocs: iconv:@ICONV_NAME_CORK@ mime: aliases:Cork T1 human:Cork encoding; T1 flags:ENCA_CHARSET_8BIT | ENCA_CHARSET_FIXED | ENCA_CHARSET_REGULAR nsurface: enca:GBK rfc:GB_2312-80 cstocs: iconv:@ICONV_NAME_GBK@ mime:GB2312 aliases:GB_2312-80 GB2312.1980-0 ISO-IR-58 GB2312 GBK GB18030 CP936 human:Simplified Chinese National Standard; GB2312 flags:ENCA_CHARSET_8BIT | ENCA_CHARSET_VARIABLE | ENCA_CHARSET_MULTIBYTE nsurface:ENCA_SURFACE_EOL_LF enca:BIG5 rfc:Big5 cstocs: iconv:@ICONV_NAME_BIG5@ mime:BIG5 aliases:BIG5 BIGFIVE BIG-5 BIG-FIVE CN-BIG5 CP950 human:Traditional Chinese Industrial Standard; Big5 flags:ENCA_CHARSET_8BIT | ENCA_CHARSET_VARIABLE | ENCA_CHARSET_MULTIBYTE nsurface:ENCA_SURFACE_EOL_LF enca:HZ rfc:HZ cstocs: iconv:@ICONV_NAME_HZ@ mime:HZ-GB-2312 aliases:HZ HZ-GB-2312 human:HZ encoded GB2312 flags:ENCA_CHARSET_7BIT | ENCA_CHARSET_VARIABLE | ENCA_CHARSET_MULTIBYTE nsurface:ENCA_SURFACE_EOL_LF enca-1.15/tools/expand_table.pl000077500000000000000000000027411222222630600164750ustar00rootroot00000000000000#!/usr/bin/perl # Generate a C flag-table from a list of bytes for which the flag should be on. # Accepts either # - a quoted string, character ordinal values are then used # - a (reasonably separated) list of decimal or hexadecimal numbers # Arguments: # 1st -- name of the flag file, table name is its basename with .t or .ti # removed, when the extension is .ti, the table is incremental use strict; use warnings; my $sep = "[[:space:][:punct:]]"; my $dig = "([[:digit:]]{1,3}|0x[[:xdigit:]]{1,2})"; my @a = (0) x 0x100; die "Need a filename" if not defined $ARGV[0]; my $incr = ($ARGV[0] =~ /\.ti$/) ? 1 : undef; my $name = $ARGV[0]; $name =~ s/.*\///; $name =~ s/\.ti?$//; undef $/; open FH, '<', $ARGV[0] or die "Cannot open $ARGV[0]\n"; $_ = ; close FH; s/^[[:space:]]+//; s/[[:space:]]+$//; if (/"[^"]+"/) { s/"//g; foreach my $x (split / */) { $a[ord $x] = (defined $incr ? $incr++ : 1); } } elsif (/^($dig$sep+)+$dig?/s) { foreach my $x (split /$sep+/) { $a[$x] = (defined $incr ? $incr++ : 1); } } else { die "Cannot parse input string\n"; } print "/* THIS IS A GENERATED TABLE, see tools/expand_table.pl */\n"; if ($incr) { print "static const short int $name\[\] = {\n"; } else { print "static const unsigned char $name\[\] = {\n"; } for (my $i = 0x00; $i < 0x100; $i++) { if ($i % 0x10 == 0x00) { print " "; } if (defined $incr) { printf "%2d, ", $a[$i]; } else { print $a[$i] . ", "; } if ($i % 0x10 == 0x0f) { print "\n"; } } print "};\n"; enca-1.15/tools/iconvenc.null000066400000000000000000000017701222222630600162100ustar00rootroot00000000000000#define ICONV_NAME_UNICODE NULL #define ICONV_NAME_ASCII NULL #define ICONV_NAME_BALTIC NULL #define ICONV_NAME_CP1125 NULL #define ICONV_NAME_CP1250 NULL #define ICONV_NAME_CP1251 NULL #define ICONV_NAME_CP1257 NULL #define ICONV_NAME_ECMA113 NULL #define ICONV_NAME_IBM775 NULL #define ICONV_NAME_IBM852 NULL #define ICONV_NAME_IBM855 NULL #define ICONV_NAME_IBM866 NULL #define ICONV_NAME_ISO88592 NULL #define ICONV_NAME_ISO88594 NULL #define ICONV_NAME_ISO88595 NULL #define ICONV_NAME_ISO885913 NULL #define ICONV_NAME_ISO885916 NULL #define ICONV_NAME_KEYBCS2 NULL #define ICONV_NAME_KOI8CS2 NULL #define ICONV_NAME_KOI8R NULL #define ICONV_NAME_KOI8U NULL #define ICONV_NAME_KOI8UNI NULL #define ICONV_NAME_MACCE NULL #define ICONV_NAME_MACCYR NULL #define ICONV_NAME_LATEX NULL #define ICONV_NAME_UCS2 NULL #define ICONV_NAME_UCS4 NULL #define ICONV_NAME_UTF7 NULL #define ICONV_NAME_UTF8 NULL #define ICONV_NAME_CORK NULL #define ICONV_NAME_GBK NULL #define ICONV_NAME_BIG5 NULL #define ICONV_NAME_HZ NULL enca-1.15/tools/make_hash.c000066400000000000000000000242221222222630600155710ustar00rootroot00000000000000/* make_hash.c v2003-01-24 make encodings.c from encodings.dat 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 #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 */ #include #include /* PARR {{{ */ #ifdef __GNUC__ # define PVAR(f, v) fprintf(stderr, "%s:%u %s(): " \ #v " == %" #f "\n", __FILE__, __LINE__, __FUNCTION__, v) # define PARR(f, v, n) ( { int _i; \ fprintf(stderr, "%s:%u %s(): " #v " == { ", __FILE__, __LINE__, __FUNCTION__); \ for (_i = 0; _i < n; _i++) fprintf(stderr, "%" #f ", ", (v)[_i]); \ fputs("}\n", stderr); \ } ) #else /* __GNUC__ */ /* FIXME */ #endif /* __GNUC__ */ /* }}} */ #define LEN 4096 typedef struct { char *enca; char *rfc1345; char *cstocs; char *iconv; char *mime; int naliases; char **aliases; char *human; char *flags; char *nsurface; } EncaCharsetRaw; typedef struct { int enca; int rfc1345; int cstocs; int iconv; int mime; char *human; char *flags; char *nsurface; } EncaCharsetFine; static EncaCharsetRaw RawNULL = { NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL }; static char* fixspaces(char *line) { char *p, *q; int qs = 0; for (p = line; isspace(*p); p++) ; for (q = line; *p != '\0'; p++) { if (isspace(*p)) { *q = ' '; qs = 1; } else { if (qs) q++; *q++ = *p; qs = 0; } } *q = '\0'; return line; } static int add_item(const char *line, const char *name, char **item) { const int len = strlen(name); if (*item != NULL) return 0; if (strncmp(line, name, len) != 0) return 0; *item = fixspaces(strdup(line + len)); return 1; } static char** check_alias(char **aliases, int *n, char *string) { int i; if (string == NULL || string[0] == '\0') return aliases; for (i = 0; i < *n; i++) if (strcmp(aliases[i], string) == 0) return aliases; (*n)++; aliases = (char**)realloc(aliases, (*n)*sizeof(char*)); aliases[*n - 1] = strdup(string); return aliases; } static EncaCharsetRaw* read_raw_charset_data(FILE *stream, int *rsize) { char *line; EncaCharsetRaw *r, *raw; int rs; char *gl; line = (char*)malloc(LEN); r = raw = (EncaCharsetRaw*)malloc(sizeof(EncaCharsetRaw)); *r = RawNULL; rs = 1; while (1) { gl = fgets(line, LEN, stream); if (r->enca && r->rfc1345 && r->cstocs && r->human && r->iconv && r->mime && r->flags && r->nsurface && r->aliases) { if (r->enca[0] == '\0') { fprintf(stderr, "Enca's charset name #%d empty\n", (int)(r - raw + 1)); exit(1); } if (r->rfc1345[0] == '\0') { fprintf(stderr, "RFC-1345 charset name #%d empty\n", (int)(r - raw + 1)); exit(1); } if (r->iconv[0] == '\0') r->iconv = NULL; if (r->cstocs[0] == '\0') r->cstocs = NULL; if (r->mime[0] == '\0') r->mime = NULL; if (r->nsurface[0] == '\0') r->nsurface = strdup("0"); r->aliases = check_alias(r->aliases, &r->naliases, r->enca); r->aliases = check_alias(r->aliases, &r->naliases, r->iconv); r->aliases = check_alias(r->aliases, &r->naliases, r->rfc1345); r->aliases = check_alias(r->aliases, &r->naliases, r->mime); r->aliases = check_alias(r->aliases, &r->naliases, r->cstocs); if (!gl) break; rs++; { int d = r - raw; raw = (EncaCharsetRaw*)realloc(raw, rs*sizeof(EncaCharsetRaw)); r = raw + d + 1; } *r = RawNULL; } line[LEN-1] = '\0'; fixspaces(line); if (line[0] == '\0' || line[0] == '#') continue; if (add_item(line, "enca:", &r->enca)) continue; if (add_item(line, "rfc:", &r->rfc1345)) continue; if (add_item(line, "iconv:", &r->iconv)) continue; if (add_item(line, "mime:", &r->mime)) continue; if (add_item(line, "cstocs:", &r->cstocs)) continue; if (add_item(line, "human:", &r->human)) continue; if (add_item(line, "flags:", &r->flags)) continue; if (add_item(line, "nsurface:", &r->nsurface)) continue; if (strncmp(line, "aliases:", 8) == 0 && !r->aliases) { int i; char *next, *l = fixspaces(line+8); r->naliases = 1; while ((l = strchr(l, ' ')) != NULL) { r->naliases++; l++; } r->aliases = (char**)malloc((r->naliases)*sizeof(char*)); l = line+8; for (i = 0; i < r->naliases; i++) { next = strchr(l, ' '); if (next) *next = '\0'; r->aliases[i] = strdup(l); l = next+1; } continue; } fprintf(stderr, "Unexpected `%s'\n", line); exit(1); } *rsize = rs; return raw; } static int squeeze_compare(const char *x, const char *y) { while (*x != '\0' || *y != '\0') { while (*x != '\0' && !isalnum(*x)) x++; while (*y != '\0' && !isalnum(*y)) y++; if (tolower(*x) != tolower(*y)) return (int)tolower(*x) - (int)tolower(*y); if (*x != '\0') x++; if (*y != '\0') y++; } return 0; } static int stable_compare(const void *p, const void *q) { char *x = *(char**)p; char *y = *(char**)q; int i; i = squeeze_compare(x, y); /* to stabilize the sort */ if (i == 0) return strcmp(x, y); return i; } static int bin_search(char **alist, const int n, const char *s) { int i1 = 0; int i2 = n-1; int i; i = stable_compare(&s, &alist[i1]); if (i < 0) { fprintf(stderr, "Out of search range: `%s'\n", s); exit(0); } if (i == 0) return i1; i = stable_compare(&s, &alist[i2]); if (i > 0) { fprintf(stderr, "Out of search range: `%s'\n", s); exit(0); } if (i == 0) return i2; while (i1+1 < i2) { int im = (i1 + i2)/2; i = stable_compare(&s, &alist[im]); if (i == 0) return im; if (i > 0) i1 = im; else i2 = im; } if (stable_compare(&s, &alist[i1+1]) == 0) return i1+1; fprintf(stderr, "Not found: `%s'\n", s); exit(0); } static char** build_alias_list(EncaCharsetRaw *raw, const int ncs, int *total) { char **alist; int nn, i, j, k; for (i = nn = 0; i < ncs; i++) nn += raw[i].naliases; alist = (char**)malloc(nn*sizeof(char*)); for (i = j = 0; i < ncs; i++) { for (k = 0; k < raw[i].naliases; k++) alist[j++] = raw[i].aliases[k]; } qsort(alist, nn, sizeof(char*), &stable_compare); for (i = 1; i < nn; ) { if (squeeze_compare(alist[i], alist[i-1]) == 0) { if (strcmp(alist[i], alist[i-1]) == 0) { fprintf(stderr, "Removing duplicate `%s'\n", alist[i]); memmove(alist+i-1, alist+i, (nn-i)*sizeof(char*)); nn--; } else { fprintf(stderr, "Keeping equvialent `%s' and `%s'\n", alist[i], alist[i-1]); i++; } } else i++; } *total = nn; return alist; } static EncaCharsetFine* refine_data(EncaCharsetRaw *raw, const int ncs, char **alist, const int nn) { int i; EncaCharsetFine *fine; fine = (EncaCharsetFine*)malloc(ncs*sizeof(EncaCharsetFine)); for (i = 0; i < ncs; i++) { fine[i].enca = bin_search(alist, nn, raw[i].enca); fine[i].rfc1345 = bin_search(alist, nn, raw[i].rfc1345); fine[i].iconv = raw[i].iconv ? bin_search(alist, nn, raw[i].iconv) : -1; fine[i].cstocs = raw[i].cstocs ? bin_search(alist, nn, raw[i].cstocs) : -1; fine[i].mime = raw[i].mime ? bin_search(alist, nn, raw[i].mime) : -1; fine[i].human = raw[i].human; fine[i].flags = raw[i].flags; fine[i].nsurface = raw[i].nsurface; } return fine; } static int* create_index_list(EncaCharsetRaw *raw, const int ncs, char **alist, const int nn) { int i, k; int *ilist; ilist = (int*)malloc(nn*sizeof(int)); for (i = 0; i < ncs; i++) { for (k = 0; k < raw[i].naliases; k++) { ilist[bin_search(alist, nn, raw[i].aliases[k])] = i; } } return ilist; } static void print_fine_data(EncaCharsetFine *fine, const int ncs, int *ilist, char **alist, const int nn) { int i; puts("/**** THIS IS A GENERATED FILE. DO NOT TOUCH! *****/"); puts("/* THIS IS A GENERATED TABLE, see tools/make_hash.c. */"); puts("static const EncaCharsetInfo CHARSET_INFO[] = {"); for (i = 0; i < ncs; i++) { printf(" {\n" " %d, %d, %d, %d, %d,\n" " \"%s\",\n" " %s,\n" " %s\n" " },\n", fine[i].enca, fine[i].rfc1345, fine[i].cstocs, fine[i].iconv, fine[i].mime, fine[i].human, fine[i].flags, fine[i].nsurface); } puts("};\n"); puts("/* THIS IS A GENERATED TABLE, see tools/make_hash.c. */"); puts("static const char *ALIAS_LIST[] = {"); for (i = 0; i < nn; i++) printf(" \"%s\",\n", alist[i]); puts("};\n"); puts("/* THIS IS A GENERATED TABLE, see tools/make_hash.c. */"); puts("static const int INDEX_LIST[] = {"); for (i = 0; i < nn; i++) { if (i%16 == 0) printf(" "); printf("%2d, ", ilist[i]); if (i%16 == 15 || i == nn-1) printf("\n"); } puts("};\n"); } int main(void) { EncaCharsetRaw *raw; EncaCharsetFine *fine; char **alist; int *ilist; int ncs, nn; raw = read_raw_charset_data(stdin, &ncs); alist = build_alias_list(raw, ncs, &nn); fine = refine_data(raw, ncs, alist, nn); ilist = create_index_list(raw, ncs, alist, nn); print_fine_data(fine, ncs, ilist, alist, nn); free(fine); free(ilist); return 0; } enca-1.15/topline.sh000077500000000000000000000017011222222630600143530ustar00rootroot00000000000000#! /bin/sh # topline.sh. # update top lines in docs. # get version number and current date ver=$(grep PACKAGE_VERSION config.h | sed 's/.*VERSION *"\(.*\)".*/\1/') if test -z "$ver"; then echo "Cannot get version from config.h" 1>&2 exit 1 fi date=$(date +"%Y-%m-%d") # update shopt -s nullglob if test -z "$@"; then files=$(grep -l '^#=====' * 2>/dev/null) else files=$@ fi for fnm in $files; do if [ "$fnm" = "NEWS" ] ; then continue fi echo "Updating $fnm..." 1>&2 { echo "#============================================================================" echo "# Enca v$ver ($date) guess and convert encoding of text files" echo "# Copyright (C) 2000-2003 David Necas (Yeti) " echo "# Copyright (C) 2009-2013 Michal Cihar " echo "#============================================================================" sed -e '1,5 d' "$fnm" } > tmp$$ mv -f tmp$$ $fnm done rm -f tmp$$