diff options
211 files changed, 76340 insertions, 24 deletions
diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/COPYING.LIB b/Build/source/libs/zziplib/zziplib-0.13.58/COPYING.LIB new file mode 100644 index 00000000000..eb685a5ec98 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/COPYING.LIB @@ -0,0 +1,481 @@ + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, 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 library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, 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 companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License, which was designed for utility programs. This +license, the GNU Library General Public License, applies to certain +designated libraries. This license is quite different from the ordinary +one; be sure to read it in full, and don't assume that anything in it is +the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that +they blur the distinction we usually make between modifying or adding to a +program and simply using it. Linking a program with a library, without +changing the library, is in some sense simply using the library, and is +analogous to running a utility program or application program. However, in +a textual and legal sense, the linked executable is a combined work, a +derivative of the original library, and the ordinary General Public License +treats it as such. + + Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended to +permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to achieve +this as regards changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is that this +will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library. + + Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one. + + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which +contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Library +General Public License (also called "this License"). Each licensee is +addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, 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 library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete 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 distribute a copy of this License along with the +Library. + + 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 Library or any portion +of it, thus forming a work based on the Library, 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) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +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 Library, 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 Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you 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. + + If distribution of 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 satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also compile or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. 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. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library 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. + + 9. 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 Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +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. + + 11. 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 Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library 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 Library. + +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. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library 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. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Library 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 Library +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 Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +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 + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "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 +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. 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 LIBRARY 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 +LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), 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 Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. 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. + + <one line to give the library's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This 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. + + This 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 this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + <signature of Ty Coon>, 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/ChangeLog b/Build/source/libs/zziplib/zziplib-0.13.58/ChangeLog new file mode 100644 index 00000000000..bf2e62b35cf --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/ChangeLog @@ -0,0 +1,1194 @@ +2006-08-08 + * rephrase build system, automated tests, some doc parts + +2006-04-28 + * bsd/mac needs sys/types.h for size_t + +2005-12-11 + * there have been reports about multithreading problems + * one source of problems: access to the dir->cache members. + fixed by using an explicit semaphore variable, otherwise + just allocate/deallocate the buffer / filehandle + * second source of problems: the zip file is opened _and_ read + with only one filehandle for multiple threads that + share the same "dir" handle. Look for "->currentfp". + * that is not fixed away - while access to the cache variables + can continue in the case of a "locked" state that is not + possible for open/reads. In the "locked" case the thread + must be blocked but that is a system-specific call. + * there are two ways to fix it - (a) push down the sysfile to + each zzip_file by "dup(2)"licating the sysfile handle. + However zzip looses a feature that was helping a lot on + system with a low number of sysfile hands (e.g. dos and + some embedded operating systems that I did work with). + and (b) provide an indirect ->lock() call that can be + filled by the caller application upon zzip invokation, + perhaps add it to the io-plugin structure. Well (c) is + it possible to support both styles? Dynamically? + +2005-12-10 + * testing on sourceforge compilefarm - including "make check" + * there was an error on bsd'ish systems (implicit 64on32) + which was caused by archaic CORRECT_ROOTSEEK code + being still present. Remove it? + +2005-12-09 + * testing with Microsoft Visual Studio 2005 (msvc8) Express Edition + * fixing some compilation problems related to zip64 support in win32 + +2005-12-08 + * cut acinclude.m4 into seperated aclocal macros in m4/ subdirectory + +2005-10-14 + * testing on sourceforge compilefarm, cleaning away any compiler warnings + i386-debian2.2 i386-freebsd4.8 + amd64-fedora3 alpha-debian3.0 + sparc-solaris8 powerpc-macos10.2 + * note, the build system has some quirks but not yet renovated to the + newest autoconf/automake stuff anyway - TBD before final release + +2005-10-13 + * MSVC7 knows the following __declspec attributes: + align(#), allocate("seg"), deprecated, dllexport, dllimport, + naked{for asm}, noinline, noreturn, nothrow, novtable, + property{MngC++}, selectany{common}, thread{tls}, uuid("name") + * introduce zzip__new__ for a restrict'ed return item + * introduce zzip_byte_t to help silence down compiler warnings + about signedness mismatch in assigning data buffer variables. + Especially the zlib data_in happens to be of unsigned char type. + * note that zzip/format.h does now use zzip_byte_t for layout definition + +2005-02-17 + * adding that _GNU_SOURCE on __linux__ to get the strndup prototype + * cleaning a few warning messages on different platforms as well + as a bug for 64bit platforms + * updating docs/mksite.sh and adding docs/mksite.pl and going to + let VERSION be pasted directly instead of a makefile snippet + * adding docs/memdisk.htm documentation to the series which is + currently quite shallow. + * note: no tests for actual zip64 support are made, neither for a + large central directory (more than 64K files) nor for large + files (more than 2GB). This is all theoretic but I am quite + confident that it will work. + +2005-02-16 + * change zzip/zip disk_trailer implementation + * we do not anymore pass a copy of the file block around + * we do use a local helper structure now with off_t fields + * the parse_root_directory is now using off_t for all computatations + * make check succeeds - beware, this is a new implementation + * RANT: glibc bastards make for additinal warning messages, the fseeko + prototype is not exported by default, but as soon as we add some + define to make it available, some other prototypes are disabled, + including one of the most widespread: strndup(). The documentation + even says we have to say GNU to get prototype - if you have ever heard + of unix to diverge into something not quite but be alike, here it is, + what compiles on most platforms gives a warning on linux even that it + works fine afterwards because the libc does export all we need and + autoconf does find it - it is just not prototyped and that's all. + +2005-02-15 + * adding zzip/memdisk.* as cache variant for libzzipfseeko + * add macro support for zip64 extensions + * extend trailer routines with zip64 detection (and return 0) + * add memdisk bins + +2005-01-04 + * remember TODO multithreading tests and hardening the code. + http://www.idefense.com/application/poi/display?id=153&type=vulnerabilities + +2004-12-27 + * updating to latest autoconf/automake/libtool stuff in Suse92 + * required a rewrite of ax_enable_builddir.m4 in ac-archive + * adding two macros to silence down bogus depracation warnings + from the latest gcc 3.3.5 + +2004-11-27 + * harveyandsu:yahoo:com reported an api mismatch for SDL rwops + usage and the implementation in the SDL_rwops_zzip example. + * + +2004-05-11 + * documenting zzip-cryptoid handling + * update mksite.sh + +2004-05-09 + * documenting zzipmmapped and zzipfseeko parser libraries + +2004-05-08 + * remove bogus zzip_file_open_ext_io from zzip.h + * change to use mksite.sh for documentation builds + +2004-03-08 + * add link in docs/history.htm to the new appnote.txt whitepaper + on zip file format specification. + +2004-02-19 + * a test run on solaris did show that fetch.* needs to be linked + to the new lib*.la stuff - to convert endianess-dependent + values from zip to main memory + * there seems to be an automake problem with hpux10 that I can not + yet define on what grounds it is - to get away with it I am + not defining automake 1.7 as the version to be used, plus + autoconf 2.57 - these are pretty new. + +2004-01-24 + * zzip/fseeko.c and bins/zzip.c had some issued with non-C99 compilers + which do not like variable declarations in the middle of a block + +2004-01-16 + * zzip_rewind again - the deflateReset does not reset the + input buffer variables (oops) so we have to do it + explicitly. Here we adopt to set crestlen to full + csize and the current z-buffer fillstate avail_in + to null to trigger a new read() on next zzip_read. + * the zlib headers do not tell whether next_in/avail_in + is used in deflateReset as is done in deflateInit. + A question to zlib@gzip.org brought no answer (as + is always the case) and after some thinking I did + decide to reset avail_in *after* the zReset call. + * based on this decision, I have made up a patch and I was + sending it over to zlib@gzip.org. Same consequence + again, the message is bluntly ignored (while there is + traffic on zlib devel mailinglist). There seems to be + a major problem about it, either a technical problem + (mail-adress disfunctional) or a social problem (no + one cares or perhaps some minor racism). + +2003-12-29 + * added libzzipfseeko.la with another simplified interface + * rename the other one to libzzipmmapped.la + * fix bugs for decompression on the latter as well + it seems the one has to use inflateInit2 (..., -MAX_WBITS) + * added bins/unzzipshow for an example binary + * added "--help" and "--version" to all bins examples + +2003-12-24 + * added libzzipmmap.la with a simplified interface to zip archives + * added bins unzzipdir and unzzipcat to show usage of libzzipmmap.la + * introduce zzip/types.h to allow easier inclusion to zzip/mmapped.* + +2003-12-22 + * add AC_C_BIGENDIAN and + * move out ZZIP_GET to zzip/fetch.h where we also specify access + wrappers to items in the zzip/format.h structures, portably. + * add byteswap.h ac_check and put a new file autoconf.h to carry + compiletime overrides for the autoconf definitions. + * start changing over to use zzip/fetch.h definitions everywhere + thereby replacing original ZZIP_GET16/32 usages completely. + This is localized to zzip/zip.c + * rename struct zzip_root_dirent to struct zzip_disk_entry but + retain a compatibility declaration. + * introduce zzip_version_t and zzip_dostime_t along with an optional + ZZIP_NEED_PACKED def that helps with weird compiler struct packing + * struct zzip_file_trailer did not use the char[x] variant, it does now + * place even more zzip/fetch.h declarations + * place even more defs into zzip/format.h + * noting CVS area on webpages + +2003-12-21 + * Nigel Stewart hints on some MSVC 6 issues, thanks. + +2003-12-20 + * implant *Reset instead of Deinit/Init in zzip_rewind - the latter + is supposed to make for a memory leak (see problem report). + +2003-12-10 + * add zzip_rewind fix by glenn = Glenn Maynard (www.stepmania.com) + * fix dirsep_casecmp buglet noted by glenn + * glenn did ask for zzip_fstat, and here it is. + * but glenn's file_dup is not as easy and skipped here. + * otherwise, glenn noted that zziplib is not fully ready for multithreading, + the reason seems to be mostly in the reshared 32k buffer where the + access is not synchronized completely :-( ... effectivly, in MT + all ZZIP_FILE*s need to have a dedicated ZZIP_DIR*buffer. + * update make-doc.py with newest version + +2003-08-18 + * changing license to dual MPL / LGPL + * bumping version code 12.83 = 13.23 which are actually the very + same inside the code + * remove a few compatibility headers at install time. + * add install-exec-hook to add ln -s aliases for sharedlibs + they are being tried again in .spec but that does not + matter as long as it is "|| true" + * adapt all source to carry the MPL alternative license + instead of the old cruft. + * remove staticlinking.txt - it should be covered by copying.htm now + * remove "compats" disthook as well as the complete subdirectory + i.e. rm -r "zziplib/" at top directory (actually, I store it + in a distant place for now.) + * remove _htmpages.ar and _manpages.are from dist tarball + * add toplevel COPYING.LIB + * adapt README and TODO + * remove ac_output(zziplib and bins/zzip-config) + * remove bins/zzip-config.in + * adapt m4 macro and call zzip-config to be archaic + * remove maintainer-mode for "test.zip" + * turn zzip_plugin_io_t into a union reference, the old struct is + still of the same name but a member in there called "fd" + the typedef is no a "union _zzip_plugin_io" instead. + * the member "use_mmap" is renamed to "sys" - we add a #define + in plugin.h to let some software compile with all versions + * in zzip/zip.c, try now with making maplen and pagesize of type + zzip_ssize_t - as it was newly introduce it might help and + perhaps be a little conservative in execution. Before that, + we did use size_t and it was provoking warnings like + comparing/computing signed+unsigned pairs of values. + * add "type" and "write" members to zzip_plugin_io, keep it + backward compatible as much as possible. + * add _zzip_write to zzip/conf.h + * remove ZZIP_WRAPWRAP code in plugin.c + * remove --with-wrapwrap + * introduce a #define _zzip_plugin_io_handlers and + typedefs zzip_plugin_io_handlers and zzip_plugin_io_handlers_t + * oops toplevel PHONY does not work, an automake restriction + * oops, "cat body.htm" should be "cat $(srcdir)/body.htm" + * adding manpages.ar again, just to be sure + +2003-08-14 + * remove _not_implemend macro definitions for shallow-write api + from header zzip.h + * introduce symbol _ZZIP_WRITE_SOURCE that all files should + carry that want to have the declarations of the + shallow-write api + * use that symbol for zzip/write.c and bins/zzip.c + * adding docs/64on32.htm + +2003-08-14 + * for the shallow-write api to compile on win32, we need to + test for direct.h which only exists on win'sh system + or so we assume + * add bins/unzzip + * add bins/zzip + * ooops, zzip_strerror_of should check dir != 0 + +2003-08-13 + * complete zip-write API - no actual implementation so far + * tested shallow-write implementation on solaris+linux+win32 + * and now, call it zzip-12 always + +2003-08-12 + * `make docs` does not always work, so we add `make docu` now + * update make-doc.py + * fix call for make-doc.py + * fix zzip_get16 bad refer that gets detected by make-doc.py + + +2003-08-07 + * implement zzip/write to a degree that it forwards calls to real + files and directories in the system. No zip archives here, + but the accession API has been setup so that applications + can start to pick it up even for versions of zziplib that + have been compiled without zip archive support. + +2003-08-07 + * add doc lines in zzip/zzip.h + * add write-defines including flag-marker ZZIP_NO_CREAT + * add file write.c with empty definitions for write-support + * add the make-doc.py script in its last version - and make its output + the default master files for both html and docbook + * remove all other doc-maker scripts but make-doc.pl and make-doc.py + plus the make-dbk.pl of course + * twist configure.ac to set PYTHON instead of PHP + +2003-08-03 + * make compatibility-headers to issue a warning upon include + +2003-07-31 + * fix a segfault with corrupted central directory - just some checks + for field boundaries + * add a hack to support the fixup-rootdir thing with some simple(r) code + that abuses a few fields in the trailer-structure + * cvs checkout savannah.gnu.org:config into ../savannah.config and, + * add a rule `make configsub` in Makefile.mk to update the two files + uses/config.sub and uses/config.guess to the latest versions. + +2003-07-30 + * creating a 0.12.82 out of the source for 0.10.82 and make up a rpm + spec which does alias the .so files for these generations + +2003-07-29 + * the include of _LARGEFILE_SOURCE to do ZZIP_LARGEFILE_RENAME is + actually a bad idea - the respective symbol does not provoke + 64bit off_t on newer platforms. Only _LARGE_FILES seems to + be correct here for older aix platform to get them define + off_t = 64bit where others are using _FILE_OFFSET_BITS=64 now. + * after changes to README, remember to package updated test.zip !! + otherwise `make check` will fail. + * modify _msvc.sed to include "define ssize_t int" + * use ZZIP_EXPORTS instead of ZZIP_DLL for DLL export, that's the + automatic way of MSVC 6 saying that "zzip" is a DLL project. + * create new msvc6/zzip.dsp and delete msvc6/zziplib_DLL.dsp + * all examples shall import from zzip.dll by linking with zzip.lib + whereas that other zziplib.lib is just the static library + * do a looong and detailed information in README.MSVC6 + * create a rule to pack the *.dll,*.exe,*lib files into a zip + +2003-07-28 + * doc bug in zzip-zip reported by j.scrott.frank + * remind me: unzip from memory seems to be more of a task lately... + * forgot to modify RELASEINFO in rpm for zzip64 variant + * also do not just use -D_LARGEFILE_SOURCE, it does not have the + desired effect on all systems. Instead invent a new name + -D_ZZIP_LARGEFILE to make it happen magically. + * invent a rule to create zziplib64.pc from zziplib.pc for the + renamed libzzip.so -> libzzip64.so + * invent a rule to create zziplib64.la from zziplib.la for the + renamed libzzip.so -> libzzip64.so + * do also rename default libzzip.so to libzzip32.so and then create + a symlink to it under the old name libzzip.so + * create zziplib32.pc and zziplib32.la files accordingly. Following + an application may choose explicitly between 32 or 64bit off_t + version. This allows us to claim now that the default libzzip.so + library may be either of them and not anymore strict 32bit off_t + * aaahm, note that all of these account for rules in the linux rpm spec! + other system do not get this packaging support from vanilla tarfile + * well, better make it lib01 instead of lib0.10 for the rpm name + * already roll out visualc7.zip and msvc6 files in subdirectories, + do not ship them as .zip files + * already adapt msvc6 .dsp files but not yet tested + * rename main "rpm" target into "rpm2" to get rid of the warning message + * use (cd zzip64 && make install) instead of (... make install-ltLIBRARIES) + since otherwise we do not get any .pc file installed (oops) + * while modifying *.la into *64.la, take care to fixup reference to the + "old archive" *.a as well making it *64.a - same for *32.la file. + * some file.c reports there was not previous declaration of some of + its functions, but _only_ in 64bit compile step. + Reason: looks like a gcc 3.2.2 bug, no fix here. + * convert a few "ln -s" into "ln -s -f" in "make install" parts + * update README to point out staticlink model + in a separated LICENSE section. + +2003-07-28 + * add three extra gcc options: -Wpointer-arith, -Wsign-compare, and + -Wmissing-declarations which will help about portability to + platforms where that is enabled by default in -Wall + * sign-compare fix in, zzobfuscated (zzip_size_t -> zzip_ssize_t), + * make 5 functions in zzipwrap/wrap.c global=>to=>static + * add pre-delcare headers for 2 functions in zzip/zip.c + __zzip_find_disk_trailer(), __zzip_parse_root_directory() + * rewording of "ends/tail" in find-disk-trailer which does also find + a little bug (ends-1 or not) in there, It should not have shown any + practical problem so far, also corrected by anotgher little bug + in there (ends-tail > sizeof or ends-tail >= sizeof) + * adding a parts of a patch from Martin Schitter to harden zziplib + for corrupted zip files. + * remove a few duplicates in Makefile.mk, still need to keep "rpm" + * add declaration for zzip_dir_alloc_ext_io into zzip/lib.h + +2003-07-27 + * redefine size_t maplen -> off_t maplen and for each of the calls to + mmap()/munmap()/read()/getpagesize() we cast to size_t - this might + get us rid of a few warnings about signed/unsigned comparisons. + * introduce AC_TYPE_SIZE_T and use the prefixed variant _zzip_size_t + within plugin.h for io->read() calls. That makes for a little + bit of portability - it seems some platforms (dot-net f.e.) + do not `typedef unsigned int size_t;`, perhaps because int is 16bit + and a 32bit or even 64bit entitity is needed. + * now we do not need to AC_COMPILE_CHECK_SIZEOF(size_t) anymore, perhaps + even stand io-wrap is not needed anymore. Let's see. + * both changes need update of zzip/conf.h for _zzip_size_t plus + - plugin.h for io->read(,,size_t) + - zzip.h for zzip_file_read (,,size_t) + - zzip.h for zzip_read(,,size_t) + - zzip.h for zzip_fread(,size_t,size_t,) + - zzip.h for zzip_seek(,off_t,) + - zzip.h for zzip_tell(,off_t,) + - file.h int => size_t for zzip_file's restlen crestlen usize csize + * the io->seeks(,off_t,) has not been respected so far sometimes. + and like lseek(2), we define the returntype of zzip_seek as off_t + * introduce zzip_ssize_t as well, and modify + - zzip.h for zzip_read and zzip_fread and zzip_file_read + - plugin.h for io->read() return type + * dot-net bug in aligned4() - sizeof(long) < sizeof(void*) !! + better use off_t in the hope that it does fix it + * tested on ia32-linux, alpha64-linux, sparc32-solaris + * ooops, we need to update io-plugin examples and documentation as well, + since we define a custom _read() routine righ there. + +2003-07-26 + * updating to AX_SPEC_DEFAULTS macro + * zzshowme does not work with no libzzip installed in the system + * add automake option dist-bzip2 + * use tar.bz2 for rpm build + * add dist-bzip for the latter + * use zziplib-lib0.10 package which provides zziplib and libzzip0 + * forgot to add *.la files into the rpm devel package + * AC_SET_RELEASEINFO_VERSIONINFO => AX_SET_VERSION_INFO + * adjust all RELEASEINFO -> RELEASE_INFO accordingly + * and choose 0.10.82.pre1 as a vesion number for testing + which is possible now as the new macro does it right. + * forgot override of default_includes in test/*.am + * somehow ax_prefix gets the wrong input, i.e. _config.h instead of config.h + so we make that one explicit now + +2003-05-13 + * the off64_t mode renaming for 64on32 was done incorrectly and + it lead to problems on solaris8 - fix it. + * fixup `make check` to work on subdir build + +2003-05-11 + * adapt README file to clarify LICENSE details as suggested by + a discussion with ACE/TAO developers that want to use the + library for some compressed xml archives. + * fix a few zzip_char_t bugs that got visible in MSVC mode as + reported by Olge Ryabukha + * kill sfnet strand of the rpm build, the docs are installed + into the share/groups part and the omf file points to that + place. The index.html file is the one at sourceforge while + the other one is the entry point of the local documentation. + +2003-04-21 + * quite a few updates are need to --enable-builddir by default + * watch out: subdir build is the default now! + +2003-04-20 + * pick up AX_ENABLE_BUILDDIR + * throw out ac_subst CONFIG_ARGS + * use AX_SPEC_PACKAGE_VERSION + +2003-04-20 + * memory leak in zzip/file.c - adding free(dir->realname) zzip/zip.c + in function zzip_dir_close called via zzip_file_close + (bug reported by Olge Ryabukha, thanks!) + * "/" is hardcoded for finding subpaths but on windows that could be + a backslash as well. That should be handled better, we add some + alternative implementations for dirsep_strrchr and dirsep_casecmp + but the default is OFF!! even on WINDOWS !! + * thereby seen another problem: we did deliberatly use strcasecmp but + this symbol is not available on all unix systems - the manual + says its a BSD4.3 addition. Some other systems call it strcmpi + or stricmp instead, or they do not have it at all. Here we add + a configure rule to check for that symbol, and when we do not + have it then we _enable_ dirsep_casecmp automatically. + +2003-01-16 + * change extension of intermediate docbookfiles to ".xml" + * throw out attempts to compile docs with php + +2003-01-15 + * lots of doc updates in between. (forgot to document them). + * a zzip-config update, and installing an aclocal macro now. + +2003-01-06 + * defattr(root,root) !! - why that had been forgotten? hmmm... + * allowing for --disable-debug to clean cflags from -g entries + but it has not effect on callframe generation... actually. + +2003-01-05 + * we need to stop the manpages.ar bloat - now! + +2003-01-05 + * add largefile tests in configure.ac + * add largefile detection in zzip/conf.h + * add renamings for zzip_telldir/seekdir in zzip/zzip.h + * add extra exports in zzip/dir.c to have both 32bit and 64bit names exported + i.e. zzip_telldir _and_ zzip_telldir64 + * add renamings in zzip/plugin.h to ensure that 64bit-off_t-compiled zziplib + is not given io-callbacks being from another program that is actually + compiled as 32bit-off_t and where therefore arguments do not match. + * detected a dubious export of "aligned4()" - rename this export now. + * also rename everything having "_io" in the name - just to guard ourselves + from the case where two -lzzip are in the libpath and one is + compiled 64bit-off_t while the other is not. + * rename the younger function s/zzip_open_shared/zzip_open_shared_io/ + * make up functions for zzip_open_ext_io and zzip_opendir_ext_io for the + case of 32/64bit dual systems where lib is compiled in largefile mode. + Let the call succeed unless an "io" structure was given - return + the EOVERFLOW errno as specified in the large.file WG documents. + * make all parallel defines for 32/64 bit dual off_t dependent on + defined EOVERFLOW and defined PIC - i.e. only for dynamic linkage. + * adding LARGEFILE_CFLAGS into zziplib.pc and bins/zzip-config.in + * NOTE: the default for --with-largefile is still OFF !! + * NOTE: our zzip_readdir is not depenent on off_t size + * adding -64 into the --release info for the sharedlibrary build + it should have been a --variant but such does not exist so far + in libtool, sorry. + * extract AC_SYS_LARGEFILE_SENSITIVE and put it into an extra ac-macro + * clean zzip/file.h from compatibility-install as zzip-file.h + the structure in there contains zzip_off_t items and they + should be internal always anyway - so disallow access for + old programs now just to be sure. + * adding zzip64 compilation into zziplib.spec - an rpm package will now + install both 32bit off_t and 64bit off_t variants of the sharedlib + * note: we do not copy 64bit zzcat into the rpm, perhaps we should? + +2002-12-31 + * add make check-sfx + * add zzipself.c and zzipsetstub.c for the sfx test + * zzip_file_open takes o_modes flags, clarify in zzip.h + +2002-12-27 + * adding scrollkeeper omf file generation in docs/ + * adding omf file installation in docs/make-install-doc + * replace %post-doc message in zziplib.spec with scrollkeeper-update call. + * need *.pc *.omf in CLEANFILES now + * mingw32 crossgcc tests for win32 dirent emulation - did need some fixing + +2002-12-23 + * adding generation/installation of pkgconfig files + * making SDL a build-requirement for rpm packaging + +2002-12-22 + * add compatibility subdirectory "zziplib" + * zzipback.sed to create zziplib/* files from current release files + * include into distribution tarball + * IMPORTANT: flashback - 12.24 is now called 10.74 - + the old source line will cease to exist, only the compatibility + directory will survive a while - that should put some pressure + on developers to update to the new source tree. And it saves me + some work to keep two trees in sync. + +2002-12-20 + * fix some problems of make-doc.pl with the current project + * make a standard inlude info referring to zziplib.h as well + * unpack htmpages.ar on SFNET and register it on the frontpage + * dont forget to modify includes of internal headers + * ... + * fixed an annoying bug in make-doc.pl + * include htmpages.ar into the tarball + +2002-12-19 Guido Drhaeim <guidod@gmx.de> + * completed new directory structure - the library is called 0.12.22 as + to match 0.10.72, it's the same C source in its content + * install-headers modified - the new structure is now compatible both + as a shared libary (binary compatible) and for the include headers + too - source compatible not only for function names but also for + the #include lines + * 0.12.23 fixes a bug in make doc: the xmlto html was never done. + * and we implant make-doc.pl which was founded on the base of the local + zzip-doc.pl but has since gone a lot further. It's currently just + a third variant but it is now used as the primary master default. + +2002-12-18 Guido Draheim <guidod@gmx.de> + * man page update for zzip_open_shared (it turns out to be a good name). + * let frontpage point to http://www.gzip.org/zlib for primary zlib site. + +2002-12-17 Guido Draheim <guidod@gmx.de> + * introduce zzip_open_file that may have an extra argument of a factory + file to share the zzip internal directory if that is possible. + * introduce zzip_freopen to take an extra argument. The supplied handle + is freed unless of course one puts ZZIP_FACTORY into o_modes so + that it becomes a wrapper around zzip_open_file + * the zzip_open_file, in that case, is the old zzip_open_ext_io call + but extended with checking the factory stream for a matching + basename. + * while being there: introduce ZZIP_ALLOWREAL o_mode that will make it + that a real file is open/read/close with the standard posixish + routines. This is most useful when having an obfuscated zip + file around but during development one wants to sometimes check + with a real file - so the call mode is something in the middle + of ZZIP_ALLOWREAL - ZZIP_PREFERZIP|ZZIP_ALLOWREAL - ZZIP_ONLYZIP + where the middle is for "yet another file not yet included", + hmm, perhaps a cheat file? ;-)=) + * cleaning rwops example: fix the mode check, it's not needful to start + with "r" to be a readfile mode, it may be somewhere in between. + * introduced __zzip_dir_parse as a cut off from zzip_dir_fdopen_ext_io, + but it did turn out to be not necessary, so it is made static in + the end. Still, it works as documenting the control flow better. + +2002-12-17 Guido Draheim <guidod@gmx.de> + * win32 mmap removing extra braces + * win32 dirent implementation added - new file __dirent.h + and modified zzip-dir.c + * a couple of arg[n] -> argv[argn] cleanups. + * a missing argc > 1 check added. + * all changes due tests / bug reports by Thomas-dot-Eder-at-nmi-AT + +2002-12-16 Guido Draheim <guidod@gmx.de> + * the infozip `zip` tool puts out messages per default on some machines + fix by adding >/dev/null in some places of Makefile.am + * the hpux10.20 platform has sys/mman.h but no MAP_FAILED + the `man mmap` says it returnes "-1" as done on all other unix + compatible platforms, so we add a default define ((void*)(-1)) + * update TODO file with some hints on test runs. + * add --with-zlib configure call to make it easier to specify a path + * make zlib error messages to point to this configure option. + * beautify error output on all other options as well. + * create `make brute` to make a bruteforce test + * solaris8 make has a problem with $< ... change sometimes into $? + * freebsd/darwin have 64bit off_t by default - and that reveals a problem + in the zzip_telldir/zzip_seekdir code. Let's change the code to make + it return/receive a byte-offset of "dir->hdr" to "dir->hdr0". + This makes printing of those values also more intelligible (if ever). + * ia64-linux reveals a problem in "default_io" since size_t is 64bit. + We modify --with-wrapwrap to autodetect this case. This is okay + since zip-files can not get bigger than 32bit offsets anyway. + +2002-12-16 Guido Draheim <guidod@gmx.de> + * merging corrected README.SDL and __hints.h + courtesy of Thomas-dot-Eder-at-nmi-AT + * update CFLAGS ac-macros to the new generation as shipped with + latest ac-archive-0.5.39 (did upload just yesterday...) + +2002-12-14 Guido Draheim <guidod@gmx.de> + * many hours of debugging - I don't remember which flaw came in through + the latest changes or which others were there before *sigh* + * e.g. the error-code mappings were refined on linux errno codes + * fix "caseless" bugs reported by Thomas-dot-Eder-at-nmi-AT + * fix MSVC related flaw when taking a casted value as an lvalue + * replace AC_CREATE_PREFIX_CONFIG_H with new style AX_PREFIX_CONFIG_H + * invent zzip-msvc.sed to turn config.h.in into zzip-msvc.in and + finalize a fresh zzip-msvc.h via AX_PREFIX_CONFIG_H + +2002-12-13 Guido Draheim <guidod@gmx.de> + * shown by Mike Nordell tamlin-at-algonet-SE we can support win32 mmap + * modify configure.ac : if have:winbase.h then auto -enable-mmap + * refactor mmap'ing - it goes into __mmap.h and uses the io->use_mmap value + and that include file contains both posix and win32 mmap variants + * rewrite pagesize/mapoff calculations - this should be faster in itself + and also easier to maintain in the future for being more obvious. + * rewrite read/write defines and wrapwrap's. The zzip-conf.h does now + contain defines for _zzip_read/_zzip_lseek - and it should us get + rid of the nasty win32 problems with redefining _read/read + * refactor DBG defines - put them into __debug.h - oops, xbuf() was + an exported symbol, better be not. Use only newer NOTE/WARN macros! + * implant __hints.h include - that's taken from another project but it + is so damn useful ;-) + +2002-12-12 Guido Draheim <guidod@gmx.de> + * modifizied zzip-zip.c to include a sanity check on getpagesize () + for mmap () functionality and ZZIP_BUFSIZ (the default is good). + * modify configure.ac : const char strings + * modify configure.ac : strict prototypes + * modify configure.ac : all warnings + * ... and so it reveals something missed along ;-) + +2002-08-27 Guido Draheim <guidod@gmx.de> + * modified zzip-stdint.h along the example patch for FreeBSD done + by wjpalentstijn at sourceforge in projet uwadv. + +2002-07-24 Guido Draheim <guidod@gmx.de> + * did teach myself php over converting zzip-doc.pl into zzip-doc.php + * added php-test and another way to create the docbook file, with php + +2002-07-20 Guido Draheim <guidod@gmx.de> + * lots of fixes around docbook/manpage - and generate a zziplib.3 + overview page. Fixes also lots of comments in the sources. + * modified fopen-mode interpration nicely. + * added zzip-api for full overview of the zzip's API + +2002-07-19 Guido Draheim <guidod@gmx.de> + * greatly enhanced docbook/manpage generation - including to attach + author and license info from the respective source file header + +2002-07-18 Guido Draheim <guidod@gmx.de> + * extended the perlscript to generate zziplib.docbook + * use xmlto to generated manpages.ar + * install-man3 target and push into rpm-devel package + +2002-07-17 Guido Draheim <guidod@gmx.de> + * no new code, just doc updates. The perl-script is now capable to + combine _ext_io functions with their non-ext/io cousin, and the + sources have been modified to honour this new mode. + * the perl-script is now ready to spit out other data like docbook + files that we can generate man-pages from later. + +2002-07-16 Guido Draheim <guidod@gmx.de> + * extern-C in SDL_rwops_zzip.h ... and ifdef'able DECLSPEC for staticlinking + * zzip_fopen allows to greatly simplify SDL_rwops_zzip.c + * zzxordir.c zzxorcat.c zzxorcopy.c invented + * lots of new documentation added + zzip-extio.html zzip-xor.html zzip-refs.html + * new checks that test the zzxor examples + * and found an zzxor bug in the course + +2002-07-15 Guido Draheim <guidod@gmx.de> + * Michael-dot-Fink-at-asamnet-dot-de did some code review while + going after a specialty he wanted to do with the libs, and therefore.. + * PREFERZIP did never test real file - stupid bug, inverted logic.... + * add ZIPONLY zzipmode - we have plenty of options availabe... on 32bit + platforms however, since I want to keep with the access-bits in + the lower parts. + +2002-07-12 Guido Draheim <guidod@gmx.de> + * watcom-c-10.5 project file added + * used my old watcom compiler to debug the win32 problems, and it turned + out to be a mismatch in proccall for zlib - while the default in + zlib.h inferred WINAPI, it turned out that zlib114dll.zip had in + fact been compiled with __syscall procframe callmethod. Duh!!! + * some things had to be rearranged in header files - most classically it + seems that this compiler does not support __inline in C mode. + +2002-07-11 Guido Draheim <guidod@gmx.de> + * convert all API const types into those with _zzip_const and use new + types like zzip_char_t and zzip_strings_t throughout the sources. + * add ZZIP_RDONLY and friends. Do not use fcntl bits anymore, and limit + use routines to convert them into O_DEFs later one in the next + version of this lib - here we just declare them to be their O_DEFs + but code should start to pick up ZZIP_DEFs in the meantime. + * add zzip_fopen and friends as another type of magic wrappers. + * modify open_ext_io to use receive separate arguments for the two + zzip extraflags - use these from now on, the others are just + for limited backward compatibility. + * modify all _close functions to return "int". + +2002-07-10 Guido Draheim <guidod@gmx.de> + * Marlin Prowell mbp-at-cadalog-inc-dot-com did hit a problem on FreeBSD + showing off a config problem - the configure.ac macro for off_t is + written to be _undefined_ if off_t existed in the system. Instead we + chose to defined zzip_off_t into a "long" as it is needed on win32, + and since FreeBSD on LFP32 uses OFF64 it did fall flat on calls to + lseek - without io-wrap the gcc did cast them correctly, so it worked. + * the fix: use off_t if zzip_off_t undefined. Add a define zzip_off_t into + long in conf-msvc.h. Add a configure-option to have wrappers for the + default lowlevel calls as suggested by Marlin but I choose to have + them off by default - a bsd ports package may start using it. + * there have not been reported problems in the last three months where only + developers knew about the new version. Guess it's time to push this + tarball and announce it on freshmeat. + +2002-04-30 Guido Draheim <guidod@gmx.de> + * fix typo in zzip-zip.c: __USE_MMAP -> _USE_MMAP + * if zlib.h not found, make it a fatal exit + +2002-04-25 Guido Draheim <guidod@gmx.de> + * adding a few more `make check` rules for bigger zip files + * add even negative tests + * add some spaces in error-messaging in zzdir.c and let return + an exitcode when some argument files could not be read + +2002-04-24 Guido Draheim <guidod@gmx.de> + * apply patch from Mike Nordell + changes all "const char * *" into the intended "const char * const *" + changes some typecasts + corrects comment and adds some + and two fixes + * put the updated MSVC6 files into the project, again Mike Nordell + * me, add new zzwrap.dsp to DIST in Makefile.am, following Mike's addition + * me, modify some typecasts to use off_t/size_t where apropriate + * modified COPYING.ZZIP to be a bit more general than just for ZZIPLIB + as noted by Tomi Olilla + * zzipwrap demo_callback, how can we do void* and char* at the same time... + +2002-04-23 Guido Draheim <guidod@gmx.de> + * changed ssize_t into int in zzipwrap-mem for portability reasons + * fix zzip_dir_fdopen_ext for access to uninitialized io-vtable + (thanks to Lutz Sammer johns98-at-web-dot-de for testing) + +2002-04-22 Guido Draheim <guidod@gmx.de> + * add MSVC6 project files contributed by Mike Nordell tamlin-at-algonet-dot-SE + * add plugin_io-patch from Mike Nordell + and dump the iowrap-patch from Andreas Shiffler from earlier release + * append the Mike Nordell's zzobfuscated.c to Makefile.am + * add a new file COPYING for new less-strictly license + after Tomi Ollila has transferred full copyright to me + * remove Tomi Ollila from all copyright entries in the sources + but honour his name where apropriate + * modify LGPL hints in sources and point to COPYING.ZZIP as well + and change copyright year info + * create COPYING.ZZIP with some general LGPL exceptions. + * use newer AC_CREATE_CONFIG_H macro and start using acinclude.m4 + to allow retooling of the project. + * and use zzip_off_t instead of ZZIP_off_t (but keep backward compatibility) + * apply patch for the problem detected and corrected by + Steve Dillon steved-at-phone-IVR-dot-com + * try with an updated ac_create_prefix_config_h due to a bug report by + John W. O'Brien john-at-jugglers-dot.com + where his shell-and-echo combination did interpret \\1 twice. + * add use_mmap flag to plugin_io_t, so the feature can be used + along USE_MMAP configured setups + * change USE_MMAP #ifdefs to use if()s and to rely on the + compiler to do code removal for unreachable code + * remove tell() part of plugin_io and rename seek()-indirection + to seeks()-indirection using a tells()-macro in zzip-file + * also rename s/seek/seeks/ in zzip-zip and kill the (*function)(x) + for the indirection functions into just function(x)-calls + * fix zzobfuscated example code - there's no read() without unistd.h + in unix, and global zzip_install_io had been removed lately. + * add zzipwrap-io.c and zzipwrap.c from Andreas Schiffler's patch + on the new ground of Mike Nordell's plugin_io + * modify zzipwrap sources to work with plugin-io + * add io pointer to dir-structure, and use it as the default for file-structs + * __zzip_open_zip is called __zzip_try_open now and takes two arguments + * typedef struct zzip_plugin_io * zzip_plugin_io_t; + * zzip_opendir_ext_io .. for magic convenience + * create new zzipwrap.la in Makefile.am + * move plugin_io struct from zziplib.h to zzip-io.h + along with its helper functions + * change all filesize into zzip_off_t + * s/zzip_find_disk_trailer/__zzip_find_disk_trailer/ (additional io arg) + * s/zzip_parse_root_directory/__zzip_parse_root_directory/ (ditto) + +2001-10-11 Guido Draheim <guidod@gmx.de> + * added zzipwrap feature contributed by Andreas Schiffler + +2001-09-18 Guido Draheim <guidod@gmx.de> + * fix bug for `zzip-config --cflags` + which did print /xx/include instead of -I/xx/include + (thanks to Roger Ostrander <denor(at)yahoo.com>) + * change the for-loop in zzip-config - the "for i ; do" is not portable + because I had problems on solaris-sh. Use "$@" which expands + to a list (!!) of argv entries for this for-loop even for + arguments that contain spaces. fascinating. + * use AC_HELP_STRING ... the `configure --help` screen got a bit + misformatted lately. + * add a `make check` rule. + +2001-08-19 Guido Draheim <guidod@gmx.de> + * add that /programs magic to the $prefix check in configure.ac + * add that /usr/share magic to the $prefix check in configure.ac + * fix zzip-sdl-rwops.html layout (and copying.zlib link). + * fix some flaws in sdl-rwops example source (just by code review). + * add unistd.h include to zziptest.c to silence off the warning about sleep + * add non-dll compile to extern in zzip-conf.h - does that fix anything? + +2001-08-18 Guido Draheim <guidod@gmx.de> + * SDL_rwops_zzip.c/SDL_rwops_zzip.h SDL-example file. + * change all filename args to be const + * add ZZIP_const to zzip-conf.h, but do not use it for now. + It seems that all current lib-users have a modern compiler... + +2001-08-16 Guido Draheim <guidod@gmx.de> + * export zzip_dir_free / zzip_dir_alloc + * bring in fileext field to check for multiple fileextensions. + * make zzip_open check for multiple (default) fileextensions. + * add ifdef USE_ZZIPLIKES to implement feature proposed by + Julien Cayzac <deepmind(at)jessica.brainlex.com> + * make zzip_open check along the dirpath for a zip-file + a feature proposed by Lutz Sammer <Johns98(at)web.de> + +2001-08-15 Guido Draheim <guidod@gmx.de> + * add "stroustrup" style to all c files to ensure that casual + developers do not trash the layout unintentionally. + * modify examples a bit with more newlines / comments. + * re-license examples to ZLIB license + * include COPYING.ZLIB into doc_FILES + +2001-08-10 Guido Draheim <guidod@gmx.de> + * change frontpage of webpages - including a few crosslinks to + other projects + +2001-08-07 Guido Draheim <guidod@gmx.de> + * split version X.Y.Z into -relese X -version-info Y:Z + * adding --disable-thread-safe, and add -thread-safe linkage by default + * modify releaseinfo for with-debug + * install-zip target to make a windows package + * change serial to _vendor - rpm has never been used for other than linux + +2001-08-06 Guido Draheim <guidod@gmx.de> + * reorganize docs, update docs to new style + * split version X.Y.Z into -release X.Y -version-info Z + +2001-08-05 Guido Draheim <guidod@gmx.de> + * add zzip-msvc.h, a header file that will be included when + a windows compiler is detected in zzip-conf.h, e.g. + _MSC_VER or __BORLANDC__ + * mv index.html zzip-index.html and add makerule that patches + the VERSION in before installing it as index.html + * add a makerule to build sourceforge htdocs and add it + to the rpm build. + * add generic patches for libtool into configure.ac + +2001-07-18 Guido Draheim <guidod@gmx.de> + * check up bugs in automake 1.4beef, now using a rule to + override AUTO* in non-maintainer-mode. we also set + libtool to silent in non-maintainer-mode + * docs are installed to $datadir/doc/$package as default + * rpms can now be built. + * create --with-docdir and let it be filled in rpm-configure + so that docs will end up where rpmopt says it should. + * ChangeLog goes into %doc of rpms. + * uhmm, forgot to install the test*.c files into the docdir + * the bin rpms had not been built + * compress into base and devel package + * errnolist should be static + +2001-07-17 Guido Draheim <guidod@gmx.de> + * nuke Makerule system, use plain autotools style including + configure && make install to rebuild + * update Makefile.am (which is new now) + * use next-generation autotools as a basis, update configure.ac + to newer style, update configscreen at the end of file + * check perl in configure and let it default to "echo" + * check HAVE_ defines coming from config.h - it is not anymore + included by zzip-config.h, so each config-def usage + must now use the prefix'd version + * provide a zziplib.spec file + +2001-01-05 Guido Draheim <guidod@gmx.de> + * apply zzip_seek-patch from Ted [sourceforge.net/users/tam4] + * -> 0.10.12 + +2001-01-02 Guido Draheim <guidod@gmx.de> + * gone through a couple of trial and error versions until + I finally arrived at a mingw32msvc zzip.dll - basically + I had to update the included libtool files to 1.3.5 + and the zzip.dll source-files have a ZZIP_DLL define + before the first include that points to zzip-conf.h - + and there is the magic about dllexport and dllimport. + Hopefully the same can run under MSVC without further + changes to the sources. + * try to package a zip-file that contains the relevant files + from the mingw32msvc install, so that windows user + get a clean dll without the need to compile it. + * -> 0.10.11 + +2001-01-01 Guido Draheim <guidod@gmx.de> + * received a patch for MSVC compatibility from Ted A. (@lehigh.edu) + which made me to look after the project again. There + were two support requrest during summer that asked for + MSVC support, especially a prebuilt dll and headers. + * added AC_PREFIX_CONFIG_H that I made originally for + another project. It enables me to push the configure + detections into a global include/-dir. Ted's patch + used an `IFDEF MSVC DEFINE HAVE_SYS_TYPES_H` which + is a symptom of using config.h&HAVE_CONFIG_H and + zzip-file.h&IFDEF HAVE_xx. Change all header-IFDEF-HAVE + to use IFDEF-ZZIP_HAVE, and install zzip-config.h + along with the other headers, change the original + include"config.h" in zzip-stdint.h and make it rely + on zzip-conf.h - where zzip-conf.h includes zzip-config.h + and lists the detected features to be used, along with most + important extra defs for MSVC compatibility. (!!!) + * added AC_COMPILE_CHECK_SIZEOF (cross-compile clean!) + to always use the correct STDINT defines. Delete + use of glib.h if present, it's not needed anymore. + * use ZZIP_off_t instead of off_t + * prepare for a MSVC' ZZIP.DLL with _zzip_export defines.. + -DZZIP_DLL -> declspec(dllexport) + -DHAVE_LIBZZIP -> declspec(dllimport) + * make sure, __attribute__ is okay with non-gcc compilers + and attache packed-attribute to *all* zipformat-structs. The + whole of zzipformat.h is also enclosed in pack-pragmas. + * -> 0.10.7 + * create zzip-config.in and install it. + * mingw32msvc has shown that we need -lz on the command-line + to resolve a few symbols + * go automake + * install zzip-config along + * mingw32msvc does not build with cross-make.sh as seen on + http://libsdl.org/Xmingw32 - it needs the cross-tool/lib + just as well. There we have LDLIBADD in Makefile.mk now. + Now everything works for making win32 target with cross-tools. + * The rest of the make-struture should ensure to be able to + create an MSVC nmake Makefile - the Makerule.am is clean and + can be directly included... hopefully. + * -> 0.10.8 + + +2000-06-03 Guido Draheim <guidod@gmx.de> + * Tomi did a final test round for solaris, oh well, + configure needs some fixes... + * checking for myself at the university's solaris2.6 with + gcc-2.95.2, hmm... there's an sys/int_types.h that + seems to define some of C9X int-types, put it into + the configure.in and know about it in zzip-stdint.h + (btw, glibc seems to have include/inttypes.h that + includes stdint.h). + * tomi did report a problem with gcc 2.7.2... probably + sth. about -rpath + * release 0.10.6 and going to announce it... + +2000-05-31 Guido Draheim <guidod@gmx.de> + * created the main doc html files, index.html, zzip-zip.html + and zzip-file.html. the README and README.API is deleted, + and the TODO is a bit updated. + * This version is meant to be announced very soon now. + * release 0.10.5 and contact Tomi for his final nod. + +2000-05-31 Guido Draheim <guidod@gmx.de> + * ifdef HAVE_SYS_STAT_H where stat is used. Removed + the stats from zzip-file.h - it will now just try + to open the file or zip-file and assume that + open(2) will fail if the file is not there. I do + hereby assume that the returned fd is seekable.. + * two new functions, zzip_dir_real and zzip_file_real + to check if the ZZIP_XX structures are wrapping a + real file or directory. Otherwise it is a zip-archive + or a zip-contained file respectivly. + * zzip_compr_str does now know about stat-types and + will return names for S_ISTYPE bits. + * remove zzip_fd. It was identical to zzip_dirfd + whose name is consistent with dirent.h + * zzip_stat -> zzip_dir_stat since it does not neither + return a stat structure nor does it use stat(2) + * Checking the doc-comments + +2000-05-30 Guido Draheim <guidod@gmx.de> + * zzip_fp -> zzip_file and _fp_ functions to _file_ + * zzip-stdint.h to ensure iso c9x typedefs + * ZZIP_GET16/32 macros in zzip.h header. + * minor updates in cosmetics and documentation + * have full replacements for dirent.h functions, + the zip-specific functions are now called + zip_dir_open (and more alike). The zzdir can + now show a list of files in a real directory, + or magically the files contained in a zip-arch. + * release 0.10.4 + +2000-05-29 Guido Draheim <guidod@gmx.de> + * zzipmain -> zziptest and some cleanups + in the Makefile. zziptest is now just + another test program, so it gets compiled + in full similarity with zzcat and zzdir. + * removed zziptest from install-bin + * the long forgotten simplicistic dependency + rule is now in here too. + * cosmetics to pointer declar' stars in + zziplib.h + * ZZIP_FP -> ZZIP_FILE and + zzip-fp.h -> zzip-file.h + * removed the use of zzip.h where suggested + by Tomi. (use public zziplib.h instead) + * removed errno.h from zziplib.h + * printing configuration at end of configure. + * add install-includeHEADERS rule, so that + zziplib.h does now get installed. + + +2000-05-27 Guido Draheim <guidod@gmx.de> + * zzipformat.h carries information about the + zip-file structure. The typedefs are now + used to access members of the zip-archive + (instead of using the offsets directly). + * notice that the members are declared + bytewise due to compiler semantics that is + making a structure packed&aligned to the + greatest common size (which would be 4). + setting as attribute(packed) is not very + portable. + * reworked the files, esp. zzip-zip.c and + zzip-ar.c + * _USE_MMAP in autoconf, including option + and CFLAGS setting. instead of open/read + to a scan buffer the zip-file is mmapped + and scanned directly. + * _LOWSTK in autoconf, including option and + a CFLAGS setting. Still need a scan buffer + and this flag tells us not to carve the + scan buffer from the auto-stack and use + instead some malloc for the scan buffer. + * DEBUG in autoconf, including option and + a CFLAGS setting. The macros should now + be able to be found everyone and only. + * revamped EDH find routine, dumped old-style. + * revamped read-EDH to use mmap and to use + copy/read only for the parts we need. The + read-EDH buffer is not limited to 32K + anymore and can have any length. No realloc + need anymore. + * opendir does not allocate the cache.buf32k + anymore - it does have no need for it. the + buffer is still cached for subsequent Open + calls. May want to setvbuf later. + * a few renamings to be more bits/dirent.h-like, + so many things are now called d_name and + d_reclen instead of name or next as before. + * renamed the package to "zziplib" as being + suggested by Tomi. + * release 0.10.3 + +2000-05-26 Guido Draheim <guidod@gmx.de> + * -release at link-line for the lib + * zzcat.c as a test program, which uncovered + a few flaws. + * a flaw w/_fd_opendir when being given a + non-inited err-return-variable and no + error did occur. + * the error to errno table was incomplete, + and the ZZIP_INFLATE error is superfluous. + * zzdir.c as a test program, needs still to + be given the full zip-arch name. + * changed member names of zzip_dirent to + match similar names in dirent and stat, + (ie. d_name and st_size) and added furthermore + a z_size that returns the compressed size. + * little updates to names and comments. + * release 0.10.2 + +2000-05-22 Guido Draheim <guidod@gmx.de> + * merge with zip08x-0.9.6 - actually just + a bugfix for zzip_fp_open IGNOREPATH - + I even applied it in a different way than + Tomi did. + * bugfixes for zzip_open, it did not always + set errno(2) to the value of zzip_errno. + * The zzip_read is now seperate from + zzip_fp_read, so that setting errno(2) is + only done in zzip_read, not in the zzip-touching + function. + * zzip-doc.pl to generate libzzip.html + * release 0.10.1 + +2000-05-21 Guido Draheim <guidod@gmx.de> + * drop-in replacements ready for daily use, + just use zzip_open with a normal path to + a fs file. If that file is not found in + a normal fs directory, then the path is + splitted into a basepath and a filename, + a ".zip" is appended to the basepath to + form a zip-arch name, and the filename + is then searched inside the zip-arch if + that one exists. Very nice for distribution + of a subdirectory full of scripts and that + is what it is meant for - the PFE will be + able to use this one for Forth-files. + * have a VERSION file containing "0.10.0" and + add some rules to Mk-rules + * start with in-source docs that will be used + for documenting the lib calls. A jdoc like + doc extractor should be able to grok these, + I'll see to release docs with the next + release, but this time... + * make it release 0.10.0 and upload it to + pfe.sourceforge.net/pub where it will lurk + around until I contacted Tomi. He seems to + be currently working on zip08x + +2000-05-17 Guido Draheim <guidod@gmx.de> + * decided to have it actually called zzip_ and so + all of the stuff is going to get renamed again. + +2000-05-16 Guido Draheim <guidod@gmx.de> + * obtained Tomi's code and made changes so that the + resulting library is more portable, esp. the glib + usage is being abolished. The name of the library + (and package) has been renamed to libunzip and + all types, consts and funcs to now carry the unzip_ + prefix. + * autoconf !!!! + * drop-in functions that can be made to easily replace + dirent and filefd functions. + + +Mon Apr 5 11:23:46 2000 Tomi Ollila (too@iki.fi) + + * Release 0.9.5 + + * Made some tiny modifications after Matthew's code. + +Sun Apr 4 8:30:00 2000 Matthew D. Campbell (matt@campbellhome.dhs.org) + + * Cleaned up compile warnings in SuSE Linux + + * Cleaned up code for cross-compilation with Xmingw32 + + * Modified zipx.h to support linking to C++ apps + +Wed Jul 28 11:23:46 1999 Tomi Ollila (too@iki.fi) + + * Release 0.9.4 + + * Fixed support for simultaneous open files with each + open `ZipFile'. + +Thu Jul 22 11:57:46 1999 Tomi Ollila (too@iki.fi) + + * Release 0.9.3 + + * Added premilinary README.API. + +Sat Jul 10 11:49:58 1999 Tomi Ollila (too@iki.fi) + + * Release 0.9.2 + + * Fixed code to read start-of-file offset from local header + instead relying directory info is sufficient (were TOO naive + about that, the first user reported this library won't work + with his archives). + +Sun Jun 13 20:40:11 1999 Tomi Ollila (too@iki.fi) + + * Initial release (0.9.1). diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/Makefile.am b/Build/source/libs/zziplib/zziplib-0.13.58/Makefile.am new file mode 100644 index 00000000000..f95935f30d9 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/Makefile.am @@ -0,0 +1,78 @@ +AUTOMAKE_OPTIONS = 1.4 foreign dist-bzip2 +ACLOCAL_AMFLAGS = -I m4 +WANT_AUTOMAKE = 1.7 +WANT_AUTOCONF = 2.57 + +DIST_SUBDIRS = zzip zzipwrap bins test docs SDL +SUBDIRS = zzip zzipwrap bins test docs @SDL@ + +# see Makefile.mk for the "make rpm" target +rpm2: dist-bzip2 $(PACKAGE).spec + rpmbuild -ta $(PACKAGE)-$(VERSION).tar.bz2 + +zzip.html zzip.xml zzip.pdf \ +doc docu clean-doc clean-docs clean-docu \ +man manpages htmpages unpack clean-unpack \ +omf install-omf install-doc install-sfnet install-man3 x : + (cd docs && $(MAKE) `basename $@`) + +sdl testsdl test-sdl install-sdl : + (cd SDL && $(MAKE) `basename $@`) + +check-test0 check-test1 check-zzdir check-zzcat \ +check-zzxor check-zzxordir check-zzxorcat \ +check-sfx check-readme : \ + (cd test && $(MAKE) `basename $@`) + +MSVC8 = msvc8/README.TXT msvc8/zip.exe msvc8/test1.zip msvc8/test.zip \ +msvc8/zzdir.vcproj msvc8/zzipself.vcproj msvc8/zzip.vcproj \ +msvc8/zziplib.sln msvc8/zzipsetstub.sln msvc8/zzobfuscated.sln \ +msvc8/zziplib.vcproj msvc8/zzipsetstub.vcproj msvc8/zzobfuscated.vcproj \ +msvc8/zzcat.sln msvc8/zzipself.bat msvc8/zzip.sln \ +msvc8/zzcat.vcproj msvc8/zzipself.sln msvc8/zziptest.sln \ +msvc8/zzdir.sln msvc8/zzipself.txt msvc8/zziptest.vcproj + +MSVC7 = msvc7/pkzip.exe msvc7/test1.zip msvc7/test.zip \ +msvc7/zzdir.vcproj msvc7/zzipself.vcproj msvc7/zzip.vcproj \ +msvc7/zziplib.sln msvc7/zzipsetstub.sln msvc7/zzobfuscated.sln \ +msvc7/zziplib.vcproj msvc7/zzipsetstub.vcproj msvc7/zzobfuscated.vcproj \ +msvc7/zzcat.sln msvc7/zzipself.bat msvc7/zzip.sln \ +msvc7/zzcat.vcproj msvc7/zzipself.sln msvc7/zziptest.sln \ +msvc7/zzdir.sln msvc7/zzipself.txt msvc7/zziptest.vcproj + +MSVC6 = \ +msvc6/zzcat.dsp msvc6/zziplib.dsp msvc6/zzipwrap.dsp \ +msvc6/zzdir.dsp msvc6/zziplib.dsw msvc6/zzobfuscated.dsp \ +msvc6/zziptest.dsp msvc6/zzip.dsp + +EXTRA_DIST = zziplib.spec zzipback.sed Makefile.mk \ + $(MSVC8) $(MSVC7) $(MSVC6) $(am__aclocal_m4_deps) + +PHONY = auto boottrap rpm doc docs man manpages htmpages sdl testsdl \ + comp compats msvc6 msvc7 +docs : docu +# ------------------------------------------------------------------------ + +test-comp: + test ! -d testing || rm -r testing + mkdir testing + (cd testing && tar xzvf ../$(PACKAGE)-$(VERSION).tar.gz) + (cd "testing/$(PACKAGE)-$(VERSION)/zziplib" && sh configure) + $(MAKE) -C "testing/$(PACKAGE)-$(VERSION)/zziplib" + $(MAKE) -C "testing/$(PACKAGE)-$(VERSION)/zziplib" check + +clean-comp: + test ! -d testing || rm -r testing + +msvc : + mkdir bin + mkdir lib + mkdir include + mkdir include/zzip + cp $(srcdir)/msvc6/Release/*.exe bin/ + cp $(srcdir)/msvc6/Release/*.dll bin/ + cp $(srcdir)/msvc6/Release/*.lib lib/ + cp $(srcdir)/zzip/*.h include/zzip/ + zip -9r $(srcdir)/$(PACKAGE)-$(VERSION)-msvc6-bin.zip bin/ + zip -9r $(srcdir)/$(PACKAGE)-$(VERSION)-msvc6-lib.zip lib/ include/ + rm -r bin lib include diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/Makefile.in b/Build/source/libs/zziplib/zziplib-0.13.58/Makefile.in new file mode 100644 index 00000000000..39702df9cef --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/Makefile.in @@ -0,0 +1,743 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 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@ +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = . +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +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@ +target_triplet = @target@ +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(top_srcdir)/configure COPYING.LIB ChangeLog TODO \ + uses/config.guess uses/config.sub uses/depcomp uses/install-sh \ + uses/ltmain.sh uses/missing uses/mkinstalldirs +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_compile_check_sizeof.m4 \ + $(top_srcdir)/m4/ac_set_default_paths_system.m4 \ + $(top_srcdir)/m4/ac_sys_largefile_sensitive.m4 \ + $(top_srcdir)/m4/acx_restrict.m4 \ + $(top_srcdir)/m4/ax_cflags_gcc_option.m4 \ + $(top_srcdir)/m4/ax_cflags_no_writable_strings.m4 \ + $(top_srcdir)/m4/ax_cflags_strict_prototypes.m4 \ + $(top_srcdir)/m4/ax_cflags_warn_all.m4 \ + $(top_srcdir)/m4/ax_create_pkgconfig_info.m4 \ + $(top_srcdir)/m4/ax_enable_builddir_uname.m4 \ + $(top_srcdir)/m4/ax_expand_prefix.m4 \ + $(top_srcdir)/m4/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/m4/ax_not_enable_frame_pointer.m4 \ + $(top_srcdir)/m4/ax_prefix_config_h.m4 \ + $(top_srcdir)/m4/ax_set_version_info.m4 \ + $(top_srcdir)/m4/ax_spec_file.m4 \ + $(top_srcdir)/m4/ax_spec_package_version.m4 \ + $(top_srcdir)/m4/ax_warning_default_aclocaldir.m4 \ + $(top_srcdir)/m4/ax_warning_default_pkgconfig.m4 \ + $(top_srcdir)/m4/patch_libtool_on_darwin_zsh_overquoting.m4 \ + $(top_srcdir)/m4/patch_libtool_sys_lib_search_path_spec.m4 \ + $(top_srcdir)/m4/patch_libtool_to_add_host_cc.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 configure.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/uses/mkinstalldirs +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONFIG_FILES = @CONFIG_FILES@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LARGEFILE_CFLAGS = @LARGEFILE_CFLAGS@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +MKZIP = @MKZIP@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PKG_CONFIG = @PKG_CONFIG@ +PYTHON = @PYTHON@ +RANLIB = @RANLIB@ +RELEASE_INFO = @RELEASE_INFO@ +RESOLVES = @RESOLVES@ +SDL = @SDL@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +THREAD_SAFE = @THREAD_SAFE@ +VERSION = @VERSION@ +VERSION_INFO = @VERSION_INFO@ +XMLTO = @XMLTO@ +ZIPTESTS = @ZIPTESTS@ +ZLIB_INCL = @ZLIB_INCL@ +ZLIB_LDIR = @ZLIB_LDIR@ +ZLIB_VERSION = @ZLIB_VERSION@ +ZZIPLIB_LDFLAGS = @ZZIPLIB_LDFLAGS@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_AS = @ac_ct_AS@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +aclocaldir = @aclocaldir@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +ax_enable_builddir_sed = @ax_enable_builddir_sed@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +docdir = @docdir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pkgconfig_libdir = @pkgconfig_libdir@ +pkgconfig_libfile = @pkgconfig_libfile@ +pkgconfigdir = @pkgconfigdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +AUTOMAKE_OPTIONS = 1.4 foreign dist-bzip2 +ACLOCAL_AMFLAGS = -I m4 +WANT_AUTOMAKE = 1.7 +WANT_AUTOCONF = 2.57 +DIST_SUBDIRS = zzip zzipwrap bins test docs SDL +SUBDIRS = zzip zzipwrap bins test docs @SDL@ +MSVC8 = msvc8/README.TXT msvc8/zip.exe msvc8/test1.zip msvc8/test.zip \ +msvc8/zzdir.vcproj msvc8/zzipself.vcproj msvc8/zzip.vcproj \ +msvc8/zziplib.sln msvc8/zzipsetstub.sln msvc8/zzobfuscated.sln \ +msvc8/zziplib.vcproj msvc8/zzipsetstub.vcproj msvc8/zzobfuscated.vcproj \ +msvc8/zzcat.sln msvc8/zzipself.bat msvc8/zzip.sln \ +msvc8/zzcat.vcproj msvc8/zzipself.sln msvc8/zziptest.sln \ +msvc8/zzdir.sln msvc8/zzipself.txt msvc8/zziptest.vcproj + +MSVC7 = msvc7/pkzip.exe msvc7/test1.zip msvc7/test.zip \ +msvc7/zzdir.vcproj msvc7/zzipself.vcproj msvc7/zzip.vcproj \ +msvc7/zziplib.sln msvc7/zzipsetstub.sln msvc7/zzobfuscated.sln \ +msvc7/zziplib.vcproj msvc7/zzipsetstub.vcproj msvc7/zzobfuscated.vcproj \ +msvc7/zzcat.sln msvc7/zzipself.bat msvc7/zzip.sln \ +msvc7/zzcat.vcproj msvc7/zzipself.sln msvc7/zziptest.sln \ +msvc7/zzdir.sln msvc7/zzipself.txt msvc7/zziptest.vcproj + +MSVC6 = \ +msvc6/zzcat.dsp msvc6/zziplib.dsp msvc6/zzipwrap.dsp \ +msvc6/zzdir.dsp msvc6/zziplib.dsw msvc6/zzobfuscated.dsp \ +msvc6/zziptest.dsp msvc6/zzip.dsp + +EXTRA_DIST = zziplib.spec zzipback.sed Makefile.mk \ + $(MSVC8) $(MSVC7) $(MSVC6) $(am__aclocal_m4_deps) + +PHONY = auto boottrap rpm doc docs man manpages htmpages sdl testsdl \ + comp compats msvc6 msvc7 + +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +am--refresh: + @: +$(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) --foreign '; \ + cd $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign 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) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + +config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(MAKE) stamp-h1; \ + else :; fi + +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) + cd $(top_srcdir) && $(AUTOHEADER) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +# 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. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; 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; \ + (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" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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 || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + mkdir $(distdir) + $(mkdir_p) $(distdir)/$(top_srcdir) $(distdir)/$(top_srcdir)/m4 $(distdir)/m4 $(distdir)/msvc6 $(distdir)/msvc7 $(distdir)/msvc8 $(distdir)/uses + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$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 \ + test -d "$(distdir)/$$subdir" \ + || $(mkdir_p) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + distdir) \ + || exit 1; \ + fi; \ + done + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -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 $(SHELL) $(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__remove_distdir) +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__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) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(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 + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { 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 config.h +installdirs: installdirs-recursive +installdirs-am: +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: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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 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-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-recursive + +install-man: + +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-info-am + +uninstall-info: uninstall-info-recursive + +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ + check-am clean clean-generic clean-libtool clean-recursive \ + ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ + dist-shar dist-tarZ dist-zip distcheck distclean \ + distclean-generic distclean-hdr distclean-libtool \ + distclean-recursive distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + maintainer-clean-recursive mostlyclean mostlyclean-generic \ + mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am uninstall-info-am + + +# see Makefile.mk for the "make rpm" target +rpm2: dist-bzip2 $(PACKAGE).spec + rpmbuild -ta $(PACKAGE)-$(VERSION).tar.bz2 + +zzip.html zzip.xml zzip.pdf \ +doc docu clean-doc clean-docs clean-docu \ +man manpages htmpages unpack clean-unpack \ +omf install-omf install-doc install-sfnet install-man3 x : + (cd docs && $(MAKE) `basename $@`) + +sdl testsdl test-sdl install-sdl : + (cd SDL && $(MAKE) `basename $@`) + +check-test0 check-test1 check-zzdir check-zzcat \ +check-zzxor check-zzxordir check-zzxorcat \ +check-sfx check-readme : \ + (cd test && $(MAKE) `basename $@`) +docs : docu +# ------------------------------------------------------------------------ + +test-comp: + test ! -d testing || rm -r testing + mkdir testing + (cd testing && tar xzvf ../$(PACKAGE)-$(VERSION).tar.gz) + (cd "testing/$(PACKAGE)-$(VERSION)/zziplib" && sh configure) + $(MAKE) -C "testing/$(PACKAGE)-$(VERSION)/zziplib" + $(MAKE) -C "testing/$(PACKAGE)-$(VERSION)/zziplib" check + +clean-comp: + test ! -d testing || rm -r testing + +msvc : + mkdir bin + mkdir lib + mkdir include + mkdir include/zzip + cp $(srcdir)/msvc6/Release/*.exe bin/ + cp $(srcdir)/msvc6/Release/*.dll bin/ + cp $(srcdir)/msvc6/Release/*.lib lib/ + cp $(srcdir)/zzip/*.h include/zzip/ + zip -9r $(srcdir)/$(PACKAGE)-$(VERSION)-msvc6-bin.zip bin/ + zip -9r $(srcdir)/$(PACKAGE)-$(VERSION)-msvc6-lib.zip lib/ include/ + rm -r bin lib include +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/Makefile.mk b/Build/source/libs/zziplib/zziplib-0.13.58/Makefile.mk new file mode 100644 index 00000000000..084c042a64d --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/Makefile.mk @@ -0,0 +1,73 @@ +PUB=pub/ + +auto: + aclocal && autoconf && autoheader && automake + +boottrap: + rm -rf .deps .libs + rm -f config.guess config.sub stamp-h.in + rm -f install-sh ltconfig ltmain.sh depcomp mkinstalldirs + rm -f config.h config.h.in config.log config.cache configure + rm -f aclocal.m4 Makefile Makefile.in + aclocal + autoconf + autoheader + automake -a -c + +rpm: dist-bzip $(PACKAGE).spec + rpmbuild -ta $(PACKAGE)-$(VERSION).tar.bz2 + +dist-bzip : dist-bzip2 + $(MAKE) dist-bzip2-done +dist-bzip2-done dist-done : + test -d $(PUB) || mkdir $(PUB) + @ echo cp $(BUILD)/$(PACKAGE)-$(VERSION).tar.bz2 $(PUB). \ + ; cp $(BUILD)/$(PACKAGE)-$(VERSION).tar.bz2 $(PUB). +snapshot: + $(MAKE) dist-bzip2 VERSION=`date +%Y.%m%d` +distclean-done: + - rm -r *.d + +configsub : + cp ../savannah.config/config.guess uses/config.guess + cp ../savannah.config/config.sub uses/config.sub + +cf = $(cf_fedora) +cf_debian = x86-linux1 +cf_fedora = x86-linux2 +cf_freebsd = x86-freebsd1 +cf_netbsd = x86-netbsd1 +cf_openbsd = x86-openbsd1 +cf_amd64 = amd64-linux1 +cf_alpha = usf-cf-alpha-linux-1 +cf_powermac = ppc-osx3 +cf_powerpc = openpower-linux1 +cf_sparc = sparc-solaris1 +cf_solaris = x86-solaris1 +cf_all = $(cf_debian) $(cf_fedora) $(cf_freebsd) $(cf_netbsd) $(cf_openbsd) \ + $(cf_amd64) $(cf_alpha) $(cf_powerpc) $(cf_sparc) $(cf_solaris) \ + $(cf_powermac) +cf : cf-upload cf-system-all +cf-upload: ; scp $(PUB)$(PACKAGE)-$(VERSION).tar.bz2 cf-shell.sf.net: +cf-unpack: ; ssh cf-shell.sf.net \ + "ssh $(cf) 'tar xjvf $(PACKAGE)-$(VERSION).tar.bz2'" +cf-configure: ; ssh cf-shell.sf.net \ + "ssh $(cf) 'uname -msr; cd $(PACKAGE)-$(VERSION) && sh configure'" +cf-build: ; ssh cf-shell.sf.net \ + "ssh $(cf) 'uname -msr; cd $(PACKAGE)-$(VERSION) && make'" +cf-check: ; ssh cf-shell.sf.net \ + "ssh $(cf) 'uname -msr; cd $(PACKAGE)-$(VERSION) && make check'" +cf-system: ; ssh cf-shell.sf.net \ + "ssh $(cf) 'uname -msr | sed s,^,====$(cf)====,'" +cf-configure-all: + @ for cf in $(cf_all) ; do echo $(MAKE) cf-configure cf=$$cf \ + ; sleep 1; $(MAKE) cf-configure cf=$$cf ; done +cf-build-all: + @ for cf in $(cf_all) ; do echo $(MAKE) cf-build cf=$$cf \ + ; sleep 1; $(MAKE) cf-build cf=$$cf ; done +cf-check-all: + @ for cf in $(cf_all) ; do echo $(MAKE) cf-check cf=$$cf \ + ; sleep 1; $(MAKE) cf-check cf=$$cf ; done +cf-system-all: + @ for cf in $(cf_all) ; do echo $(MAKE) cf-configure cf=$$cf \ + ; sleep 1 ; $(MAKE) cf-system cf=$$cf ; done diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/README b/Build/source/libs/zziplib/zziplib-0.13.58/README new file mode 100644 index 00000000000..5668eda043a --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/README @@ -0,0 +1,47 @@ +PROJECT + The zziplib provides read access to zipped files in a zip-archive, + using compression based solely on free algorithms provided by zlib. + It also provides a functionality to overlay the archive filesystem + with the filesystem of the operating system environment. + +AUTHOR + The project was originally written by Tomi Ollila, later largely + rewritten by Guido Draheim, and extended with contributions in + the years to follow. Guido Draheim <guidod@gmx.de> holds the full + copyright to the zziplib sources. + +COPYING + The zziplib may be used freely under the restrictions of the + GNU Lesser General Public License version 2 or later. Alternativly + the Mozilla Public license can be chosen. The sources are under + a dual license, as long as the MPL hint is not removed, the modified + files will be again under a dual license for the final recipient. + +LICENSING + If you can not use a dynalinked library according to LGPL rules, + then look at docs/copying.htm for a few hints. Generally the LGPL + has a way for staticlinking as well as the MPL has a way. Anyway, + special (paid) licenses can be negotiated with the copyright holder. + +HOMEPAGE + The zziplib project is hosted at SourceForge, the complete + documentation can be found at http://zziplib.sf.net - the + SourceForge servers are also used to distribute the sources + of the zziplib project. Releases are announced via the + freshmeat services on http://freshmeat.net/projects/zziplib + +INSTALLATION + The zziplib sources are built with gnu autotools and they should + be easy to install on unixish systems via the usual sequence of + `configure && make && make check && make install`. Many distributors + ship prebuilt packages e.g. in rpm format. Additionally there are + MSVC project files shipped along for usage with the Microsoft + VisualC series of compilers. There should be no problem either + when crosscompiling the zziplib for a third host platform. + +MAINTAINANCE + The zziplib library is intentionally a lightweight interface to + zip files. The author take patches but please consider to put + complex extensions into separate modules rather than implanting them + right into the core of the library engine. All Patches and Bug Reports + should be sent to Guido Draheim <guidod@gmx.de>. diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/SDL/Makefile.am b/Build/source/libs/zziplib/zziplib-0.13.58/SDL/Makefile.am new file mode 100644 index 00000000000..9cd9db15802 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/SDL/Makefile.am @@ -0,0 +1,68 @@ +AUTOMAKE_OPTIONS = 1.4 foreign +AUTOTOOL_VERSION=autoconf-2.52 automake-1.5 libtool-1.4.2 + +sdldir = ${pkgdatadir}/SDL +sdl_DATA = SDL_rwops_zzip.c SDL_rwops_zzip.h + +EXTRA_DIST = $(sdl_DATA) +check_PROGRAMS = zzcatsdl + +zzcatsdl_SOURCES = SDL_rwops_zzcat.c +zzcatsdl_LDFLAGS = `sdl-config --libs` `./zzip-config --libs` +zzcatsdl_cflags = `sdl-config --cflags` `./zzip-config --cflags` + +SDL_rwops_zzip.$(OBJEXT) : zzip-config @srcdir@/SDL_rwops_zzip.c + $(COMPILE) $(zzcatsdl_cflags) -c @srcdir@/SDL_rwops_zzip.c -o $@ +SDL_rwops_zzcat.$(OBJEXT) : zzip-config @srcdir@/SDL_rwops_zzcat.c + $(COMPILE) $(zzcatsdl_cflags) -c @srcdir@/SDL_rwops_zzcat.c -o $@ +zzcatsdl$(EXEEXT): SDL_rwops_zzip.$(OBJEXT) SDL_rwops_zzcat.$(OBJEXT) + $(LINK) SDL_rwops_zzip.$(OBJEXT) SDL_rwops_zzcat.$(OBJEXT) \ + $(zzcatsdl_LDFLAGS) -o $@ + +zzip-config : ../bins/zzip-config + sed -e 's:includedir=.*:includedir=..:' \ + -e 's:libdir=.*:libdir=../zzip:' $? > $@ + chmod +x $@ + +test.zip : @top_srcdir@/test/test.zip + $(LN_S) $? $@ +testsdl test-sdl : test.zip zzcatsdl$(EXEEXT) + ./zzcatsdl$(EXEEXT) test/README > test.out + diff -q @top_srcdir@/README test.out && rm test.out + +sdl : all +install-sdl : install-data # and not the binary + +### if it wouldn't be for the zzip-config then we could write it like this +# zzcatsdl_SOURCES = SDL_rwops_zzcat.c SDL_rwops_zzip.c +# zzcatsdl_LDADD = `sdl-config --libs` `zzip-config --libs` +# CFLAGS = `sdl-config --cflags` `zzip-config --cflags` +### + +CLEANFILES = *.pc *.omf +# ---------------------------------------------------------------------- +# we do not install a library, so this about equivalent to some SDL.pc +pkgconfigdir=$(libdir)/pkgconfig +pkgconfig_HEADERS= zzip-sdl-config.pc zzip-sdl-rwops.pc +ERRNULL= 2>/dev/null +zzip-sdl-config.pc : Makefile + @ echo "prefix="`sdl-config --prefix $(ERRNULL)` >$@ + @ echo "sdl_static_libs="`sdl-config --static-libs $(ERRNULL)` >>$@ + @ echo "sdl_libs="`sdl-config --libs $(ERRNULL)` >>$@ + @ echo "sdl_cflags="`sdl-config --cflags $(ERRNULL)` >>$@ + @ echo " " >>$@ + @ echo "Name: zzip-sdl-config" >>$@ + @ echo "Version: "`sdl-config --version $(ERRNULL)` >>$@ + @ echo "Description: SDL Config (for ZZipLib)" >>$@ + echo 'Libs: $${sdl_libs}' >>$@ + echo 'Cflags: $${sdl_cflags}' >>$@ + +zzip-sdl-rwops.pc : Makefile + @ echo 'zzipdatadir=$(pkgdatadir)' >$@ + @ echo 'zzipsdlrwops=$${zzipdatadir}/SDL' >>$@ + @ echo " " >>$@ + @ echo "Name: zzip-sdl-rwops" >>$@ + @ echo "Version: $(VERSION)" >>$@ + @ echo "Description: SDL_rwops for ZZipLib" >>$@ + echo 'Requires: zzip-sdl-config, zziplib' >>$@ + echo 'Cflags: -I$${zzipsdlrwops}' >>$@ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/SDL/Makefile.in b/Build/source/libs/zziplib/zziplib-0.13.58/SDL/Makefile.in new file mode 100644 index 00000000000..7bbad54f184 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/SDL/Makefile.in @@ -0,0 +1,588 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 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@ + + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +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@ +target_triplet = @target@ +check_PROGRAMS = zzcatsdl$(EXEEXT) +subdir = SDL +DIST_COMMON = $(pkgconfig_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_compile_check_sizeof.m4 \ + $(top_srcdir)/m4/ac_set_default_paths_system.m4 \ + $(top_srcdir)/m4/ac_sys_largefile_sensitive.m4 \ + $(top_srcdir)/m4/acx_restrict.m4 \ + $(top_srcdir)/m4/ax_cflags_gcc_option.m4 \ + $(top_srcdir)/m4/ax_cflags_no_writable_strings.m4 \ + $(top_srcdir)/m4/ax_cflags_strict_prototypes.m4 \ + $(top_srcdir)/m4/ax_cflags_warn_all.m4 \ + $(top_srcdir)/m4/ax_create_pkgconfig_info.m4 \ + $(top_srcdir)/m4/ax_enable_builddir_uname.m4 \ + $(top_srcdir)/m4/ax_expand_prefix.m4 \ + $(top_srcdir)/m4/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/m4/ax_not_enable_frame_pointer.m4 \ + $(top_srcdir)/m4/ax_prefix_config_h.m4 \ + $(top_srcdir)/m4/ax_set_version_info.m4 \ + $(top_srcdir)/m4/ax_spec_file.m4 \ + $(top_srcdir)/m4/ax_spec_package_version.m4 \ + $(top_srcdir)/m4/ax_warning_default_aclocaldir.m4 \ + $(top_srcdir)/m4/ax_warning_default_pkgconfig.m4 \ + $(top_srcdir)/m4/patch_libtool_on_darwin_zsh_overquoting.m4 \ + $(top_srcdir)/m4/patch_libtool_sys_lib_search_path_spec.m4 \ + $(top_srcdir)/m4/patch_libtool_to_add_host_cc.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/uses/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am_zzcatsdl_OBJECTS = SDL_rwops_zzcat.$(OBJEXT) +zzcatsdl_OBJECTS = $(am_zzcatsdl_OBJECTS) +zzcatsdl_LDADD = $(LDADD) +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/uses/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(zzcatsdl_SOURCES) +DIST_SOURCES = $(zzcatsdl_SOURCES) +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 = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(sdldir)" "$(DESTDIR)$(pkgconfigdir)" +sdlDATA_INSTALL = $(INSTALL_DATA) +DATA = $(sdl_DATA) +pkgconfigHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(pkgconfig_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONFIG_FILES = @CONFIG_FILES@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LARGEFILE_CFLAGS = @LARGEFILE_CFLAGS@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +MKZIP = @MKZIP@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PKG_CONFIG = @PKG_CONFIG@ +PYTHON = @PYTHON@ +RANLIB = @RANLIB@ +RELEASE_INFO = @RELEASE_INFO@ +RESOLVES = @RESOLVES@ +SDL = @SDL@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +THREAD_SAFE = @THREAD_SAFE@ +VERSION = @VERSION@ +VERSION_INFO = @VERSION_INFO@ +XMLTO = @XMLTO@ +ZIPTESTS = @ZIPTESTS@ +ZLIB_INCL = @ZLIB_INCL@ +ZLIB_LDIR = @ZLIB_LDIR@ +ZLIB_VERSION = @ZLIB_VERSION@ +ZZIPLIB_LDFLAGS = @ZZIPLIB_LDFLAGS@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_AS = @ac_ct_AS@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +aclocaldir = @aclocaldir@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +ax_enable_builddir_sed = @ax_enable_builddir_sed@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +docdir = @docdir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pkgconfig_libdir = @pkgconfig_libdir@ +pkgconfig_libfile = @pkgconfig_libfile@ +# ---------------------------------------------------------------------- +# we do not install a library, so this about equivalent to some SDL.pc +pkgconfigdir = $(libdir)/pkgconfig +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +AUTOMAKE_OPTIONS = 1.4 foreign +AUTOTOOL_VERSION = autoconf-2.52 automake-1.5 libtool-1.4.2 +sdldir = ${pkgdatadir}/SDL +sdl_DATA = SDL_rwops_zzip.c SDL_rwops_zzip.h +EXTRA_DIST = $(sdl_DATA) +zzcatsdl_SOURCES = SDL_rwops_zzcat.c +zzcatsdl_LDFLAGS = `sdl-config --libs` `./zzip-config --libs` +zzcatsdl_cflags = `sdl-config --cflags` `./zzip-config --cflags` + +### if it wouldn't be for the zzip-config then we could write it like this +# zzcatsdl_SOURCES = SDL_rwops_zzcat.c SDL_rwops_zzip.c +# zzcatsdl_LDADD = `sdl-config --libs` `zzip-config --libs` +# CFLAGS = `sdl-config --cflags` `zzip-config --cflags` +### +CLEANFILES = *.pc *.omf +pkgconfig_HEADERS = zzip-sdl-config.pc zzip-sdl-rwops.pc +ERRNULL = 2>/dev/null +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 \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign SDL/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign SDL/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 + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SDL_rwops_zzcat.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +install-sdlDATA: $(sdl_DATA) + @$(NORMAL_INSTALL) + test -z "$(sdldir)" || $(mkdir_p) "$(DESTDIR)$(sdldir)" + @list='$(sdl_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(sdlDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(sdldir)/$$f'"; \ + $(sdlDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(sdldir)/$$f"; \ + done + +uninstall-sdlDATA: + @$(NORMAL_UNINSTALL) + @list='$(sdl_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(sdldir)/$$f'"; \ + rm -f "$(DESTDIR)$(sdldir)/$$f"; \ + done +install-pkgconfigHEADERS: $(pkgconfig_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)" + @list='$(pkgconfig_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgconfigHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + $(pkgconfigHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done + +uninstall-pkgconfigHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +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)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$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 + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) +check: check-am +all-am: Makefile $(DATA) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(sdldir)" "$(DESTDIR)$(pkgconfigdir)"; 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: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-checkPROGRAMS clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-pkgconfigHEADERS install-sdlDATA + +install-exec-am: + +install-info: install-info-am + +install-man: + +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-info-am uninstall-pkgconfigHEADERS \ + uninstall-sdlDATA + +.PHONY: CTAGS GTAGS all all-am check check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool ctags \ + 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-exec install-exec-am install-info \ + install-info-am install-man install-pkgconfigHEADERS \ + install-sdlDATA 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 uninstall \ + uninstall-am uninstall-info-am uninstall-pkgconfigHEADERS \ + uninstall-sdlDATA + + +SDL_rwops_zzip.$(OBJEXT) : zzip-config @srcdir@/SDL_rwops_zzip.c + $(COMPILE) $(zzcatsdl_cflags) -c @srcdir@/SDL_rwops_zzip.c -o $@ +SDL_rwops_zzcat.$(OBJEXT) : zzip-config @srcdir@/SDL_rwops_zzcat.c + $(COMPILE) $(zzcatsdl_cflags) -c @srcdir@/SDL_rwops_zzcat.c -o $@ +zzcatsdl$(EXEEXT): SDL_rwops_zzip.$(OBJEXT) SDL_rwops_zzcat.$(OBJEXT) + $(LINK) SDL_rwops_zzip.$(OBJEXT) SDL_rwops_zzcat.$(OBJEXT) \ + $(zzcatsdl_LDFLAGS) -o $@ + +zzip-config : ../bins/zzip-config + sed -e 's:includedir=.*:includedir=..:' \ + -e 's:libdir=.*:libdir=../zzip:' $? > $@ + chmod +x $@ + +test.zip : @top_srcdir@/test/test.zip + $(LN_S) $? $@ +testsdl test-sdl : test.zip zzcatsdl$(EXEEXT) + ./zzcatsdl$(EXEEXT) test/README > test.out + diff -q @top_srcdir@/README test.out && rm test.out + +sdl : all +install-sdl : install-data # and not the binary +zzip-sdl-config.pc : Makefile + @ echo "prefix="`sdl-config --prefix $(ERRNULL)` >$@ + @ echo "sdl_static_libs="`sdl-config --static-libs $(ERRNULL)` >>$@ + @ echo "sdl_libs="`sdl-config --libs $(ERRNULL)` >>$@ + @ echo "sdl_cflags="`sdl-config --cflags $(ERRNULL)` >>$@ + @ echo " " >>$@ + @ echo "Name: zzip-sdl-config" >>$@ + @ echo "Version: "`sdl-config --version $(ERRNULL)` >>$@ + @ echo "Description: SDL Config (for ZZipLib)" >>$@ + echo 'Libs: $${sdl_libs}' >>$@ + echo 'Cflags: $${sdl_cflags}' >>$@ + +zzip-sdl-rwops.pc : Makefile + @ echo 'zzipdatadir=$(pkgdatadir)' >$@ + @ echo 'zzipsdlrwops=$${zzipdatadir}/SDL' >>$@ + @ echo " " >>$@ + @ echo "Name: zzip-sdl-rwops" >>$@ + @ echo "Version: $(VERSION)" >>$@ + @ echo "Description: SDL_rwops for ZZipLib" >>$@ + echo 'Requires: zzip-sdl-config, zziplib' >>$@ + echo 'Cflags: -I$${zzipsdlrwops}' >>$@ +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/SDL/SDL_rwops_zzcat.c b/Build/source/libs/zziplib/zziplib-0.13.58/SDL/SDL_rwops_zzcat.c new file mode 100644 index 00000000000..8df2685a289 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/SDL/SDL_rwops_zzcat.c @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2001 Guido Draheim <guidod@gmx.de> + * Use freely under the restrictions of the ZLIB License + * + * (this example uses errno which might not be multithreaded everywhere) + */ + +#include <SDL_rwops_zzip.h> +#include <stdlib.h> /* exit */ + +/* mostly a copy from zzcat.c */ + +int main (int argc, char** argv) +{ + static const char usage[] = + " zzcat <file>... \n" + " - prints the file to stdout. the file can be a normal file\n" + " or an inflated part of a zip-archive \n" + ; + + int argn; + if (argc <= 1) + { + printf (usage); + exit (0); + } + + for (argn=1; argn < argc; argn++) + { + SDL_RWops* rwops; + + rwops = SDL_RWFromZZIP (argv[argn], "rb"); + if (! rwops) + { + perror (argv[argn]); + continue; + }else{ + char buf[17]; + int n; + + /* read chunks of 16 bytes into buf and print them to stdout */ + while (0 < (n = SDL_RWread(rwops, buf, 16, 1))) + { + buf[n] = '\0'; +# ifdef STDOUT_FILENO + write (STDOUT_FILENO, buf, n); +# else + fwrite (buf, 1, n, stdout); +# endif + } + + if (n == -1) + perror (argv[argn]); + + SDL_RWclose (rwops); + } + } + + return 0; +} + + + diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/SDL/SDL_rwops_zzip.c b/Build/source/libs/zziplib/zziplib-0.13.58/SDL/SDL_rwops_zzip.c new file mode 100644 index 00000000000..b273a811470 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/SDL/SDL_rwops_zzip.c @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2001 Guido Draheim <guidod@gmx.de> + * Use freely under the restrictions of the ZLIB License + * + * (this example uses errno which might not be multithreaded everywhere) + */ + +#include <SDL_rwops_zzip.h> +#include <zzip/zzip.h> +#include <string.h> /* strchr */ + +/* MSVC can not take a casted variable as an lvalue ! */ +#define SDL_RWOPS_ZZIP_DATA(_context) \ + ((_context)->hidden.unknown.data1) +#define SDL_RWOPS_ZZIP_FILE(_context) (ZZIP_FILE*) \ + ((_context)->hidden.unknown.data1) + +static int _zzip_seek(SDL_RWops *context, int offset, int whence) +{ + return zzip_seek(SDL_RWOPS_ZZIP_FILE(context), offset, whence); +} + +static int _zzip_read(SDL_RWops *context, void *ptr, int size, int maxnum) +{ + return zzip_read(SDL_RWOPS_ZZIP_FILE(context), ptr, size*maxnum) / size; +} + +static int _zzip_write(SDL_RWops *context, const void *ptr, int size, int num) +{ + return 0; /* ignored */ +} + +static int _zzip_close(SDL_RWops *context) +{ + if (! context) return 0; /* may be SDL_RWclose is called by atexit */ + + zzip_close (SDL_RWOPS_ZZIP_FILE(context)); + SDL_FreeRW (context); + return 0; +} + +SDL_RWops *SDL_RWFromZZIP(const char* file, const char* mode) +{ + register SDL_RWops* rwops; + register ZZIP_FILE* zzip_file; + + if (! strchr (mode, 'r')) + return SDL_RWFromFile(file, mode); + + zzip_file = zzip_fopen (file, mode); + if (! zzip_file) return 0; + + rwops = SDL_AllocRW (); + if (! rwops) { errno=ENOMEM; zzip_close (zzip_file); return 0; } + + SDL_RWOPS_ZZIP_DATA(rwops) = zzip_file; + rwops->read = _zzip_read; + rwops->write = _zzip_write; + rwops->seek = _zzip_seek; + rwops->close = _zzip_close; + return rwops; +} diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/SDL/SDL_rwops_zzip.h b/Build/source/libs/zziplib/zziplib-0.13.58/SDL/SDL_rwops_zzip.h new file mode 100644 index 00000000000..1a2d188de83 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/SDL/SDL_rwops_zzip.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2001 Guido Draheim <guidod@gmx.de> + * Use freely under the restrictions of the ZLIB License + * + * You should be able to drop it in the place of a SDL_RWFromFile. Then + * go to X/share/myapp and do `cd graphics && zip -9r ../graphics.zip .` + * and rename the graphics/ subfolder - and still all your files + * are found: a filepath like X/shared/graphics/game/greetings.bmp + * will open X/shared/graphics.zip and return the zipped file + * game/greetings.bmp in the zip-archive (for reading that is). + * + */ + +#ifndef _SDL_RWops_ZZIP_h +#define _SDL_RWops_ZZIP_h + +#include <SDL_rwops.h> + +#ifndef ZZIP_NO_DECLSPEC +#define ZZIP_DECLSPEC +#else /* use DECLSPEC from SDL/begin_code.h */ +#define ZZIP_DECLSPEC DECLSPEC +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +extern ZZIP_DECLSPEC +SDL_RWops *SDL_RWFromZZIP(const char* file, const char* mode); + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/SDL/zzip-sdl-config.pc b/Build/source/libs/zziplib/zziplib-0.13.58/SDL/zzip-sdl-config.pc new file mode 100644 index 00000000000..7e54d7ec1dd --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/SDL/zzip-sdl-config.pc @@ -0,0 +1,10 @@ +prefix=/usr +sdl_static_libs=-L/usr/lib -lSDL -lpthread -lm -ldl -L/usr/X11R6/lib -lX11 -lXext -laa +sdl_libs=-L/usr/lib -lSDL -lpthread +sdl_cflags=-I/usr/include/SDL -D_REENTRANT + +Name: zzip-sdl-config +Version: 1.2.9 +Description: SDL Config (for ZZipLib) +Libs: ${sdl_libs} +Cflags: ${sdl_cflags} diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/SDL/zzip-sdl-rwops.pc b/Build/source/libs/zziplib/zziplib-0.13.58/SDL/zzip-sdl-rwops.pc new file mode 100644 index 00000000000..8d7858def0c --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/SDL/zzip-sdl-rwops.pc @@ -0,0 +1,8 @@ +zzipdatadir=/usr/local/share/zziplib +zzipsdlrwops=${zzipdatadir}/SDL + +Name: zzip-sdl-rwops +Version: 2006.0807 +Description: SDL_rwops for ZZipLib +Requires: zzip-sdl-config, zziplib +Cflags: -I${zzipsdlrwops} diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/TODO b/Build/source/libs/zziplib/zziplib-0.13.58/TODO new file mode 100644 index 00000000000..2bc5edfd6ea --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/TODO @@ -0,0 +1,54 @@ + +- Check the CRC value at the end of read... and add more error codes. + +- Do more test. Currently use only with tested "friendly" archives. + This is also related to usages of zziplib in virus detection + code which should better have a hardened library code. That does + also include inflate interface code to need the most testing. + +- the buffer reusage code was not strictly multithreading. It should + be fixed by now but it would be better to have an automatic test + routine to check reentrancy/multithreaded functionality. + +- Sligthly More documentation. With the generation of man pages and + multiple pages for the website, it does already look acceptable. + It should still get better of course - kinda newbie friendly *g* + +KNOWN PROBLEMS + +The win32 compilers need each a different config.h derivate that +matches both the headers shipped with the compiler and installed +with updates of the SDK. There is no autoconfigure on win32 as +that - unless you install some unix tools along. + +The sparc-sun-solaris2.* will utter warnings for "char subscript" +which is caused by isdigit() from ctype.h - this will NOT FIX as +it is only in the example source code and we want to keep those +lean and mean to make them easy to adopt by developers. + +The hppa1.1-hp-hpux10.20 did show spurious problems of making +shared libraries - this may well fix with an update of the +libtool package, the libtool 1.4 is dated 2001/04/24 + +There are spurious reports of users on win32 platforms that tell +of some problems with a specific zip file they have but it was +not possible so far to recreate an environment abroad to show +the problem too. One can not say if that is due some general +instability out of DLL hell, or if there is a bug hiding somewhere. +Please send all those zip files to the maintainer, perhaps it +can help to find the real cause (I doubt it is in zziplib, but..) + +TESTED PLATFORMS +sparc-sun-solaris2.6/gcc2.95.3 +sparc-sun-solaris2.8/gcc2.95.3 +hppa1.1-hp-hpux10.20 +i686-mandrake-linux-9.0/gcc3.2 +i686-mandrake-linux-9.1/gcc3.2.2 +i686-debian-linux-2.2/gcc2.95.2 +i386-unknown-freebsd4.7/gcc2.95.4 (formerly with wrapwrap) +powerpc-apple-darwin5.5 (formerly with wrapwrap) +alphaev67-unknown-linux-gnu/gcc2.95.4 (that's a 64bit platform) +i386-ms-win32/msvc6 +i386-ms-win32/msvc7 +i386-ms-win32/mingw+msys +... and probably a lot of others not known to the maintainer. diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/aclocal.m4 b/Build/source/libs/zziplib/zziplib-0.13.58/aclocal.m4 new file mode 100644 index 00000000000..39b8e7d8b68 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/aclocal.m4 @@ -0,0 +1,7278 @@ +# generated automatically by aclocal 1.9.6 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005 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. + +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- + +# serial 48 AC_PROG_LIBTOOL + + +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) +# ----------------------------------------------------------- +# If this macro is not defined by Autoconf, define it here. +m4_ifdef([AC_PROVIDE_IFELSE], + [], + [m4_define([AC_PROVIDE_IFELSE], + [m4_ifdef([AC_PROVIDE_$1], + [$2], [$3])])]) + + +# AC_PROG_LIBTOOL +# --------------- +AC_DEFUN([AC_PROG_LIBTOOL], +[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl +dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX +dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. + AC_PROVIDE_IFELSE([AC_PROG_CXX], + [AC_LIBTOOL_CXX], + [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX + ])]) +dnl And a similar setup for Fortran 77 support + AC_PROVIDE_IFELSE([AC_PROG_F77], + [AC_LIBTOOL_F77], + [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 +])]) + +dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. +dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run +dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. + AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [ifdef([AC_PROG_GCJ], + [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([A][M_PROG_GCJ], + [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([LT_AC_PROG_GCJ], + [define([LT_AC_PROG_GCJ], + defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) +])])# AC_PROG_LIBTOOL + + +# _AC_PROG_LIBTOOL +# ---------------- +AC_DEFUN([_AC_PROG_LIBTOOL], +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl +AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl +AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl +AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +# Prevent multiple expansion +define([AC_PROG_LIBTOOL], []) +])# _AC_PROG_LIBTOOL + + +# AC_LIBTOOL_SETUP +# ---------------- +AC_DEFUN([AC_LIBTOOL_SETUP], +[AC_PREREQ(2.50)dnl +AC_REQUIRE([AC_ENABLE_SHARED])dnl +AC_REQUIRE([AC_ENABLE_STATIC])dnl +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_LD])dnl +AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl +AC_REQUIRE([AC_PROG_NM])dnl + +AC_REQUIRE([AC_PROG_LN_S])dnl +AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! +AC_REQUIRE([AC_OBJEXT])dnl +AC_REQUIRE([AC_EXEEXT])dnl +dnl + +AC_LIBTOOL_SYS_MAX_CMD_LEN +AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +AC_LIBTOOL_OBJDIR + +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +_LT_AC_PROG_ECHO_BACKSLASH + +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 + +# 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 to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +AC_CHECK_TOOL(AR, ar, false) +AC_CHECK_TOOL(RANLIB, ranlib, :) +AC_CHECK_TOOL(STRIP, strip, :) + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +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 \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +_LT_CC_BASENAME([$compiler]) + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + AC_PATH_MAGIC + fi + ;; +esac + +AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +enable_win32_dll=yes, enable_win32_dll=no) + +AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +AC_ARG_WITH([pic], + [AC_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) +test -z "$pic_mode" && pic_mode=default + +# Use C for the default configuration in the libtool script +tagname= +AC_LIBTOOL_LANG_C_CONFIG +_LT_AC_TAGCONFIG +])# AC_LIBTOOL_SETUP + + +# _LT_AC_SYS_COMPILER +# ------------------- +AC_DEFUN([_LT_AC_SYS_COMPILER], +[AC_REQUIRE([AC_PROG_CC])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_AC_SYS_COMPILER + + +# _LT_CC_BASENAME(CC) +# ------------------- +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +AC_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 "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +]) + + +# _LT_COMPILER_BOILERPLATE +# ------------------------ +# Check for compiler boilerplate output or warnings with +# the simple compiler test code. +AC_DEFUN([_LT_COMPILER_BOILERPLATE], +[ac_outfile=conftest.$ac_objext +printf "$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. +AC_DEFUN([_LT_LINKER_BOILERPLATE], +[ac_outfile=conftest.$ac_objext +printf "$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 conftest* +])# _LT_LINKER_BOILERPLATE + + +# _LT_AC_SYS_LIBPATH_AIX +# ---------------------- +# 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. +AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], +[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 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 +])# _LT_AC_SYS_LIBPATH_AIX + + +# _LT_AC_SHELL_INIT(ARG) +# ---------------------- +AC_DEFUN([_LT_AC_SHELL_INIT], +[ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +])# _LT_AC_SHELL_INIT + + +# _LT_AC_PROG_ECHO_BACKSLASH +# -------------------------- +# Add some code to the start of the generated configure script which +# will find an echo command which doesn't interpret backslashes. +AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], +[_LT_AC_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +echo=${ECHO-echo} +if test "X[$]1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X[$]1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} +fi + +if test "X[$]1" = X--fallback-echo; then + # used as fallback echo + shift + cat <<EOF +[$]* +EOF + exit 0 +fi + +# 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 + +if test -z "$ECHO"; then +if test "X${echo_test_string+set}" != Xset; then +# find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(ECHO) +])])# _LT_AC_PROG_ECHO_BACKSLASH + + +# _LT_AC_LOCK +# ----------- +AC_DEFUN([_LT_AC_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AC_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 __oline__ "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-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|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-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + 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-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + 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_TRY_LINK([],[],[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 + ;; +sparc*-*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*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +[*-*-cygwin* | *-*-mingw* | *-*-pw32*) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; + ]) +esac + +need_locks="$enable_libtool_lock" + +])# _LT_AC_LOCK + + +# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], +[AC_REQUIRE([LT_AC_PROG_SED]) +AC_CACHE_CHECK([$1], [$2], + [$2=no + ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + printf "$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:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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 + ifelse([$5], , :, [$5]) +else + ifelse([$6], , :, [$6]) +fi +])# AC_LIBTOOL_COMPILER_OPTION + + +# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ------------------------------------------------------------ +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], +[AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + printf "$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 "X$_lt_linker_boilerplate" | $Xsed -e '/^$/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 conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + ifelse([$4], , :, [$4]) +else + ifelse([$5], , :, [$5]) +fi +])# AC_LIBTOOL_LINKER_OPTION + + +# AC_LIBTOOL_SYS_MAX_CMD_LEN +# -------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], +[# 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*) + # 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; + ;; + + 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 + ;; + + 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 + ;; + *) + # 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. + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + 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` + ;; + 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 +])# AC_LIBTOOL_SYS_MAX_CMD_LEN + + +# _LT_AC_CHECK_DLFCN +# ------------------ +AC_DEFUN([_LT_AC_CHECK_DLFCN], +[AC_CHECK_HEADERS(dlfcn.h)dnl +])# _LT_AC_CHECK_DLFCN + + +# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# --------------------------------------------------------------------- +AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_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 <<EOF +[#line __oline__ "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include <dlfcn.h> +#endif + +#include <stdio.h> + +#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 + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=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; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +}] +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_AC_TRY_DLOPEN_SELF + + +# AC_LIBTOOL_DLOPEN_SELF +# ---------------------- +AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_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*) + 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="-dld"], + [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="-dld"]) + ]) + ]) + ]) + ]) + ]) + ;; + 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_AC_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_AC_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 +])# AC_LIBTOOL_DLOPEN_SELF + + +# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) +# --------------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler +AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$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:__oline__: $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:__oline__: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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_AC_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 .. + rmdir conftest + $rm conftest* +]) +])# AC_LIBTOOL_PROG_CC_C_O + + +# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) +# ----------------------------------------- +# Check to see if we can do hard links to lock some files if needed +AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], +[AC_REQUIRE([_LT_AC_LOCK])dnl + +hard_links="nottested" +if test "$_LT_AC_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 +])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS + + +# AC_LIBTOOL_OBJDIR +# ----------------- +AC_DEFUN([AC_LIBTOOL_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 +])# AC_LIBTOOL_OBJDIR + + +# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) +# ---------------------------------------------- +# Check hardcoding attributes. +AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_AC_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ + test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ + test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$_LT_AC_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_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_AC_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_AC_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_AC_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; 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 +])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH + + +# AC_LIBTOOL_SYS_LIB_STRIP +# ------------------------ +AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], +[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" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) +fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +])# AC_LIBTOOL_SYS_LIB_STRIP + + +# AC_LIBTOOL_SYS_DYNAMIC_LINKER +# ----------------------------- +# PORTME Fill in your ld.so characteristics +AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], +[AC_MSG_CHECKING([dynamic linker characteristics]) +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" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # 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. + 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 +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +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 + 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' + ;; + +aix4* | aix5*) + version_type=linux + 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<name>.so + # instead of lib<name>.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # 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*) + 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=`$echo "X$lib" | $Xsed -e '\''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' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[[45]]*) + version_type=linux + 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*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + 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' + 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="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + 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 + ;; + 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 + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # 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}${versuffix}$shared_ext ${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`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + 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 + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-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='GNU ld.so' + ;; + +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[[123]]*) 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 + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + 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' + ;; + +interix3*) + 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' + 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 + 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 Linux ELF. +linux*) + 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' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # 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)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;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' + ;; + +knetbsd*-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='GNU ld.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 + 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=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=yes + ;; + +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" + ;; + +solaris*) + 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=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 + 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 + export_dynamic_flag_spec='${wl}-Blargedynsym' + 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 + 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 + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + 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 +])# AC_LIBTOOL_SYS_DYNAMIC_LINKER + + +# _LT_AC_TAGCONFIG +# ---------------- +AC_DEFUN([_LT_AC_TAGCONFIG], +[AC_ARG_WITH([tags], + [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], + [include additional configurations @<:@automatic@:>@])], + [tagnames="$withval"]) + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + AC_MSG_WARN([output file `$ofile' does not exist]) + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) + else + AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in + "") ;; + *) AC_MSG_ERROR([invalid tag name: $tagname]) + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + AC_MSG_ERROR([tag name \"$tagname\" already exists]) + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_LIBTOOL_LANG_CXX_CONFIG + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + AC_LIBTOOL_LANG_F77_CONFIG + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + AC_LIBTOOL_LANG_GCJ_CONFIG + else + tagname="" + fi + ;; + + RC) + AC_LIBTOOL_LANG_RC_CONFIG + ;; + + *) + AC_MSG_ERROR([Unsupported tag name: $tagname]) + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + AC_MSG_ERROR([unable to update list of available tagged configurations.]) + fi +fi +])# _LT_AC_TAGCONFIG + + +# AC_LIBTOOL_DLOPEN +# ----------------- +# enable checks for dlopen support +AC_DEFUN([AC_LIBTOOL_DLOPEN], + [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_DLOPEN + + +# AC_LIBTOOL_WIN32_DLL +# -------------------- +# declare package support for building win32 DLLs +AC_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_WIN32_DLL + + +# AC_ENABLE_SHARED([DEFAULT]) +# --------------------------- +# implement the --enable-shared flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_SHARED], +[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([shared], + [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]AC_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=]AC_ENABLE_SHARED_DEFAULT) +])# AC_ENABLE_SHARED + + +# AC_DISABLE_SHARED +# ----------------- +# set the default shared flag to --disable-shared +AC_DEFUN([AC_DISABLE_SHARED], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_SHARED(no) +])# AC_DISABLE_SHARED + + +# AC_ENABLE_STATIC([DEFAULT]) +# --------------------------- +# implement the --enable-static flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_STATIC], +[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([static], + [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]AC_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=]AC_ENABLE_STATIC_DEFAULT) +])# AC_ENABLE_STATIC + + +# AC_DISABLE_STATIC +# ----------------- +# set the default static flag to --disable-static +AC_DEFUN([AC_DISABLE_STATIC], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_STATIC(no) +])# AC_DISABLE_STATIC + + +# AC_ENABLE_FAST_INSTALL([DEFAULT]) +# --------------------------------- +# implement the --enable-fast-install flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_FAST_INSTALL], +[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([fast-install], + [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]AC_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=]AC_ENABLE_FAST_INSTALL_DEFAULT) +])# AC_ENABLE_FAST_INSTALL + + +# AC_DISABLE_FAST_INSTALL +# ----------------------- +# set the default to --disable-fast-install +AC_DEFUN([AC_DISABLE_FAST_INSTALL], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_FAST_INSTALL(no) +])# AC_DISABLE_FAST_INSTALL + + +# AC_LIBTOOL_PICMODE([MODE]) +# -------------------------- +# implement the --with-pic flag +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +AC_DEFUN([AC_LIBTOOL_PICMODE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +pic_mode=ifelse($#,1,$1,default) +])# AC_LIBTOOL_PICMODE + + +# AC_PROG_EGREP +# ------------- +# This is predefined starting with Autoconf 2.54, so this conditional +# definition can be removed once we require Autoconf 2.54 or later. +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], +[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], + [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi]) + EGREP=$ac_cv_prog_egrep + AC_SUBST([EGREP]) +])]) + + +# AC_PATH_TOOL_PREFIX +# ------------------- +# find a file program which can recognise shared library +AC_DEFUN([AC_PATH_TOOL_PREFIX], +[AC_REQUIRE([AC_PROG_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="ifelse([$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 <<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 + +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 +])# AC_PATH_TOOL_PREFIX + + +# AC_PATH_MAGIC +# ------------- +# find a file program which can recognise a shared library +AC_DEFUN([AC_PATH_MAGIC], +[AC_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 + AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# AC_PATH_MAGIC + + +# AC_PROG_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([AC_PROG_LD], +[AC_ARG_WITH([gnu-ld], + [AC_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]) +AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])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 </dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break + ;; + *) + test "$with_gnu_ld" != yes && break + ;; + esac + fi + done + IFS="$lt_save_ifs" +else + lt_cv_path_LD="$LD" # Let the user override the test with a path. +fi]) +LD="$lt_cv_path_LD" +if test -n "$LD"; then + AC_MSG_RESULT($LD) +else + AC_MSG_RESULT(no) +fi +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) +AC_PROG_LD_GNU +])# AC_PROG_LD + + +# AC_PROG_LD_GNU +# -------------- +AC_DEFUN([AC_PROG_LD_GNU], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_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` in +*GNU* | *'with BFD'*) + lt_cv_prog_gnu_ld=yes + ;; +*) + lt_cv_prog_gnu_ld=no + ;; +esac]) +with_gnu_ld=$lt_cv_prog_gnu_ld +])# AC_PROG_LD_GNU + + +# AC_PROG_LD_RELOAD_FLAG +# ---------------------- +# find reload flag for linker +# -- PORTME Some linkers may need a different reload flag. +AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], +[AC_CACHE_CHECK([for $LD option to reload object files], + lt_cv_ld_reload_flag, + [lt_cv_ld_reload_flag='-r']) +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 + 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 +])# AC_PROG_LD_RELOAD_FLAG + + +# AC_DEPLIBS_CHECK_METHOD +# ----------------------- +# how to check for library dependencies +# -- PORTME fill in with the dynamic library characteristics +AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], +[AC_CACHE_CHECK([how to recognise dependent libraries], +lt_cv_deplibs_check_method, +[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 +aix4* | aix5*) + 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'. + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | kfreebsd*-gnu | 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 + ;; + +gnu*) + 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]) 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 + ;; + +interix3*) + # 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 Linux ELF. +linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + 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=unknown + ;; + +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 + ;; + +solaris*) + 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 + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) +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 +])# AC_DEPLIBS_CHECK_METHOD + + +# AC_PROG_NM +# ---------- +# find the pathname to a BSD-compatible name lister +AC_DEFUN([AC_PROG_NM], +[AC_CACHE_CHECK([for BSD-compatible 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 + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi]) +NM="$lt_cv_path_NM" +])# AC_PROG_NM + + +# AC_CHECK_LIBM +# ------------- +# check for math library +AC_DEFUN([AC_CHECK_LIBM], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cygwin* | *-*-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_CHECK_LIBM + + +# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl convenience library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-convenience to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# it is assumed to be `libltdl'. LIBLTDL will be prefixed with +# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' +# (note the single quotes!). If your package is not flat and you're not +# using automake, define top_builddir and top_srcdir appropriately in +# the Makefiles. +AC_DEFUN([AC_LIBLTDL_CONVENIENCE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + case $enable_ltdl_convenience in + no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; + "") enable_ltdl_convenience=yes + ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; + esac + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_CONVENIENCE + + +# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl installable library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-install to the configure arguments. Note that +# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, +# and an installed libltdl is not found, it is assumed to be `libltdl'. +# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with +# '${top_srcdir}/' (note the single quotes!). If your package is not +# flat and you're not using automake, define top_builddir and top_srcdir +# appropriately in the Makefiles. +# In the future, this macro may have to be called after AC_PROG_LIBTOOL. +AC_DEFUN([AC_LIBLTDL_INSTALLABLE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + AC_CHECK_LIB(ltdl, lt_dlinit, + [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], + [if test x"$enable_ltdl_install" = xno; then + AC_MSG_WARN([libltdl not installed, but installation disabled]) + else + enable_ltdl_install=yes + fi + ]) + if test x"$enable_ltdl_install" = x"yes"; then + ac_configure_args="$ac_configure_args --enable-ltdl-install" + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + else + ac_configure_args="$ac_configure_args --enable-ltdl-install=no" + LIBLTDL="-lltdl" + LTDLINCL= + fi + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_INSTALLABLE + + +# AC_LIBTOOL_CXX +# -------------- +# enable support for C++ libraries +AC_DEFUN([AC_LIBTOOL_CXX], +[AC_REQUIRE([_LT_AC_LANG_CXX]) +])# AC_LIBTOOL_CXX + + +# _LT_AC_LANG_CXX +# --------------- +AC_DEFUN([_LT_AC_LANG_CXX], +[AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) +])# _LT_AC_LANG_CXX + +# _LT_AC_PROG_CXXCPP +# ------------------ +AC_DEFUN([_LT_AC_PROG_CXXCPP], +[ +AC_REQUIRE([AC_PROG_CXX]) +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 +fi +])# _LT_AC_PROG_CXXCPP + +# AC_LIBTOOL_F77 +# -------------- +# enable support for Fortran 77 libraries +AC_DEFUN([AC_LIBTOOL_F77], +[AC_REQUIRE([_LT_AC_LANG_F77]) +])# AC_LIBTOOL_F77 + + +# _LT_AC_LANG_F77 +# --------------- +AC_DEFUN([_LT_AC_LANG_F77], +[AC_REQUIRE([AC_PROG_F77]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) +])# _LT_AC_LANG_F77 + + +# AC_LIBTOOL_GCJ +# -------------- +# enable support for GCJ libraries +AC_DEFUN([AC_LIBTOOL_GCJ], +[AC_REQUIRE([_LT_AC_LANG_GCJ]) +])# AC_LIBTOOL_GCJ + + +# _LT_AC_LANG_GCJ +# --------------- +AC_DEFUN([_LT_AC_LANG_GCJ], +[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], + [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], + [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], + [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) +])# _LT_AC_LANG_GCJ + + +# AC_LIBTOOL_RC +# ------------- +# enable support for Windows resource files +AC_DEFUN([AC_LIBTOOL_RC], +[AC_REQUIRE([LT_AC_PROG_RC]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) +])# AC_LIBTOOL_RC + + +# AC_LIBTOOL_LANG_C_CONFIG +# ------------------------ +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) +AC_DEFUN([_LT_AC_LANG_C_CONFIG], +[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_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}\n' + +_LT_AC_SYS_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) +AC_LIBTOOL_SYS_LIB_STRIP +AC_LIBTOOL_DLOPEN_SELF + +# 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 + ;; + +aix4* | aix5*) + 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]) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_C_CONFIG + + +# AC_LIBTOOL_LANG_CXX_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) +AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], +[AC_LANG_PUSH(C++) +AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) + +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(allow_undefined_flag, $1)= +_LT_AC_TAGVAR(always_export_symbols, $1)=no +_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_direct, $1)=no +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported +_LT_AC_TAGVAR(hardcode_automatic, $1)=no +_LT_AC_TAGVAR(module_cmds, $1)= +_LT_AC_TAGVAR(module_expsym_cmds, $1)= +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_AC_TAGVAR(no_undefined_flag, $1)= +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Dependencies to place before and after the object being linked: +_LT_AC_TAGVAR(predep_objects, $1)= +_LT_AC_TAGVAR(postdep_objects, $1)= +_LT_AC_TAGVAR(predeps, $1)= +_LT_AC_TAGVAR(postdeps, $1)= +_LT_AC_TAGVAR(compiler_lib_search_path, $1)= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_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_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++"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' +else + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + AC_PROG_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_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_AC_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 "\-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_AC_TAGVAR(ld_shlibs, $1)=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + 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 + 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]].*|aix5*) + 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_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + 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 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + else + # We have old collect2 + _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_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 + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_AC_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 echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_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_AC_SYS_LIBPATH_AIX + _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + _LT_AC_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' + fi + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + freebsd[[12]]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + freebsd-elf*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + ;; + gnu*) + ;; + hpux9*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + _LT_AC_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) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + ;; + *) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_AC_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; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + interix3*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_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_AC_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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -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_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + linux*) + 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_AC_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_AC_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; echo $list' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' + _LT_AC_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_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # 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_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC*) + # Portland Group C++ compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_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=`echo $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; echo $list' + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + m88k*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + openbsd*) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_AC_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_AC_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_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + ;; + osf3*) + 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_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=`echo $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; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_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" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_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 "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + 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_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_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=`echo $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; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_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 "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The C++ compiler is used as linker so we must use $wl + # flag to pass the commands to the underlying system + # linker. We must also pass each convience library through + # to the system linker between allextract/defaultextract. + # The C++ compiler will combine linker options so we + # cannot just pass the convience library names through + # without $wl. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' + ;; + esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + output_verbose_link_cmd='echo' + + # 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_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_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_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -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 \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_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 \"\-L\"" + fi + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + fi + ;; + esac + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_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. + # 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. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; +esac +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_AC_TAGVAR(GCC, $1)="$GXX" +_LT_AC_TAGVAR(LD, $1)="$LD" + +AC_LIBTOOL_POSTDEP_PREDEP($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +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 +])# AC_LIBTOOL_LANG_CXX_CONFIG + +# AC_LIBTOOL_POSTDEP_PREDEP([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. +AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ +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... +ifelse([$1],[],[cat > conftest.$ac_ext <<EOF +int a; +void foo (void) { a = 0; } +EOF +],[$1],[CXX],[cat > conftest.$ac_ext <<EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +EOF +],[$1],[F77],[cat > conftest.$ac_ext <<EOF + subroutine foo + implicit none + integer*4 a + a=0 + return + end +EOF +],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF +public class foo { + private int a; + public void bar (void) { + a = 0; + } +}; +EOF +]) +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 + + # The `*' in the case matches for architectures that use `case' in + # $output_verbose_cmd can trigger glob expansion during the loop + # eval without this substitution. + output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` + + for p in `eval $output_verbose_link_cmd`; do + case $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 + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p 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_AC_TAGVAR(compiler_lib_search_path, $1)"; then + _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" + else + _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_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_AC_TAGVAR(postdeps, $1)"; then + _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" + else + _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" + fi + fi + ;; + + *.$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_AC_TAGVAR(predep_objects, $1)"; then + _LT_AC_TAGVAR(predep_objects, $1)="$p" + else + _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" + fi + else + if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then + _LT_AC_TAGVAR(postdep_objects, $1)="$p" + else + _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_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 + +# PORTME: override above test on systems where it is broken +ifelse([$1],[CXX], +[case $host_os in +interix3*) + # 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_AC_TAGVAR(predep_objects,$1)= + _LT_AC_TAGVAR(postdep_objects,$1)= + _LT_AC_TAGVAR(postdeps,$1)= + ;; + +solaris*) + case $cc_basename in + CC*) + # 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. + _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' + ;; + esac + ;; +esac +]) + +case " $_LT_AC_TAGVAR(postdeps, $1) " in +*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; +esac +])# AC_LIBTOOL_POSTDEP_PREDEP + +# AC_LIBTOOL_LANG_F77_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) +AC_DEFUN([_LT_AC_LANG_F77_CONFIG], +[AC_REQUIRE([AC_PROG_F77]) +AC_LANG_PUSH(Fortran 77) + +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(allow_undefined_flag, $1)= +_LT_AC_TAGVAR(always_export_symbols, $1)=no +_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_direct, $1)=no +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_automatic, $1)=no +_LT_AC_TAGVAR(module_cmds, $1)= +_LT_AC_TAGVAR(module_expsym_cmds, $1)= +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_AC_TAGVAR(no_undefined_flag, $1)= +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +_LT_AC_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_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code=" subroutine t\n return\n end\n" + +# Code to be used in simple link tests +lt_simple_link_test_code=" program t\n end\n" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_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" +CC=${F77-"f77"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +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 + ;; +aix4* | aix5*) + 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_AC_TAGVAR(GCC, $1)="$G77" +_LT_AC_TAGVAR(LD, $1)="$LD" + +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_F77_CONFIG + + +# AC_LIBTOOL_LANG_GCJ_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) +AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], +[AC_LANG_SAVE + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_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" +CC=${GCJ-"gcj"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds + +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_RESTORE +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_GCJ_CONFIG + + +# AC_LIBTOOL_LANG_RC_CONFIG +# ------------------------- +# Ensure that the configuration vars for the Windows resource compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) +AC_DEFUN([_LT_AC_LANG_RC_CONFIG], +[AC_LANG_SAVE + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' + +# 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_AC_SYS_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" +CC=${RC-"windres"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +_LT_CC_BASENAME([$compiler]) +_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_RESTORE +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_RC_CONFIG + + +# AC_LIBTOOL_CONFIG([TAGNAME]) +# ---------------------------- +# If TAGNAME is not passed, then 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 +# TAGNAME from the matching tagged config vars. +AC_DEFUN([AC_LIBTOOL_CONFIG], +[# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + _LT_AC_TAGVAR(compiler, $1) \ + _LT_AC_TAGVAR(CC, $1) \ + _LT_AC_TAGVAR(LD, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ + _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ + _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ + _LT_AC_TAGVAR(old_archive_cmds, $1) \ + _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ + _LT_AC_TAGVAR(predep_objects, $1) \ + _LT_AC_TAGVAR(postdep_objects, $1) \ + _LT_AC_TAGVAR(predeps, $1) \ + _LT_AC_TAGVAR(postdeps, $1) \ + _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ + _LT_AC_TAGVAR(archive_cmds, $1) \ + _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ + _LT_AC_TAGVAR(postinstall_cmds, $1) \ + _LT_AC_TAGVAR(postuninstall_cmds, $1) \ + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ + _LT_AC_TAGVAR(allow_undefined_flag, $1) \ + _LT_AC_TAGVAR(no_undefined_flag, $1) \ + _LT_AC_TAGVAR(export_symbols_cmds, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ + _LT_AC_TAGVAR(hardcode_automatic, $1) \ + _LT_AC_TAGVAR(module_cmds, $1) \ + _LT_AC_TAGVAR(module_expsym_cmds, $1) \ + _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ + _LT_AC_TAGVAR(exclude_expsyms, $1) \ + _LT_AC_TAGVAR(include_expsyms, $1); do + + case $var in + _LT_AC_TAGVAR(old_archive_cmds, $1) | \ + _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ + _LT_AC_TAGVAR(archive_cmds, $1) | \ + _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ + _LT_AC_TAGVAR(module_cmds, $1) | \ + _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ + _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\[$]0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` + ;; + esac + +ifelse([$1], [], + [cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" + AC_MSG_NOTICE([creating $ofile])], + [cfgfile="$ofile"]) + + cat <<__EOF__ >> "$cfgfile" +ifelse([$1], [], +[#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 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., 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. + +# 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//" + +# 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 + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG], +[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# 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 + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) + +# Is the compiler the GNU C compiler? +with_gcc=$_LT_AC_TAGVAR(GCC, $1) + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_[]_LT_AC_TAGVAR(LD, $1) + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) + +# Commands used to build and install a shared archive. +archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) +archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) +module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) + +# 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=$_LT_AC_TAGVAR(hardcode_automatic, $1) + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" + +# Set to yes if exported symbols are required. +always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) + +# The commands to list exported symbols. +export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) + +# Symbols that must always be exported. +include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) + +ifelse([$1],[], +[# ### END LIBTOOL CONFIG], +[# ### END LIBTOOL TAG CONFIG: $tagname]) + +__EOF__ + +ifelse([$1],[], [ + case $host_os in + aix3*) + cat <<\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 +EOF + ;; + esac + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +]) +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi +])# AC_LIBTOOL_CONFIG + + +# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl + +_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + + AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI + + +# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +# --------------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], +[AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([AC_PROG_NM]) +AC_REQUIRE([AC_OBJEXT]) +# 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]]*\)' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux*) + if test "$host_cpu" = ia64; then + symcode='[[ABCDGIRSTW]]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + 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 + +# 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 + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Try without a prefix undercore, 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. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +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 <<EOF > conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <<EOF >> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[[]] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_AC_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_save_LIBS" + CFLAGS="$lt_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 -f 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 +]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE + + +# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) +# --------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], +[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= + +AC_MSG_CHECKING([for $compiler option to produce PIC]) + ifelse([$1],[CXX],[ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + amigaos*) + # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | os2* | pw32*) + # 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_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + interix3*) + # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # 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*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_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 + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux*) + case $cc_basename in + KCC*) + # KAI C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgCC*) + # Portland Group C++ compiler. + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx*) + # Digital/Compaq C++ + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc*) + # Lucid + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + esac + ;; + vxworks*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # 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_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + interix3*) + # 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_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + hpux*) + # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;; + + mingw* | pw32* | os2*) + # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + _LT_AC_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_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + newsos6) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + linux*) + case $cc_basename in + icc* | ecc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + ccc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + solaris*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; + *) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; + esac + ;; + + sunos4*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + unicos*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + + uts4*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then + AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], + _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), + [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" +AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], + _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), + $lt_tmp_static_flag, + [], + [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) +]) + + +# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) +# ------------------------------------ +# See if the linker supports building shared libraries. +AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], +[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +ifelse([$1],[CXX],[ + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # 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 + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_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_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw*) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + ;; + *) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +],[ + runpath_var= + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)= + _LT_AC_TAGVAR(archive_expsym_cmds, $1)= + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_minus_L, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown + _LT_AC_TAGVAR(hardcode_automatic, $1)=no + _LT_AC_TAGVAR(module_cmds, $1)= + _LT_AC_TAGVAR(module_expsym_cmds, $1)= + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_AC_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_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" + # 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. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + _LT_CC_BASENAME([$compiler]) + 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 + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + if test "$with_gnu_ld" = 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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_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_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [[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 + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <<EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, 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 modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + + # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> 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't use + # them. + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_AC_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' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_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_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + interix3*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_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_AC_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_AC_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' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$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' ;; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + _LT_AC_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 -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $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_AC_TAGVAR(ld_shlibs, $1)=no + cat <<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. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_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_AC_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 + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + + sunos4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_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_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then + runpath_var= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + _LT_AC_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_AC_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_AC_TAGVAR(hardcode_direct, $1)=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 + 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 + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_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]].*|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 + + 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_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + 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 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + else + # We have old collect2 + _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_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 + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_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_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_AC_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 echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_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_AC_SYS_LIBPATH_AIX + _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds its shared libraries. + _LT_AC_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*) + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + # see comment about different semantics on the GNU ld section + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + bsdi[[45]]*) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + 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. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' + _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi + ;; + + dgux*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu | dragonfly*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case $host_cpu in + hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + case $host_cpu in + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_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_AC_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + openbsd*) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_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_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_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~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + solaris*) + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_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' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; + *) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; + esac + _LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_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_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_AC_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_MSG_CHECKING([whether -lc should be explicitly linked in]) + $rm conftest* + printf "$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_AC_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) + then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac +])# AC_LIBTOOL_PROG_LD_SHLIBS + + +# _LT_AC_FILE_LTDLL_C +# ------------------- +# Be careful that the start marker always follows a newline. +AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ +# /* ltdll.c starts here */ +# #define WIN32_LEAN_AND_MEAN +# #include <windows.h> +# #undef WIN32_LEAN_AND_MEAN +# #include <stdio.h> +# +# #ifndef __CYGWIN__ +# # ifdef __CYGWIN32__ +# # define __CYGWIN__ __CYGWIN32__ +# # endif +# #endif +# +# #ifdef __cplusplus +# extern "C" { +# #endif +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); +# #ifdef __cplusplus +# } +# #endif +# +# #ifdef __CYGWIN__ +# #include <cygwin/cygwin_dll.h> +# DECLARE_CYGWIN_DLL( DllMain ); +# #endif +# HINSTANCE __hDllInstance_base; +# +# BOOL APIENTRY +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) +# { +# __hDllInstance_base = hInst; +# return TRUE; +# } +# /* ltdll.c ends here */ +])# _LT_AC_FILE_LTDLL_C + + +# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) +# --------------------------------- +AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) + + +# old names +AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) +AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) +AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) +AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) +AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) + +# This is just to silence aclocal about the macro not being used +ifelse([AC_DISABLE_FAST_INSTALL]) + +AC_DEFUN([LT_AC_PROG_GCJ], +[AC_CHECK_TOOL(GCJ, gcj, no) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS) +]) + +AC_DEFUN([LT_AC_PROG_RC], +[AC_CHECK_TOOL(RC, windres, no) +]) + +# 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. # +# LT_AC_PROG_SED +# -------------- +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +AC_DEFUN([LT_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 +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_MSG_RESULT([$SED]) +]) + +# Copyright (C) 2002, 2003, 2005 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. +AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION so it can be traced. +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], + [AM_AUTOMAKE_VERSION([1.9.6])]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001, 2003, 2005 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, 2000, 2001, 2003, 2004, 2005 +# 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. + +# serial 7 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE]) +AC_SUBST([$1_FALSE]) +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, 2000, 2001, 2002, 2003, 2004, 2005 +# 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. + +# serial 8 + +# 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", "GCJ", or "OBJC". +# 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 + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$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'. + 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 + 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 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + 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 + ;; + none) break ;; + esac + # 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. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} 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, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH]) +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# 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. + +#serial 3 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[for mf in $CONFIG_FILES; 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. + # So let's grep whole file. + if grep '^#.*generated by automake' $mf > /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"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //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' -e 's/\$U/'"$U"'/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, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# 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. + +# serial 12 + +# 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. + +# 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.58])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 +# test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +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], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])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) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# 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)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +]) +]) + + +# 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_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $1 | $1:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005 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 +install_sh=${install_sh-"$am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 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. + +# serial 2 + +# 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, 1998, 2000, 2001, 2002, 2003, 2004, 2005 +# 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. + +# serial 4 + +AC_DEFUN([AM_MAINTAINER_MODE], +[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode is disabled by default + AC_ARG_ENABLE(maintainer-mode, +[ --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + USE_MAINTAINER_MODE=$enableval, + USE_MAINTAINER_MODE=no) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST(MAINT)dnl +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 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. + +# serial 3 + +# 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 done +.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 +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +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, 1999, 2000, 2001, 2003, 2005 +# 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. + +# serial 4 + +# 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 supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005 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_MKDIR_P +# --------------- +# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. +# +# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories +# created by `make install' are always world readable, even if the +# installer happens to have an overly restrictive umask (e.g. 077). +# This was a mistake. There are at least two reasons why we must not +# use `-m 0755': +# - it causes special bits like SGID to be ignored, +# - it may be too restrictive (some setups expect 775 directories). +# +# Do not use -m 0755 and let people choose whatever they expect by +# setting umask. +# +# We cannot accept any implementation of `mkdir' that recognizes `-p'. +# Some implementations (such as Solaris 8's) are not thread-safe: if a +# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' +# concurrently, both version can detect that a/ is missing, but only +# one can create it and the other will error out. Consequently we +# restrict ourselves to GNU make (using the --version option ensures +# this.) +AC_DEFUN([AM_PROG_MKDIR_P], +[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + # We used to keeping the `.' as first argument, in order to + # allow $(mkdir_p) to be used without argument. As in + # $(mkdir_p) $(somedir) + # where $(somedir) is conditionally defined. However this is wrong + # for two reasons: + # 1. if the package is installed by a user who cannot write `.' + # make install will fail, + # 2. the above comment should most certainly read + # $(mkdir_p) $(DESTDIR)$(somedir) + # so it does not work when $(somedir) is undefined and + # $(DESTDIR) is not. + # To support the latter case, we have to write + # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), + # so the `.' trick is pointless. + mkdir_p='mkdir -p --' +else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + for d in ./-p ./--version; + do + test -d $d && rmdir $d + done + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. + if test -f "$ac_aux_dir/mkinstalldirs"; then + mkdir_p='$(mkinstalldirs)' + else + mkdir_p='$(install_sh) -d' + fi +fi +AC_SUBST([mkdir_p])]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005 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. + +# serial 3 + +# _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], +[AC_FOREACH([_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])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# 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. + +# serial 4 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# 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 ( + 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 + rm -f conftest.file + 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 + + 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)]) + +# Copyright (C) 2001, 2003, 2005 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="\${SHELL} \$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004, 2005 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. + +# serial 2 + +# _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. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +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 <conftest.tar]) + grep GrepMe conftest.dir/file >/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/ac_compile_check_sizeof.m4]) +m4_include([m4/ac_set_default_paths_system.m4]) +m4_include([m4/ac_sys_largefile_sensitive.m4]) +m4_include([m4/acx_restrict.m4]) +m4_include([m4/ax_cflags_gcc_option.m4]) +m4_include([m4/ax_cflags_no_writable_strings.m4]) +m4_include([m4/ax_cflags_strict_prototypes.m4]) +m4_include([m4/ax_cflags_warn_all.m4]) +m4_include([m4/ax_create_pkgconfig_info.m4]) +m4_include([m4/ax_enable_builddir_uname.m4]) +m4_include([m4/ax_expand_prefix.m4]) +m4_include([m4/ax_maintainer_mode_auto_silent.m4]) +m4_include([m4/ax_not_enable_frame_pointer.m4]) +m4_include([m4/ax_prefix_config_h.m4]) +m4_include([m4/ax_set_version_info.m4]) +m4_include([m4/ax_spec_file.m4]) +m4_include([m4/ax_spec_package_version.m4]) +m4_include([m4/ax_warning_default_aclocaldir.m4]) +m4_include([m4/ax_warning_default_pkgconfig.m4]) +m4_include([m4/patch_libtool_on_darwin_zsh_overquoting.m4]) +m4_include([m4/patch_libtool_sys_lib_search_path_spec.m4]) +m4_include([m4/patch_libtool_to_add_host_cc.m4]) diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/bins/Makefile.am b/Build/source/libs/zziplib/zziplib-0.13.58/bins/Makefile.am new file mode 100644 index 00000000000..ed9429d35df --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/bins/Makefile.am @@ -0,0 +1,56 @@ +AUTOMAKE_OPTIONS = 1.4 foreign +AUTOTOOL_VERSION=autoconf-2.52 automake-1.5 libtool-1.4.2 +DEFAULT_INCLUDES = # nothing - no default of -I. -I$(srcdir) +DEFS = @DEFS@ -I$(top_builddir) -I$(top_srcdir) # also for automake 1.4 + +bin_PROGRAMS = zzcat zzdir zzxorcat zzxordir zzxorcopy \ + unzzip unzzipdir unzzipcat unzzipcat-seeko \ + unzzipdir-mem unzzipcat-mem unzip-mem +noinst_PROGRAMS = zziptest zzobfuscated zzip +aclocaldir = $(datadir)/aclocal +aclocal_DATA = zziplib.m4 +# +VERSION_INFO=@VERSION_INFO@ +RELEASE_INFO=@RELEASE_INFO@ +THREAD_SAFE=@THREAD_SAFE@ +# + +WCC10_CLEAN = *.obj *.lk1 *.mk1 *.mk *.sym *.tgt + +EXTRA_DIST = $(aclocal_DATA) +CLEANFILES = $(WCC10_CLEAN) + +unzzip_LDFLAGS = @ZZIPLIB_LDFLAGS@ +unzzip_LDADD = ../zzip/libzzip.la @RESOLVES@ -lz +zzip_LDFLAGS = @ZZIPLIB_LDFLAGS@ +zzip_LDADD = ../zzip/libzzip.la @RESOLVES@ -lz +zziptest_LDFLAGS = @ZZIPLIB_LDFLAGS@ +zziptest_LDADD = ../zzip/libzzip.la @RESOLVES@ -lz +zzcat_LDFLAGS = @ZZIPLIB_LDFLAGS@ +zzcat_LDADD = ../zzip/libzzip.la @RESOLVES@ -lz +zzdir_LDFLAGS = @ZZIPLIB_LDFLAGS@ +zzdir_LDADD = ../zzip/libzzip.la @RESOLVES@ -lz +zzxorcat_LDFLAGS = @ZZIPLIB_LDFLAGS@ +zzxorcat_LDADD = ../zzip/libzzip.la @RESOLVES@ -lz +zzxordir_LDFLAGS = @ZZIPLIB_LDFLAGS@ +zzxordir_LDADD = ../zzip/libzzip.la @RESOLVES@ -lz +zzobfuscated_LDFLAGS = @ZZIPLIB_LDFLAGS@ +zzobfuscated_LDADD = ../zzip/libzzip.la @RESOLVES@ -lz + +# these use the simplified mmapped disk version +unzzipdir_LDFLAGS = @ZZIPLIB_LDFLAGS@ +unzzipdir_LDADD = ../zzip/libzzipmmapped.la @RESOLVES@ -lz +unzzipcat_LDFLAGS = @ZZIPLIB_LDFLAGS@ +unzzipcat_LDADD = ../zzip/libzzipmmapped.la @RESOLVES@ -lz +unzzipdir_mem_LDFLAGS = @ZZIPLIB_LDFLAGS@ +unzzipdir_mem_LDADD = ../zzip/libzzipmmapped.la @RESOLVES@ -lz +unzzipcat_mem_LDFLAGS = @ZZIPLIB_LDFLAGS@ +unzzipcat_mem_LDADD = ../zzip/libzzipmmapped.la @RESOLVES@ -lz +unzip_mem_LDFLAGS = @ZZIPLIB_LDFLAGS@ +unzip_mem_LDADD = ../zzip/libzzipmmapped.la @RESOLVES@ -lz +# and this uses the simplified fseeko stdio version +unzzipcat_seeko_LDFLAGS = @ZZIPLIB_LDFLAGS@ +unzzipcat_seeko_LDADD = ../zzip/libzzipfseeko.la @RESOLVES@ -lz + +../zzip/libzzip.la : @top_srcdir@/zzip/*.c + (cd ../zzip && $(MAKE) `basename $@`) diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/bins/Makefile.in b/Build/source/libs/zziplib/zziplib-0.13.58/bins/Makefile.in new file mode 100644 index 00000000000..42380ca40b7 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/bins/Makefile.in @@ -0,0 +1,689 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 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@ + + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +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@ +target_triplet = @target@ +bin_PROGRAMS = zzcat$(EXEEXT) zzdir$(EXEEXT) zzxorcat$(EXEEXT) \ + zzxordir$(EXEEXT) zzxorcopy$(EXEEXT) unzzip$(EXEEXT) \ + unzzipdir$(EXEEXT) unzzipcat$(EXEEXT) unzzipcat-seeko$(EXEEXT) \ + unzzipdir-mem$(EXEEXT) unzzipcat-mem$(EXEEXT) \ + unzip-mem$(EXEEXT) +noinst_PROGRAMS = zziptest$(EXEEXT) zzobfuscated$(EXEEXT) \ + zzip$(EXEEXT) +subdir = bins +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_compile_check_sizeof.m4 \ + $(top_srcdir)/m4/ac_set_default_paths_system.m4 \ + $(top_srcdir)/m4/ac_sys_largefile_sensitive.m4 \ + $(top_srcdir)/m4/acx_restrict.m4 \ + $(top_srcdir)/m4/ax_cflags_gcc_option.m4 \ + $(top_srcdir)/m4/ax_cflags_no_writable_strings.m4 \ + $(top_srcdir)/m4/ax_cflags_strict_prototypes.m4 \ + $(top_srcdir)/m4/ax_cflags_warn_all.m4 \ + $(top_srcdir)/m4/ax_create_pkgconfig_info.m4 \ + $(top_srcdir)/m4/ax_enable_builddir_uname.m4 \ + $(top_srcdir)/m4/ax_expand_prefix.m4 \ + $(top_srcdir)/m4/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/m4/ax_not_enable_frame_pointer.m4 \ + $(top_srcdir)/m4/ax_prefix_config_h.m4 \ + $(top_srcdir)/m4/ax_set_version_info.m4 \ + $(top_srcdir)/m4/ax_spec_file.m4 \ + $(top_srcdir)/m4/ax_spec_package_version.m4 \ + $(top_srcdir)/m4/ax_warning_default_aclocaldir.m4 \ + $(top_srcdir)/m4/ax_warning_default_pkgconfig.m4 \ + $(top_srcdir)/m4/patch_libtool_on_darwin_zsh_overquoting.m4 \ + $(top_srcdir)/m4/patch_libtool_sys_lib_search_path_spec.m4 \ + $(top_srcdir)/m4/patch_libtool_to_add_host_cc.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/uses/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(aclocaldir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) +unzip_mem_SOURCES = unzip-mem.c +unzip_mem_OBJECTS = unzip-mem.$(OBJEXT) +unzip_mem_DEPENDENCIES = ../zzip/libzzipmmapped.la +unzzip_SOURCES = unzzip.c +unzzip_OBJECTS = unzzip.$(OBJEXT) +unzzip_DEPENDENCIES = ../zzip/libzzip.la +unzzipcat_SOURCES = unzzipcat.c +unzzipcat_OBJECTS = unzzipcat.$(OBJEXT) +unzzipcat_DEPENDENCIES = ../zzip/libzzipmmapped.la +unzzipcat_mem_SOURCES = unzzipcat-mem.c +unzzipcat_mem_OBJECTS = unzzipcat-mem.$(OBJEXT) +unzzipcat_mem_DEPENDENCIES = ../zzip/libzzipmmapped.la +unzzipcat_seeko_SOURCES = unzzipcat-seeko.c +unzzipcat_seeko_OBJECTS = unzzipcat-seeko.$(OBJEXT) +unzzipcat_seeko_DEPENDENCIES = ../zzip/libzzipfseeko.la +unzzipdir_SOURCES = unzzipdir.c +unzzipdir_OBJECTS = unzzipdir.$(OBJEXT) +unzzipdir_DEPENDENCIES = ../zzip/libzzipmmapped.la +unzzipdir_mem_SOURCES = unzzipdir-mem.c +unzzipdir_mem_OBJECTS = unzzipdir-mem.$(OBJEXT) +unzzipdir_mem_DEPENDENCIES = ../zzip/libzzipmmapped.la +zzcat_SOURCES = zzcat.c +zzcat_OBJECTS = zzcat.$(OBJEXT) +zzcat_DEPENDENCIES = ../zzip/libzzip.la +zzdir_SOURCES = zzdir.c +zzdir_OBJECTS = zzdir.$(OBJEXT) +zzdir_DEPENDENCIES = ../zzip/libzzip.la +zzip_SOURCES = zzip.c +zzip_OBJECTS = zzip.$(OBJEXT) +zzip_DEPENDENCIES = ../zzip/libzzip.la +zziptest_SOURCES = zziptest.c +zziptest_OBJECTS = zziptest.$(OBJEXT) +zziptest_DEPENDENCIES = ../zzip/libzzip.la +zzobfuscated_SOURCES = zzobfuscated.c +zzobfuscated_OBJECTS = zzobfuscated.$(OBJEXT) +zzobfuscated_DEPENDENCIES = ../zzip/libzzip.la +zzxorcat_SOURCES = zzxorcat.c +zzxorcat_OBJECTS = zzxorcat.$(OBJEXT) +zzxorcat_DEPENDENCIES = ../zzip/libzzip.la +zzxorcopy_SOURCES = zzxorcopy.c +zzxorcopy_OBJECTS = zzxorcopy.$(OBJEXT) +zzxorcopy_LDADD = $(LDADD) +zzxordir_SOURCES = zzxordir.c +zzxordir_OBJECTS = zzxordir.$(OBJEXT) +zzxordir_DEPENDENCIES = ../zzip/libzzip.la +depcomp = $(SHELL) $(top_srcdir)/uses/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = unzip-mem.c unzzip.c unzzipcat.c unzzipcat-mem.c \ + unzzipcat-seeko.c unzzipdir.c unzzipdir-mem.c zzcat.c zzdir.c \ + zzip.c zziptest.c zzobfuscated.c zzxorcat.c zzxorcopy.c \ + zzxordir.c +DIST_SOURCES = unzip-mem.c unzzip.c unzzipcat.c unzzipcat-mem.c \ + unzzipcat-seeko.c unzzipdir.c unzzipdir-mem.c zzcat.c zzdir.c \ + zzip.c zziptest.c zzobfuscated.c zzxorcat.c zzxorcopy.c \ + zzxordir.c +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 = `echo $$p | sed -e 's|^.*/||'`; +aclocalDATA_INSTALL = $(INSTALL_DATA) +DATA = $(aclocal_DATA) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONFIG_FILES = @CONFIG_FILES@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ -I$(top_builddir) -I$(top_srcdir) # also for automake 1.4 +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LARGEFILE_CFLAGS = @LARGEFILE_CFLAGS@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +MKZIP = @MKZIP@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PKG_CONFIG = @PKG_CONFIG@ +PYTHON = @PYTHON@ +RANLIB = @RANLIB@ +RELEASE_INFO = @RELEASE_INFO@ +RESOLVES = @RESOLVES@ +SDL = @SDL@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +THREAD_SAFE = @THREAD_SAFE@ +VERSION = @VERSION@ +# +VERSION_INFO = @VERSION_INFO@ +XMLTO = @XMLTO@ +ZIPTESTS = @ZIPTESTS@ +ZLIB_INCL = @ZLIB_INCL@ +ZLIB_LDIR = @ZLIB_LDIR@ +ZLIB_VERSION = @ZLIB_VERSION@ +ZZIPLIB_LDFLAGS = @ZZIPLIB_LDFLAGS@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_AS = @ac_ct_AS@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +aclocaldir = $(datadir)/aclocal +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +ax_enable_builddir_sed = @ax_enable_builddir_sed@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +docdir = @docdir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pkgconfig_libdir = @pkgconfig_libdir@ +pkgconfig_libfile = @pkgconfig_libfile@ +pkgconfigdir = @pkgconfigdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +AUTOMAKE_OPTIONS = 1.4 foreign +AUTOTOOL_VERSION = autoconf-2.52 automake-1.5 libtool-1.4.2 +DEFAULT_INCLUDES = # nothing - no default of -I. -I$(srcdir) +aclocal_DATA = zziplib.m4 +# +WCC10_CLEAN = *.obj *.lk1 *.mk1 *.mk *.sym *.tgt +EXTRA_DIST = $(aclocal_DATA) +CLEANFILES = $(WCC10_CLEAN) +unzzip_LDFLAGS = @ZZIPLIB_LDFLAGS@ +unzzip_LDADD = ../zzip/libzzip.la @RESOLVES@ -lz +zzip_LDFLAGS = @ZZIPLIB_LDFLAGS@ +zzip_LDADD = ../zzip/libzzip.la @RESOLVES@ -lz +zziptest_LDFLAGS = @ZZIPLIB_LDFLAGS@ +zziptest_LDADD = ../zzip/libzzip.la @RESOLVES@ -lz +zzcat_LDFLAGS = @ZZIPLIB_LDFLAGS@ +zzcat_LDADD = ../zzip/libzzip.la @RESOLVES@ -lz +zzdir_LDFLAGS = @ZZIPLIB_LDFLAGS@ +zzdir_LDADD = ../zzip/libzzip.la @RESOLVES@ -lz +zzxorcat_LDFLAGS = @ZZIPLIB_LDFLAGS@ +zzxorcat_LDADD = ../zzip/libzzip.la @RESOLVES@ -lz +zzxordir_LDFLAGS = @ZZIPLIB_LDFLAGS@ +zzxordir_LDADD = ../zzip/libzzip.la @RESOLVES@ -lz +zzobfuscated_LDFLAGS = @ZZIPLIB_LDFLAGS@ +zzobfuscated_LDADD = ../zzip/libzzip.la @RESOLVES@ -lz + +# these use the simplified mmapped disk version +unzzipdir_LDFLAGS = @ZZIPLIB_LDFLAGS@ +unzzipdir_LDADD = ../zzip/libzzipmmapped.la @RESOLVES@ -lz +unzzipcat_LDFLAGS = @ZZIPLIB_LDFLAGS@ +unzzipcat_LDADD = ../zzip/libzzipmmapped.la @RESOLVES@ -lz +unzzipdir_mem_LDFLAGS = @ZZIPLIB_LDFLAGS@ +unzzipdir_mem_LDADD = ../zzip/libzzipmmapped.la @RESOLVES@ -lz +unzzipcat_mem_LDFLAGS = @ZZIPLIB_LDFLAGS@ +unzzipcat_mem_LDADD = ../zzip/libzzipmmapped.la @RESOLVES@ -lz +unzip_mem_LDFLAGS = @ZZIPLIB_LDFLAGS@ +unzip_mem_LDADD = ../zzip/libzzipmmapped.la @RESOLVES@ -lz +# and this uses the simplified fseeko stdio version +unzzipcat_seeko_LDFLAGS = @ZZIPLIB_LDFLAGS@ +unzzipcat_seeko_LDADD = ../zzip/libzzipfseeko.la @RESOLVES@ -lz +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 \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign bins/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign bins/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 +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +unzip-mem$(EXEEXT): $(unzip_mem_OBJECTS) $(unzip_mem_DEPENDENCIES) + @rm -f unzip-mem$(EXEEXT) + $(LINK) $(unzip_mem_LDFLAGS) $(unzip_mem_OBJECTS) $(unzip_mem_LDADD) $(LIBS) +unzzip$(EXEEXT): $(unzzip_OBJECTS) $(unzzip_DEPENDENCIES) + @rm -f unzzip$(EXEEXT) + $(LINK) $(unzzip_LDFLAGS) $(unzzip_OBJECTS) $(unzzip_LDADD) $(LIBS) +unzzipcat$(EXEEXT): $(unzzipcat_OBJECTS) $(unzzipcat_DEPENDENCIES) + @rm -f unzzipcat$(EXEEXT) + $(LINK) $(unzzipcat_LDFLAGS) $(unzzipcat_OBJECTS) $(unzzipcat_LDADD) $(LIBS) +unzzipcat-mem$(EXEEXT): $(unzzipcat_mem_OBJECTS) $(unzzipcat_mem_DEPENDENCIES) + @rm -f unzzipcat-mem$(EXEEXT) + $(LINK) $(unzzipcat_mem_LDFLAGS) $(unzzipcat_mem_OBJECTS) $(unzzipcat_mem_LDADD) $(LIBS) +unzzipcat-seeko$(EXEEXT): $(unzzipcat_seeko_OBJECTS) $(unzzipcat_seeko_DEPENDENCIES) + @rm -f unzzipcat-seeko$(EXEEXT) + $(LINK) $(unzzipcat_seeko_LDFLAGS) $(unzzipcat_seeko_OBJECTS) $(unzzipcat_seeko_LDADD) $(LIBS) +unzzipdir$(EXEEXT): $(unzzipdir_OBJECTS) $(unzzipdir_DEPENDENCIES) + @rm -f unzzipdir$(EXEEXT) + $(LINK) $(unzzipdir_LDFLAGS) $(unzzipdir_OBJECTS) $(unzzipdir_LDADD) $(LIBS) +unzzipdir-mem$(EXEEXT): $(unzzipdir_mem_OBJECTS) $(unzzipdir_mem_DEPENDENCIES) + @rm -f unzzipdir-mem$(EXEEXT) + $(LINK) $(unzzipdir_mem_LDFLAGS) $(unzzipdir_mem_OBJECTS) $(unzzipdir_mem_LDADD) $(LIBS) +zzcat$(EXEEXT): $(zzcat_OBJECTS) $(zzcat_DEPENDENCIES) + @rm -f zzcat$(EXEEXT) + $(LINK) $(zzcat_LDFLAGS) $(zzcat_OBJECTS) $(zzcat_LDADD) $(LIBS) +zzdir$(EXEEXT): $(zzdir_OBJECTS) $(zzdir_DEPENDENCIES) + @rm -f zzdir$(EXEEXT) + $(LINK) $(zzdir_LDFLAGS) $(zzdir_OBJECTS) $(zzdir_LDADD) $(LIBS) +zzip$(EXEEXT): $(zzip_OBJECTS) $(zzip_DEPENDENCIES) + @rm -f zzip$(EXEEXT) + $(LINK) $(zzip_LDFLAGS) $(zzip_OBJECTS) $(zzip_LDADD) $(LIBS) +zziptest$(EXEEXT): $(zziptest_OBJECTS) $(zziptest_DEPENDENCIES) + @rm -f zziptest$(EXEEXT) + $(LINK) $(zziptest_LDFLAGS) $(zziptest_OBJECTS) $(zziptest_LDADD) $(LIBS) +zzobfuscated$(EXEEXT): $(zzobfuscated_OBJECTS) $(zzobfuscated_DEPENDENCIES) + @rm -f zzobfuscated$(EXEEXT) + $(LINK) $(zzobfuscated_LDFLAGS) $(zzobfuscated_OBJECTS) $(zzobfuscated_LDADD) $(LIBS) +zzxorcat$(EXEEXT): $(zzxorcat_OBJECTS) $(zzxorcat_DEPENDENCIES) + @rm -f zzxorcat$(EXEEXT) + $(LINK) $(zzxorcat_LDFLAGS) $(zzxorcat_OBJECTS) $(zzxorcat_LDADD) $(LIBS) +zzxorcopy$(EXEEXT): $(zzxorcopy_OBJECTS) $(zzxorcopy_DEPENDENCIES) + @rm -f zzxorcopy$(EXEEXT) + $(LINK) $(zzxorcopy_LDFLAGS) $(zzxorcopy_OBJECTS) $(zzxorcopy_LDADD) $(LIBS) +zzxordir$(EXEEXT): $(zzxordir_OBJECTS) $(zzxordir_DEPENDENCIES) + @rm -f zzxordir$(EXEEXT) + $(LINK) $(zzxordir_LDFLAGS) $(zzxordir_OBJECTS) $(zzxordir_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unzip-mem.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unzzip.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unzzipcat-mem.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unzzipcat-seeko.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unzzipcat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unzzipdir-mem.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unzzipdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zzcat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zzdir.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zzip.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zziptest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zzobfuscated.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zzxorcat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zzxorcopy.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zzxordir.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +install-aclocalDATA: $(aclocal_DATA) + @$(NORMAL_INSTALL) + test -z "$(aclocaldir)" || $(mkdir_p) "$(DESTDIR)$(aclocaldir)" + @list='$(aclocal_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(aclocalDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(aclocaldir)/$$f'"; \ + $(aclocalDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(aclocaldir)/$$f"; \ + done + +uninstall-aclocalDATA: + @$(NORMAL_UNINSTALL) + @list='$(aclocal_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(aclocaldir)/$$f'"; \ + rm -f "$(DESTDIR)$(aclocaldir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +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)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$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) +installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(aclocaldir)"; 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: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-binPROGRAMS clean-generic clean-libtool \ + clean-noinstPROGRAMS mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-aclocalDATA + +install-exec-am: install-binPROGRAMS + +install-info: install-info-am + +install-man: + +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-aclocalDATA uninstall-binPROGRAMS \ + uninstall-info-am + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool clean-noinstPROGRAMS ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-aclocalDATA install-am \ + install-binPROGRAMS install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + 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 uninstall uninstall-aclocalDATA \ + uninstall-am uninstall-binPROGRAMS uninstall-info-am + + +../zzip/libzzip.la : @top_srcdir@/zzip/*.c + (cd ../zzip && $(MAKE) `basename $@`) +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/bins/unzip-mem.c b/Build/source/libs/zziplib/zziplib-0.13.58/bins/unzip-mem.c new file mode 100644 index 00000000000..3f7d7f0631e --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/bins/unzip-mem.c @@ -0,0 +1,420 @@ +/* + * Copyright (c) 2003 Guido Draheim <guidod@gmx.de> + * Use freely under the restrictions of the ZLIB license. + * + * This file is used as an example to clarify zzipmmap api usage. + */ + +#include <zlib.h> /* crc32 */ + +#include <zzip/memdisk.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#ifdef ZZIP_HAVE_UNISTD_H +#include <unistd.h> +#endif +#ifdef ZZIP_HAVE_IO_H +#include <io.h> +#endif + +#include <time.h> + +#ifdef ZZIP_HAVE_FNMATCH_H +#include <fnmatch.h> +#else +#define fnmatch(x,y,z) strcmp(x,y) +#endif + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +#define ___ { +#define ____ } + +#define EXIT_SUCCESS 0 +#define EXIT_WARNINGS 1 +#define EXIT_ERRORS 2 +#define EXIT_EFORMAT 3 +#define EXIT_ENOMEM 4 +#define EXIT_ENOTTY 5 +#define EXIT_EINFLATE 6 +#define EXIT_ENOARCH 9 +#define EXIT_EOPTION 10 +#define EXIT_ENOFILE 11 +#define EXIT_EDISKFULL 50 +#define EXIT_EPREMATURE 51 +#define EXIT_USERABORT 80 +#define EXIT_BADCOMPRESSION 81 +#define EXIT_BADPASSWORD 82 + +static int status = EXIT_SUCCESS; +static int option_list = 0; /* "-l" */ +static int option_pipe = 0; /* "-p" */ +static int option_verbose = 0; /* "-v" */ +static int option_testcrc = 0; /* "-t" */ +static int option_binary = 0; /* "-b" */ +static int option_nocase = 0; /* "-C" */ +static int option_junkpaths = 0; /* "-j" */ +static int option_dosfiles = 0; /* "-L" */ +static int option_keepold = 0; /* "-n" */ +static int option_overwrite = 0; /* "-o" */ +static int option_quiet = 0; /* "-q" */ +static int option_permbits = 0; /* "-X" */ + +static const char usage[] = +{ + "unzzip-mem <zip> [names].. \n" + " - unzzip a zip archive.\n" + "options:\n" + " -l list archive files (name, usize, mtime, comments)\n" /* +totals */ + " -p extract archive files to pipe, i.e. stdout (binary mode)\n" + " -t test archive files (check the crc values)\n" + " -v verbose list of archive files\n" + " -b accept and ignore (force binary extract)\n" + " -C match filenames case-insensitively\n" + " -j junk paths (do not recreate directory structure)\n" + " -L convert dos filenames to lowercase upon extract\n" + " -n never overwrite existing files\n" + " -o always overwrite existing files\n" + " -q quite operation\n" + " -X restore user/owner attributes of files\n" +}; + +static void zzip_mem_entry_pipe(ZZIP_MEM_DISK* disk, + ZZIP_MEM_ENTRY* entry, FILE* out) +{ + ZZIP_DISK_FILE* file = zzip_mem_entry_fopen (disk, entry); + if (file) + { + char buffer[1024]; int len; + while ((len = zzip_mem_disk_fread (buffer, 1024, 1, file))) + fwrite (buffer, len, 1, out); + + zzip_mem_disk_fclose (file); + } +} + +static void zzip_mem_entry_make(ZZIP_MEM_DISK* disk, + ZZIP_MEM_ENTRY* entry) +{ + FILE* file = fopen (entry->zz_name, "w"); + if (file) { zzip_mem_entry_pipe (disk, entry, file); fclose (file); } + perror (entry->zz_name); + if (status < EXIT_WARNINGS) status = EXIT_WARNINGS; +} + +/* ------------------------- test ------------------------------------ */ + +static char* archive = 0; +static int test_errors = 0; + +static void zzip_mem_entry_test(ZZIP_MEM_DISK* disk, + ZZIP_MEM_ENTRY* entry) +{ + ZZIP_DISK_FILE* file = zzip_mem_entry_fopen (disk, entry); + printf (" testing: %s ", entry->zz_name); + if (strlen (entry->zz_name) < 24) { + printf ("%.*s", 24 - (int) strlen (entry->zz_name), + " "); + } + if (file) + { + unsigned long crc = crc32 (0L, NULL, 0); + unsigned char buffer[1024]; int len; + while ((len = zzip_mem_disk_fread (buffer, 1024, 1, file))) { + crc = crc32 (crc, buffer, len); + } + + zzip_mem_disk_fclose (file); + if (crc == (unsigned long) entry->zz_crc32) { + printf ("OK\n"); + } else { + printf ("BAD %lx (should be %lx)\n", crc, entry->zz_crc32); + test_errors ++; + } + } else { + printf ("ERROR (no such file)\n"); + test_errors ++; + } +} + +static void zzip_mem_entry_test_start(void) +{ + test_errors = 0; + printf ("Archive: %s\n", archive); +} + +static void zzip_mem_entry_test_done(void) +{ + if (test_errors == 0) { + printf ("No errors detected in compressed data of %s\n", archive); + } else { + printf ("%i errors detected in compressed data of %s\n", + test_errors, archive); + } +} + +/* ------------------------- list ------------------------------------ */ + +static char _zzip_time_[30]; +static char* _zzip_ctime (const time_t* timeval) +{ + struct tm* date = localtime (timeval); + sprintf (_zzip_time_, "%02i-%02i-%02i %02i:%02i", + date->tm_mon, date->tm_mday, date->tm_year%100, + date->tm_hour, date->tm_min); + return _zzip_time_; +} + +static const char* comprlevel[] = { + "stored", "shrunk", "redu:1", "redu:2", "redu:3", "redu:4", + "impl:N", "toknze", "defl:N", "defl:B", "impl:B" }; + +zzip_off_t sum_usize = 0; +zzip_off_t sum_csize = 0; +zzip_off_t sum_files = 0; +#define L (long) + +static void zzip_mem_entry_direntry_start (void) +{ + sum_usize = 0; + sum_csize = 0; + sum_files = 0; + if (option_verbose) goto verbose; + printf(" Length Date & Time Name\n"); + printf(" -------- ---- ---- ----\n"); + return; + verbose: + printf(" Length Method Size Ratio Date Time CRC-32 Name\n"); + printf("-------- ------ ------- ----- ---- ---- ------ ----\n"); +} + +static void zzip_mem_entry_direntry_done (void) +{ + char exp = ' '; + if (sum_usize / 1024 > 1024*1024*1024) { exp = 'G'; + sum_usize /= 1024*1024*1024; sum_usize /= 1024*1024*1024; } + if (sum_usize > 1024*1024*1024) { exp = 'M'; + sum_usize /= 1024*1024; sum_csize /= 1024*1024; } + if (sum_usize > 1024*1024) { exp = 'K'; + sum_usize /= 1024; sum_csize /= 1024; } + if (option_verbose) goto verbose; + printf(" -------- ----\n"); + printf(" %8li%c %8li %s\n", L sum_usize, exp, L sum_files, + sum_files == 1 ? "file" : "files"); + return; + verbose: + printf("-------- ------ ------- ----- ----\n"); + printf("%8li%c %8li%c %3li%% %8li %s\n", + L sum_usize, exp, L sum_csize, exp, + L (100 - (sum_csize*100/sum_usize)), L sum_files, + sum_files == 1 ? "file" : "files"); +} + +static void zzip_mem_entry_direntry(ZZIP_MEM_ENTRY* entry) +{ + char* name = zzip_mem_entry_to_name (entry); + zzip_off_t usize = zzip_mem_entry_usize (entry); + zzip_off_t csize = zzip_mem_entry_csize (entry); + int compr = zzip_mem_entry_data_comprlevel (entry); + time_t mtime = entry->zz_mktime; + long crc32 = entry->zz_crc32; + const char* comment = zzip_mem_entry_to_comment (entry); + char exp = ' '; + + sum_usize += usize; + sum_csize += csize; + sum_files += 1; + + if (usize / 1024 > 1024*1024*1024) { exp = 'G'; + usize /= 1024*1024*1024; usize /= 1024*1024*1024; } + if (usize > 1024*1024*1024) { exp = 'M'; + usize /= 1024*1024; csize /= 1024*1024; } + if (usize > 1024*1024) { exp = 'K'; + usize /= 1024; csize /= 1024; } + + if (! comment) comment = ""; + if (*name == '\n') name++; + + if (option_verbose) { + printf("%8li%c %s %8li%c%3li%% %s %8lx %s %s\n", + L usize, exp, comprlevel[compr], L csize, exp, + L (100 - (csize*100/usize)), + _zzip_ctime(&mtime), crc32, name, comment); + } else { + printf(" %8li%c %s %s %s\n", + L usize, exp, _zzip_ctime(&mtime), name, comment); + } +} + +static void zzip_mem_entry_listfiles(ZZIP_MEM_DISK* disk, char* filespec) +{ + zzip_mem_entry_direntry_start (); + ___ ZZIP_MEM_ENTRY* entry = 0; + while ((entry = zzip_mem_disk_findmatch(disk, filespec, entry, 0, 0))) + zzip_mem_entry_direntry (entry); ____; + zzip_mem_entry_direntry_done (); +} + +static void zzip_mem_entry_listall(ZZIP_MEM_DISK* disk) +{ + zzip_mem_entry_direntry_start (); + ___ ZZIP_MEM_ENTRY* entry = zzip_mem_disk_findfirst(disk); + for (; entry ; entry = zzip_mem_disk_findnext(disk, entry)) + zzip_mem_entry_direntry (entry); ____; + zzip_mem_entry_direntry_done (); +} + +static void zzip_mem_entry_testfiles(ZZIP_MEM_DISK* disk, char* filespec) +{ + zzip_mem_entry_test_start (); + ___ ZZIP_MEM_ENTRY* entry = 0; + while ((entry = zzip_mem_disk_findmatch(disk, filespec, entry, 0, 0))) + zzip_mem_entry_test (disk, entry); ____; + zzip_mem_entry_test_done (); +} + +static void zzip_mem_entry_testall(ZZIP_MEM_DISK* disk) +{ + zzip_mem_entry_test_start (); + ___ ZZIP_MEM_ENTRY* entry = zzip_mem_disk_findfirst(disk); + for (; entry ; entry = zzip_mem_disk_findnext(disk, entry)) + zzip_mem_entry_test (disk, entry); ____; + zzip_mem_entry_test_done (); +} + +static void zzip_mem_entry_pipefiles(ZZIP_MEM_DISK* disk, char* filespec) +{ + ZZIP_MEM_ENTRY* entry = 0; + while ((entry = zzip_mem_disk_findmatch(disk, filespec, entry, 0, 0))) + zzip_mem_entry_pipe (disk, entry, stdout); +} + +static void zzip_mem_entry_pipeall(ZZIP_MEM_DISK* disk) +{ + ZZIP_MEM_ENTRY* entry = zzip_mem_disk_findfirst(disk); + for (; entry ; entry = zzip_mem_disk_findnext(disk, entry)) + zzip_mem_entry_pipe (disk, entry, stdout); +} + +static void zzip_mem_entry_makefiles(ZZIP_MEM_DISK* disk, char* filespec) +{ + ZZIP_MEM_ENTRY* entry = 0; + while ((entry = zzip_mem_disk_findmatch(disk, filespec, entry, 0, 0))) + zzip_mem_entry_make (disk, entry); +} + +static void zzip_mem_entry_makeall(ZZIP_MEM_DISK* disk) +{ + ZZIP_MEM_ENTRY* entry = zzip_mem_disk_findfirst(disk); + for (; entry ; entry = zzip_mem_disk_findnext(disk, entry)) + zzip_mem_entry_make (disk, entry); +} + +int +main (int argc, char ** argv) +{ + int argn; int archname = 0; int filespec = 0; + ZZIP_MEM_DISK* disk; + if (argc <= 1 || ! strcmp (argv[1], "--help")) + { + printf (usage); + return 0; + } + if (! strcmp (argv[1], "--version")) + { + printf (__FILE__" version "ZZIP_PACKAGE" "ZZIP_VERSION"\n"); + return 0; + } + + for (argn=1; argn < argc; argn++) { + if ((argv[argn])[0] == '-') { + int x = 1; + while ((argv[argn])[x]) { + switch (argv[argn][x]) { + case 'l': option_list++; break; + case 'p': option_pipe++; break; + case 't': option_testcrc++; break; + case 'v': option_verbose++; break; + case 'b': option_binary++; break; + case 'C': option_nocase++; break; + case 'j': option_junkpaths++; break; + case 'L': option_dosfiles++; break; + case 'n': option_keepold++; break; + case 'o': option_overwrite++; break; + case 'q': option_quiet++; break; + case 'X': option_permbits++; break; + } + x++; + } + (argv[argn])[0] = 0; + } else { + if (! archname) { archname = argn; continue; } + if (! filespec) { filespec = argn; continue; } + } + } + + if (! archname) { + printf (usage); + return 0; + } else archive = argv[archname]; + + disk = zzip_mem_disk_open (argv[archname]); + if (! disk) { + perror(argv[archname]); + return -1; + } + + if (option_list || option_verbose) { + if (! filespec) { + zzip_mem_entry_listall (disk); + } else { + for (argn=filespec; argn < argc; argn++) { + if (argv[argn][0]) { + zzip_mem_entry_listfiles (disk, argv[argn]); + } + } + } + } else if (option_pipe) { + if (! filespec) { + zzip_mem_entry_pipeall (disk); + } else { + for (argn=filespec; argn < argc; argn++) { + if (argv[argn][0]) { + zzip_mem_entry_pipefiles (disk, argv[argn]); + } + } + } + } else if (option_testcrc) { + if (! filespec) { + zzip_mem_entry_testall (disk); + } else { + for (argn=filespec; argn < argc; argn++) { + if (argv[argn][0]) { + zzip_mem_entry_testfiles (disk, argv[argn]); + } + } + } + } else { + if (! filespec) { + zzip_mem_entry_makeall (disk); + } else { + for (argn=filespec; argn < argc; argn++) { + if (argv[argn][0]) { + zzip_mem_entry_makefiles (disk, argv[argn]); + } + } + } + } + + return status; +} + +/* + * Local variables: + * c-file-style: "stroustrup" + * End: + */ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/bins/unzzip.c b/Build/source/libs/zziplib/zziplib-0.13.58/bins/unzzip.c new file mode 100644 index 00000000000..ae8b3b97969 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/bins/unzzip.c @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2003 Guido Draheim <guidod@gmx.de> + * Use freely under the restrictions of the ZLIB license. + * + * This file is used as an example to clarify zzip api usage. + */ + +#include <zzip/zzip.h> +#include <stdio.h> +#include <string.h> + +#ifdef ZZIP_HAVE_UNISTD_H +#include <unistd.h> +#endif +#ifdef ZZIP_HAVE_IO_H +#include <io.h> +#endif + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +static const char usage[] = +{ + "unzzip <dir>.. \n" + " - unzzip the files contained in a zip archive.\n" +}; + +int +main (int argc, char ** argv) +{ + int argn; + int exitcode = 0; + zzip_error_t error; + + if (argc <= 1 || ! strcmp (argv[1], "--help")) + { + printf (usage); + return 0; + } + if (! strcmp (argv[1], "--version")) + { + printf (__FILE__" version "ZZIP_PACKAGE" "ZZIP_VERSION"\n"); + return 0; + } + + for (argn=1; argn < argc; argn++) + { + ZZIP_DIR * dir; + ZZIP_DIRENT d; + + dir = zzip_dir_open(argv[argn], &error); + if (! dir) + { + fprintf (stderr, "did not open %s: \n", argv[argn]); + fprintf (stderr, "%s: %s\n", argv[argn], zzip_strerror(error)); + exitcode++; + continue; + } + + if (argc > 2) printf ("%s: \n", argv[argn]); + + /* read each dir entry and show one line of info per file */ + while (zzip_dir_read (dir, &d)) + { + int output; + ZZIP_FILE* input = zzip_file_open (dir, d.d_name, O_RDONLY); + if (! input) + { + fprintf (stderr, "|did not open %s: \n", d.d_name); + fprintf (stderr, "|%s: %s\n", d.d_name, zzip_strerror_of(dir)); + continue; + } + + output = creat (d.d_name, 0664); + if (output == -1) + { + fprintf (stderr, "|output file %s: \n", d.d_name); + perror(d.d_name); + zzip_file_close (input); + continue; + } + + printf("%s\n", d.d_name); + + { + char buf[17]; zzip_ssize_t n; + /* read chunks of 16 bytes into buf */ + while (0 < (n = zzip_read (input, buf, 16))) + { + write (output, buf, n); + } + + if (n == -1) + perror (d.d_name); + } + close (output); + zzip_file_close (input); + } + + zzip_dir_close(dir); + } + + return exitcode; +} + +/* + * Local variables: + * c-file-style: "stroustrup" + * End: + */ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/bins/unzzipcat-mem.c b/Build/source/libs/zziplib/zziplib-0.13.58/bins/unzzipcat-mem.c new file mode 100644 index 00000000000..7474854187e --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/bins/unzzipcat-mem.c @@ -0,0 +1,128 @@ +/* + * Copyright (c) 2003 Guido Draheim <guidod@gmx.de> + * Use freely under the restrictions of the ZLIB license. + * + * This file is used as an example to clarify zzipmmap api usage. + */ + +#include <zzip/memdisk.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#ifdef ZZIP_HAVE_UNISTD_H +#include <unistd.h> +#endif +#ifdef ZZIP_HAVE_IO_H +#include <io.h> +#endif + +#ifdef ZZIP_HAVE_FNMATCH_H +#include <fnmatch.h> +#else +#define fnmatch(x,y,z) strcmp(x,y) +#endif + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +static const char usage[] = +{ + "unzzipdir-mem <zip> [names].. \n" + " - unzzip data content of files contained in a zip archive.\n" +}; + +static void zzip_mem_entry_fprint(ZZIP_MEM_DISK* disk, + ZZIP_MEM_ENTRY* entry, FILE* out) +{ + ZZIP_DISK_FILE* file = zzip_mem_entry_fopen (disk, entry); + if (file) + { + char buffer[1024]; int len; + while ((len = zzip_mem_disk_fread (buffer, 1024, 1, file))) + fwrite (buffer, len, 1, out); + + zzip_mem_disk_fclose (file); + } +} + +static void zzip_mem_disk_cat_file(ZZIP_MEM_DISK* disk, char* name, FILE* out) +{ + ZZIP_DISK_FILE* file = zzip_mem_disk_fopen (disk, name); + if (file) + { + char buffer[1024]; int len; + while ((len = zzip_mem_disk_fread (buffer, 1, 1024, file))) + { + fwrite (buffer, 1, len, out); + } + + zzip_mem_disk_fclose (file); + } +} + +int +main (int argc, char ** argv) +{ + int argn; + ZZIP_MEM_DISK* disk; + + if (argc <= 1 || ! strcmp (argv[1], "--help")) + { + printf (usage); + return 0; + } + if (! strcmp (argv[1], "--version")) + { + printf (__FILE__" version "ZZIP_PACKAGE" "ZZIP_VERSION"\n"); + return 0; + } + + disk = zzip_mem_disk_open (argv[1]); + if (! disk) { + perror(argv[1]); + return -1; + } + + if (argc == 2) + { /* print directory list */ + ZZIP_MEM_ENTRY* entry = zzip_mem_disk_findfirst(disk); + for (; entry ; entry = zzip_mem_disk_findnext(disk, entry)) + { + char* name = zzip_mem_entry_to_name (entry); + printf ("%s\n", name); + } + return 0; + } + + if (argc == 3) + { /* list from one spec */ + ZZIP_MEM_ENTRY* entry = 0; + while ((entry = zzip_mem_disk_findmatch(disk, argv[2], entry, 0, 0))) + { + zzip_mem_entry_fprint (disk, entry, stdout); + } + + return 0; + } + + for (argn=1; argn < argc; argn++) + { /* list only the matching entries - each in order of commandline */ + ZZIP_MEM_ENTRY* entry = zzip_mem_disk_findfirst(disk); + for (; entry ; entry = zzip_mem_disk_findnext(disk, entry)) + { + char* name = zzip_mem_entry_to_name (entry); + if (! fnmatch (argv[argn], name, + FNM_NOESCAPE|FNM_PATHNAME|FNM_PERIOD)) + zzip_mem_disk_cat_file (disk, name, stdout); + } + } + return 0; +} + +/* + * Local variables: + * c-file-style: "stroustrup" + * End: + */ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/bins/unzzipcat-seeko.c b/Build/source/libs/zziplib/zziplib-0.13.58/bins/unzzipcat-seeko.c new file mode 100644 index 00000000000..f16f0b96566 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/bins/unzzipcat-seeko.c @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2003 Guido Draheim <guidod@gmx.de> + * Use freely under the restrictions of the ZLIB license. + * + * This file is used as an example to clarify zzipfseeko api usage. + */ + +#include <zzip/fseeko.h> +#include <stdlib.h> +#include <string.h> + +#ifdef ZZIP_HAVE_FNMATCH_H +#include <fnmatch.h> +#else +#define fnmatch(x,y,z) strcmp(x,y) +#endif + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +static const char usage[] = +{ + "unzzipcat-seeko <zip> [names].. \n" + " - unzzip data content of files contained in a zip archive.\n" +}; + +static void zzip_entry_fprint(ZZIP_ENTRY* entry, FILE* out) +{ + ZZIP_ENTRY_FILE* file = zzip_entry_fopen (entry, 0); + if (file) + { + char buffer[1024]; int len; + while ((len = zzip_entry_fread (buffer, 1024, 1, file))) + fwrite (buffer, len, 1, out); + + zzip_entry_fclose (file); + } +} + +static void zzip_cat_file(FILE* disk, char* name, FILE* out) +{ + ZZIP_ENTRY_FILE* file = zzip_entry_ffile (disk, name); + if (file) + { + char buffer[1024]; int len; + while ((len = zzip_entry_fread (buffer, 1024, 1, file))) + fwrite (buffer, len, 1, out); + + zzip_entry_fclose (file); + } +} + +int +main (int argc, char ** argv) +{ + int argn; + FILE* disk; + + if (argc <= 1 || ! strcmp (argv[1], "--help")) + { + printf (usage); + return 0; + } + if (! strcmp (argv[1], "--version")) + { + printf (__FILE__" version "ZZIP_PACKAGE" "ZZIP_VERSION"\n"); + return 0; + } + + disk = fopen (argv[1], "r"); + if (! disk) { + perror(argv[1]); + return -1; + } + + if (argc == 2) + { /* print directory list */ + ZZIP_ENTRY* entry = zzip_entry_findfirst(disk); + if (! entry) puts("no first entry!\n"); + for (; entry ; entry = zzip_entry_findnext(entry)) + { + char* name = zzip_entry_strdup_name (entry); + printf ("%s\n", name); + free (name); + } + return 0; + } + + if (argc == 3) + { /* list from one spec */ + ZZIP_ENTRY* entry = 0; + while ((entry = zzip_entry_findmatch(disk, argv[2], entry, 0, 0))) + zzip_entry_fprint (entry, stdout); + + return 0; + } + + for (argn=1; argn < argc; argn++) + { /* list only the matching entries - each in order of commandline */ + ZZIP_ENTRY* entry = zzip_entry_findfirst(disk); + for (; entry ; entry = zzip_entry_findnext(entry)) + { + char* name = zzip_entry_strdup_name (entry); + if (! fnmatch (argv[argn], name, + FNM_NOESCAPE|FNM_PATHNAME|FNM_PERIOD)) + zzip_cat_file (disk, name, stdout); + free (name); + } + } + return 0; +} + +/* + * Local variables: + * c-file-style: "stroustrup" + * End: + */ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/bins/unzzipcat.c b/Build/source/libs/zziplib/zziplib-0.13.58/bins/unzzipcat.c new file mode 100644 index 00000000000..4282cb36be9 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/bins/unzzipcat.c @@ -0,0 +1,128 @@ +/* + * Copyright (c) 2003 Guido Draheim <guidod@gmx.de> + * Use freely under the restrictions of the ZLIB license. + * + * This file is used as an example to clarify zzipmmap api usage. + */ + +#include <zzip/mmapped.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#ifdef ZZIP_HAVE_UNISTD_H +#include <unistd.h> +#endif +#ifdef ZZIP_HAVE_IO_H +#include <io.h> +#endif + +#ifdef ZZIP_HAVE_FNMATCH_H +#include <fnmatch.h> +#else +#define fnmatch(x,y,z) strcmp(x,y) +#endif + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +static const char usage[] = +{ + "unzzipdir <zip> [names].. \n" + " - unzzip data content of files contained in a zip archive.\n" +}; + +static void zzip_disk_entry_fprint(ZZIP_DISK* disk, + ZZIP_DISK_ENTRY* entry, FILE* out) +{ + ZZIP_DISK_FILE* file = zzip_disk_entry_fopen (disk, entry); + if (file) + { + char buffer[1024]; int len; + while ((len = zzip_disk_fread (buffer, 1024, 1, file))) + fwrite (buffer, len, 1, out); + + zzip_disk_fclose (file); + } +} + +static void zzip_disk_cat_file(ZZIP_DISK* disk, char* name, FILE* out) +{ + ZZIP_DISK_FILE* file = zzip_disk_fopen (disk, name); + if (file) + { + char buffer[1024]; int len; + while ((len = zzip_disk_fread (buffer, 1, 1024, file))) + { + fwrite (buffer, 1, len, out); + } + + zzip_disk_fclose (file); + } +} + +int +main (int argc, char ** argv) +{ + int argn; + ZZIP_DISK* disk; + + if (argc <= 1 || ! strcmp (argv[1], "--help")) + { + printf (usage); + return 0; + } + if (! strcmp (argv[1], "--version")) + { + printf (__FILE__" version "ZZIP_PACKAGE" "ZZIP_VERSION"\n"); + return 0; + } + + disk = zzip_disk_open (argv[1]); + if (! disk) { + perror(argv[1]); + return -1; + } + + if (argc == 2) + { /* print directory list */ + ZZIP_DISK_ENTRY* entry = zzip_disk_findfirst(disk); + for (; entry ; entry = zzip_disk_findnext(disk, entry)) + { + char* name = zzip_disk_entry_strdup_name (disk, entry); + printf ("%s\n", name); + free (name); + } + return 0; + } + + if (argc == 3) + { /* list from one spec */ + ZZIP_DISK_ENTRY* entry = 0; + while ((entry = zzip_disk_findmatch(disk, argv[2], entry, 0, 0))) + zzip_disk_entry_fprint (disk, entry, stdout); + + return 0; + } + + for (argn=1; argn < argc; argn++) + { /* list only the matching entries - each in order of commandline */ + ZZIP_DISK_ENTRY* entry = zzip_disk_findfirst(disk); + for (; entry ; entry = zzip_disk_findnext(disk, entry)) + { + char* name = zzip_disk_entry_strdup_name (disk, entry); + if (! fnmatch (argv[argn], name, + FNM_NOESCAPE|FNM_PATHNAME|FNM_PERIOD)) + zzip_disk_cat_file (disk, name, stdout); + free (name); + } + } + return 0; +} + +/* + * Local variables: + * c-file-style: "stroustrup" + * End: + */ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/bins/unzzipdir-mem.c b/Build/source/libs/zziplib/zziplib-0.13.58/bins/unzzipdir-mem.c new file mode 100644 index 00000000000..dc020772309 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/bins/unzzipdir-mem.c @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2003 Guido Draheim <guidod@gmx.de> + * Use freely under the restrictions of the ZLIB license. + * + * This file is used as an example to clarify zzipmmap api usage. + */ + +#include <zzip/memdisk.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#ifdef ZZIP_HAVE_UNISTD_H +#include <unistd.h> +#endif +#ifdef ZZIP_HAVE_IO_H +#include <io.h> +#endif + +#ifdef ZZIP_HAVE_FNMATCH_H +#include <fnmatch.h> +#else +#define fnmatch(x,y,z) strcmp(x,y) +#endif + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +static const char usage[] = +{ + "unzzipdir <zip> [names].. \n" + " - unzzip a listing of files contained in a zip archive.\n" +}; + +int +main (int argc, char ** argv) +{ + int argn; + ZZIP_MEM_DISK* disk; + + if (argc <= 1 || ! strcmp (argv[1], "--help")) + { + printf (usage); + return 0; + } + if (! strcmp (argv[1], "--version")) + { + printf (__FILE__" version "ZZIP_PACKAGE" "ZZIP_VERSION"\n"); + return 0; + } + + disk = zzip_mem_disk_open (argv[1]); + if (! disk) { + perror(argv[1]); + return -1; + } + + if (argc == 2) + { /* list all */ + ZZIP_MEM_ENTRY* entry = zzip_mem_disk_findfirst(disk); + for (; entry ; entry = zzip_mem_disk_findnext(disk, entry)) + { + char* name = zzip_mem_entry_to_name (entry); + printf ("%s\n", name); + } + return 0; + } + + if (argc == 3) + { /* list from one spec */ + ZZIP_MEM_ENTRY* entry = 0; + while ((entry = zzip_mem_disk_findmatch(disk, argv[2], entry, 0, 0))) + { + char* name = zzip_mem_entry_to_name (entry); + printf ("%s\n", name); + } + return 0; + } + + { /* list only the matching entries - in order of zip directory */ + ZZIP_MEM_ENTRY* entry = zzip_mem_disk_findfirst(disk); + for (; entry ; entry = zzip_mem_disk_findnext(disk, entry)) + { + char* name = zzip_mem_entry_to_name (entry); + for (argn=1; argn < argc; argn++) + { + if (! fnmatch (argv[argn], name, + FNM_NOESCAPE|FNM_PATHNAME|FNM_PERIOD)) + printf ("%s\n", name); + } + } + return 0; + } +} + +/* + * Local variables: + * c-file-style: "stroustrup" + * End: + */ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/bins/unzzipdir.c b/Build/source/libs/zziplib/zziplib-0.13.58/bins/unzzipdir.c new file mode 100644 index 00000000000..3c570c5548f --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/bins/unzzipdir.c @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2003 Guido Draheim <guidod@gmx.de> + * Use freely under the restrictions of the ZLIB license. + * + * This file is used as an example to clarify zzipmmap api usage. + */ + +#include <zzip/mmapped.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#ifdef ZZIP_HAVE_UNISTD_H +#include <unistd.h> +#endif +#ifdef ZZIP_HAVE_IO_H +#include <io.h> +#endif + +#ifdef ZZIP_HAVE_FNMATCH_H +#include <fnmatch.h> +#else +#define fnmatch(x,y,z) strcmp(x,y) +#endif + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +static const char usage[] = +{ + "unzzipdir <zip> [names].. \n" + " - unzzip a listing of files contained in a zip archive.\n" +}; + +int +main (int argc, char ** argv) +{ + int argn; + ZZIP_DISK* disk; + + if (argc <= 1 || ! strcmp (argv[1], "--help")) + { + printf (usage); + return 0; + } + if (! strcmp (argv[1], "--version")) + { + printf (__FILE__" version "ZZIP_PACKAGE" "ZZIP_VERSION"\n"); + return 0; + } + + disk = zzip_disk_open (argv[1]); + if (! disk) { + perror(argv[1]); + return -1; + } + + if (argc == 2) + { /* list all */ + ZZIP_DISK_ENTRY* entry = zzip_disk_findfirst(disk); + for (; entry ; entry = zzip_disk_findnext(disk, entry)) + { + char* name = zzip_disk_entry_strdup_name (disk, entry); + printf ("%s\n", name); + free (name); + } + return 0; + } + + if (argc == 3) + { /* list from one spec */ + ZZIP_DISK_ENTRY* entry = 0; + while ((entry = zzip_disk_findmatch(disk, argv[2], entry, 0, 0))) + { + char* name = zzip_disk_entry_strdup_name (disk, entry); + printf ("%s\n", name); + free (name); + } + return 0; + } + + { /* list only the matching entries - in order of zip directory */ + ZZIP_DISK_ENTRY* entry = zzip_disk_findfirst(disk); + for (; entry ; entry = zzip_disk_findnext(disk, entry)) + { + char* name = zzip_disk_entry_strdup_name (disk, entry); + for (argn=1; argn < argc; argn++) + { + if (! fnmatch (argv[argn], name, + FNM_NOESCAPE|FNM_PATHNAME|FNM_PERIOD)) + printf ("%s\n", name); + } + free (name); + } + return 0; + } +} + +/* + * Local variables: + * c-file-style: "stroustrup" + * End: + */ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/bins/zzcat.c b/Build/source/libs/zziplib/zziplib-0.13.58/bins/zzcat.c new file mode 100644 index 00000000000..27225820784 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/bins/zzcat.c @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2000,2001,2002 Guido Draheim <guidod@gmx.de> + * Use freely under the restrictions of the ZLIB License + */ + +#include <zzip/zzip.h> +#include <stdio.h> +#include <string.h> + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +static const char usage[] = +{ + " zzcat <file>... \n" + " - prints the file to stdout, so you may want to redirect the output; \n" + " the file can be a normal file or an inflated part of a zip-archive, \n" + " to get 'README' from dist.zip you may write \n" + " zzcat dist/README \n" +}; + +int +main (int argc, char ** argv) +{ + int argn; + + if (argc <= 1 || ! strcmp (argv[1], "--help")) + { + printf (usage); + return 0; + } + if (! strcmp (argv[1], "--version")) + { + printf (__FILE__" version "ZZIP_PACKAGE" "ZZIP_VERSION"\n"); + return 0; + } + + for (argn=1; argn < argc; argn++) + { + ZZIP_FILE* fp = zzip_open (argv[argn], O_RDONLY|O_BINARY); + + if (! fp) + { + perror (argv[argn]); + continue; + }else{ + char buf[17]; + int n; + + /* read chunks of 16 bytes into buf and print them to stdout */ + while (0 < (n = zzip_read(fp, buf, 16))) + { + buf[n] = '\0'; +# ifdef STDOUT_FILENO + write (STDOUT_FILENO, buf, n); +# else + fwrite (buf, 1, n, stdout); +# endif + } + + if (n == -1) + perror (argv[argn]); + } + } + + return 0; +} + +/* + * Local variables: + * c-file-style: "stroustrup" + * End: + */ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/bins/zzdir.c b/Build/source/libs/zziplib/zziplib-0.13.58/bins/zzdir.c new file mode 100644 index 00000000000..5345f0852da --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/bins/zzdir.c @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2000,2001,2002 Guido Draheim <guidod@gmx.de> + * Use freely under the restrictions of the ZLIB license. + */ + +#include <zzip/zzip.h> +#include <stdio.h> +#include <string.h> + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +static const char usage[] = +{ + "zzdir <dir>.. \n" + " - prints a content table to stdout, but the dir can also be a zip-arch." + "\n" + " To show the contents of a zip-archive named 'test.zip', you may write \n" + " zzdir test \n" +}; + +int +main (int argc, char ** argv) +{ + int argn; + int exitcode = 0; + + if (argc <= 1 || ! strcmp (argv[1], "--help")) + { + printf (usage); + return 0; + } + if (! strcmp (argv[1], "--version")) + { + printf (__FILE__" version "ZZIP_PACKAGE" "ZZIP_VERSION"\n"); + return 0; + } + + for (argn=1; argn < argc; argn++) + { + ZZIP_DIR * dir; + ZZIP_DIRENT * d; + + dir = zzip_opendir(argv[argn]); + if (! dir) + { + fprintf (stderr, "did not open %s: ", argv[argn]); + perror(argv[argn]); + exitcode++; + continue; + } + + if (argc > 2) printf ("%s: \n", argv[argn]); + + /* read each dir entry and show one line of info per file */ + while ((d = zzip_readdir (dir))) + { + /* orignalsize / compression-type / compression-ratio / filename */ + if (d->st_size > 999999) + { + printf ("%5dK %-9s %2d%% %s \n", + d->st_size>>10, + zzip_compr_str(d->d_compr), + 100 - (d->d_csize|1)/((d->st_size/100)|1), + d->d_name); + }else{ + printf ("%6d %-9s %2d%% %s \n", + d->st_size, + zzip_compr_str(d->d_compr), + 100 - (d->d_csize|1)*100/(d->st_size|1), + d->d_name); + } + } + + zzip_closedir(dir); + } + + return exitcode; +} + +/* + * Local variables: + * c-file-style: "stroustrup" + * End: + */ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/bins/zzip.c b/Build/source/libs/zziplib/zziplib-0.13.58/bins/zzip.c new file mode 100644 index 00000000000..52237235698 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/bins/zzip.c @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2003 Guido Draheim <guidod@gmx.de> + * Use freely under the restrictions of the ZLIB license. + * + * This file is used as an example to clarify zzip api usage. + * (the write-api is work in progress, beware) + */ + +#define _ZZIP_WRITE_SOURCE + +#include <zzip/zzip.h> +#include <stdio.h> +#include <string.h> + +#ifdef ZZIP_HAVE_UNISTD_H +#include <unistd.h> +#endif +#ifdef ZZIP_HAVE_IO_H +#include <io.h> +#endif + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +static const char usage[] = +{ + "zzip <dir> files... \n" + " - zzip the files into a zip area." +}; + +int +main (int argc, char ** argv) +{ + int argn; + int exitcode = 0; + ZZIP_DIR * dir; + + if (argc <= 1 || ! strcmp (argv[1], "--help")) + { + printf (usage); + return 0; + } + if (! strcmp (argv[1], "--version")) + { + printf (__FILE__" version "ZZIP_PACKAGE" "ZZIP_VERSION"\n"); + return 0; + } + + dir = zzip_dir_creat(argv[1], 0755); + if (! dir) + { + fprintf (stderr, "did not creat %s: \n", argv[1]); + perror(argv[1]); + if (1) + return 1; + else + fprintf (stderr, "(ignored)\n"); + } + + for (argn=2; argn < argc; argn++) + { + int input = open (argv[argn], O_RDONLY); + if (input == -1) + { + perror (argv[argn]); + continue; + } + else + { + char buf[17]; zzip_ssize_t n; + ZZIP_FILE* output = zzip_file_creat (dir, argv[argn], 0755); + if (! output) + { + fprintf (stderr, "|did not open %s: \n", argv[argn]); + fprintf (stderr, "|%s: %s\n", argv[argn], + zzip_strerror_of(dir)); + continue; + } + + while ((n = read (input, buf, 16))) + { + zzip_write (output, buf, n); + } + zzip_close (output); + } + close (input); + } + zzip_closedir(dir); + + return exitcode; +} + +/* + * Local variables: + * c-file-style: "stroustrup" + * End: + */ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/bins/zziplib.m4 b/Build/source/libs/zziplib/zziplib-0.13.58/bins/zziplib.m4 new file mode 100644 index 00000000000..4029ca546e3 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/bins/zziplib.m4 @@ -0,0 +1,105 @@ +dnl this macro has been copied from /usr/share/aclocal/pkg.m4 +dnl modified to check only for zziplib. You are advised to use +dnl pgkconfig macro directly instead. It is only installed to +dnl the convenience of software makers who do not want to have +dnl yet another package dependency when building zziplib-based +dnl projects. In general, you can include in your configure.ac +dnl some line like +dnl PKG_CHECK_ZZIPLIB([ZZIP],[0.10.75]) +dnl in order to get the two autoconf/automake subst variables +dnl named ZZIP_CFLAGS and ZZIP_LIBS respectivly. + +dnl PKG_CHECK_ZZIPLIB(ZZIP, minversion, action-if, action-not) +dnl defines ZZIP_LIBS, ZZIP_CFLAGS, see pkg-config man page +dnl also defines ZZIP_PKG_ERRORS on error +AC_DEFUN([PKG_CHECK_ZZIPLIB], [# checking for zziplib cflags/libs $2 + succeeded=no + + if test -z "$PKG_CONFIG"; then + AC_PATH_PROG([PKG_CONFIG],[pkg-config],[no]) + fi + + if test "$PKG_CONFIG" = "no" ; then + dnl we stick in an extra section that takes advantage of `zzip-config` + dnl script that might be there and carry cflags/libs info as well. + AC_PATH_PROG([ZZIP_CONFIG], [zzip-config], [no]) + if test "$ZZIP_CONFIG" = "no" ; then + echo "*** Neither config spec could be found - there was no archaic" + echo "*** zzip-config script around and no pkg-config script in the" + echo "*** PATH. Make sure that either one is in your path, or set" + echo "*** set the PKG_CONFIG environment variable to the full" + echo "*** path to pkg-config. See http://zziplib.sf.net - or see" + echo "*** http://www.freedesktop.org/software/pkgconfig for more." + else + AC_MSG_CHECKING($1_LIBS) + $1_LIBS=`$ZZIP_CONFIG --libs 2>/dev/null` + AC_MSG_RESULT($[]$1_LIBS) + + if test ".$[]$1_LIBS" != "." ; then + AC_MSG_CHECKING($1_CFLAGS) + $1_CFLAGS=`$ZZIP_CONFIG --cflags 2>/dev/null` + AC_MSG_RESULT($[]$1_CFLAGS) + succeeded="yes" + else + AC_MSG_CHECKING($1_CFLAGS) + $1_CFLAGS=`$ZZIP_CONFIG --cflags 2>&1` + AC_MSG_RESULT([(detecting errors...)]) + AC_MSG_WARN([... there is a problem with zzip-config]) + AC_MSG_WARN([... $[]$1_CFLAGS]) + AC_MSG_WARN([... inference of library requirements from prefix]) + succeeded=`echo $ZZIP_CONFIG | sed -e 's,/[^/]*,,'` # dirname + $1_CFLAGS="" + $1_LIBS="" + if test "/$succeeded" != "//usr" ; then + test -d "$succeeded/include" && $1_CFLAGS="-I$succeeded/include " + test -d "$succeeded/lib" && $1_LIBS="-L$succeeded/lib " + fi + $1_LIBS="$[]$1_LIBS -lzzip -lz" + succeeded="yes" + AC_MSG_CHECKING($1_CFLAGS... guessed) + AC_MSG_RESULT($[]$1_CFLAGS) + AC_MSG_CHECKING($1_LIBS... guessed) + AC_MSG_RESULT($[]$1_LIBS) + fi + fi + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + AC_MSG_CHECKING(for zziplib[]ifelse([$2],,,[ >= $2])) + + if $PKG_CONFIG --exists "zziplib[]ifelse([$2],,,[ >= $2])" ; then + AC_MSG_RESULT(yes) + succeeded=yes + + AC_MSG_CHECKING($1_CFLAGS) + $1_CFLAGS=`$PKG_CONFIG --cflags "zziplib[]ifelse([$2],,,[ >= $2])"` + AC_MSG_RESULT($$1_CFLAGS) + + AC_MSG_CHECKING($1_LIBS) + $1_LIBS=`$PKG_CONFIG --libs "zziplib[]ifelse([$2],,,[ >= $2])"` + AC_MSG_RESULT($$1_LIBS) + else + $1_CFLAGS="" + $1_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + $1_PKG_ERRORS=`$PKG_CONFIG dnl + --errors-to-stdout --print-errors "zziplib[]ifelse([$2],,,[ >= $2])"` + ifelse([$4], ,echo $$1_PKG_ERRORS,) + fi + + AC_SUBST($1_CFLAGS) + AC_SUBST($1_LIBS) + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + ifelse([$3], , :, [$3]) + else + succeeded="zziplib[]ifelse([$2],,,[ >= $2])" + ifelse([$4], ,[AC_MSG_ERROR([Library requirements ($succeeded) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.])], [$4]) + fi +]) diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/bins/zziptest.c b/Build/source/libs/zziplib/zziplib-0.13.58/bins/zziptest.c new file mode 100644 index 00000000000..eb82afe7682 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/bins/zziptest.c @@ -0,0 +1,153 @@ +/* + * Author: + * Guido Draheim <guidod@gmx.de> + * Tomi Ollila <Tomi.Ollila@iki.fi> + * + * Copyright (c) 1999,2000,2001,2002,2003 Guido Draheim + * All rights reserved, + * use under the restrictions of the + * Lesser GNU General Public License + * or alternatively the restrictions + * of the Mozilla Public License 1.1 + */ + +#include <stdio.h> +#include <string.h> + +#if defined _MSC_VER /* Win32*/ +#define WIN32_LEAN_AND_MEAN +#include <windows.h> +#define sleep Sleep +#endif + +#include <zzip/lib.h> + +#ifdef ZZIP_HAVE_UNISTD_H +#include <unistd.h> /* sleep */ +#endif + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +#if __GNUC__+0 >= 3 && __GNUC_MINOR__+0 >= 3 +# ifdef DEBUG +# warning suppress a warning where the compiler should have optimized instead. +# endif +#define I_(_T,_L,_R) do { _T _l = (_T) _L; \ + _l _R; _L = (typeof(_L)) _l; } while(0) +#else +#define I_(_T,_L,_R) _L _R +#endif + +int main(int argc, char ** argv) +{ + ZZIP_DIR * dir; + const char * name = "test.zip"; + zzip_error_t rv; + int i; + + if (argc > 1 && argv[1] != NULL) + { + if (! strcmp (argv[1], "--help")) { + printf ("zziptest [testfile]\n - selftest defaults to 'test.zip'"); + return 0; + }else if (! strcmp (argv[1], "--version")) { + printf (__FILE__" version "ZZIP_PACKAGE" "ZZIP_VERSION"\n"); + return 0; + }else{ + name = argv[1]; + argv++; argc--; + } + } + + printf("Opening zip file `%s'... ", name); + { int fd = open (name, O_RDONLY|O_BINARY); + if (fd == -1) { perror ("could not open input file"); return 0; } + if (! (dir = zzip_dir_fdopen(fd, &rv))) + { + printf("error %d.\n", rv); + return 0; + } + } printf("OK.\n"); + +#if 1 + printf("{check...\n"); + { struct zzip_dir_hdr * hdr = dir->hdr0; + + if (hdr == NULL) + { printf ("could not find first header in dir_hdr"); } + else + { + while (1) + { + printf("\ncompression method: %d", hdr->d_compr); + if (hdr->d_compr == 0) printf(" (stored)"); + else if (hdr->d_compr == 8) printf(" (deflated)"); + else printf(" (unknown)"); + printf("\ncrc32: %x\n", hdr->d_crc32); + printf("compressed size: %d\n", hdr->d_csize); + printf("uncompressed size: %d\n", hdr->d_usize); + printf("offset of file in archive: %d\n", hdr->d_off); + printf("filename: %s\n\n", hdr->d_name); + + if (hdr->d_reclen == 0) break; + I_(char *, hdr, += hdr->d_reclen); + sleep(1); + } + } + } printf ("\n}\n"); +#endif +#if 1 + { printf("{contents...\n"); + for (i = 0; i < 2; i++) + { + ZZIP_DIRENT* d; + + while((d=zzip_readdir(dir))) + { + printf(" name \"%s\", compr %d, size %d, ratio %2d\n", + d->d_name, d->d_compr, d->st_size, + 100 - (d->d_csize|1)*100/(d->st_size|1)); + } + printf(" %d. time ---------------\n", i + 1); + zzip_rewinddir(dir); + } + printf("}...OK\n"); + } +#endif + + { ZZIP_FILE * fp; + char buf[17]; + const char * name = argv[1]? argv[1]: "README"; + + + printf("Opening file `%s' in zip archive... ", name); + fp = zzip_file_open(dir, (char *)name, ZZIP_CASEINSENSITIVE); + + if (! fp) + { printf("error %d: %s\n", zzip_error(dir), zzip_strerror_of(dir)); } + else + { + printf("OK.\n"); + printf("Contents of the file:\n"); + + while (0 < (i = zzip_file_read(fp, buf, 16))) + { + buf[i] = '\0'; + /*printf("\n*** read %d ***\n", i); fflush(stdout); */ + printf("%s", buf); + /*write(1, buf, i);*/ /* Windows does not have write !!! */ + } + if (i < 0) printf("error %d\n", zzip_error(dir)); + } + } + + return 0; +} + +/* + * Local variables: + * c-file-style: "stroustrup" + * End: + */ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/bins/zzobfuscated.c b/Build/source/libs/zziplib/zziplib-0.13.58/bins/zzobfuscated.c new file mode 100644 index 00000000000..352afc29a13 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/bins/zzobfuscated.c @@ -0,0 +1,155 @@ +/* + * Copyright (c) 2002 Mike Nordell + * portions Copyright (c) 2000,2001,2002 Guido Draheim <guidod@gmx.de> + * Use freely under the restrictions of the ZLIB License + * + * A small example that displays how the plugin I/O functions can be used + * to read "encrypted" zip archives. + */ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/stat.h> +#include <zzip/zzip.h> +#include <zzip/plugin.h> + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +#if defined ZZIP_HAVE_UNISTD_H +#include <unistd.h> /* read */ +#elif defined ZZIP_HAVE_IO_H +#include <io.h> /* win32 */ +#else +#endif + +#ifdef _MSC_VER +#define _MSC_VER_NULL NULL +#else +#define _MSC_VER_NULL +#endif + +/* + * Only override our the read handler. Let the system take care + * the rest. + */ + +static zzip_ssize_t our_read(int fd, void* buf, zzip_size_t len) +{ + const zzip_ssize_t bytes = read(fd, buf, len); + zzip_ssize_t i; + char* pch = (char*)buf; + for (i=0; i<bytes; ++i) { + pch[i] ^= 0x55; + } + return bytes; +} + +static zzip_plugin_io_handlers our_handlers = { _MSC_VER_NULL }; +static const char* const our_fileext [] = { ".dat", ".sav", 0 }; + + +static const char usage[] = +{ + " zzobfuscated <file> [in-zip filename]\n" + " - Demonstrates the use of installable file I/O handlers.\n" + " Copies <file> to \"obfuscated[.dat]\" while \"encrypting\" it by xor'ing\n" + " every byte with 0x55, installs file I/O handlers, and then uses the\n" + " zzip_open_ext_io function to read and print the file to stdout.\n" + " The file can be a normal file or an inflated part of a zip-archive,\n" + " to get 'README' from test.zip you may write \n" + " zzobfuscated test.zip README \n" +}; + +int +main (int argc, char* argv[]) +{ + if (argc <= 1 || argc > 3 || ! strcmp (argv[1], "--help")) + { + printf (usage); + return 0; + } + if (! strcmp (argv[1], "--version")) + { + printf (__FILE__" version "ZZIP_PACKAGE" "ZZIP_VERSION"\n"); + return 0; + } + + if (strlen(argv[1]) > 128) { + fprintf(stderr, "Please provide a filename shorter than 128 chars.\n"); + exit(1); + } + + /* obfuscate the file */ + { + int ch; + FILE* fin; + FILE* fout; + fin = fopen(argv[1], "rb"); + if (!fin) { + fprintf(stderr, "Can't open input file \"%s\"\n", argv[1]); + exit(1); + } + fout = fopen((argc == 2) ? "obfuscated" : "obfuscated.dat", "wb"); + if (!fout) { + fprintf(stderr, "Can't open output file \"obfuscated\"\n"); + exit(1); + } + while ((ch = fgetc(fin)) != EOF) { + ch ^= 0x55; + fputc(ch, fout); + } + fclose(fout); + fclose(fin); + } + + /* install our I/O hander */ + zzip_init_io(&our_handlers, 0); + our_handlers.fd.read = &our_read; + + { +# define argn 2 + ZZIP_FILE* fp; + char name[256]; + if (argc == 3) { + sprintf(name, "obfuscated/%s", argv[argn]); + } else { + sprintf(name, "obfuscated"); + } + fp = zzip_open_ext_io (name, O_RDONLY|O_BINARY, ZZIP_PREFERZIP, + our_fileext, &our_handlers); + + if (! fp) + { + perror (name); + exit(1); + }else{ + char buf[17]; + int n; + + /* read chunks of 16 bytes into buf and print them to stdout */ + while (0 < (n = zzip_read(fp, buf, 16))) + { + buf[n] = '\0'; +# ifdef STDOUT_FILENO + write (STDOUT_FILENO, buf, n); +# else + fwrite (buf, 1, n, stdout); +# endif + } + + if (n == -1) + perror (argv[argn]); + } + } + + return 0; +} + +/* + * Local variables: + * c-file-style: "stroustrup" + * End: + */ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/bins/zzxorcat.c b/Build/source/libs/zziplib/zziplib-0.13.58/bins/zzxorcat.c new file mode 100644 index 00000000000..97fcd51fd32 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/bins/zzxorcat.c @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2000,2001,2002 Guido Draheim <guidod@gmx.de> + * Use freely under the restrictions of the ZLIB License + * + * show zip-reading with xor-obfuscation. + * Note that the difference to the standard zzcat.c is quite small. + */ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <ctype.h> +#include <zzip/zzip.h> +#include <zzip/plugin.h> + +#if defined ZZIP_HAVE_UNISTD_H +#include <unistd.h> +#elif defined ZZIP_HAVE_IO_H +#include <io.h> +#else +#error need posix io for this example +#endif + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +static const char usage[] = +{ + " zzxorcat [-#] <file>... \n" + " - prints the file to stdout, so you may want to redirect the output; \n" + " the file is part of an inflated zip-archive obfuscated with xor value,\n" + " given by the numeric option (default is 0x55). \n" + " to get 'README' from dist.dat you may write \n" + " zzcat dist/README \n" +}; + +static int xor_value; + +static zzip_ssize_t xor_read (int f, void* p, zzip_size_t l) +{ + zzip_ssize_t r = read(f, p, l); + zzip_ssize_t x; char* q; for (x=0, q=p; x < r; x++) q[x] ^= xor_value; + return r; +} + +static zzip_plugin_io_handlers xor_handlers; +static zzip_strings_t xor_fileext[] = { ".dat", "", 0 }; + +int +main (int argc, char ** argv) +{ + int argn; + xor_value = 0x55; + + if (argc <= 1 || ! strcmp (argv[1], "--help")) + { + printf (usage); + return 0; + } + if (! strcmp (argv[1], "--version")) + { + printf (__FILE__" version "ZZIP_PACKAGE" "ZZIP_VERSION"\n"); + return 0; + } + + zzip_init_io (&xor_handlers, 0); xor_handlers.fd.read = &xor_read; + + for (argn=1; argn < argc; argn++) + { + ZZIP_FILE* fp; + + if (argv[argn][0] == '-') + { + if (isdigit(argv[argn][1])) xor_value = atoi (argv[argn]+1); + continue; + } + + fp = zzip_open_ext_io (argv[argn], O_RDONLY|O_BINARY, + ZZIP_CASELESS|ZZIP_ONLYZIP, + xor_fileext, &xor_handlers); + if (! fp) + { + perror (argv[argn]); + continue; + }else{ + char buf[17]; + zzip_ssize_t n; + + /* read chunks of 16 bytes into buf and print them to stdout */ + while (0 < (n = zzip_read(fp, buf, 16))) + { + buf[n] = '\0'; +# ifdef STDOUT_FILENO + write (STDOUT_FILENO, buf, n); +# else + fwrite (buf, 1, n, stdout); +# endif + } + + if (n == -1) + perror (argv[n]); + } + } + + return 0; +} + +/* + * Local variables: + * c-file-style: "stroustrup" + * End: + */ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/bins/zzxorcopy.c b/Build/source/libs/zziplib/zziplib-0.13.58/bins/zzxorcopy.c new file mode 100644 index 00000000000..1c06e534126 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/bins/zzxorcopy.c @@ -0,0 +1,112 @@ +/* + * Copyright (c) 2000,2001,2002 Guido Draheim <guidod@gmx.de> + * Use freely under the restrictions of the ZLIB License + * + * show a simple program to add xor-obfuscation. + * look at the resulting file with zzxordir an zzxorcat + * Remember that xor'ing data twice will result in the original data. + * This file has no dependency with zziplib - it's freestanding. + */ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <ctype.h> + +#include <zzip/_config.h> /* for ZZIP_VERSION */ + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +#if __STDC_VERSION__+0 < 199901 +#define _ssize_t int +#define _size_t unsigned +#else +#define _ssize_t ssize_t +#define _size_t size_t +#endif + +static const char usage[] = +{ + " zzxopy [-#] <input-file> <output-file> \n" + " copies data from input-file to output-file adding simple \n" + " obfuscation by xor-ing each byte with the numeric value given. \n" + " the default xor-value is 0x55. Remember that copying data twice \n" + " with the same xor-value will result in the original file data. \n" +}; + +static int xor_value; + +static _ssize_t xor_read (FILE* f, void* p, _size_t l) +{ + _ssize_t r = fread(p, 1, l, f); + _ssize_t x; char* q; for (x=0, q=p; x < r; x++) q[x] ^= xor_value; + return r; +} + +int +main (int argc, char ** argv) +{ + int argn; + xor_value = 0x55; + + if (argc <= 1 || ! strcmp (argv[1], "--help")) + { + printf (usage); + return 0; + } + if (! strcmp (argv[1], "--version")) + { + printf (__FILE__" version "ZZIP_PACKAGE" "ZZIP_VERSION"\n"); + return 0; + } + + for (argn=1; argn < argc; argn++) + { + FILE* iF = 0; + FILE* oF = 0; + + if (argv[argn][0] == '-') + { + if (isdigit(argv[argn][1])) xor_value = atoi (argv[argn]+1); + continue; + } + + if (argn + 1 >= argc) + { + printf (usage); + exit (1); + } + + iF = fopen (argv[argn], "rb"); + if (! iF) { perror (argv[argn]); exit (2); } + argn++; + oF = fopen (argv[argn], "wb"); + if (! oF) { perror (argv[argn]); fclose(iF); exit (3); } + + { + char buf[17]; + _ssize_t n; + + /* read chunks of 16 bytes into buf and print them to stdout */ + while (0 < (n = xor_read(iF, buf, 16))) + { + buf[n] = '\0'; + n = fwrite (buf, 1, n, oF); + if (n < 0) break; + } + + if (n < 0 && ferror (iF)) + perror (argv[argn]); + } + } + + return 0; +} + +/* + * Local variables: + * c-file-style: "stroustrup" + * End: + */ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/bins/zzxordir.c b/Build/source/libs/zziplib/zziplib-0.13.58/bins/zzxordir.c new file mode 100644 index 00000000000..c1e1f141446 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/bins/zzxordir.c @@ -0,0 +1,126 @@ +/* + * Copyright (c) 2000,2001,2002 Guido Draheim <guidod@gmx.de> + * Use freely under the restrictions of the ZLIB license. + * + * show zip-reading with xor-obfuscation. + * Note that the difference to the standard zzdir.c is quite small. + */ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <ctype.h> + +#include <zzip/zzip.h> +#include <zzip/plugin.h> + +#if defined ZZIP_HAVE_UNISTD_H +#include <unistd.h> +#elif defined ZZIP_HAVE_IO_H +#include <io.h> +#else +#error need posix io for this example +#endif + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +static const char usage[] = +{ + "zzdir <dir>.. \n" + " - prints a content table to stdout, but the dir can also be a zip-arch." + "\n" + " the file is part of an inflated zip-archive obfuscated with xor value,\n" + " given by the numeric option (default is 0x55). \n" + "\n" + " To show the contents of a zip-archive named 'test.zip', you may write \n" + " zzdir test \n" +}; + +static int xor_value; + +static zzip_ssize_t xor_read (int f, void* p, zzip_size_t l) +{ + zzip_ssize_t r = read(f, p, l); + zzip_ssize_t x; char* q; for (x=0, q=p; x < r; x++) q[x] ^= xor_value; + return r; +} + +static zzip_plugin_io_handlers xor_handlers = { }; +static zzip_strings_t xor_fileext[] = { ".dat", "", 0 }; + +int +main (int argc, char ** argv) +{ + int argn; + int exitcode = 0; + xor_value = 0x55; + + if (argc <= 1 || ! strcmp (argv[1], "--help")) + { + printf (usage); + return 0; + } + if (! strcmp (argv[1], "--version")) + { + printf (__FILE__" version "ZZIP_PACKAGE" "ZZIP_VERSION"\n"); + return 0; + } + + zzip_init_io (&xor_handlers, 0); xor_handlers.fd.read = &xor_read; + + for (argn=1; argn < argc; argn++) + { + ZZIP_DIR * dir; + ZZIP_DIRENT * d; + + if (argv[argn][0] == '-') + { + if (isdigit(argv[argn][1])) xor_value = atoi (argv[argn]+1); + continue; + } + + dir = zzip_opendir_ext_io(argv[argn], + ZZIP_ONLYZIP, xor_fileext, &xor_handlers); + if (! dir) + { + fprintf (stderr, "did not open %s: ", argv[argn]); + perror(argv[argn]); + exitcode++; + continue; + } + + if (argc > 2) printf ("%s: \n", argv[argn]); + + /* read each dir entry and show one line of info per file */ + while ((d = zzip_readdir (dir))) + { + /* orignalsize / compression-type / compression-ratio / filename */ + if (d->st_size > 999999) + { + printf ("%5dK %-9s %2d%% %s \n", + d->st_size>>10, + zzip_compr_str(d->d_compr), + 100 - (d->d_csize|1)/((d->st_size/100)|1), + d->d_name); + }else{ + printf ("%6d %-9s %2d%% %s \n", + d->st_size, + zzip_compr_str(d->d_compr), + 100 - (d->d_csize|1)*100/(d->st_size|1), + d->d_name); + } + } + + zzip_closedir(dir); + } + + return exitcode; +} + +/* + * Local variables: + * c-file-style: "stroustrup" + * End: + */ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/config.h.in b/Build/source/libs/zziplib/zziplib-0.13.58/config.h.in new file mode 100644 index 00000000000..ef1f9971edc --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/config.h.in @@ -0,0 +1,160 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the <byteswap.h> header file. */ +#undef HAVE_BYTESWAP_H + +/* Define to 1 if you have the <direct.h> header file. */ +#undef HAVE_DIRECT_H + +/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. + */ +#undef HAVE_DIRENT_H + +/* Define to 1 if you have the <dlfcn.h> header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the <fnmatch.h> header file. */ +#undef HAVE_FNMATCH_H + +/* Define to 1 if you have the <inttypes.h> header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the <io.h> header file. */ +#undef HAVE_IO_H + +/* Define to 1 if you have the <memory.h> header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ +#undef HAVE_NDIR_H + +/* Define to 1 if you have the <stdint.h> header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the <stdlib.h> header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `strcasecmp' function. */ +#undef HAVE_STRCASECMP + +/* Define to 1 if you have the <strings.h> header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the <string.h> header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `strndup' function. */ +#undef HAVE_STRNDUP + +/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. + */ +#undef HAVE_SYS_DIR_H + +/* Define to 1 if you have the <sys/int_types.h> header file. */ +#undef HAVE_SYS_INT_TYPES_H + +/* Define to 1 if you have the <sys/mman.h> header file. */ +#undef HAVE_SYS_MMAN_H + +/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. + */ +#undef HAVE_SYS_NDIR_H + +/* Define to 1 if you have the <sys/param.h> header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the <sys/types.h> header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the <unistd.h> header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the <winbase.h> header file. */ +#undef HAVE_WINBASE_H + +/* Define to 1 if you have the <windows.h> header file. */ +#undef HAVE_WINDOWS_H + +/* Define to 1 if you have the <winnt.h> header file. */ +#undef HAVE_WINNT_H + +/* Define to 1 if you have the <zlib.h> header file. */ +#undef HAVE_ZLIB_H + +/* whether the system defaults to 32bit off_t but can do 64bit when requested + */ +#undef LARGEFILE_SENSITIVE + +/* 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 version of this package. */ +#undef PACKAGE_VERSION + +/* The number of bytes in type int */ +#undef SIZEOF_INT + +/* The number of bytes in type long */ +#undef SIZEOF_LONG + +/* The number of bytes in type short */ +#undef SIZEOF_SHORT + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Version number of package */ +#undef VERSION + +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +#undef WORDS_BIGENDIAN + +/* Number of bits in a file offset, on hosts where this is settable. */ +#undef _FILE_OFFSET_BITS + +/* Define for large files, on AIX-style hosts. */ +#undef _LARGE_FILES + +/* Define to `long long' if <sys/types.h> does not define. */ +#undef __int64 + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#undef inline +#endif + +/* Define to `_zzip_off_t' if <sys/types.h> does not define. */ +#undef off64_t + +/* Define to `long' if <sys/types.h> does not define. */ +#undef off_t + +/* Define to equivalent of C99 restrict keyword, or to nothing if this is not + supported. Do not define if restrict is supported directly. */ +#undef restrict + +/* Define to `unsigned' if <sys/types.h> does not define. */ +#undef size_t + +/* Define to `int' if <sys/types.h> does not define. */ +#undef ssize_t diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/configure b/Build/source/libs/zziplib/zziplib-0.13.58/configure new file mode 100755 index 00000000000..a31235f4abf --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/configure @@ -0,0 +1,25785 @@ +#! /bin/sh +# From configure.ac Revision: 1.6 . +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.59. +# +# Copyright (C) 2003 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +# +# Guido Draheim <guido@gmx.de> for ZZipLib.SF.net +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# 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+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; 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 + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# 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 + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + 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 + + ;; + 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 + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # 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 sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# 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'" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + + + +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` + ;; +esac + +echo=${ECHO-echo} +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <<EOF +$* +EOF + exit 0 +fi + +# 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 + +if test -z "$ECHO"; then +if test "X${echo_test_string+set}" != Xset; then +# find a string as large as possible, as long as the shell can cope with it + for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... + if (echo_test_string=`eval $cmd`) 2>/dev/null && + echo_test_string=`eval $cmd` && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL $0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL $0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "$0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" +fi + + + + +tagnames=${tagnames+${tagnames},}CXX + +tagnames=${tagnames+${tagnames},}F77 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +exec 6>&1 + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_config_libobj_dir=. +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +ac_unique_file="zziplib.spec" +# Factoring default headers for most tests. +ac_includes_default="\ +#include <stdio.h> +#if HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#if HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif +#if STDC_HEADERS +# include <stdlib.h> +# include <stddef.h> +#else +# if HAVE_STDLIB_H +# include <stdlib.h> +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include <memory.h> +# endif +# include <string.h> +#endif +#if HAVE_STRINGS_H +# include <strings.h> +#endif +#if HAVE_INTTYPES_H +# include <inttypes.h> +#else +# if HAVE_STDINT_H +# include <stdint.h> +# endif +#endif +#if HAVE_UNISTD_H +# include <unistd.h> +#endif" + +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os ax_enable_builddir_sed THREAD_SAFE ZLIB_INCL ZLIB_LDIR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB DLLTOOL ac_ct_DLLTOOL AS ac_ct_AS OBJDUMP ac_ct_OBJDUMP CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL RELEASE_INFO VERSION_INFO MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT pkgconfig_libdir pkgconfig_libfile PERL PYTHON MKZIP XMLTO LARGEFILE_CFLAGS ZLIB_VERSION docdir SDL ZIPTESTS ZZIPLIB_LDFLAGS RESOLVES PKG_CONFIG pkgconfigdir aclocaldir CONFIG_FILES LIBOBJS LTLIBOBJS' +ac_subst_files='' + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# 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. +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +ac_prev= +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 + + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_option in + + -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 | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "enable_$ac_feature='$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 ;; + + -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 ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + 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 ;; + + -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_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=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 ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + 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'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +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 + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + 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 + + +# 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 its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + 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 + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi +fi +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP +ac_env_CXX_set=${CXX+set} +ac_env_CXX_value=$CXX +ac_cv_env_CXX_set=${CXX+set} +ac_cv_env_CXX_value=$CXX +ac_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_env_CXXFLAGS_value=$CXXFLAGS +ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_cv_env_CXXFLAGS_value=$CXXFLAGS +ac_env_CXXCPP_set=${CXXCPP+set} +ac_env_CXXCPP_value=$CXXCPP +ac_cv_env_CXXCPP_set=${CXXCPP+set} +ac_cv_env_CXXCPP_value=$CXXCPP +ac_env_F77_set=${F77+set} +ac_env_F77_value=$F77 +ac_cv_env_F77_set=${F77+set} +ac_cv_env_F77_value=$F77 +ac_env_FFLAGS_set=${FFLAGS+set} +ac_env_FFLAGS_value=$FFLAGS +ac_cv_env_FFLAGS_set=${FFLAGS+set} +ac_cv_env_FFLAGS_value=$FFLAGS + +# +# 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 this package 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 \`..'] + +_ACEOF + + cat <<_ACEOF +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] + --datadir=DIR read-only architecture-independent data [PREFIX/share] + --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] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] +_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] + --target=TARGET configure for building compilers for TARGET [HOST] +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-builddir disable automatic build in subdir of sources + + --disable-thread-safe disable thread-safe libtool option + + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --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-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + --disable-largefile omit support for large files + --disable-mmap disable mmap usage + + --enable-sdl enable SDL usage (if present) + + --enable-frame-pointer enable callframe generation for debugging + --enable-default-pkgconfigdir(=PATH) override the libdir/pkgconfig default + --enable-default-aclocaldir(=PATH) override the datadir/aclocal default + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-zlib zlib prefix (e.g. '$HOME/software') + + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-tags[=TAGS] + include additional configurations [automatic] + --with-largefile compile as off64_t instead of 32bit off_t + + --with-docdir docdir prefix (prefix/share/doc) + + --with-debug debug messages in library + + --with-lowstk limited thread stack + + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a + nonstandard directory <lib dir> + CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have + headers in a nonstandard directory <include dir> + CPP C preprocessor + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CXXCPP C++ preprocessor + F77 Fortran 77 compiler command + FFLAGS Fortran 77 compiler flags + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +_ACEOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d $ac_dir || continue + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style 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 + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd $ac_popdir + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\_ACEOF + +Copyright (C) 2003 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. + +Guido Draheim <guido@gmx.de> for ZZipLib.SF.net +_ACEOF + exit 0 +fi +exec 5>config.log +cat >&5 <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.59. Invocation command line was + + $ $0 $@ + +_ACEOF +{ +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` +hostinfo = `(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=. + echo "PATH: $as_dir" +done + +} >&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_sep= +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=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$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 + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export 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: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------- ## +## Output files. ## +## ------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h | sort + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status + ' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >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 + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + 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. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +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 `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; 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,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +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 + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`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. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +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_aux_dir= +for ac_dir in uses $srcdir/uses; 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 + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in uses $srcdir/uses" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in uses $srcdir/uses" >&2;} + { (exit 1); exit 1; }; } +fi +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + +# ======================================================================= +# Make sure we can run config.sub. +$ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + +echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 +build=$ac_cv_build +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6 +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_host_alias=$host_alias +test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6 +host=$ac_cv_host +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking target system type" >&5 +echo $ECHO_N "checking target system type... $ECHO_C" >&6 +if test "${ac_cv_target+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_target_alias=$target_alias +test "x$ac_cv_target_alias" = "x" && + ac_cv_target_alias=$ac_cv_host_alias +ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_target" >&5 +echo "${ECHO_T}$ac_cv_target" >&6 +target=$ac_cv_target +target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +test -n "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- +ax_enable_builddir="." +# Check whether --enable-builddir or --disable-builddir was given. +if test "${enable_builddir+set}" = set; then + enableval="$enable_builddir" + ax_enable_builddir="$enableval" +else + ax_enable_builddir="yes" +fi; +if test ".$ac_srcdir_defaulted" != ".no" ; then +if test ".$srcdir" = ".." ; then + if test -f config.status ; then + { echo "$as_me:$LINENO: toplevel srcdir already configured... skipping subdir build" >&5 +echo "$as_me: toplevel srcdir already configured... skipping subdir build" >&6;} + else + test ".$ax_enable_builddir" = "." && ax_enable_builddir="." + test ".$ax_enable_builddir" = ".no" && ax_enable_builddir="." + test ".$BUILD" = "." && BUILD=`uname -msr | tr " /" "__"`.d + test ".$ax_enable_builddir" = ".yes" && ax_enable_builddir="$BUILD" + if test ".$ax_enable_builddir" != ".." ; then # we know where to go and + { if $as_mkdir_p; then + mkdir -p $ax_enable_builddir + else + as_dir=$ax_enable_builddir + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory $ax_enable_builddir" >&5 +echo "$as_me: error: cannot create directory $ax_enable_builddir" >&2;} + { (exit 1); exit 1; }; }; } + + echo __.$ax_enable_builddir.__ > $ax_enable_builddir/conftest.tmp + cd $ax_enable_builddir + if grep __.$ax_enable_builddir.__ conftest.tmp >/dev/null 2>/dev/null ; then + rm conftest.tmp + echo "$as_me:$LINENO: result: continue configure in default builddir \"./$ax_enable_builddir\"" >&5 +echo "${ECHO_T}continue configure in default builddir \"./$ax_enable_builddir\"" >&6 + else + { { echo "$as_me:$LINENO: error: could not change to default builddir \"./$ax_enable_builddir\"" >&5 +echo "$as_me: error: could not change to default builddir \"./$ax_enable_builddir\"" >&2;} + { (exit 1); exit 1; }; } + fi + srcdir=`echo "$ax_enable_builddir" | + sed -e 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g;s,[/]$,,;'` + # going to restart from subdirectory location + test -f $srcdir/config.log && mv $srcdir/config.log . + test -f $srcdir/confdefs.h && mv $srcdir/confdefs.h . + test -f $srcdir/conftest.log && mv $srcdir/conftest.log . + test -f $srcdir/$cache_file && mv $srcdir/$cache_file . + echo "$as_me:$LINENO: result: ....exec $SHELL $srcdir/$0 \"--srcdir=$srcdir\" \"--enable-builddir=$ax_enable_builddir\" ${1+\"$@\"}" >&5 +echo "${ECHO_T}....exec $SHELL $srcdir/$0 \"--srcdir=$srcdir\" \"--enable-builddir=$ax_enable_builddir\" ${1+\"$@\"}" >&6 + case "$0" in # restart + /\\) exec $SHELL $0 "--srcdir=$srcdir" "--enable-builddir=$ax_enable_builddir" ${1+"$@"} ;; + *) exec $SHELL $srcdir/$0 "--srcdir=$srcdir" "--enable-builddir=$ax_enable_builddir" ${1+"$@"} ;; + esac + fi + fi +fi fi +# Extract the first word of "gsed sed", so it can be a program name with args. +set dummy gsed sed; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_ax_enable_builddir_sed+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $ax_enable_builddir_sed in + [\\/]* | ?:[\\/]*) + ac_cv_path_ax_enable_builddir_sed="$ax_enable_builddir_sed" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ax_enable_builddir_sed="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_ax_enable_builddir_sed" && ac_cv_path_ax_enable_builddir_sed="sed" + ;; +esac +fi +ax_enable_builddir_sed=$ac_cv_path_ax_enable_builddir_sed + +if test -n "$ax_enable_builddir_sed"; then + echo "$as_me:$LINENO: result: $ax_enable_builddir_sed" >&5 +echo "${ECHO_T}$ax_enable_builddir_sed" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + ac_config_commands="$ac_config_commands buildir" + + # -------------------------------------------- +case "$prefix:$ac_default_prefix" in + NONE:/usr/local) + result="" + echo "$as_me:$LINENO: checking default prefix path" >&5 +echo $ECHO_N "checking default prefix path... $ECHO_C" >&6 + case "${target_os}" in + *cygwin* | *mingw* | *uwin* | *djgpp | *emx* ) + if test "${host_os}" = "${target_os}" ; then + ac_default_prefix="/programs" + result="(win/dos target)" + else + case "$PATH" in + *:/usr/local/cross-tools/$target_alias/bin:*) + ac_default_prefix="/usr/local/cross-tools/$target_alias" ;; + *:/usr/local/$target_alias/bin:*) + ac_default_prefix="/usr/local/$target_alias" ;; + *:/usr/local/$target_cpu-$target_os/bin:*) + ac_default_prefix="/usr/local/$target_cpu-$target_os" ;; + *) + ac_default_prefix="/programs" ;; + esac + result="(win/dos cross-compiler)" + fi + ;; + esac + echo "$as_me:$LINENO: result: $ac_default_prefix $result" >&5 +echo "${ECHO_T}$ac_default_prefix $result" >&6 + ;; +esac +echo "$as_me:$LINENO: checking default prefix system" >&5 +echo $ECHO_N "checking default prefix system... $ECHO_C" >&6 +result="$prefix" ; test "$result" = "NONE" && result="$ac_default_prefix" +case ${result} in + /programs | /programs/*) result="is win-/programs" + # on win/dos, .exe .dll and .cfg live in the same directory + libdir=`echo $libdir |sed -e 's:^..exec_prefix./lib$:${bindir}:'` + sbindir=`echo $sbindir |sed -e 's:^..exec_prefix./sbin$:${libdir}:'` + sysconfdir=`echo $sysconfdir |sed -e 's:^..prefix./etc$:${sbindir}:'` + libexecdir=`echo $libexecdir |sed -e 's:/libexec$:/system:'` + # help-files shall be set with --infodir, docprefix is datadir + docprefix="${datadir}" + mandir=`echo $mandir \ + |sed -e 's:^..prefix./man$:${datadir}/info:'` + includedir=`echo $includedir \ + |sed -e 's:^..prefix./include$:${datadir}/include:'` + # other state files (but /etc) are moved to datadir + sharedstatedir=`echo $sharedstatedir \ + |sed -e 's:^..prefix./com$:${datadir}/default:'` + localstatedir=`echo $localstatedir \ + |sed -e 's:^..prefix./var$:${datadir}/current:'` + ;; + /usr) result="is /usr-shipped" + # doc files are left at prefix + docprefix="${prefix}" + # state files go under /top + sysconfdir=`echo $sysconfdir |sed -e 's:^..prefix./etc$:/etc:'` + sharedstatedir=`echo $sharedstatedir \ + |sed -e 's:^..prefix./com$:/etc/default:'` + # $prefix/var is going to end up in /var/lib + localstatedir=`echo $localstatedir \ + |sed -e 's:^..prefix./var$:/var/lib:'` + ;; + /opt | /opt/*) result="is /opt-package" + # state files go under /top/prefix + sysconfdir=`echo $sysconfdir \ + |sed -e 's:^..prefix./etc$:/etc${prefix}:'` + sharedstatedir=`echo $sharedstatedir \ + |sed -e 's:^..prefix./com$:/etc/default${prefix}:'` + # $prefix/var is going to to be /var$prefix... once again + localstatedir=`echo $localstatedir \ + |sed -e 's:^..prefix./var$:/var${prefix}:'` + # doc files are left at prefix + docprefix="${prefix}" + ;; + *) result="is /local-package" + # doc files are moved from prefix down to datadir + docprefix="${datadir}" + mandir=`echo $mandir \ + |sed -e 's:^..prefix./man$:${datadir}/man:'` + infodir=`echo $infodir \ + |sed -e 's:^..prefix./infodir$:${datadir}/info:'` + # never use $prefix/com - that is no good idea + sharedstatedir=`echo $sharedstatedir \ + |sed -e 's:^..prefix./com$:${sysconfdir}/default:'` + ;; +esac +echo "$as_me:$LINENO: result: $result" >&5 +echo "${ECHO_T}$result" >&6 +# -------------------------------------------------------- + +# ----------------------------------------------------------------------- +# Check whether --enable-thread-safe or --disable-thread-safe was given. +if test "${enable_thread_safe+set}" = set; then + enableval="$enable_thread_safe" + +else + enable_thread_safe="yes" +fi; +THREAD_SAFE="" +test "$enable_thread_safe" = "yes" && THREAD_SAFE="-thread-safe" +test "$enable_thread_safe" = "$host_os" && THREAD_SAFE="-thread-safe" + +if test -n "$THREAD_SAFE" ; then + echo "$as_me:$LINENO: result: ...using thread-safe linkage" >&5 +echo "${ECHO_T}...using thread-safe linkage" >&6 +else + echo "$as_me:$LINENO: result: disabled thread-safe linkage" >&5 +echo "${ECHO_T}disabled thread-safe linkage" >&6 +fi +# ---------------------------------------------------------------- +echo "$as_me:$LINENO: checking zlib install prefix" >&5 +echo $ECHO_N "checking zlib install prefix... $ECHO_C" >&6 + +# Check whether --with-zlib or --without-zlib was given. +if test "${with_zlib+set}" = set; then + withval="$with_zlib" + +else + with_zlib="no" +fi; +if test "${with_zlib}" = yes ; then # choose --prefix paths + if test "${prefix}" = NONE ; then + echo "$as_me:$LINENO: result: oops" >&5 +echo "${ECHO_T}oops" >&6 + { { echo "$as_me:$LINENO: error: --with-zlib requires a path argument or a --prefix path set" >&5 +echo "$as_me: error: --with-zlib requires a path argument or a --prefix path set" >&2;} + { (exit 1); exit 1; }; } + fi + with_zlib="$prefix" +fi + +case ".$with_zlib" in + .no|.no,*) + echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6 + with_zlib="no, not configured" ;; + ./usr) + echo "$as_me:$LINENO: result: oops, ignored (may try --with-zlib=/usr/.)" >&5 +echo "${ECHO_T}oops, ignored (may try --with-zlib=/usr/.)" >&6 + with_zlib="no, /usr ignored" ;; + *) if test ! -d "$with_zlib/include" ; then + echo "$as_me:$LINENO: result: oops" >&5 +echo "${ECHO_T}oops" >&6 + { { echo "$as_me:$LINENO: error: \"$with_zlib/include\" is not a directory" >&5 +echo "$as_me: error: \"$with_zlib/include\" is not a directory" >&2;} + { (exit 1); exit 1; }; } + fi + if test ! -d "$with_zlib/lib" ; then + echo "$as_me:$LINENO: result: oops" >&5 +echo "${ECHO_T}oops" >&6 + { { echo "$as_me:$LINENO: error: \"$with_zlib/lib\" is not a directory" >&5 +echo "$as_me: error: \"$with_zlib/lib\" is not a directory" >&2;} + { (exit 1); exit 1; }; } + fi + echo "$as_me:$LINENO: result: $with_zlib" >&5 +echo "${ECHO_T}$with_zlib" >&6 + ZLIB_INCL="-I$with_zlib/include" + ZLIB_LDIR="-L$with_zlib/lib" + echo "$as_me:$LINENO: result: ..adding CPPFLAGS $ZLIB_INCL" >&5 +echo "${ECHO_T}..adding CPPFLAGS $ZLIB_INCL" >&6 + echo "$as_me:$LINENO: result: ..adding LDFLAGS $ZLIB_LDIR" >&5 +echo "${ECHO_T}..adding LDFLAGS $ZLIB_LDIR" >&6 + CPPFLAGS="$CPPFLAGS $ZLIB_INCL" + LDFLAGS="$LDFLAGS $ZLIB_LDIR" + ;; +esac + + +# ----------------------------------------------------------------------- + + echo "$as_me:$LINENO: checking rpm spec file" >&5 +echo $ECHO_N "checking rpm spec file... $ECHO_C" >&6 + if test "." != "." ; then + ax_spec_file_="" + ax_spec_file=`basename ` + else + case ".$ac_unique_file" in + *.spec) ax_spec_file="$ac_unique_file" + ax_spec_file_="$ac_unique_file" ;; + *) ax_spec_file="TODO" + if test ".$PACKAGE" != "." + then ax_spec_file_="$PACKAGE.spec" + else ax_spec_file_="README" + fi + cat >&5 <<EOF + no ax_spec_file argument has been given, using defaults of + (1) $ax_spec_file_ + (2) $ax_spec_file +EOF + ;; + esac + fi + # find specfile + for i in . $srcdir $srcdir/.. .. ; do + if test -f "$i/$ax_spec_file_" ; then + ax_spec_dir="$i" + ax_spec_file="$ax_spec_dir/$ax_spec_file_" + break + fi + if test -f "$i/$ax_spec_file" ; then + ax_spec_dir="$i" + ax_spec_file="$ax_spec_dir/$ax_spec_file" + break + fi + done + case "$ax_spec_file" in + ./*) if test "$ax_spec_file" = "./$ax_spec_file_" ; then + ax_spec_file="$ax_spec_file_" + fi + echo "$as_me:$LINENO: result: $ax_spec_file" >&5 +echo "${ECHO_T}$ax_spec_file" >&6 ;; + */*) echo "$as_me:$LINENO: result: $ax_spec_file" >&5 +echo "${ECHO_T}$ax_spec_file" >&6 ;; + *) { { echo "$as_me:$LINENO: error: no rpm spec file found" >&5 +echo "$as_me: error: no rpm spec file found" >&2;} + { (exit 1); exit 1; }; } ;; + esac + + + echo "$as_me:$LINENO: checking for spec package" >&5 +echo $ECHO_N "checking for spec package... $ECHO_C" >&6 + if test ".$PACKAGE_NAME" = "." ; then if test ! -f $ax_spec_file + then k="(w/o spec)" + else k="" + + if test ".$PACKAGE_NAME" = "." ; then + PACKAGE_NAME=`grep -i '^[ ]*name[ ]*:' "$ax_spec_file" | sed -e 's/.*:[ ]*//' -e 's/[ ][ ]*/ /g' -e 's/^ //' -e 's/ $//' -e 'q'` + if test ".$PACKAGE_NAME" = "." ; then + for PACKAGE_NAME in name PACKAGE_NAME package_name ; do + PACKAGE_NAME=`echo "$PACKAGE_NAME" | sed -e 's/^%//g'` + PACKAGE_NAME=`sed -e "/^%[ ]*define[ ][ ]*$PACKAGE_NAME[ ]/!d" -e "s/^%[ ]*define[ ][ ]*$PACKAGE_NAME[ ]*//" -e 's/[ ][ ]*/ /' -e 's/ $//' -e 'q' $ax_spec_file` + test ".PACKAGE_NAME" != "." && break + done + fi + case ".$PACKAGE_NAME" in + .%{*) + PACKAGE_NAME=`echo "$PACKAGE_NAME" | sed -e 's/%{//' -e 's/}$//'` + PACKAGE_NAME=`sed -e "/^%[ ]*define[ ][ ]*$PACKAGE_NAME[ ]/!d" -e "s/^%[ ]*define[ ][ ]*$PACKAGE_NAME[ ]*//" -e 's/[ ][ ]*/ /' -e 's/ $//' -e 'q' $ax_spec_file` ;; + .%*) + PACKAGE_NAME=`echo "$PACKAGE_NAME" | sed -e 's/%//'` + PACKAGE_NAME=`sed -e "/^%[ ]*define[ ][ ]*$PACKAGE_NAME[ ]/!d" -e "s/^%[ ]*define[ ][ ]*$PACKAGE_NAME[ ]*//" -e 's/[ ][ ]*/ /' -e 's/ $//' -e 'q' $ax_spec_file` ;; + esac + + fi # test ".$[]PACKAGE_NAME" = "." + + PACKAGE_NAME=`echo $PACKAGE_NAME | sed -e 's/ /-/g'` + fi fi + test ".$PACKAGE_NAME" = "." && k="(fallback)" + test ".$PACKAGE_NAME" = "." && PACKAGE_NAME=`basename $ax_spec_file .spec` + test ".$PACKAGE_NAME" = ".README" && PACKAGE_NAME="TODO" + test ".$PACKAGE_NAME" = ".TODO" && PACKAGE_NAME="foo" + + test "PACKAGE_NAME" = "PACKAGE_NAME" && test ".$PACKAGE" = "." && PACKAGE="$PACKAGE_NAME" + echo "$as_me:$LINENO: result: $PACKAGE_NAME $k" >&5 +echo "${ECHO_T}$PACKAGE_NAME $k" >&6 + + echo "$as_me:$LINENO: checking for spec version" >&5 +echo $ECHO_N "checking for spec version... $ECHO_C" >&6 + if test ".$PACKAGE_VERSION" = "." ; then if test ! -f $ax_spec_file + then k="(w/o spec)" + else k="" + + if test ".$PACKAGE_VERSION" = "." ; then + PACKAGE_VERSION=`grep -i '^[ ]*version[ ]*:' "$ax_spec_file" | sed -e 's/.*:[ ]*//' -e 's/[ ][ ]*/ /g' -e 's/^ //' -e 's/ $//' -e 'q'` + if test ".$PACKAGE_VERSION" = "." ; then + for PACKAGE_VERSION in version PACKAGE_VERSION package_version ; do + PACKAGE_VERSION=`echo "$PACKAGE_VERSION" | sed -e 's/^%//g'` + PACKAGE_VERSION=`sed -e "/^%[ ]*define[ ][ ]*$PACKAGE_VERSION[ ]/!d" -e "s/^%[ ]*define[ ][ ]*$PACKAGE_VERSION[ ]*//" -e 's/[ ][ ]*/ /' -e 's/ $//' -e 'q' $ax_spec_file` + test ".PACKAGE_VERSION" != "." && break + done + fi + case ".$PACKAGE_VERSION" in + .%{*) + PACKAGE_VERSION=`echo "$PACKAGE_VERSION" | sed -e 's/%{//' -e 's/}$//'` + PACKAGE_VERSION=`sed -e "/^%[ ]*define[ ][ ]*$PACKAGE_VERSION[ ]/!d" -e "s/^%[ ]*define[ ][ ]*$PACKAGE_VERSION[ ]*//" -e 's/[ ][ ]*/ /' -e 's/ $//' -e 'q' $ax_spec_file` ;; + .%*) + PACKAGE_VERSION=`echo "$PACKAGE_VERSION" | sed -e 's/%//'` + PACKAGE_VERSION=`sed -e "/^%[ ]*define[ ][ ]*$PACKAGE_VERSION[ ]/!d" -e "s/^%[ ]*define[ ][ ]*$PACKAGE_VERSION[ ]*//" -e 's/[ ][ ]*/ /' -e 's/ $//' -e 'q' $ax_spec_file` ;; + esac + + fi # test ".$[]PACKAGE_VERSION" = "." + + PACKAGE_VERSION=`echo $PACKAGE_VERSION | sed -e 's/ /-/g'` + fi fi + test ".$PACKAGE_VERSION" = "." && k="(fallback)" + test ".$PACKAGE_VERSION" = "." && PACKAGE_VERSION=`date +0.%y.%W%w` + + test "PACKAGE_VERSION" = "PACKAGE_VERSION" && test ".$VERSION" = "." && VERSION="$PACKAGE_VERSION" + case "$PACKAGE_VERSION" in # note we set traditional VERSION before cleaning things up + *.*.) PACKAGE_VERSION="$PACKAGE_VERSION"`date +%W%w` ;; + *.*.*) ;; + *.) PACKAGE_VERSION="$PACKAGE_VERSION"`date +%y.%W%w` ;; + *.*) PACKAGE_VERSION="$PACKAGE_VERSION.0" ;; + *) PACKAGE_VERSION=`echo "$PACKAGE_VERSION" | $as_tr_sh` ; PACKAGE_VERSION="$PACKAGE_VERSION.`date +%y.%W%w`" ;; + esac + PACKAGE_VERSION=`echo $PACKAGE_VERSION | sed -e "s/[.]0\\(0-9\\)/.\\1/g"` + echo "$as_me:$LINENO: result: $PACKAGE_VERSION $k" >&5 +echo "${ECHO_T}$PACKAGE_VERSION $k" >&6 + + echo "$as_me:$LINENO: checking for spec license type" >&5 +echo $ECHO_N "checking for spec license type... $ECHO_C" >&6 + if test ".$PACKAGE_LICENSE" = "." ; then if test ! -f $ax_spec_file + then k="(w/o spec)" + else k="" + + if test ".$PACKAGE_LICENSE" = "." ; then + PACKAGE_LICENSE=`grep -i '^[ ]*license[ ]*:' "$ax_spec_file" | sed -e 's/.*:[ ]*//' -e 's/[ ][ ]*/ /g' -e 's/^ //' -e 's/ $//' -e 'q'` + if test ".$PACKAGE_LICENSE" = "." ; then + for PACKAGE_LICENSE in license PACKAGE_LICENSE package_license ; do + PACKAGE_LICENSE=`echo "$PACKAGE_LICENSE" | sed -e 's/^%//g'` + PACKAGE_LICENSE=`sed -e "/^%[ ]*define[ ][ ]*$PACKAGE_LICENSE[ ]/!d" -e "s/^%[ ]*define[ ][ ]*$PACKAGE_LICENSE[ ]*//" -e 's/[ ][ ]*/ /' -e 's/ $//' -e 'q' $ax_spec_file` + test ".PACKAGE_LICENSE" != "." && break + done + fi + case ".$PACKAGE_LICENSE" in + .%{*) + PACKAGE_LICENSE=`echo "$PACKAGE_LICENSE" | sed -e 's/%{//' -e 's/}$//'` + PACKAGE_LICENSE=`sed -e "/^%[ ]*define[ ][ ]*$PACKAGE_LICENSE[ ]/!d" -e "s/^%[ ]*define[ ][ ]*$PACKAGE_LICENSE[ ]*//" -e 's/[ ][ ]*/ /' -e 's/ $//' -e 'q' $ax_spec_file` ;; + .%*) + PACKAGE_LICENSE=`echo "$PACKAGE_LICENSE" | sed -e 's/%//'` + PACKAGE_LICENSE=`sed -e "/^%[ ]*define[ ][ ]*$PACKAGE_LICENSE[ ]/!d" -e "s/^%[ ]*define[ ][ ]*$PACKAGE_LICENSE[ ]*//" -e 's/[ ][ ]*/ /' -e 's/ $//' -e 'q' $ax_spec_file` ;; + esac + + fi # test ".$[]PACKAGE_LICENSE" = "." + + PACKAGE_LICENSE=`echo $PACKAGE_LICENSE | sed -e 's/ *License//g'` + fi fi + test ".$PACKAGE_LICENSE" = "." && k="(fallback)" + if test ".$PACKAGE_LICENSE" = "." ; then + for ac_file in "$srcdir/COPYING" "$srcdir/COPYING" "$srcdir/LICENSE" ; do + test -f "$ac_file" || continue + if grep "GNU LESSER GENERAL PUBLIC LICENSE" "$ac_file" >/dev/null + then PACKAGE_LICENSE="GNU LGPL" ; break + elif grep "GNU GENERAL PUBLIC LICENSE" "$ac_file" >/dev/null + then PACKAGE_LICENSE="GNU GPL" ; break + elif grep "MOZILLA PUBLIC LICENSE" "$ac_file" >/dev/null + then PACKAGE_LICENSE="MPL" ; break + elif grep "Mozilla Public License" "$ac_file" >/dev/null + then PACKAGE_LICENSE="MPL" ; break + elif grep -i "artistic license" "$ac_file" >/dev/null + then PACKAGE_LICENSE="Artistic" ; break + elif grep -i "artistic control" "$ac_file" >/dev/null + then PACKAGE_LICENSE="Artistic" ; break + elif grep -i "semblance of artistic" "$ac_file" >/dev/null + then PACKAGE_LICENSE="Artistic" ; break + elif grep -i "above copyright notice" "$ac_file" >/dev/null + then PACKAGE_LICENSE="BSD" ; break + fi + done + if test ".$PACKAGE_LICENSE" = "." ; then + if test "$srcdir/COPYING.LIB" ; then PACKAGE_LICENSE="GNU LGPL" + elif test ".$ltmain" != "." ; then PACKAGE_LICENSE="GNU LGPL" + else PACKAGE_LICENSE="GNU GPL" + fi + fi + fi + + test "$PACKAGE_LICENSE" = "GPL" && PACKAGE_LICENSE="GNU GPL" + test "$PACKAGE_LICENSE" = "LGPL" && PACKAGE_LICENSE="GNU LGPL" + echo "$as_me:$LINENO: result: $PACKAGE_LICENSE $k" >&5 +echo "${ECHO_T}$PACKAGE_LICENSE $k" >&6 + + echo "$as_me:$LINENO: checking for spec summary" >&5 +echo $ECHO_N "checking for spec summary... $ECHO_C" >&6 + if test ".$PACKAGE_SUMMARY" = "." ; then if test ! -f $ax_spec_file + then k="(w/o spec)" + else k="" + + if test ".$PACKAGE_SUMMARY" = "." ; then + PACKAGE_SUMMARY=`grep -i '^[ ]*summary[ ]*:' "$ax_spec_file" | sed -e 's/.*:[ ]*//' -e 's/[ ][ ]*/ /g' -e 's/^ //' -e 's/ $//' -e 'q'` + if test ".$PACKAGE_SUMMARY" = "." ; then + for PACKAGE_SUMMARY in summary PACKAGE_SUMMARY package_summary ; do + PACKAGE_SUMMARY=`echo "$PACKAGE_SUMMARY" | sed -e 's/^%//g'` + PACKAGE_SUMMARY=`sed -e "/^%[ ]*define[ ][ ]*$PACKAGE_SUMMARY[ ]/!d" -e "s/^%[ ]*define[ ][ ]*$PACKAGE_SUMMARY[ ]*//" -e 's/[ ][ ]*/ /' -e 's/ $//' -e 'q' $ax_spec_file` + test ".PACKAGE_SUMMARY" != "." && break + done + fi + case ".$PACKAGE_SUMMARY" in + .%{*) + PACKAGE_SUMMARY=`echo "$PACKAGE_SUMMARY" | sed -e 's/%{//' -e 's/}$//'` + PACKAGE_SUMMARY=`sed -e "/^%[ ]*define[ ][ ]*$PACKAGE_SUMMARY[ ]/!d" -e "s/^%[ ]*define[ ][ ]*$PACKAGE_SUMMARY[ ]*//" -e 's/[ ][ ]*/ /' -e 's/ $//' -e 'q' $ax_spec_file` ;; + .%*) + PACKAGE_SUMMARY=`echo "$PACKAGE_SUMMARY" | sed -e 's/%//'` + PACKAGE_SUMMARY=`sed -e "/^%[ ]*define[ ][ ]*$PACKAGE_SUMMARY[ ]/!d" -e "s/^%[ ]*define[ ][ ]*$PACKAGE_SUMMARY[ ]*//" -e 's/[ ][ ]*/ /' -e 's/ $//' -e 'q' $ax_spec_file` ;; + esac + + fi # test ".$[]PACKAGE_SUMMARY" = "." + + fi fi + test ".$PACKAGE_SUMMARY" = "." && k="(fallback)" + if test ".$PACKAGE_SUMMARY" = "." ; then PACKAGE_SUMMARY="$PACKAGE" + test ".$PACKAGE_SUMMARY" = "." && PACKAGE_SUMMARY="foo" + test ".$ltmain" != "." && PACKAGE_SUMMARY="$PACKAGE_SUMMARY library" + fi + + echo "$as_me:$LINENO: result: $PACKAGE_SUMMARY $k" >&5 +echo "${ECHO_T}$PACKAGE_SUMMARY $k" >&6 + + echo "$as_me:$LINENO: checking for spec category" >&5 +echo $ECHO_N "checking for spec category... $ECHO_C" >&6 + if test ".$PACKAGE_CATEGORY" = "." ; then if test ! -f $ax_spec_file + then k="(w/o spec)" + else k="" + + if test ".$PACKAGE_CATEGORY" = "." ; then + PACKAGE_CATEGORY=`grep -i '^[ ]*group[ ]*:' "$ax_spec_file" | sed -e 's/.*:[ ]*//' -e 's/[ ][ ]*/ /g' -e 's/^ //' -e 's/ $//' -e 'q'` + if test ".$PACKAGE_CATEGORY" = "." ; then + for PACKAGE_CATEGORY in group PACKAGE_CATEGORY package_category ; do + PACKAGE_CATEGORY=`echo "$PACKAGE_CATEGORY" | sed -e 's/^%//g'` + PACKAGE_CATEGORY=`sed -e "/^%[ ]*define[ ][ ]*$PACKAGE_CATEGORY[ ]/!d" -e "s/^%[ ]*define[ ][ ]*$PACKAGE_CATEGORY[ ]*//" -e 's/[ ][ ]*/ /' -e 's/ $//' -e 'q' $ax_spec_file` + test ".PACKAGE_CATEGORY" != "." && break + done + fi + case ".$PACKAGE_CATEGORY" in + .%{*) + PACKAGE_CATEGORY=`echo "$PACKAGE_CATEGORY" | sed -e 's/%{//' -e 's/}$//'` + PACKAGE_CATEGORY=`sed -e "/^%[ ]*define[ ][ ]*$PACKAGE_CATEGORY[ ]/!d" -e "s/^%[ ]*define[ ][ ]*$PACKAGE_CATEGORY[ ]*//" -e 's/[ ][ ]*/ /' -e 's/ $//' -e 'q' $ax_spec_file` ;; + .%*) + PACKAGE_CATEGORY=`echo "$PACKAGE_CATEGORY" | sed -e 's/%//'` + PACKAGE_CATEGORY=`sed -e "/^%[ ]*define[ ][ ]*$PACKAGE_CATEGORY[ ]/!d" -e "s/^%[ ]*define[ ][ ]*$PACKAGE_CATEGORY[ ]*//" -e 's/[ ][ ]*/ /' -e 's/ $//' -e 'q' $ax_spec_file` ;; + esac + + fi # test ".$[]PACKAGE_CATEGORY" = "." + + PACKAGE_CATEGORY=`echo $PACKAGE_CATEGORY | sed -e 's/ /-/g'` + fi fi + test ".$PACKAGE_CATEGORY" = "." && k="(fallback)" + if test ".$PACKAGE_CATEGORY" = "." ; then if test ".$ltmain" != "." + then PACKAGE_CATEGORY="Development/Library" + else PACKAGE_CATEGORY="Development/Other" + fi fi + + echo "$as_me:$LINENO: result: $PACKAGE_CATEGORY $k" >&5 +echo "${ECHO_T}$PACKAGE_CATEGORY $k" >&6 + + echo "$as_me:$LINENO: checking for spec icon" >&5 +echo $ECHO_N "checking for spec icon... $ECHO_C" >&6 + if test ".$PACKAGE_ICON" = "." ; then if test ! -f $ax_spec_file + then k="(w/o spec)" + else k="" + + if test ".$PACKAGE_ICON" = "." ; then + PACKAGE_ICON=`grep -i '^[ ]*icon[ ]*:' "$ax_spec_file" | sed -e 's/.*:[ ]*//' -e 's/[ ][ ]*/ /g' -e 's/^ //' -e 's/ $//' -e 'q'` + if test ".$PACKAGE_ICON" = "." ; then + for PACKAGE_ICON in icon PACKAGE_ICON package_icon ; do + PACKAGE_ICON=`echo "$PACKAGE_ICON" | sed -e 's/^%//g'` + PACKAGE_ICON=`sed -e "/^%[ ]*define[ ][ ]*$PACKAGE_ICON[ ]/!d" -e "s/^%[ ]*define[ ][ ]*$PACKAGE_ICON[ ]*//" -e 's/[ ][ ]*/ /' -e 's/ $//' -e 'q' $ax_spec_file` + test ".PACKAGE_ICON" != "." && break + done + fi + case ".$PACKAGE_ICON" in + .%{*) + PACKAGE_ICON=`echo "$PACKAGE_ICON" | sed -e 's/%{//' -e 's/}$//'` + PACKAGE_ICON=`sed -e "/^%[ ]*define[ ][ ]*$PACKAGE_ICON[ ]/!d" -e "s/^%[ ]*define[ ][ ]*$PACKAGE_ICON[ ]*//" -e 's/[ ][ ]*/ /' -e 's/ $//' -e 'q' $ax_spec_file` ;; + .%*) + PACKAGE_ICON=`echo "$PACKAGE_ICON" | sed -e 's/%//'` + PACKAGE_ICON=`sed -e "/^%[ ]*define[ ][ ]*$PACKAGE_ICON[ ]/!d" -e "s/^%[ ]*define[ ][ ]*$PACKAGE_ICON[ ]*//" -e 's/[ ][ ]*/ /' -e 's/ $//' -e 'q' $ax_spec_file` ;; + esac + + fi # test ".$[]PACKAGE_ICON" = "." + + fi fi + test ".$PACKAGE_ICON" = "." && k="(fallback)" + if test ".$PACKAGE_ICON" = "." ; then PACKAGE_ICON="$PACKAGE-icon.png" ; fi + + echo "$as_me:$LINENO: result: $PACKAGE_ICON $k" >&5 +echo "${ECHO_T}$PACKAGE_ICON $k" >&6 + + +am__api_version="1.9" +# 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. +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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_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 + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done + + +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. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL=$ac_install_sh + fi +fi +echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$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' + +echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 +# Just in case +sleep 1 +echo timestamp > conftest.file +# 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 ( + 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 + rm -f conftest.file + 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". + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +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 $. echo might interpret backslashes. +# By default was `s,x,x', remove it if useless. +cat <<\_ACEOF >conftest.sed +s/[\\$]/&&/g;s/;s,x,x,$// +_ACEOF +program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +rm conftest.sed + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + # We used to keeping the `.' as first argument, in order to + # allow $(mkdir_p) to be used without argument. As in + # $(mkdir_p) $(somedir) + # where $(somedir) is conditionally defined. However this is wrong + # for two reasons: + # 1. if the package is installed by a user who cannot write `.' + # make install will fail, + # 2. the above comment should most certainly read + # $(mkdir_p) $(DESTDIR)$(somedir) + # so it does not work when $(somedir) is undefined and + # $(DESTDIR) is not. + # To support the latter case, we have to write + # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), + # so the `.' trick is pointless. + mkdir_p='mkdir -p --' +else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + for d in ./-p ./--version; + do + test -d $d && rmdir $d + done + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. + if test -f "$ac_aux_dir/mkinstalldirs"; then + mkdir_p='$(mkinstalldirs)' + else + mkdir_p='$(install_sh) -d' + fi +fi + +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 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$AWK" && break +done + +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +all: + @echo 'ac_maketemp="$(MAKE)"' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftest.make +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SET_MAKE= +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 + +# test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } +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=$PACKAGE + VERSION=$VERSION + + +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"} + +install_sh=${install_sh-"$am_aux_dir/install-sh"} + +# 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 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + STRIP=$ac_ct_STRIP +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + +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 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +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 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +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 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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_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" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +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 + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + 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 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CC" && break +done + + CC=$ac_ct_CC +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 + (eval $ac_compiler --version </dev/null >&5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 + (eval $ac_compiler -v </dev/null >&5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 + (eval $ac_compiler -V </dev/null >&5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out 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. +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; + * ) + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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 | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_cc_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$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 +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdarg.h> +#include <stdio.h> +#include <sys/types.h> +#include <sys/stat.h> +/* 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 -std1 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 -std1. */ +int osf4_cc_array ['\x00' == 0 ? 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 +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +#include <stdlib.h> +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext 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 +DEPDIR="${am__leading_dot}deps" + + ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi + + +echo "$as_me:$LINENO: result: $_am_result" >&5 +echo "${ECHO_T}$_am_result" >&6 +rm -f confinc confmf + +# Check whether --enable-dependency-tracking or --disable-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='\' +fi + + +if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + + +depcc="$CC" am_compiler_list= + +echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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'. + 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 + 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 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + 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 + ;; + none) break ;; + esac + # 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. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} 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 +echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$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 + + +# 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. +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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_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 + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done + + +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. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL=$ac_install_sh + fi +fi +echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$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' + + + +# Check whether --enable-shared or --disable-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 or --disable-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 --enable-fast-install or --disable-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; + +echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 +if test "${lt_cv_path_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # 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 +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 + +fi + +SED=$lt_cv_path_SED +echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6 + +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep + + + +# Check whether --with-gnu-ld or --without-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. + echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&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 + echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 +else + echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 </dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break + ;; + *) + test "$with_gnu_ld" != yes && break + ;; + esac + fi + done + IFS="$lt_save_ifs" +else + lt_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi + +LD="$lt_cv_path_LD" +if test -n "$LD"; then + echo "$as_me:$LINENO: result: $LD" >&5 +echo "${ECHO_T}$LD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 </dev/null` in +*GNU* | *'with BFD'*) + lt_cv_prog_gnu_ld=yes + ;; +*) + lt_cv_prog_gnu_ld=no + ;; +esac +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 +with_gnu_ld=$lt_cv_prog_gnu_ld + + +echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 +if test "${lt_cv_ld_reload_flag+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_ld_reload_flag='-r' +fi +echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +echo "${ECHO_T}$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 + 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 + +echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 +echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 +if test "${lt_cv_path_NM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi +fi +echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +echo "${ECHO_T}$lt_cv_path_NM" >&6 +NM="$lt_cv_path_NM" + +echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6 +fi + +echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 +echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 +if test "${lt_cv_deplibs_check_method+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 +aix4* | aix5*) + 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'. + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | kfreebsd*-gnu | 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 + ;; + +gnu*) + 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]) 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 + ;; + +interix3*) + # 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 Linux ELF. +linux*) + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + 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=unknown + ;; + +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 + ;; + +solaris*) + 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 + ;; + +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 +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 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 whether --enable-libtool-lock or --disable-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:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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 4384 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *32-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + 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-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + 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" + echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 +if test "${lt_cv_cc_needs_belf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + lt_cv_cc_needs_belf=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +lt_cv_cc_needs_belf=no +fi +rm -f 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 +echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +echo "${ECHO_T}$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 + ;; +sparc*-*solaris*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.o` in + *64-bit*) + case $lt_cv_prog_gnu_ld in + yes*) LD="${LD-ld} -m elf64_sparc" ;; + *) LD="${LD-ld} -64" ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-cygwin* | *-*-mingw* | *-*-pw32*) + 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 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_DLLTOOL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + echo "$as_me:$LINENO: result: $DLLTOOL" >&5 +echo "${ECHO_T}$DLLTOOL" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_DLLTOOL" && ac_cv_prog_ac_ct_DLLTOOL="false" +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 +echo "${ECHO_T}$ac_ct_DLLTOOL" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + DLLTOOL=$ac_ct_DLLTOOL +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_AS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AS="${ac_tool_prefix}as" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +AS=$ac_cv_prog_AS +if test -n "$AS"; then + echo "$as_me:$LINENO: result: $AS" >&5 +echo "${ECHO_T}$AS" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_AS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AS="as" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_AS" && ac_cv_prog_ac_ct_AS="false" +fi +fi +ac_ct_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 +echo "${ECHO_T}$ac_ct_AS" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + AS=$ac_ct_AS +else + AS="$ac_cv_prog_AS" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_OBJDUMP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + echo "$as_me:$LINENO: result: $OBJDUMP" >&5 +echo "${ECHO_T}$OBJDUMP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_OBJDUMP" && ac_cv_prog_ac_ct_OBJDUMP="false" +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 +echo "${ECHO_T}$ac_ct_OBJDUMP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + OBJDUMP=$ac_ct_OBJDUMP +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + + ;; + +esac + +need_locks="$enable_libtool_lock" + + +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 +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f 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 +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$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 <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +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 + + +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <float.h> + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_stdc=no +fi +rm -f 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <string.h> + +_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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdlib.h> + +_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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ctype.h> +#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)) + exit(2); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +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=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_header in dlfcn.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC + 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 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CXX" && break +done +test -n "$ac_ct_CXX" || ac_ct_CXX="g++" + + CXX=$ac_ct_CXX +fi + + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 + (eval $ac_compiler --version </dev/null >&5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 + (eval $ac_compiler -v </dev/null >&5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 + (eval $ac_compiler -V </dev/null >&5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +CXXFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_cxx_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +#include <stdlib.h> +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +depcc="$CXX" am_compiler_list= + +echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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'. + 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_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + 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 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + 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 + ;; + none) break ;; + esac + # 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. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} 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_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + + +if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + + + +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 +if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +echo "$as_me:$LINENO: result: $CXXCPP" >&5 +echo "${ECHO_T}$CXXCPP" >&6 +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +fi + + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran + 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 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$F77"; then + ac_cv_prog_F77="$F77" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_F77="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +F77=$ac_cv_prog_F77 +if test -n "$F77"; then + echo "$as_me:$LINENO: result: $F77" >&5 +echo "${ECHO_T}$F77" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$F77" && break + done +fi +if test -z "$F77"; then + ac_ct_F77=$F77 + for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_F77"; then + ac_cv_prog_ac_ct_F77="$ac_ct_F77" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_F77="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_F77=$ac_cv_prog_ac_ct_F77 +if test -n "$ac_ct_F77"; then + echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 +echo "${ECHO_T}$ac_ct_F77" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_F77" && break +done + + F77=$ac_ct_F77 +fi + + +# Provide some information about the compiler. +echo "$as_me:6225:" \ + "checking for Fortran 77 compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 + (eval $ac_compiler --version </dev/null >&5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 + (eval $ac_compiler -v </dev/null >&5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 + (eval $ac_compiler -V </dev/null >&5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +rm -f a.out + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 +if test "${ac_cv_f77_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me +#endif + + end +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_f77_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 +ac_ext=$ac_save_ext +ac_test_FFLAGS=${FFLAGS+set} +ac_save_FFLAGS=$FFLAGS +FFLAGS= +echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 +echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_f77_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + FFLAGS=-g +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_f77_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_f77_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 +echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 +if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_f77_g = yes; then + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-g -O2" + else + FFLAGS="-g" + fi +else + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-O2" + else + FFLAGS= + fi +fi + +G77=`test $ac_compiler_gnu = yes && echo yes` +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 + + + +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! + +# find the maximum length of command line arguments +echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6 +if test "${lt_cv_sys_max_cmd_len+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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*) + # 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; + ;; + + 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 + ;; + + 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 + ;; + *) + # 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. + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ + = "XX$teststring") >/dev/null 2>&1 && + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + 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` + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6 +else + echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6 +fi + + + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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]*\)' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32*) + symcode='[ABCDGISTW]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +linux*) + if test "$host_cpu" = ia64; then + symcode='[ABCDGIRSTW]' + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + 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 + +# 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 + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Try without a prefix undercore, 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. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <<EOF +#ifdef __cplusplus +extern "C" { +#endif +char nm_test_var; +void nm_test_func(){} +#ifdef __cplusplus +} +#endif +int main(){nm_test_var='a';nm_test_func();return(0);} +EOF + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { (eval echo "$as_me:$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=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && 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 <<EOF > conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <<EOF >> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_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 -f 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 + echo "$as_me:$LINENO: result: failed" >&5 +echo "${ECHO_T}failed" >&6 +else + echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6 +fi + +echo "$as_me:$LINENO: checking for objdir" >&5 +echo $ECHO_N "checking for objdir... $ECHO_C" >&6 +if test "${lt_cv_objdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 +echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +echo "${ECHO_T}$lt_cv_objdir" >&6 +objdir=$lt_cv_objdir + + + + + +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 + +# 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 to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false" +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +echo "${ECHO_T}$ac_ct_AR" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + AR=$ac_ct_AR +else + AR="$ac_cv_prog_AR" +fi + +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 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + RANLIB=$ac_ct_RANLIB +else + RANLIB="$ac_cv_prog_RANLIB" +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 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}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 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + STRIP=$ac_ct_STRIP +else + STRIP="$ac_cv_prog_STRIP" +fi + + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +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 \$oldlib" + ;; + *) + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 <<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 + +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 + echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + echo "$as_me:$LINENO: checking for file" >&5 +echo $ECHO_N "checking for file... $ECHO_C" >&6 +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 <<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 + +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 + echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +enable_dlopen=no +enable_win32_dll=yes + +# Check whether --enable-libtool-lock or --disable-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 + + +# Check whether --with-pic or --without-pic was given. +if test "${with_pic+set}" = set; then + withval="$with_pic" + pic_mode="$withval" +else + pic_mode=default +fi; +test -z "$pic_mode" && pic_mode=default + +# Use C for the default configuration in the libtool script +tagname= +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;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}\n' + + +# 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 warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$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 +printf "$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 conftest* + + + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + +echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + printf "$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:7288: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:7292: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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 +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$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= + +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + + 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*) + # 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' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # 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' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + interix3*) + # 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 + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + hpux*) + # 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='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + 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 + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic='-qnocommon' + lt_prog_compiler_wl='-Wl,' + ;; + esac + ;; + + mingw* | pw32* | os2*) + # 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' + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + linux*) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # 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' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + 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 + +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic" >&6 + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + printf "$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:7556: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:7560: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6 + +if test x"$lt_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 +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 + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" +echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$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 "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works=yes + fi + else + lt_prog_compiler_static_works=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 + +if test x"$lt_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$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:7660: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:7664: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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 .. + rmdir conftest + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +echo "${ECHO_T}$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 + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +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 + +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + + runpath_var= + allow_undefined_flag= + enable_shared_with_static_runtimes=no + archive_cmds= + archive_expsym_cmds= + old_archive_From_new_cmds= + old_archive_from_expsyms_cmds= + export_dynamic_flag_spec= + whole_archive_flag_spec= + thread_safe_flag_spec= + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_direct=no + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + link_all_deplibs=unknown + hardcode_automatic=no + module_cmds= + module_expsym_cmds= + always_export_symbols=no + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # 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_" + # 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. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + 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 + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + if test "$with_gnu_ld" = 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>/dev/null` in + *\ [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 + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <<EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, 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 modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + 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 + + # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> 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't use + # them. + ld_shlibs=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + 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/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + + 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 + ;; + + interix3*) + 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' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + 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; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # 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; $echo \"$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' ;; + esac + archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; 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 -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + ld_shlibs=no + fi + ;; + + netbsd*) + 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 $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' + fi + ;; + + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <<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. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + 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 + ;; + + 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 + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$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 $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 + + 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 + ;; + + 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 + 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 + 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")) && (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].*|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 + + 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_libdir_separator=':' + link_all_deplibs=yes + + 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 + hardcode_direct=yes + 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 + 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 + + # 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. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; 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 echo "${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. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; 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' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + 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*) + 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 + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec=-rdynamic + ;; + + 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=' ' + 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 `echo "$deplibs" | $SED -e '\''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' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc=no + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='' + link_all_deplibs=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + freebsd1*) + ld_shlibs=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # 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* | kfreebsd*-gnu | dragonfly*) + archive_cmds='$CC -shared -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 -fPIC ${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 -a "$with_gnu_ld" = no; then + archive_cmds='$CC -shared -fPIC ${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 + 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 -a "$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 ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared -fPIC ${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' + ;; + *) + archive_cmds='$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 + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld='+b $libdir' + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + *) + hardcode_direct=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 $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld='-rpath $libdir' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + link_all_deplibs=yes + ;; + + netbsd*) + 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 + ;; + + openbsd*) + hardcode_direct=yes + hardcode_shlibpath_var=no + 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 + ;; + + 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" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + 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} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${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='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -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; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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 + hardcode_libdir_separator=: + ;; + + solaris*) + no_undefined_flag=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds='$CC -shared ${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 ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + 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' + 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 linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; + 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*) + 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='`test -z "$SCOABSPATH" && echo ${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,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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 + fi + +echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +echo "${ECHO_T}$ld_shlibs" >&6 +test "$ld_shlibs" = no && can_build_shared=no + +# +# 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. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 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:$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=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc=no + else + archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +echo "${ECHO_T}$archive_cmds_need_lc" >&6 + ;; + esac + fi + ;; +esac + +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +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" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # 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. + 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 +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +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 + 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' + ;; + +aix4* | aix5*) + version_type=linux + 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<name>.so + # instead of lib<name>.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # 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*) + 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=`$echo "X$lib" | $Xsed -e '\''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' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + 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*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + 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' + 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="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + 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 + ;; + 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 + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # 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}${versuffix}$shared_ext ${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`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + 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 + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-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='GNU ld.so' + ;; + +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[123]*) 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 + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + 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' + ;; + +interix3*) + 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' + 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 + 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 Linux ELF. +linux*) + 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' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;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' + ;; + +knetbsd*-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='GNU ld.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 + 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=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=yes + ;; + +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" + ;; + +solaris*) + 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=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 + 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 + export_dynamic_flag_spec='${wl}-Blargedynsym' + 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 + 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 + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$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 + +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var" || \ + test "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existant 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_AC_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 +echo "$as_me:$LINENO: result: $hardcode_action" >&5 +echo "${ECHO_T}$hardcode_action" >&6 + +if test "$hardcode_action" = relink; 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 + +striplib= +old_striplib= +echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&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" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}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" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + ;; + *) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; + esac +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*) + 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 + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; 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 + + ;; + + *) + echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 +if test "${ac_cv_func_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef shl_load + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +/* 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_shl_load) || defined (__stub___shl_load) +choke me +#else +char (*f) () = shl_load; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != shl_load; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_shl_load=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6 +if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" +else + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +int +main () +{ +shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dld_shl_load=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" +else + echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 +if test "${ac_cv_func_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define dlopen innocuous_dlopen + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef dlopen + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +/* 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_dlopen) || defined (__stub___dlopen) +choke me +#else +char (*f) () = dlopen; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != dlopen; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6 +if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" +else + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_svld_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_svld_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 +if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dld_link (); +int +main () +{ +dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_dld_link=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dld_dld_link=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 +if test $ac_cv_lib_dld_dld_link = yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" +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" + + echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 +if test "${lt_cv_dlopen_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 <<EOF +#line 10005 "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include <dlfcn.h> +#endif + +#include <stdio.h> + +#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 + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=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; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && 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 +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +echo "${ECHO_T}$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\" + echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 +if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 <<EOF +#line 10105 "configure" +#include "confdefs.h" + +#if HAVE_DLFCN_H +#include <dlfcn.h> +#endif + +#include <stdio.h> + +#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 + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=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; + /* dlclose (self); */ + } + else + puts (dlerror ()); + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && 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 +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +echo "${ECHO_T}$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 + + +# Report which library types will actually be built +echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6 + +echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&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 + ;; + +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6 + +echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6 + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler \ + CC \ + LD \ + lt_prog_compiler_wl \ + lt_prog_compiler_pic \ + lt_prog_compiler_static \ + lt_prog_compiler_no_builtin_flag \ + export_dynamic_flag_spec \ + thread_safe_flag_spec \ + whole_archive_flag_spec \ + enable_shared_with_static_runtimes \ + old_archive_cmds \ + old_archive_from_new_cmds \ + predep_objects \ + postdep_objects \ + predeps \ + postdeps \ + compiler_lib_search_path \ + archive_cmds \ + archive_expsym_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + old_archive_from_expsyms_cmds \ + allow_undefined_flag \ + no_undefined_flag \ + export_symbols_cmds \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ + hardcode_automatic \ + module_cmds \ + module_expsym_cmds \ + lt_cv_prog_compiler_c_o \ + exclude_expsyms \ + include_expsyms; do + + case $var in + old_archive_cmds | \ + old_archive_from_new_cmds | \ + archive_cmds | \ + archive_expsym_cmds | \ + module_cmds | \ + module_expsym_cmds | \ + old_archive_from_expsyms_cmds | \ + export_symbols_cmds | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" + { echo "$as_me:$LINENO: creating $ofile" >&5 +echo "$as_me: creating $ofile" >&6;} + + cat <<__EOF__ >> "$cfgfile" +#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 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., 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. + +# 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//" + +# 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 + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# 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 + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# 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 + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU C compiler? +with_gcc=$GCC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# 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 + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# 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 and install a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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 + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct + +# 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 + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path" + +# 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 + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_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 + +# ### END LIBTOOL CONFIG + +__EOF__ + + + case $host_os in + aix3*) + cat <<\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 +EOF + ;; + esac + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + +# Check whether --with-tags or --without-tags was given. +if test "${with_tags+set}" = set; then + withval="$with_tags" + tagnames="$withval" +fi; + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} + else + { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 +echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} + fi + fi + if test -z "$LTCFLAGS"; then + eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in + "") ;; + *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 +echo "$as_me: error: invalid tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 +echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} + { (exit 1); exit 1; }; } + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + + +archive_cmds_need_lc_CXX=no +allow_undefined_flag_CXX= +always_export_symbols_CXX=no +archive_expsym_cmds_CXX= +export_dynamic_flag_spec_CXX= +hardcode_direct_CXX=no +hardcode_libdir_flag_spec_CXX= +hardcode_libdir_flag_spec_ld_CXX= +hardcode_libdir_separator_CXX= +hardcode_minus_L_CXX=no +hardcode_shlibpath_var_CXX=unsupported +hardcode_automatic_CXX=no +module_cmds_CXX= +module_expsym_cmds_CXX= +link_all_deplibs_CXX=unknown +old_archive_cmds_CXX=$old_archive_cmds +no_undefined_flag_CXX= +whole_archive_flag_spec_CXX= +enable_shared_with_static_runtimes_CXX=no + +# Dependencies to place before and after the object being linked: +predep_objects_CXX= +postdep_objects_CXX= +predeps_CXX= +postdeps_CXX= +compiler_lib_search_path_CXX= + +# Source file extension for C++ test sources. +ac_ext=cpp + +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# 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 warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$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 +printf "$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 conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +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++"} +compiler=$CC +compiler_CXX=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' +else + lt_prog_compiler_no_builtin_flag_CXX= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + +# Check whether --with-gnu-ld or --without-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. + echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&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 + echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 +else + echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 </dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break + ;; + *) + test "$with_gnu_ld" != yes && break + ;; + esac + fi + done + IFS="$lt_save_ifs" +else + lt_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi + +LD="$lt_cv_path_LD" +if test -n "$LD"; then + echo "$as_me:$LINENO: result: $LD" >&5 +echo "${ECHO_T}$LD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU lds only accept -v. +case `$LD -v 2>&1 </dev/null` in +*GNU* | *'with BFD'*) + lt_cv_prog_gnu_ld=yes + ;; +*) + lt_cv_prog_gnu_ld=no + ;; +esac +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # 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 + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + 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. + archive_cmds_CXX='$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 "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 +ld_shlibs_CXX=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + 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 + 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].*|aix5*) + 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. + + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + + 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 + hardcode_direct_CXX=yes + else + # We have old collect2 + hardcode_direct_CXX=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_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= + 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 + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_CXX=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_CXX='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + + archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_CXX="-z nodefs" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_CXX=' ${wl}-bernotok' + allow_undefined_flag_CXX=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + archive_cmds_need_lc_CXX=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_CXX=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_CXX=no + fi + ;; + + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_CXX=no + fi + ;; + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + whole_archive_flag_spec_CXX='' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes ; then + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_CXX=no + ;; + esac + fi + ;; + + dgux*) + case $cc_basename in + ec++*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx*) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + freebsd[12]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + ld_shlibs_CXX=no + ;; + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; + gnu*) + ;; + hpux9*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC*) + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # 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; echo $list' + ;; + *) + if test "$GXX" = yes; then + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_CXX='+b $libdir' + ;; + *) + export_dynamic_flag_spec_CXX='${wl}-E' + ;; + esac + fi + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + *) + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=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 + ld_shlibs_CXX=no + ;; + aCC*) + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+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; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case $host_cpu in + hppa*64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + ia64*) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${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 + ld_shlibs_CXX=no + fi + ;; + esac + ;; + interix3*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}-E' + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. + # Instead, shared libraries are loaded at an image base (0x10000000 by + # default) and relocated if they conflict, which is a slow very memory + # consuming and fragmenting process. To avoid this, we pick a random, + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link + # time. Moving up from 0x10000000 also allows more sbrk(2) space. + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + ;; + irix5* | irix6*) + case $cc_basename in + CC*) + # SGI C++ + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -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. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + ;; + linux*) + 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. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # 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; echo $list' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc*) + # 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."*) + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + *) # Version 8.0 or newer + tmp_idyn= + case $host_cpu in + ia64*) tmp_idyn=' -i_dynamic';; + esac + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + ;; + esac + archive_cmds_need_lc_CXX=no + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + pgCC*) + # Portland Group C++ compiler + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + ;; + cxx*) + # Compaq C++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # 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=`echo $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; echo $list' + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + mvs*) + case $cc_basename in + cxx*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=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::"' + ;; + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + openbsd*) + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='${wl}-E' + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + ;; + osf3*) + 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. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # 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=`echo $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; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # 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 "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + 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. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' + ;; + RCC*) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx*) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ + $rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # 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=`echo $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; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # 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 "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc*) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + archive_cmds_need_lc_CXX=yes + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The C++ compiler is used as linker so we must use $wl + # flag to pass the commands to the underlying system + # linker. We must also pass each convience library through + # to the system linker between allextract/defaultextract. + # The C++ compiler will combine linker options so we + # cannot just pass the convience library names through + # without $wl. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' + ;; + esac + link_all_deplibs_CXX=yes + + output_verbose_link_cmd='echo' + + # 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. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx*) + # Green Hills C++ Compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -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 \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # 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 \"\-L\"" + fi + + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + fi + ;; + esac + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + no_undefined_flag_CXX='${wl}-z,text' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + sysv5* | sco3.2v5* | sco5v6*) + # Note: We can NOT use -z defs as we might desire, because we do not + # 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. + # 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. + # So that behaviour is only enabled if SCOABSPATH is set to a + # non-empty value in the environment. Most likely only useful for + # creating official distributions of packages. + # This is a hack until libtool officially supports absolute path + # names for shared libraries. + no_undefined_flag_CXX='${wl}-z,text' + allow_undefined_flag_CXX='${wl}-z,nodefs' + archive_cmds_need_lc_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + export_dynamic_flag_spec_CXX='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + case $cc_basename in + CC*) + archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$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 + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; +esac +echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6 +test "$ld_shlibs_CXX" = no && can_build_shared=no + +GCC_CXX="$GXX" +LD_CXX="$LD" + + +cat > conftest.$ac_ext <<EOF +class Foo +{ +public: + Foo (void) { a = 0; } +private: + int a; +}; +EOF + +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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 + + # The `*' in the case matches for architectures that use `case' in + # $output_verbose_cmd can trigger glob expansion during the loop + # eval without this substitution. + output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` + + for p in `eval $output_verbose_link_cmd`; do + case $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 + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX="${prev}${p}" + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${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 "$postdeps_CXX"; then + postdeps_CXX="${prev}${p}" + else + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi + ;; + + *.$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 "$predep_objects_CXX"; then + predep_objects_CXX="$p" + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX="$p" + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling CXX test program" +fi + +$rm -f confest.$objext + +# PORTME: override above test on systems where it is broken +case $host_os in +interix3*) + # Interix 3.5 installs completely hosed .la files for C++, so rather than + # hack all around it, let's just trust "g++" to DTRT. + predep_objects_CXX= + postdep_objects_CXX= + postdeps_CXX= + ;; + +solaris*) + case $cc_basename in + CC*) + # 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. + postdeps_CXX='-lCstd -lCrun' + ;; + esac + ;; +esac + + +case " $postdeps_CXX " in +*" -lc "*) archive_cmds_need_lc_CXX=no ;; +esac + +lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= + +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + fi + ;; + amigaos*) + # 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_CXX='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | os2* | pw32*) + # 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_CXX='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; + interix3*) + # 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_prog_compiler_pic_CXX=-Kconform_pic + fi + ;; + hpux*) + # 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*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68*) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--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 + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_CXX='-qnocommon' + lt_prog_compiler_wl_CXX='-Wl,' + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++*) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | kfreebsd*-gnu | dragonfly*) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + if test "$host_cpu" != ia64; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + case $host_cpu in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+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_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux*) + case $cc_basename in + KCC*) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + icpc* | ecpc*) + # Intel C++ + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + pgCC*) + # Portland Group C++ compiler. + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-fpic' + lt_prog_compiler_static_CXX='-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_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx*) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC*) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC*) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx*) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + solaris*) + case $cc_basename in + CC*) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx*) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC*) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc*) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC*) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + case $cc_basename in + CC*) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + esac + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6 + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -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:12445: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:12449: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_CXX=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 + +if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac +else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" +echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_CXX=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$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 "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_CXX=yes + fi + else + lt_prog_compiler_static_works_CXX=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6 + +if test x"$lt_prog_compiler_static_works_CXX" = xyes; then + : +else + lt_prog_compiler_static_CXX= +fi + + +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$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:12549: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:12553: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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_CXX=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 .. + rmdir conftest + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6 + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +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 + +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # 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 + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" + ;; + cygwin* | mingw*) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + +echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6 +test "$ld_shlibs_CXX" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_CXX=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_CXX 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. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_CXX=no + else + archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6 + ;; + esac + fi + ;; +esac + +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +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" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # 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. + 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 +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +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 + 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' + ;; + +aix4* | aix5*) + version_type=linux + 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<name>.so + # instead of lib<name>.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # 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*) + 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=`$echo "X$lib" | $Xsed -e '\''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' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + 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*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + 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' + 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="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + 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 + ;; + 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 + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # 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}${versuffix}$shared_ext ${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`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + 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 + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-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='GNU ld.so' + ;; + +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[123]*) 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 + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + 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' + ;; + +interix3*) + 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' + 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 + 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 Linux ELF. +linux*) + 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' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;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' + ;; + +knetbsd*-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='GNU ld.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 + 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=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=yes + ;; + +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" + ;; + +solaris*) + 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=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 + 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 + export_dynamic_flag_spec='${wl}-Blargedynsym' + 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 + 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 + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$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 + +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || \ + test -n "$runpath_var_CXX" || \ + test "X$hardcode_automatic_CXX" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_CXX" != 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_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported +fi +echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 +echo "${ECHO_T}$hardcode_action_CXX" >&6 + +if test "$hardcode_action_CXX" = relink; 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 + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_CXX \ + CC_CXX \ + LD_CXX \ + lt_prog_compiler_wl_CXX \ + lt_prog_compiler_pic_CXX \ + lt_prog_compiler_static_CXX \ + lt_prog_compiler_no_builtin_flag_CXX \ + export_dynamic_flag_spec_CXX \ + thread_safe_flag_spec_CXX \ + whole_archive_flag_spec_CXX \ + enable_shared_with_static_runtimes_CXX \ + old_archive_cmds_CXX \ + old_archive_from_new_cmds_CXX \ + predep_objects_CXX \ + postdep_objects_CXX \ + predeps_CXX \ + postdeps_CXX \ + compiler_lib_search_path_CXX \ + archive_cmds_CXX \ + archive_expsym_cmds_CXX \ + postinstall_cmds_CXX \ + postuninstall_cmds_CXX \ + old_archive_from_expsyms_cmds_CXX \ + allow_undefined_flag_CXX \ + no_undefined_flag_CXX \ + export_symbols_cmds_CXX \ + hardcode_libdir_flag_spec_CXX \ + hardcode_libdir_flag_spec_ld_CXX \ + hardcode_libdir_separator_CXX \ + hardcode_automatic_CXX \ + module_cmds_CXX \ + module_expsym_cmds_CXX \ + lt_cv_prog_compiler_c_o_CXX \ + exclude_expsyms_CXX \ + include_expsyms_CXX; do + + case $var in + old_archive_cmds_CXX | \ + old_archive_from_new_cmds_CXX | \ + archive_cmds_CXX | \ + archive_expsym_cmds_CXX | \ + module_cmds_CXX | \ + module_expsym_cmds_CXX | \ + old_archive_from_expsyms_cmds_CXX | \ + export_symbols_cmds_CXX | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# 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 + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_CXX + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_CXX +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_CXX + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_CXX + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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_CXX + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_CXX + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + +# 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_CXX + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_CXX" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +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 + + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + + +archive_cmds_need_lc_F77=no +allow_undefined_flag_F77= +always_export_symbols_F77=no +archive_expsym_cmds_F77= +export_dynamic_flag_spec_F77= +hardcode_direct_F77=no +hardcode_libdir_flag_spec_F77= +hardcode_libdir_flag_spec_ld_F77= +hardcode_libdir_separator_F77= +hardcode_minus_L_F77=no +hardcode_automatic_F77=no +module_cmds_F77= +module_expsym_cmds_F77= +link_all_deplibs_F77=unknown +old_archive_cmds_F77=$old_archive_cmds +no_undefined_flag_F77= +whole_archive_flag_spec_F77= +enable_shared_with_static_runtimes_F77=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +objext_F77=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code=" subroutine t\n return\n end\n" + +# Code to be used in simple link tests +lt_simple_link_test_code=" program t\n end\n" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# 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 warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$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 +printf "$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 conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${F77-"f77"} +compiler=$CC +compiler_F77=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6 + +echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&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 + ;; +aix4* | aix5*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; +esac +echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6 + +echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6 + +GCC_F77="$G77" +LD_F77="$LD" + +lt_prog_compiler_wl_F77= +lt_prog_compiler_pic_F77= +lt_prog_compiler_static_F77= + +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + + if test "$GCC" = yes; then + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_static_F77='-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_F77='-Bstatic' + fi + ;; + + amigaos*) + # 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_F77='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # 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_F77='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_F77='-fno-common' + ;; + + interix3*) + # 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_F77=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_F77=-Kconform_pic + fi + ;; + + hpux*) + # 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_F77='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_F77='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + else + lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_F77='-qnocommon' + lt_prog_compiler_wl_F77='-Wl,' + ;; + esac + ;; + + mingw* | pw32* | os2*) + # 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_F77='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_F77='-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_F77='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_F77='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_F77='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + linux*) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-fpic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_F77='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_F77='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_F77='-Qoption ld ';; + *) + lt_prog_compiler_wl_F77='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_F77='-Qoption ld ' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_F77='-Kconform_pic' + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_can_build_shared_F77=no + ;; + + uts4*) + lt_prog_compiler_pic_F77='-pic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_F77=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_F77"; then + +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_F77=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_F77" + # 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:14119: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:14123: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_F77=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 + +if test x"$lt_prog_compiler_pic_works_F77" = xyes; then + case $lt_prog_compiler_pic_F77 in + "" | " "*) ;; + *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; + esac +else + lt_prog_compiler_pic_F77= + lt_prog_compiler_can_build_shared_F77=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_F77= + ;; + *) + lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" +echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_F77=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$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 "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_F77=yes + fi + else + lt_prog_compiler_static_works_F77=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6 + +if test x"$lt_prog_compiler_static_works_F77" = xyes; then + : +else + lt_prog_compiler_static_F77= +fi + + +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_F77=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$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:14223: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:14227: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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_F77=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 .. + rmdir conftest + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +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 + +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + + runpath_var= + allow_undefined_flag_F77= + enable_shared_with_static_runtimes_F77=no + archive_cmds_F77= + archive_expsym_cmds_F77= + old_archive_From_new_cmds_F77= + old_archive_from_expsyms_cmds_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + thread_safe_flag_spec_F77= + hardcode_libdir_flag_spec_F77= + hardcode_libdir_flag_spec_ld_F77= + hardcode_libdir_separator_F77= + hardcode_direct_F77=no + hardcode_minus_L_F77=no + hardcode_shlibpath_var_F77=unsupported + link_all_deplibs_F77=unknown + hardcode_automatic_F77=no + module_cmds_F77= + module_expsym_cmds_F77= + always_export_symbols_F77=no + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_F77= + # 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_F77="_GLOBAL_OFFSET_TABLE_" + # 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. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + 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 + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs_F77=yes + if test "$with_gnu_ld" = 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_F77='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_F77='${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_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_F77= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [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 + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_F77=no + cat <<EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, 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 modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds_F77='$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_F77='-L$libdir' + hardcode_minus_L_F77=yes + + # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> 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't use + # them. + ld_shlibs_F77=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_F77=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_F77='-L$libdir' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=no + enable_shared_with_static_runtimes_F77=yes + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_F77='$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_F77='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_F77=no + fi + ;; + + interix3*) + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${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_F77='$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_F77='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' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$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' ;; + esac + archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + ld_shlibs_F77=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $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_F77=no + cat <<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. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_F77=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 + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + + if test "$ld_shlibs_F77" = no; then + runpath_var= + hardcode_libdir_flag_spec_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + archive_expsym_cmds_F77='$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_F77=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_F77=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 + 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 + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_F77='$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].*|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 + + 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_F77='' + hardcode_direct_F77=yes + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + + 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 + hardcode_direct_F77=yes + else + # We have old collect2 + hardcode_direct_F77=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_F77=yes + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_libdir_separator_F77= + 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 + + # 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_F77=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_F77='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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_F77='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_F77="-z nodefs" + archive_expsym_cmds_F77="\$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. + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${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_F77=' ${wl}-bernotok' + allow_undefined_flag_F77=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_F77='$convenience' + archive_cmds_need_lc_F77=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_F77="\$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*) + archive_cmds_F77='$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_F77='-L$libdir' + hardcode_minus_L_F77=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_F77=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec_F77=-rdynamic + ;; + + 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_F77=' ' + allow_undefined_flag_F77=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_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_F77='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_F77=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_F77=no + hardcode_direct_F77=no + hardcode_automatic_F77=yes + hardcode_shlibpath_var_F77=unsupported + whole_archive_flag_spec_F77='' + link_all_deplibs_F77=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_F77=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + freebsd1*) + ld_shlibs_F77=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_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu | dragonfly*) + archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_F77='$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_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$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_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$CC -shared -fPIC ${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_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$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 + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_F77='+b $libdir' + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + ;; + *) + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + link_all_deplibs_F77=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + newsos6) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_shlibpath_var_F77=no + ;; + + openbsd*) + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + ;; + *) + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + allow_undefined_flag_F77=unsupported + archive_cmds_F77='$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_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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_F77='-rpath $libdir' + fi + hardcode_libdir_separator_F77=: + ;; + + solaris*) + no_undefined_flag_F77=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_F77='$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' + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_shlibpath_var_F77=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; + esac + link_all_deplibs_F77=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_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_F77='$CC -r -o $output$reload_objs' + hardcode_direct_F77=no + ;; + motorola) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_F77=no + ;; + + sysv4.3*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + export_dynamic_flag_spec_F77='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_F77=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag_F77='${wl}-z,text' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$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_F77='${wl}-z,text' + allow_undefined_flag_F77='${wl}-z,nodefs' + archive_cmds_need_lc_F77=no + hardcode_shlibpath_var_F77=no + hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + export_dynamic_flag_spec_F77='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + *) + ld_shlibs_F77=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 +echo "${ECHO_T}$ld_shlibs_F77" >&6 +test "$ld_shlibs_F77" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_F77" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_F77=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_F77 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. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_F77 + pic_flag=$lt_prog_compiler_pic_F77 + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_F77 + allow_undefined_flag_F77= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_F77=no + else + archive_cmds_need_lc_F77=yes + fi + allow_undefined_flag_F77=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 + ;; + esac + fi + ;; +esac + +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +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" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # 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. + 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 +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +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 + 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' + ;; + +aix4* | aix5*) + version_type=linux + 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<name>.so + # instead of lib<name>.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # 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*) + 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=`$echo "X$lib" | $Xsed -e '\''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' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + 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*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + 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' + 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="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + 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 + ;; + 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 + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # 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}${versuffix}$shared_ext ${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`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + 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 + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-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='GNU ld.so' + ;; + +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[123]*) 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 + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + 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' + ;; + +interix3*) + 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' + 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 + 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 Linux ELF. +linux*) + 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' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;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' + ;; + +knetbsd*-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='GNU ld.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 + 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=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=yes + ;; + +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" + ;; + +solaris*) + 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=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 + 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 + export_dynamic_flag_spec='${wl}-Blargedynsym' + 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 + 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 + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$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 + +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action_F77= +if test -n "$hardcode_libdir_flag_spec_F77" || \ + test -n "$runpath_var_F77" || \ + test "X$hardcode_automatic_F77" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_F77" != 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_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && + test "$hardcode_minus_L_F77" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_F77=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_F77=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_F77=unsupported +fi +echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 +echo "${ECHO_T}$hardcode_action_F77" >&6 + +if test "$hardcode_action_F77" = relink; 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 + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_F77 \ + CC_F77 \ + LD_F77 \ + lt_prog_compiler_wl_F77 \ + lt_prog_compiler_pic_F77 \ + lt_prog_compiler_static_F77 \ + lt_prog_compiler_no_builtin_flag_F77 \ + export_dynamic_flag_spec_F77 \ + thread_safe_flag_spec_F77 \ + whole_archive_flag_spec_F77 \ + enable_shared_with_static_runtimes_F77 \ + old_archive_cmds_F77 \ + old_archive_from_new_cmds_F77 \ + predep_objects_F77 \ + postdep_objects_F77 \ + predeps_F77 \ + postdeps_F77 \ + compiler_lib_search_path_F77 \ + archive_cmds_F77 \ + archive_expsym_cmds_F77 \ + postinstall_cmds_F77 \ + postuninstall_cmds_F77 \ + old_archive_from_expsyms_cmds_F77 \ + allow_undefined_flag_F77 \ + no_undefined_flag_F77 \ + export_symbols_cmds_F77 \ + hardcode_libdir_flag_spec_F77 \ + hardcode_libdir_flag_spec_ld_F77 \ + hardcode_libdir_separator_F77 \ + hardcode_automatic_F77 \ + module_cmds_F77 \ + module_expsym_cmds_F77 \ + lt_cv_prog_compiler_c_o_F77 \ + exclude_expsyms_F77 \ + include_expsyms_F77; do + + case $var in + old_archive_cmds_F77 | \ + old_archive_from_new_cmds_F77 | \ + archive_cmds_F77 | \ + archive_expsym_cmds_F77 | \ + module_cmds_F77 | \ + module_expsym_cmds_F77 | \ + old_archive_from_expsyms_cmds_F77 | \ + export_symbols_cmds_F77 | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_F77 + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# 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 + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_F77 + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_F77 + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_F77 + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_F77 + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_F77 +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_F77 + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_F77 +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_F77 +archive_expsym_cmds=$lt_archive_expsym_cmds_F77 +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_F77 +module_expsym_cmds=$lt_module_expsym_cmds_F77 + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_F77 + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_F77 + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_F77 + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_F77 + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_F77 + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_F77 + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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_F77 + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_F77 + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_F77 + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 + +# 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_F77 + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_F77 + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_F77" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_F77 + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_F77 + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_F77 + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_F77 + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + + + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +objext_GCJ=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# 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 warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$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 +printf "$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 conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${GCJ-"gcj"} +compiler=$CC +compiler_GCJ=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +archive_cmds_need_lc_GCJ=no + +old_archive_cmds_GCJ=$old_archive_cmds + + +lt_prog_compiler_no_builtin_flag_GCJ= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' + + +echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + printf "$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:16426: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:16430: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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 +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" +else + : +fi + +fi + +lt_prog_compiler_wl_GCJ= +lt_prog_compiler_pic_GCJ= +lt_prog_compiler_static_GCJ= + +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + + if test "$GCC" = yes; then + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_static_GCJ='-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_GCJ='-Bstatic' + fi + ;; + + amigaos*) + # 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_GCJ='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # 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_GCJ='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_GCJ='-fno-common' + ;; + + interix3*) + # 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_GCJ=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_GCJ=-Kconform_pic + fi + ;; + + hpux*) + # 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_GCJ='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_GCJ='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_GCJ='-Bstatic' + else + lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' + fi + ;; + darwin*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + case $cc_basename in + xlc*) + lt_prog_compiler_pic_GCJ='-qnocommon' + lt_prog_compiler_wl_GCJ='-Wl,' + ;; + esac + ;; + + mingw* | pw32* | os2*) + # 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_GCJ='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_GCJ='-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_GCJ='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_GCJ='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + linux*) + case $cc_basename in + icc* | ecc*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-static' + ;; + pgcc* | pgf77* | pgf90* | pgf95*) + # Portland Group compilers (*not* the Pentium gcc compiler, + # which looks to be a dead project) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-fpic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + ccc*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + solaris*) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + case $cc_basename in + f77* | f90* | f95*) + lt_prog_compiler_wl_GCJ='-Qoption ld ';; + *) + lt_prog_compiler_wl_GCJ='-Wl,';; + esac + ;; + + sunos4*) + lt_prog_compiler_wl_GCJ='-Qoption ld ' + lt_prog_compiler_pic_GCJ='-PIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_GCJ='-Kconform_pic' + lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; + + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + unicos*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_can_build_shared_GCJ=no + ;; + + uts4*) + lt_prog_compiler_pic_GCJ='-pic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_GCJ=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6 + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_GCJ"; then + +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_GCJ=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_GCJ" + # 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:16694: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:16698: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_pic_works_GCJ=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 + +if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then + case $lt_prog_compiler_pic_GCJ in + "" | " "*) ;; + *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; + esac +else + lt_prog_compiler_pic_GCJ= + lt_prog_compiler_can_build_shared_GCJ=no +fi + +fi +case $host_os in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_GCJ= + ;; + *) + lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" + ;; +esac + +# +# Check to make sure the static flag actually works. +# +wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" +echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works_GCJ=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_tmp_static_flag" + printf "$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 "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_prog_compiler_static_works_GCJ=yes + fi + else + lt_prog_compiler_static_works_GCJ=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6 + +if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then + : +else + lt_prog_compiler_static_GCJ= +fi + + +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_GCJ=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$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:16798: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:16802: \$? = $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 "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/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_GCJ=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 .. + rmdir conftest + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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 + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +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 + +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + + runpath_var= + allow_undefined_flag_GCJ= + enable_shared_with_static_runtimes_GCJ=no + archive_cmds_GCJ= + archive_expsym_cmds_GCJ= + old_archive_From_new_cmds_GCJ= + old_archive_from_expsyms_cmds_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + thread_safe_flag_spec_GCJ= + hardcode_libdir_flag_spec_GCJ= + hardcode_libdir_flag_spec_ld_GCJ= + hardcode_libdir_separator_GCJ= + hardcode_direct_GCJ=no + hardcode_minus_L_GCJ=no + hardcode_shlibpath_var_GCJ=unsupported + link_all_deplibs_GCJ=unknown + hardcode_automatic_GCJ=no + module_cmds_GCJ= + module_expsym_cmds_GCJ= + always_export_symbols_GCJ=no + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_GCJ= + # 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_GCJ="_GLOBAL_OFFSET_TABLE_" + # 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. + extract_expsyms_cmds= + # Just being paranoid about ensuring that cc_basename is set. + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + + 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 + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs_GCJ=yes + if test "$with_gnu_ld" = 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_GCJ='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_GCJ='${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_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_GCJ= + fi + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [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 + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_GCJ=no + cat <<EOF 1>&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, 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 modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds_GCJ='$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_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + + # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> 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't use + # them. + ld_shlibs_GCJ=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_GCJ=unsupported + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_GCJ='-L$libdir' + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=no + enable_shared_with_static_runtimes_GCJ=yes + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_GCJ='$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_GCJ='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_GCJ=no + fi + ;; + + interix3*) + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${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_GCJ='$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_GCJ='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' + ;; + + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + tmp_addflag= + case $cc_basename,$host_cpu in + pgcc*) # Portland Group C compiler + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_addflag=' $pic_flag' + ;; + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers + whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$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' ;; + esac + archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + $echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + fi + else + ld_shlibs_GCJ=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $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_GCJ=no + cat <<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. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs_GCJ=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 + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + ;; + + sunos4*) + archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + + if test "$ld_shlibs_GCJ" = no; then + runpath_var= + hardcode_libdir_flag_spec_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=yes + archive_expsym_cmds_GCJ='$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_GCJ=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_GCJ=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 + 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 + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_GCJ='$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].*|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 + + 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_GCJ='' + hardcode_direct_GCJ=yes + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + + 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 + hardcode_direct_GCJ=yes + else + # We have old collect2 + hardcode_direct_GCJ=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_GCJ=yes + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_libdir_separator_GCJ= + 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 + + # 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_GCJ=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_GCJ='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${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_GCJ='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_GCJ="-z nodefs" + archive_expsym_cmds_GCJ="\$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. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${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_GCJ=' ${wl}-bernotok' + allow_undefined_flag_GCJ=' ${wl}-berok' + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_GCJ='$convenience' + archive_cmds_need_lc_GCJ=yes + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds_GCJ="\$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*) + archive_cmds_GCJ='$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_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_GCJ=no + ;; + + bsdi[45]*) + export_dynamic_flag_spec_GCJ=-rdynamic + ;; + + 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_GCJ=' ' + allow_undefined_flag_GCJ=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_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_GCJ='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_GCJ=yes + ;; + + darwin* | rhapsody*) + case $host_os in + rhapsody* | darwin1.[012]) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' + ;; + 10.*) + allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' + ;; + esac + fi + ;; + esac + archive_cmds_need_lc_GCJ=no + hardcode_direct_GCJ=no + hardcode_automatic_GCJ=yes + hardcode_shlibpath_var_GCJ=unsupported + whole_archive_flag_spec_GCJ='' + link_all_deplibs_GCJ=yes + if test "$GCC" = yes ; then + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + case $cc_basename in + xlc*) + output_verbose_link_cmd='echo' + archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + ;; + *) + ld_shlibs_GCJ=no + ;; + esac + fi + ;; + + dgux*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + freebsd1*) + ld_shlibs_GCJ=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_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu | dragonfly*) + archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_GCJ='$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_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_direct_GCJ=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + ;; + + hpux10*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$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_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + fi + ;; + + hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case $host_cpu in + hppa*64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$CC -shared -fPIC ${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_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + ia64*) + archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$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 + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + + case $host_cpu in + hppa*64*|ia64*) + hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + ;; + *) + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + link_all_deplibs_GCJ=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + newsos6) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_shlibpath_var_GCJ=no + ;; + + openbsd*) + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + ;; + *) + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + allow_undefined_flag_GCJ=unsupported + archive_cmds_GCJ='$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_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_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_GCJ='-rpath $libdir' + fi + hardcode_libdir_separator_GCJ=: + ;; + + solaris*) + no_undefined_flag_GCJ=' -z text' + if test "$GCC" = yes; then + wlarc='${wl}' + archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + wlarc='' + archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_GCJ='$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' + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_shlibpath_var_GCJ=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The compiler driver will combine linker options so we + # cannot just pass the convience library names through + # without $wl, iff we do not link with $LD. + # Luckily, gcc supports the same syntax we need for Sun Studio. + # Supported since Solaris 2.6 (maybe 2.5.1?) + case $wlarc in + '') + whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; + *) + whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; + esac ;; + esac + link_all_deplibs_GCJ=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_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_GCJ='$CC -r -o $output$reload_objs' + hardcode_direct_GCJ=no + ;; + motorola) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4.3*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + export_dynamic_flag_spec_GCJ='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_GCJ=yes + fi + ;; + + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) + no_undefined_flag_GCJ='${wl}-z,text' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$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_GCJ='${wl}-z,text' + allow_undefined_flag_GCJ='${wl}-z,nodefs' + archive_cmds_need_lc_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-Bexport' + runpath_var='LD_RUN_PATH' + + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + ;; + + uts4*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + *) + ld_shlibs_GCJ=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 +echo "${ECHO_T}$ld_shlibs_GCJ" >&6 +test "$ld_shlibs_GCJ" = no && can_build_shared=no + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_GCJ" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_GCJ=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_GCJ 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. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_GCJ + pic_flag=$lt_prog_compiler_pic_GCJ + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ + allow_undefined_flag_GCJ= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_GCJ=no + else + archive_cmds_need_lc_GCJ=yes + fi + allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6 + ;; + esac + fi + ;; +esac + +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +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" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # 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. + 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 +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +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 + 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' + ;; + +aix4* | aix5*) + version_type=linux + 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<name>.so + # instead of lib<name>.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # 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*) + 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=`$echo "X$lib" | $Xsed -e '\''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' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi[45]*) + version_type=linux + 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*) + version_type=windows + shrext_cmds=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + 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' + 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="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + 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 + ;; + 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 + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # 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}${versuffix}$shared_ext ${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`' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + 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 + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-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='GNU ld.so' + ;; + +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[123]*) 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 + ;; + freebsd*) # from 4.6 on + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + 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' + ;; + +interix3*) + 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' + 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 + 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 Linux ELF. +linux*) + 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' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # 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)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;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' + ;; + +knetbsd*-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='GNU ld.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 + 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=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=yes + ;; + +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" + ;; + +solaris*) + 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=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 + 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 + export_dynamic_flag_spec='${wl}-Blargedynsym' + 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 + 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 + 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' + shlibpath_overrides_runpath=no + else + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' + shlibpath_overrides_runpath=yes + 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' + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$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 + +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action_GCJ= +if test -n "$hardcode_libdir_flag_spec_GCJ" || \ + test -n "$runpath_var_GCJ" || \ + test "X$hardcode_automatic_GCJ" = "Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_GCJ" != 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_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && + test "$hardcode_minus_L_GCJ" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_GCJ=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_GCJ=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_GCJ=unsupported +fi +echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 +echo "${ECHO_T}$hardcode_action_GCJ" >&6 + +if test "$hardcode_action_GCJ" = relink; 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 + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_GCJ \ + CC_GCJ \ + LD_GCJ \ + lt_prog_compiler_wl_GCJ \ + lt_prog_compiler_pic_GCJ \ + lt_prog_compiler_static_GCJ \ + lt_prog_compiler_no_builtin_flag_GCJ \ + export_dynamic_flag_spec_GCJ \ + thread_safe_flag_spec_GCJ \ + whole_archive_flag_spec_GCJ \ + enable_shared_with_static_runtimes_GCJ \ + old_archive_cmds_GCJ \ + old_archive_from_new_cmds_GCJ \ + predep_objects_GCJ \ + postdep_objects_GCJ \ + predeps_GCJ \ + postdeps_GCJ \ + compiler_lib_search_path_GCJ \ + archive_cmds_GCJ \ + archive_expsym_cmds_GCJ \ + postinstall_cmds_GCJ \ + postuninstall_cmds_GCJ \ + old_archive_from_expsyms_cmds_GCJ \ + allow_undefined_flag_GCJ \ + no_undefined_flag_GCJ \ + export_symbols_cmds_GCJ \ + hardcode_libdir_flag_spec_GCJ \ + hardcode_libdir_flag_spec_ld_GCJ \ + hardcode_libdir_separator_GCJ \ + hardcode_automatic_GCJ \ + module_cmds_GCJ \ + module_expsym_cmds_GCJ \ + lt_cv_prog_compiler_c_o_GCJ \ + exclude_expsyms_GCJ \ + include_expsyms_GCJ; do + + case $var in + old_archive_cmds_GCJ | \ + old_archive_from_new_cmds_GCJ | \ + archive_cmds_GCJ | \ + archive_expsym_cmds_GCJ | \ + module_cmds_GCJ | \ + module_expsym_cmds_GCJ | \ + old_archive_from_expsyms_cmds_GCJ | \ + export_symbols_cmds_GCJ | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_GCJ + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# 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 + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_GCJ + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_GCJ + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_GCJ + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_GCJ + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_GCJ +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_GCJ + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_GCJ +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_GCJ +archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_GCJ +module_expsym_cmds=$lt_module_expsym_cmds_GCJ + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_GCJ + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_GCJ + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_GCJ + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_GCJ + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_GCJ + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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_GCJ + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_GCJ + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_GCJ + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ + +# 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_GCJ + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_GCJ + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_GCJ" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_GCJ + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_GCJ + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_GCJ + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_GCJ + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + RC) + + + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +objext_RC=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' + +# 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. + +# 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 warnings/boilerplate of simple test code +ac_outfile=conftest.$ac_objext +printf "$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 +printf "$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 conftest* + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${RC-"windres"} +compiler=$CC +compiler_RC=$CC +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` + +lt_cv_prog_compiler_c_o_RC=yes + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # 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 + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_RC \ + CC_RC \ + LD_RC \ + lt_prog_compiler_wl_RC \ + lt_prog_compiler_pic_RC \ + lt_prog_compiler_static_RC \ + lt_prog_compiler_no_builtin_flag_RC \ + export_dynamic_flag_spec_RC \ + thread_safe_flag_spec_RC \ + whole_archive_flag_spec_RC \ + enable_shared_with_static_runtimes_RC \ + old_archive_cmds_RC \ + old_archive_from_new_cmds_RC \ + predep_objects_RC \ + postdep_objects_RC \ + predeps_RC \ + postdeps_RC \ + compiler_lib_search_path_RC \ + archive_cmds_RC \ + archive_expsym_cmds_RC \ + postinstall_cmds_RC \ + postuninstall_cmds_RC \ + old_archive_from_expsyms_cmds_RC \ + allow_undefined_flag_RC \ + no_undefined_flag_RC \ + export_symbols_cmds_RC \ + hardcode_libdir_flag_spec_RC \ + hardcode_libdir_flag_spec_ld_RC \ + hardcode_libdir_separator_RC \ + hardcode_automatic_RC \ + module_cmds_RC \ + module_expsym_cmds_RC \ + lt_cv_prog_compiler_c_o_RC \ + exclude_expsyms_RC \ + include_expsyms_RC; do + + case $var in + old_archive_cmds_RC | \ + old_archive_from_new_cmds_RC | \ + archive_cmds_RC | \ + archive_expsym_cmds_RC | \ + module_cmds_RC | \ + module_expsym_cmds_RC | \ + old_archive_from_expsyms_cmds_RC | \ + export_symbols_cmds_RC | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_RC + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# 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 + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# LTCC compiler flags. +LTCFLAGS=$lt_LTCFLAGS + +# A language-specific compiler. +CC=$lt_compiler_RC + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_RC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_RC + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_RC + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext_cmds='$shrext_cmds' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_RC +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC + +# Must we lock files when doing compilation? +need_locks=$lt_need_locks + +# 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 + +# 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 + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_RC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC + +# Library versioning type. +version_type=$version_type + +# 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 + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_RC +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_RC +archive_expsym_cmds=$lt_archive_expsym_cmds_RC +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_RC +module_expsym_cmds=$lt_module_expsym_cmds_RC + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_RC + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_RC + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_RC + +# 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 + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_RC + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_RC + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# 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 + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_RC + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# 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_RC + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_RC + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_RC + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_RC + +# 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_RC + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_RC + +# 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 + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_RC" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_RC + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_RC + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_RC + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_RC + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + ;; + + *) + { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 +echo "$as_me: error: Unsupported tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 +echo "$as_me: error: unable to update list of available tagged configurations." >&2;} + { (exit 1); exit 1; }; } + fi +fi + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + +# Prevent multiple expansion + + + + + + + + + + + + + + + + + + + + +test ".$PACKAGE_VERSION" = "." && PACKAGE_VERSION="$VERSION" +echo "$as_me:$LINENO: checking out linker version info $PACKAGE_VERSION " >&5 +echo $ECHO_N "checking out linker version info $PACKAGE_VERSION ... $ECHO_C" >&6 + MINOR_VERSION=`echo $PACKAGE_VERSION` + MAJOR_VERSION=`echo "$MINOR_VERSION" | sed -e 's/[.].*//'` + MINOR_VERSION=`echo "$MINOR_VERSION" | sed -e "s/^$MAJOR_VERSION//" -e 's/^.//'` + MICRO_VERSION="$MINOR_VERSION" + MINOR_VERSION=`echo "$MICRO_VERSION" | sed -e 's/[.].*//'` + MICRO_VERSION=`echo "$MICRO_VERSION" | sed -e "s/^$MINOR_VERSION//" -e 's/^.//'` + PATCH_VERSION="$MICRO_VERSION" + MICRO_VERSION=`echo "$PATCH_VERSION" | sed -e 's/[^0-9].*//'` + PATCH_VERSION=`echo "$PATCH_VERSION" | sed -e "s/^$MICRO_VERSION//" -e 's/[-.]//'` + if test "_$MICRO_VERSION" = "_" ; then MICRO_VERSION="0" ; fi + if test "_$MINOR_VERSION" = "_" ; then MINOR_VERSION="$MAJOR_VERSION" ; MAJOR_VERSION="0" ; fi + MINOR_VERSION=`echo "$MINOR_VERSION" | sed -e 's/[^0-9].*//'` + RELEASE_INFO="-release $MAJOR_VERSION" + VERSION_INFO="-version-info $MINOR_VERSION:$MICRO_VERSION" +echo "$as_me:$LINENO: result: /$MAJOR_VERSION/$MINOR_VERSION:$MICRO_VERSION (-$MAJOR_VERSION.so.$MINOR_VERSION.0.$MICRO_VERSION)" >&5 +echo "${ECHO_T}/$MAJOR_VERSION/$MINOR_VERSION:$MICRO_VERSION (-$MAJOR_VERSION.so.$MINOR_VERSION.0.$MICRO_VERSION)" >&6 + + + + +# ----------------------------------------------------------------------- +echo "$as_me:$LINENO: result: creating zzip/_msvc.in via zzip/_msvc.sed of config.h.in" >&5 +echo "${ECHO_T}creating zzip/_msvc.in via zzip/_msvc.sed of config.h.in" >&6 +test -d zzip || mkdir zzip +sed -f $srcdir/zzip/_msvc.sed $srcdir/config.h.in >zzip/_msvc.in + ac_config_headers="$ac_config_headers config.h" + + + ac_config_commands="$ac_config_commands zzip/_config.h" + + + ac_config_commands="$ac_config_commands zzip/_msvc.h" + +echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 + # Check whether --enable-maintainer-mode or --disable-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; + echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 +echo "${ECHO_T}$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 + + + + +# we need the expanded forms... +test "x$prefix" = xNONE && prefix=$ac_default_prefix +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +echo "$as_me:$LINENO: checking our pkgconfig libname" >&5 +echo $ECHO_N "checking our pkgconfig libname... $ECHO_C" >&6 +test ".$ax_create_pkgconfig_libname" != "." || \ +ax_create_pkgconfig_libname="`basename zzip/zziplib.pc .pc`" +test ".$ax_create_pkgconfig_libname" != "." || \ +ax_create_pkgconfig_libname="$PACKAGE" +ax_create_pkgconfig_libname=`eval echo "$ax_create_pkgconfig_libname"` +ax_create_pkgconfig_libname=`eval echo "$ax_create_pkgconfig_libname"` +echo "$as_me:$LINENO: result: $ax_create_pkgconfig_libname" >&5 +echo "${ECHO_T}$ax_create_pkgconfig_libname" >&6 + +echo "$as_me:$LINENO: checking our pkgconfig version" >&5 +echo $ECHO_N "checking our pkgconfig version... $ECHO_C" >&6 +test ".$ax_create_pkgconfig_version" != "." || \ +ax_create_pkgconfig_version="${PACKAGE_VERSION}" +test ".$ax_create_pkgconfig_version" != "." || \ +ax_create_pkgconfig_version="$VERSION" +ax_create_pkgconfig_version=`eval echo "$ax_create_pkgconfig_version"` +ax_create_pkgconfig_version=`eval echo "$ax_create_pkgconfig_version"` +echo "$as_me:$LINENO: result: $ax_create_pkgconfig_version" >&5 +echo "${ECHO_T}$ax_create_pkgconfig_version" >&6 + +echo "$as_me:$LINENO: checking our pkgconfig_libdir" >&5 +echo $ECHO_N "checking our pkgconfig_libdir... $ECHO_C" >&6 +test ".$pkgconfig_libdir" = "." && \ +pkgconfig_libdir='${libdir}/pkgconfig' +ax_create_pkgconfig_libdir=`eval echo "$pkgconfig_libdir"` +ax_create_pkgconfig_libdir=`eval echo "$ax_create_pkgconfig_libdir"` +ax_create_pkgconfig_libdir=`eval echo "$ax_create_pkgconfig_libdir"` +echo "$as_me:$LINENO: result: $pkgconfig_libdir" >&5 +echo "${ECHO_T}$pkgconfig_libdir" >&6 +test "$pkgconfig_libdir" != "$ax_create_pkgconfig_libdir" && ( +echo "$as_me:$LINENO: result: expanded our pkgconfig_libdir... $ax_create_pkgconfig_libdir" >&5 +echo "${ECHO_T}expanded our pkgconfig_libdir... $ax_create_pkgconfig_libdir" >&6) + + +echo "$as_me:$LINENO: checking our pkgconfig_libfile" >&5 +echo $ECHO_N "checking our pkgconfig_libfile... $ECHO_C" >&6 +test ".$pkgconfig_libfile" != "." || \ +pkgconfig_libfile="`basename zzip/zziplib.pc`" +ax_create_pkgconfig_libfile=`eval echo "$pkgconfig_libfile"` +ax_create_pkgconfig_libfile=`eval echo "$ax_create_pkgconfig_libfile"` +echo "$as_me:$LINENO: result: $pkgconfig_libfile" >&5 +echo "${ECHO_T}$pkgconfig_libfile" >&6 +test "$pkgconfig_libfile" != "$ax_create_pkgconfig_libfile" && ( +echo "$as_me:$LINENO: result: expanded our pkgconfig_libfile... $ax_create_pkgconfig_libfile" >&5 +echo "${ECHO_T}expanded our pkgconfig_libfile... $ax_create_pkgconfig_libfile" >&6) + + +echo "$as_me:$LINENO: checking our package / suffix" >&5 +echo $ECHO_N "checking our package / suffix... $ECHO_C" >&6 +ax_create_pkgconfig_suffix="$program_suffix" +test ".$ax_create_pkgconfig_suffix" != .NONE || ax_create_pkgconfig_suffix="" +echo "$as_me:$LINENO: result: ${PACKAGE_NAME} / ${ax_create_pkgconfig_suffix}" >&5 +echo "${ECHO_T}${PACKAGE_NAME} / ${ax_create_pkgconfig_suffix}" >&6 + +echo "$as_me:$LINENO: checking our pkgconfig description" >&5 +echo $ECHO_N "checking our pkgconfig description... $ECHO_C" >&6 +ax_create_pkgconfig_description="$PACKAGE_SUMMARY" +test ".$ax_create_pkgconfig_description" != "." || \ +ax_create_pkgconfig_description="$ax_create_pkgconfig_libname Library" +ax_create_pkgconfig_description=`eval echo "$ax_create_pkgconfig_description"` +ax_create_pkgconfig_description=`eval echo "$ax_create_pkgconfig_description"` +echo "$as_me:$LINENO: result: $ax_create_pkgconfig_description" >&5 +echo "${ECHO_T}$ax_create_pkgconfig_description" >&6 + +echo "$as_me:$LINENO: checking our pkgconfig requires" >&5 +echo $ECHO_N "checking our pkgconfig requires... $ECHO_C" >&6 +ax_create_pkgconfig_requires="zzip-zlib-config" +ax_create_pkgconfig_requires=`eval echo "$ax_create_pkgconfig_requires"` +ax_create_pkgconfig_requires=`eval echo "$ax_create_pkgconfig_requires"` +echo "$as_me:$LINENO: result: $ax_create_pkgconfig_requires" >&5 +echo "${ECHO_T}$ax_create_pkgconfig_requires" >&6 + +echo "$as_me:$LINENO: checking our pkgconfig ext libs" >&5 +echo $ECHO_N "checking our pkgconfig ext libs... $ECHO_C" >&6 +ax_create_pkgconfig_pkglibs="$PACKAGE_LIBS" +test ".$ax_create_pkgconfig_pkglibs" != "." || ax_create_pkgconfig_pkglibs="-l$ax_create_pkgconfig_libname" +ax_create_pkgconfig_libs="-lzzip" +ax_create_pkgconfig_libs=`eval echo "$ax_create_pkgconfig_libs"` +ax_create_pkgconfig_libs=`eval echo "$ax_create_pkgconfig_libs"` +echo "$as_me:$LINENO: result: $ax_create_pkgconfig_libs" >&5 +echo "${ECHO_T}$ax_create_pkgconfig_libs" >&6 + +echo "$as_me:$LINENO: checking our pkgconfig cppflags" >&5 +echo $ECHO_N "checking our pkgconfig cppflags... $ECHO_C" >&6 +ax_create_pkgconfig_cppflags="$CPPFLAGS $PACKAGE_CFLAGS" +ax_create_pkgconfig_cppflags=`eval echo "$ax_create_pkgconfig_cppflags"` +ax_create_pkgconfig_cppflags=`eval echo "$ax_create_pkgconfig_cppflags"` +echo "$as_me:$LINENO: result: $ax_create_pkgconfig_cppflags" >&5 +echo "${ECHO_T}$ax_create_pkgconfig_cppflags" >&6 + +echo "$as_me:$LINENO: checking our pkgconfig ldflags" >&5 +echo $ECHO_N "checking our pkgconfig ldflags... $ECHO_C" >&6 +ax_create_pkgconfig_ldflags="$LDFLAGS $PACKAGE_LDFLAGS" +ax_create_pkgconfig_ldflags=`eval echo "$ax_create_pkgconfig_ldflags"` +ax_create_pkgconfig_ldflags=`eval echo "$ax_create_pkgconfig_ldflags"` +echo "$as_me:$LINENO: result: $ax_create_pkgconfig_ldflags" >&5 +echo "${ECHO_T}$ax_create_pkgconfig_ldflags" >&6 + +test ".$ax_create_pkgconfig_generate" != "." || \ +ax_create_pkgconfig_generate="zzip/zziplib.pc" +ax_create_pkgconfig_generate=`eval echo "$ax_create_pkgconfig_generate"` +ax_create_pkgconfig_generate=`eval echo "$ax_create_pkgconfig_generate"` +test "$pkgconfig_libfile" != "$ax_create_pkgconfig_generate" && ( +echo "$as_me:$LINENO: result: generate the pkgconfig later... $ax_create_pkgconfig_generate" >&5 +echo "${ECHO_T}generate the pkgconfig later... $ax_create_pkgconfig_generate" >&6) + +if test ".$ax_create_pkgconfig_src_libdir" = "." ; then +ax_create_pkgconfig_src_libdir=`pwd` +ax_create_pkgconfig_src_libdir=`(dirname "$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate") 2>/dev/null || +$as_expr X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" : 'X\(//\)[^/]' \| \ + X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" : 'X\(//\)$' \| \ + X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ax_create_pkgconfig_src_libdir/$ax_create_pkgconfig_generate" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` +test ! -d $ax_create_pkgconfig_src_libdir/src || \ +ax_create_pkgconfig_src_libdir="$ax_create_pkgconfig_src_libdir/src" +case ".$objdir" in +*libs) ax_create_pkgconfig_src_libdir="$ax_create_pkgconfig_src_libdir/$objdir" ;; esac +echo "$as_me:$LINENO: result: noninstalled pkgconfig -L $ax_create_pkgconfig_src_libdir" >&5 +echo "${ECHO_T}noninstalled pkgconfig -L $ax_create_pkgconfig_src_libdir" >&6 +fi + +if test ".$ax_create_pkgconfig_src_headers" = "." ; then +ax_create_pkgconfig_src_headers=`pwd` +v="$ac_top_srcdir" ; +test ".$v" != "." || v="$ax_spec_dir" +test ".$v" != "." || v="$srcdir" +case "$v" in /*) PKG_CONFIG_src_headers="" ;; esac +ax_create_pkgconfig_src_headers=`(dirname "$ax_create_pkgconfig_src_headers/$v/x") 2>/dev/null || +$as_expr X"$ax_create_pkgconfig_src_headers/$v/x" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ax_create_pkgconfig_src_headers/$v/x" : 'X\(//\)[^/]' \| \ + X"$ax_create_pkgconfig_src_headers/$v/x" : 'X\(//\)$' \| \ + X"$ax_create_pkgconfig_src_headers/$v/x" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ax_create_pkgconfig_src_headers/$v/x" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` +test ! -d $ax_create_pkgconfig_src_headers/include || \ +ax_create_pkgconfig_src_headers="$ax_create_pkgconfig_src_headers/include" +echo "$as_me:$LINENO: result: noninstalled pkgconfig -I $ax_create_pkgconfig_src_headers" >&5 +echo "${ECHO_T}noninstalled pkgconfig -I $ax_create_pkgconfig_src_headers" >&6 +fi + + + ac_config_commands="$ac_config_commands $ax_create_pkgconfig_generate" + +# ----------------------------------------------------------------------- +for ac_prog in perl5 perl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PERL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PERL in + [\\/]* | ?:[\\/]*) + ac_cv_path_PERL="$PERL" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PERL=$ac_cv_path_PERL + +if test -n "$PERL"; then + echo "$as_me:$LINENO: result: $PERL" >&5 +echo "${ECHO_T}$PERL" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$PERL" && break +done +test -n "$PERL" || PERL="echo no perl found for" + +for ac_prog in python2.2 python2.3 python +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PYTHON+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PYTHON in + [\\/]* | ?:[\\/]*) + ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PYTHON=$ac_cv_path_PYTHON + +if test -n "$PYTHON"; then + echo "$as_me:$LINENO: result: $PYTHON" >&5 +echo "${ECHO_T}$PYTHON" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$PYTHON" && break +done +test -n "$PYTHON" || PYTHON="echo no python found for" + +for ac_prog in zip pkzip +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_MKZIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MKZIP in + [\\/]* | ?:[\\/]*) + ac_cv_path_MKZIP="$MKZIP" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_MKZIP="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +MKZIP=$ac_cv_path_MKZIP + +if test -n "$MKZIP"; then + echo "$as_me:$LINENO: result: $MKZIP" >&5 +echo "${ECHO_T}$MKZIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$MKZIP" && break +done +test -n "$MKZIP" || MKZIP=":" + +for ac_prog in xmlto +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_XMLTO+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $XMLTO in + [\\/]* | ?:[\\/]*) + ac_cv_path_XMLTO="$XMLTO" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_XMLTO="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +XMLTO=$ac_cv_path_XMLTO + +if test -n "$XMLTO"; then + echo "$as_me:$LINENO: result: $XMLTO" >&5 +echo "${ECHO_T}$XMLTO" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$XMLTO" && break +done +test -n "$XMLTO" || XMLTO=":" + + +echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6 +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_inline=$ac_kw; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6 + + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + +echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 +if test "${ac_cv_c_const+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset x; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *ccp; + char **p; + /* 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"; + ccp = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++ccp; + p = (char**) ccp; + ccp = (char const *const *) p; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 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 saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + } +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_const=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_c_const=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6 +if test $ac_cv_c_const = no; then + +cat >>confdefs.h <<\_ACEOF +#define const +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for C restrict keyword" >&5 +echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6 +if test "${acx_cv_c_restrict+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + acx_cv_c_restrict=unsupported + + + 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 + + # Try the official restrict keyword, then gcc's __restrict__, then + # SGI's __restrict. __restrict has slightly different semantics than + # restrict (it's a bit stronger, in that __restrict pointers can't + # overlap even with non __restrict pointers), but I think it should be + # okay under the circumstances where restrict is normally used. + for acx_kw in restrict __restrict__ __restrict; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +float * $acx_kw x; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + acx_cv_c_restrict=$acx_kw; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + 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 + + +fi +echo "$as_me:$LINENO: result: $acx_cv_c_restrict" >&5 +echo "${ECHO_T}$acx_cv_c_restrict" >&6 + if test "$acx_cv_c_restrict" != "restrict"; then + acx_kw="$acx_cv_c_restrict" + if test "$acx_kw" = unsupported; then acx_kw=""; fi + +cat >>confdefs.h <<_ACEOF +#define restrict $acx_kw +_ACEOF + + fi + +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <float.h> + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_stdc=no +fi +rm -f 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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <string.h> + +_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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdlib.h> + +_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 >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ctype.h> +#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)) + exit(2); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + + + + + + +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 +echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <sys/types.h> +#include <$ac_hdr> + +int +main () +{ +if ((DIR *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +_ACEOF + +ac_header_dirent=$ac_hdr; break +fi + +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then + echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 +if test "${ac_cv_search_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +ac_cv_search_opendir=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char opendir (); +int +main () +{ +opendir (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_opendir="none required" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_opendir" = no; then + for ac_lib in dir; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char opendir (); +int +main () +{ +opendir (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_opendir="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +echo "${ECHO_T}$ac_cv_search_opendir" >&6 +if test "$ac_cv_search_opendir" != no; then + test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" + +fi + +else + echo "$as_me:$LINENO: checking for library containing opendir" >&5 +echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 +if test "${ac_cv_search_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +ac_cv_search_opendir=no +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char opendir (); +int +main () +{ +opendir (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_opendir="none required" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test "$ac_cv_search_opendir" = no; then + for ac_lib in x; do + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char opendir (); +int +main () +{ +opendir (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_search_opendir="-l$ac_lib" +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done +fi +LIBS=$ac_func_search_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 +echo "${ECHO_T}$ac_cv_search_opendir" >&6 +if test "$ac_cv_search_opendir" != no; then + test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" + +fi + +fi + + + + + + + +for ac_header in stdint.h unistd.h windows.h winnt.h winbase.h sys/int_types.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + +for ac_header in sys/types.h sys/mman.h sys/stat.h sys/param.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + +for ac_header in io.h direct.h zlib.h byteswap.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in fnmatch.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_func in strcasecmp strndup +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* 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_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +echo "$as_me:$LINENO: checking for off_t" >&5 +echo $ECHO_N "checking for off_t... $ECHO_C" >&6 +if test "${ac_cv_type_off_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((off_t *) 0) + return 0; +if (sizeof (off_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_off_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_off_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 +echo "${ECHO_T}$ac_cv_type_off_t" >&6 +if test $ac_cv_type_off_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define off_t long +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +if test "${ac_cv_type_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((size_t *) 0) + return 0; +if (sizeof (size_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_size_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_size_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6 +if test $ac_cv_type_size_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for ssize_t" >&5 +echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 +if test "${ac_cv_type_ssize_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((ssize_t *) 0) + return 0; +if (sizeof (ssize_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_ssize_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_ssize_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 +echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 +if test $ac_cv_type_ssize_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define ssize_t int +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for off64_t" >&5 +echo $ECHO_N "checking for off64_t... $ECHO_C" >&6 +if test "${ac_cv_type_off64_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((off64_t *) 0) + return 0; +if (sizeof (off64_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_off64_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_off64_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_off64_t" >&5 +echo "${ECHO_T}$ac_cv_type_off64_t" >&6 +if test $ac_cv_type_off64_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define off64_t _zzip_off_t +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for __int64" >&5 +echo $ECHO_N "checking for __int64... $ECHO_C" >&6 +if test "${ac_cv_type___int64+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((__int64 *) 0) + return 0; +if (sizeof (__int64)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type___int64=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type___int64=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type___int64" >&5 +echo "${ECHO_T}$ac_cv_type___int64" >&6 +if test $ac_cv_type___int64 = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define __int64 long long +_ACEOF + +fi + +echo "$as_me:$LINENO: checking size of short" >&5 +echo $ECHO_N "checking size of short... $ECHO_C" >&6 +if test "${ac_cv_sizeof_short+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include "confdefs.h" +#include <sys/types.h> + + +int +main () +{ +switch (0) case 0: case (sizeof (short) == $ac_size):; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_short=$ac_size +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + if test x$ac_cv_sizeof_short != x ; then break; fi +done + +fi + +if test x$ac_cv_sizeof_short = x ; then + { { echo "$as_me:$LINENO: error: cannot determine a size for short" >&5 +echo "$as_me: error: cannot determine a size for short" >&2;} + { (exit 1); exit 1; }; } +fi +echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 +echo "${ECHO_T}$ac_cv_sizeof_short" >&6 + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SHORT $ac_cv_sizeof_short +_ACEOF + + +echo "$as_me:$LINENO: checking size of int" >&5 +echo $ECHO_N "checking size of int... $ECHO_C" >&6 +if test "${ac_cv_sizeof_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include "confdefs.h" +#include <sys/types.h> + + +int +main () +{ +switch (0) case 0: case (sizeof (int) == $ac_size):; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_int=$ac_size +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + if test x$ac_cv_sizeof_int != x ; then break; fi +done + +fi + +if test x$ac_cv_sizeof_int = x ; then + { { echo "$as_me:$LINENO: error: cannot determine a size for int" >&5 +echo "$as_me: error: cannot determine a size for int" >&2;} + { (exit 1); exit 1; }; } +fi +echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 +echo "${ECHO_T}$ac_cv_sizeof_int" >&6 + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT $ac_cv_sizeof_int +_ACEOF + + +echo "$as_me:$LINENO: checking size of long" >&5 +echo $ECHO_N "checking size of long... $ECHO_C" >&6 +if test "${ac_cv_sizeof_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include "confdefs.h" +#include <sys/types.h> + + +int +main () +{ +switch (0) case 0: case (sizeof (long) == $ac_size):; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_long=$ac_size +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + if test x$ac_cv_sizeof_long != x ; then break; fi +done + +fi + +if test x$ac_cv_sizeof_long = x ; then + { { echo "$as_me:$LINENO: error: cannot determine a size for long" >&5 +echo "$as_me: error: cannot determine a size for long" >&2;} + { (exit 1); exit 1; }; } +fi +echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long" >&6 + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long +_ACEOF + + +echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 +if test "${ac_cv_c_bigendian+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # See if sys/param.h defines the BYTE_ORDER macro. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <sys/types.h> +#include <sys/param.h> + +int +main () +{ +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN + bogus endian macros +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + # It does; now see whether it defined to BIG_ENDIAN or not. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <sys/types.h> +#include <sys/param.h> + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_c_bigendian=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +# It does not; compile a test program. +if test "$cross_compiling" = yes; then + # try to guess the endianness by grepping values into an object file + ac_cv_c_bigendian=unknown + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; +short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; +void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } +short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; +short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; +void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } +int +main () +{ + _ascii (); _ebcdic (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then + ac_cv_c_bigendian=yes +fi +if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi +fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +int +main () +{ + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long l; + char c[sizeof (long)]; + } u; + u.l = 1; + exit (u.c[sizeof (long) - 1] == 1); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=no +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_c_bigendian=yes +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +echo "${ECHO_T}$ac_cv_c_bigendian" >&6 +case $ac_cv_c_bigendian in + yes) + +cat >>confdefs.h <<\_ACEOF +#define WORDS_BIGENDIAN 1 +_ACEOF + ;; + no) + ;; + *) + { { echo "$as_me:$LINENO: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +echo "$as_me: error: unknown endianness +presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; +esac + +# the default is _disabled_!! anyway, result is prefixed in zzip/_config.h!! +# Check whether --enable-largefile or --disable-largefile was given. +if test "${enable_largefile+set}" = set; then + enableval="$enable_largefile" + +fi; +if test "$enable_largefile" != no; then + + echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 +echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6 +if test "${ac_cv_sys_largefile_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <sys/types.h> + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext + CC="$CC -n32" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sys_largefile_CC=' -n32'; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 +echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6 + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6 +if test "${ac_cv_sys_file_offset_bits+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + while :; do + ac_cv_sys_file_offset_bits=no + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <sys/types.h> + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include <sys/types.h> + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sys_file_offset_bits=64; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + break +done +fi +echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 +echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6 +if test "$ac_cv_sys_file_offset_bits" != no; then + +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF + +fi +rm -f conftest* + echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 +echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6 +if test "${ac_cv_sys_large_files+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + while :; do + ac_cv_sys_large_files=no + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <sys/types.h> + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include <sys/types.h> + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sys_large_files=1; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + break +done +fi +echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 +echo "${ECHO_T}$ac_cv_sys_large_files" >&6 +if test "$ac_cv_sys_large_files" != no; then + +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF + +fi +rm -f conftest* +fi + +# we know about some internals of ac_sys_largefile here... +echo "$as_me:$LINENO: checking whether system differentiates 64bit off_t by defines" >&5 +echo $ECHO_N "checking whether system differentiates 64bit off_t by defines... $ECHO_C" >&6 +ac_cv_sys_largefile_sensitive="no" +if test ".$ac_cv_sys_file_offset_bits$ac_cv_sys_large_files" != ".nono" +then ac_cv_sys_largefile_sensitive="yes" + +cat >>confdefs.h <<\_ACEOF +#define LARGEFILE_SENSITIVE 1 +_ACEOF + +fi +echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_sensitive" >&5 +echo "${ECHO_T}$ac_cv_sys_largefile_sensitive" >&6 + +test ".$LARGEFILE_CFLAGS" = "." && LARGEFILE_CFLAGS="" + +# Check whether --with-largefile or --without-largefile was given. +if test "${with_largefile+set}" = set; then + withval="$with_largefile" + +else + with_largefile="no" +fi; +if test ".$ac_cv_sys_largefile_sensitive" = ".no" ; then + echo "$as_me:$LINENO: result: compiles library with the only off_t seen" >&5 +echo "${ECHO_T}compiles library with the only off_t seen" >&6 +elif test ".$with_largefile" != ".no" ; then + echo "$as_me:$LINENO: result: compiles library as 64bit off_t variant - and renaming some function names" >&5 +echo "${ECHO_T}compiles library as 64bit off_t variant - and renaming some function names" >&6 + LARGEFILE_CFLAGS="$LARGEFILE_CFLAGS -D_LARGEFILE_SOURCE" + echo "$as_me:$LINENO: result: ..adding CFLAGS $LARGEFILE_CFLAGS" >&5 +echo "${ECHO_T}..adding CFLAGS $LARGEFILE_CFLAGS" >&6 + CFLAGS="$CFLAGS $LARGEFILE_CFLAGS" + echo "$as_me:$LINENO: result: ..adding 64 into RELEASE_INFO for the libraries" >&5 +echo "${ECHO_T}..adding 64 into RELEASE_INFO for the libraries" >&6 + RELEASE_INFO="$RELEASE_INFO-64" +else + echo "$as_me:$LINENO: result: compiles library as 32bit off_t variant - largefile is not the default here" >&5 +echo "${ECHO_T}compiles library as 32bit off_t variant - largefile is not the default here" >&6 +fi + +echo "$as_me:$LINENO: checking for zlib being found" >&5 +echo $ECHO_N "checking for zlib being found... $ECHO_C" >&6 +if test "_$ac_cv_header_zlib_h" != "_yes" ; then + echo "$as_me:$LINENO: result: ...oops: zlib.h not found - try adding some CPPFLAGS to configure call" >&5 +echo "${ECHO_T}...oops: zlib.h not found - try adding some CPPFLAGS to configure call" >&6 + echo "$as_me:$LINENO: result: ...note: and when linkage fails you might also need to set some LDFLAGS" >&5 +echo "${ECHO_T}...note: and when linkage fails you might also need to set some LDFLAGS" >&6 + case "$prefix" in + NONE|/usr) + echo "$as_me:$LINENO: result: ...note: both can be set by specifying the install prefix of the zlib library" >&5 +echo "${ECHO_T}...note: both can be set by specifying the install prefix of the zlib library" >&6 + echo "$as_me:$LINENO: result: ...note: via --with-zlib=path ... it will test for -Ipath/include -Lpath/lib" >&5 +echo "${ECHO_T}...note: via --with-zlib=path ... it will test for -Ipath/include -Lpath/lib" >&6 + ;; + *) if test -d $prefix/include ; then + echo "$as_me:$LINENO: result: ...note: -I$prefix/include is not added to CPPFLAGS automatically and" >&5 +echo "${ECHO_T}...note: -I$prefix/include is not added to CPPFLAGS automatically and" >&6 + echo "$as_me:$LINENO: result: ...note: neither is -L$prefix/lib for LDFLAGS .. both will be if you specify" >&5 +echo "${ECHO_T}...note: neither is -L$prefix/lib for LDFLAGS .. both will be if you specify" >&6 + echo "$as_me:$LINENO: result: ...note: --with-zlib to configure call" >&5 +echo "${ECHO_T}...note: --with-zlib to configure call" >&6 + fi + ;; + esac + { { echo "$as_me:$LINENO: error: zlib.h not found: \"zlib\" is required to build \"$PACKAGE\"" >&5 +echo "$as_me: error: zlib.h not found: \"zlib\" is required to build \"$PACKAGE\"" >&2;} + { (exit 1); exit 1; }; } + exit 1 +fi +cat >conftest.c <<EOF +#include <zlib.h> +const char* zlib_VeRsIoN = ZLIB_VERSION "dEtEcT"; +EOF +ZLIB_VERSION=`(eval "$ac_cpp conftest.c") 2>/dev/null \ +| grep zlib_VeRsIoN | sed -e 's,.*= *.,,' -e 's,. *.dEtEcT.*,,'` +rm conftest.c + +echo "$as_me:$LINENO: result: yes - $ZLIB_VERSION" >&5 +echo "${ECHO_T}yes - $ZLIB_VERSION" >&6 +# ---------------------------------------------------------------- +echo "$as_me:$LINENO: checking docdir default" >&5 +echo $ECHO_N "checking docdir default... $ECHO_C" >&6 + +# Check whether --with-docdir or --without-docdir was given. +if test "${with_docdir+set}" = set; then + withval="$with_docdir" + +else + with_docdir="no" +fi; +case "${with_docdir}" in + prefix/*) docdir=` echo "$withval" | sed 's/^prefix/${prefix}'` ;; + datadir/*) docdir=` echo "$withval" | sed 's/^datadir/${datadir}'` ;; + yes) docdir='${prefix}/doc' ;; + no) docdir='${datadir}/doc' ;; + /*|\\*|a-zA-Z:*) docdir="$with_docdir" ;; + *) echo "$as_me:$LINENO: result: oops" >&5 +echo "${ECHO_T}oops" >&6 + { { echo "$as_me:$LINENO: error: bad value ${withval} for --with-docdir" >&5 +echo "$as_me: error: bad value ${withval} for --with-docdir" >&2;} + { (exit 1); exit 1; }; } + ;; +esac + +echo "$as_me:$LINENO: result: $docdir" >&5 +echo "${ECHO_T}$docdir" >&6 +# ---------------------------------------------------------------- +echo "$as_me:$LINENO: checking whether using debugging messages in libraries" >&5 +echo $ECHO_N "checking whether using debugging messages in libraries... $ECHO_C" >&6 + +# Check whether --with-debug or --without-debug was given. +if test "${with_debug+set}" = set; then + withval="$with_debug" + case "${withval}" in + yes|no) with_debug="$withval" ;; + *) echo "$as_me:$LINENO: result: oops" >&5 +echo "${ECHO_T}oops" >&6 + { { echo "$as_me:$LINENO: error: bad value ${withval} for --with-debug" >&5 +echo "$as_me: error: bad value ${withval} for --with-debug" >&2;} + { (exit 1); exit 1; }; } ;; + esac +else + with_debug="no" +fi; +test "$with_debug" != "yes" && with_debug="no" # yes or no +test "$with_debug" = "yes" && export CFLAGS="$CFLAGS -DDEBUG" +result="$with_debug" ; test "$result" = "yes" && result="yes, added -DDEBUG" +echo "$as_me:$LINENO: result: $result" >&5 +echo "${ECHO_T}$result" >&6 +if test "$with_debug" = "yes" ; then if test -n "$RELEASE_INFO" ; then + RELEASE_INFO="$RELEASE_INFO-dbg" + echo "$as_me:$LINENO: result: modified release" >&5 +echo "${ECHO_T}modified release" >&6 +fi fi +# ---------------------------------------------------------------- +echo "$as_me:$LINENO: checking whether thread stack is too small for bufsiz buffers" >&5 +echo $ECHO_N "checking whether thread stack is too small for bufsiz buffers... $ECHO_C" >&6 + # many embedded platforms, superthreaded systems and kernel usage + # will severely limit the stackspace for its threads. Use _LOWSTK + # compile-define on those platforms. + +# Check whether --with-lowstk or --without-lowstk was given. +if test "${with_lowstk+set}" = set; then + withval="$with_lowstk" + case "${withval}" in + yes|no|auto) with_lowstk="$withval" ;; + *) { { echo "$as_me:$LINENO: error: bad value ${withval} for --with-lowstk" >&5 +echo "$as_me: error: bad value ${withval} for --with-lowstk" >&2;} + { (exit 1); exit 1; }; } ;; + esac +else + with_lowstk="auto" +fi; +if test "$with_lowstk" = "auto"; then + case $target in + *-palmos-*) $with_lowstk="yes" ;; + esac +fi +test "$with_lowstk" != "yes" && with_lowstk="no" # yes or no +test "$with_lowstk" = "yes" && CFLAGS="$CFLAGS -D_LOWSTK" +result="$with_lowstk" ; test "$result" = "yes" && result="yes, added -D_LOWSTK" +echo "$as_me:$LINENO: result: $with_lowstk" >&5 +echo "${ECHO_T}$with_lowstk" >&6 +# --------------------------------------------------------------- +echo "$as_me:$LINENO: checking whether can use mmap for file scanning" >&5 +echo $ECHO_N "checking whether can use mmap for file scanning... $ECHO_C" >&6 + # system with mmap are probably better performing an searching + # and parsing - atleast memory consumption is far better +# Check whether --enable-mmap or --disable-mmap was given. +if test "${enable_mmap+set}" = set; then + enableval="$enable_mmap" + case "${enableval}" in + yes|no|auto) enable_mmap="${enableval}" ;; + *) echo "$as_me:$LINENO: result: oops" >&5 +echo "${ECHO_T}oops" >&6 + { { echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-mmap" >&5 +echo "$as_me: error: bad value ${enableval} for --disable-mmap" >&2;} + { (exit 1); exit 1; }; } ;; + esac +else + enable_mmap="auto" +fi; +if test "$enable_mmap" = "auto" +then + test "$ac_cv_header_winbase_h" && enable_mmap="yes, winbase.h" + test "$ac_cv_header_sys_mman_h" && enable_mmap="yes, sys/mman.h" +fi +case "$enable_mmap" in + yes|yes,*) CFLAGS="$CFLAGS -D_USE_MMAP" + echo "$as_me:$LINENO: result: $enable_mmap" >&5 +echo "${ECHO_T}$enable_mmap" >&6 ;; + *) enable_mmap="no" + echo "$as_me:$LINENO: result: no (just a bit slower)" >&5 +echo "${ECHO_T}no (just a bit slower)" >&6 ;; +esac +# --------------------------------------------------------------- +echo "$as_me:$LINENO: checking whether making SDL parts" >&5 +echo $ECHO_N "checking whether making SDL parts... $ECHO_C" >&6 +SDL="" +# Check whether --enable-sdl or --disable-sdl was given. +if test "${enable_sdl+set}" = set; then + enableval="$enable_sdl" + +else + enable_sdl="no" +fi; +if test "$enable_sdl" = "no" ; then + echo "$as_me:$LINENO: result: no, disabled" >&5 +echo "${ECHO_T}no, disabled" >&6 +else + enable_sdl=`sdl-config --version 2>/dev/null` + case ".$enable_sdl" in + .1.*) echo "$as_me:$LINENO: result: yes, for SDL $enable_sdl" >&5 +echo "${ECHO_T}yes, for SDL $enable_sdl" >&6 + SDL="SDL" ;; + .2.*) echo "$as_me:$LINENO: result: yes, untested $enable_sdl" >&5 +echo "${ECHO_T}yes, untested $enable_sdl" >&6 + SDL="SDL" ;; + *) echo "$as_me:$LINENO: result: no, $enable_sdl" >&5 +echo "${ECHO_T}no, $enable_sdl" >&6 ;; + esac +fi + +# --------------------------------------------------------------- +echo "$as_me:$LINENO: checking running extra tests on make check" >&5 +echo $ECHO_N "checking running extra tests on make check... $ECHO_C" >&6 +if test "MKZIP" != ":" ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ZIPTESTS="" +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ZIPTESTS="#" +fi + +# --------------------------------------------------------------- +echo "$as_me:$LINENO: checking link options" >&5 +echo $ECHO_N "checking link options... $ECHO_C" >&6 +case "$host_os" in + mingw*) + ZZIPLIB_LDFLAGS="-no-undefined -export-all-symbols -mconsole" + RESOLVES=' ' + ;; + *) + ZZIPLIB_LDFLAGS="--export-dynamic" + RESOLVES=' # ' + ;; +esac +echo "$as_me:$LINENO: result: $ZZIPLIB_LDFLAGS $RESOLVES" >&5 +echo "${ECHO_T}$ZZIPLIB_LDFLAGS $RESOLVES" >&6 + + +# --------------------------------------------------------------- +echo "$as_me:$LINENO: checking auto silent in maintainer mode" >&5 +echo $ECHO_N "checking auto silent in maintainer mode... $ECHO_C" >&6 +if test "$USE_MAINTAINER_MODE" = "no" ; then + test ".$TIMEOUT" = "." && TIMEOUT="9" + AUTOHEADER="sleep $TIMEOUT ; true || autoheader || skipped" + AUTOMAKE="sleep $TIMEOUT ; true || automake || skipped" + AUTOCONF="sleep $TIMEOUT ; true || autoconf || skipped" + if test ".$LIBTOOL" != "." ; then + LIBTOOL="$LIBTOOL --silent" + echo "$as_me:$LINENO: result: libtool-silent, auto-sleep-9" >&5 +echo "${ECHO_T}libtool-silent, auto-sleep-9" >&6 + else + echo "$as_me:$LINENO: result: auto-sleep-9" >&5 +echo "${ECHO_T}auto-sleep-9" >&6 + fi +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +echo "$as_me:$LINENO: checking CFLAGS frame-pointer" >&5 +echo $ECHO_N "checking CFLAGS frame-pointer... $ECHO_C" >&6 +# Check whether --enable-frame-pointer or --disable-frame-pointer was given. +if test "${enable_frame_pointer+set}" = set; then + enableval="$enable_frame_pointer" + +fi; +case ".$enable_frame_pointer" in + .|.no|.no,*) test ".$enable_frame_pointer" = "." && enable_frame_pointer="no" + CFLAGS=`echo " $CFLAGS " | sed -e 's/ -g / /'` + if test ".$GCC" = ".yes" ; then + CFLAGS="$CFLAGS -fomit-frame-pointer" + echo "$as_me:$LINENO: result: $enable_frame_pointer, -fomit-frame-pointer added" >&5 +echo "${ECHO_T}$enable_frame_pointer, -fomit-frame-pointer added" >&6 + else + echo "$as_me:$LINENO: result: $enable_frame_pointer, -g removed" >&5 +echo "${ECHO_T}$enable_frame_pointer, -g removed" >&6 + fi ;; + *) echo "$as_me:$LINENO: result: $enable_frame_pointer, kept" >&5 +echo "${ECHO_T}$enable_frame_pointer, kept" >&6 ;; +esac + +echo "$as_me:$LINENO: checking CFLAGS for maximum warnings" >&5 +echo $ECHO_N "checking CFLAGS for maximum warnings... $ECHO_C" >&6 +if test "${ac_cv_cflags_warn_all+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_cflags_warn_all="no, unknown" + + + 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_save_CFLAGS="$CFLAGS" +for ac_arg in "-pedantic % -Wall" "-xstrconst % -v" "-std1 % -verbose -w0 -warnprotos" "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" "-ansi -ansiE % -fullwarn" "+ESlit % +w1" "-Xc % -pvctl,fullmsg" "-h conform % -h msglevel 2" # +do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_cflags_warn_all=`echo $ac_arg | sed -e 's,.*% *,,'` ; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done + CFLAGS="$ac_save_CFLAGS" + 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 +echo "$as_me:$LINENO: result: $ac_cv_cflags_warn_all" >&5 +echo "${ECHO_T}$ac_cv_cflags_warn_all" >&6 +case ".$ac_cv_cflags_warn_all" in + .ok|.ok,*) ;; + .|.no|.no,*) + ;; + *) + if echo " $CFLAGS " | grep " $ac_cv_cflags_warn_all " 2>&1 >/dev/null + then { (echo "$as_me:$LINENO: : CFLAGS does contain \$ac_cv_cflags_warn_all") >&5 + (: CFLAGS does contain $ac_cv_cflags_warn_all) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + else { (echo "$as_me:$LINENO: : CFLAGS=\"\$CFLAGS \$ac_cv_cflags_warn_all\"") >&5 + (: CFLAGS="$CFLAGS $ac_cv_cflags_warn_all") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + CFLAGS="$CFLAGS $ac_cv_cflags_warn_all" + fi + ;; +esac + +echo "$as_me:$LINENO: checking CFLAGS making strings readonly" >&5 +echo $ECHO_N "checking CFLAGS making strings readonly... $ECHO_C" >&6 +if test "${ac_cv_cflags_no_writable_strings+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_cflags_no_writable_strings="no, unknown" + + + 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_save_CFLAGS="$CFLAGS" +# IRIX C compiler: +# -use_readonly_const is the default for IRIX C, +# puts them into .rodata, but they are copied later. +# need to be "-G0 -rdatashared" for strictmode but +# I am not sure what effect that has really. - guidod +for ac_arg in "-Wall % -fno-writable-strings -Wwrite-strings" "-v -Xc % -xstrconst" "+w1 -Aa % +ESlit" "-w0 -std1 % -readonly_strings" "-fullwarn -use_readonly_const %% ok, its the default" # +do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_cflags_no_writable_strings=`echo $ac_arg | sed -e 's,.*% *,,'` ; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +case ".$ac_cv_cflags_no_writable_strings" in + .|.no|.no,*) ;; + *) # sanity check - testing strcpy() from string.h + cp config.log config.tmp + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <string.h> +int +main () +{ + + char test[16]; + if (strcpy (test, "test")) return 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + if test `diff config.log config.tmp | grep -i warning | wc -l` != 0 + then ac_cv_cflags_no_writable_strings="no, suppressed, string.h," ; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_cflags_no_writable_strings="no, suppressed, string.h" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + rm config.tmp + ;; +esac + CFLAGS="$ac_save_CFLAGS" + 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 +echo "$as_me:$LINENO: result: $ac_cv_cflags_no_writable_strings" >&5 +echo "${ECHO_T}$ac_cv_cflags_no_writable_strings" >&6 +case ".$ac_cv_cflags_no_writable_strings" in + .ok|.ok,*) ;; + .|.no|.no,*) + ;; + *) + if echo " $CFLAGS " | grep " $ac_cv_cflags_no_writable_strings " 2>&1 >/dev/null + then { (echo "$as_me:$LINENO: : CFLAGS does contain \$ac_cv_cflags_no_writable_strings") >&5 + (: CFLAGS does contain $ac_cv_cflags_no_writable_strings) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + else { (echo "$as_me:$LINENO: : CFLAGS=\"\$CFLAGS \$ac_cv_cflags_no_writable_strings\"") >&5 + (: CFLAGS="$CFLAGS $ac_cv_cflags_no_writable_strings") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + CFLAGS="$CFLAGS $ac_cv_cflags_no_writable_strings" + fi + ;; +esac + +echo "$as_me:$LINENO: checking CFLAGS for strict prototypes" >&5 +echo $ECHO_N "checking CFLAGS for strict prototypes... $ECHO_C" >&6 +if test "${ac_cv_cflags_strict_prototypes+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_cflags_strict_prototypes="no, unknown" + + + 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_save_CFLAGS="$CFLAGS" +for ac_arg in "-Wall % -fstrict-prototypes -Wstrict-prototypes" "-Wall % -Wstrict-prototypes" # +do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_cflags_strict_prototypes=`echo $ac_arg | sed -e 's,.*% *,,'` ; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +case ".$ac_cv_cflags_strict_prototypes" in + .|.no|.no,*) ;; + *) # sanity check with signal() from sys/signal.h + cp config.log config.tmp + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <signal.h> +int +main () +{ + + if (signal (SIGINT, SIG_IGN) == SIG_DFL) return 1; + if (signal (SIGINT, SIG_IGN) != SIG_DFL) return 2; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + if test `diff config.log config.tmp | grep -i warning | wc -l` != 0 +then if test `diff config.log config.tmp | grep -i warning | wc -l` != 1 +then ac_cv_cflags_strict_prototypes="no, suppressed, signal.h," ; fi ; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_cflags_strict_prototypes="no, suppressed, signal.h" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + rm config.tmp + ;; +esac + CFLAGS="$ac_save_CFLAGS" + 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 +echo "$as_me:$LINENO: result: $ac_cv_cflags_strict_prototypes" >&5 +echo "${ECHO_T}$ac_cv_cflags_strict_prototypes" >&6 +case ".$ac_cv_cflags_strict_prototypes" in + .ok|.ok,*) ;; + .|.no|.no,*) + ;; + *) + if echo " $CFLAGS " | grep " $ac_cv_cflags_strict_prototypes " 2>&1 >/dev/null + then { (echo "$as_me:$LINENO: : CFLAGS does contain \$ac_cv_cflags_strict_prototypes") >&5 + (: CFLAGS does contain $ac_cv_cflags_strict_prototypes) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + else { (echo "$as_me:$LINENO: : CFLAGS=\"\$CFLAGS \$ac_cv_cflags_strict_prototypes\"") >&5 + (: CFLAGS="$CFLAGS $ac_cv_cflags_strict_prototypes") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + CFLAGS="$CFLAGS $ac_cv_cflags_strict_prototypes" + fi + ;; +esac + +echo "$as_me:$LINENO: checking CFLAGS for gcc -Wpointer-arith" >&5 +echo $ECHO_N "checking CFLAGS for gcc -Wpointer-arith... $ECHO_C" >&6 +if test "${ac_cv_cflags_gcc_option__Wpointer_arith+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_cflags_gcc_option__Wpointer_arith="no, unknown" + + + 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_save_CFLAGS="$CFLAGS" +for ac_arg in "-pedantic % -Wpointer-arith" # +do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_cflags_gcc_option__Wpointer_arith=`echo $ac_arg | sed -e 's,.*% *,,'` ; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done + CFLAGS="$ac_save_CFLAGS" + 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 +echo "$as_me:$LINENO: result: $ac_cv_cflags_gcc_option__Wpointer_arith" >&5 +echo "${ECHO_T}$ac_cv_cflags_gcc_option__Wpointer_arith" >&6 +case ".$ac_cv_cflags_gcc_option__Wpointer_arith" in + .ok|.ok,*) ;; + .|.no|.no,*) ;; + *) + if echo " $CFLAGS " | grep " $ac_cv_cflags_gcc_option__Wpointer_arith " 2>&1 >/dev/null + then { (echo "$as_me:$LINENO: : CFLAGS does contain \$ac_cv_cflags_gcc_option__Wpointer_arith") >&5 + (: CFLAGS does contain $ac_cv_cflags_gcc_option__Wpointer_arith) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + else { (echo "$as_me:$LINENO: : CFLAGS=\"\$CFLAGS \$ac_cv_cflags_gcc_option__Wpointer_arith\"") >&5 + (: CFLAGS="$CFLAGS $ac_cv_cflags_gcc_option__Wpointer_arith") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + CFLAGS="$CFLAGS $ac_cv_cflags_gcc_option__Wpointer_arith" + fi + ;; +esac + +echo "$as_me:$LINENO: checking CFLAGS for gcc -Wsign-compare" >&5 +echo $ECHO_N "checking CFLAGS for gcc -Wsign-compare... $ECHO_C" >&6 +if test "${ac_cv_cflags_gcc_option__Wsign_compare+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_cflags_gcc_option__Wsign_compare="no, unknown" + + + 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_save_CFLAGS="$CFLAGS" +for ac_arg in "-pedantic % -Wsign-compare" # +do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_cflags_gcc_option__Wsign_compare=`echo $ac_arg | sed -e 's,.*% *,,'` ; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done + CFLAGS="$ac_save_CFLAGS" + 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 +echo "$as_me:$LINENO: result: $ac_cv_cflags_gcc_option__Wsign_compare" >&5 +echo "${ECHO_T}$ac_cv_cflags_gcc_option__Wsign_compare" >&6 +case ".$ac_cv_cflags_gcc_option__Wsign_compare" in + .ok|.ok,*) ;; + .|.no|.no,*) ;; + *) + if echo " $CFLAGS " | grep " $ac_cv_cflags_gcc_option__Wsign_compare " 2>&1 >/dev/null + then { (echo "$as_me:$LINENO: : CFLAGS does contain \$ac_cv_cflags_gcc_option__Wsign_compare") >&5 + (: CFLAGS does contain $ac_cv_cflags_gcc_option__Wsign_compare) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + else { (echo "$as_me:$LINENO: : CFLAGS=\"\$CFLAGS \$ac_cv_cflags_gcc_option__Wsign_compare\"") >&5 + (: CFLAGS="$CFLAGS $ac_cv_cflags_gcc_option__Wsign_compare") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + CFLAGS="$CFLAGS $ac_cv_cflags_gcc_option__Wsign_compare" + fi + ;; +esac + +echo "$as_me:$LINENO: checking CFLAGS for gcc -Wmissing-declarations" >&5 +echo $ECHO_N "checking CFLAGS for gcc -Wmissing-declarations... $ECHO_C" >&6 +if test "${ac_cv_cflags_gcc_option__Wmissing_declarations+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_cflags_gcc_option__Wmissing_declarations="no, unknown" + + + 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_save_CFLAGS="$CFLAGS" +for ac_arg in "-pedantic % -Wmissing-declarations" # +do CFLAGS="$ac_save_CFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_cflags_gcc_option__Wmissing_declarations=`echo $ac_arg | sed -e 's,.*% *,,'` ; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done + CFLAGS="$ac_save_CFLAGS" + 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 +echo "$as_me:$LINENO: result: $ac_cv_cflags_gcc_option__Wmissing_declarations" >&5 +echo "${ECHO_T}$ac_cv_cflags_gcc_option__Wmissing_declarations" >&6 +case ".$ac_cv_cflags_gcc_option__Wmissing_declarations" in + .ok|.ok,*) ;; + .|.no|.no,*) ;; + *) + if echo " $CFLAGS " | grep " $ac_cv_cflags_gcc_option__Wmissing_declarations " 2>&1 >/dev/null + then { (echo "$as_me:$LINENO: : CFLAGS does contain \$ac_cv_cflags_gcc_option__Wmissing_declarations") >&5 + (: CFLAGS does contain $ac_cv_cflags_gcc_option__Wmissing_declarations) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + else { (echo "$as_me:$LINENO: : CFLAGS=\"\$CFLAGS \$ac_cv_cflags_gcc_option__Wmissing_declarations\"") >&5 + (: CFLAGS="$CFLAGS $ac_cv_cflags_gcc_option__Wmissing_declarations") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + CFLAGS="$CFLAGS $ac_cv_cflags_gcc_option__Wmissing_declarations" + fi + ;; +esac + +# --------------------------------------------------------------- + # The prefix default can be set in configure.ac (otherwise it is /usr/local) + test "x$prefix" = xNONE && prefix=$ac_default_prefix + # Let make expand exec_prefix. Allows to override the makevar 'prefix' later + test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Check whether --enable-enable-default-pkgconfigdir or --disable-enable-default-pkgconfigdir was given. +if test "${enable_enable_default_pkgconfigdir+set}" = set; then + enableval="$enable_enable_default_pkgconfigdir" + +fi; +test ".$enable_default_pkgconfigdir" = "." && enable_default_pkgconfigdir="no" +case ".$enable_default_pkgconfigdir" in + .no) ax_warning_default_pkgconfig_def='${libdir}/pkgconfig' ;; + .yes) # autodetect + if test ".$PKG_CONFIG" = "." ; then # we use the same default as in pkg.m4 + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG + +if test -n "$PKG_CONFIG"; then + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + fi + if test "$PKG_CONFIG" = "no" + then ax_warning_default_pkgconfig_def="/tmp" ; test -d "/usr/lib/pkgconfig" && ax_warning_default_pkgconfig_def="/usr/lib/pkgconfig" + else ax_warning_default_pkgconfig_bin=`(dirname "$ax_warning_default_pkgconfig_def") 2>/dev/null || +$as_expr X"$ax_warning_default_pkgconfig_def" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ax_warning_default_pkgconfig_def" : 'X\(//\)[^/]' \| \ + X"$ax_warning_default_pkgconfig_def" : 'X\(//\)$' \| \ + X"$ax_warning_default_pkgconfig_def" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ax_warning_default_pkgconfig_def" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` ; + if test -d "$ax_warning_default_pkgconfig_bin/lib/pkgconfig" ; then + ax_warning_default_pkgconfig_def="$ax_warning_default_pkgconfig_bin/lib/pkgconfig" + else ax_warning_default_pkgconfig_bin=`(dirname "$ax_warning_default_pkgconfig_def") 2>/dev/null || +$as_expr X"$ax_warning_default_pkgconfig_def" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ax_warning_default_pkgconfig_def" : 'X\(//\)[^/]' \| \ + X"$ax_warning_default_pkgconfig_def" : 'X\(//\)$' \| \ + X"$ax_warning_default_pkgconfig_def" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ax_warning_default_pkgconfig_def" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + if test -d "$ax_warning_default_pkgconfig_bin/lib/pkgconfig" ; then + ax_warning_default_pkgconfig_def="$ax_warning_default_pkgconfig_bin/lib/pkgconfig" + else + if test -d "/usr/lib/pkgconfig" ; then + ax_warning_default_pkgconfig_def="/usr/lib/pkgconfig" + else + ax_warning_default_pkgconfig_def="/tmp" + fi fi fi + fi ;; + *) ax_warning_default_pkgconfig_def="$enable_default_pkgconfigdir" ;; +esac +ax_warning_default_pkgconfig_loc='$ax_warning_default_pkgconfig_def' + + if test ".$PKG_CONFIG" = "." ; then # we use the same default as in pkg.m4 + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG + +if test -n "$PKG_CONFIG"; then + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + fi + if test "$PKG_CONFIG" = "no" + then ax_warning_default_pkgconfig_dir="/" ; test -d "/usr/lib/pkgconfig" && ax_warning_default_pkgconfig_dir="/usr/lib/pkgconfig" + else ax_warning_default_pkgconfig_bin=`(dirname "$ax_warning_default_pkgconfig_dir") 2>/dev/null || +$as_expr X"$ax_warning_default_pkgconfig_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ax_warning_default_pkgconfig_dir" : 'X\(//\)[^/]' \| \ + X"$ax_warning_default_pkgconfig_dir" : 'X\(//\)$' \| \ + X"$ax_warning_default_pkgconfig_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ax_warning_default_pkgconfig_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` ; + if test -d "$ax_warning_default_pkgconfig_bin/lib/pkgconfig" ; then + ax_warning_default_pkgconfig_dir="$ax_warning_default_pkgconfig_bin/lib/pkgconfig" + else ax_warning_default_pkgconfig_bin=`(dirname "$ax_warning_default_pkgconfig_dir") 2>/dev/null || +$as_expr X"$ax_warning_default_pkgconfig_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ax_warning_default_pkgconfig_dir" : 'X\(//\)[^/]' \| \ + X"$ax_warning_default_pkgconfig_dir" : 'X\(//\)$' \| \ + X"$ax_warning_default_pkgconfig_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ax_warning_default_pkgconfig_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + if test -d "$ax_warning_default_pkgconfig_bin/lib/pkgconfig" ; then + ax_warning_default_pkgconfig_dir="$ax_warning_default_pkgconfig_bin/lib/pkgconfig" + else + if test -d "/usr/lib/pkgconfig" ; then + ax_warning_default_pkgconfig_dir="/usr/lib/pkgconfig" + else + ax_warning_default_pkgconfig_dir="/" + fi fi fi + fi +{ (echo "$as_me:$LINENO: : last pkgconfig dir is assumed as \"\$ax_warning_default_pkgconfig_dir\"") >&5 + (: last pkgconfig dir is assumed as "$ax_warning_default_pkgconfig_dir") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +ax_warning_default_pkgconfig_dir=`eval "echo $ax_warning_default_pkgconfig_dir"` +ax_warning_default_pkgconfig_dir=`eval "echo $ax_warning_default_pkgconfig_dir"` +ax_warning_default_pkgconfig_loc=`eval "echo $ax_warning_default_pkgconfig_loc"` +ax_warning_default_pkgconfig_loc=`eval "echo $ax_warning_default_pkgconfig_loc"` +ax_warning_default_pkgconfig_loc=`eval "echo $ax_warning_default_pkgconfig_loc"` +ax_warning_default_pkgconfig_loc=`eval "echo $ax_warning_default_pkgconfig_loc"` +for ax_warning_default_pkgconfig_dir in `echo "$PKG_CONFIG_PATH:$ax_warning_default_pkgconfig_dir" | sed -e 's,:, ,g'` ; do + { (echo "$as_me:$LINENO: : test \".\$ax_warning_default_pkgconfig_loc\" = \".\$ax_warning_default_pkgconfig_dir\"") >&5 + (: test ".$ax_warning_default_pkgconfig_loc" = ".$ax_warning_default_pkgconfig_dir") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + test ".$ax_warning_default_pkgconfig_loc" = ".$ax_warning_default_pkgconfig_dir" && break +done +if test "$ax_warning_default_pkgconfig_loc" != "$ax_warning_default_pkgconfig_dir" ; then + { echo "$as_me:$LINENO: warning: pkgconfigdir=$ax_warning_default_pkgconfig_loc (see config.log)" >&5 +echo "$as_me: warning: pkgconfigdir=$ax_warning_default_pkgconfig_loc (see config.log)" >&6;} + { echo "$as_me:$LINENO: perhaps: make install pkgconfigdir=$ax_warning_default_pkgconfig_dir" >&5 +echo "$as_me: perhaps: make install pkgconfigdir=$ax_warning_default_pkgconfig_dir" >&6;} + cat >&5 <<EOF + pkgconfigdir: the default pkgconfigdir of $ax_warning_default_pkgconfig_loc + pkgconfigdir: is not listed in the dirlist where pkg-config will look for + pkgconfigdir: package-configs - you can override the install-path using + pkgconfigdir: make install pkgconfigdir=$ax_warning_default_pkgconfig_dir + pkgconfigdir: or set/append the directory to the environment variable + pkgconfigdir: PKG_CONFIG_PATH="$ax_warning_default_pkgconfig_loc" +EOF + fi + +pkgconfigdir="$ax_warning_default_pkgconfig_dir" + + +# Check whether --enable-enable-default-aclocaldir or --disable-enable-default-aclocaldir was given. +if test "${enable_enable_default_aclocaldir+set}" = set; then + enableval="$enable_enable_default_aclocaldir" + +fi; +test ".$enable_default_aclocaldir" = "." && enable_default_aclocaldir="no" +case ".$enable_default_aclocaldir" in + .no) ax_warning_default_aclocal_def='${datadir}/aclocal' ;; + .yes) # autodetect + if test ".$ACLOCAL" = "." ; then + # Extract the first word of "aclocal", so it can be a program name with args. +set dummy aclocal; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_ACLOCAL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $ACLOCAL in + [\\/]* | ?:[\\/]*) + ac_cv_path_ACLOCAL="$ACLOCAL" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ACLOCAL="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_ACLOCAL" && ac_cv_path_ACLOCAL=":" + ;; +esac +fi +ACLOCAL=$ac_cv_path_ACLOCAL + +if test -n "$ACLOCAL"; then + echo "$as_me:$LINENO: result: $ACLOCAL" >&5 +echo "${ECHO_T}$ACLOCAL" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + fi + ax_warning_default_aclocal_bin="$ACLOCAL" + test ".$ax_warning_default_aclocal_bin" = "." && ax_warning_default_aclocal_bin="aclocal" + ax_warning_default_aclocal_def=`test ".$SHELL" = "." && SHELL="'sh'" ; eval "$ax_warning_default_aclocal_bin --print-ac-dir"` + test ".$ax_warning_default_aclocal_def" = "." && test -d "/usr/share/aclocal" && ax_warning_default_aclocal_def="/usr/share/aclocal" + test ".$ax_warning_default_aclocal_def" = "." && ax_warning_default_aclocal_def="/tmp" ;; + *) ax_warning_default_aclocal_def="$enable_default_aclocaldir" ;; +esac +ax_warning_default_aclocal_loc='$ax_warning_default_aclocal_def' + + if test ".$ACLOCAL" = "." ; then + # Extract the first word of "aclocal", so it can be a program name with args. +set dummy aclocal; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_ACLOCAL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $ACLOCAL in + [\\/]* | ?:[\\/]*) + ac_cv_path_ACLOCAL="$ACLOCAL" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ACLOCAL="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_ACLOCAL" && ac_cv_path_ACLOCAL=":" + ;; +esac +fi +ACLOCAL=$ac_cv_path_ACLOCAL + +if test -n "$ACLOCAL"; then + echo "$as_me:$LINENO: result: $ACLOCAL" >&5 +echo "${ECHO_T}$ACLOCAL" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + fi + ax_warning_default_aclocal_bin="$ACLOCAL" + test ".$ax_warning_default_aclocal_bin" = "." && ax_warning_default_aclocal_bin="aclocal" + ax_warning_default_aclocal_dir=`test ".$SHELL" = "." && SHELL="'sh'" ; eval "$ax_warning_default_aclocal_bin --print-ac-dir"` + test ".$ax_warning_default_aclocal_dir" = "." && test -d "/usr/share/aclocal" && ax_warning_default_aclocal_dir="/usr/share/aclocal" + test ".$ax_warning_default_aclocal_dir" = "." && ax_warning_default_aclocal_dir="/tmp" +ax_warning_default_aclocal_dir=`eval "echo $ax_warning_default_aclocal_dir"` # we need to expand +ax_warning_default_aclocal_dir=`eval "echo $ax_warning_default_aclocal_dir"` +ax_warning_default_aclocal_loc=`eval "echo $ax_warning_default_aclocal_loc"` +ax_warning_default_aclocal_loc=`eval "echo $ax_warning_default_aclocal_loc"` +ax_warning_default_aclocal_loc=`eval "echo $ax_warning_default_aclocal_loc"` +ax_warning_default_aclocal_loc=`eval "echo $ax_warning_default_aclocal_loc"` +{ (echo "$as_me:$LINENO: : test \"\$ax_warning_default_aclocal_loc\" = \"\$ax_warning_default_aclocal_dir\"") >&5 + (: test "$ax_warning_default_aclocal_loc" = "$ax_warning_default_aclocal_dir") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +if test "$ax_warning_default_aclocal_loc" != "$ax_warning_default_aclocal_dir" ; then + if test -f "$ax_warning_default_aclocal_dir/dirlist" ; then + for ax_warning_default_aclocal_dir in `cat $ax_warning_default_aclocal_dir/dirlist` $ax_warning_default_aclocal_dir ; do + { (echo "$as_me:$LINENO: : test \"\$ax_warning_default_aclocal_loc\" = \"\$ax_warning_default_aclocal_dir\"") >&5 + (: test "$ax_warning_default_aclocal_loc" = "$ax_warning_default_aclocal_dir") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + test "$ax_warning_default_aclocal_loc" = "$ax_warning_default_aclocal_dir" && break + done + fi + if test "$ax_warning_default_aclocal_loc" != "$ax_warning_default_aclocal_dir" ; then + { echo "$as_me:$LINENO: warning: aclocaldir=$ax_warning_default_aclocal_loc (see config.log)" >&5 +echo "$as_me: warning: aclocaldir=$ax_warning_default_aclocal_loc (see config.log)" >&6;} + { echo "$as_me:$LINENO: perhaps: make install aclocaldir=$ax_warning_default_aclocal_dir" >&5 +echo "$as_me: perhaps: make install aclocaldir=$ax_warning_default_aclocal_dir" >&6;} + cat >&5 <<EOF + aclocaldir: the default aclocaldir of $ax_warning_default_aclocal_loc + aclocaldir: is not listed in the dirlist where aclocal will look + aclocaldir: for macros - you can override the install-path using + aclocaldir: make install aclocaldir=$ax_warning_default_aclocal_dir + aclocaldir: or append the directory to aclocal reconfigures later as + aclocaldir: aclocal -I $ax_warning_default_aclocal_loc + aclocaldir: when an autoconf macro is needed from that directory +EOF + fi +fi + +aclocaldir="$ax_warning_default_aclocal_dir" + + + + ac_config_files="$ac_config_files Makefile zzip/Makefile zzipwrap/Makefile SDL/Makefile docs/Makefile test/Makefile bins/Makefile" +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, don't put newlines in cache variables' values. +# 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. +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *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 \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file + else + echo "not updating unwritable cache $cache_file" + 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}' + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ 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[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $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} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# 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+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; 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 + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# 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 + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + 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 + + ;; + 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 + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } + + # 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 sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# 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'" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + +exec 6>&1 + +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by $as_me, which was +generated by GNU Autoconf 2.59. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\_ACEOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -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 + --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 <bug-autoconf@gnu.org>." +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2003 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +srcdir=$srcdir +INSTALL="$INSTALL" +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +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=$1 + ac_optarg=$2 + ac_shift=shift + ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + + 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 +if \$ac_cs_recheck; then + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +# +# INIT-COMMANDS section. +# + +ax_enable_builddir_srcdir="$srcdir" # $srcdir +ax_enable_builddir_host="$HOST" # $HOST / $host +ax_enable_builddir_version="$VERSION" # $VERSION +ax_enable_builddir_package="$PACKAGE" # $PACKAGE +ax_enable_builddir_sed="$ax_enable_builddir_sed" # $SED +ax_enable_builddir="$ax_enable_builddir" # $SUB + +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" +PACKAGE="$PACKAGE" +PACKAGE="$PACKAGE" + +ax_create_pkgconfig_generate="$ax_create_pkgconfig_generate" +pkgconfig_prefix='$prefix' +pkgconfig_execprefix='$exec_prefix' +pkgconfig_bindir='$bindir' +pkgconfig_libdir='$libdir' +pkgconfig_includedir='$includedir' +pkgconfig_datadir='$datadir' +pkgconfig_sysconfdir='$sysconfdir' +pkgconfig_suffix='$ax_create_pkgconfig_suffix' +pkgconfig_package='$PACKAGE_NAME' +pkgconfig_libname='$ax_create_pkgconfig_libname' +pkgconfig_description='$ax_create_pkgconfig_description' +pkgconfig_version='$ax_create_pkgconfig_version' +pkgconfig_requires='$ax_create_pkgconfig_requires' +pkgconfig_libs='$ax_create_pkgconfig_libs' +pkgconfig_ldflags='$ax_create_pkgconfig_ldflags' +pkgconfig_cppflags='$ax_create_pkgconfig_cppflags' +pkgconfig_src_libdir='$ax_create_pkgconfig_src_libdir' +pkgconfig_src_headers='$ax_create_pkgconfig_src_headers' + + +_ACEOF + + + +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "zzip/Makefile" ) CONFIG_FILES="$CONFIG_FILES zzip/Makefile" ;; + "zzipwrap/Makefile" ) CONFIG_FILES="$CONFIG_FILES zzipwrap/Makefile" ;; + "SDL/Makefile" ) CONFIG_FILES="$CONFIG_FILES SDL/Makefile" ;; + "docs/Makefile" ) CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; + "test/Makefile" ) CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; + "bins/Makefile" ) CONFIG_FILES="$CONFIG_FILES bins/Makefile" ;; + "buildir" ) CONFIG_COMMANDS="$CONFIG_COMMANDS buildir" ;; + "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "zzip/_config.h" ) CONFIG_COMMANDS="$CONFIG_COMMANDS zzip/_config.h" ;; + "zzip/_msvc.h" ) CONFIG_COMMANDS="$CONFIG_COMMANDS zzip/_msvc.h" ;; + "$ax_create_pkgconfig_generate" ) CONFIG_COMMANDS="$CONFIG_COMMANDS $ax_create_pkgconfig_generate" ;; + "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + 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 to put it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + +# +# CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t +s,@host@,$host,;t t +s,@host_cpu@,$host_cpu,;t t +s,@host_vendor@,$host_vendor,;t t +s,@host_os@,$host_os,;t t +s,@target@,$target,;t t +s,@target_cpu@,$target_cpu,;t t +s,@target_vendor@,$target_vendor,;t t +s,@target_os@,$target_os,;t t +s,@ax_enable_builddir_sed@,$ax_enable_builddir_sed,;t t +s,@THREAD_SAFE@,$THREAD_SAFE,;t t +s,@ZLIB_INCL@,$ZLIB_INCL,;t t +s,@ZLIB_LDIR@,$ZLIB_LDIR,;t t +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +s,@INSTALL_DATA@,$INSTALL_DATA,;t t +s,@CYGPATH_W@,$CYGPATH_W,;t t +s,@PACKAGE@,$PACKAGE,;t t +s,@VERSION@,$VERSION,;t t +s,@ACLOCAL@,$ACLOCAL,;t t +s,@AUTOCONF@,$AUTOCONF,;t t +s,@AUTOMAKE@,$AUTOMAKE,;t t +s,@AUTOHEADER@,$AUTOHEADER,;t t +s,@MAKEINFO@,$MAKEINFO,;t t +s,@install_sh@,$install_sh,;t t +s,@STRIP@,$STRIP,;t t +s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t +s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t +s,@mkdir_p@,$mkdir_p,;t t +s,@AWK@,$AWK,;t t +s,@SET_MAKE@,$SET_MAKE,;t t +s,@am__leading_dot@,$am__leading_dot,;t t +s,@AMTAR@,$AMTAR,;t t +s,@am__tar@,$am__tar,;t t +s,@am__untar@,$am__untar,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@DEPDIR@,$DEPDIR,;t t +s,@am__include@,$am__include,;t t +s,@am__quote@,$am__quote,;t t +s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t +s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t +s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t +s,@CCDEPMODE@,$CCDEPMODE,;t t +s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t +s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t +s,@EGREP@,$EGREP,;t t +s,@LN_S@,$LN_S,;t t +s,@ECHO@,$ECHO,;t t +s,@AR@,$AR,;t t +s,@ac_ct_AR@,$ac_ct_AR,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@DLLTOOL@,$DLLTOOL,;t t +s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t +s,@AS@,$AS,;t t +s,@ac_ct_AS@,$ac_ct_AS,;t t +s,@OBJDUMP@,$OBJDUMP,;t t +s,@ac_ct_OBJDUMP@,$ac_ct_OBJDUMP,;t t +s,@CPP@,$CPP,;t t +s,@CXX@,$CXX,;t t +s,@CXXFLAGS@,$CXXFLAGS,;t t +s,@ac_ct_CXX@,$ac_ct_CXX,;t t +s,@CXXDEPMODE@,$CXXDEPMODE,;t t +s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t +s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t +s,@CXXCPP@,$CXXCPP,;t t +s,@F77@,$F77,;t t +s,@FFLAGS@,$FFLAGS,;t t +s,@ac_ct_F77@,$ac_ct_F77,;t t +s,@LIBTOOL@,$LIBTOOL,;t t +s,@RELEASE_INFO@,$RELEASE_INFO,;t t +s,@VERSION_INFO@,$VERSION_INFO,;t t +s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t +s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t +s,@MAINT@,$MAINT,;t t +s,@pkgconfig_libdir@,$pkgconfig_libdir,;t t +s,@pkgconfig_libfile@,$pkgconfig_libfile,;t t +s,@PERL@,$PERL,;t t +s,@PYTHON@,$PYTHON,;t t +s,@MKZIP@,$MKZIP,;t t +s,@XMLTO@,$XMLTO,;t t +s,@LARGEFILE_CFLAGS@,$LARGEFILE_CFLAGS,;t t +s,@ZLIB_VERSION@,$ZLIB_VERSION,;t t +s,@docdir@,$docdir,;t t +s,@SDL@,$SDL,;t t +s,@ZIPTESTS@,$ZIPTESTS,;t t +s,@ZZIPLIB_LDFLAGS@,$ZZIPLIB_LDFLAGS,;t t +s,@RESOLVES@,$RESOLVES,;t t +s,@PKG_CONFIG@,$PKG_CONFIG,;t t +s,@pkgconfigdir@,$pkgconfigdir,;t t +s,@aclocaldir@,$aclocaldir,;t t +s,@CONFIG_FILES@,$CONFIG_FILES,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + esac + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # 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. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;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,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +s,@INSTALL@,$ac_INSTALL,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_HEADER section. +# + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' +ac_uC=' ' +ac_uD=',;t' + +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + # Do quote $f, to prevent DOS paths from being IFS'd. + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + +_ACEOF + +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\_ACEOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end +_ACEOF +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed + +# This sed command replaces #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. +cat >>conftest.undefs <<\_ACEOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +_ACEOF + +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.defines >/dev/null +do + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines +echo ' fi # grep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS + +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.undefs >/dev/null +do + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs + +cat >>$CONFIG_STATUS <<\_ACEOF + # 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. */ + if test x"$ac_file" = x-; then + echo "/* Generated by configure. */" >$tmp/config.h + else + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h + fi + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + rm -f $ac_file + mv $tmp/config.h $ac_file + fi + else + cat $tmp/config.h + rm -f $tmp/config.h + fi +# Compute $ac_file's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $ac_file | $ac_file:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || +$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X$ac_file : 'X\(//\)[^/]' \| \ + X$ac_file : 'X\(//\)$' \| \ + X$ac_file : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X$ac_file | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'`/stamp-h$_am_stamp_count +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_COMMANDS section. +# +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue + ac_dest=`echo "$ac_file" | sed 's,:.*,,'` + ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_dir=`(dirname "$ac_dest") 2>/dev/null || +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_dest" : 'X\(//\)[^/]' \| \ + X"$ac_dest" : 'X\(//\)$' \| \ + X"$ac_dest" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_dest" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +echo "$as_me: executing $ac_dest commands" >&6;} + case $ac_dest in + buildir ) ac_top_srcdir="$ax_enable_builddir_srcdir" + if test ".$ax_enable_builddir" = "." ; then + if test -f "$top_srcdir/Makefile" ; then + { echo "$as_me:$LINENO: skipping top_srcdir/Makefile - left untouched" >&5 +echo "$as_me: skipping top_srcdir/Makefile - left untouched" >&6;} + else + { echo "$as_me:$LINENO: skipping top_srcdir/Makefile - not created" >&5 +echo "$as_me: skipping top_srcdir/Makefile - not created" >&6;} + fi + else + { echo "$as_me:$LINENO: create top_srcdir/Makefile guessed from local Makefile" >&5 +echo "$as_me: create top_srcdir/Makefile guessed from local Makefile" >&6;} + x='`' ; cat >$tmp/conftemp.sed <<_EOF +/^\$/n +x +/^\$/bS +x +/\\\\\$/{H;d;} +{H;s/.*//;x;} +bM +:S +x +/\\\\\$/{h;d;} +{h;s/.*//;x;} +:M +s/\\(\\n\\) /\\1 /g +/^ /d +/^[ ]*[\\#]/d +/^VPATH *=/d +s/^srcdir *=.*/srcdir = ./ +s/^top_srcdir *=.*/top_srcdir = ./ +/[:=]/!d +/^\\./d +s/:.*/:/ +/:\$/s/ / /g +/:\$/s/ / /g +/^.*[=]/!s%\$% ; (cd \$(BUILD) \\&\\& \$(ISNOTSRCDIR) \\&\\& \$(MAKE) "\$\@") || exit ; \$(MAKE) done "RULE=\$\@"% +_EOF + test ".$USE_MAINTAINER_MODE" = ".no" || \ + cp "$tmp/conftemp.sed" "$ac_top_srcdir/makefile.sed~" ## DEBUGGING + echo 'BUILD=`uname -msr | tr " /" "__"`.d' >$ac_top_srcdir/Makefile + echo 'ISNOTSRCDIR=test ! -f configure' >>$ac_top_srcdir/Makefile + $ax_enable_builddir_sed -f $tmp/conftemp.sed Makefile >>$ac_top_srcdir/Makefile + echo 'done: ;@ if grep "$(RULE)-done .*:" Makefile > /dev/null; then echo $(MAKE) $(RULE)-done ; $(MAKE) $(RULE)-done ; else true ; fi' >> $ac_top_srcdir/Makefile + if test -f "$ac_top_srcdir/Makefile.mk" ; then + { echo "$as_me:$LINENO: extend top_srcdir/Makefile with top_srcdir/Makefile.mk" >&5 +echo "$as_me: extend top_srcdir/Makefile with top_srcdir/Makefile.mk" >&6;} + cat $ac_top_srcdir/Makefile.mk >>$ac_top_srcdir/Makefile + fi + { echo "$as_me:$LINENO: make uses BUILD=$ax_enable_builddir (on $ax_enable_builddir_host:)" >&5 +echo "$as_me: make uses BUILD=$ax_enable_builddir (on $ax_enable_builddir_host:)" >&6;} + fi + ;; + depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; 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. + # So let's grep whole file. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + dirpart=`(dirname "$mf") 2>/dev/null || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +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"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //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' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`(dirname "$file") 2>/dev/null || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p $dirpart/$fdir + else + as_dir=$dirpart/$fdir + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 +echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} + { (exit 1); exit 1; }; }; } + + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done + ;; + zzip/_config.h ) ac_prefix_conf_OUT=`echo zzip/_config.h` +ac_prefix_conf_DEF=`echo _$ac_prefix_conf_OUT | sed -e "y:abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:" -e "s/[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g"` +ac_prefix_conf_PKG=`echo zzip` +ac_prefix_conf_LOW=`echo _$ac_prefix_conf_PKG | sed -e "y:ABCDEFGHIJKLMNOPQRSTUVWXYZ-:abcdefghijklmnopqrstuvwxyz_:"` +ac_prefix_conf_UPP=`echo $ac_prefix_conf_PKG | sed -e "y:abcdefghijklmnopqrstuvwxyz-:ABCDEFGHIJKLMNOPQRSTUVWXYZ_:" -e "/^[0123456789]/s/^/_/"` +ac_prefix_conf_INP=`echo "config.h" | sed -e 's/ *//'` +if test ".$ac_prefix_conf_INP" = "."; then + for ac_file in : $CONFIG_HEADERS; do test "_$ac_file" = _: && continue + case "$ac_file" in + *.h) ac_prefix_conf_INP=$ac_file ;; + *) + esac + test ".$ac_prefix_conf_INP" != "." && break + done +fi +if test ".$ac_prefix_conf_INP" = "."; then + case "$ac_prefix_conf_OUT" in + */*) ac_prefix_conf_INP=`basename "$ac_prefix_conf_OUT"` + ;; + *-*) ac_prefix_conf_INP=`echo "$ac_prefix_conf_OUT" | sed -e "s/[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*-//"` + ;; + *) ac_prefix_conf_INP=config.h + ;; + esac +fi +if test -z "$ac_prefix_conf_PKG" ; then + { { echo "$as_me:$LINENO: error: no prefix for _PREFIX_PKG_CONFIG_H" >&5 +echo "$as_me: error: no prefix for _PREFIX_PKG_CONFIG_H" >&2;} + { (exit 1); exit 1; }; } +else + if test ! -f "$ac_prefix_conf_INP" ; then if test -f "$srcdir/$ac_prefix_conf_INP" ; then + ac_prefix_conf_INP="$srcdir/$ac_prefix_conf_INP" + fi fi + { echo "$as_me:$LINENO: creating $ac_prefix_conf_OUT - prefix $ac_prefix_conf_UPP for $ac_prefix_conf_INP defines" >&5 +echo "$as_me: creating $ac_prefix_conf_OUT - prefix $ac_prefix_conf_UPP for $ac_prefix_conf_INP defines" >&6;} + if test -f $ac_prefix_conf_INP ; then + echo "s/#undef *\\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]\\)/#undef $ac_prefix_conf_UPP""_\\1/" > conftest.prefix + echo "s/#undef *\\([abcdefghijklmnopqrstuvwxyz]\\)/#undef $ac_prefix_conf_LOW""_\\1/" >> conftest.prefix + echo "s/#define *\\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*\\)\\(.*\\)/#ifndef $ac_prefix_conf_UPP""_\\1 \\" >> conftest.prefix + echo "#define $ac_prefix_conf_UPP""_\\1 \\2 \\" >> conftest.prefix + echo "#endif/" >>conftest.prefix + echo "s/#define *\\([abcdefghijklmnopqrstuvwxyz][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*\\)\\(.*\\)/#ifndef $ac_prefix_conf_LOW""_\\1 \\" >> conftest.prefix + echo "#define $ac_prefix_conf_LOW""_\\1 \\2 \\" >> conftest.prefix + echo "#endif/" >> conftest.prefix + # now executing _script on _DEF input to create _OUT output file + echo "#ifndef $ac_prefix_conf_DEF" >$tmp/pconfig.h + echo "#define $ac_prefix_conf_DEF 1" >>$tmp/pconfig.h + echo ' ' >>$tmp/pconfig.h + echo /'*' $ac_prefix_conf_OUT. Generated automatically at end of configure. '*'/ >>$tmp/pconfig.h + + sed -f conftest.prefix $ac_prefix_conf_INP >>$tmp/pconfig.h + echo ' ' >>$tmp/pconfig.h + echo '/* once:' $ac_prefix_conf_DEF '*/' >>$tmp/pconfig.h + echo "#endif" >>$tmp/pconfig.h + if cmp -s $ac_prefix_conf_OUT $tmp/pconfig.h 2>/dev/null; then + { echo "$as_me:$LINENO: $ac_prefix_conf_OUT is unchanged" >&5 +echo "$as_me: $ac_prefix_conf_OUT is unchanged" >&6;} + else + ac_dir=`(dirname "$ac_prefix_conf_OUT") 2>/dev/null || +$as_expr X"$ac_prefix_conf_OUT" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_prefix_conf_OUT" : 'X\(//\)[^/]' \| \ + X"$ac_prefix_conf_OUT" : 'X\(//\)$' \| \ + X"$ac_prefix_conf_OUT" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_prefix_conf_OUT" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + rm -f "$ac_prefix_conf_OUT" + mv $tmp/pconfig.h "$ac_prefix_conf_OUT" + fi + cp conftest.prefix _configs.sed + else + { { echo "$as_me:$LINENO: error: input file $ac_prefix_conf_INP does not exist - skip generating $ac_prefix_conf_OUT" >&5 +echo "$as_me: error: input file $ac_prefix_conf_INP does not exist - skip generating $ac_prefix_conf_OUT" >&2;} + { (exit 1); exit 1; }; } + fi + rm -f conftest.* +fi + ;; + zzip/_msvc.h ) ac_prefix_conf_OUT=`echo zzip/_msvc.h` +ac_prefix_conf_DEF=`echo _$ac_prefix_conf_OUT | sed -e "y:abcdefghijklmnopqrstuvwxyz:ABCDEFGHIJKLMNOPQRSTUVWXYZ:" -e "s/[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g"` +ac_prefix_conf_PKG=`echo zzip` +ac_prefix_conf_LOW=`echo _$ac_prefix_conf_PKG | sed -e "y:ABCDEFGHIJKLMNOPQRSTUVWXYZ-:abcdefghijklmnopqrstuvwxyz_:"` +ac_prefix_conf_UPP=`echo $ac_prefix_conf_PKG | sed -e "y:abcdefghijklmnopqrstuvwxyz-:ABCDEFGHIJKLMNOPQRSTUVWXYZ_:" -e "/^[0123456789]/s/^/_/"` +ac_prefix_conf_INP=`echo "zzip/_msvc.in" | sed -e 's/ *//'` +if test ".$ac_prefix_conf_INP" = "."; then + for ac_file in : $CONFIG_HEADERS; do test "_$ac_file" = _: && continue + case "$ac_file" in + *.h) ac_prefix_conf_INP=$ac_file ;; + *) + esac + test ".$ac_prefix_conf_INP" != "." && break + done +fi +if test ".$ac_prefix_conf_INP" = "."; then + case "$ac_prefix_conf_OUT" in + */*) ac_prefix_conf_INP=`basename "$ac_prefix_conf_OUT"` + ;; + *-*) ac_prefix_conf_INP=`echo "$ac_prefix_conf_OUT" | sed -e "s/[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*-//"` + ;; + *) ac_prefix_conf_INP=config.h + ;; + esac +fi +if test -z "$ac_prefix_conf_PKG" ; then + { { echo "$as_me:$LINENO: error: no prefix for _PREFIX_PKG_CONFIG_H" >&5 +echo "$as_me: error: no prefix for _PREFIX_PKG_CONFIG_H" >&2;} + { (exit 1); exit 1; }; } +else + if test ! -f "$ac_prefix_conf_INP" ; then if test -f "$srcdir/$ac_prefix_conf_INP" ; then + ac_prefix_conf_INP="$srcdir/$ac_prefix_conf_INP" + fi fi + { echo "$as_me:$LINENO: creating $ac_prefix_conf_OUT - prefix $ac_prefix_conf_UPP for $ac_prefix_conf_INP defines" >&5 +echo "$as_me: creating $ac_prefix_conf_OUT - prefix $ac_prefix_conf_UPP for $ac_prefix_conf_INP defines" >&6;} + if test -f $ac_prefix_conf_INP ; then + echo "s/#undef *\\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_]\\)/#undef $ac_prefix_conf_UPP""_\\1/" > conftest.prefix + echo "s/#undef *\\([abcdefghijklmnopqrstuvwxyz]\\)/#undef $ac_prefix_conf_LOW""_\\1/" >> conftest.prefix + echo "s/#define *\\([ABCDEFGHIJKLMNOPQRSTUVWXYZ_][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*\\)\\(.*\\)/#ifndef $ac_prefix_conf_UPP""_\\1 \\" >> conftest.prefix + echo "#define $ac_prefix_conf_UPP""_\\1 \\2 \\" >> conftest.prefix + echo "#endif/" >>conftest.prefix + echo "s/#define *\\([abcdefghijklmnopqrstuvwxyz][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]*\\)\\(.*\\)/#ifndef $ac_prefix_conf_LOW""_\\1 \\" >> conftest.prefix + echo "#define $ac_prefix_conf_LOW""_\\1 \\2 \\" >> conftest.prefix + echo "#endif/" >> conftest.prefix + # now executing _script on _DEF input to create _OUT output file + echo "#ifndef $ac_prefix_conf_DEF" >$tmp/pconfig.h + echo "#define $ac_prefix_conf_DEF 1" >>$tmp/pconfig.h + echo ' ' >>$tmp/pconfig.h + echo /'*' $ac_prefix_conf_OUT. Generated automatically at end of configure. '*'/ >>$tmp/pconfig.h + + sed -f conftest.prefix $ac_prefix_conf_INP >>$tmp/pconfig.h + echo ' ' >>$tmp/pconfig.h + echo '/* once:' $ac_prefix_conf_DEF '*/' >>$tmp/pconfig.h + echo "#endif" >>$tmp/pconfig.h + if cmp -s $ac_prefix_conf_OUT $tmp/pconfig.h 2>/dev/null; then + { echo "$as_me:$LINENO: $ac_prefix_conf_OUT is unchanged" >&5 +echo "$as_me: $ac_prefix_conf_OUT is unchanged" >&6;} + else + ac_dir=`(dirname "$ac_prefix_conf_OUT") 2>/dev/null || +$as_expr X"$ac_prefix_conf_OUT" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_prefix_conf_OUT" : 'X\(//\)[^/]' \| \ + X"$ac_prefix_conf_OUT" : 'X\(//\)$' \| \ + X"$ac_prefix_conf_OUT" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_prefix_conf_OUT" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + rm -f "$ac_prefix_conf_OUT" + mv $tmp/pconfig.h "$ac_prefix_conf_OUT" + fi + cp conftest.prefix _configs.sed + else + { { echo "$as_me:$LINENO: error: input file $ac_prefix_conf_INP does not exist - skip generating $ac_prefix_conf_OUT" >&5 +echo "$as_me: error: input file $ac_prefix_conf_INP does not exist - skip generating $ac_prefix_conf_OUT" >&2;} + { (exit 1); exit 1; }; } + fi + rm -f conftest.* +fi + ;; + $ax_create_pkgconfig_generate ) +pkgconfig_generate="$ax_create_pkgconfig_generate" +if test ! -f "$pkgconfig_generate.in" +then generate="true" +elif grep ' generated by configure ' $pkgconfig_generate.in >/dev/null +then generate="true" +else generate="false"; +fi +if $generate ; then +{ echo "$as_me:$LINENO: creating $pkgconfig_generate.in" >&5 +echo "$as_me: creating $pkgconfig_generate.in" >&6;} +cat > $pkgconfig_generate.in <<AXEOF +# generated by configure / remove this line to disable regeneration +prefix=@prefix@ +exec_prefix=@exec_prefix@ +bindir=@bindir@ +libdir=@libdir@ +datadir=@datadir@ +sysconfdir=@sysconfdir@ +includedir=@includedir@ +package=@PACKAGE@ +suffix=@suffix@ + +Name: @PACKAGE_NAME@ +Description: @PACKAGE_DESCRIPTION@ +Version: @PACKAGE_VERSION@ +Requires: @PACKAGE_REQUIRES@ +Libs: -L\${libdir} @LDFLAGS@ @LIBS@ +Cflags: -I\${includedir} @CPPFLAGS@ +AXEOF +fi # DONE generate $pkgconfig_generate.in +{ echo "$as_me:$LINENO: creating $pkgconfig_generate" >&5 +echo "$as_me: creating $pkgconfig_generate" >&6;} +cat >conftest.sed <<AXEOF +s|@prefix@|${pkgconfig_prefix}| +s|@exec_prefix@|${pkgconfig_execprefix}| +s|@bindir@|${pkgconfig_bindir}| +s|@libdir@|${pkgconfig_libdir}| +s|@datadir@|${pkgconfig_datadir}| +s|@sysconfdir@|${pkgconfig_sysconfdir}| +s|@includedir@|${pkgconfig_includedir}| +s|@suffix@|${pkgconfig_suffix}| +s|@PACKAGE@|${pkgconfig_package}| +s|@PACKAGE_NAME@|${pkgconfig_libname}| +s|@PACKAGE_DESCRIPTION@|${pkgconfig_description}| +s|@PACKAGE_VERSION@|${pkgconfig_version}| +s|@PACKAGE_REQUIRES@|${pkgconfig_requires}| +s|@LIBS@|${pkgconfig_libs}| +s|@LDFLAGS@|${pkgconfig_ldflags}| +s|@CPPFLAGS@|${pkgconfig_cppflags}| +AXEOF +sed -f conftest.sed $pkgconfig_generate.in > $pkgconfig_generate +if test ! -s $pkgconfig_generate ; then + { { echo "$as_me:$LINENO: error: $pkgconfig_generate is empty" >&5 +echo "$as_me: error: $pkgconfig_generate is empty" >&2;} + { (exit 1); exit 1; }; } +fi ; rm conftest.sed # DONE generate $pkgconfig_generate +pkgconfig_uninstalled=`echo $pkgconfig_generate |sed 's/.pc$/-uninstalled.pc/'` +{ echo "$as_me:$LINENO: creating $pkgconfig_uninstalled" >&5 +echo "$as_me: creating $pkgconfig_uninstalled" >&6;} +cat >conftest.sed <<AXEOF +s|@prefix@|${pkgconfig_prefix}| +s|@exec_prefix@|${pkgconfig_execprefix}| +s|@bindir@|${pkgconfig_bindir}| +s|@libdir@|${pkgconfig_src_libdir}| +s|@datadir@|${pkgconfig_datadir}| +s|@sysconfdir@|${pkgconfig_sysconfdir}| +s|@includedir@|${pkgconfig_src_headers}| +s|@suffix@|${pkgconfig_suffix}| +s|@PACKAGE@|${pkgconfig_package}| +s|@PACKAGE_NAME@|${pkgconfig_libname}| +s|@PACKAGE_DESCRIPTION@|${pkgconfig_description}| +s|@PACKAGE_VERSION@|${pkgconfig_version}| +s|@PACKAGE_REQUIRES@|${pkgconfig_requires}| +s|@LIBS@|${pkgconfig_libs}| +s|@LDFLAGS@|${pkgconfig_ldflags}| +s|@CPPFLAGS@|${pkgconfig_cppflags}| +AXEOF +sed -f conftest.sed $pkgconfig_generate.in > $pkgconfig_uninstalled +if test ! -s $pkgconfig_uninstalled ; then + { { echo "$as_me:$LINENO: error: $pkgconfig_uninstalled is empty" >&5 +echo "$as_me: error: $pkgconfig_uninstalled is empty" >&2;} + { (exit 1); exit 1; }; } +fi ; rm conftest.sed # DONE generate $pkgconfig_uninstalled + pkgconfig_requires_add=`echo ${pkgconfig_requires}` +if test ".$pkgconfig_requires_add" != "." ; then + pkgconfig_requires_add="pkg-config $pkgconfig_requires_add" + else pkgconfig_requires_add=":" ; fi +pkgconfig_uninstalled=`echo $pkgconfig_generate |sed 's/.pc$/-uninstalled.sh/'` +{ echo "$as_me:$LINENO: creating $pkgconfig_uninstalled" >&5 +echo "$as_me: creating $pkgconfig_uninstalled" >&6;} +cat >conftest.sed <<AXEOF +s|@prefix@|\"${pkgconfig_prefix}\"| +s|@exec_prefix@|\"${pkgconfig_execprefix}\"| +s|@bindir@|\"${pkgconfig_bindir}\"| +s|@libdir@|\"${pkgconfig_src_libdir}\"| +s|@datadir@|\"${pkgconfig_datadir}\"| +s|@sysconfdir@|\"${pkgconfig_sysconfdir}\"| +s|@includedir@|\"${pkgconfig_src_headers}\"| +s|@suffix@|\"${pkgconfig_suffix}\"| +s|@PACKAGE@|\"${pkgconfig_package}\"| +s|@PACKAGE_NAME@|\"${pkgconfig_libname}\"| +s|@PACKAGE_DESCRIPTION@|\"${pkgconfig_description}\"| +s|@PACKAGE_VERSION@|\"${pkgconfig_version}\"| +s|@PACKAGE_REQUIRES@|\"${pkgconfig_requires}\"| +s|@LIBS@|\"${pkgconfig_libs}\"| +s|@LDFLAGS@|\"${pkgconfig_ldflags}\"| +s|@CPPFLAGS@|\"${pkgconfig_cppflags}\"| +s>Name:>for option\\; do case \"\$option\" in --list-all|--name) echo > +s>Description: *>\\;\\; --help) pkg-config --help \\; echo Buildscript Of > +s>Version: *>\\;\\; --modversion|--version) echo > +s>Requires:>\\;\\; --requires) echo $pkgconfig_requires_add> +s>Libs: *>\\;\\; --libs) echo > +s>Cflags: *>\\;\\; --cflags) echo > +/--libs)/a\\ + $pkgconfig_requires_add +/--cflags)/a\\ + $pkgconfig_requires_add\\ +;; --variable=*) eval echo '\$'\`echo \$option | sed -e 's/.*=//'\`\\ +;; --uninstalled) exit 0 \\ +;; *) ;; esac done +AXEOF +sed -f conftest.sed $pkgconfig_generate.in > $pkgconfig_uninstalled +if test ! -s $pkgconfig_uninstalled ; then + { { echo "$as_me:$LINENO: error: $pkgconfig_uninstalled is empty" >&5 +echo "$as_me: error: $pkgconfig_uninstalled is empty" >&2;} + { (exit 1); exit 1; }; } +fi ; rm conftest.sed # DONE generate $pkgconfig_uninstalled + ;; + esac +done +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# 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 || { (exit 1); exit 1; } +fi + +# libtool-1.4 specific, on zsh target the final requoting does one too much +case "$host_os" in + darwin*) + if grep "1.92" libtool >/dev/null ; then +echo "$as_me:$LINENO: result: patching libtool on .so-sharedlib creation (zsh overquoting)" >&5 +echo "${ECHO_T}patching libtool on .so-sharedlib creation (zsh overquoting)" >&6 + test -f libtool.old || (mv libtool libtool.old && cp libtool.old libtool) + sed -e '/archive_cmds=/s:[\\][\\][\\]*":\\":g' libtool >libtool.new + (test -s libtool.new || rm libtool.new) 2>/dev/null + test -f libtool.new && mv libtool.new libtool # not 2>/dev/null !! + test -f libtool || mv libtool.old libtool + fi + ;; +esac + +# patch libtool to fix sys_lib_search_path (e.g. crosscompiling a win32 dll) +if test "_$PATH_SEPARATOR" = "_:" ; then + if grep "^sys_lib_search_path_spec.*:" libtool >/dev/null ; then +echo "$as_me:$LINENO: result: patching libtool to fix sys_lib_search_path_spec" >&5 +echo "${ECHO_T}patching libtool to fix sys_lib_search_path_spec" >&6 + test -f libtool.old || (mv libtool libtool.old && cp libtool.old libtool) + sed -e "/^sys_lib_search_path_spec/s/:/ /g" libtool >libtool.new + (test -s libtool.new || rm libtool.new) 2>/dev/null + test -f libtool.new && mv libtool.new libtool # not 2>/dev/null !! + test -f libtool || mv libtool.old libtool + fi +fi + +# patch libtool to add HOST_CC sometimes needed in crosscompiling a win32 dll +if grep "HOST_CC" libtool >/dev/null; then + if test "$build" != "$host" ; then + if test "_$HOST_CC" = "_" ; then + HOST_CC="false" + for i in `echo $PATH | sed 's,:, ,g'` ; do + test -x $i/cc && HOST_CC=$i/cc + done + fi +echo "$as_me:$LINENO: result: patching libtool to add HOST_CC=$HOST_CC" >&5 +echo "${ECHO_T}patching libtool to add HOST_CC=$HOST_CC" >&6 + test -f libtool.old || (mv libtool libtool.old && cp libtool.old libtool) + sed -e "/BEGIN.*LIBTOOL.*CONFIG/a\\ +HOST_CC=$HOST_CC" libtool >libtool.new + (test -s libtool.new || rm libtool.new) 2>/dev/null + test -f libtool.new && mv libtool.new libtool # not 2>/dev/null !! + test -f libtool || mv libtool.old libtool + fi +fi + +# --------------------------------------------------------------- +echo '-----' $PACKAGE $VERSION $prefix +$SHELL libtool --features || true +echo "CFLAGS=$CFLAGS" +test "$enable_mmap" != "no" && echo "enable mmap ($enable_mmap)" +test "$enable_mmap" = "no" && echo "disable mmap ($enable_mmap)" +test "$with_lowstk" != "no" && echo "with lowstk ($with_lowstk)" +test "$with_lowstk" = "no" && echo "without lowstk ($with_lowstk)" +test "$with_debug" != "no" && echo "with debug ($with_debug)" +test "$with_debug" = "no" && echo "without debug ($with_debug)" +# test -f ./zziplib.spec && echo warning - do not build in the source dirs +echo '# make && make check && make install' diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/configure.ac b/Build/source/libs/zziplib/zziplib-0.13.58/configure.ac new file mode 100644 index 00000000000..fc0c7ff9bbf --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/configure.ac @@ -0,0 +1,320 @@ +AC_INIT(zziplib.spec) +AC_PREREQ(2.49) +AC_COPYRIGHT([Guido Draheim <guido@gmx.de> for ZZipLib.SF.net]) +AC_REVISION($Revision: 1.6 $) +AC_CONFIG_AUX_DIR(uses) +# ======================================================================= +AC_CANONICAL_SYSTEM +dnl AM_ENABLE_MULTILIB([Makefile],[$host]) +AX_ENABLE_BUILDDIR_UNAME +AC_SET_DEFAULT_PATHS_SYSTEM +# ----------------------------------------------------------------------- +AC_ARG_ENABLE(thread-safe,AC_HELP_STRING( + [--disable-thread-safe],[disable thread-safe libtool option]) + ,,[ enable_thread_safe="yes"]) +THREAD_SAFE="" +test "$enable_thread_safe" = "yes" && THREAD_SAFE="-thread-safe" +test "$enable_thread_safe" = "$host_os" && THREAD_SAFE="-thread-safe" +AC_SUBST(THREAD_SAFE) +if test -n "$THREAD_SAFE" ; then + AC_MSG_RESULT(...using thread-safe linkage) +else + AC_MSG_RESULT(disabled thread-safe linkage) +fi +# ---------------------------------------------------------------- +AC_MSG_CHECKING(zlib install prefix) +AC_ARG_WITH(zlib, AC_HELP_STRING( + [--with-zlib],[zlib prefix (e.g. '$HOME/software')]) + ,,[with_zlib="no"]) +if test "${with_zlib}" = yes ; then # choose --prefix paths + if test "${prefix}" = NONE ; then + AC_MSG_RESULT(oops, but only itself...) + AC_MSG_ERROR(--with-zlib requires a path argument or a --prefix path set) + fi + with_zlib="$prefix" +fi + +case ".$with_zlib" in + .no|.no,*) + AC_MSG_RESULT(none) + with_zlib="no, not configured" ;; + ./usr) + AC_MSG_RESULT([oops, ignored (may try --with-zlib=/usr/.)]) + with_zlib="no, /usr ignored" ;; + *) if test ! -d "$with_zlib/include" ; then + AC_MSG_RESULT(oops, given but...) + AC_MSG_ERROR("$with_zlib/include" is not a directory) + fi + if test ! -d "$with_zlib/lib" ; then + AC_MSG_RESULT(oops, given but...) + AC_MSG_ERROR("$with_zlib/lib" is not a directory) + fi + AC_MSG_RESULT($with_zlib) + ZLIB_INCL="-I$with_zlib/include" + ZLIB_LDIR="-L$with_zlib/lib" + AC_MSG_RESULT(..adding CPPFLAGS $ZLIB_INCL) + AC_MSG_RESULT(..adding LDFLAGS $ZLIB_LDIR) + CPPFLAGS="$CPPFLAGS $ZLIB_INCL" + LDFLAGS="$LDFLAGS $ZLIB_LDIR" + ;; +esac +AC_SUBST(ZLIB_INCL) +AC_SUBST(ZLIB_LDIR) +# ----------------------------------------------------------------------- +AX_SPEC_DEFAULTS +AM_INIT_AUTOMAKE($PACKAGE,$VERSION) +dnl test ".$CFLAGS" = "." && CFLAGS="" +AC_PROG_CC +dnl test ".$CFLAGS" = "." && test "$GCC" = "yes" && CFLAGS="-O3" +AC_PROG_INSTALL +AC_LIBTOOL_WIN32_DLL +AM_PROG_LIBTOOL +AX_SET_VERSION_INFO + +# ----------------------------------------------------------------------- +AC_MSG_RESULT([creating zzip/_msvc.in via zzip/_msvc.sed of config.h.in]) +test -d zzip || mkdir zzip +sed -f $srcdir/zzip/_msvc.sed $srcdir/config.h.in >zzip/_msvc.in +AC_CONFIG_HEADER(config.h) +AX_PREFIX_CONFIG_H([zzip/_config.h],[zzip],[config.h]) +AX_PREFIX_CONFIG_H([zzip/_msvc.h],[zzip],[zzip/_msvc.in]) +AM_MAINTAINER_MODE + +AX_CREATE_PKGCONFIG_INFO(dnl +[zzip/zziplib.pc], [zzip-zlib-config],[-lzzip]) +# ----------------------------------------------------------------------- +AC_PATH_PROGS(PERL, perl5 perl, echo no perl found for) +AC_PATH_PROGS(PYTHON, python2.2 python2.3 python, echo no python found for) +AC_PATH_PROGS(MKZIP, zip pkzip, :) +AC_PATH_PROGS(XMLTO, xmlto, :) + +AC_C_INLINE +AC_C_CONST +ACX_C_RESTRICT +AC_STDC_HEADERS +AC_HEADER_DIRENT +AC_CHECK_HEADERS(stdint.h unistd.h windows.h winnt.h winbase.h sys/int_types.h) +AC_CHECK_HEADERS(sys/types.h sys/mman.h sys/stat.h sys/param.h) dnl posix'ish +AC_CHECK_HEADERS(io.h direct.h zlib.h byteswap.h) +AC_CHECK_HEADERS(fnmatch.h) +AC_CHECK_FUNCS( strcasecmp strndup ) + +AC_TYPE_OFF_T +AC_TYPE_SIZE_T +dnl AC_TYPE_SSIZE_T +AC_CHECK_TYPE(ssize_t,int) +AC_CHECK_TYPE(off64_t,_zzip_off_t) +AC_CHECK_TYPE(__int64,long long) +AC_COMPILE_CHECK_SIZEOF(short) +AC_COMPILE_CHECK_SIZEOF(int) +AC_COMPILE_CHECK_SIZEOF(long) +AC_C_BIGENDIAN +dnl ------------------------------------------------------------- +# the default is _disabled_!! anyway, result is prefixed in zzip/_config.h!! +AC_SYS_LARGEFILE_SENSITIVE +test ".$LARGEFILE_CFLAGS" = "." && LARGEFILE_CFLAGS="" +AC_ARG_WITH(largefile,AC_HELP_STRING( + [--with-largefile],[compile as off64_t instead of 32bit off_t]) + ,,[with_largefile="no"]) +if test ".$ac_cv_sys_largefile_sensitive" = ".no" ; then + AC_MSG_RESULT(compiles library with the only off_t seen) +elif test ".$with_largefile" != ".no" ; then + AC_MSG_RESULT(compiles library as 64bit off_t variant dnl +- and renaming some function names) + LARGEFILE_CFLAGS="$LARGEFILE_CFLAGS -D_LARGEFILE_SOURCE" + AC_MSG_RESULT(..adding CFLAGS $LARGEFILE_CFLAGS) + CFLAGS="$CFLAGS $LARGEFILE_CFLAGS" + AC_MSG_RESULT(..adding 64 into RELEASE_INFO for the libraries) + RELEASE_INFO="$RELEASE_INFO-64" +else + AC_MSG_RESULT(compiles library as 32bit off_t variant dnl +- largefile is not the default here) +fi +AC_SUBST(LARGEFILE_CFLAGS) +dnl ------------------------------------------------------------- +AC_MSG_CHECKING(for zlib being found) +if test "_$ac_cv_header_zlib_h" != "_yes" ; then + AC_MSG_RESULT(dnl +...oops: zlib.h not found - try adding some CPPFLAGS to configure call) + AC_MSG_RESULT(dnl +...note: and when linkage fails you might also need to set some LDFLAGS) + case "$prefix" in + NONE|/usr) + AC_MSG_RESULT(dnl +...note: both can be set by specifying the install prefix of the zlib library) + AC_MSG_RESULT(dnl +...note: via --with-zlib=path ... it will test for -Ipath/include -Lpath/lib) + ;; + *) if test -d $prefix/include ; then + AC_MSG_RESULT(dnl +...note: -I$prefix/include is not added to CPPFLAGS automatically and) + AC_MSG_RESULT(dnl +...note: neither is -L$prefix/lib for LDFLAGS .. both will be if you specify) + AC_MSG_RESULT(dnl +...note: --with-zlib to configure call, or use --with-zlib=installprefix) + fi + ;; + esac + AC_MSG_ERROR(zlib.h not found: "zlib" is required to build "$PACKAGE") + exit 1 +fi +cat >conftest.c <<EOF +#include <zlib.h> +const char* zlib_VeRsIoN = ZLIB_VERSION "dEtEcT"; +EOF +ZLIB_VERSION=`(eval "$ac_cpp conftest.c") 2>/dev/null \ +| grep zlib_VeRsIoN | sed -e 's,.*= *.,,' -e 's,. *.dEtEcT.*,,'` +rm conftest.c +AC_SUBST(ZLIB_VERSION) +AC_MSG_RESULT(yes - $ZLIB_VERSION) +# ---------------------------------------------------------------- +AC_MSG_CHECKING(docdir default) +AC_ARG_WITH(docdir, AC_HELP_STRING( + [--with-docdir],[docdir prefix (prefix/share/doc)]) + ,,[with_docdir="no"]) +case "${with_docdir}" in + prefix/*) docdir=` echo "$withval" | sed 's/^prefix/${prefix}'` ;; + datadir/*) docdir=` echo "$withval" | sed 's/^datadir/${datadir}'` ;; + yes) docdir='${prefix}/doc' ;; + no) docdir='${datadir}/doc' ;; + /*|\\*|[a-zA-Z]:*) docdir="$with_docdir" ;; + *) AC_MSG_RESULT(oops) + AC_MSG_ERROR(bad value ${withval} for --with-docdir) + ;; +esac +AC_SUBST(docdir) +AC_MSG_RESULT($docdir) +# ---------------------------------------------------------------- +AC_MSG_CHECKING(whether using debugging messages in libraries) +AC_ARG_WITH(debug, AC_HELP_STRING( + [--with-debug],[debug messages in library]) + , [case "${withval}" in + yes|no) with_debug="$withval" ;; + *) AC_MSG_RESULT(oops) + AC_MSG_ERROR(bad value ${withval} for --with-debug) ;; + esac], [with_debug="no"]) +test "$with_debug" != "yes" && with_debug="no" # yes or no +test "$with_debug" = "yes" && export CFLAGS="$CFLAGS -DDEBUG" +result="$with_debug" ; test "$result" = "yes" && result="yes, added -DDEBUG" +AC_MSG_RESULT($result) +if test "$with_debug" = "yes" ; then if test -n "$RELEASE_INFO" ; then + RELEASE_INFO="$RELEASE_INFO-dbg" + AC_MSG_RESULT(modified release, $RELEASE_INFO) +fi fi +# ---------------------------------------------------------------- +AC_MSG_CHECKING(whether thread stack is too small for bufsiz buffers) + # many embedded platforms, superthreaded systems and kernel usage + # will severely limit the stackspace for its threads. Use _LOWSTK + # compile-define on those platforms. +AC_ARG_WITH(lowstk, AC_HELP_STRING( + [--with-lowstk], [limited thread stack]) + , [case "${withval}" in + yes|no|auto) with_lowstk="$withval" ;; + *) AC_MSG_ERROR(bad value ${withval} for --with-lowstk) ;; + esac], [with_lowstk="auto"]) +if test "$with_lowstk" = "auto"; then + case $target in + *-palmos-*) $with_lowstk="yes" ;; + esac +fi +test "$with_lowstk" != "yes" && with_lowstk="no" # yes or no +test "$with_lowstk" = "yes" && CFLAGS="$CFLAGS -D_LOWSTK" +result="$with_lowstk" ; test "$result" = "yes" && result="yes, added -D_LOWSTK" +AC_MSG_RESULT($with_lowstk) +# --------------------------------------------------------------- +AC_MSG_CHECKING(whether can use mmap for file scanning) + # system with mmap are probably better performing an searching + # and parsing - atleast memory consumption is far better +AC_ARG_ENABLE(mmap, AC_HELP_STRING( + [--disable-mmap],[disable mmap usage]) + , [case "${enableval}" in + yes|no|auto) enable_mmap="${enableval}" ;; + *) AC_MSG_RESULT(oops) + AC_MSG_ERROR(bad value ${enableval} for --disable-mmap) ;; + esac], [enable_mmap="auto"]) +if test "$enable_mmap" = "auto" +then + test "$ac_cv_header_winbase_h" && enable_mmap="yes, winbase.h" + test "$ac_cv_header_sys_mman_h" && enable_mmap="yes, sys/mman.h" +fi +case "$enable_mmap" in + yes|yes,*) CFLAGS="$CFLAGS -D_USE_MMAP" + AC_MSG_RESULT($enable_mmap, added -D_USE_MMAP) ;; + *) enable_mmap="no" + AC_MSG_RESULT(no (just a bit slower)) ;; +esac +# --------------------------------------------------------------- +AC_MSG_CHECKING(whether making SDL parts) +SDL="" +AC_ARG_ENABLE(sdl, AC_HELP_STRING( + [--enable-sdl],[enable SDL usage (if present)]) + ,,[enable_sdl="no"]) +if test "$enable_sdl" = "no" ; then + AC_MSG_RESULT([no, disabled]) +else + enable_sdl=`sdl-config --version 2>/dev/null` + case ".$enable_sdl" in + .1.*) AC_MSG_RESULT([yes, for SDL $enable_sdl]) + SDL="SDL" ;; + .2.*) AC_MSG_RESULT([yes, untested $enable_sdl]) + SDL="SDL" ;; + *) AC_MSG_RESULT([no, $enable_sdl]) ;; + esac +fi +AC_SUBST(SDL) +# --------------------------------------------------------------- +AC_MSG_CHECKING(running extra tests on make check) +if test "MKZIP" != ":" ; then + AC_MSG_RESULT(yes) + ZIPTESTS="" +else + AC_MSG_RESULT(no) + ZIPTESTS="#" +fi +AC_SUBST(ZIPTESTS) +# --------------------------------------------------------------- +AC_MSG_CHECKING(link options) +case "$host_os" in + mingw*) + ZZIPLIB_LDFLAGS="-no-undefined -export-all-symbols -mconsole" + RESOLVES=' ' + ;; + *) + ZZIPLIB_LDFLAGS="--export-dynamic" + RESOLVES=' # ' + ;; +esac +AC_MSG_RESULT([$ZZIPLIB_LDFLAGS $RESOLVES]) +AC_SUBST([ZZIPLIB_LDFLAGS]) +AC_SUBST([RESOLVES]) +# --------------------------------------------------------------- +AX_MAINTAINER_MODE_AUTO_SILENT +AX_NOT_ENABLE_FRAME_POINTER +AX_CFLAGS_WARN_ALL +AX_CFLAGS_NO_WRITABLE_STRINGS +AX_CFLAGS_STRICT_PROTOTYPES +AX_CFLAGS_GCC_OPTION(-Wpointer-arith) +AX_CFLAGS_GCC_OPTION(-Wsign-compare) +AX_CFLAGS_GCC_OPTION(-Wmissing-declarations) +# --------------------------------------------------------------- +AX_ENABLE_DEFAULT_PKGCONFIGDIR +AX_ENABLE_DEFAULT_ACLOCALDIR +AC_SUBST([CONFIG_FILES]) +AC_OUTPUT([Makefile zzip/Makefile zzipwrap/Makefile SDL/Makefile + docs/Makefile test/Makefile bins/Makefile]) +dnl ------------------------------------------------------------- +PATCH_LIBTOOL_ON_DARWIN_ZSH_OVERQUOTING +PATCH_LIBTOOL_SYS_LIB_SEARCH_PATH_SPEC +PATCH_LIBTOOL_TO_ADD_HOST_CC +# --------------------------------------------------------------- +echo '-----' $PACKAGE $VERSION $prefix +$SHELL libtool --features || true +echo "CFLAGS=$CFLAGS" +test "$enable_mmap" != "no" && echo "enable mmap ($enable_mmap)" +test "$enable_mmap" = "no" && echo "disable mmap ($enable_mmap)" +test "$with_lowstk" != "no" && echo "with lowstk ($with_lowstk)" +test "$with_lowstk" = "no" && echo "without lowstk ($with_lowstk)" +test "$with_debug" != "no" && echo "with debug ($with_debug)" +test "$with_debug" = "no" && echo "without debug ($with_debug)" +# test -f ./zziplib.spec && echo warning - do not build in the source dirs +echo '# make && make check && make install' diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/64on32.htm b/Build/source/libs/zziplib/zziplib-0.13.58/docs/64on32.htm new file mode 100644 index 00000000000..4da84140d5c --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/64on32.htm @@ -0,0 +1,195 @@ +<section> <date> 13. Aug 2003 </date> +<h2> 64on32 largefile information </h2> + +<section><!--border--> +<h3> largefile problems </h3> + +<P> + Through actual problems with handling files larger than 2 Gigabyte, + I had to face the fact that there are serious problems with the + largefile implementation around shared-libraries. This is bound + to the effect that 64on32 platforms allow a preprocessor #define + _FILE_OFFSET_BITS=64 which will shift the integretal type of + off_t from a 32bit to a 64bit entity. +</P> + +<P> + That will in fact lead to problems if an application is compiled + with a different off_t size than the shared-library it will be + linked to. Among the problems are different sizes of the callframe + for those functions that take an argument of off_t type. Note how + the "seek" call uses an off_t in the middle of its arguments which + may be 32bit or 64bit depending on a preprocessor define. And + you know that zziplib wraps up "seek"-like calls as well. +</P> + +<P> + The observations were largely made independent of the zziplib + however, as a zip-file does uses 32bit offsets in its header + fields anyway, and therefore a single zip-archive (or any of + its wrapped files) can not be larger than 2 Gigabyte anyway. + I would to refer you for deeper information to my website + about this problem-space at +</P> +<p><center><big> + <a href="http://ac-archive.sf.net/largefile" remap="url"> + ac-archive.sf.net/largefile </a> +</big></center></p> + +</section><section> +<h3> zziplib related </h3> + +<P> + Still however the problems hold for zziplib usage when + the functions are linked dynamically as a shared-library. + Here we can face the fact that an application (or a higher + level library) uses a different off_t size than the + underlying zziplib shared-library. +</P> + +<P> + If you read the <code>zzip/zzip.h</code> header file then + you will surely see a number of off_t usages around, here + they are wrapped in the form of zzip_off_t to get away with + platforms not predefining off_t in the first place. Those + functions are (at the time of writing): +<blockquote><ul> +<li> <code>zzip_telldir</code> (return type) </li> +<li> <code>zzip_seekdir</code> (second param) </li> +<li> <code>zzip_tell</code> (return type) </li> +<li> <code>zzip_seek</code> (second param of three)</li> +</ul></blockquote> +</P> + +<P> + What might be not as obvious however: you will find + also the off_t type being used in the plugin-handlers + callback functions. That is based on the fact that + the plugin-structures is filled by default with the + posix-functions from the C library. A 64on32 platform + however offers quite usually a mixedmode C library + exporting two symbols for tell/seek calls to match + either 32bit off_t or 64bit off_t +<blockquote><ul> +<li> <code>zzip_plugin_io->seeks</code> (return type and second param) </li> +<li> <code>zzip_plugin_io->filesize</code> (return type) </li> +</ul></blockquote> +</P> + +<P> + The problem here: the application might not make use of + zzip_seek/zzip_tell explicitly, but may be the internal + implementation of a zzip call uses io->seeks or io->filesize. + When an application uses plugin-io with these callbacks + overridden then surely problems will arise. +</P> + +</section><section> +<h3> zziplib mixedmode option </h3> + +<P> + I have extended the zziplib implementation to allow itself to + live fine on 64on32 systems. The 64on32 system are like linux + and solaris where the default off_t is 32bit and only by the + preprocessor hint they shift into 64bit. The C library on + these systems is a mixedmode one offering a pair for each of + the problematic functions - lseek <em>and</em> lseek64 for + example. +</P> + +<P> + The zziplib header file detects when it is present on a + 64on32 system (through hints in configured zzip/conf.h) + and that _FILE_OFFSET_BITS has been set to 64bit. In that + case it does automatically issue #defines that shift the + symbol-name from zzip_seek into zzip_seek64. Likewise, + <em>all</em> the *_ext_io functions are renamed into + *_ext_io64 calls +</P> + +<P> + The zziplib library itself will also pick up the renamings + when it is compiled with 64bit off_t - in effect an application + with a 64bit-off_t dependency can only link with a zziplib + compiled in 64bit-off_t mode. If the application does not + use any call symbol with an off_t dependency then it does + not matter and the link will succeed. That's simply because + function calls without an off_t dependency will not be + renamed and they are the same for a 32bit-off_t zziplib or + a 64bit-off_t zziplib. +</P> + +<P> + As an extra, the zziplib exports a few of its common calls + like being a mixedmode library when you compile it both in + 64bit mode and as a shared library. In that case, the + resulting shared library will export symbol pairs for the + calls with an off_t dependency, i.e. both zzip_seek and + zzip_seek64 are present. +</P> + +<P> + Note that for reasons of being a lightweight library, the + zziplib library does not export mixmode call pairs for + the *_ext_io family of functions. The current generation + of zziplib does call io->seeks unconditionally of any + case'ing flag and so far there are no problems with the + current design. +</P> + +</section><section> +<h3> Implementation details </h3> + +<P> + In the header file zzip/zzip.h you will find the define + ZZIP_LARGEFILE_RENAME which triggers the renaming process. + See zzip/conf.h on the conditions where it is being triggered. +</P> + +<P> + For the implementation of the mixedmode symbol pairs, see + zzip/dir.c for an example for the zzip_seekdir/zzip_seekdir64 + pair - here we use libtools -DPIC to detect the situation of + being compiled as shared-library, we use the preprocessor + #def ZZIP_LARGEFILE_RENAME to know we are on a 64on32 + system compiled in 64bit-off_t, and we check the transitional + largefile API to be present by looking for EOVERFLOW errno. +</P> + +<P> + When all the three are present then we simply #undef the + renaming preprocessor macro and define a function symbol + (without the renaming) and call the renamed symbol + already compiled a few lines before. We use the pre-off_t + type "long" for the 32bit entity of these calls. While + we mostly let the compiler do the shrink/expand of these + integer types, we do also sometimes check for overflows + of the seekvalue. +</P> + +</section><section> +<h3> rpm extras and pkg-config </h3> + +<P> + The provided .spec file shows how to compile both variants + of the zziplib shared library and to install them in + parallel in the system. Also we provide doubled sets + of .pc files for pkg-config installation. That should make + it a lot easier for applications to link to the correct + library they want. +</P> + +<P> + Here are all the variants that you can find after installing + the vanilla rpm files from zziplib.sf.net: +<pre> +$ pkg-config --list-all | sort | grep zzip +zziplib32 zziplib32 - ZZipLib - libZ-based ZIP-access Library +zziplib64 zziplib64 - ZZipLib - libZ-based ZIP-access Library +zziplib zziplib - ZZipLib - libZ-based ZIP-access Library +zzip-sdl-config zzip-sdl-config - SDL Config (for ZZipLib) +zzip-sdl-rwops zzip-sdl-rwops - SDL_rwops for ZZipLib +zzipwrap zzipwrap - Callback Wrappers for ZZipLib +zzip-zlib-config zzip-zlib-config - ZLib Config (for ZZipLib) +</pre></P> +</section></section> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/COPYING.LIB b/Build/source/libs/zziplib/zziplib-0.13.58/docs/COPYING.LIB new file mode 100644 index 00000000000..eb685a5ec98 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/COPYING.LIB @@ -0,0 +1,481 @@ + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, 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 library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, 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 companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License, which was designed for utility programs. This +license, the GNU Library General Public License, applies to certain +designated libraries. This license is quite different from the ordinary +one; be sure to read it in full, and don't assume that anything in it is +the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that +they blur the distinction we usually make between modifying or adding to a +program and simply using it. Linking a program with a library, without +changing the library, is in some sense simply using the library, and is +analogous to running a utility program or application program. However, in +a textual and legal sense, the linked executable is a combined work, a +derivative of the original library, and the ordinary General Public License +treats it as such. + + Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended to +permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to achieve +this as regards changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is that this +will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library. + + Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one. + + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which +contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Library +General Public License (also called "this License"). Each licensee is +addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, 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 library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete 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 distribute a copy of this License along with the +Library. + + 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 Library or any portion +of it, thus forming a work based on the Library, 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) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +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 Library, 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 Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you 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. + + If distribution of 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 satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also compile or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. 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. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library 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. + + 9. 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 Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +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. + + 11. 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 Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library 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 Library. + +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. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library 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. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Library 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 Library +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 Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +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 + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "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 +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. 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 LIBRARY 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 +LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), 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 Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. 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. + + <one line to give the library's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This 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. + + This 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 this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + <signature of Ty Coon>, 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/COPYING.MPL b/Build/source/libs/zziplib/zziplib-0.13.58/docs/COPYING.MPL new file mode 100644 index 00000000000..18f8109b797 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/COPYING.MPL @@ -0,0 +1,567 @@ + MOZILLA PUBLIC LICENSE + Version 1.1 + + --------------- + +1. Definitions. + + 1.0.1. "Commercial Use" means distribution or otherwise making the + Covered Code available to a third party. + + 1.1. "Contributor" means each entity that creates or contributes to + the creation of Modifications. + + 1.2. "Contributor Version" means the combination of the Original + Code, prior Modifications used by a Contributor, and the Modifications + made by that particular Contributor. + + 1.3. "Covered Code" means the Original Code or Modifications or the + combination of the Original Code and Modifications, in each case + including portions thereof. + + 1.4. "Electronic Distribution Mechanism" means a mechanism generally + accepted in the software development community for the electronic + transfer of data. + + 1.5. "Executable" means Covered Code in any form other than Source + Code. + + 1.6. "Initial Developer" means the individual or entity identified + as the Initial Developer in the Source Code notice required by Exhibit + A. + + 1.7. "Larger Work" means a work which combines Covered Code or + portions thereof with code not governed by the terms of this License. + + 1.8. "License" means this document. + + 1.8.1. "Licensable" means having the right to grant, to the maximum + extent possible, whether at the time of the initial grant or + subsequently acquired, any and all of the rights conveyed herein. + + 1.9. "Modifications" means any addition to or deletion from the + substance or structure of either the Original Code or any previous + Modifications. When Covered Code is released as a series of files, a + Modification is: + A. Any addition to or deletion from the contents of a file + containing Original Code or previous Modifications. + + B. Any new file that contains any part of the Original Code or + previous Modifications. + + 1.10. "Original Code" means Source Code of computer software code + which is described in the Source Code notice required by Exhibit A as + Original Code, and which, at the time of its release under this + License is not already Covered Code governed by this License. + + 1.10.1. "Patent Claims" means any patent claim(s), now owned or + hereafter acquired, including without limitation, method, process, + and apparatus claims, in any patent Licensable by grantor. + + 1.11. "Source Code" means the preferred form of the Covered Code for + making modifications to it, including all modules it contains, plus + any associated interface definition files, scripts used to control + compilation and installation of an Executable, or source code + differential comparisons against either the Original Code or another + well known, available Covered Code of the Contributor's choice. The + Source Code can be in a compressed or archival form, provided the + appropriate decompression or de-archiving software is widely available + for no charge. + + 1.12. "You" (or "Your") means an individual or a legal entity + exercising rights under, and complying with all of the terms of, this + License or a future version of this License issued under Section 6.1. + For legal entities, "You" includes any entity which controls, is + controlled by, or is under common control with You. For purposes of + this definition, "control" means (a) the power, direct or indirect, + to cause the direction or management of such entity, whether by + contract or otherwise, or (b) ownership of more than fifty percent + (50%) of the outstanding shares or beneficial ownership of such + entity. + +2. Source Code License. + + 2.1. The Initial Developer Grant. + The Initial Developer hereby grants You a world-wide, royalty-free, + non-exclusive license, subject to third party intellectual property + claims: + (a) under intellectual property rights (other than patent or + trademark) Licensable by Initial Developer to use, reproduce, + modify, display, perform, sublicense and distribute the Original + Code (or portions thereof) with or without Modifications, and/or + as part of a Larger Work; and + + (b) under Patents Claims infringed by the making, using or + selling of Original Code, to make, have made, use, practice, + sell, and offer for sale, and/or otherwise dispose of the + Original Code (or portions thereof). + + (c) the licenses granted in this Section 2.1(a) and (b) are + effective on the date Initial Developer first distributes + Original Code under the terms of this License. + + (d) Notwithstanding Section 2.1(b) above, no patent license is + granted: 1) for code that You delete from the Original Code; 2) + separate from the Original Code; or 3) for infringements caused + by: i) the modification of the Original Code or ii) the + combination of the Original Code with other software or devices. + + 2.2. Contributor Grant. + Subject to third party intellectual property claims, each Contributor + hereby grants You a world-wide, royalty-free, non-exclusive license + + (a) under intellectual property rights (other than patent or + trademark) Licensable by Contributor, to use, reproduce, modify, + display, perform, sublicense and distribute the Modifications + created by such Contributor (or portions thereof) either on an + unmodified basis, with other Modifications, as Covered Code + and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, using, or + selling of Modifications made by that Contributor either alone + and/or in combination with its Contributor Version (or portions + of such combination), to make, use, sell, offer for sale, have + made, and/or otherwise dispose of: 1) Modifications made by that + Contributor (or portions thereof); and 2) the combination of + Modifications made by that Contributor with its Contributor + Version (or portions of such combination). + + (c) the licenses granted in Sections 2.2(a) and 2.2(b) are + effective on the date Contributor first makes Commercial Use of + the Covered Code. + + (d) Notwithstanding Section 2.2(b) above, no patent license is + granted: 1) for any code that Contributor has deleted from the + Contributor Version; 2) separate from the Contributor Version; + 3) for infringements caused by: i) third party modifications of + Contributor Version or ii) the combination of Modifications made + by that Contributor with other software (except as part of the + Contributor Version) or other devices; or 4) under Patent Claims + infringed by Covered Code in the absence of Modifications made by + that Contributor. + +3. Distribution Obligations. + + 3.1. Application of License. + The Modifications which You create or to which You contribute are + governed by the terms of this License, including without limitation + Section 2.2. The Source Code version of Covered Code may be + distributed only under the terms of this License or a future version + of this License released under Section 6.1, and You must include a + copy of this License with every copy of the Source Code You + distribute. You may not offer or impose any terms on any Source Code + version that alters or restricts the applicable version of this + License or the recipients' rights hereunder. However, You may include + an additional document offering the additional rights described in + Section 3.5. + + 3.2. Availability of Source Code. + Any Modification which You create or to which You contribute must be + made available in Source Code form under the terms of this License + either on the same media as an Executable version or via an accepted + Electronic Distribution Mechanism to anyone to whom you made an + Executable version available; and if made available via Electronic + Distribution Mechanism, must remain available for at least twelve (12) + months after the date it initially became available, or at least six + (6) months after a subsequent version of that particular Modification + has been made available to such recipients. You are responsible for + ensuring that the Source Code version remains available even if the + Electronic Distribution Mechanism is maintained by a third party. + + 3.3. Description of Modifications. + You must cause all Covered Code to which You contribute to contain a + file documenting the changes You made to create that Covered Code and + the date of any change. You must include a prominent statement that + the Modification is derived, directly or indirectly, from Original + Code provided by the Initial Developer and including the name of the + Initial Developer in (a) the Source Code, and (b) in any notice in an + Executable version or related documentation in which You describe the + origin or ownership of the Covered Code. + + 3.4. Intellectual Property Matters + (a) Third Party Claims. + If Contributor has knowledge that a license under a third party's + intellectual property rights is required to exercise the rights + granted by such Contributor under Sections 2.1 or 2.2, + Contributor must include a text file with the Source Code + distribution titled "LEGAL" which describes the claim and the + party making the claim in sufficient detail that a recipient will + know whom to contact. If Contributor obtains such knowledge after + the Modification is made available as described in Section 3.2, + Contributor shall promptly modify the LEGAL file in all copies + Contributor makes available thereafter and shall take other steps + (such as notifying appropriate mailing lists or newsgroups) + reasonably calculated to inform those who received the Covered + Code that new knowledge has been obtained. + + (b) Contributor APIs. + If Contributor's Modifications include an application programming + interface and Contributor has knowledge of patent licenses which + are reasonably necessary to implement that API, Contributor must + also include this information in the LEGAL file. + + (c) Representations. + Contributor represents that, except as disclosed pursuant to + Section 3.4(a) above, Contributor believes that Contributor's + Modifications are Contributor's original creation(s) and/or + Contributor has sufficient rights to grant the rights conveyed by + this License. + + 3.5. Required Notices. + You must duplicate the notice in Exhibit A in each file of the Source + Code. If it is not possible to put such notice in a particular Source + Code file due to its structure, then You must include such notice in a + location (such as a relevant directory) where a user would be likely + to look for such a notice. If You created one or more Modification(s) + You may add your name as a Contributor to the notice described in + Exhibit A. You must also duplicate this License in any documentation + for the Source Code where You describe recipients' rights or ownership + rights relating to Covered Code. You may choose to offer, and to + charge a fee for, warranty, support, indemnity or liability + obligations to one or more recipients of Covered Code. However, You + may do so only on Your own behalf, and not on behalf of the Initial + Developer or any Contributor. You must make it absolutely clear than + any such warranty, support, indemnity or liability obligation is + offered by You alone, and You hereby agree to indemnify the Initial + Developer and every Contributor for any liability incurred by the + Initial Developer or such Contributor as a result of warranty, + support, indemnity or liability terms You offer. + + 3.6. Distribution of Executable Versions. + You may distribute Covered Code in Executable form only if the + requirements of Section 3.1-3.5 have been met for that Covered Code, + and if You include a notice stating that the Source Code version of + the Covered Code is available under the terms of this License, + including a description of how and where You have fulfilled the + obligations of Section 3.2. The notice must be conspicuously included + in any notice in an Executable version, related documentation or + collateral in which You describe recipients' rights relating to the + Covered Code. You may distribute the Executable version of Covered + Code or ownership rights under a license of Your choice, which may + contain terms different from this License, provided that You are in + compliance with the terms of this License and that the license for the + Executable version does not attempt to limit or alter the recipient's + rights in the Source Code version from the rights set forth in this + License. If You distribute the Executable version under a different + license You must make it absolutely clear that any terms which differ + from this License are offered by You alone, not by the Initial + Developer or any Contributor. You hereby agree to indemnify the + Initial Developer and every Contributor for any liability incurred by + the Initial Developer or such Contributor as a result of any such + terms You offer. + + 3.7. Larger Works. + You may create a Larger Work by combining Covered Code with other code + not governed by the terms of this License and distribute the Larger + Work as a single product. In such a case, You must make sure the + requirements of this License are fulfilled for the Covered Code. + +4. Inability to Comply Due to Statute or Regulation. + + If it is impossible for You to comply with any of the terms of this + License with respect to some or all of the Covered Code due to + statute, judicial order, or regulation then You must: (a) comply with + the terms of this License to the maximum extent possible; and (b) + describe the limitations and the code they affect. Such description + must be included in the LEGAL file described in Section 3.4 and must + be included with all distributions of the Source Code. Except to the + extent prohibited by statute or regulation, such description must be + sufficiently detailed for a recipient of ordinary skill to be able to + understand it. + +5. Application of this License. + + This License applies to code to which the Initial Developer has + attached the notice in Exhibit A and to related Covered Code. + +6. Versions of the License. + + 6.1. New Versions. + Netscape Communications Corporation ("Netscape") may publish revised + and/or new versions of the License from time to time. Each version + will be given a distinguishing version number. + + 6.2. Effect of New Versions. + Once Covered Code has been published under a particular version of the + License, You may always continue to use it under the terms of that + version. You may also choose to use such Covered Code under the terms + of any subsequent version of the License published by Netscape. No one + other than Netscape has the right to modify the terms applicable to + Covered Code created under this License. + + 6.3. Derivative Works. + If You create or use a modified version of this License (which you may + only do in order to apply it to code which is not already Covered Code + governed by this License), You must (a) rename Your license so that + the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", + "MPL", "NPL" or any confusingly similar phrase do not appear in your + license (except to note that your license differs from this License) + and (b) otherwise make it clear that Your version of the license + contains terms which differ from the Mozilla Public License and + Netscape Public License. (Filling in the name of the Initial + Developer, Original Code or Contributor in the notice described in + Exhibit A shall not of themselves be deemed to be modifications of + this License.) + +7. DISCLAIMER OF WARRANTY. + + COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF + DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. + THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE + IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, + YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE + COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER + OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF + ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +8. TERMINATION. + + 8.1. This License and the rights granted hereunder will terminate + automatically if You fail to comply with terms herein and fail to cure + such breach within 30 days of becoming aware of the breach. All + sublicenses to the Covered Code which are properly granted shall + survive any termination of this License. Provisions which, by their + nature, must remain in effect beyond the termination of this License + shall survive. + + 8.2. If You initiate litigation by asserting a patent infringement + claim (excluding declatory judgment actions) against Initial Developer + or a Contributor (the Initial Developer or Contributor against whom + You file such action is referred to as "Participant") alleging that: + + (a) such Participant's Contributor Version directly or indirectly + infringes any patent, then any and all rights granted by such + Participant to You under Sections 2.1 and/or 2.2 of this License + shall, upon 60 days notice from Participant terminate prospectively, + unless if within 60 days after receipt of notice You either: (i) + agree in writing to pay Participant a mutually agreeable reasonable + royalty for Your past and future use of Modifications made by such + Participant, or (ii) withdraw Your litigation claim with respect to + the Contributor Version against such Participant. If within 60 days + of notice, a reasonable royalty and payment arrangement are not + mutually agreed upon in writing by the parties or the litigation claim + is not withdrawn, the rights granted by Participant to You under + Sections 2.1 and/or 2.2 automatically terminate at the expiration of + the 60 day notice period specified above. + + (b) any software, hardware, or device, other than such Participant's + Contributor Version, directly or indirectly infringes any patent, then + any rights granted to You by such Participant under Sections 2.1(b) + and 2.2(b) are revoked effective as of the date You first made, used, + sold, distributed, or had made, Modifications made by that + Participant. + + 8.3. If You assert a patent infringement claim against Participant + alleging that such Participant's Contributor Version directly or + indirectly infringes any patent where such claim is resolved (such as + by license or settlement) prior to the initiation of patent + infringement litigation, then the reasonable value of the licenses + granted by such Participant under Sections 2.1 or 2.2 shall be taken + into account in determining the amount or value of any payment or + license. + + 8.4. In the event of termination under Sections 8.1 or 8.2 above, + all end user license agreements (excluding distributors and resellers) + which have been validly granted by You or any distributor hereunder + prior to termination shall survive termination. + +9. LIMITATION OF LIABILITY. + + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT + (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL + DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, + OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR + ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY + CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, + WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER + COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN + INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF + LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY + RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW + PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE + EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO + THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +10. U.S. GOVERNMENT END USERS. + + The Covered Code is a "commercial item," as that term is defined in + 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer + software" and "commercial computer software documentation," as such + terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 + C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), + all U.S. Government End Users acquire Covered Code with only those + rights set forth herein. + +11. MISCELLANEOUS. + + This License represents the complete agreement concerning subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. This License shall be governed by + California law provisions (except to the extent applicable law, if + any, provides otherwise), excluding its conflict-of-law provisions. + With respect to disputes in which at least one party is a citizen of, + or an entity chartered or registered to do business in the United + States of America, any litigation relating to this License shall be + subject to the jurisdiction of the Federal Courts of the Northern + District of California, with venue lying in Santa Clara County, + California, with the losing party responsible for costs, including + without limitation, court costs and reasonable attorneys' fees and + expenses. The application of the United Nations Convention on + Contracts for the International Sale of Goods is expressly excluded. + Any law or regulation which provides that the language of a contract + shall be construed against the drafter shall not apply to this + License. + +12. RESPONSIBILITY FOR CLAIMS. + + As between Initial Developer and the Contributors, each party is + responsible for claims and damages arising, directly or indirectly, + out of its utilization of rights under this License and You agree to + work with Initial Developer and Contributors to distribute such + responsibility on an equitable basis. Nothing herein is intended or + shall be deemed to constitute any admission of liability. + +13. MULTIPLE-LICENSED CODE. + + Initial Developer may designate portions of the Covered Code as + "Multiple-Licensed". "Multiple-Licensed" means that the Initial + Developer permits you to utilize portions of the Covered Code under + Your choice of the NPL or the alternative licenses, if any, specified + by the Initial Developer in the file described in Exhibit A. + +EXHIBIT A -Mozilla Public License. + + ``The contents of this file are subject to the Mozilla Public License + Version 1.1 (the "License"); you may not use this file except in + compliance with the License. You may obtain a copy of the License at + http://www.mozilla.org/MPL/ + + Software distributed under the License is distributed on an "AS IS" + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + License for the specific language governing rights and limitations + under the License. + + The Original Code is ______________________________________. + + The Initial Developer of the Original Code is ________________________. + Portions created by ______________________ are Copyright (C) ______ + _______________________. All Rights Reserved. + + Contributor(s): ______________________________________. + + Alternatively, the contents of this file may be used under the terms + of the _____ license (the "[___] License"), in which case the + provisions of [______] License are applicable instead of those + above. If you wish to allow use of your version of this file only + under the terms of the [____] License and not to allow others to use + your version of this file under the MPL, indicate your decision by + deleting the provisions above and replace them with the notice and + other provisions required by the [___] License. If you do not delete + the provisions above, a recipient may use your version of this file + under either the MPL or the [___] License." + + [NOTE: The text of this Exhibit A may differ slightly from the text of + the notices in the Source Code files of the Original Code. You should + use the text of this Exhibit A rather than the text found in the + Original Code Source Code for Your Modifications.] + + ---------------------------------------------------------------------- + + AMENDMENTS + + The Netscape Public License Version 1.1 ("NPL") consists of the + Mozilla Public License Version 1.1 with the following Amendments, + including Exhibit A-Netscape Public License. Files identified with + "Exhibit A-Netscape Public License" are governed by the Netscape + Public License Version 1.1. + + Additional Terms applicable to the Netscape Public License. + I. Effect. + These additional terms described in this Netscape Public + License -- Amendments shall apply to the Mozilla Communicator + client code and to all Covered Code under this License. + + II. "Netscape's Branded Code" means Covered Code that Netscape + distributes and/or permits others to distribute under one or more + trademark(s) which are controlled by Netscape but which are not + licensed for use under this License. + + III. Netscape and logo. + This License does not grant any rights to use the trademarks + "Netscape", the "Netscape N and horizon" logo or the "Netscape + lighthouse" logo, "Netcenter", "Gecko", "Java" or "JavaScript", + "Smart Browsing" even if such marks are included in the Original + Code or Modifications. + + IV. Inability to Comply Due to Contractual Obligation. + Prior to licensing the Original Code under this License, Netscape + has licensed third party code for use in Netscape's Branded Code. + To the extent that Netscape is limited contractually from making + such third party code available under this License, Netscape may + choose to reintegrate such code into Covered Code without being + required to distribute such code in Source Code form, even if + such code would otherwise be considered "Modifications" under + this License. + + V. Use of Modifications and Covered Code by Initial Developer. + V.1. In General. + The obligations of Section 3 apply to Netscape, except to + the extent specified in this Amendment, Section V.2 and V.3. + + V.2. Other Products. + Netscape may include Covered Code in products other than the + Netscape's Branded Code which are released by Netscape + during the two (2) years following the release date of the + Original Code, without such additional products becoming + subject to the terms of this License, and may license such + additional products on different terms from those contained + in this License. + + V.3. Alternative Licensing. + Netscape may license the Source Code of Netscape's Branded + Code, including Modifications incorporated therein, without + such Netscape Branded Code becoming subject to the terms of + this License, and may license such Netscape Branded Code on + different terms from those contained in this License. + + VI. Litigation. + Notwithstanding the limitations of Section 11 above, the + provisions regarding litigation in Section 11(a), (b) and (c) of + the License shall apply to all disputes relating to this License. + + EXHIBIT A-Netscape Public License. + + "The contents of this file are subject to the Netscape Public + License Version 1.1 (the "License"); you may not use this file + except in compliance with the License. You may obtain a copy of + the License at http://www.mozilla.org/NPL/ + + Software distributed under the License is distributed on an "AS + IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + implied. See the License for the specific language governing + rights and limitations under the License. + + The Original Code is Mozilla Communicator client code, released + March 31, 1998. + + The Initial Developer of the Original Code is Netscape + Communications Corporation. Portions created by Netscape are + Copyright (C) 1998-1999 Netscape Communications Corporation. All + Rights Reserved. + + Contributor(s): ______________________________________. + + Alternatively, the contents of this file may be used under the + terms of the _____ license (the "[___] License"), in which case + the provisions of [______] License are applicable instead of + those above. If you wish to allow use of your version of this + file only under the terms of the [____] License and not to allow + others to use your version of this file under the NPL, indicate + your decision by deleting the provisions above and replace them + with the notice and other provisions required by the [___] + License. If you do not delete the provisions above, a recipient + may use your version of this file under either the NPL or the + [___] License." diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/COPYING.ZLIB b/Build/source/libs/zziplib/zziplib-0.13.58/docs/COPYING.ZLIB new file mode 100644 index 00000000000..b21b5724b39 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/COPYING.ZLIB @@ -0,0 +1,30 @@ + + THE ZLIB/LIBPNG LICENSE (copy from opensource.org) + + Copyright (c) <year> <copyright holders> + + This software is provided 'as-is', without any express + or implied warranty. In no event will the authors be + held liable for any damages arising from the use of this + software. + + Permission is granted to anyone to use this software for + any purpose, including commercial applications, and to + alter it and redistribute it freely, subject to the + following restrictions: + + 1. The origin of this software must not be + misrepresented; you must not claim that you + wrote the original software. If you use this + software in a product, an acknowledgment in + the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly + marked as such, and must not be + misrepresented as being the original + software. + + 3. This notice may not be removed or altered + from any source distribution. + diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/Makefile.am b/Build/source/libs/zziplib/zziplib-0.13.58/docs/Makefile.am new file mode 100644 index 00000000000..559758b81d2 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/Makefile.am @@ -0,0 +1,249 @@ +AUTOMAKE_OPTIONS = 1.4 foreign +AUTOTOOL_VERSION=autoconf-2.52 automake-1.5 libtool-1.4.2 + +doc_FILES = README.MSVC6 README.SDL COPYING.MPL COPYING.LIB COPYING.ZLIB \ + zziplib.html +htm_FILES = zzip-index.htm zzip-zip.htm zzip-file.htm zzip-sdl-rwops.htm \ + zzip-extio.htm zzip-xor.htm zzip-crypt.htm zzip-cryptoid.htm \ + zzip-api.htm zzip-basics.htm zzip-extras.htm zzip-parse.htm \ + 64on32.htm future.htm fseeko.htm mmapped.htm memdisk.htm \ + configs.htm sfx-make.htm developer.htm download.htm \ + history.htm referentials.htm faq.htm copying.htm +SDL = @top_srcdir@/SDL +SDL_RWOPS = $(SDL)/SDL_rwops_zzcat.c \ + $(SDL)/SDL_rwops_zzip.c $(SDL)/SDL_rwops_zzip.h +changelog = @top_srcdir@/ChangeLog + +EXTRA_DIST = make-doc.py $(doc_FILES) $(htm_FILES) $(SDL_RWOPS) \ + make-doc.pl make-dbk.pl mksite.sh mksite.pl body.htm \ + manpages.ar zziplib-master.dbk +CLEANFILES = *.pc *.omf +DISTCLEANFILES = zziplib.spec manpages.ar htmpages.ar *.html *.xml + +html_FILES = $(htm_FILES:.htm=.html) \ + $(htm_FILES:.htm=.print.html) \ + site.html site.print.html + +default : doc +clean-doc clean-docs : clean-unpack + - rm $(DISTCLEANFILES) + - rm $(MAINTAINERCLEANFILES) + +# ------------------------------------------------------------------- +zziplib.spec : @top_srcdir@/$(PACKAGE).spec + @ $(LN_S) $? $@ # the two zzip-doc.* will grep thru zziplib.spec +doc : $(doc_FILES) site.html +docs : doc manpages.ar htmpages.ar +docu : docs +zziplib0.html : zziplib0.xml +zziplib0.xml : zziplib.spec @srcdir@/Makefile.am @srcdir@/make-doc.pl \ + $(srcdir)/make-doc.pl @top_srcdir@/zzip/*.c + - @PERL@ $(srcdir)/make-doc.pl @top_srcdir@/zzip/*.c \ + "suffix=0" "package=$(PACKAGE)" "version=$(VERSION)" \ + "mainheader=zzip/zzip.h" "exported=<zzip/zzip.h> // or <zziplib.h>" \ + "docbookfile=$@" + - test -s $@ +zziplib1.html : zziplib1.xml +zziplib1.xml : zziplib.spec @srcdir@/Makefile.am @srcdir@/make-doc.py \ + $(srcdir)/make-doc.py @top_srcdir@/zzip/*.c + - @PYTHON@ $(srcdir)/make-doc.py @top_srcdir@/zzip/*.c suffix=1 + - test -f zziplib1.docbook && mv zziplib1.docbook $@ ; test -s $@ +zziplib.html : zziplib1.html zziplib0.html + - test -s zziplib0.html && cp zziplib0.html zziplib.html + - test -s zziplib1.html && cp zziplib1.html zziplib.html + test -s $@ +zziplib.xml : zziplib1.xml zziplib0.xml + - test -s zziplib0.xml && cp zziplib0.xml zziplib.xml + - test -s zziplib1.xml && cp zziplib1.xml zziplib.xml + test -s $@ || rm $@ + +omfdir=${datadir}/omf +pkgomfdir=${omfdir}/${PACKAGE} +SFNETDIR=/groups/z/zz/zziplib/htdocs +SFNETDOC=${datadir}${SFNETDIR} +pkgdocdir=${datadir}${SFNETDIR} +bins = @top_srcdir@/bins +DOCEXAMPLES = $(bins)/zzdir.c $(bins)/zzcat.c \ + $(bins)/zzobfuscated.c $(bins)/zziptest.c \ + $(bins)/zzxordir.c $(bins)/zzxorcat.c \ + $(bins)/zzxorcopy.c $(SDL_RWOPS) + +install-docu: $(doc_FILES) $(man_FILES) site.html $(PACKAGE)-doc.omf + $(mkinstalldirs) $(DESTDIR)$(pkgdocdir) + for i in $(html_FILES) ; do cat $$i \ + | sed -e 's:--START-->:-- :' -e 's:<!--ENDS--: --:' \ + -e "s:\\(href=\"[^/\"]*\\)[.]html\":\\1.htm\":" \ + -e "s:\\(href=\"[^/\"]*\\)[.]html\#:\\1.htm\#:" \ + > $(DESTDIR)$(pkgdocdir)/$$i ; done + @ for i in $(doc_FILES) $(DOCEXAMPLES) $(srcdir)/README.* \ + ; do $(INSTALL_DATA) `test -f $$i || echo $(srcdir)/`$$i \ + $(DESTDIR)$(pkgdocdir) ; done + (cd $(DESTDIR)$(pkgdocdir) && ln -sf zziplib.html zziplib.htm) + $(mkinstalldirs) $(DESTDIR)$(pkgomfdir) + $(INSTALL_DATA) $(PACKAGE)-doc.omf $(DESTDIR)$(pkgomfdir)/ + - test ".$(DESTDIR)" != "." || scrollkeeper-update + +install-sfnet: $(doc_FILES) $(man_FILES) site.html htmpages.ar + $(mkinstalldirs) $(DESTDIR)$(SFNETDOC) + $(INSTALL_DATA) $(html_FILES) $(DESTDIR)$(SFNETDOC) + for i in $(doc_FILES) $(DOCEXAMPLES) $(changelog) $(srcdir)/README.* \ + ; do $(INSTALL_DATA) `test -f $$i || echo $(srcdir)/`$$i \ + $(DESTDIR)$(SFNETDOC) ; done + (cd $(DESTDIR)$(SFNETDOC) && ln -sf zzip-index.html index.html) + $(mkinstalldirs) $(DESTDIR)$(SFNETDOC)/man + (test -f htmpages.ar || cd "$srcdir" ; P=`pwd` \ + ; cd $(DESTDIR)$(SFNETDOC)/man && ar x $$P/htmpages.ar) + +install-doc : install-docu install-sfnet + +# -------------------------------------------------------------------- +man manpages : manpages.ar +htm htmpages : htmpages.ar + +manpages.ar : zziplib.xml + @ if test "$(XMLTO)" = ":" \ + ; then echo no xmlto found - could not regenerate "$@" - skipped \ + ; echo just touching the output file "$@" ; touch "$@" \ + ; else echo going to regenerate "$@" in subdir "'"man"'" \ + ; echo 'test ! -d man || rm man/* ; test -d man || mkdir man' \ + ; test ! -d man || rm man/* ; test -d man || mkdir man \ + ; echo '(cd man && xmlto man ../zziplib.xml)' \ + ; (cd man && xmlto man ../zziplib.xml) \ + ; echo 'test ! -f $@ || mv $@ $@.old' \ + ; test ! -f $@ || mv $@ $@.old \ + ; echo '(cd man && ar qc ../$@ *.3)' \ + ; (cd man && ar qc ../$@ *.3) \ + ; echo '(rm man/*.3 ; rmdir man)' \ + ; (rm man/*.3 ; rmdir man) \ + ; fi ; test -s $@ || mv $@.old $@ \ + || mv $(srcdir)/$@.old $@ || test -s $@.old >$@ + +htmpages.ar : zziplib.xml + @ if test "$(XMLTO)" = ":" \ + ; then echo no xmlto found - could not regenerate "$@" - skipped \ + ; echo just touching the output file "$@" ; touch "$@" \ + ; else echo going to regenerate "$@" in subdir "'"man"'" \ + ; echo 'test ! -d man || rm /* ; test -d man || mkdir man' \ + ; test ! -d man || rm man/* ; test -d man || mkdir man \ + ; echo '(cd man && xmlto html ../zziplib.xml | tee written.lst)' \ + ; (cd man && xmlto html ../zziplib.xml | tee written.lst) \ + ; echo 'test ! -f $@ || mv $@ $@.old' \ + ; test ! -f $@ || mv $@ $@.old \ + ; echo '(cd man && ar qc ../$@ *.*)' \ + ; (cd man && ar qc ../$@ *.*) \ + ; echo '(rm man/*.* ; rmdir man)' \ + ; (rm man/*.* ; rmdir man) \ + ; fi ; test -s $@ || mv $@.old $@ \ + || mv $(srcdir)/$@.old $@ || test -s $@.old >$@ + +install-man3 : manpages.ar + $(mkinstalldirs) $(DESTDIR)$(mandir)/man3 + P=`pwd` ; cd $(DESTDIR)$(mandir)/man3 \ + && ar x $$P/manpages.ar && chmod 664 * + +unpack : manpages.ar htmpages.ar + (rm -rf _htm && mkdir _htm && cd _htm && ar x ../htmpages.ar) + (rm -rf _man && mkdir _man && cd _man && ar x ../manpages.ar) +clean-unpack : + rm -rf _htm + rm -rf _man + +# ------------------------------------------------------------------- +spec_file=$(top_srcdir)/$(PACKAGE).spec +DOCSERIES= 775fb73e-1874-11d7-93e9-e18cd7ea3c2e +FROMSPEC= $(spec_file) | head -1 | sed -e 's,<,\<,g' -e 's,>,\>,g' +DATESPEC= `date +%Y-%m-%d` + +$(PACKAGE)-doc.omf : $(spec_file) Makefile + echo '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>' >$@ + echo '<omf><resource><creator> Guido Draheim </creator>' >>$@ + grep Packager $(FROMSPEC) | sed -e 's,Packager *: *, <maintainer>,' \ + -e '/<maintainer>/s,$$,</maintainer>,' >>$@ + grep Summary $(FROMSPEC) | sed -e 's,Summary *: *, <title>,' \ + -e '/<title>/s,$$,</title>,' >>$@ + echo ' <date>'$(DATESPEC)'</date>' >>$@ + echo ' <version identifier="$(VERSION)" date="'$(DATESPEC)'"/>' >>$@ + grep Group $(FROMSPEC) | sed -e 's,Group *: *, <subject category=",' \ + -e 's,/,|,g' -e '/<subject/s,$$," />,' >>$@ + echo ' <format mime="text/html"/>' >>$@ + echo ' <identifier url="file:$(pkgdocdir)/zzip-index.htm"/>' >>$@ + echo ' <language code="C"/>' >>$@ + echo ' <relation seriesid="$(DOCSERIES)"/>' >>$@ + echo ' <rights type="GNU LGPL" holder="Guido Draheim"' >>$@ + echo ' license="$(pkgdocdir)/COPYING.LIB"/>' >>$@ + echo '</resource></omf>' >>$@ + +DOCBOOKDTD= -//OASIS/DTD Docbook V4.1.2//EN +MANSERIES= a302c642-1888-11d7-86f6-ba4b52ef847d +$(PACKAGE)-man.omf : $(PACKAGE)-doc.omf $(PACKAGE).xml + sed -e 's,"text/html","text/xml" dtd="$(DOCBOOKDTD)",' \ + -e 's,</title>, (Function Reference)</title>,' \ + -e 's,/index.html,/manpages.xml,' \ + -e 's,$(DOCSERIES),$(MANSERIES),' $(PACKAGE)-doc.omf > $@ + test -s $@ || rm $@ + +omf : $(PACKAGE)-doc.omf $(PACKAGE)-man.omf $(PACKAGE).xml +install-omf : $(PACKAGE)-doc.omf $(PACKAGE)-man.omf $(PACKAGE).xml + $(mkinstalldirs) $(DESTDIR)$(pkgomfdir) + $(INSTALL_DATA) $(PACKAGE)-doc.omf $(DESTDIR)$(pkgomfdir)/ + $(mkinstalldirs) $(DESTDIR)$(pkgdocdir) + $(INSTALL_DATA) $(PACKAGE).xml $(DESTDIR)$(pkgdocdir)/manpages.xml + $(INSTALL_DATA) $(PACKAGE)-man.omf $(DESTDIR)$(pkgomfdir)/ + - test ".$(DESTDIR)" != "." || scrollkeeper-update -v + +# ------------------------------------------------------------------- +datehead = <hr><table border="0" width="100%"><tr><td> \ + <a href="mailto:guidod@gmx.de?subject=$(PACKAGE):">guidod@gmx.de</a> \ + </td><td align="right"> +datetail = </td></tr></table> +borderhead = <table cellpadding="10"><tr><td> +bordertail = </td></tr></table> + +site.htm : body.htm + cp $(srcdir)/body.htm site.htm +mksite_sh_args = --VERSION=$(VERSION) --xml --src-dir=$(srcdir) +site.html : site.htm mksite.sh $(htm_FILES) + perl $(srcdir)/mksite.pl $(mksite_sh_args) site.htm || \ + $(SHELL) $(srcdir)/mksite.sh $(mksite_sh_args) site.htm + +x : $(htm_FILES:.htm=.htmls) +$(htm_FILES:.htm=.htmls) : body.htm +%.htmls : %.htm + @ title=`grep '<h2>' $< | sed -e 's:</h2>.*::' -e 's:<[^<>]*>::g'` \ + ; D=$(DATESPEC) ; cat $(srcdir)/body.htm \ + | sed -e "s/<!--VERSION-->/$(VERSION)/" \ + | sed -e "s/<!--DATE-->/$$D/" \ + | sed -e "s:</title>: - $$title</title>:" \ + | sed -e "/$@.>/s:\\([^<>]*\\)</a>:<b>\\1</b></a>:" \ + > $@ + @ echo $< '>>' $@; cat $< | sed -e "s/<!--VERSION-->/$(VERSION)/" \ + -e "s:</h2>\\(.*\\):</h2></td><td><i>\\1</i></td></tr></table>:" \ + -e 's:<h2>:<table width="100%"><tr valign="bottom"><td><h2>:' \ + -e 's:<td><i>:<td align="right"><br> <i>:' \ + -e 's:<P>:<p class="justify"><span class="justify">:g' \ + -e 's:</P>:</span></p>:g' \ + -e 's,<date>,<!--DATE: ,' -e 's,</date>, -->,' \ + -e 's,<!--border-->,$(borderhead)<!--BORDER-->,' >>$@ + @ if grep '<!--BORDER-->' $@ >/dev/null ; then : \ + ; echo "$(bordertail)<!--/BORDER-->" >>$@ ; fi + @ D=`grep '<!--DATE:' $@ | sed -e 's,.*<!--DATE: *,,' -e 's, *-->,,'` \ + ; if test ".$$D" != "." ; then echo '$(datehead)' >>$@ \ + ; echo "$$D" >> $@ ; echo "$(datetail)" >> $@ ; fi + @ echo "</td></tr></table></body></html>" >>$@ + +# ----------------------------------------------- create pdf via docbook xml +zzip.xml : $(htm_FILES) zziplib.xml make-dbk.pl + @PERL@ make-dbk.pl $(htm_FILES) zziplib.xml >$@ + test -s "$@" || rm "$@" + +zzip.html : zzip.xml + xmlto html-nochunks zzip.xml +zzip.pdf : zzip.xml + xmlto pdf zzip.xml + +zziplib.pdf : $(htm_FILES) $(srcdir)/zziplib-master.dbk mksite.pl + cp $(srcdir)/zziplib-master.dbk zziplib.docbook + xmlto pdf zziplib.docbook ; rm zziplib.docbook + test -s zziplib.pdf + +pdf : zziplib.pdf diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/Makefile.in b/Build/source/libs/zziplib/zziplib-0.13.58/docs/Makefile.in new file mode 100644 index 00000000000..889fffd6ff2 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/Makefile.in @@ -0,0 +1,618 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 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@ +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +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@ +target_triplet = @target@ +subdir = docs +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING.LIB +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_compile_check_sizeof.m4 \ + $(top_srcdir)/m4/ac_set_default_paths_system.m4 \ + $(top_srcdir)/m4/ac_sys_largefile_sensitive.m4 \ + $(top_srcdir)/m4/acx_restrict.m4 \ + $(top_srcdir)/m4/ax_cflags_gcc_option.m4 \ + $(top_srcdir)/m4/ax_cflags_no_writable_strings.m4 \ + $(top_srcdir)/m4/ax_cflags_strict_prototypes.m4 \ + $(top_srcdir)/m4/ax_cflags_warn_all.m4 \ + $(top_srcdir)/m4/ax_create_pkgconfig_info.m4 \ + $(top_srcdir)/m4/ax_enable_builddir_uname.m4 \ + $(top_srcdir)/m4/ax_expand_prefix.m4 \ + $(top_srcdir)/m4/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/m4/ax_not_enable_frame_pointer.m4 \ + $(top_srcdir)/m4/ax_prefix_config_h.m4 \ + $(top_srcdir)/m4/ax_set_version_info.m4 \ + $(top_srcdir)/m4/ax_spec_file.m4 \ + $(top_srcdir)/m4/ax_spec_package_version.m4 \ + $(top_srcdir)/m4/ax_warning_default_aclocaldir.m4 \ + $(top_srcdir)/m4/ax_warning_default_pkgconfig.m4 \ + $(top_srcdir)/m4/patch_libtool_on_darwin_zsh_overquoting.m4 \ + $(top_srcdir)/m4/patch_libtool_sys_lib_search_path_spec.m4 \ + $(top_srcdir)/m4/patch_libtool_to_add_host_cc.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/uses/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONFIG_FILES = @CONFIG_FILES@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LARGEFILE_CFLAGS = @LARGEFILE_CFLAGS@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +MKZIP = @MKZIP@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PKG_CONFIG = @PKG_CONFIG@ +PYTHON = @PYTHON@ +RANLIB = @RANLIB@ +RELEASE_INFO = @RELEASE_INFO@ +RESOLVES = @RESOLVES@ +SDL = @top_srcdir@/SDL +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +THREAD_SAFE = @THREAD_SAFE@ +VERSION = @VERSION@ +VERSION_INFO = @VERSION_INFO@ +XMLTO = @XMLTO@ +ZIPTESTS = @ZIPTESTS@ +ZLIB_INCL = @ZLIB_INCL@ +ZLIB_LDIR = @ZLIB_LDIR@ +ZLIB_VERSION = @ZLIB_VERSION@ +ZZIPLIB_LDFLAGS = @ZZIPLIB_LDFLAGS@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_AS = @ac_ct_AS@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +aclocaldir = @aclocaldir@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +ax_enable_builddir_sed = @ax_enable_builddir_sed@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +docdir = @docdir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pkgconfig_libdir = @pkgconfig_libdir@ +pkgconfig_libfile = @pkgconfig_libfile@ +pkgconfigdir = @pkgconfigdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +AUTOMAKE_OPTIONS = 1.4 foreign +AUTOTOOL_VERSION = autoconf-2.52 automake-1.5 libtool-1.4.2 +doc_FILES = README.MSVC6 README.SDL COPYING.MPL COPYING.LIB COPYING.ZLIB \ + zziplib.html + +htm_FILES = zzip-index.htm zzip-zip.htm zzip-file.htm zzip-sdl-rwops.htm \ + zzip-extio.htm zzip-xor.htm zzip-crypt.htm zzip-cryptoid.htm \ + zzip-api.htm zzip-basics.htm zzip-extras.htm zzip-parse.htm \ + 64on32.htm future.htm fseeko.htm mmapped.htm memdisk.htm \ + configs.htm sfx-make.htm developer.htm download.htm \ + history.htm referentials.htm faq.htm copying.htm + +SDL_RWOPS = $(SDL)/SDL_rwops_zzcat.c \ + $(SDL)/SDL_rwops_zzip.c $(SDL)/SDL_rwops_zzip.h + +changelog = @top_srcdir@/ChangeLog +EXTRA_DIST = make-doc.py $(doc_FILES) $(htm_FILES) $(SDL_RWOPS) \ + make-doc.pl make-dbk.pl mksite.sh mksite.pl body.htm \ + manpages.ar zziplib-master.dbk + +CLEANFILES = *.pc *.omf +DISTCLEANFILES = zziplib.spec manpages.ar htmpages.ar *.html *.xml +html_FILES = $(htm_FILES:.htm=.html) \ + $(htm_FILES:.htm=.print.html) \ + site.html site.print.html + +omfdir = ${datadir}/omf +pkgomfdir = ${omfdir}/${PACKAGE} +SFNETDIR = /groups/z/zz/zziplib/htdocs +SFNETDOC = ${datadir}${SFNETDIR} +pkgdocdir = ${datadir}${SFNETDIR} +bins = @top_srcdir@/bins +DOCEXAMPLES = $(bins)/zzdir.c $(bins)/zzcat.c \ + $(bins)/zzobfuscated.c $(bins)/zziptest.c \ + $(bins)/zzxordir.c $(bins)/zzxorcat.c \ + $(bins)/zzxorcopy.c $(SDL_RWOPS) + + +# ------------------------------------------------------------------- +spec_file = $(top_srcdir)/$(PACKAGE).spec +DOCSERIES = 775fb73e-1874-11d7-93e9-e18cd7ea3c2e +FROMSPEC = $(spec_file) | head -1 | sed -e 's,<,\<,g' -e 's,>,\>,g' +DATESPEC = `date +%Y-%m-%d` +DOCBOOKDTD = -//OASIS/DTD Docbook V4.1.2//EN +MANSERIES = a302c642-1888-11d7-86f6-ba4b52ef847d + +# ------------------------------------------------------------------- +datehead = <hr><table border="0" width="100%"><tr><td> \ + <a href="mailto:guidod@gmx.de?subject=$(PACKAGE):">guidod@gmx.de</a> \ + </td><td align="right"> + +datetail = </td></tr></table> +borderhead = <table cellpadding="10"><tr><td> +bordertail = </td></tr></table> +mksite_sh_args = --VERSION=$(VERSION) --xml --src-dir=$(srcdir) +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 \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign 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 + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + $(mkdir_p) $(distdir)/$(SDL) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +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: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ + uninstall-info-am + + +default : doc +clean-doc clean-docs : clean-unpack + - rm $(DISTCLEANFILES) + - rm $(MAINTAINERCLEANFILES) + +# ------------------------------------------------------------------- +zziplib.spec : @top_srcdir@/$(PACKAGE).spec + @ $(LN_S) $? $@ # the two zzip-doc.* will grep thru zziplib.spec +doc : $(doc_FILES) site.html +docs : doc manpages.ar htmpages.ar +docu : docs +zziplib0.html : zziplib0.xml +zziplib0.xml : zziplib.spec @srcdir@/Makefile.am @srcdir@/make-doc.pl \ + $(srcdir)/make-doc.pl @top_srcdir@/zzip/*.c + - @PERL@ $(srcdir)/make-doc.pl @top_srcdir@/zzip/*.c \ + "suffix=0" "package=$(PACKAGE)" "version=$(VERSION)" \ + "mainheader=zzip/zzip.h" "exported=<zzip/zzip.h> // or <zziplib.h>" \ + "docbookfile=$@" + - test -s $@ +zziplib1.html : zziplib1.xml +zziplib1.xml : zziplib.spec @srcdir@/Makefile.am @srcdir@/make-doc.py \ + $(srcdir)/make-doc.py @top_srcdir@/zzip/*.c + - @PYTHON@ $(srcdir)/make-doc.py @top_srcdir@/zzip/*.c suffix=1 + - test -f zziplib1.docbook && mv zziplib1.docbook $@ ; test -s $@ +zziplib.html : zziplib1.html zziplib0.html + - test -s zziplib0.html && cp zziplib0.html zziplib.html + - test -s zziplib1.html && cp zziplib1.html zziplib.html + test -s $@ +zziplib.xml : zziplib1.xml zziplib0.xml + - test -s zziplib0.xml && cp zziplib0.xml zziplib.xml + - test -s zziplib1.xml && cp zziplib1.xml zziplib.xml + test -s $@ || rm $@ + +install-docu: $(doc_FILES) $(man_FILES) site.html $(PACKAGE)-doc.omf + $(mkinstalldirs) $(DESTDIR)$(pkgdocdir) + for i in $(html_FILES) ; do cat $$i \ + | sed -e 's:--START-->:-- :' -e 's:<!--ENDS--: --:' \ + -e "s:\\(href=\"[^/\"]*\\)[.]html\":\\1.htm\":" \ + -e "s:\\(href=\"[^/\"]*\\)[.]html\#:\\1.htm\#:" \ + > $(DESTDIR)$(pkgdocdir)/$$i ; done + @ for i in $(doc_FILES) $(DOCEXAMPLES) $(srcdir)/README.* \ + ; do $(INSTALL_DATA) `test -f $$i || echo $(srcdir)/`$$i \ + $(DESTDIR)$(pkgdocdir) ; done + (cd $(DESTDIR)$(pkgdocdir) && ln -sf zziplib.html zziplib.htm) + $(mkinstalldirs) $(DESTDIR)$(pkgomfdir) + $(INSTALL_DATA) $(PACKAGE)-doc.omf $(DESTDIR)$(pkgomfdir)/ + - test ".$(DESTDIR)" != "." || scrollkeeper-update + +install-sfnet: $(doc_FILES) $(man_FILES) site.html htmpages.ar + $(mkinstalldirs) $(DESTDIR)$(SFNETDOC) + $(INSTALL_DATA) $(html_FILES) $(DESTDIR)$(SFNETDOC) + for i in $(doc_FILES) $(DOCEXAMPLES) $(changelog) $(srcdir)/README.* \ + ; do $(INSTALL_DATA) `test -f $$i || echo $(srcdir)/`$$i \ + $(DESTDIR)$(SFNETDOC) ; done + (cd $(DESTDIR)$(SFNETDOC) && ln -sf zzip-index.html index.html) + $(mkinstalldirs) $(DESTDIR)$(SFNETDOC)/man + (test -f htmpages.ar || cd "$srcdir" ; P=`pwd` \ + ; cd $(DESTDIR)$(SFNETDOC)/man && ar x $$P/htmpages.ar) + +install-doc : install-docu install-sfnet + +# -------------------------------------------------------------------- +man manpages : manpages.ar +htm htmpages : htmpages.ar + +manpages.ar : zziplib.xml + @ if test "$(XMLTO)" = ":" \ + ; then echo no xmlto found - could not regenerate "$@" - skipped \ + ; echo just touching the output file "$@" ; touch "$@" \ + ; else echo going to regenerate "$@" in subdir "'"man"'" \ + ; echo 'test ! -d man || rm man/* ; test -d man || mkdir man' \ + ; test ! -d man || rm man/* ; test -d man || mkdir man \ + ; echo '(cd man && xmlto man ../zziplib.xml)' \ + ; (cd man && xmlto man ../zziplib.xml) \ + ; echo 'test ! -f $@ || mv $@ $@.old' \ + ; test ! -f $@ || mv $@ $@.old \ + ; echo '(cd man && ar qc ../$@ *.3)' \ + ; (cd man && ar qc ../$@ *.3) \ + ; echo '(rm man/*.3 ; rmdir man)' \ + ; (rm man/*.3 ; rmdir man) \ + ; fi ; test -s $@ || mv $@.old $@ \ + || mv $(srcdir)/$@.old $@ || test -s $@.old >$@ + +htmpages.ar : zziplib.xml + @ if test "$(XMLTO)" = ":" \ + ; then echo no xmlto found - could not regenerate "$@" - skipped \ + ; echo just touching the output file "$@" ; touch "$@" \ + ; else echo going to regenerate "$@" in subdir "'"man"'" \ + ; echo 'test ! -d man || rm /* ; test -d man || mkdir man' \ + ; test ! -d man || rm man/* ; test -d man || mkdir man \ + ; echo '(cd man && xmlto html ../zziplib.xml | tee written.lst)' \ + ; (cd man && xmlto html ../zziplib.xml | tee written.lst) \ + ; echo 'test ! -f $@ || mv $@ $@.old' \ + ; test ! -f $@ || mv $@ $@.old \ + ; echo '(cd man && ar qc ../$@ *.*)' \ + ; (cd man && ar qc ../$@ *.*) \ + ; echo '(rm man/*.* ; rmdir man)' \ + ; (rm man/*.* ; rmdir man) \ + ; fi ; test -s $@ || mv $@.old $@ \ + || mv $(srcdir)/$@.old $@ || test -s $@.old >$@ + +install-man3 : manpages.ar + $(mkinstalldirs) $(DESTDIR)$(mandir)/man3 + P=`pwd` ; cd $(DESTDIR)$(mandir)/man3 \ + && ar x $$P/manpages.ar && chmod 664 * + +unpack : manpages.ar htmpages.ar + (rm -rf _htm && mkdir _htm && cd _htm && ar x ../htmpages.ar) + (rm -rf _man && mkdir _man && cd _man && ar x ../manpages.ar) +clean-unpack : + rm -rf _htm + rm -rf _man + +$(PACKAGE)-doc.omf : $(spec_file) Makefile + echo '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>' >$@ + echo '<omf><resource><creator> Guido Draheim </creator>' >>$@ + grep Packager $(FROMSPEC) | sed -e 's,Packager *: *, <maintainer>,' \ + -e '/<maintainer>/s,$$,</maintainer>,' >>$@ + grep Summary $(FROMSPEC) | sed -e 's,Summary *: *, <title>,' \ + -e '/<title>/s,$$,</title>,' >>$@ + echo ' <date>'$(DATESPEC)'</date>' >>$@ + echo ' <version identifier="$(VERSION)" date="'$(DATESPEC)'"/>' >>$@ + grep Group $(FROMSPEC) | sed -e 's,Group *: *, <subject category=",' \ + -e 's,/,|,g' -e '/<subject/s,$$," />,' >>$@ + echo ' <format mime="text/html"/>' >>$@ + echo ' <identifier url="file:$(pkgdocdir)/zzip-index.htm"/>' >>$@ + echo ' <language code="C"/>' >>$@ + echo ' <relation seriesid="$(DOCSERIES)"/>' >>$@ + echo ' <rights type="GNU LGPL" holder="Guido Draheim"' >>$@ + echo ' license="$(pkgdocdir)/COPYING.LIB"/>' >>$@ + echo '</resource></omf>' >>$@ +$(PACKAGE)-man.omf : $(PACKAGE)-doc.omf $(PACKAGE).xml + sed -e 's,"text/html","text/xml" dtd="$(DOCBOOKDTD)",' \ + -e 's,</title>, (Function Reference)</title>,' \ + -e 's,/index.html,/manpages.xml,' \ + -e 's,$(DOCSERIES),$(MANSERIES),' $(PACKAGE)-doc.omf > $@ + test -s $@ || rm $@ + +omf : $(PACKAGE)-doc.omf $(PACKAGE)-man.omf $(PACKAGE).xml +install-omf : $(PACKAGE)-doc.omf $(PACKAGE)-man.omf $(PACKAGE).xml + $(mkinstalldirs) $(DESTDIR)$(pkgomfdir) + $(INSTALL_DATA) $(PACKAGE)-doc.omf $(DESTDIR)$(pkgomfdir)/ + $(mkinstalldirs) $(DESTDIR)$(pkgdocdir) + $(INSTALL_DATA) $(PACKAGE).xml $(DESTDIR)$(pkgdocdir)/manpages.xml + $(INSTALL_DATA) $(PACKAGE)-man.omf $(DESTDIR)$(pkgomfdir)/ + - test ".$(DESTDIR)" != "." || scrollkeeper-update -v + +site.htm : body.htm + cp $(srcdir)/body.htm site.htm +site.html : site.htm mksite.sh $(htm_FILES) + perl $(srcdir)/mksite.pl $(mksite_sh_args) site.htm || \ + $(SHELL) $(srcdir)/mksite.sh $(mksite_sh_args) site.htm + +x : $(htm_FILES:.htm=.htmls) +$(htm_FILES:.htm=.htmls) : body.htm +%.htmls : %.htm + @ title=`grep '<h2>' $< | sed -e 's:</h2>.*::' -e 's:<[^<>]*>::g'` \ + ; D=$(DATESPEC) ; cat $(srcdir)/body.htm \ + | sed -e "s/<!--VERSION-->/$(VERSION)/" \ + | sed -e "s/<!--DATE-->/$$D/" \ + | sed -e "s:</title>: - $$title</title>:" \ + | sed -e "/$@.>/s:\\([^<>]*\\)</a>:<b>\\1</b></a>:" \ + > $@ + @ echo $< '>>' $@; cat $< | sed -e "s/<!--VERSION-->/$(VERSION)/" \ + -e "s:</h2>\\(.*\\):</h2></td><td><i>\\1</i></td></tr></table>:" \ + -e 's:<h2>:<table width="100%"><tr valign="bottom"><td><h2>:' \ + -e 's:<td><i>:<td align="right"><br> <i>:' \ + -e 's:<P>:<p class="justify"><span class="justify">:g' \ + -e 's:</P>:</span></p>:g' \ + -e 's,<date>,<!--DATE: ,' -e 's,</date>, -->,' \ + -e 's,<!--border-->,$(borderhead)<!--BORDER-->,' >>$@ + @ if grep '<!--BORDER-->' $@ >/dev/null ; then : \ + ; echo "$(bordertail)<!--/BORDER-->" >>$@ ; fi + @ D=`grep '<!--DATE:' $@ | sed -e 's,.*<!--DATE: *,,' -e 's, *-->,,'` \ + ; if test ".$$D" != "." ; then echo '$(datehead)' >>$@ \ + ; echo "$$D" >> $@ ; echo "$(datetail)" >> $@ ; fi + @ echo "</td></tr></table></body></html>" >>$@ + +# ----------------------------------------------- create pdf via docbook xml +zzip.xml : $(htm_FILES) zziplib.xml make-dbk.pl + @PERL@ make-dbk.pl $(htm_FILES) zziplib.xml >$@ + test -s "$@" || rm "$@" + +zzip.html : zzip.xml + xmlto html-nochunks zzip.xml +zzip.pdf : zzip.xml + xmlto pdf zzip.xml + +zziplib.pdf : $(htm_FILES) $(srcdir)/zziplib-master.dbk mksite.pl + cp $(srcdir)/zziplib-master.dbk zziplib.docbook + xmlto pdf zziplib.docbook ; rm zziplib.docbook + test -s zziplib.pdf + +pdf : zziplib.pdf +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/README.MSVC6 b/Build/source/libs/zziplib/zziplib-0.13.58/docs/README.MSVC6 new file mode 100644 index 00000000000..ee042c35092 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/README.MSVC6 @@ -0,0 +1,137 @@ +To compile zziplib with MSVC++ 6 you can use the workspace and project +files shipped along with the zziplib tarball in the msvc6/ directory. +This will save you most of the following steps, atleast skip step 1. + +Step 1: create zziplib workspace file + +- Create a workspace and a project file for "zzip". +- Add all .c and .h files in the zzip/ directory. Yes, all. +- Add the toplevel directory (containing the zzip/ directory) as an + "Additional Include Directory" to the search path. Best do this in + -> Project -> Settings -> Tab: C/C++ + -> Category: Preprocessor -> "Additional Include Directories". + This is a comma-separated list, in the workspace files shipped along + with the zziplib tarball, you will see ".." in there where ".." (or ..\..) + is the path to the toplevel directory of the unpacked sources. +- if you did choose "DLL" as a project type then you will automatically + see a define _USRDLL and ZZIP_EXPORTS in (this is just a hint)... + -> Project -> Settings -> Tab: C/C++ + -> Category: Preprocessor -> "Preprocessor Definitions". +- remove any LIB imports other than "kernel32.lib" + -> Project -> Settings -> Tab: Link + -> Category: Input -> "Object/Library Modules" + +Step 2: add zlib dependencies of zziplib.dll + +- if you do not have installed zlib in the system then you may want to + download "lib" + "bin" parts from http://gnuwin32.sf.net/packages/zlib.htm + (I found this msvcrt package via a reference at http://www.zlib.org) +- suppose you have the zlib.h file in "D:\include" and the libz.lib file + is in "D:\lib" then we need to add those dependencies to the project. +- add the path to zlib.h as an "Additional Include Path", best do this in + -> Project -> Settings -> Tab: C/C++ + -> Category: Preprocessor -> "Additional Include Directories". + This is a comma-separated list, after you have changed it, it might + look like "..,.,D:\include" (for ".." part see description in Step 1) +- That is enough to build a zziplib.lib, in order to create a zziplib.dll + we need to resolve its linker dependencies as well, best do this in + -> Project -> Settings -> Tab: Link + -> Category: Input -> "Object/Library Modules" + This is a space separated list (!!), add "libz.lib" there, so after + changing it it might look like "kernel32.lib libz.lib". Also modify + -> Project -> Settings -> Tab: Link + -> Category: Input -> "Additional Library Path" + which is usually empty. After changing it, it might contain "D:\lib". +- Also add ZZIP_DLL or ZZIP_EXPORTS for dllspec(exports), best do this in + -> Project -> Settings -> Tab: C/C++ + -> Category: Preprocessor" -> "Preprocessor Definitions". + After changing it, it might look like + "NDEBUG,WIN32,_WINDOWS,_MBCS,_USRDLL,ZZIP_EXPORTS" + +Step 3: example binaries to link with zziplib.dll + +- dynamic linking is best to avoid any copyright problems, the "Lesser GPL" + does not restrict usage of zziplib for the case of a separated zzip.dll +- the example workspace builds two zziplib libraries, where zziplib.lib + points to the staticlink variant and zzip.lib to the dynalink variant + which will add a dependency on zzip-1.dll being in the PATH +- the example binaries shipped with zziplib tarball do only have a single + .c file per output .exe, we pick zzcat.exe to guide you through. +- if you do not use our shipped project files, create a project "zzcat" + and add "bins/zzcat.c" in there. +- adjust the "Additional Include Directories": + -> Project -> Settings -> Tab: C/C++ + -> Category: Preprocessor -> "Additional Include Directories". + like in Step 1 add the path to "./zzip" owning the zziplib headers. + We do _not_ need the zlib headers to compile "zzcat.exe", so it might + just look like ".." (or "..\.." or "..\zziplib-0.10.82") +- adjust the "Object/Library Modules" + -> Project -> Settings -> Tab: Link + -> Category: Input -> "Object/Library Modules" + adding "zzip.lib libz.lib" with a space. The result might look like + "kernel32.lib zzip.lib libz.lib" or "kernel32.lib zziplib.lib libz.lib". +- adjust the "Additional Library Path" + -> Project -> Settings -> Tab: Link + -> Category: Input -> "Additional Library Path" + and add both zziplib libpath and libz libpath, separated by comma, i.e. + ".\Release,D:\lib" or ".\Debug,D:\lib" + +Step 4: Customization +- have a look at the info parts that can be put into the DLL project: + -> Project -> Settings -> Tab: Link + -> Category: Output -> "Version Information" + e.g. Major: "10" Minor: "82" for Release 0.10.82 of zziplib + -> Project -> Settings -> Tab: Resources -> "Language" + or just ignore the value when no messages are there + -> Project -> Settings -> Tab: Link + -> Category: General -> "Output Filename" + e.g. "zzip-1.dll" intead of "zzip.dll" for this first generation + (needs also to rename dll dependencies from "zzip.lib" to "zzip-1.lib") +- there are a few defines that trigger extra code in zziplib, e.g. + ZZIP_HARDEN - extra sanity check for obfuscated zip files + ZZIP_CHECK_BACKSLASH_DIRSEPARATOR - to check for win32-like paths + (for the magic part within a zip archive we always assume a "/" separator) + ZZIP_USE_ZIPLIKES - not only do magic checks for ".zip" files to + be handled like directories, also do that for a few other zip documents + ZZIP_WRAPWRAP - if there problems on unusual targets then try this one. + -> Project -> Settings -> Tab: C/C++ + -> Category: Preprocessor" -> "Preprocessor Definitions". + +Step 5: Testing +- copy the *.dll and *.exe files from msvc6/Release/ to a place reachable + from your PATH (perhaps d:\bin), or even simpler, go the other way round, + copy the file test/test.zip to the msvc6/Release/ directory. +- open a command window (usually with a "MSDOS" symbol) and go the + directory containing the test.zip (e.g. cd zziplib-0.10.82/msvc6/Release) +- run `zzcat test/README` which should extract the file README from the + test.zip archive and print it to the screen. Try `zzdir test` to see + that it was really a compressed file printed to the screen. +- If it works then everything is alright round zziplib which is a good + thing to know when there are other problems +- at the time of writing (0.10.82 of zziplib), the set of bin files are + precompiled with msvc6 and pushed to the download center at sourceforge. + +cheers, -- guido + +# finally, the older description for zziplib 0.10.5x + +To build zziplib you need to add the path to zlib to the include directories +search path. You find this under + + Project, Settings, C/C++, Preprocessor, Additional Include Directories. + +Example: +You have installed zlib to D:\zlib. You then change the edit box + Additional Include Directories +from + .. +to + ..,D:\zlib + + +Included are two project files for zziplib. One that creates +zziplib as a DLL, and one that creates zziplib as a static library. +The DLL version is compiled with multi-threaded support. The static library +version is currently set to link with libc(d).lib, i.e. only single-threaded +CRT. If this does not suit your needs, you can change this under + Project, Settings, C/C++, Code Generation, Use run-time library. diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/README.SDL b/Build/source/libs/zziplib/zziplib-0.13.58/docs/README.SDL new file mode 100644 index 00000000000..29a504621e7 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/README.SDL @@ -0,0 +1,125 @@ +16122002, Thomas.Eder@nmi.at, Using the zziplib library with SDL + + +PREREQUISITES + + Tested versions: + zziplib 0.10.66 (preview), SDL 1.2.5, Win32, MSVC6 + + Homepages (download) + zziplib.sourceforge.net (zziplib-0.10.66.tar.gz) + www.libsdl.org (SDL-devel-1.2.5a-VC6.zip) + + Also you have to get zlib, I used + from SDL_image-1.2.2.zip in VisualC.zip: + zlib.lib (12.7.1998, 34674 bytes) + zlib.h ( 9.7.1998, 41791 bytes, 1.1.3) + zconf.h ( 8.7.1998, 8089 bytes) + + from SDL_image-devel-1.2.2-VC6.zip: + zlib.dll ( 5.4.2001, 53760 bytes, 1.1.3.1) + + Maybe you should get the latest version (currently 1.1.4) from + http://gnuwin32.sourceforge.net/install.html + (see notes at end of page!) + + +CREATING zzlib.dll/zzlib.lib + + Copy your versions of zlib.lib, zlib.h and zconf.h to the zzlib + directory. + In MSVC (start zziplib.dsw) + Add zlib.lib to the files for the zziplib_DLL project. + Add ZLIB_DLL to the preprocessor definitions. + + Set the active project and the active configuration to create zziplib.dll + and zziplib.lib (I created and used the release version). + + +USING zzlib WITH SDL + + Include/add the following files to your SDL-Project + (put them in proper directories, etc.): + + Header files: + zconf.h + zlib.h + zzip.h + zzip-conf.h + zzip-io.h + zziplib.h + zzip-msvc.h + zzip-stdint.h + + Libraries: + zlib.lib + zziplib.lib + + DLLs: + zlib.dll + zziplib.dll + + you may also want to use + SDL_rwops_zzip.c + SDL_rwops_zzip.h + + + For compiling it should be sufficient to use + #include <zziplib.h> + in the files where you use zziplib-functions. + + +NOTE + + It is possible to use both original (unzipped) and zipped versions of files, + and zziplib will take one of them (depending on the modes when calling + zziplib). + + But this didnt work for all of my original files, so I suggest using zipped + files only (and remove the original unzipped files, so zziplib doesnt try to + open the original version). + + +HINT + + When opening many files from a zip, its faster to open the zip-directory + only once, and not for every file access. You may want to modify + SDL_rwops_zzip for this to get code like: + + + SDL_Surface* image; + SDL_RWops* rw; + SDL_Surface* temp1 = NULL; //default > NULL > error + SDL_Surface* temp2 = NULL; //default > NULL > error + + //last param may be used for err return + ZZIP_DIR* zzipdir = zzip_dir_open( "figures.zip", NULL ); + + ZZIP_FILE* zfile = zzip_file_open(zzipdir, "f1.bmp", ZZIP_CASELESS); + + if (zfile) + { + rw = SDL_RWFromZZIP(zfile); //modified version + if (rw) + { + temp1 = IMG_Load_RW(rw, 0); + SDL_FreeRW(rw); + } + int zret = zzip_file_close( zfile ); + } + + zfile = zzip_file_open(zzipdir, "f2.bmp", ZZIP_CASELESS); + if (zfile) + { + rw = SDL_RWFromZZIP(zfile); //modified version + if (rw) + { + temp2 = IMG_Load_RW(rw, 0); + SDL_FreeRW(rw); + } + int zret = zzip_file_close( zfile ); + } + + //.. etc + + zzip_dir_close( zzipdir ); diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/body.htm b/Build/source/libs/zziplib/zziplib-0.13.58/docs/body.htm new file mode 100644 index 00000000000..60e72627a1b --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/body.htm @@ -0,0 +1,98 @@ +<html><head><title>zziplib <!--$title?--> </title> +<link rel="stylesheet" type="text/css" href="sdocbook.css" /> + <style> + a:link { text-decoration : none ; color : #000080 ; } + a:visited { text-decoration : none ; color : #200060 ; } + .justify { text-align : justify ; } + .navlist { background-color : #F0F0F0 ; + width : 9em ; speak : none ; } + .navprint { pause-after : 200ms ; speak : spell-out ; } + body { background-color : white ; } + .P { text-align : justify ; margin-right: 1em ; + margin-left: 1em ; } + .BLOCKQUOTE { text-align : justify ; margin-right: 3em ; + margin-left: 3em ; } + .PRE { margin-right: 2em ; + margin-left: 2em ; } + .DT { font-weight : bold ; } + .DD { text-align : justify ; margin-right: 1em ; } + </style> +</head><body> +<!--mksite:sectioninfo--> <!--mksite:nosimplevars--> +<table width="100%"><tr valign="top"><td class="navlist"> +<center><sub> + <!--mksite:printerfriendly--> + <a href="${printerfriendly:=site.htm}" title="printer friendly version"> + <img alt="printer / text mode version" width="8" height="8" border="0" /></a> + </sub> + <big><big><big><b> + <font color="#800080"><sup>Z</sup>ZIP<sub>lib</sub></font> + </b></big></big></big> +<br><big><b> <!--$VERSION--> </b></big> +</center> +<hr><a href="zzip-index.html">Library</a> +<br>-<a href="zzip-zip.html"> ZIP Access</a> +<br>-<a href="zzip-file.html"> Transparently</a> +<br>-<a href="zzip-sdl-rwops.html"> SDLrwops <small>Example</small></a> +<br>-<a href="zzip-extio.html"> ext/io <small>Customization</small></a> +<br><><a href="zzip-xor.html"> xor/io <small>Obfuscation</small></a> +<br><><a href="zzip-crypt.html"> zip/no <small>Encryption</small></a> +<small><a href="zzip-cryptoid.html">(2)</a></small> +<br>-<a href="zzip-api.html"> Library API</a> +<br><><a href="zzip-basics.html"> basics</a></u> +<><a href="zzip-extras.html"> extras</a></u> +<br>=<a href="zzip-parse.html">Parsing ZIPs</a> +<br>-<a href="64on32.html"> 64on32 extras</a> +<br>-<a href="future.html"> Next To Come</a> <br> <> +<small><a href="fseeko.html"> fseeko </a></small> +<small><a href="mmapped.html"> mmapped </a></small> +<small><a href="memdisk.html"> memdisk </a></small> +<br>-<a href="configs.html"> Config Helpers</a> +<br>-<a href="sfx-make.html"> Making a zip/exe</a> +<br>=<a href="history.html">Hints And Links</a> +<br>-<a href="referentials.html"> Referentials</a> +<br> -<a href="zziplib.html"> Functions List #</a> +<!--START--> +<br> -<a href="man/index.html"> <small>The</small> Manual Pages #</a> +<!--ENDS--> + +<br>    <small>(# autogenerated)</small> + +<br> +<hr><a href="download.html"> Download Area </a> +<br><><a href="developer.html"> Developer Area </a> +<br><><a href="http://sourceforge.net/projects/zziplib"> Sourceforge Project</a> +<br><><a href="http://zziplib.sourceforge.net"> zziplib.sf.net + <small><i>Home</i></small></a> + +<br><small><a href="copying.html"> LGPL/MPL license</a></small> +<br><small><a href="faq.html">faq</a></small> +<br> +<hr> +<center><!--START--> + <a href="http://sourceforge.net/project/?group_id=6389"> + <img src="http://sourceforge.net/sflogo.php?group_id=6389&type=2" + border="0" alt="sourceforge.net" width="125" height="37"> + </a> +<br><small><a href="site.html">-sitemap-</a></small> +</center><!--ENDS--> + +<p align="right"><small> +generated <!--$today--> +</small> +<br> <small>(C)</small> Guido Draheim +<br><i> guidod<small>@</small>gmx.de</i> +</p> +<!--mksite:emailfooter:guidod@gmx.de?subject=zzip:--> + +<p align="right"><small><small> + formatted by <a href="http://zziplib.sf.net/mksite">mksite.sh</a> +</p> + +<p><b>as xml:</b></p> +<hr><a href="zzip-index.xml">Library</a> +<br>-<a href="64on32.xml"> 64on32 extras</a> +<br>-<a href="future.xml"> Next To Come</a> <br> <> +</td><td> + +</td></tr></table></body></html> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/configs.htm b/Build/source/libs/zziplib/zziplib-0.13.58/docs/configs.htm new file mode 100644 index 00000000000..49631e673de --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/configs.htm @@ -0,0 +1,164 @@ +<section> <date> February 2003 </date> +<h2> Configuration </h2> of other projects using zziplib + +<!--border--> + +<P> + If using the zziplib with other project then you can use a number + of possibility to configure and link. The zziplib had been usually + included within the projects that made use of it - some did even + pick up the advantage to be allowed to staticlink in a limited + set of conditions. Recently however, the zziplib is shipped as a + standard library of various linux/freebsd distros - mostly for + the usage by the php-zip module. This allows third party software + makers to link to the preinstalled library in the system and + consequently reduce the memory consumption - even more than now + with the zziplib being a lightweight anyway (the i386 .so is + usually less than 20k) +</P> + +<section> +<h3> pkg-config --libs </h3> + +<P> + Within modern software development, one should be advised to use + pkg-config as soon as it is available. The pkg-config helper can + handle a lot of problems that can usually come up with linking + to third party libraries in case that those link again dynamically + with other libraries themselves. It does correctly order the + list of "libs", it can throw away duplicate "-L" hints, and same + for cflags "-I" hints, plus it will throw away some sys-includes + that gcc3.2 will warn about with a false positive. +</P> +<P> + There is a number of pkg-config targets installed in the system + but the one you want to use is <b>pkg-config zziplib</b>. + Therefore, a simple Makefile could read like + <pre> + PROGRAM = my_prog + CFLAGS = -Dhappy `pkg-config zziplib --cflags` + LIBS = -Wl,-E `pkg-config zziplib --libs` + + my_prog.o : my_prog.c + $(CC) $(CFLAGS) $< -o $@ + my_prog : my_prog.o + $(LINK) $< $(LIBS) + </pre> +</P> +<P> + The `pkg-config zziplibs --libs` will usually expand to + something like <code>-lzzip -lz</code> which are the + two (!!) libraries that you need to link with - in that + order. The zziplib builds on top of the z-lib algorithms + for compression of files within the zip-archive. That's + the same for other lib-parts of the zziplib project as + well, e.g. the sdl-rwops part which does also need to + link with the sdl-lib - and that's where the pkg-config + infrastructure can be of great help. That's the reason + why zziplib installs a few more ".pc" files, you can + get a list of them like this: + <pre> + $ pkg-config --list-all | sort | grep zzip + zziplib zziplib - ZZipLib - libZ-based ZIP-access Library + zzip-sdl-config zzip-sdl-config - SDL Config (for ZZipLib) + zzip-sdl-rwops zzip-sdl-rwops - SDL_rwops for ZZipLib + zzipwrap zzipwrap - Callback Wrappers for ZZipLib + zzip-zlib-config zzip-zlib-config - ZLib Config (for ZZipLib) + </pre> +</P><P> + The two entries like "zzip-sdl-config" and "zzip-zlib-config" + happen to be ".pc" files for the libz.so and libSDL.so that + were seen at configure-time of zziplib - you may want to reuse + these in your projects as well whenever you need to link to + either of zlib or libsdl even in places where there is no direct + need for zziplib. It basically looks like: + <pre> + $ pkg-config zzip-zlib-config --modversion + 1.1.4 + $ pkg-config zzip-zlib-config --libs + -lz + </pre> +</P> + +</section><section> +<h3> zzip-config </h3> +<P> + The pkg-config ".pc" files are relativly young in the history of + zziplib. A long time before that there was the `zzip-config` + script installed in the system. These `*-config` were common + before the pkg-config came about, and in fact the pkg-config + infrastructure was invented to flatten away the problems of + using multiple `*-config` scripts for a project. As long as you + do not combine multiple `*-config`s then it should be well okay + to use the `zzip-config` directly - it does also kill another + dependency on the `pkg-config` tool to build your project, the + zziplib is all that's needed. +</P> +<P> + In its call-structure the `zzip-config` script uses the same + options as `pkg-config`, (well they are historic cousins anyway). + and that simply means you can replace each call above like + `pkg-config zziplib...` with `zzip-config...`. + + <pre> + PROGRAM = my_prog + CFLAGS = -Dhappy `zzip-config --cflags` + LIBS = -Wl,-E `zzip-config --libs` + + my_prog.o : my_prog.c + $(CC) $(CFLAGS) $< -o $@ + my_prog : my_prog.o + $(LINK) $< $(LIBS) + </pre> +</P> +<P> + Be informed that the zzip-config script is low-maintained and + starting with 2004 it will be replaced with a one-line script + that simply reads `pkg-config zziplib $*`. By that time the + rpm/deb packages will also list "pkgconfig" as a dependency + on the zziplib-devel/zziplib-dev part. +</P> + +</section><section> +<h3> autoconf macro </h3> + +<P> + There is currently an autoconf macro installed along into + the usual /usr/share/aclocal space for making it easier for + you to pick up the configure-time cflags/libs needed to + build/link with zziplib. In any way it does look like + this: + <pre> + dnl PKG_CHECK_ZZIPLIB(ZSTUFF, min-version, action-if, action-not) + AC_DEFUN([PKG_CHECK_ZZIPLIB],[dnl + PKG_CHECK_MODULES([$1], [zziplib $2], [$3], [$4])]) + </pre> +</P> +<P> + You are strongly advised to take advantage of the pkgconfig's + macro directly - you can find the macro in + <code>/usr/share/aclocal/pkg.m4</code> and it allows to + combine the flags of a list of library modules that you + want to have. If it is only zziplib, than you could simply + use this in your configure.ac: +<pre> + <b>PKG_CHECK_MODULES</b>([<b>ZZIP</b>],[zziplib >= 0.10.75]) + </pre> +</P><P> + which will provide you with two autoconf/automake variables + named <b><code>ZZIP_CFLAGS</code></b> and <b><code>ZZIP_LIBS</code></b> + respectivly. +</P> +<P> + Up to 2004, the macro in zziplib.m4 will be however carry + a copy of the pkg.m4 so that you do not need another + dependency for your software project. The macro is called + like shown above PKG_CHECK_ZZIPLIB and you would call it + like +<br><code> + PKG_CHECK_ZZIPLIB([ZZIP],[0.10.75])</code><br> + which will give you the two autoconf/automake variables + as well, <code>ZZIP_CFLAGS</code> and <code>ZZIP_LIBS</code> +</P> + +</section></section> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/copying.htm b/Build/source/libs/zziplib/zziplib-0.13.58/docs/copying.htm new file mode 100644 index 00000000000..2f0c8c96d79 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/copying.htm @@ -0,0 +1,113 @@ +<section> <date> 2004 </date> +<h2> COPYING - license information </h2> the public license terms + +<P> + The zziplib is a small library that allows for some parts of + obfuscation. This is very handy in commercial projects which tend + to incorporate a copy into their source tree. And with + <a href="zzip-xor.htm">obfuscation</a> it is often advisable + to staticlink the zziplib part and `strip` the symbols from + the resulting binary - in order to obfuscate the usage of a + standard library for semi-`encryption` of data files. +</P> + +<P> + In the past I have been modifying the original LGPL license + with a text that allows staticlinking thereby taking over a + few paragraphs from the MPL as restrictions to do so, just to + defend against improper usage. However I kept being asked + legalese questions since most people do not want to interpret + added text either and on their own without a lawyer. However + that accounts to me as well. +</P> +<P> + The public license(s) are simply there to protect me and + my work, none of this is fixed and it is neither the only + possible way to get hold of a proper license. You can + always contact me to negotiate a special one if you do + need so. In most cases I will just say okay and you get + it for free, perhaps after some presentations I will + ask for som tax-reductable compensation sent to + a wellfare organisation (never me!). +</P> +<P> + A last hint from a friend did make me think as well, as + that the whole point of using standard public licenses + is to protect against the need to use your own lawyers + in the case that someone breaks the license rules. If + one uses a standard license then it is in the interest + of that big organization XY that the license will be + enforced and that it will be shown valid in all courts. + At the time of writing, no opensource license has + ever been discussed to an end in a court trial. +</P> +<P> + That's why at last, I decided to change the COPYING + details once again - and start shipping under a dual + MPL / LGPL license where each of them is separate + and restrictions apply alternatively. Remember that + each license is non-exclusive anyway, and I can give + out as many licenses as I want, here we have one as + MPL, then we have one as LGPL, and perhaps you ask me + for a third text to send you over. The public ones + are just there for you as a free choice which you can + pick without negotiations or a fee. +</P> +<P> + And yes, you will be on established legal grounds as + long as you restrict your usage of the library to the + details contained in either COPYING text. And better + yet, the legal possibilities have been discussed + a few hundred times before. You will surely find + good answers on the internet as well to guide you + to decisions in your company whether zziplib may + be adopted for a specific task. +</P> +<P> + The sources themselves are sent out under a dual license, + with both MPL and LGPL license options, and as long as + the MPL part is not removed then the recpient of some + modified sources will be entitled to the same choice + among the public licenses of LGPL / MPL. Note that some + example sources are given away under the ZLIB license + which is nothing more than asking for nice behavior + which should have been the case even without such a text. + <small><small>(However, it is just a fact that some people + happen to behave anti-social especially under pressure of + capitalist needs, said to lower the risks for commercial + success/failure of a company. You have to enforce good + behavior or it will be "forgotten". With a license it is + not just an error, it is a risk in itself to forget about it) + </small></small> +</P> +<P> + As for staticlinking, let us explore that a bit - there has + been a debate that the LGPL warrants in fact the freedom of + the final recipient as you must give him the original or + modified sources of zziplib, to allow them to modify that + part again, and then (re-)link to your own parts. Your own + parts may come in the form of precompiled objects without + sources (as opposed to the GPL restrictions). In here, it + is simply easier to use a dynamic linker that does the + re-linking job at startup-time of the whole project instead + to provide a makefile and linkage descriptions to let the + user do the staticlink it into a combined executable object. + The latter however is often needed for embedded environments + and it is quite of the original motivation to ask for a + staticlink option where in fact the LGPL does allow it anyway + as long as you ship all parts separatly as well. +</P> + +<P> + The MPL defines the area of a combined work a bit differently, + in a way it derives some ideas from BSD'ish licenses. This + part does more care to protect the `Intellectual Properties` + of the original developers. It does ask to prominently show + off that you have gone to link with the work of someone else + in your project. Take special note of <em>"3.5 Required Notices"</em>, + <em>"3.6 Distribution of Executable Versions"</em> and + <em>"3.7 Larger Works"</em> here. Or read a lawyer text on + the legal result of the whole license. +</P> + +</section> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/developer.htm b/Build/source/libs/zziplib/zziplib-0.13.58/docs/developer.htm new file mode 100644 index 00000000000..57c5c685ca7 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/developer.htm @@ -0,0 +1,67 @@ +<section> <date> 2004-05-18 </date> +<H2> Developer </H2> sourceforge CVS area + +<center> +<a href="http://sourceforge.net/cvs/?group_id=6389"> + http://sourceforge.net/cvs/?group_id=6389 </a> +</center> + +<P> + Since 0.13.x the zziplib is using a cvs module "zzip-0" at the + sourceforge cvs source repository host. You can get a snapshot + from that area anytime, the access details can be found under the + link above. All later releases are actually snapshots of some + cvs day. (Prior releases had seen too many reshuffling of the + build system which cvs is not the best tool to handle gracefully). +</P> +<P> + I am using the sourceforge compilefarm to do remote testing of + releses for crossplatform compatibility. This includes usually + some unix compatible platforms such as Linux, Solaris, + FreeBSD, Darwin/MacOSX including i386, amd64, sparc, sparc64, + powerpc when available. Even the latest daytoday cvs snapshots + should be fine for these platforms. +</P> +<P> + In the labs of my employer some more platforms exist but these are + only checked once in a few months, mostly summertime and christmas + season if the general workload is low. That includes hp/ux but more + importantly a real MSVC6 installation and a few PCs with win32 flavours. + I do not use win32 at home! Any help in that area is greatly appreciated, + the zziplib was written in strict ansi-C but the build system and dll hell + is sometimes very weird for win32 platforms. I feel it often requires + experienced hands to detect the source of a problem should there be one. +</P> +<P> + Note also that I do not use PHP, there is a regular flow of questions + circulating around the php-zip module which is built around zziplib. But + I can not answer any questions about the build and installation for that. + It would be greatly appreciated if I can find contact to a PHP hacker + to whom I can forward php related mails! The php zip wrapper is not part + of the zziplib in any way. +</P> +<P> + Since there is an MSVC6 system in reach now, I have not been updating my + gcc/mingw32 installations as rigidly as most other win32 developers + have. I understand there are great advancements in the msys/mingw32 area + and the provided technology which made them follow quickly. However in + the labs only some older releases are used for these are called more + "stable". Remember that I do not use win32 at home, only crosscompile to + mingw32 is checked out sometimes but I know that it is somewhat different + than the selfhosted msys environment. Any help is greatly appreciated. +</P> +<P> + Lastly, I am trying to make the zziplib as close as possible to the + thing called "industrial strength". But remember that this is still + an opensource spare time probject. <b>I take patches</b>! Many of the + interesting parts of zziplib have been introduced by submission which + I have later integrated more heavily to make the zziplib be what it + was always intended for: to be a small, fast and portable library allowing + to use a zip file as a special variant of a data filesystem. The ext/io + obfuscation stuff was one of the best feature submissions so far. Thanks. +</P> +<P> + Looking forward to hear from <em>YOU</em>. + - <a href="mailto:guidod@gmx.de?subject=zzip:">guidod@gmx.de</a> +</P> +</section> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/download.htm b/Build/source/libs/zziplib/zziplib-0.13.58/docs/download.htm new file mode 100644 index 00000000000..d52111155fc --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/download.htm @@ -0,0 +1,56 @@ +<section> <date> 2004-05-18 </date> +<H2> Download </H2> what to get to get it + +<section> +<H4>Sourceforge File Area</H4> + +<center> +<a href="http://sourceforge.net/project/showfiles.php?group_id=6389"> + sourceforge.net/project/showfiles.php?group_id=6389 </a> +</center> + +<P> + All source releases and some binary releases are listed at the + sourceforge download area under the link show above. The sourceforge + file area is replicated all over the world and should be accessible + with highest bandwith in all corners of the world. +</P> + +</section><section> +<H4> Which Version To Download </H4> + +<P> + Do not use 0.10.x anymore! It is listed as stable since it is the + only release of zziplib tested to work on a few dozen platforms. + However there were some problematic zip files out there that can + trigger segfaults. Later zzip file decoders have extra checks and + helper routines for that. It's just that the later zziplib have not + been given as many crossplatform build tets as the 0.10.x generation. +</P> +<P> + Use a 0.12.x (proto-stable) or a 0.13.x (developer) variant of + zziplib, especially if you intend to make heavy usage of the zip + decoders in specialized environments - I will not add any fixes to + the 0.10.x series anymore (it's deep frozen) but if you hit a + problem with 0.13.x I can help you quickly with a patch and official + bugfix release. The later versions are regulary checked crossplatform + atleast for <b>Linux, Solaris, FreeBSD, Darwin/MacOSX, Win32/NT</b> + including i386, amd64, sparc, sparc64, powerpc where available. +</P> +<P> + Note that all generations 0.10.x through 0.13.x are strictly + <b>backward compatible</b>. There is a core API (file and dir + handling) being binary compatible, which is also true for most + of the helper routines (data getters). Only some rarely used + entries are made source level compatible, and so far no one had + ever any problem with binary compatibility of the zziplib DLLs. +</P> +<P> + The MSVC users are strongly advised to use a a later version as + well since I have tested the 0.12.x/0.13.x myself and making + some msc binary dll releases directly - prior versions were + thirdparty contributions which were working smoothly since I have + been preparing zziplib for win32 using the gcc/mingw compile suite. + Please check also the <a href="developer.html">developer pages</a>. +</P> +</section></section> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/faq.htm b/Build/source/libs/zziplib/zziplib-0.13.58/docs/faq.htm new file mode 100644 index 00000000000..56d79366655 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/faq.htm @@ -0,0 +1,182 @@ +<section> <date> 2004 </date> +<H2> FAQ </H2> (non)frequently asked questions + +<BLOCKQUOTE> + While using the zziplib some people come up with questions and + problems that need a little longer to be explained. So here is + a list of these notes for your information. Keep it up. +</BLOCKQUOTE> +<ul> +<li> <a href="#latin-1">extended ascii characters in names of zipped files </a> +</li> +<li> <a href="#utf-8">unicode support for names of zipped files </a> +</li> +<li> <a href="#timestamps">timestamps of zipped files </a> +</li> +<li> <a href="#install">installation instructions </a> +</li> +<li> <a href="#php">php zip module installation </a> +</li> +<li> <a href="#license">commercial support </a> +</li> +</ul> + +<DL> +<DT><a name="latin-1" /> + zziplib does not support extended ascii characaters, winzip does</DT> +<DD><P> + That's somehow incorrect - the ascii range is the 7bit lower plane of + an 8bit character encoding. The upper plane had been non-standard for + decades including the age when the ZIP file format was invented. The + first instances of pkware's zip compressor were used on DOS with a + codepage 437 which has a way different encoding for the upper plane + than todays latin-1 encoding which in fact used in <em>all</em> + modern operating systems. So what really see is a mismatch of + character encodings that you are used to. +</P><P> + Even more than that the character encoding had never been specified + at all for the filenames in the central directory part. An alert + reader will however recognize that <em>each</em> file entry does + also have version-info field telling about the compressor that did + create the file entry. That version-info has an upper byte telling + about the host OS being in use while packaging. A heavy-weight + zip decoder might use that value to infer the character encoding + on the host OS (while compressing), to detect a mismatch to the + current OS (while decompressing), and going to re-code the filename + accordingly. +</P><P> + Even more than that the zip file format has seen various extensions + over time that have found their place in an extra info block. There + are info blocks telling more about the filename / codeset. However + the zziplib library does not even attempt to decode a single extra + info block as zziplib is originally meant to be a light-weight library. + However one might want to put a layer on top of the structure decoding + of zziplib that does the necessary detection of character encodings and + re-coding of name entries. Such a layer has not been written so far. +</P></DD> +<DT><a name="utf-8" /> + zziplib does not support any unicode plane for filenames </DT> +<DD><P> + The pkware's appnote.text has an extra info block (id-8) for the + unicode name of the file entry but it was never actually being + used AFAICS. This might be related to the current developments of + older systems to drop usage of latin-1 encoding in the upper plane + of 8bit characters and instead choosing the multibyte encoding + according to UTF-8. This is again highly system specific. +</P><P> + Basically, you would need to instruct the compressor to use + UTF-8 encoding for the file-entries to arrive at a zip archive + with filenames in that specific character encoding. Along with + this zip archive one can switch the application into utf-8 usage + as well and take advantage of filename matches in that encoding. + This will make it so there is not mismatch in character encoding + and implicit re-coding being needed. +</P></DD> +<DT><a name="timestamps" /> + zziplib does not return stat values for file timestamps </DT> +<DD><P> + That's correct and again a re-coding problem. The original + timestamp in each file entry is in DOS format (i.e. old-FAT). + The stat value is usually expected to be in POSIX format. The + win32 API has an extra function for conversion but none of the + unix compatibles has one, so it would be needed to ship a + conversion function along with zziplib. +</P><P> + However the zziplib is intended to be light-weight system and + used largely for packaging data for an application. There it + is not used strictly as a variant of Virtual File System (vfs) + that would need to map any information from the zip file system + to native host system. Of course applications are free to cut + out the DOS file timestamp and re-code it on their own. It's + just that zziplib does not provide that re-coding originally. +</P></DD> +<DT><a name="install" /> + how can one install the zziplib package </DT> +<DD><P> + The zziplib project is opensource which effectly gives two ways of + installing the package: one can download the source archive and use + a C compiler to derive a binary executable for whatever computer + it needs to be on (see the platform compatibility list). This is + the preferred way but for convenience one can download a binary + installation archive with precompiled executables. +</P><P> + The current project uses autoconf/automake for cross platform + support which includes most unix compatible systems and their + native C compilers. The derivates of the GNU C compiler (gcc) have + replaced most of these native C compilers in the past years. The + <a href="http://www.mingw.org">mingw32</a> project has ported a + unix born C compiler to win32 and zziplib can be compiled with + it for the various win32 platforms. +</P><P> + There exist some C compilers which can not be embedded easily into + a unix compilation framework. The zziplib source archive ships with + project files for MSVC6 and MSVC6 (Microsoft Visual C). Adapting + these project files might help with installation problems of the + DLL hell on win32 platforms. There exist no sufficient guidelines to + mix binary helper libraries for many applications on windows. +</P><P> + There exists win32 binary archives as zip files on the download area + of zziplib (MSI is always on my wishlist). Including the project as + a helper library however you should not use it but instead compile + from source. The general library installation on unix are better, + the zziplib download area contains regularly some linux binary + archives (rpm). Many vendors of unix compatible systems provide + precompiled binary packages of zziplib on their own. +</P></DD> +<DT><a name="php" /> + after installing zziplib the php zip module still does not work </DT> +<DD><P> + Now that is one of <b>the most</b> frequently asked questions that + I do receive. There is just one major problem with it: I did not + write the php zip module (which uses zziplib) and I have no idea + how php modules work or how to tell apache's php sandbox to make + it work. Really, I do not have the slightest clue on that. +</P><P> + I was posting to some php developer sites to spread awareness of + the fact and hopefully to find a guy that I could forward any + questions on the php zip module installation. But so far there is + nothing, it merily seems that such installation problems are in no + way related to zziplib anyway but exists <b>with any other module with a + third party library dependency</b> as well. So the answers on php forum + sites will ask for details of the current php and apache configuration. +</P><P> + Since I do not run a php zip whatever nor any other php stuff, it's + just that those hints were not quite helpful to me. It would be really + really great if someone with a php zip background could be so nice to + write a short roundup of the areas to check when a php zip module + installation fails, so that I could post it here. Where are you? + Yours desperatly... ;-) +</P></DD> +<DT><a name="license" /> + how to obtain a license and support contract for a commercial project </DT> +<DD><P> + The zziplib has been created as a spare time project and it is put + under a very easy free public license. Even for commercial projects + there is hardly any need to negotiate a separate license since the + restrictions of the GNU LGPL or MPL can be matched easily. As a + general hint, if the zziplib is shipped unmodified with your project + then you are right within the limits of the free public license. +</P><P> + Sometimes the question for a personal license comes up for very + different reason - the need for a support contract and/or the setting + of functionality guarantees. The free public licenses include a safeguard + clause to that end, "in the hope that it will be useful, + but <em>without any warranty</em>; without even the implied warranty of + <em>merchantability</em> or <em>fitness for a particular purpose</em>." + Since the project was developed as a spare time project however there + have never been personal licenses going beyond. +</P><P> + In general you can still try to negotiate a support contract but it + will be very costly. It is much more profitable for you to tell one + of your developers to have a look at the source code and ensure the + required functionality is there, with hands on. The source code is + written to be very readable, maintainable and extensible. Just be + reminded that the free public licenses have restrictions on shipping + modified binaries but I can give you a cheap personal license to + escape these. (Such licenses can be obtained in return for tax-deductible + donations to organisations supporting opensource software). +</P></DD> +</DL> + +<P> and as always - <em> Patches are welcome </em> - </P> +</section> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/fseeko.htm b/Build/source/libs/zziplib/zziplib-0.13.58/docs/fseeko.htm new file mode 100644 index 00000000000..89c3195e36d --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/fseeko.htm @@ -0,0 +1,193 @@ +<section> <date> 2005 </date> +<H2> zzip/fseeko </H2> zip access for stdio handle + +<BLOCKQUOTE> + These routines are fully independent from the traditional zzip + implementation. They assume a readonly seekable stdio handle + representing a complete zip file. The functions show how to + parse the structure, find files and return a decoded bytestream. +</BLOCKQUOTE> + +<section> +<H3> stdio disk handle </H3> + +<P> + Other than with the <a href="mmapped.html">mmapped</a> alternative + interface there is no need to build special handle for the zip + disk file. The normal stdio file handle (of type <b><code>FILE</code></b>) + serves as the disk access representation. You can open that stdio file + handle any way you want. Note however that the <code>zzipfseeko</code> + routines modify the access state of that file handle, especially the + read position. +</P> + +<P> + To get access to a zipped file, you need a zip archive entry known + under the type <code>ZZIP_ENTRY</code>. This is again modelled after + the <code>DIR_ENTRY</code> type in being a representation of a file + name inside the zip central directory. To get a fresh zzip entry, use + <code>zzip_entry_findfirst</code>, to get the next use + <code>zzip_entry_findnext</code>, and do not forget to free the + resource with <code>zzip_entry_free</code>. +</P> +<PRE> + extern ZZIP_ENTRY* zzip_entry_findfirst(FILE* disk); + extern ZZIP_ENTRY* zzip_entry_findnext(ZZIP_ENTRY* entry); + extern int zzip_entry_free(ZZIP_ENTRY* entry); +</PRE> +<P> + These three calls will allow to walk all zip archive members in the + order listed in the zip central directory. To actually implement a + directory lister ("zzipdir"), you need to get the name string of the + zzip entry. This is not just a pointer: the zzip disk entry is not + null terminated actually. Therefore we have a helper function that + will <code>strdup</code> the entry name as a normal C string: +</P> +<PRE> + #include <zzip/fseeko.h> + void _zzip_dir(FILE* disk) + { + for (ZZIP_ENTRY* entry = zzip_findfirst (disk); + entry ; entry = zzip_findnext (entry)) { + char* name = zzip_entry_strdup_name (entry); + puts (name); free (name); + } + } +</PRE> + +</section><section> +<H3> find a zipped file </H3> + +<P> + The central directory walk can be used to find any file in the + zip archive. The <code>zzipfseeko</code> library however provides + two convenience functions that allow to jump directly to the + zip disk entry of a given name or pattern. You are free to use + the newly allocated <code>ZZIP_ENTRY</code> for later calls on + that handle type. Do not forget to <code>zzip_entry_free</code> + the handle unless the handle is consumed by a routine, e.g. + <code>zzip_entry_findnext</code> to hit the end of directory. +</P> +<PRE> + extern ZZIP_ENTRY* zzip_entry_findfile(FILE* disk, char* filename, + ZZIP_ENTRY* _zzip_restrict entry, + zzip_strcmp_fn_t compare); + + extern ZZIP_ENTRY* zzip_entry_findmatch(FILE* disk, char* filespec, + ZZIP_ENTRY* _zzip_restrict entry, + zzip_fnmatch_fn_t compare, int flags); +</PRE> +<P> + In general only the first two arguments are non-null pointing to the + stdio disk handle and the file name to look for. The "entry" argument + is an old value and allows you to walk the zip directory similar to + <code>zzip_entry_findnext</code> but actually leaping forward. The + compare function can be used for alternate match behavior: the default + of <code>strcmp</code> might be changed to <code>strncmp</code> for + a caseless match. The "flags" of the second call are forwarded to the + posix <code>fnmatch</code> which we use as the default function. +</P> +<P> + If you do know a specific filename then you can just use + <code>zzip_entry_findfile</code> and supply the return value to + <code>zzip_entry_fopen</code> with the second argument set to "1" + to tell the function to actually consume whichever entry was given. + That allows you to skip an explicit <code>zzip_entry_free</code> + as it is included in a later <code>zzip_entry_fclose</code>. +</P> +<PRE> + #include <zzip/fseeko.h> +<small> + /* zzipfseeko already exports this convenience function: */</small> + ZZIP_ENTRY_FILE* zzip_entry_ffile(FILE* disk, char* filename) { + return zzip_entry_fopen (zzip_entry_findfile (filename, 0, 0), 1); + } + + int _zzip_read(FILE* disk, char* filename, void* buffer, int bytes) + { + ZZIP_ENTRY_FILE* file = zzip_entry_ffile (disk, filename); + if (! file) return -1; + int bytes = zzip_entry_fread (buffer, 1, bytes, file); + zzip_entry_fclose (file); + return bytes; + } +</PRE> + +</section><section> +<H3> reading bytes </H3> + +<P> + The example has shown already how to read some bytes off the head of + a zipped file. In general the zzipfseeko api is used to replace a few + stdio routines that access a file. For that purpose we provide three + functions that look very similar to the stdio functions of + <code>fopen()</code>, <code>fread()</code> and <code>fclose()</code>. + These work on an active file descriptor of type <code>ZZIP_ENTRY_FILE</code>. + Note that this <code>zzip_entry_fopen()</code> uses <code>ZZIP_ENTRY</code> + argument as returned by the findfile api. To open a new reader handle from + a disk archive and file name you can use the <code>zzip_entry_ffile()</code> + convenience call. +</P> + +<PRE> + ZZIP_ENTRY_FILE* zzip_entry_ffile (FILE* disk, char* filename); + ZZIP_ENTRY_FILE* zzip_entry_fopen (ZZIP_ENTRY* entry, int takeover); + zzip_size_t zzip_entry_fread (void* ptr, + zzip_size_t sized, zzip_size_t nmemb, + ZZIP_ENTRY_FILE* file); + int zzip_entry_fclose (ZZIP_ENTRY_FILE* file); + int zzip_entry_feof (ZZIP_ENTRY_FILE* file); +</PRE> + +<P> + In all of the examples you need to remember that you provide a single + stdio <code>FILE</code> descriptor which is in reality a virtual + filesystem on its own. Per default filenames are matched case + sensitive also on win32 systems. The findnext function will walk all + files on the zip virtual filesystem table and return a name entry + with the full pathname, i.e. including any directory names to the + root of the zip disk <code>FILE</code>. +</P> + +</section><section> +<H3> ZZIP_ENTRY inspection </H3> + +<P> + The <code>ZZIP_ENTRY_FILE</code> is a special file descriptor handle + of the <code>zzipfseeko</code> library - but the <code>ZZIP_ENTRY</code> + is not so special. It is actually a bytewise copy of the data inside the + zip disk archive (plus some internal hints appended). While + <code>zzip/fseeko.h</code> will not reveal the structure on its own, + you can include <code>zzip/format.h</code> to get access to the actual + structure content of a <code>ZZIP_ENTRY</code> by (up)casting it to +<br><b><code> struct zzip_disk_entry</code></b>. +</P> + +<P> + In reality however it is not a good idea to actually read the bytes + in the <code>zzip_disk_entry</code> structure unless you seriously know + the internals of a zip archive entry. That includes any byteswapping + needed on bigendian platforms. Instead you want to take advantage of + helper macros defined in <code>zzip/fetch.h</code>. These will take + care to convert any struct data member to the host native format. +</P> +<PRE> +extern uint16_t zzip_disk_entry_get_flags( zzip_disk_entry* entry); +extern uint16_t zzip_disk_entry_get_compr( zzip_disk_entry* entry); +extern uint32_t zzip_disk_entry_get_crc32( zzip_disk_entry* entry); + +extern zzip_size_t zzip_disk_entry_csize( zzip_disk_entry* entry); +extern zzip_size_t zzip_disk_entry_usize( zzip_disk_entry* entry); +extern zzip_size_t zzip_disk_entry_namlen( zzip_disk_entry* entry); +extern zzip_size_t zzip_disk_entry_extras( zzip_disk_entry* entry); +extern zzip_size_t zzip_disk_entry_comment( zzip_disk_entry* entry); +extern int zzip_disk_entry_diskstart( zzip_disk_entry* entry); +extern int zzip_disk_entry_filetype( zzip_disk_entry* entry); +extern int zzip_disk_entry_filemode( zzip_disk_entry* entry); + +extern zzip_off_t zzip_disk_entry_fileoffset( zzip_disk_entry* entry); +extern zzip_size_t zzip_disk_entry_sizeof_tail( zzip_disk_entry* entry); +extern zzip_size_t zzip_disk_entry_sizeto_end( zzip_disk_entry* entry); +extern char* zzip_disk_entry_skipto_end( zzip_disk_entry* entry); +</PRE> +</section></section> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/future.htm b/Build/source/libs/zziplib/zziplib-0.13.58/docs/future.htm new file mode 100644 index 00000000000..e116429abb1 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/future.htm @@ -0,0 +1,80 @@ +<?xml-stylesheet type="text/css" href="sdocbook.css" ?> +<section> <date> 15. July 2002 </date> +<h2> ZZIP Future </h2> What next to come. + +<section><!--border--> +<h3> ZIP-Write </h3> + +<P> + Anybody out there who wants to program the write-support for the + zziplib? Actually, I just do not have the time to do it and no + real need to but I guess it would be nice for people as for + example to spit out savegame files in zipformat. The actual + programming path is almost obvious - start off with the zziplib + as it is, and let it open an existing zip-file. This will parse + the central directory into memory - including the file-offsets + for each file. Then, truncate the zip-realfile to the place that + the central-dir was found (identical with the end of the last + file). If a datafile is opened for writing, either add a new + entry or modify the start-offset of the existing entry to the + end of the zip-realfile - the old data is simply junk. Then + init zlib to do the deflation of the data and append it to the + current zip-realfile. When the zipdir-handle is getting closed + from write-mode, the zip's central-directory needs to be appended + to the file on disk. This coincides with creating a new zip-file + with an empty central-directory that can be spit out to disk. + During development, do not care about creating temp-files to + guard against corruption for partial writes - the usual application + will use the zziplib to create zip savegames in one turn, no + "update"-operation needs to be implemented like exists in the + standalone zip command utilities. +</P> + +</section><section> +<h3> readdir for subdir inside zip magicdir </h3> + +<P> + See the notes in the first paragraphs of <a href="zzip-api.html"> + ZZIP Programmers Interface</a> description. It would add some + complexity for something I never needed so far. The question + came up with using zziplib as the backend of a dynamic webserver + to store the content in compressed form possibly through the + incarnation of a php module - and some scripted functionality + that walks all directories to index the files hosted. I'm not + going to implement that myself but perhaps someone else wants + to do it and send me patches for free. +</P> + +</section><section> +<h3> obfuscation example project </h3> + +<P> + A subproject that shows <b>all</b> the steps from a dat-tree + to a dat-zip to an obfuscated-dat along with build-files and + source-files for all helper tools needed to obfuscate and + deobfuscate, plus a sample program to use the obfuscated + dat-file and make some use of it. Along with some extra + documentation about 20..40 hours. Don't underestimate the + amount of work for it! (otherwise a great student project). +</P> + +</section><section> +<h3> zip/unzip tool </h3> + +<P> + The infozip tools implement a full set of zip/unzip routines + based on internal code to access the zip-format. The zziplib + has its own set of zip-format routines. Still, it should be + possible to write a frontend to the library that implements + parts (if not all) of the options of the infozip zip/unzip + tools. Even without write-support in zziplib it would be + interesting to see an normal unzip-tool that does not use + the magic-wrappers thereby only going off at plain zip-files. + On the upside, such a tool would be smaller than the infozip + tools since it can use the library routines that are shared + with other tools as well. Again - don't underestimate the + amount of work for it, I guess 40..80 hours as there is a lot + of fine-tuning needed to match the infozip model. +</P> +</section> +</section> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/history.htm b/Build/source/libs/zziplib/zziplib-0.13.58/docs/history.htm new file mode 100644 index 00000000000..7250729e877 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/history.htm @@ -0,0 +1,92 @@ +<section><date>created 1.Jun.2000, last updated 25.Apr.2002 </date> +<h2> History and Links </h2> plus Installation and Contact Hints + +<!--border--> + +<section> +<h3> A Bit Of History </h3> + +<P> +You'll find <a href="http://www.gzip.org">gzip</a> using the same compression +that was written by Jean-loup <a href="http://gailly.net">Gailly</a> +for the <a href="http://www.info-zip.org">Info-Zip</a> Group +whose <a href="http://www.info-zip.org/pub/infozip/Zip.html">Zip</a> +program is compatible with msdos PKZIP program from +<a href="http://www.pkware.com">PK Ware</a>. Then, in collaboration +with <a href="http://www.alumni.caltech.edu/~madler">Mark Adler</a> +he wrote the <a href="http://www.gzip.org/zlib">zlib</a> +compression library which was later standardized in the +<a href="ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html"> +zlib RFCs</a>, namely +<a href="http://www.ietf.org/rfc/rfc1950.txt">RFC 1950</a> +<a href="ftp://ftp.uu.net/graphics/png/documents/zlib/rfc-zlib.html.Z"> +zlib 3.3</a>, +<a href="http://www.ietf.org/rfc/rfc1951.txt">RFC 1951</a> +<a href="ftp://ftp.uu.net/graphics/png/documents/zlib/rfc-deflate.html.Z"> +deflate 1.3</a> and +<a href="http://www.ietf.org/rfc/rfc1952.txt">RFC 1952</a> +<a href="ftp://ftp.uu.net/graphics/png/documents/zlib/rfc-gzip.html"> +gzip 4.3</a>. The free algorithm can be found in lots of places +today including PPP packet compression and PNG picture compression. +</P> + +</section><section> +<h3> Installation </h3> + +<P> + The installation is from the source .tar.gz tarball does follow + the simple gnu style: type <tt>''configure && make install''</tt> + in the unpacked directory. This will actually perform the usual + sequence of <tt>''configure && make && make install''</tt>. The + use of <tt>''make rpm''</tt> will make rpms based on your system + setup, and using a decent mingw32 compiler (e.g. the crossgcc + from <a href="http://libsdl.org/Xmingw32">libsdl.org/Xmingw32</a>) + will allow you to create windows dlls using a gnu development + environment. MSVC and Borland support (Make-)files should be + easy to be derived from the <a href="Makefile.am">Makefile.am</a> +</P> + +</section><section> +<h3> Contact </h3> + +<P> + The library was developed by + <a href="mailto:guidod@gmx.de?subject=zziplib"> + Guido Draheim </a> based on the library + <a href="http://freshmeat.net/appindex/1999/08/02/933593367.html"> + <tt>zip08x</tt> </a> + by <a href="mailto:too@iki.fi"> Tomi Ollila </a> (many thanks + for his support of the zziplib project). He has provided + a good deal of testing rounds and very helpful comments. + It may be assumed that this library supersedes + <a href="http://www.iki.fi/too/sw/zip08x.readme"> + <tt>zip08x</tt></a>, and in April 2002, he + has even given up copyright restrictions coming from zip08x + and changed the <a href="http://www.iki.fi/too/sw/zip08x.readme">zip08x</a> + readme to point to <a href="http://zziplib.sf.net">zziplib</a>. + Anyone who wants to contribute in accessing zip-archives + with the zlib-library is hereby kindly invited to send us + comments and sourcecode. +</P> + +</section><section> +<h3> Links </h3> + +<P> +The <a href="zziplib.html">zziplib library</a> must be +linked with the free <b><a href="http://www.gzip.org/zlib/">zlib</a></b> +<a href="http://www.info-zip.org/pub/infozip/zlib">[1]</a> +<a href="http://www.lifl.fr/PRIVATE/Manuals/gnulang/zlib">[2]</a> +<a href="http://pobox.com/~newt">[3]</a> package originally developed +by the <a href="http://www.info-zip.org">Info-Zip</a> Group +and now maintained at the <a href="http://www.gzip.org">GZip</a> Group. +As of late, the pkware appnote.txt has been revised into a whitepaper +document named +<a href="http://www.pkware.com/products/enterprise/white_papers/appnote.html"> + "APPNOTE.TXT - .ZIP File Format Specification"</a>. +Be also aware of other zzip like projects, e.g. +<a href="http://zipios.sourceforge.net">zipios++</a> that +mangles zip access into C++ iostream facilities. +</P> + +</section></section> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/make-dbk.pl b/Build/source/libs/zziplib/zziplib-0.13.58/docs/make-dbk.pl new file mode 100644 index 00000000000..e1fe56683df --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/make-dbk.pl @@ -0,0 +1,118 @@ +#! /usr/local/bin/perl +# this file converts simple html text into a docbook xml variant. +# The mapping of markups and links is far from perfect. But all we +# want is the docbook-to-pdf converter and similar technology being +# present in the world of docbook-to-anything converters. + +use strict; + +my %o; + +my %file; +my $F; +my @order; + +for $F (@ARGV) +{ + if ($F =~ /^(\w+)=(.*)/) + { + $o{$1} = $2; + }else{ + open F, "<$F" or next; + my $T = join ("",<F>); close F; + $file{$F}{text} = $T; + $file{$F}{orig} = $F; + push @order, $F; + } +} + +$o{version} = `date` if not length $o{version}; + +for $F (keys %file) +{ + $_ = $file{$F}{text}; + s{<!--VERSION-->}{ $o{version} }gse; + s{</h2>(.*)}{</title>\n<subtitle>$1</subtitle>}mg; + s{<h2>}{<sect1 id=\"$F\"><title>}mg; + s{<[Pp]([> ])}{<para$1}mg; s{</[Pp]>}{</para>}mg; + s{<pre>}{<screen>}mg; s{</pre>}{</screen>}mg; + s{<h3>}{<sect2><title>}mg; + s{</h3>((?:.(?!<sect2>))*.?)}{</title>$1</sect2>}sg; + s{<!doctype [^<>]*>}{}sg; + s{<!DOCTYPE [^<>]*>}{}sg; + s{(<\w+\b[^<>]*\swidth=)(\d+\%)}{$1\"$2\"}sg; + s{(<\w+\b[^<>]*\s\w+=)(\d+)}{$1\"$2\"}sg; + s{&&}{\&\;\&\;}sg; + s{\$\<}{\$\<\;}sg; + s{&(\w+[\),])}{\&\;$1}sg; + s{(</?)span(\s[^<>]*)?>}{$1."phrase$2>"}sge; + s{(</?)small(\s[^<>]*)?>}{$1."note$2>"}sge; + s{(</?)(b|em|i)>}{$1."emphasis>"}sge; + s{(</?)(li)>}{$1."listitem>"}sge; + s{(</?)(ul)>}{$1."itemizedlist>"}sge; + s{(</?)(ol)>}{$1."orderedlist>"}sge; + s{(</?)(dl)>}{$1."variablelist>"}sge; + s{<dt\b([^<>]*)>}{"<varlistentry$1><term>"}sge; + s{</dt\b([^<>]*)>}{"</term>"}sge; + s{<dd\b([^<>]*)>}{"<listitem$1>"}sge; + s{</dd\b([^<>]*)>}{"</listitem></varlistentry>"}sge; + s{<table\b([^<>]*)>}{"<informaltable$1><tgroup cols=\"2\"><tbody>"}sge; + s{</table\b([^<>]*)>}{"</tbody></tgroup></informaltable>"}sge; + s{(</?)tr(\s[^<>]*)?>}{$1."row$2>"}sge; + s{(</?)td(\s[^<>]*)?>}{$1."entry$2>"}sge; + s{<informaltable\b[^<>]*>\s*<tgroup\b[^<>]*>\s*<tbody> + \s*<row\b[^<>]*>\s*<entry\b[^<>]*>\s*<informaltable\b} + {<informaltable}gsx; + s{</informaltable>\s*</entry>\s*</row> + \s*</tbody>\s*</tgroup>\s*</informaltable>} + {</informaltable>}gsx; + s{(<informaltable[^<>]*\swidth=\"100\%\")}{$1 pgwide=\"1\"}gs; + s{(<tbody>\s*<row[^<>]*>\s*<entry[^<>]*\s)(width=\"50\%\")} + {<colspec colwidth=\"1*\" /><colspec colwidth=\"1*\" />\n$1$2}gs; + + s{<nobr>([\'\`]*)<tt>}{<cmdsynopsis>$1}sg; + s{</tt>([\'\`]*)</nobr>}{$2</cmdsynopsis>}sg; + s{<nobr><(?:tt|code)>([\`\"\'])}{<cmdsynopsis>$1}sg; + s{<(?:tt|code)><nobr>([\`\"\'])}{<cmdsynopsis>$1}sg; + s{([\`\"\'])</(?:tt|code)></nobr>}{$1</cmdsynopsis>}sg; + s{([\`\"\'])</nobr></(?:tt|code)>}{$1</cmdsynopsis>}sg; + s{(</?)tt>}{$1."constant>"}sge; + s{(</?)code>}{$1."literal>"}sge; + s{>([^<>]+)<br>}{><highlights>$1</highlights>}sg; + s{<br>}{<br />}sg; + + s{(</?)date>}{$1."sect1info>"}sge; + s{<reference>}{<reference id=\"reference\">}s; + + s{<a\s+href=\"((?:http|ftp|mailto):[^<>]+)\"\s*>((?:.(?!</a>))*.)</a>} + { "<ulink url=\"$1\">$2</ulink>" }sge; + s{<a\s+href=\"zziplib.html\#([\w_]+)\"\s*>((?:.(?!</a>))*.)</a>} + { "<link linkend=\"$1\">$2</link>" }sge; + s{<a\s+href=\"(zziplib.html)\"\s*>((?:.(?!</a>))*.)</a>} + { "<link linkend=\"reference\">$2</link>" }sge; + s{<a\s+href=\"([\w-]+[.]html)\"\s*>((?:.(?!</a>))*.)</a>} + { my $K = $1; chop $K; + if (not exists $file{$K}) { print STDERR "bad link $1\n"; } + "<link linkend=\"$K\">$2</link>" }sge; + s{<a\s+href=\"([\w-]+[.](?:h|c|am|txt))\"\s*>((?:.(?!</a>))*.)</a>} + { "<ulink url=\"file:$1\">$2</ulink>" }sge; + s{<a\s+href=\"([A-Z0-9]+[.][A-Z0-9]+)\"\s*>((?:.(?!</a>))*.)</a>} + { "<ulink url=\"file:$1\">$2</ulink>" }sge; + +# s{(</?)subtitle>}{$1."para>"}ge; + + $_ .= "</sect1>" if /<sect1[> ]/; + $file{$F}{text} = $_; +} + +my $n = "\n"; + +print '<!DOCTYPE reference PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"',$n; +print ' "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">',$n; +print '<book><chapter><title>Documentation</title>',$n; +for $F (@order) +{ + print "</chapter>" if $file{$F}{text} =~ /<reference /; + print $file{$F}{text},$n,$n; +} +print '</book>',$n; diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/make-doc.pl b/Build/source/libs/zziplib/zziplib-0.13.58/docs/make-doc.pl new file mode 100644 index 00000000000..89da2f6a95c --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/make-doc.pl @@ -0,0 +1,580 @@ + +use strict "vars"; + +my $x; +my $F; +my @regs; +my %file; +my %func; + +my %o = ( verbose => 0 ); + +$o{version} = + `grep -i "^version *:" *.spec | sed -e "s/[Vv]ersion *: *//"`; +$o{package} = + `grep -i "^name *:" *.spec | sed -e "s/[Nn]ame *: *//"`; +$o{version} =~ s{\s*}{}gs; +$o{package} =~ s{\s*}{}gs; + +$o{version} = `date +%Y.%m.%d` if not length $o{version}; +$o{package} = "_project" if not length $o{package}; + +$o{suffix} = "-doc1"; +$o{mainheader} = "$o{package}.h"; + +my %fn; +my $id = 1000; + +for $F (@ARGV) +{ + if ($F =~ /^(\w+)=(.*)/) + { + $o{$1} = $2; + }else{ + open F, "<$F" or next; + my $T = join ("",<F>); close F; + + $T =~ s/\&/\&\;/sg; + $T =~ s/¬/\&#AC\;/sg; + $T =~ s/\*\//¬/sg; + + # cut per-function comment block + while ( $T =~ + s{ [/][*][*](?=\s) ([^¬]+) ¬ ([^\{\}\;\#]+) [\{\;] } + { per_function_comment_and_declaration($F," ".$1,$2) }gsex + ) {} + + # cut per-file comment block + if ( $T =~ m{ ^ [/][*]+(?=\s) ([^¬]+) ¬ + (\s*\#include\s*<[^<>]*>(?:\s*/[/*][^\n]*)?) }sx) + { + $file{$F}{comment} = $1; + $file{$F}{include} = $2; + $file{$F}{comment} =~ s/¬/\*\//sg; + $file{$F}{include} =~ s/¬/\*\//sg; + $file{$F}{include} =~ s{[/][*]}{//}s; + $file{$F}{include} =~ s{[*][/]}{\n}s; + $file{$F}{include} =~ s{<}{\<\;}sg; + $file{$F}{include} =~ s{>}{\>\;}sg; + } + elsif ( $T =~ m{ ^ [/][*]+(?=\s) ([^¬]+) ¬ }sx) + { + $file{$F}{comment} = $1; + $file{$F}{comment} =~ s/¬/\*\//sg; + } + + # throw away the rest - further processing on memorized strings only + } +} + +$o{outputfilestem}= "$o{package}$o{suffix}" if not length $o{outputfilestem}; +$o{docbookfile}= "$o{outputfilestem}.docbook" if not length $o{docbookfile}; +$o{libhtmlfile}= "$o{outputfilestem}.html" if not length $o{libhtmlfile}; +$o{dumpdocfile}= "$o{outputfilestem}.dxml" if not length $o{dumpdocfile}; + +sub per_function_comment_and_declaration +{ + my ($filename, $comment, $prototype) = @_; + + $prototype =~ s{¬}{*/}sg; + $comment =~ s{¬}{*/}sg; + $comment =~ s{<([\w\.\-]+\@[\w\.\-]+\w\w)>}{<$1>}sg; + $func{$id}{filename} = $filename; + $func{$id}{comment} = $comment; + $func{$id}{prototype} = $prototype; + $id ++; + return $prototype; +} +# ----------------------------------------------------------------------- +sub pre { # used for non-star lines in comment blocks + my $T = $_[0]; $T =~ s/\&/\&\;/g; + $T =~ s/\</\<\;/g; $T =~ s/\>/\>\;/g; $T =~ s/\"/\"\;/g; + $T =~ s/^/\ /gm; # $T =~ s/^/\| /gm; + return " <pre> $T </pre> "; +} + +# per-file comment block handling +my $name; +for $name (keys %file) +{ + $file{$name}{comment} =~ s{<([\w\.\-]+\@[\w\.\-]+\w\w)>}{<$1>}sg; + $file{$name}{comment} =~ s{ ^\s?\s?\s? ([^\*\s]+ .*) $}{&pre($1)}mgex; + $file{$name}{comment} =~ s{ ^\s*[*]\s* $}{ <p> }gmx; + $file{$name}{comment} =~ s{ ^\s?\s?\s?\* (.*) $}{ $1 }gmx; + $file{$name}{comment} =~ s{ </pre>(\s*)<pre> }{$1}gsx; + $file{$name}{comment} =~ s{ <([^<>\;]+\@[^<>\;]+)> }{<email>$1</email>}gsx; + $file{$name}{comment} =~ s{ \<\;([^<>\&\;]+\@[^<>\&\;]+)\>\; } + {<email>$1</email>}gsx; + $file{$name}{comment} .= "<p>"; + + $file{$name}{comment} =~ s{ \b[Aa]uthor\s*:(.*<\/email>) } + { + $file{$name}{author} = "$1"; + "<author>"."$1"."</author>" + }sex; + + $file{$name}{comment} =~ s{ \b[Cc]opyright[\s:]([^<>]*)<p> } + { + $file{$name}{copyright} = "$1"; + "<copyright>"."$1"."</copyright>" + }sex; +# if ($name =~ /file/) { +# print STDERR $file{$name}{comment},"\n"; +# } + if ($file{$name}{include} =~ m{//\s*(\w+)[.][.][.]\s*}) + { + if (length $o{$1}) { + $file{$name}{include} = "#include " + .$o{$1}."\n"; + $file{$name}{include} =~ s{<}{\<\;}sg; + $file{$name}{include} =~ s{>}{\>\;}sg; + } + } +} + +# ----------------------------------------------------------------------- + +# pass 1 of per-func strings: +# (a) cut prototype into prespec/namespec/callspec +# (b) sanitize comment-block into proper docbook format +# do this while copying strings from $func{$name} to $fn{name} strstrhash +my @namelist; +for $x (sort keys %func) +{ + my $name = $func{$x}{prototype}; + $name =~ s/^.*[^.]\b(\w[\w.]*\w)\b\s*\(.*$/$1/s; + push @namelist, $name; # may be you want to omit some funcs from output? + + $func{$x}{prototype} =~ m{ ^(.*[^.]) \b(\w[\w.]*\w)\b (\s*\(.*) $ }sx; + $fn{$name}{prespec} = $1; + $fn{$name}{namespec} = $2; + $fn{$name}{callspec} = $3; + + $fn{$name}{comment} = $func{$x}{comment}; + $fn{$name}{comment} =~ s/(^|\s)\=\>\"([^\"]*)\"/$1<link>$2<\/link>/gmx; + $fn{$name}{comment} =~ s/(^|\s)\=\>\'([^\"]*)\'/$1<link>$2<\/link>/gmx; + $fn{$name}{comment} =~ s/(^|\s)\=\>\s(\w[\w.]*\w)\b/$1<link>$2<\/link>/gmx; + $fn{$name}{comment} =~ + s/(^|\s)\=\>\s([^\s\,\.\!\?\:\;\<\>\&\'\=\-]+)/$1<link>$2<\/link>/gmx; + + # cut comment in first-line (describe) and only keep the rest in comment + $fn{$name}{describe} = $fn{$name}{comment}; + $fn{$name}{describe} =~ s{^([^\n]*\n).*}{$1}gs; + $fn{$name}{comment} =~ s{^[^\n]*\n}{}gs; + if ($fn{$name}{describe} =~ /^\s*$/s) + { + $fn{$name}{describe} = "(".$func{$x}{filename}.")"; + $fn{$name}{describe} =~ s,[.][.][/],,g; + } + + $fn{$name}{comment} =~ s/ ^\s?\s?\s? ([^\*\s]+ .*) $/&pre($1)/mgex; + $fn{$name}{comment} =~ s/ ^\s?\s?\s?\* (.*) $/ <br \/> $1 /gmx; + $fn{$name}{comment} =~ s/ ^\s*<br\s*\/>\s* $/ <p> /gmx; + $fn{$name}{comment} =~ s{<<}{<}sg; + $fn{$name}{comment} =~ s{>>}{>}sg; + $fn{$name}{comment} =~ s/ (<p>\s*)<br\s*\/?>/$1/gsx; + $fn{$name}{comment} =~ s/ (<p>\s*)<br\s*\/?>/$1/gsx; + $fn{$name}{comment} =~ s/ (<br\s*\/?>\s*)<br\s*\/?>/$1/gsx; + $fn{$name}{comment} =~ s/<c>/<code>/gs; + $fn{$name}{comment} =~ s/<\/c>/<\/code>/gs; + $fn{$name}{comment} =~ s/<\/pre>(\s*)<pre>/$1/gs; + + $fn{$name}{filename} = $func{$x}{filename}; + $fn{$name}{callspec} =~ s{^ \s*}{}gsx; + $fn{$name}{prespec} =~ s{^ \s*}{}gsx; + $fn{$id} = $x; +} + +# add extra docbook markups to callspec in $fn-hash +for $name (@namelist) # <paramdef> +{ + $fn{$name}{callspec} =~ s:^([^\(\)]*)\(:$1<parameters>\(<paramdef>:s; + $fn{$name}{callspec} =~ s:\)([^\(\)]*)$:</paramdef>\)</parameters>$1:s; + $fn{$name}{callspec} =~ s:,:</paramdef>,<paramdef>:gs; + $fn{$name}{callspec} =~ s:<paramdef>(\s+):$1<paramdef>:gs; + $fn{$name}{callspec} =~ s:(\s+)</paramdef>:</paramdef>$1:gs; +} + +# html-formatting of callspec strings +for $name (@namelist) +{ + $fn{$name}{declcode} = + "<td valign=\"top\"><code>".$fn{$name}{prespec}."<\/code><\/td>" + ."<td valign=\"top\"> </td>" + ."<td valign=\"top\"><a href=\"#$name\">" + ."\n <code>".$fn{$name}{namespec}."<\/code>\n" + ."<\/a><\/td>" + ."<td valign=\"top\"> </td>" + ."<td valign=\"top\">".$fn{$name}{callspec}."<\/td>"; + + $fn{$name}{implcode} = + "<code>".$fn{$name}{prespec}."<\/code>" + ."\n <br \/><b><code>".$fn{$name}{namespec}."<\/code><\/b>" + ."\n <code>".$fn{$name}{callspec}."<\/code>"; + + $fn{$name}{declcode} =~ s{\s+<paramdef>}{\n<nobr>}gs; + $fn{$name}{implcode} =~ s{\s+<paramdef>}{\n<nobr>}gs; + $fn{$name}{declcode} =~ s{<paramdef>}{<nobr>}gs; + $fn{$name}{implcode} =~ s{<paramdef>}{<nobr>}gs; + $fn{$name}{declcode} =~ s{</paramdef>}{</nobr>}gs; + $fn{$name}{implcode} =~ s{</paramdef>}{</nobr>}gs; + $fn{$name}{declcode} =~ s{<parameters>}{\n <code>}gs; + $fn{$name}{implcode} =~ s{<parameters>}{\n <code>}gs; + $fn{$name}{declcode} =~ s{</parameters>}{</code>\n}gs; + $fn{$name}{implcode} =~ s{</parameters>}{</code>\n}gs; +} + +# whether each function should get its own page or combined with others +my $combinedstyle = 1; + +for $name (@namelist) +{ + if ($fn{$name}{describe} =~ /^ \s* <link>(\w[\w.]*\w)<\/link> /sx) + { + if ($combinedstyle and exists $fn{$1}) + { + # $into tells later steps which func-name is the leader of a man + # page and that this func should add its descriptions over there. + $fn{$name}{into} = $1; + } + } + + if ($fn{$name}{describe} =~ s/(.*)also:(.*)/$1/) + { + $fn{$name}{_seealso} = $2; + } + + # and prepare items for being filled in $combinedstyle (html-mode) + # which includes adding descriptions of the leader functions firsthand + $fn{$name}{_anchors} = "<a name=\"$name\" />"; + $fn{$name}{_impcode} = "<code>".$fn{$name}{implcode}."</code>"; + $fn{$name}{_comment} = "<p> ".$fn{$name}{describe}."\n"; + $fn{$name}{_comment} .= "<p>".$fn{$name}{comment}; +} + +for $name (@namelist) # and add descriptions of non-leader entries (html-mode) +{ + next if not exists $fn{$name}{into}; # skip leader pages + my $into = $fn{$name}{into}; + $fn{$into}{_anchors} .= "<a name=\"$name\" />"; + $fn{$into}{_impcode} .= "<br />\n"; + $fn{$into}{_impcode} .= "<code>".$fn{$name}{implcode}."</code>"; + my $text = $fn{$name}{comment}; + $text =~ s/ (T|t)his \s (function|procedure) /$1."he ".$name." ".$2/gsex; + $fn{$name}{_comment} .= "<p>".$text; +} + +my $htmlTOC = ""; +my $htmlTXT = ""; + +# generate the index-block at the start of the onepage-html file +for $name (@namelist) +{ + $fn{$name}{_comment} =~ s/ (<p>\s*)<br\s*\/>/$1/gsx; + + $htmlTOC .= "<tr valign=\"top\">\n".$fn{$name}{declcode}."</tr>"; + next if $combinedstyle and exists $fn{$name}{into}; + + $htmlTXT .= "\n<dt>".$fn{$name}{_anchors}.$fn{$name}{_impcode}."<dt>"; + $htmlTXT .= "\n<dd>".$fn{$name}{_comment}; + $htmlTXT .= "\n<p align=\"right\"><small>(" + .$fn{$name}{filename}.")</small></p></dd>"; +} + +# link ref-names in this page with its endpoints on the same html page +$htmlTXT =~ s/ <link>(\w+)([^<>]*)<\/link> / &a_name($1,$2) /gsex; +sub a_name +{ + my ($n,$m) = @_; + if (exists $fn{$n}) { return "<a href=\"#$n\"><code>$n$m</code></a>"; } + else { return "<code>$n$m</code>"; } +} +$htmlTXT =~ s/ \-\> /<small>-\>\;<\/small>/gsx; # just sanitize + +# and finally print the html-formatted output +open F, ">$o{libhtmlfile}" or die "could not open '$o{libhtmlfile}': $!"; +print F "<html><head><title> $o{package} autodoc documentation </title>"; +print F "</head>\n<body>\n"; +print F "\n<h1>",$o{package}," <small><small><i>-", $o{version}; +print F "</i></small></small></h1>"; +print F "\n<table border=0 cellspacing=2 cellpadding=0>"; +print F $htmlTOC; +print F "\n</table>"; +print F "\n<h3>Documentation</h3>\n"; +print F "\n<dl>"; +print F $htmlTXT; +print F "\n</dl>"; +print F "\n</body></html>\n"; +close F; + +# =========================================================================== # +# let's go for the pure docbook, a reference type master file for all man pages +my @headerlist; # leader function pages - a file will be created for each of th +my @mergedlist; # non-leader function that end up in one of those in headerlist + +for $name (@namelist) +{ + push @headerlist, $name if not exists $fn{$name}{into}; + push @mergedlist, $name if exists $fn{$name}{into}; + + # and initialize the fields need for a man page entry - the fields are + # named after the docbook-markup that encloses (!!) the text we store + # in the strstrhash - therefore, {}{_refhint} = "hello" will be printed + # as <refhint>hello</refhint>. Names with scores at the end are only used + # as temporaries but they are memorized - perhaps they are useful later. + + $fn{$name}{_refhint} = + "\n<!--========= ".$name." (3) ===========-->\n"; + $fn{$name}{_refstart} = ""; + $fn{$name}{_date_} = $o{version}; + $fn{$name}{_date_} =~ s{\s*}{}gs; + $fn{$name}{_refentryinfo} + = "\n <date>".$fn{$name}{_date_}."</date>"; + $fn{$name}{_productname_} = $o{package}; + $fn{$name}{_productname_} =~ s{\s*}{}gs; + $fn{$name}{_refentryinfo} + .= "\n <productname>".$fn{$name}{_productname_}."</productname>"; +# if (exists $file{ $fn{$name}{filename} }{author}) +# { +# $H = $file{ $fn{$name}{filename} }{author}; +# $H =~ s{ \s* ([^<>]*) (<email>[^<>]*</email>) }{ +# $fn{$name}{_refentryinfo} .= "\n <author>".$1.$2."</author>"; +# "" }gmex; +# } + $fn{$name}{_refmeta} = ""; + $fn{$name}{_refnamediv} = ""; + $fn{$name}{_mainheader} = $o{mainheader}; + $fn{$name}{_includes} = $file{ $fn{$name}{filename} }{include}; + $fn{$name}{_manvolnum} = "3"; + $fn{$name}{_funcsynopsisinfo} = ""; + $fn{$name}{_funcsynopsis} = ""; + $fn{$name}{_description} = ""; + $fn{$name}{_refends} = ""; +} + +push @headerlist, @mergedlist; # aaahmm... + +# let's walk all (!!) entries... +for $name (@headerlist) +{ + # $into is the target-manpage to add descriptions to. Initially it does + # reference the name of the function itself - but it overridden in the + # next line when we see an {into} mark. The self/into state is registered + # in two vars: $into is an index into %fn-strstrhash to be used instead of + # the $name-runvar and $me just a boolean value to conditionally add texts + my $into = $name; my $me = 1; + + if (exists $fn{$name}{into}) + { + $into = $fn{$name}{into}; $me = 0; + $fn{$name}{_refhint} = + "\n <!-- see ".$fn{$name}{mergeinto}." -->\n"; + } + + $fn{$into}{_refstart} .= '<refentry id="'.$name.'">' if $me; + $fn{$into}{_refends} .= "\n</refentry>\n" if $me; + + $fn{$name}{_title_} = $name; + $fn{$name}{_title_} =~ s{\s*}{}gs; + $fn{$name}{_refentryinfo} + .= "\n <title>".$fn{$name}{_title_}."</title>" if $me; + $fn{$into}{_refmeta} + .= "\n <manvolnum>".$fn{$name}{_manvolnum}."</manvolnum>" if $me; + $fn{$into}{_refmeta} + .= "\n <refentrytitle>".$name."</refentrytitle>" if $me; + + $fn{$name}{_funcsynopsisinfo} + = "\n".' #include <'.$fn{$into}{_mainheader}.'>' if $me; + $fn{$name}{_funcsynopsisinfo} + = "\n".$fn{$into}{_includes} if $me and length $fn{$into}{_includes}; + $fn{$name}{_funcsynopsisinfo} + .= " // ".$o{synopsis} if $me and length $o{synopsis}; + + $fn{$into}{_refnamediv} .= "\n ". + "<refpurpose>".$fn{$name}{describe}." </refpurpose>" if $me; + $fn{$into}{_refnamediv} .= "\n".' <refname>'.$name.'</refname>'; + + # add to {}{_funcsynopsis}... + $fn{$into}{_funcsynopsis} .= "\n <funcprototype>\n <funcdef>"; + $fn{$into}{_funcsynopsis} .= $fn{$name}{prespec} + ." <function>".$name."</function></funcdef>"; + $fn{$name}{_callspec_} = $fn{$name}{callspec}; + $fn{$name}{_callspec_} =~ s{<parameters>\s*\(}{ }gs; + $fn{$name}{_callspec_} =~ s{\)\s*</parameters>}{ }gs; + $fn{$name}{_callspec_} =~ s{</paramdef>\s*,\s*}{</paramdef>\n }gs; + $fn{$into}{_funcsynopsis} + .= "\n".$fn{$name}{_callspec_}." </funcprototype>"; + + # add to {}{_description}... + $fn{$name}{_comment_} = "<para>\n".$fn{$name}{comment}."\n</para>"; + $fn{$name}{_comment_} =~ s{ (T|t)his \s (function|procedure) } + { $1."he <function>".$name."</function> ".$2 }gsex; + $fn{$name}{_comment_} =~ s{<p>}{"\n</para><para>\n"}gsex; + $fn{$name}{_comment_} =~ s{<br\s*/?>}{}gs; + $fn{$name}{_comment_} =~ s{(</?)em>}{$1emphasis>}gs; + $fn{$name}{_comment_} =~ s{<code>}{<userinput>}gs; + $fn{$name}{_comment_} =~ s{</code>}{</userinput>}gs; + $fn{$name}{_comment_} =~ s{<link>}{<function>}gs; + $fn{$name}{_comment_} =~ s{</link>}{</function>}gs; + $fn{$name}{_comment_} =~ s{<pre>}{<screen>}gs; # only xmlto .8 and + $fn{$name}{_comment_} =~ s{</pre>}{</screen>}gs; # higher !! +# $fn{$name}{_comment_} =~ s{<ul>}{</para><itemizedlist>}gs; +# $fn{$name}{_comment_} =~ s{</ul>}{</itemizedlist><para>}gs; +# $fn{$name}{_comment_} =~ s{<li>}{<listitem><para>}gs; +# $fn{$name}{_comment_} =~ s{</li>}{</para></listitem>\n}gs; + $fn{$name}{_comment_} =~ s{<ul>}{</para><programlisting>\n}gs; + $fn{$name}{_comment_} =~ s{</ul>}{</programlisting><para>}gs; + $fn{$name}{_comment_} =~ s{<li>}{}gs; + $fn{$name}{_comment_} =~ s{</li>}{}gs; + $fn{$into}{_description} .= $fn{$name}{_comment_}; + + if (length $fn{$name}{_seealso} and not $me) + { + $fn{$into}{_seealso} .= ", " if length $fn{$into}{_seealso}; + $fn{$into}{_seealso} .= $fn{$name}{_seealso}; + } + + if (exists $file{ $fn{$name}{filename} }{author}) + { + my $authors = $file{ $fn{$name}{filename} }{author}; + $fn{$into}{_authors} = "<itemizedlist>"; + $authors =~ s{ \s* ([^<>]*) (<email>[^<>]*</email>) }{ + $fn{$into}{_authors} + .= "\n <listitem><para>".$1." ".$2."</para></listitem>"; + "" }gmex; + $fn{$into}{_authors} .= "</itemizedlist>"; + } + + if (exists $file{ $fn{$name}{filename} }{copyright}) + { + $fn{$into}{_copyright} + = "<screen>\n".$file{ $fn{$name}{filename} }{copyright}."</screen>\n"; + } +} + +# printing the docbook file is a two-phase process - we spit out the +# leader pages first - later we add more pages with _refstart pointing +# to the lader page, so that xmlto will add the functions there. Only the +# leader page contains some extra info needed for troff page processing. + +my %header; + +open F, ">$o{docbookfile}" or die "could not open $o{docbookfile}: $!"; +print F '<!DOCTYPE reference PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"'; +print F "\n",' "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">'; +print F "\n\n",'<reference><title>Manual Pages</title>',"\n"; +for $name (@namelist) +{ + print F $fn{$name}{_refhint}; + next if exists $fn{$name}{into}; + print F $fn{$name}{_refstart}; + print F "\n<refentryinfo>", $fn{$name}{_refentryinfo} + , "\n</refentryinfo>\n" if length $fn{$name}{_refentryinfo}; + print F "\n<refmeta>", $fn{$name}{_refmeta} + , "\n</refmeta>\n" if length $fn{$name}{_refmeta}; + print F "\n<refnamediv>", $fn{$name}{_refnamediv} + , "\n</refnamediv>\n" if length $fn{$name}{_refnamediv}; + + print F "\n<refsynopsisdiv>" if length $fn{$name}{_funcsynopsis}; + print F "\n<funcsynopsisinfo>", $fn{$name}{_funcsynopsisinfo} + , "\n</funcsynopsisinfo>" if length $fn{$name}{_funcsynopsisinfo}; + print F "\n<funcsynopsis>", $fn{$name}{_funcsynopsis} + , "\n</funcsynopsis>" if length $fn{$name}{_funcsynopsis}; + print F "\n</refsynopsisdiv>" if length $fn{$name}{_funcsynopsis}; + print F "\n<refsect1><title>Description</title>", $fn{$name}{_description} + , "\n</refsect1>" if length $fn{$name}{_description}; + print F "\n<refsect1><title>Author</title>", $fn{$name}{_authors} + , "\n</refsect1>" if length $fn{$name}{_authors}; + print F "\n<refsect1><title>Copyright</title>", $fn{$name}{_copyright} + , "\n</refsect1>" if length $fn{$name}{_copyright}; + print F "\n<refsect1><title>See Also</title>", $fn{$name}{_seealso} + , "\n</refsect1>" if length $fn{$name}{_seealso}; + + print F $fn{$name}{_refends}; + + # ------------------------------------------------------------------ + # creating the per-header manpage - a combination of function man pages + + my $H = $fn{$name}{_mainheader}; # a shorthand for the mainheader index + my $me = 0; $me = 1 if not exists $header{$H}; + my $HH = $H; $HH =~ s/[^\w\.]/-/g; + $header{$H}{_refstart} = "\n<refentry id=\"".$HH."\">" if $me; + $header{$H}{_refends} = "\n</refentry>\n" if $me; + $header{$H}{_refentryinfo} = $fn{$name}{_refentryinfo} if $me; + $header{$H}{_refentryinfo} + =~ s/(<title>)([^<>]*)(<\/title>)/$1 the library $3/s if $me; + $header{$H}{_refmeta} + = "\n <manvolnum>".$fn{$name}{_manvolnum}."</manvolnum>\n" + . "\n <refentrytitle>".$fn{$name}{_mainheader}."</refentrytitle>" if $me; + $header{$H}{_refnamediv} = "\n <refpurpose> library </refpurpose>"; + $header{$H}{_refnamediv} .= "\n <refname>".$HH."</refname>"; + + $header{$H}{_refsynopsisinfo} + = $fn{$name}{_refsynopsisinfo} if exists $fn{$name}{_refsynopsisinfo}; + $header{$H}{_funcsynopsis} + .= "\n".$fn{$name}{_funcsynopsis} if exists $fn{$name}{_funcsynopsis}; +# $header{$H}{_funcsynopsisdiv} .= "\n<funcsynopsis>" +# .$fn{$name}{_funcsynopsis}."</funcsynopsis>" +# if exists $fn{$name}{_funcsynopsis}; + $header{$H}{_copyright} + = $fn{$name}{_copyright} if exists $fn{$name}{_copyright} and $me; + $header{$H}{_authors} + = $fn{$name}{_authors} if exists $fn{$name}{_authors} and $me; + if ($me) + { + my $T = `cat $o{package}.spec`; + if ($T =~ /\%description\b([^\%]*)\%/s) + { + $header{$H}{_description} = $1; + }elsif (not length $header{$H}{_description}) + { + $header{$H}{_description} = "$o{package} library"; + } + } +} + +my $H; +for $H (keys %header) # second pass +{ + next if not length $header{$H}{_refstart}; + print F "\n<!-- _______ ",$H," _______ -->"; + print F $header{$H}{_refstart}; + print F "\n<refentryinfo>", $header{$H}{_refentryinfo} + , "\n</refentryinfo>\n" if length $header{$H}{_refentryinfo}; + print F "\n<refmeta>", $header{$H}{_refmeta} + , "\n</refmeta>\n" if length $header{$H}{_refmeta}; + print F "\n<refnamediv>", $header{$H}{_refnamediv} + , "\n</refnamediv>\n" if length $header{$H}{_refnamediv}; + + print F "\n<refsynopsisdiv>" if length $header{$H}{_funcsynopsis}; + print F "\n<funcsynopsisinfo>", $header{$H}{_funcsynopsisinfo} + , "\n</funcsynopsisinfo>" if length $header{$H}{_funcsynopsisinfo}; + print F "\n<funcsynopsis>", $header{$H}{_funcsynopsis} + , "\n</funcsynopsis>" if length $header{$H}{_funcsynopsis}; + print F "\n</refsynopsisdiv>" if length $header{$H}{_funcsynopsis}; + + print F "\n<refsect1><title>Description</title>", $header{$H}{_description} + , "\n</refsect1>" if length $header{$H}{_description}; + print F "\n<refsect1><title>Author</title>", $header{$H}{_authors} + , "\n</refsect1>" if length $header{$H}{_authors}; + print F "\n<refsect1><title>Copyright</title>", $header{$H}{_copyright} + , "\n</refsect1>" if length $header{$H}{_copyright}; + + print F $header{$H}{_refends}; +} +print F "\n",'</reference>',"\n"; +close (F); + +# _____________________________________________________________________ +open F, ">$o{dumpdocfile}" or die "could not open $o{dumpdocfile}: $!"; + +for $name (sort keys %fn) +{ + print F "<fn id=\"$name\"><!-- FOR \"$name\" -->\n"; + for $H (sort keys %{$fn{$name}}) + { + print F "<$H name=\"$name\">",$fn{$name}{$H},"</$H>\n"; + } + print F "</fn><!-- END \"$name\" -->\n\n"; +} +close F; diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/make-doc.py b/Build/source/libs/zziplib/zziplib-0.13.58/docs/make-doc.py new file mode 100644 index 00000000000..c58427c4a5c --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/make-doc.py @@ -0,0 +1,1028 @@ +#! /usr/bin/python +# -*- coding: UTF-8 -*- +import sys +import re +import string +import commands +import warnings + +errors = 0 +def warn(msg, error=None): + global errors + errors += 1 + if error is None: + warnings.warn("-- "+str(errors)+" --\n "+msg, RuntimeWarning, 2) + else: + warnings.warn("-- "+str(errors)+" --\n "+msg+ + "\n error was "+str(error), RuntimeWarning, 2) +#fu + +# beware, stupid python interprets backslashes in repl only partially! +def s(string, pattern, repl, count=0): + return re.sub(pattern, repl, string, count) +def m(string, pattern): + return re.match(pattern, string) +def sorted_keys(dict): + keys = dict.keys() + keys.sort() + return keys + +# we make up a few formatter routines to help in the processing: +def html2docbook(text): + """ the C comment may contain html markup - simulate with docbook tags """ + return ( + s(s(s(s(s(s(s(s(s(s(s(text, + r"<br\s*/?>",""), + r"(</?)em>",r"\1emphasis>"), + r"<code>","<userinput>"), + r"</code>","</userinput>"), + r"<link>","<function>"), + r"</link>","</function>"), + r"(?s)\s*</screen>","</screen>"), +# r"<ul>","</para><itemizedlist>"), +# r"</ul>","</itemizedlist><para>"), +# r"<li>","<listitem><para>"), +# r"</li>","</para></listitem>\n"), + r"<ul>","</para><programlisting>\n"), + r"</ul>","</programlisting><para>"), + r"<li>",""), + r"</li>","")) +def paramdef2html(text): + return s(s(s(s(s(text, + r"\s+<paramdef>", r"\n<nobr>"), + r"<paramdef>",r"<nobr>"), + r"</paramdef>",r"</nobr>"), + r"<parameters>",r"\n <code>"), + r"</parameters>",r"</code>\n") +def section2html(text): + mapping = { "<screen>" : "<pre>", "</screen>" : "</pre>", + "<para>" : "<p>", "</para>" : "</p>" , + "<function>" : "<link>", "</function>" : "</link>" } + for str in mapping: + text = string.replace(text, str, mapping[str]) + return text +def html(text): + return section2html(paramdef2html(text)) +def cdata1(text): + return string.replace(text, "&", "&") +def cdata31(text): + return string.replace(string.replace(text, "<","<"), ">",">") +def cdata3(text): + return cdata31(cdata1(text)) +def cdata43(text): + return string.replace(text,"\"", """) +def cdata41(text): + return cdata43(cdata31(text)) +def cdata4(text): + return cdata43(cdata3(text)) +def markup_as_screen41 (text): + """ used for non-star lines in comment blocks """ + return " <screen> " + s(cdata41(text), r"(?m)^", r" ") +" </screen> " + +def file_comment2section(text): + """ convert a C comment into a series of <para> and <screen> parts """ + return ("<para>\n"+ + s(s(s(s(s(s(s(text, + r"(?s){<([\w\.\-]+\@[\w\.\-]+\w\w)>", + r"<\1>"), + r"(?mx) ^\s?\s?\s? ([^\*\s]+ .*) $", + lambda x : markup_as_screen41 (x.group(1))), + r"(?mx) ^\s*[*]\s* $", r" \n</para><para>\n"), + r"(?mx) ^\s?\s?\s?\* (.*) $", r" \1 "), + r"(?sx) </screen>(\s*)<screen> ", r"\1"), + r"(?sx) <([^<>\;]+\@[^<>\;]+)> ", r"<email>\1</email>"), + r"(?sx) \<\;([^<>\&\;]+\@[^<>\&\;]+)\>\; ", + r"<email>\1</email>") + "\n</para>") +def func_comment2section(text): + """ convert a C comment into a series of <para> and <screen> parts + and sanitize a few markups already present in the comment text + """ + return ("<para>\n"+ + s(s(s(s(s(s(s(s(s(s(s(text, + r"<c>",r"<code>"), r"</c>", r"</code>"), + r"(?mx) ^\s?\s?\s? ([^\*\s]+.*)", + lambda x: markup_as_screen41 (x.group(1))), + r"(?mx) ^\s?\s?\s?\* (.*) $", r" <br /> \1"), + r"(?mx) ^\s*<br\s*\/>\s* $", r"\n</para><para>\n"), + r"<<",r"<"), r">>",r">"), + r"(?sx) (</?para>\s*)<br\s*\/?>",r"\1"), + r"(?sx) (</?para>\s*)<br\s*\/?>",r"\1"), + r"(?sx) (<br\s*\/?>\s*)<br\s*\/?>",r"\1"), + r"(?sx) <\/screen>(\s*)<screen>",r"\1") + "\n</para>") +def markup_link_syntax(text): + """ markup the link-syntax ` => somewhere ` in the text block """ + return ( + s(s(s(s(text, + r"(?mx) (^|\s)\=\>\"([^\"]*)\"", r"\1<link>\2</link>"), + r"(?mx) (^|\s)\=\>\'([^\"]*)\'", r"\1<link>\2</link>"), + r"(?mx) (^|\s)\=\>\s(\w[\w.]*\w)\b", r"\1<link>\2</link>"), + r"(?mx) (^|\s)\=\>\s([^\s\,\.\!\?\:\;\<\>\&\'\=\-]+)", + r"\1<link>\2</link>")) +def this_function_link(text, name): + return s(text, r"(?sx) (T|t)his \s (function|procedure) ", lambda x + : "<function>"+x.group(1)+"he "+name+" "+x.group(2)+"</function>") + +# ----------------------------------------------------------------------- +class Options: + var = {} + def __getattr__(self, name): + if not self.var.has_key(name): return None + return self.var[name] + def __setattr__(self, name, value): + self.var[name] = value +#end + +o = Options() +o.verbose = 0 + +o.version = s( commands.getoutput( + """ grep -i "^version *:" *.spec 2>/dev/null | + sed -e "s/[Vv]ersion *: *//" """), r"\s*",r"") +o.package = s(commands.getoutput( + """ grep -i "^name *:" *.spec 2>/dev/null | + sed -e "s/[Nn]ame *: *//" """), r"\s*",r"") + +if not len(o.version): + o.version = commands.getoutput(""" date +%Y.%m.%d """) +if not len(o.package): + o.package = "_project" + +o.suffix = "-doc3" +o.mainheader = o.package+".h" + +class File: + def __init__(self, filename): + self.name = filename + self.mainheader = o.mainheader + self.authors = "" + self.copyright = "" + def __getattr__(self, name): + """ defend against program to break on uninited members """ + if self.__dict__.has_key(name): return self.__dict__[name] + warn("no such member: "+name); return None + def set_author(self, text): + if self.authors: + self.authors += "\n" + self.authors += text + return text + def set_copyright(self, text): + self.copyright = text + return text + +class InputFiles: + """ for each set of input files we can create an object + it does correspond with a single html-output page and + a single docbook <reference> master page to be output + """ + def __init__(self): + # the id will tell us in which order + # we did meet each function definition + self.id = 1000 + self.files = [] # file_list + self.funcs = [] # func_list: of hidden class FuncDeclaration + self.file = None # current file + def new_File(self, name): + self.file = File(name) + self.files.append(self.file) + return self.file + def next_id(self): + id = self.id ; self.id += 1 + return id + def add_function_declaration(self, comment, prototype): + class FuncDeclaration: # note that both decl.comment and + pass # decl.prototype are in cdata1 format + func = FuncDeclaration() + func.file = self.file + func.comment = s(comment, # need to take out email-style markups + r"<([\w\.\-]+\@[\w\.\-]+\w\w)>", r"<\1>") + func.prototype = prototype + func.id = all.next_id() + self.funcs.append(func) + # print id + return prototype + +def scan_options (options, list): + def encode(text): + return s(s(text, r"¬", r"&#AC;"), r"\*/",r"¬") + def decode(text): + return s(text, r"¬", r"*/") + + for name in options: + found = m(name, r"^(\w+)=(.*)") + if found: + o.var[found.group(1)] = found.group(2) + continue + #else + try: + input = open(name, "r") + except IOError, error: + warn(#...... (scan_options) ............... + "can not open input file: "+name, error) + continue + text = input.read() ; input.close() + text = encode (cdata1 (text)) + + file = list.new_File(name) + + # cut per-function comment block + text = s(text, r"(?x) [/][*][*](?=\s) ([^¬]+) ¬ ([^\{\}\;\#]+) [\{\;]", + lambda x : list.add_function_declaration( + decode(x.group(1)), decode(x.group(2)))) + + # cut per-file comment block + found = m(text, r"(?sx) [/][*]+(?=\s) ([^¬]+) ¬ " + r"(?:\s*\#define\s*\S+)*" + r"(\s*\#include\s*<[^<>]*>(?:\s*//[^\n]*)?)") + if found: + file.comment = decode(found.group(1)) + file.include = cdata31(found.group(2)) + else: + file.comment = None + file.include = None + found = m(text, r"(?sx) ^ [/][*]+(?=\s) ([^¬]+) ¬ ") + if found: + file.comment = decode(found.group(1)) + #fi + # throw away the rest - further processing on memorized strings only + + return None + +all = InputFiles() +scan_options (sys.argv[1:], all) + +if not o.docbookfile: + o.docbookfile = o.package+o.suffix+".docbook" +if not o.libhtmlfile: + o.libhtmlfile = o.package+o.suffix+".html" +if not o.dumpdocfile: + o.dumpdocfile = o.package+o.suffix+".dxml" + +# ........................................................................... +# check out information in the file.comment section + +def all_files_comment2section(list): + for file in list: + if file.comment is None: continue + file.section = file_comment2section(file.comment) + + file.section = s( + file.section, r"(?sx) \b[Aa]uthor\s*:(.*</email>) ", lambda x + : "<author>" + file.set_author(x.group(1)) + "</author>") + file.section = s( + file.section, r"(?sx) \b[Cc]opyright\s*:([^<>]*)</para> ",lambda x + : "<copyright>" + file.set_copyright(x.group(1)) + "</copyright>") + # if "file" in file.name: print >> sys.stderr, file.comment # 2.3 + #od +all_files_comment2section(all.files) + +# ----------------------------------------------------------------------- + +class Function: + " <prespec>void* </><namespec>hello</><namespec> (int) const</callspec> " + def __init__(self): + self.prespec = "" + self.namespec = "" + self.callspec = "" + self.name = "" +# def set(self, **defines): +# name = defines.keys()[0] +# self.__dict__[name] = defines[name] +# return defines[name] +# def cut(self, **defines): +# name = defines.keys()[0] +# self.__dict__[name] += defines[name] +# return "" + def __getattr__(self, name): + """ defend against program exit on members being not inited """ + if self.__dict__.has_key(name): return self.__dict__[name] + warn("no such member: "+name); return None + def dict(self): + return self.__dict__ + def dict_sorted_keys(self): + keys = self.__dict__.keys() + keys.sort() + return keys + def parse(self, prototype): + found = m(prototype, r"(?sx) ^(.*[^.]) \b(\w[\w.]*\w)\b (\s*\(.*) $ ") + if found: + self.prespec = found.group(1).lstrip() + self.namespec = found.group(2) + self.callspec = found.group(3).lstrip() + self.name = self.namespec.strip() + return self.name + return None + +# pass 1 of per-func strings ............................................... +# (a) cut prototype into prespec/namespec/callspec +# (b) cut out first line of comment as headline information +# (c) sanitize rest of comment block into proper docbook formatted .body +# +# do this while copying strings from all.funcs to function_list +# and remember the original order in name_list + +def markup_callspec(text): + return ( + s(s(s(s(s(text, + r"(?sx) ^([^\(\)]*)\(", r"\1<parameters>(<paramdef>",1), + r"(?sx) \)([^\(\)]*)$", r"</paramdef>)</parameters>\1",1), + r"(?sx) , ", r"</paramdef>,<paramdef>"), + r"(?sx) <paramdef>(\s+) ", r"\1<paramdef>"), + r"(?sx) (\s+)</paramdef>", r"</paramdef>\1")) + +def parse_all_functions(func_list): # list of FunctionDeclarations + """ parse all FunctionDeclarations and create a list of Functions """ + list = [] + for func in all.funcs: + function = Function() + if not function.parse (func.prototype): continue + + list.append(function) + + function.body = markup_link_syntax(func.comment) + if "\n" not in function.body: # single-line comment is the head + function.head = function.body + function.body = "" + else: # cut comment in first-line and only keep the rest as descr body + function.head = s(function.body, r"(?sx) ^([^\n]*\n).*",r"\1",1) + function.body = s(function.body, r"(?sx) ^[^\n]*\n", r"", 1) + #fi + if m(function.head, r"(?sx) ^\s*$ "): # empty head line, autofill here + function.head = s("("+func.file.name+")", r"[.][.][/]", r"") + + function.body = func_comment2section(function.body) + function.src = func # keep a back reference + + # add extra docbook markups to callspec in $fn-hash + function.callspec = markup_callspec (function.callspec) + #od + return list +function_list = parse_all_functions(all.funcs) + +def examine_head_anchors(func_list): + """ .into tells later steps which func-name is the leader of a man + page and that this func should add its descriptions over there. """ + for function in func_list: + function.into = None + function.seealso = None + + found = m(function.head, r"(?sx) ^ \s* <link>(\w[\w.]*\w)<\/link>") + # if found and found.group(1) in func_list.names: + if found and found.group(1): + function.into = found.group(1) + + def set_seealso(f, value): + f.seealso = value + return value + function.head = s(function.head, r"(.*)also:(.*)", lambda x + : set_seealso(function, x.group(2)) and x.group(1)) + if function.seealso and None: + print "function[",function.name,"].seealso=",function.seealso +examine_head_anchors(function_list) + +# =============================================================== HTML ===== + +def find_by_name(func_list, name): + for func in func_list: + if func.name == name: + return func + #od + return None +#fu + +class HtmlFunction: + def __init__(self, func): + self.src = func.src + self.into = func.into + self.name = func.name + self.toc_line = paramdef2html( + " <td valign=\"top\"><code>"+func.prespec+"</code></td>\n"+ + " <td valign=\"top\"> </td>\n"+ + " <td valign=\"top\"><a href=\"#"+func.name+"\">\n"+ + " <code>"+func.namespec+"</code>"+ + " </a></td>\n"+ + " <td valign=\"top\"> </td>\n"+ + " <td valign=\"top\">"+func.callspec+"</td>\n") + self.synopsis = paramdef2html( + " <code>"+func.prespec+"</code>\n"+ + " <br /><b><code>"+func.namespec+"</code></b>\n"+ + " <code>"+func.callspec+"</code>\n") + self.anchor = "<a name=\""+func.name+"\" />" + self.section = "<para><em> "+func.head+"\n"+ \ + "\n</em></para>"+section2html(func.body) +#class + +class HtmlFunctionFamily(HtmlFunction): + def __init__(page, func): + HtmlFunction.__init__(page, func) + page.toc_line_list = [ page.toc_line ] + # page.html_txt = page.synopsis + page.synopsis_list = [ page.synopsis ] + page.anchor_list = [ page.anchor ] + page.section_list = [ this_function_link(page.section, func.name) ] + +def ensure_name(text, name): + adds = "<small><code>"+name+"</code></small> -" + match = r"(?sx) .*>[^<>]*\b" + name + r"\b[^<>]*<.*" + found = m(text, match) + if found: return text + found = m(text, r".*<p(ara)?>.*") + if found: return s(text, r"(<p(ara)?>)", r"\1"+adds, 1) + return adds+text + +def combined_html_pages(func_list): + """ and now add descriptions of non-leader entries (html-mode) """ + combined = {} + + for func in func_list: # assemble leader pages + if func.into is not None: continue + combined[func.name] = HtmlFunctionFamily(func) + + for func in func_list: + if func.into is None: continue + if func.into not in combined : + warn(#......... (combine_html_pages) .............. + "function '"+func.name+"'s into => '"+func.into+ + "\n: no such target function: "+func.into) + combined[func.name] = HtmlFunctionFamily(func) + continue + #fi + page = HtmlFunction(func) + into = combined[func.into] + into.toc_line_list.append( page.toc_line ) + into.anchor_list.append( page.anchor ) + into.synopsis_list.append( page.synopsis ) + into.section_list.append( + s(ensure_name(this_function_link(section2html( func.body ), + func.name), func.name), + r"(?sx) (</?para>\s*) <br\s*\/>", r"\1")) + return combined.values() +html_pages = combined_html_pages(function_list) + +def html_resolve_links_on_page(text, list): + """ link ref-names of a page with its endpoint on the same html page""" + def html_link (name , extra): + """ make <link>s to <href> of correct target or make it <code> """ + if find_by_name(list, name) is None: + return "<code>"+name+extra+"</code>" + else: + return "<a href=\"#"+name+"\"><code>"+name+extra+"</code></a>" + #fu html_link + return s(s(text, r"(?sx) <link>(\w+)([^<>]*)<\/link> ", + lambda x : html_link(x.group(1),x.group(2))), + r"(?sx) \-\> ", r"<small>-></small>") # just sanitize.. +#fu html_resolve_links + +class HtmlPage: + def __init__(self): + self.toc = "" + self.txt = "" + self.package = o.package + self.version = o.version + def page_text(self): + """ render .toc and .txt parts into proper <html> page """ + T = "" + T += "<html><head>" + T += "<title>"+self.package+"autodoc documentation </title>" + T += "</head>\n<body>\n" + T += "\n<h1>"+self.package+" <small><small><i>- "+self.version + T += "</i></small></small></h1>" + T += "\n<table border=0 cellspacing=2 cellpadding=0>" + T += self.toc + T += "\n</table>" + T += "\n<h3>Documentation</h3>\n\n<dl>" + T += html_resolve_links_on_page(self.txt, function_list) + T += "\n</dl>\n</body></html>\n" + return T + def add_page_map(self, list): + """ generate the index-block at the start of the onepage-html file """ + keys = list.keys() + keys.sort() + for name in keys: + self.toc += "<tr valign=\"top\">\n"+ \ + "\n</tr><tr valign=\"top\">\n".join( + list[name].toc_line_list)+"</tr>\n" + self.txt += "\n<dt>"+" ".join(list[name].anchor_list) + self.txt += "\n"+"\n<br />".join(list[name].synopsis_list)+"<dt>" + self.txt += "\n<dd>\n"+"\n".join(list[name].section_list) + self.txt += ("\n<p align=\"right\">"+ + "<small>("+list[name].src.file.name+")</small>"+ + "</p></dd>") + def add_page_list(self, functions): + """ generate the index-block at the start of the onepage-html file """ + mapp = {} + for func in functions: + mapp[func.name] = func + #od + self.add_page_map(mapp) +#end + +html = HtmlPage() +# html.add_function_dict(Fn) +# html.add_function_list(Fn.sort.values()) +html.add_page_list(html_pages) + +# and finally print the html-formatted output +try: + F = open(o.libhtmlfile, "w") +except IOError, error: + warn(# ............. open(o.libhtmlfile, "w") .............. + "can not open html output file: "+o.libhtmlfile, error) +else: + print >> F, html.page_text() + F.close() +#fi + +# ========================================================== DOCBOOK ===== +# let's go for the pure docbook, a reference type master for all man pages + +class RefPage: + def __init__(self, func): + """ initialize the fields needed for a man page entry - the fields are + named after the docbook-markup that encloses (!!) the text we store + the entries like X.refhint = "hello" will be printed therefore as + <refhint>hello</refhint>. Names with underscores are only used as + temporaries but they are memorized, perhaps for later usage. """ + self.refhint = "\n<!--========= "+func.name+" (3) ===========-->\n" + self.refentry = None + self.refentry_date = o.version.strip() # //refentryinfo/date + self.refentry_productname = o.package.strip() # //refentryinfo/prod* + self.refentry_title = None # //refentryinfo/title + self.refentryinfo = None # override + self.manvolnum = "3" # //refmeta/manvolnum + self.refentrytitle = None # //refmeta/refentrytitle + self.refmeta = None # override + self.refpurpose = None # //refnamediv/refpurpose + self.refname = None # //refnamediv/refname + self.refname_list = [] + self.refnamediv = None # override + self.mainheader = func.src.file.mainheader + self.includes = func.src.file.include + self.funcsynopsisinfo = "" # //funcsynopsisdiv/funcsynopsisinfo + self.funcsynopsis = None # //funcsynopsisdiv/funcsynopsis + self.funcsynopsis_list = [] + self.description = None + self.description_list = [] + # optional sections + self.authors_list = [] # //sect1[authors]/listitem + self.authors = None # override + self.copyright = None + self.copyright_list = [] + self.seealso = None + self.seealso_list = [] + if func.seealso: + self.seealso_list.append(func.seealso) + # func.func references + self.func = func + self.file_authors = None + if func.src.file.authors: + self.file_authors = func.src.file.authors + self.file_copyright = None + if func.src.file.copyright: + self.file_copyright = func.src.file.copyright + #fu + def refentryinfo_text(page): + """ the manvol formatter wants to render a footer line and header line + on each manpage and such info is set in <refentryinfo> """ + if page.refentryinfo: + return page.refentryinfo + if page.refentry_date and \ + page.refentry_productname and \ + page.refentry_title: return ( + "\n <date>"+page.refentry_date+"</date>"+ + "\n <productname>"+page.refentry_productname+"</productname>"+ + "\n <title>"+page.refentry_title+"</title>") + if page.refentry_date and \ + page.refentry_productname: return ( + "\n <date>"+page.refentry_date+"</date>"+ + "\n <productname>"+page.refentry_productname+"</productname>") + return "" + def refmeta_text(page): + """ the manvol formatter needs to know the filename of the manpage to + be made up and these parts are set in <refmeta> actually """ + if page.refmeta: + return page.refmeta + if page.manvolnum and page.refentrytitle: + return ( + "\n <refentrytitle>"+page.refentrytitle+"</refentrytitle>"+ + "\n <manvolnum>"+page.manvolnum+"</manvolnum>") + if page.manvolnum and page.func.name: + return ( + "\n <refentrytitle>"+page.func.name+"</refentrytitle>"+ + "\n <manvolnum>"+page.manvolnum+"</manvolnum>") + return "" + def refnamediv_text(page): + """ the manvol formatter prints a header line with a <refpurpose> line + and <refname>'d functions that are described later. For each of + the <refname>s listed here, a mangpage is generated, and for each + of the <refname>!=<refentrytitle> then a symlink is created """ + if page.refnamediv: + return page.refnamediv + if page.refpurpose and page.refname: + return ("\n <refname>"+page.refname+'</refname>'+ + "\n <refpurpose>"+page.refpurpose+" </refpurpose>") + if page.refpurpose and page.refname_list: + T = "" + for refname in page.refname_list: + T += "\n <refname>"+refname+'</refname>' + T += "\n <refpurpose>"+page.refpurpose+" </refpurpose>" + return T + return "" + def funcsynopsisdiv_text(page): + """ refsynopsisdiv shall be between the manvol mangemaent information + and the reference page description blocks """ + T="" + if page.funcsynopsis: + T += "\n<funcsynopsis>" + if page.funcsynopsisinfo: + T += "\n<funcsynopsisinfo>"+ page.funcsynopsisinfo + \ + "\n</funcsynopsisinfo>\n" + T += page.funcsynopsis + \ + "\n</funcsynopsis>\n" + if page.funcsynopsis_list: + T += "\n<funcsynopsis>" + if page.funcsynopsisinfo: + T += "\n<funcsynopsisinfo>"+ page.funcsynopsisinfo + \ + "\n</funcsynopsisinfo>\n" + for funcsynopsis in page.funcsynopsis_list: + T += funcsynopsis + T += "\n</funcsynopsis>\n" + #fi + return T + def description_text(page): + """ the description section on a manpage is the main part. Here + it is generated from the per-function comment area. """ + if page.description: + return page.description + if page.description_list: + T = "" + for description in page.description_list: + if not description: continue + T += description + if T: return T + return "" + def authors_text(page): + """ part of the footer sections on a manpage and a description of + original authors. We prever an itimizedlist to let the manvol + show a nice vertical aligment of authors of this ref item """ + if page.authors: + return page.authors + if page.authors_list: + T = "<itemizedlist>" + previous="" + for authors in page.authors_list: + if not authors: continue + if previous == authors: continue + T += "\n <listitem><para>"+authors+"</para></listitem>" + previous = authors + T += "</itemizedlist>" + return T + if page.authors: + return page.authors + return "" + def copyright_text(page): + """ the copyright section is almost last on a manpage and purely + optional. We list the part of the per-file copyright info """ + if page.copyright: + return page.copyright + """ we only return the first valid instead of merging them """ + if page.copyright_list: + T = "" + for copyright in page.copyright_list: + if not copyright: continue + return copyright # !!! + return "" + def seealso_text(page): + """ the last section on a manpage is called 'SEE ALSO' usally and + contains a comma-separated list of references. Some manpage + viewers can parse these and convert them into hyperlinks """ + if page.seealso: + return page.seealso + if page.seealso_list: + T = "" + for seealso in page.seealso_list: + if not seealso: continue + if T: T += ", " + T += seealso + if T: return T + return "" + def refentry_text(page, id=None): + """ combine fields into a proper docbook refentry """ + if id is None: + id = page.refentry + if id: + T = '<refentry id="'+id+'">' + else: + T = '<refentry>' # this is an error + + if page.refentryinfo_text(): + T += "\n<refentryinfo>"+ page.refentryinfo_text()+ \ + "\n</refentryinfo>\n" + if page.refmeta_text(): + T += "\n<refmeta>"+ page.refmeta_text() + \ + "\n</refmeta>\n" + if page.refnamediv_text(): + T += "\n<refnamediv>"+ page.refnamediv_text() + \ + "\n</refnamediv>\n" + if page.funcsynopsisdiv_text(): + T += "\n<refsynopsisdiv>\n"+ page.funcsynopsisdiv_text()+ \ + "\n</refsynopsisdiv>\n" + if page.description_text(): + T += "\n<refsect1><title>Description</title> " + \ + page.description_text() + "\n</refsect1>" + if page.authors_text(): + T += "\n<refsect1><title>Author</title> " + \ + page.authors_text() + "\n</refsect1>" + if page.copyright_text(): + T += "\n<refsect1><title>Copyright</title> " + \ + page.copyright_text() + "\n</refsect1>\n" + if page.seealso_text(): + T += "\n<refsect1><title>See Also</title><para> " + \ + page.seealso_text() + "\n</para></refsect1>\n" + + T += "\n</refentry>\n" + return T + #fu +#end + +# ----------------------------------------------------------------------- +class FunctionRefPage(RefPage): + def reinit(page): + """ here we parse the input function for its values """ + if page.func.into: + page.refhint = "\n <!-- see "+page.func.into+" -->\n" + #fi + page.refentry = page.func.name # //refentry@id + page.refentry_title = page.func.name.strip() # //refentryinfo/title + page.refentrytitle = page.func.name # //refmeta/refentrytitle + if page.includes: + page.funcsynopsisinfo += "\n"+page.includes + if not page.funcsynopsisinfo: + page.funcsynopsisinfo="\n"+' #include <'+page.mainheader+'>' + page.refpurpose = page.func.head + page.refname = page.func.name + + def funcsynopsis_of(func): + return ( + "\n <funcprototype>\n <funcdef>"+func.prespec+ + " <function>"+func.name+"</function></funcdef>"+ + "\n"+s(s(s(func.callspec, + r"<parameters>\s*\(",r" "), + r"\)\s*</parameters>",r" "), + r"</paramdef>\s*,\s*",r"</paramdef>\n ")+ + " </funcprototype>") + page.funcsynopsis = funcsynopsis_of(page.func) + + page.description = ( + html2docbook(this_function_link(page.func.body, page.func.name))) + + if page.file_authors: + def add_authors(page, ename, email): + page.authors_list.append( ename+' '+email ) + return ename+email + s(page.file_authors, + r"(?sx) \s* ([^<>]*) (<email>[^<>]*</email>) ", lambda x + : add_authors(page, x.group(1), x.group(2))) + #fi + + if page.file_copyright: + page.copyright = "<screen>\n"+page.file_copyright+"</screen>\n" + #fi + return page + def __init__(page,func): + RefPage.__init__(page, func) + FunctionRefPage.reinit(page) + +def refpage_list_from_function_list(funclist): + list = [] + mapp = {} + for func in funclist: + mapp[func.name] = func + #od + for func in funclist: + page = FunctionRefPage(func) + if func.into and func.into not in mapp: + warn (# ............ (refpage_list_from_function_list) ....... + "page '"+page.func.name+"' has no target => "+ + "'"+page.func.into+"'" + "\n: going to reset .into of Function '"+page.func.name+"'") + func.into = None + #fi + list.append(FunctionRefPage(func)) + return list +#fu + +# ordered list of pages +refpage_list = refpage_list_from_function_list(function_list) + +class FunctionFamilyRefPage(RefPage): + def __init__(self, page): + RefPage.__init__(self, page.func) + self.seealso_list = [] # reset + self.refhint_list = [] + def refhint_list_text(page): + T = "" + for hint in page.refhint_list: + T += hint + return T + def refentry_text(page): + return page.refhint_list_text() + "\n" + \ + RefPage.refentry_text(page) + pass + +def docbook_pages_recombine(pagelist): + """ take a list of RefPages and create a new list where sections are + recombined in a way that their description is listed on the same + page and the manvol formatter creates symlinks to the combined + function description page - use the attribute 'into' to guide the + processing here as each of these will be removed from the output + list. If no into-pages are there then the returned list should + render to the very same output text like the input list would do """ + + list = [] + combined = {} + for orig in pagelist: + if orig.func.into: continue + page = FunctionFamilyRefPage(orig) + combined[orig.func.name] = page ; list.append(page) + + page.refentry = orig.refentry # //refentry@id + page.refentry_title = orig.refentrytitle # //refentryinfo/title + page.refentrytitle = orig.refentrytitle # //refmeta/refentrytitle + page.includes = orig.includes + page.funcsynopsisinfo = orig.funcsynopsisinfo + page.refpurpose = orig.refpurpose + if orig.refhint: + page.refhint_list.append( orig.refhint ) + if orig.refname: + page.refname_list.append( orig.refname ) + elif orig.refname_list: + page.refname_list.extend( orig.refname_list ) + if orig.funcsynopsis: + page.funcsynopsis_list.append( orig.funcsynopsis ) + elif orig.refname_list: + page.funcsynopsis_list.extend( orig.funcsynopsis_list ) + if orig.description: + page.description_list.append( orig.description ) + elif orig.refname_list: + page.description_list.extend( orig.description_list ) + if orig.seealso: + page.seealso_list.append( orig.seealso ) + elif orig.seealso_list: + page.seealso_list.extend( orig.seealso_list ) + if orig.authors: + page.authors_list.append( orig.authors ) + elif orig.authors_list: + page.authors_list.extend( orig.authors_list ) + if orig.copyright: + page.copyright_list.append( orig.copyright ) + elif orig.refname_list: + page.copyright_list.extend( orig.copyright_list ) + #od + for orig in pagelist: + if not orig.func.into: continue + if orig.func.into not in combined: + warn("page for '"+orig.func.name+ + "' has no target => '"+orig.func.into+"'") + page = FunctionFamilyRefPage(orig) + else: + page = combined[orig.func.into] + + if orig.refname: + page.refname_list.append( orig.refname ) + elif orig.refname_list: + page.refname_list.extend( orig.refname_list ) + if orig.funcsynopsis: + page.funcsynopsis_list.append( orig.funcsynopsis ) + elif orig.refname_list: + page.funcsynopsis_list.extend( orig.funcsynopsis_list ) + if orig.description: + page.description_list.append( orig.description ) + elif orig.refname_list: + page.description_list.extend( orig.description_list ) + if orig.seealso: + page.seealso_list.append( orig.seealso ) + elif orig.seealso_list: + page.seealso_list.extend( orig.seealso_list ) + if orig.authors: + page.authors_list.append( orig.authors ) + elif orig.authors_list: + page.authors_list.extend( orig.authors_list ) + if orig.copyright: + page.copyright_list.append( orig.copyright ) + elif orig.refname_list: + page.copyright_list.extend( orig.copyright_list ) + #od + return list +#fu + +combined_pages = docbook_pages_recombine(pagelist = refpage_list) + +# ----------------------------------------------------------------------- + +class HeaderRefPage(RefPage): + pass + +def docbook_refpages_perheader(page_list): # headerlist + " creating the per-header manpage - a combination of function man pages " + header = {} + for page in page_list: + assert not page.func.into + file = page.func.src.file.mainheader # short for the mainheader index + if file not in header: + header[file] = HeaderRefPage(page.func) + header[file].id = s(file, r"[^\w\.]","-") + header[file].refentry = header[file].id + header[file].refentryinfo = None + header[file].refentry_date = page.refentry_date + header[file].refentry_productname = ( + "the library "+page.refentry_productname) + header[file].manvolnum = page.manvolnum + header[file].refentrytitle = file + header[file].funcsynopsis = "" + if 1: # or += or if not header[file].refnamediv: + header[file].refpurpose = " library " + header[file].refname = header[file].id + + if not header[file].funcsynopsisinfo and page.funcsynopsisinfo: + header[file].funcsynopsisinfo = page.funcsynopsisinfo + if page.funcsynopsis: + header[file].funcsynopsis += "\n"+page.funcsynopsis + if not header[file].copyright and page.copyright: + header[file].copyright = page.copyright + if not header[file].authors and page.authors: + header[file].authors = page.authors + if not header[file].authors and page.authors_list: + header[file].authors_list = page.authors_list + if not header[file].description: + found = m(commands.getoutput("cat "+o.package+".spec"), + r"(?s)\%description\b([^\%]*)\%") + if found: + header[file].description = found.group(1) + elif not header[file].description: + header[file].description = "<para>" + ( + page.refentry_productname + " library") + "</para>"; + #fi + #fi + #od + return header#list +#fu + +def leaders(pagelist): + list = [] + for page in pagelist: + if page.func.into : continue + list.append(page) + return list +header_refpages = docbook_refpages_perheader(leaders(refpage_list)) + +# ----------------------------------------------------------------------- +# printing the docbook file is a two-phase process - we spit out the +# leader pages first - later we add more pages with _refstart pointing +# to the leader page, so that xmlto will add the functions there. Only the +# leader page contains some extra info needed for troff page processing. + +doctype = '<!DOCTYPE reference PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"' +doctype += "\n " +doctype += '"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">'+"\n" + +try: + F = open(o.docbookfile,"w") +except IOError, error: + warn("can not open docbook output file: "+o.docbookfile, error) +else: + print >> F, doctype, '<reference><title>Manual Pages</title>' + + for page in combined_pages: + print >> F, page.refentry_text() + #od + + for page in header_refpages.values(): + if not page.refentry: continue + print >> F, "\n<!-- _______ "+page.id+" _______ -->", + print >> F, page.refentry_text() + #od + + print >> F, "\n",'</reference>',"\n" + F.close() +#fi + +# _____________________________________________________________________ +try: + F = open( o.dumpdocfile, "w") +except IOError, error: + warn ("can not open"+o.dumpdocfile,error) +else: + for func in function_list: + name = func.name + print >> F, "<fn id=\""+name+"\">"+"<!-- FOR \""+name+"\" -->\n" + for H in sorted_keys(func.dict()): + print >> F, "<"+H+" name=\""+name+"\">", + print >> F, str(func.dict()[H]), + print >> F, "</"+H+">" + #od + print >> F, "</fn><!-- END \""+name+"\" -->\n\n"; + #od + F.close(); +#fi + +if errors: sys.exit(errors) diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/manpages.ar b/Build/source/libs/zziplib/zziplib-0.13.58/docs/manpages.ar new file mode 100644 index 00000000000..4d45c3b07d5 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/manpages.ar @@ -0,0 +1,2719 @@ +!<arch> +// 1400 ` +zzip_compr_str.3/ +zzip_createdir.3/ +zzip_dir_alloc.3/ +zzip_dir_alloc_ext_io.3/ +zzip_dir_close.3/ +zzip_dir_creat.3/ +zzip_dir_creat_ext_io.3/ +zzip_dir_fdopen.3/ +zzip_dir_fdopen_ext_io.3/ +zzip_dirhandle.3/ +zzip_dir_open_ext_io.3/ +zzip_disk_close.3/ +zzip_disk_entry_fopen.3/ +zzip_disk_entry_strdup_comment.3/ +zzip_disk_entry_strdup_name.3/ +zzip_disk_entry_to_data.3/ +zzip_disk_entry_to_file_header.3/ +zzip_disk_fclose.3/ +zzip_disk_feof.3/ +zzip_disk_findfile.3/ +zzip_disk_findfirst.3/ +zzip_disk_findmatch.3/ +zzip_disk_findnext.3/ +zzip_disk_fopen.3/ +zzip_disk_fread.3/ +zzip_disk_init.3/ +zzip_disk_mmap.3/ +zzip_disk_munmap.3/ +zzip_disk_open.3/ +zzip_entry_data_offset.3/ +zzip_entry_fclose.3/ +zzip_entry_feof.3/ +zzip_entry_ffile.3/ +zzip_entry_findfile.3/ +zzip_entry_findfirst.3/ +zzip_entry_findmatch.3/ +zzip_entry_findnext.3/ +zzip_entry_fopen.3/ +zzip_entry_fread.3/ +zzip_entry_fread_file_header.3/ +zzip_entry_free.3/ +zzip_entry_strdup_name.3/ +__zzip_fetch_disk_trailer.3/ +zzip_file_close.3/ +zzip_file_creat.3/ +zzip_file_mkdir.3/ +zzip_file_open.3/ +zzip_file_read.3/ +zzip_file_real.3/ +zzip_file_stat.3/ +zzip_file_write.3/ +zzip_get_default_io.3/ +zzip_inflate_init.3/ +zzip_mem_disk_fdopen.3/ +zzip_mem_disk_load.3/ +zzip_mem_disk_open.3/ +zzip_mem_entry_new.3/ +zzip_opendir_ext_io.3/ +zzip_open_ext_io.3/ +zzip_open_shared_io.3/ +__zzip_parse_root_directory.3/ +zzip_rewinddir.3/ +zzip_strerror_of.3/ +__zzip_try_open.3/ + +zzip_close.3/ 1154977710 1001 0 100644 23 ` +.so man3/zzip_fclose.3 + +zzip_closedir.3/1154977710 1001 0 100644 1054 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_CLOSEDIR" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_closedir \- (zzip/dir.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 18 +\fBint\ \fBzzip_closedir\fR\fR\fB(\fR\fBZZIP_DIR*\ dir\fR\fB);\fR +.SH "DESCRIPTION" +.PP +\fBThe zzip_closedir function\fR +is the equivalent of +\fBclosedir\fR(3) for a realdir or zipfile. +.PP +\fBThe zzip_closedir function\fR +is magic \- if the given arg\-ZZIP_DIR is a real directory, it will call the real +\fBclosedir\fR(3) and then free the wrapping ZZIP_DIR structure. Otherwise it will divert to +\fBzzip_dir_close\fR +which will free the ZZIP_DIR structure. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +/0 1154977710 1001 0 100644 789 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_COMPR_STR" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_compr_str \- (zzip/info.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 28 +\fBzzip_char_t*\ \fBzzip_compr_str\fR\fR\fB(\fR\fBint\ compr\fR\fB);\fR +.SH "DESCRIPTION" +.PP +return static const string of the known compression methods, otherwise just "zipped" is returned +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> + +zzip_creat.3/ 1154977710 1001 0 100644 22 ` +.so man3/zzip_mkdir.3 +/18 1154977710 1001 0 100644 2443 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_CREATEDIR" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_createdir \- create a new archive area for writing +.SH "SYNOPSIS" +.PP +\fB + #include <zziplib.h> +\fR +.HP 25 +\fBZZIP_DIR*\ \fBzzip_createdir\fR\fR\fB(\fR\fBzzip_char_t*\ name\fR\fB, \fR\fBint\ o_mode\fR\fB);\fR +.SH "DESCRIPTION" +.PP +.PP +\fBThe zzip_createdir function\fR +will create a new archive area. This may either be a a new zip archive or a new directory in the filesystem. The returned parameter is a new "zzip dir" handle that should be saved to a variable so it can be used a base argument for +\fBzzip_file_mkdir\fR +and +\fBzzip_file_creat\fR +calls. The returned handle wraps both possibilities, it can be representing a zip central directory that must be saved to disk using +\fBzzip_closedir\fR +or it is just a handle for the name of the real directory that still must be run through +\fBzzip_closedir\fR +to release the wrapper around the directory name. +.PP +The magic is pushed through the o_mode argument. Using a mode that has no group\-write bit set (S_IWGRP = 0040) then the file is created as a zip directory. Note that this is unabridged of any umask value in the system where the argument to +\fBthe zzip_createdir function\fR +could be 0775 but with an umask of 0755 it turns out as 0755 for a real directory. Using 0755 directly would not create it as a real directory but as a zip archive handle. +.PP +\fBThe zzip_createdir function\fR +is not yet implemented, check for #def ZZIP_NO_CREAT Write\-support will extend +\fBzzip_closedir\fR +with semantics to finalize the zip\-archive by writing the zip\-trailer and closing the archive file. +.PP +Returns null on error and sets errno. Remember, according to posix the +\fBcreat\fR(2) call is equivalent to +.sp +.nf + open (path, O_WRONLY | O_CREAT | O_TRUNC, o_mode) +.fi +.sp +so any previous zip\-archive will be overwritten unconditionally and EEXIST errors from +\fBmkdir\fR(2) are suppressed. (fixme: delete the given subtree? like suggested by O_TRUNC? not done so far!) +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> + +/36 1154977710 1001 0 100644 33 ` +.so man3/zzip_dir_alloc_ext_io.3 + +/54 1154977710 1001 0 100644 1523 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_DIR_ALLOC_EXT_I" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_dir_alloc_ext_io, zzip_dir_alloc \- (zzip/zip.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 32 +\fBZZIP_DIR*\ \fBzzip_dir_alloc_ext_io\fR\fR\fB(\fR\fBzzip_strings_t*\ ext\fR\fB, \fR\fBconst\ zzip_plugin_io_t\ io\fR\fB);\fR +.HP 25 +\fBZZIP_DIR*\ \fBzzip_dir_alloc\fR\fR\fB(\fR\fBzzip_strings_t*\ fileext\fR\fB);\fR +.SH "DESCRIPTION" +.PP +allocate a new ZZIP_DIR handle and do basic initializations before usage by +\fBzzip_dir_fdopen\fR\fBzzip_dir_open\fR\fBzzip_file_open\fR +or through +\fBzzip_open\fR +(ext==null flags uses { ".zip" , ".ZIP" } ) (io ==null flags use of posix io defaults) +.PP +\fBthe zzip_dir_alloc function\fR +is obsolete \- it was generally used for implementation and exported to let other code build on it. It is now advised to use +\fBzzip_dir_alloc_ext_io\fR +now on explicitly, just set that second argument to zero to achieve the same functionality as the old style. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<too@iki.fi> +.TP +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<too@iki.fi> + +/79 1154977710 1001 0 100644 25 ` +.so man3/zzip_dir_free.3 + +/97 1154977710 1001 0 100644 2417 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_DIR_CREAT" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_dir_creat, zzip_dir_creat_ext_io \- create a new zip archive for writing +.SH "SYNOPSIS" +.PP +\fB + #include <zziplib.h> +\fR +.HP 25 +\fBZZIP_DIR*\ \fBzzip_dir_creat\fR\fR\fB(\fR\fBzzip_char_t*\ name\fR\fB, \fR\fBint\ o_mode\fR\fB);\fR +.HP 32 +\fBZZIP_DIR*\ \fBzzip_dir_creat_ext_io\fR\fR\fB(\fR\fBzzip_char_t*\ name\fR\fB, \fR\fBint\ o_mode\fR\fB, \fR\fBzzip_strings_t*\ ext\fR\fB, \fR\fBzzip_plugin_io_t\ io\fR\fB);\fR +.SH "DESCRIPTION" +.PP +.PP +\fBThe zzip_dir_creat function\fR +will create a new zip archive. The returned parameter is a new "zzip dir" handle that should be saved to a variable so it can be used a base argument for +\fBzzip_mkdir\fR +and +\fBzzip_creat\fR +calls. The returned handle represents a zip central directory that must be saved to disk using +\fBzzip_closedir\fR. +.PP +Returns null on error and sets errno. Remember, according to posix the +\fBcreat\fR(2) call is equivalent to +.sp +.nf + open (path, O_WRONLY | O_CREAT | O_TRUNC, o_mode) +.fi +.sp +so any previous zip\-archive will be overwritten unconditionally and EEXIST errors from +\fBmkdir\fR(2) are suppressed. (fixme: delete the given subtree? like suggested by O_TRUNC? not done so far!) +.PP +.PP +If the third argument "ext" has another special meaning here, as it is used to ensure that a given zip\-file is created with the first entry of the ext\-list appended as an extension unless the file\-path already ends with a file\-extension registered in the list. Therefore {"",0} matches all files and creates them as zip\-archives under the given nonmodified name. (Some magic here? If the path ends in the path separator then make a real directory even in the presence of ext\-list?) +.PP +\fBThe zzip_dir_creat_ext_io function\fR +is not yet implemented, check for #def ZZIP_NO_CREAT Write\-support will extend +\fBzzip_closedir\fR +with semantics to finalize the zip\-archive by writing the zip\-trailer and closing the archive file. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> + +/115 1154977710 1001 0 100644 26 ` +.so man3/zzip_dir_creat.3 +zzip_dirfd.3/ 1154977710 1001 0 100644 26 ` +.so man3/zzip_dirhandle.3 +/140 1154977710 1001 0 100644 1543 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_DIR_FDOPEN" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_dir_fdopen, zzip_dir_fdopen_ext_io \- (zzip/zip.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 27 +\fBZZIP_DIR\ *\ \fBzzip_dir_fdopen\fR\fR\fB(\fR\fBint\ fd\fR\fB, \fR\fBzzip_error_t\ *\ errcode_p\fR\fB);\fR +.HP 34 +\fBZZIP_DIR\ *\ \fBzzip_dir_fdopen_ext_io\fR\fR\fB(\fR\fBint\ fd\fR\fB, \fR\fBzzip_error_t\ *\ errcode_p\fR\fB, \fR\fBzzip_strings_t*\ ext\fR\fB, \fR\fBconst\ zzip_plugin_io_t\ io\fR\fB);\fR +.SH "DESCRIPTION" +.PP +used by the +\fBzzip_dir_open\fR +and zzip_opendir(2) call. Opens the zip\-archive as specified with the fd which points to an already openend file. +\fBThe zzip_dir_fdopen function\fR +then search and parse the zip's central directory. +.PP +NOTE: refcount is zero, so an _open/_close pair will also delete this _dirhandle +.PP +\fBthe zzip_dir_fdopen_ext_io function\fR +uses explicit ext and io instead of the internal defaults, setting these to zero is equivalent to +\fBzzip_dir_fdopen\fR +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<too@iki.fi> +.TP +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<too@iki.fi> + +/159 1154977710 1001 0 100644 27 ` +.so man3/zzip_dir_fdopen.3 + +zzip_dir_free.3/1154977710 1001 0 100644 1347 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_DIR_FREE" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_dir_free, zzip_dir_close \- (zzip/zip.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 18 +\fBint\ \fBzzip_dir_free\fR\fR\fB(\fR\fBZZIP_DIR\ *\ dir\fR\fB);\fR +.HP 19 +\fBint\ \fBzzip_dir_close\fR\fR\fB(\fR\fBZZIP_DIR\ *\ dir\fR\fB);\fR +.SH "DESCRIPTION" +.PP +will free the zzip_dir handle unless there are still zzip_files attached (that may use its cache buffer). This is the inverse of +\fBzzip_dir_alloc\fR +, and both are helper functions used implicitly in other zzipcalls e.g. +\fBzzip_dir_close\fR += zzip_close +.PP +returns zero on sucess returns the refcount when files are attached. +.PP +It will also +\fBfree\fR(2) the +\fBZZIP_DIR\fR\-handle given. the counterpart for +\fBzzip_dir_open\fR +see also +\fBzzip_dir_free\fR +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<too@iki.fi> +.TP +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<too@iki.fi> + +/185 1154977710 1001 0 100644 1257 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_DIRHANDLE" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_dirhandle, zzip_dirfd \- (zzip/info.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 26 +\fBZZIP_DIR\ *\ \fBzzip_dirhandle\fR\fR\fB(\fR\fBZZIP_FILE\ *\ fp\fR\fB);\fR +.HP 15 +\fBint\ \fBzzip_dirfd\fR\fR\fB(\fR\fBZZIP_DIR*\ dir\fR\fB);\fR +.SH "DESCRIPTION" +.PP +\fBThe zzip_dirhandle function\fR +will just return fp\->dir +.PP +If a ZZIP_FILE is contained within a zip\-file that one will be a valid pointer, otherwise a NULL is returned and the ZZIP_FILE wraps a real file. +.PP +\fBThe zzip_dirfd function\fR +will just return dir\->fd +.PP +If a ZZIP_DIR does point to a zipfile then the file\-descriptor of that zipfile is returned, otherwise a NULL is returned and the ZZIP_DIR wraps a real directory DIR (if you have dirent on your system). +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> + +zzip_dir_open.3/1154977710 1001 0 100644 1709 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_DIR_OPEN" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_dir_open, zzip_dir_open_ext_io, zzip_dir_read \- (zzip/zip.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 24 +\fBZZIP_DIR*\ \fBzzip_dir_open\fR\fR\fB(\fR\fBzzip_char_t*\ filename\fR\fB, \fR\fBzzip_error_t*\ e\fR\fB);\fR +.HP 31 +\fBZZIP_DIR*\ \fBzzip_dir_open_ext_io\fR\fR\fB(\fR\fBzzip_char_t*\ filename\fR\fB, \fR\fBzzip_error_t*\ e\fR\fB, \fR\fBzzip_strings_t*\ ext\fR\fB, \fR\fBzzip_plugin_io_t\ io\fR\fB);\fR +.HP 18 +\fBint\ \fBzzip_dir_read\fR\fR\fB(\fR\fBZZIP_DIR\ *\ dir\fR\fB, \fR\fBZZIP_DIRENT\ *\ d\fR\fB);\fR +.SH "DESCRIPTION" +.PP +Opens the zip\-archive (if available). the two ext_io arguments will default to use posix io and a set of default fileext that can atleast add .zip ext itself. +.PP +\fBthe zzip_dir_open_ext_io function\fR +uses explicit ext and io instead of the internal defaults. Setting these to zero is equivalent to +\fBzzip_dir_open\fR +.PP +fills the dirent\-argument with the values and increments the read\-pointer of the dir\-argument. +.PP +returns 0 if there no entry (anymore). +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<too@iki.fi> +.TP +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<too@iki.fi> +.TP +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<too@iki.fi> + +/203 1154977710 1001 0 100644 25 ` +.so man3/zzip_dir_open.3 + +zzip_dir_read.3/1154977710 1001 0 100644 25 ` +.so man3/zzip_dir_open.3 + +zzip_dir_real.3/1154977710 1001 0 100644 26 ` +.so man3/zzip_file_real.3 +zzip_dir_stat.3/1154977710 1001 0 100644 2029 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_DIR_STAT" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_dir_stat, zzip_file_stat, zzip_fstat \- (zzip/stat.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 18 +\fBint\ \fBzzip_dir_stat\fR\fR\fB(\fR\fBZZIP_DIR\ *\ dir\fR\fB, \fR\fBzzip_char_t*\ name\fR\fB, \fR\fBZZIP_STAT\ *\ zs\fR\fB, \fR\fBint\ flags\fR\fB);\fR +.HP 19 +\fBint\ \fBzzip_file_stat\fR\fR\fB(\fR\fBZZIP_FILE*\ file\fR\fB, \fR\fBZZIP_STAT*\ zs\fR\fB);\fR +.HP 15 +\fBint\ \fBzzip_fstat\fR\fR\fB(\fR\fBZZIP_FILE*\ file\fR\fB, \fR\fBZZIP_STAT*\ zs\fR\fB);\fR +.SH "DESCRIPTION" +.PP +obtain information about a filename in an opened zip\-archive without opening that file first. Mostly used to obtain the uncompressed size of a file inside a zip\-archive. see +\fBzzip_dir_open\fR. +.PP +\fBThe zzip_file_stat function\fR +will obtain information about a opened file _within_ a zip\-archive. The file is supposed to be open (otherwise \-1 is returned). The st_size stat\-member contains the uncompressed size. The optional d_name is never set here. +.PP +\fBThe zzip_fstat function\fR +will obtain information about a opened file which may be either real/zipped. The file is supposed to be open (otherwise \-1 is returned). The st_size stat\-member contains the uncompressed size. The optional d_name is never set here. For a real file, we do set the d_csize := st_size and d_compr := 0 for meaningful defaults. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<Tomi.Ollila@iki.fi> +.TP +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<Tomi.Ollila@iki.fi> +.TP +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<Tomi.Ollila@iki.fi> + +/227 1154977710 1001 0 100644 26 ` +.so man3/zzip_disk_mmap.3 +/246 1154977710 1001 0 100644 27 ` +.so man3/zzip_disk_fopen.3 + +/271 1154977710 1001 0 100644 35 ` +.so man3/zzip_disk_entry_to_data.3 + +/305 1154977710 1001 0 100644 35 ` +.so man3/zzip_disk_entry_to_data.3 + +/336 1154977710 1001 0 100644 2418 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_DISK_ENTRY_TO_D" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_disk_entry_to_data, zzip_disk_entry_to_file_header, zzip_disk_entry_strdup_name, zzip_disk_entry_strdup_comment \- helper functions for (mmapped) zip access api +.SH "SYNOPSIS" +.PP +\fB + #include <zziplib.h> +\fR +.HP 37 +\fBzzip_byte_t*\ \fBzzip_disk_entry_to_data\fR\fR\fB(\fR\fBZZIP_DISK*\ disk\fR\fB, \fR\fBstruct\ zzip_disk_entry*\ entry\fR\fB);\fR +.HP 56 +\fBstruct\ zzip_file_header*\ \fBzzip_disk_entry_to_file_header\fR\fR\fB(\fR\fBZZIP_DISK*\ disk\fR\fB, \fR\fBstruct\ zzip_disk_entry*\ entry\fR\fB);\fR +.HP 46 +\fBzzip__new__\ char*\ \fBzzip_disk_entry_strdup_name\fR\fR\fB(\fR\fBZZIP_DISK*\ disk\fR\fB, \fR\fBstruct\ zzip_disk_entry*\ entry\fR\fB);\fR +.HP 49 +\fBzzip__new__\ char*\ \fBzzip_disk_entry_strdup_comment\fR\fR\fB(\fR\fBZZIP_DISK*\ disk\fR\fB, \fR\fBstruct\ zzip_disk_entry*\ entry\fR\fB);\fR +.SH "DESCRIPTION" +.PP +.PP +\fBThe zzip_disk_entry_to_data function\fR +augments the other zzip_disk_entry_* helpers: here we move a disk_entry pointer (as returned by _find* functions) into a pointer to the data block right after the file_header. Only disk\->buffer would be needed to perform the seek but we check the mmapped range end as well. +.PP +\fBThe zzip_disk_entry_to_file_header function\fR +does half the job of +\fBzzip_disk_entry_to_data\fR +where it can augment with +\fBzzip_file_header_to_data\fR +helper from format/fetch.h +.PP +\fBThe zzip_disk_entry_strdup_name function\fR +is a big helper despite its little name: in a zip file the encoded filenames are usually NOT zero\-terminated but for common usage with libc we need it that way. Secondly, the filename SHOULD be present in the zip central directory but if not then we fallback to the filename given in the file_header of each compressed data portion. +.PP +\fBThe zzip_disk_entry_strdup_comment function\fR +is similar creating a reference to a zero terminated string but it can only exist in the zip central directory entry. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +/363 1154977710 1001 0 100644 35 ` +.so man3/zzip_disk_entry_to_data.3 + +/397 1154977710 1001 0 100644 27 ` +.so man3/zzip_disk_fopen.3 + +/417 1154977710 1001 0 100644 27 ` +.so man3/zzip_disk_fopen.3 + +/435 1154977710 1001 0 100644 4351 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_DISK_FINDFILE" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_disk_findfile, zzip_disk_findfirst, zzip_disk_findnext, zzip_disk_findmatch \- search for files in the (mmapped) zip central directory +.SH "SYNOPSIS" +.PP +\fB + #include <zziplib.h> +\fR +.HP 43 +\fBstruct\ zzip_disk_entry*\ \fBzzip_disk_findfile\fR\fR\fB(\fR\fBZZIP_DISK*\ disk\fR\fB, \fR\fBchar*\ filename\fR\fB, \fR\fBstruct\ zzip_disk_entry*\ after\fR\fB, \fR\fBzzip_strcmp_fn_t\ compare\fR\fB);\fR +.HP 44 +\fBstruct\ zzip_disk_entry*\ \fBzzip_disk_findfirst\fR\fR\fB(\fR\fBZZIP_DISK*\ disk\fR\fB);\fR +.HP 43 +\fBstruct\ zzip_disk_entry*\ \fBzzip_disk_findnext\fR\fR\fB(\fR\fBZZIP_DISK*\ disk\fR\fB, \fR\fBstruct\ zzip_disk_entry*\ entry\fR\fB);\fR +.HP 44 +\fBstruct\ zzip_disk_entry*\ \fBzzip_disk_findmatch\fR\fR\fB(\fR\fBZZIP_DISK*\ disk\fR\fB, \fR\fBchar*\ filespec\fR\fB, \fR\fBstruct\ zzip_disk_entry*\ after\fR\fB, \fR\fBzzip_fnmatch_fn_t\ compare\fR\fB, \fR\fBint\ flags\fR\fB);\fR +.SH "DESCRIPTION" +.PP +.PP +\fBThe zzip_disk_findfile function\fR +is given a filename as an additional argument, to find the disk_entry matching a given filename. The compare\-function is usually strcmp or strcasecmp or perhaps strcoll, if null then strcmp is used. \- use null as argument for "after"\-entry when searching the first matching entry, otherwise the last returned value if you look for other entries with a special "compare" function (if null then a doubled search is rather useless with this variant of _findfile). +.PP +.PP +\fBThe zzip_disk_findfirst function\fR +is the first call of all the zip access functions here. It contains the code to find the first entry of the zip central directory. Here we require the mmapped block to represent a real zip file where the disk_trailer is _last_ in the file area, so that its position would be at a fixed offset from the end of the file area if not for the comment field allowed to be of variable length (which needs us to do a little search for the disk_tailer). However, in this simple implementation we disregard any disk_trailer info telling about multidisk archives, so we just return a pointer to the zip central directory. +.PP +For an actual means, we are going to search backwards from the end of the mmaped block looking for the PK\-magic signature of a disk_trailer. If we see one then we check the rootseek value to find the first disk_entry of the root central directory. If we find the correct PK\-magic signature of a disk_entry over there then we assume we are done and we are going to return a pointer to that label. +.PP +The return value is a pointer to the first zzip_disk_entry being checked to be within the bounds of the file area specified by the arguments. If no disk_trailer was found then null is returned, and likewise we only accept a disk_trailer with a seekvalue that points to a disk_entry and both parts have valid PK\-magic parts. Beyond some sanity check we try to catch a common brokeness with zip archives that still allows us to find the start of the zip central directory. +.PP +.PP +\fBThe zzip_disk_findnext function\fR +takes an existing disk_entry in the central root directory (e.g. from zzip_disk_findfirst) and returns the next entry within in the given bounds of the mmapped file area. +.PP +.PP +\fBThe zzip_disk_findmatch function\fR +uses a compare\-function with an additional argument and it is called just like fnmatch(3) from POSIX.2 AD:1993), i.e. the argument filespec first and the ziplocal filename second with the integer\-flags put in as third to the indirect call. If the platform has fnmatch available then null\-compare will use that one and otherwise we fall back to mere strcmp, so if you need fnmatch searching then please provide an implementation somewhere else. \- use null as argument for "after"\-entry when searching the first matching entry, or the last disk_entry return\-value to find the next entry matching the given filespec. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> + +/457 1154977710 1001 0 100644 30 ` +.so man3/zzip_disk_findfile.3 +/480 1154977710 1001 0 100644 30 ` +.so man3/zzip_disk_findfile.3 +/503 1154977710 1001 0 100644 30 ` +.so man3/zzip_disk_findfile.3 +/525 1154977710 1001 0 100644 2763 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_DISK_FOPEN" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_disk_fopen, zzip_disk_entry_fopen, zzip_disk_fread, zzip_disk_fclose, zzip_disk_feof \- openening a file part wrapped within a (mmapped) zip archive +.SH "SYNOPSIS" +.PP +\fB + #include <zziplib.h> +\fR +.HP 44 +\fBzzip__new__\ ZZIP_DISK_FILE*\ \fBzzip_disk_fopen\fR\fR\fB(\fR\fBZZIP_DISK*\ disk\fR\fB, \fR\fBchar*\ filename\fR\fB);\fR +.HP 50 +\fBzzip__new__\ ZZIP_DISK_FILE*\ \fBzzip_disk_entry_fopen\fR\fR\fB(\fR\fBZZIP_DISK*\ disk\fR\fB, \fR\fBZZIP_DISK_ENTRY*\ entry\fR\fB);\fR +.HP 28 +\fBzzip_size_t\ \fBzzip_disk_fread\fR\fR\fB(\fR\fBvoid*\ ptr\fR\fB, \fR\fBzzip_size_t\ sized\fR\fB, \fR\fBzzip_size_t\ nmemb\fR\fB, \fR\fBZZIP_DISK_FILE*\ file\fR\fB);\fR +.HP 21 +\fBint\ \fBzzip_disk_fclose\fR\fR\fB(\fR\fBZZIP_DISK_FILE*\ file\fR\fB);\fR +.HP 19 +\fBint\ \fBzzip_disk_feof\fR\fR\fB(\fR\fBZZIP_DISK_FILE*\ file\fR\fB);\fR +.SH "DESCRIPTION" +.PP +.PP +\fBThe zzip_disk_fopen function\fR +opens a file found by name, so it does a search into the zip central directory with +\fBzzip_disk_findfile\fR +and whatever is found first is given to +\fBzzip_disk_entry_fopen\fR +.PP +.PP +the ZZIP_DISK_FILE* is rather simple in just encapsulating the arguments given to +\fBthe zzip_disk_entry_fopen function\fR +plus a zlib deflate buffer. Note that the ZZIP_DISK pointer does already contain the full mmapped file area of a zip disk, so open()ing a file part within that area happens to be a lookup of its bounds and encoding. That information is memorized on the ZZIP_DISK_FILE so that subsequent _read() operations will be able to get the next data portion or return an eof condition for that file part wrapped in the zip archive. +.PP +.PP +\fBThe zzip_disk_fread function\fR +reads more bytes into the output buffer specified as arguments. The return value is null on eof or error, the stdio\-like interface can not distinguish between these so you need to check with +\fBzzip_disk_feof\fR +for the difference. +.PP +\fBThe zzip_disk_fclose function\fR +releases any zlib decoder info needed for decompression and dumps the ZZIP_DISK_FILE* then. +.PP +.PP +\fBThe zzip_disk_feof function\fR +allows to distinguish an error from an eof condition. Actually, if we found an error but we did already reach eof then we just keep on saying that it was an eof, so the app can just continue. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> + +/544 1154977710 1001 0 100644 27 ` +.so man3/zzip_disk_fopen.3 + +/563 1154977710 1001 0 100644 26 ` +.so man3/zzip_disk_mmap.3 +/581 1154977710 1001 0 100644 2532 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_DISK_MMAP" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_disk_mmap, zzip_disk_init, zzip_disk_new, zzip_disk_munmap, zzip_disk_open, zzip_disk_close \- turn a filehandle into a mmapped zip disk archive handle +.SH "SYNOPSIS" +.PP +\fB + #include <zziplib.h> +\fR +.HP 38 +\fBzzip__new__\ ZZIP_DISK*\ \fBzzip_disk_mmap\fR\fR\fB(\fR\fBint\ fd\fR\fB);\fR +.HP 19 +\fBint\ \fBzzip_disk_init\fR\fR\fB(\fR\fBZZIP_DISK*\ disk\fR\fB, \fR\fBvoid*\ buffer\fR\fB, \fR\fBzzip_size_t\ buflen\fR\fB);\fR +.HP 37 +\fBzzip__new__\ ZZIP_DISK*\ \fBzzip_disk_new\fR\fR\fB(\fR\fBvoid\fR\fB);\fR +.HP 21 +\fBint\ \fBzzip_disk_munmap\fR\fR\fB(\fR\fBZZIP_DISK*\ disk\fR\fB);\fR +.HP 38 +\fBZZIP_DISK*\ zzip__new__\ \fBzzip_disk_open\fR\fR\fB(\fR\fBchar*\ filename\fR\fB);\fR +.HP 20 +\fBint\ \fBzzip_disk_close\fR\fR\fB(\fR\fBZZIP_DISK*\ disk\fR\fB);\fR +.SH "DESCRIPTION" +.PP +.PP +\fBThe zzip_disk_mmap function\fR +uses the given file\-descriptor to detect the length of the file and calls the system +\fBmmap\fR(2) to put it in main memory. If it is successful then a newly allocated ZZIP_DISK* is returned with disk\->buffer pointing to the mapview of the zipdisk content. +.PP +\fBThe zzip_disk_init function\fR +does primary initialization of a disk\-buffer struct. +.PP +\fBThe zzip_disk_new function\fR +allocates a new disk\-buffer with +\fBmalloc\fR(3) +.PP +\fBThe zzip_disk_munmap function\fR +is the inverse of +\fBzzip_disk_mmap\fR +and using the system munmap(2) on the buffer area and +\fBfree\fR(3) on the ZZIP_DISK structure. +.PP +.PP +\fBThe zzip_disk_open function\fR +opens the given archive by name and turn the filehandle to +\fBzzip_disk_mmap\fR +for bringing it to main memory. If it can not be +\fBmmap\fR(2)'ed then we slurp the whole file into a newly +\fBmalloc\fR(2)'ed memory block. Only if that fails too then we return null. Since handling of disk\->buffer is ambigous it should not be snatched away please. +.PP +.PP +\fBThe zzip_disk_close function\fR +will release all data needed to access a (mmapped) zip archive, including any malloc()ed blocks, sharedmem mappings and it dumps the handle struct as well. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +/599 1154977710 1001 0 100644 26 ` +.so man3/zzip_disk_mmap.3 +zzip_disk_new.3/1154977710 1001 0 100644 26 ` +.so man3/zzip_disk_mmap.3 +/619 1154977710 1001 0 100644 26 ` +.so man3/zzip_disk_mmap.3 +/637 1154977710 1001 0 100644 2171 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_ENTRY_DATA_OFFS" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_entry_data_offset, zzip_entry_fread_file_header, zzip_entry_strdup_name \- helper functions for (fseeko) zip access api +.SH "SYNOPSIS" +.PP +\fB + #include <zziplib.h> +\fR +.HP 34 +\fBzzip_off_t\ \fBzzip_entry_data_offset\fR\fR\fB(\fR\fBZZIP_ENTRY*\ entry\fR\fB);\fR +.HP 47 +\fBstatic\ zzip_off_t\ \fBzzip_entry_fread_file_header\fR\fR\fB(\fR\fBZZIP_ENTRY*\ entry\fR\fB, \fR\fBstruct\ zzip_file_header*\ file_header\fR\fB);\fR +.HP 41 +\fBzzip__new__\ char*\ \fBzzip_entry_strdup_name\fR\fR\fB(\fR\fBZZIP_ENTRY*\ entry\fR\fB);\fR +.SH "DESCRIPTION" +.PP +.PP +\fBThe zzip_entry_data_offset function\fRs returns the seekval offset of the data portion of the file referenced by the given zzip_entry. It requires an intermediate check of the file_header structure (i.e. it reads it from disk). After this call, the contained diskfile readposition is already set to the data_offset returned here. On error \-1 is returned. +.PP +\fBThe zzip_entry_fread_file_header function\fRs read the correspoding struct zzip_file_header from the zip disk of the given "entry". The returned off_t points to the end of the file_header where the current fseek pointer has stopped. This is used to immediatly parse out any filename/extras block following the file_header. The return value is null on error. +.PP +\fBThe zzip_entry_strdup_name function\fR +is a big helper despite its little name: in a zip file the encoded filenames are usually NOT zero\-terminated but for common usage with libc we need it that way. Secondly, the filename SHOULD be present in the zip central directory but if not then we fallback to the filename given in the file_header of each compressed data portion. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> + +/663 1154977710 1001 0 100644 28 ` +.so man3/zzip_entry_fopen.3 +/684 1154977710 1001 0 100644 28 ` +.so man3/zzip_entry_fopen.3 +/703 1154977710 1001 0 100644 28 ` +.so man3/zzip_entry_fopen.3 +/723 1154977710 1001 0 100644 5123 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_ENTRY_FINDFILE" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_entry_findfile, zzip_entry_findfirst, zzip_entry_findnext, zzip_entry_free, zzip_entry_findmatch \- search for files in the (fseeko) zip central directory +.SH "SYNOPSIS" +.PP +\fB + #include <zziplib.h> +\fR +.HP 44 +\fBzzip__new__\ ZZIP_ENTRY*\ \fBzzip_entry_findfile\fR\fR\fB(\fR\fBFILE*\ disk\fR\fB, \fR\fBchar*\ filename\fR\fB, \fR\fBZZIP_ENTRY*\ _zzip_restrict\ entry\fR\fB, \fR\fBzzip_strcmp_fn_t\ compare\fR\fB);\fR +.HP 45 +\fBzzip__new__\ ZZIP_ENTRY*\ \fBzzip_entry_findfirst\fR\fR\fB(\fR\fBFILE*\ disk\fR\fB);\fR +.HP 44 +\fBzzip__new__\ ZZIP_ENTRY*\ \fBzzip_entry_findnext\fR\fR\fB(\fR\fBZZIP_ENTRY*\ _zzip_restrict\ entry\fR\fB);\fR +.HP 20 +\fBint\ \fBzzip_entry_free\fR\fR\fB(\fR\fBZZIP_ENTRY*\ entry\fR\fB);\fR +.HP 45 +\fBzzip__new__\ ZZIP_ENTRY*\ \fBzzip_entry_findmatch\fR\fR\fB(\fR\fBFILE*\ disk\fR\fB, \fR\fBchar*\ filespec\fR\fB, \fR\fBZZIP_ENTRY*\ _zzip_restrict\ entry\fR\fB, \fR\fBzzip_fnmatch_fn_t\ compare\fR\fB, \fR\fBint\ flags\fR\fB);\fR +.SH "DESCRIPTION" +.PP +.PP +\fBThe zzip_entry_findfile function\fR +is given a filename as an additional argument, to find the disk_entry matching a given filename. The compare\-function is usually strcmp or strcasecmp or perhaps strcoll, if null then strcmp is used. \- use null as argument for "old"\-entry when searching the first matching entry, otherwise the last returned value if you look for other entries with a special "compare" function (if null then a doubled search is rather useless with this variant of _findfile). If no further entry is found then null is returned and any "old"\-entry gets already free()d. +.PP +.PP +\fBThe zzip_entry_findfirst function\fR +is the first call of all the zip access functions here. It contains the code to find the first entry of the zip central directory. Here we require the stdio handle to represent a real zip file where the disk_trailer is _last_ in the file area, so that its position would be at a fixed offset from the end of the file area if not for the comment field allowed to be of variable length (which needs us to do a little search for the disk_tailer). However, in this simple implementation we disregard any disk_trailer info telling about multidisk archives, so we just return a pointer to the first entry in the zip central directory of that file. +.PP +For an actual means, we are going to search backwards from the end of the mmaped block looking for the PK\-magic signature of a disk_trailer. If we see one then we check the rootseek value to find the first disk_entry of the root central directory. If we find the correct PK\-magic signature of a disk_entry over there then we assume we are done and we are going to return a pointer to that label. +.PP +The return value is a pointer to the first zzip_disk_entry being checked to be within the bounds of the file area specified by the arguments. If no disk_trailer was found then null is returned, and likewise we only accept a disk_trailer with a seekvalue that points to a disk_entry and both parts have valid PK\-magic parts. Beyond some sanity check we try to catch a common brokeness with zip archives that still allows us to find the start of the zip central directory. +.PP +.PP +\fBThe zzip_entry_findnext function\fR +takes an existing "entry" in the central root directory (e.g. from zzip_entry_findfirst) and moves it to point to the next entry. On error it returns 0, otherwise the old entry. If no further match is found then null is returned and the entry already free()d. If you want to stop searching for matches before that case then please call +\fBzzip_entry_free\fR +on the cursor struct ZZIP_ENTRY. +.PP +\fBthe zzip_entry_free function\fR +releases the malloc()ed areas needed for zzip_entry, the pointer is invalid afterwards. +\fBThe zzip_entry_free function\fR +has #define synonyms of zzip_entry_findlast(), zzip_entry_findlastfile(), zzip_entry_findlastmatch() +.PP +.PP +\fBThe zzip_entry_findmatch function\fR +uses a compare\-function with an additional argument and it is called just like fnmatch(3) from POSIX.2 AD:1993), i.e. the argument filespec first and the ziplocal filename second with the integer\-flags put in as third to the indirect call. If the platform has fnmatch available then null\-compare will use that one and otherwise we fall back to mere strcmp, so if you need fnmatch searching then please provide an implementation somewhere else. \- use null as argument for "after"\-entry when searching the first matching entry, or the last disk_entry return\-value to find the next entry matching the given filespec. If no further entry is found then null is returned and any "old"\-entry gets already free()d. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> + +/746 1154977710 1001 0 100644 31 ` +.so man3/zzip_entry_findfile.3 + +/770 1154977710 1001 0 100644 31 ` +.so man3/zzip_entry_findfile.3 + +/794 1154977710 1001 0 100644 31 ` +.so man3/zzip_entry_findfile.3 + +/817 1154977710 1001 0 100644 2825 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_ENTRY_FOPEN" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_entry_fopen, zzip_entry_ffile, zzip_entry_fread, zzip_entry_fclose, zzip_entry_feof \- open a file within a zip disk for reading +.SH "SYNOPSIS" +.PP +\fB + #include <zziplib.h> +\fR +.HP 46 +\fBzzip__new__\ ZZIP_ENTRY_FILE*\ \fBzzip_entry_fopen\fR\fR\fB(\fR\fBZZIP_ENTRY*\ entry\fR\fB, \fR\fBint\ takeover\fR\fB);\fR +.HP 46 +\fBzzip__new__\ ZZIP_ENTRY_FILE*\ \fBzzip_entry_ffile\fR\fR\fB(\fR\fBFILE*\ disk\fR\fB, \fR\fBchar*\ filename\fR\fB);\fR +.HP 29 +\fBzzip_size_t\ \fBzzip_entry_fread\fR\fR\fB(\fR\fBvoid*\ ptr\fR\fB, \fR\fBzzip_size_t\ sized\fR\fB, \fR\fBzzip_size_t\ nmemb\fR\fB, \fR\fBZZIP_ENTRY_FILE*\ file\fR\fB);\fR +.HP 22 +\fBint\ \fBzzip_entry_fclose\fR\fR\fB(\fR\fBZZIP_ENTRY_FILE*\ file\fR\fB);\fR +.HP 20 +\fBint\ \fBzzip_entry_feof\fR\fR\fB(\fR\fBZZIP_ENTRY_FILE*\ file\fR\fB);\fR +.SH "DESCRIPTION" +.PP +.PP +\fBThe zzip_entry_fopen function\fR +does take an "entry" argument and copies it (or just takes it over as owner) to a new ZZIP_ENTRY_FILE handle structure. That structure contains also a zlib buffer for decoding. +\fBThe zzip_entry_fopen function\fR +does seek to the file_header of the given "entry" and validates it for the data buffer following it. We do also prefetch some data from the data buffer thereby trying to match the disk pagesize for faster access later. The +\fBzzip_entry_fread\fR +will then read in chunks of pagesizes which is the size of the internal readahead buffer. If an error occurs then null is returned. +.PP +.PP +\fBThe zzip_entry_ffile function\fR +opens a file found by name, so it does a search into the zip central directory with +\fBzzip_entry_findfile\fR +and whatever is found first is given to +\fBzzip_entry_fopen\fR +.PP +.PP +\fBThe zzip_entry_fread function\fR +reads more bytes into the output buffer specified as arguments. The return value is null on eof or error, the stdio\-like interface can not distinguish between these so you need to check with +\fBzzip_entry_feof\fR +for the difference. +.PP +\fBThe zzip_entry_fclose function\fR +releases any zlib decoder info needed for decompression and dumps the ZZIP_ENTRY_FILE struct then. +.PP +.PP +\fBThe zzip_entry_feof function\fR +allows to distinguish an error from an eof condition. Actually, if we found an error but we did already reach eof then we just keep on saying that it was an eof, so the app can just continue. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> + +/837 1154977710 1001 0 100644 28 ` +.so man3/zzip_entry_fopen.3 +/857 1154977710 1001 0 100644 34 ` +.so man3/zzip_entry_data_offset.3 +/889 1154977710 1001 0 100644 31 ` +.so man3/zzip_entry_findfile.3 + +/908 1154977710 1001 0 100644 34 ` +.so man3/zzip_entry_data_offset.3 +zzip_errno.3/ 1154977710 1001 0 100644 988 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_ERRNO" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_errno \- (zzip/err.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 15 +\fBint\ \fBzzip_errno\fR\fR\fB(\fR\fBint\ errcode\fR\fB);\fR +.SH "DESCRIPTION" +.PP +map the error code to a system error code. This is used for the drop\-in replacement functions to return a value that can be interpreted correctly by code sections that are unaware of the fact they their +\fBopen\fR(2) call had been diverted to a file inside a zip\-archive. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<Tomi.Ollila@iki.fi> +zzip_error.3/ 1154977710 1001 0 100644 1001 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_ERROR" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_error, zzip_seterror \- (zzip/info.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 15 +\fBint\ \fBzzip_error\fR\fR\fB(\fR\fBZZIP_DIR\ *\ dir\fR\fB);\fR +.HP 19 +\fBvoid\ \fBzzip_seterror\fR\fR\fB(\fR\fBZZIP_DIR\ *\ dir\fR\fB, \fR\fBint\ errcode\fR\fB);\fR +.SH "DESCRIPTION" +.PP +just returns dir\->errcode of the ZZIP_DIR handle see: +\fBzzip_dir_open\fR, +\fBzzip_diropen\fR, +\fBzzip_readdir\fR, +\fBzzip_dir_read\fR +.PP +\fBThe zzip_seterror function\fR +just does dir\->errcode = errcode +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> + +zzip_fclose.3/ 1154977710 1001 0 100644 1094 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_FCLOSE" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_fclose, zzip_close \- (zzip/file.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 16 +\fBint\ \fBzzip_fclose\fR\fR\fB(\fR\fBZZIP_FILE\ *\ fp\fR\fB);\fR +.HP 15 +\fBint\ \fBzzip_close\fR\fR\fB(\fR\fBZZIP_FILE*\ fp\fR\fB);\fR +.SH "DESCRIPTION" +.PP +\fBThe zzip_fclose function\fR +closes the given ZZIP_FILE handle. +.PP +If the ZZIP_FILE wraps a normal stat'fd then it is just that int'fd that is being closed and the otherwise empty ZZIP_FILE gets freed. +.PP +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<Tomi.Ollila@iki.fi> +.TP +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<Tomi.Ollila@iki.fi> +/934 1154977710 1001 0 100644 1053 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "__ZZIP_FETCH_DISK_TR" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +__zzip_fetch_disk_trailer \- (zzip/zip.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 30 +\fBint\ \fB__zzip_fetch_disk_trailer\fR\fR\fB(\fR\fBint\ fd\fR\fB, \fR\fBzzip_off_t\ filesize\fR\fB, \fR\fBstruct\ _disk_trailer\ *\ _zzip_restrict\ trailer\fR\fB, \fR\fBzzip_plugin_io_t\ io\fR\fB);\fR +.SH "DESCRIPTION" +.PP +\fBThe __zzip_fetch_disk_trailer function\fR +is used by +\fBzzip_file_open\fR. It tries to find the zip's central directory info that is usually a few bytes off the end of the file. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<too@iki.fi> + +/963 1154977710 1001 0 100644 1031 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_FILE_CLOSE" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_file_close \- (zzip/file.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 20 +\fBint\ \fBzzip_file_close\fR\fR\fB(\fR\fBZZIP_FILE\ *\ fp\fR\fB);\fR +.SH "DESCRIPTION" +.PP +the direct function of +\fBzzip_close\fR(fp). it will cleanup the inflate\-portion of +\fBzlib\fR +and free the structure given. +.PP +it is called quite from the error\-cleanup parts of the various +\fB_open\fR +functions. +.PP +the .refcount is decreased and if zero the fp\->dir is closed just as well. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<Tomi.Ollila@iki.fi> + +/982 1154977710 1001 0 100644 3089 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_FILE_CREAT" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_file_creat, zzip_file_mkdir \- start next file entry in a zip archive +.SH "SYNOPSIS" +.PP +\fB + #include <zziplib.h> +\fR +.HP 27 +\fBZZIP_FILE*\ \fBzzip_file_creat\fR\fR\fB(\fR\fBZZIP_DIR*\ dir\fR\fB, \fR\fBzzip_char_t*\ name\fR\fB, \fR\fBint\ o_mode\fR\fB);\fR +.HP 20 +\fBint\ \fBzzip_file_mkdir\fR\fR\fB(\fR\fBZZIP_DIR*\ dir\fR\fB, \fR\fBzzip_char_t*\ name\fR\fB, \fR\fBint\ o_mode\fR\fB);\fR +.SH "DESCRIPTION" +.PP +.PP +\fBThe zzip_file_creat function\fR +will create a new file within a zzip archive, the one given as the primary argument and additionally to the posix creat(2) \- just like zzip_mkdir has an additional argument over the posix mkdir(2) spec. For +\fBthe zzip_file_creat function\fR +the primary parameter can be null as well thereby creating a real file instead of a new one inside the zip\-archive otherwise given. If the primary parameter is not null but wraps a real directory then all new files are also real. +.PP +\fBThe zzip_file_creat function\fR +is not yet implemented, check for #def ZZIP_NO_CREAT +.PP +Returns NULL on an error setting errno, and opening a file _within_ a zip archive using O_RDONLY (and similar stuff) will surely lead to an error. +.PP +.PP +\fBThe zzip_file_mkdir function\fR +has an additional primary argument over the posix mkdir(2) \- if it is null then +\fBthe zzip_file_mkdir function\fR +behaves just like posix mkdir(2). The zzip_dir argument can be set to the result of a +\fBzzip_createdir\fR +which allows for some magic that the given directory name is created as an entry in the zip archive. +.PP +If the given dir name argument is not within the basepath of the zip central directory then a real directory is created. Any EEXIST errors are not suppressed unlike with +\fBzzip_createdir\fR +.PP +Standard usage accepts a global/threaded/modular ZZIP_DIR pointer for all zip archive operations like in: +.sp +.nf + ZZIP_DIR* zip = zzip_createdir (sysconfpath, 0755, zip); + zzip_file_mkdir (zip, filepath[i], 0755); + ZZIP_FILE* file = zzip_file_creat (zip, filename[i], 0644); + zzip_write (file, buf, len); + zzip_close (file); file = 0; + zzip_closedir (zip); zip = 0; +.fi +.sp +.PP +compare with +\fBzzip_mkdir\fR +inline macro which allows to collapse the examples script to +.sp +.nf + #define zzip_savefile myproject_saveconfig + #include <zzip/zzip.h> + ZZIP_DIR* zzip_savefile = zzip_createdir (sysconfpath, 0755); + zzip_mkdir (filepath[i], 0755); + ZZIP_FILE* file = zzip_creat(filepath[i], 0644); + zzip_write (file, buf, len); + zzip_close (file); file = 0; + zzip_closedir (zip_savefile); +.fi +.sp +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> + +/1001 1154977710 1001 0 100644 27 ` +.so man3/zzip_file_creat.3 + +/1020 1154977710 1001 0 100644 1105 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_FILE_OPEN" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_file_open \- (zzip/file.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 27 +\fBZZIP_FILE\ *\ \fBzzip_file_open\fR\fR\fB(\fR\fBZZIP_DIR\ *\ dir\fR\fB, \fR\fBzzip_char_t*\ name\fR\fB, \fR\fBint\ o_mode\fR\fB);\fR +.SH "DESCRIPTION" +.PP +open an +\fBZZIP_FILE\fR +from an already open +\fBZZIP_DIR\fR +handle. Since we have a chance to reuse a cached +\fBbuf32k\fR +and +\fBZZIP_FILE\fR +memchunk this is the best choice to unpack multiple files. +.PP +Note: the zlib supports 2..15 bit windowsize, hence we provide a 32k memchunk here... just to be safe. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<Tomi.Ollila@iki.fi> + +/1038 1154977710 1001 0 100644 1400 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_FILE_READ" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_file_read \- (zzip/file.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 28 +\fBzzip_ssize_t\ \fBzzip_file_read\fR\fR\fB(\fR\fBZZIP_FILE\ *\ fp\fR\fB, \fR\fBchar\ *\ buf\fR\fB, \fR\fBzzip_size_t\ len\fR\fB);\fR +.SH "DESCRIPTION" +.PP +\fBThe zzip_file_read function\fRs read data from zip\-contained file. +.PP +It works like +\fBread\fR(2) and will fill the given buffer with bytes from the opened file. It will return the number of bytes read, so if the +\fBEOF\fR +is encountered you will be prompted with the number of bytes actually read. +.PP +This is the routines that needs the +\fBbuf32k\fR +buffer, and it would have need for much more polishing but it does already work quite well. +.PP +Note: the 32K buffer is rather big. The original inflate\-algorithm required just that but the latest zlib would work just fine with a smaller buffer. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<Tomi.Ollila@iki.fi> +/1056 1154977710 1001 0 100644 1662 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_FILE_REAL" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_file_real, zzip_dir_real, zzip_realdir, zzip_realfd \- (zzip/info.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 19 +\fBint\ \fBzzip_file_real\fR\fR\fB(\fR\fBZZIP_FILE*\ fp\fR\fB);\fR +.HP 18 +\fBint\ \fBzzip_dir_real\fR\fR\fB(\fR\fBZZIP_DIR*\ dir\fR\fB);\fR +.HP 19 +\fBvoid*\ \fBzzip_realdir\fR\fR\fB(\fR\fBZZIP_DIR*\ dir\fR\fB);\fR +.HP 16 +\fBint\ \fBzzip_realfd\fR\fR\fB(\fR\fBZZIP_FILE*\ fp\fR\fB);\fR +.SH "DESCRIPTION" +.PP +\fBThe zzip_file_real function\fR +checks if the ZZIP_FILE\-handle is wrapping a real file or a zip\-contained file. Returns 1 for a stat'able file, and 0 for a file inside a zip\-archive. +.PP +\fBThe zzip_dir_real function\fR +checks if the ZZIP_DIR\-handle is wrapping a real directory or a zip\-archive. Returns 1 for a stat'able directory, and 0 for a handle to zip\-archive. +.PP +\fBThe zzip_realdir function\fR +returns the posix DIR* handle (if one exists). Check before with +\fBzzip_dir_real\fR +if the the ZZIP_DIR points to a real directory. +.PP +\fBThe zzip_realfd function\fR +returns the posix file descriptor (if one exists). Check before with +\fBzzip_file_real\fR +if the the ZZIP_FILE points to a real file. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +/1074 1154977710 1001 0 100644 25 ` +.so man3/zzip_dir_stat.3 + +/1092 1154977710 1001 0 100644 22 ` +.so man3/zzip_write.3 +zzip_fopen.3/ 1154977710 1001 0 100644 4212 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_FOPEN" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_fopen, zzip_freopen \- (zzip/file.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 22 +\fBZZIP_FILE*\ \fBzzip_fopen\fR\fR\fB(\fR\fBzzip_char_t*\ filename\fR\fB, \fR\fBzzip_char_t*\ mode\fR\fB);\fR +.HP 24 +\fBZZIP_FILE*\ \fBzzip_freopen\fR\fR\fB(\fR\fBzzip_char_t*\ filename\fR\fB, \fR\fBzzip_char_t*\ mode\fR\fB, \fR\fBZZIP_FILE*\ stream\fR\fB);\fR +.SH "DESCRIPTION" +.PP +\fBThe zzip_fopen function\fR +will +\fBfopen\fR(3) a real/zipped file. +.PP +It has some magic functionality builtin \- it will first try to open the given +\fIfilename\fR +as a normal file. If it does not exist, the given path to the filename (if any) is split into its directory\-part and the file\-part. A ".zip" extension is then added to the directory\-part to create the name of a zip\-archive. That zip\-archive (if it exists) is being searched for the file\-part, and if found a zzip\-handle is returned. +.PP +Note that if the file is found in the normal fs\-directory the returned structure is mostly empty and the +\fBzzip_read\fR +call will use the libc +\fBread\fR +to obtain data. Otherwise a +\fBzzip_file_open\fR +is performed and any error mapped to +\fBerrno\fR(3). +.PP +unlike the posix\-wrapper +\fBzzip_open\fR +the mode\-argument is a string which allows for more freedom to support the extra zzip modes called ZZIP_CASEINSENSITIVE and ZZIP_IGNOREPATH. Currently, this +\fBzzip_fopen\fR +call will convert the following characters in the mode\-string into their corrsponding mode\-bits: +.sp +.nf +\fB "r" : O_RDONLY : \fR read\-only + \fB "b" : O_BINARY : \fR binary (win32 specific) + \fB "f" : O_NOCTTY : \fR no char device (unix) + \fB "i" : ZZIP_CASELESS : \fR inside zip file + \fB "*" : ZZIP_NOPATHS : \fR inside zip file only + +.fi +.PP +all other modes will be ignored for zip\-contained entries but they are transferred for compatibility and portability, including these extra sugar bits: +.sp +.nf +\fB "x" : O_EXCL :\fR fail if file did exist + \fB "s" : O_SYNC :\fR synchronized access + \fB "n" : O_NONBLOCK :\fR nonblocking access + \fB "z#" : compression level :\fR for zlib + \fB "g#" : group access :\fR unix access bits + \fB "u#" : owner access :\fR unix access bits + \fB "o#" : world access :\fR unix access bits + +.fi +.PP +... the access bits are in traditional unix bit format with 7 = read/write/execute, 6 = read/write, 4 = read\-only. +.PP +The default access mode is 0664, and the compression level is ignored since the lib can not yet write zip files, otherwise it would be the initialisation value for the zlib deflateInit where 0 = no\-compression, 1 = best\-speed, 9 = best\-compression. +.PP +.PP +\fBThe zzip_freopen function\fR +receives an additional argument pointing to a ZZIP_FILE* being already in use. If this extra argument is null then +\fBthe zzip_freopen function\fR +is identical with calling +\fBzzip_fopen\fR +.PP +Per default, the old file stream is closed and only the internal structures associated with it are kept. These internal structures may be reused for the return value, and this is a lot quicker when the filename matches a zipped file that is incidently in the very same zip arch as the old filename wrapped in the stream struct. +.PP +That's simply because the zip arch's central directory does not need to be read again. As an extension for +\fBthe zzip_freopen function\fR, if the mode\-string contains a "q" then the old stream is not closed but left untouched, instead it is only given as a hint that a new file handle may share/copy the zip arch structures of the old file handle if that is possible, i.e when they are in the same zip arch. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<Tomi.Ollila@iki.fi> +.TP +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<Tomi.Ollila@iki.fi> +zzip_fread.3/ 1154977710 1001 0 100644 21 ` +.so man3/zzip_read.3 + +zzip_freopen.3/ 1154977710 1001 0 100644 22 ` +.so man3/zzip_fopen.3 +zzip_fstat.3/ 1154977710 1001 0 100644 25 ` +.so man3/zzip_dir_stat.3 + +zzip_fwrite.3/ 1154977710 1001 0 100644 22 ` +.so man3/zzip_write.3 +__zzip_get16.3/ 1154977710 1001 0 100644 24 ` +.so man3/__zzip_get32.3 +__zzip_get32.3/ 1154977710 1001 0 100644 1714 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "__ZZIP_GET32" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +__zzip_get32, __zzip_get16, __zzip_get64, __zzip_set32, __zzip_set16, __zzip_set64 \- (zzip/fetch.c) +.SH "SYNOPSIS" +.PP +\fB + #include <zziplib.h> +\fR +.HP 22 +\fBuint32_t\ \fB__zzip_get32\fR\fR\fB(\fR\fBunsigned\ char\ *\ s\fR\fB);\fR +.HP 22 +\fBuint16_t\ \fB__zzip_get16\fR\fR\fB(\fR\fBunsigned\ char\ *\ s\fR\fB);\fR +.HP 22 +\fBuint64_t\ \fB__zzip_get64\fR\fR\fB(\fR\fBunsigned\ char\ *\ s\fR\fB);\fR +.HP 18 +\fBvoid\ \fB__zzip_set32\fR\fR\fB(\fR\fBunsigned\ char\ *\ s\fR\fB, \fR\fBuint32_t\ v\fR\fB);\fR +.HP 18 +\fBvoid\ \fB__zzip_set16\fR\fR\fB(\fR\fBunsigned\ char\ *\ s\fR\fB, \fR\fBuint16_t\ v\fR\fB);\fR +.HP 18 +\fBvoid\ \fB__zzip_set64\fR\fR\fB(\fR\fBunsigned\ char\ *\ s\fR\fB, \fR\fBuint64_t\ v\fR\fB);\fR +.SH "DESCRIPTION" +.PP +Make 32 bit value in host byteorder from little\-endian mapped octet\-data (works also on machines which SIGBUS on misaligned data access (eg. 68000)) +.PP +\fBThe __zzip_get16 function\fR +does the same for a 16 bit value. +.PP +\fBThe __zzip_get64 function\fR +does the same for an off64_t value. +.PP +\fBThe __zzip_set32 function\fR +pushes a 32bit value at the specified address +.PP +\fBThe __zzip_set16 function\fR +does the same for a 16 bit value. +.PP +\fBThe __zzip_set64 function\fR +pushes a off64_t value at the specified address +__zzip_get64.3/ 1154977710 1001 0 100644 24 ` +.so man3/__zzip_get32.3 +/1111 1154977710 1001 0 100644 24 ` +.so man3/zzip_init_io.3 +/1134 1154977710 1001 0 100644 886 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_INFLATE_INIT" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_inflate_init \- (zzip/file.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 29 +\fBstatic\ int\ \fBzzip_inflate_init\fR\fR\fB(\fR\fBZZIP_FILE\ *\ fp\fR\fB, \fR\fBstruct\ zzip_dir_hdr*\ hdr\fR\fB);\fR +.SH "DESCRIPTION" +.PP +call +\fBinflateInit\fR +and setup fp's iterator variables, used by lowlevel +\fB_open\fR +functions. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<Tomi.Ollila@iki.fi> +zzip_init_io.3/ 1154977710 1001 0 100644 1257 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_INIT_IO" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_init_io, zzip_get_default_io \- (zzip/plugin.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 17 +\fBint\ \fBzzip_init_io\fR\fR\fB(\fR\fBzzip_plugin_io_handlers_t\ io\fR\fB, \fR\fBint\ flags\fR\fB);\fR +.HP 37 +\fBzzip_plugin_io_t\ \fBzzip_get_default_io\fR\fR\fB(\fR\fB);\fR +.SH "DESCRIPTION" +.PP +\fBThe zzip_init_io function\fR +initializes the users handler struct to default values being the posix io functions in default configured environments. +.PP +\fBThe zzip_get_default_io function\fR +returns a zzip_plugin_io_t handle to static defaults wrapping the posix io file functions for actual file access. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Mike Nordell +<tamlin\-@\-algonet\-se> +.TP +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Mike Nordell +<tamlin\-@\-algonet\-se> + +zziplib.h.3/ 1154977710 1001 0 100644 6218 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIPLIB.H" "3" "0.13.47" "the library zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zziplib.h \- library +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 20 +\fBvoid\ \fBzzip_rewinddir\fR\fR\fB(\fR\fBZZIP_DIR\ *\ dir\fR\fB);\fR +.HP 26 +\fBZZIP_DIRENT*\ \fBzzip_readdir\fR\fR\fB(\fR\fBZZIP_DIR\ *\ dir\fR\fB);\fR +.HP 23 +\fBZZIP_DIR*\ \fBzzip_opendir\fR\fR\fB(\fR\fBzzip_char_t*\ filename\fR\fB);\fR +.HP 18 +\fBint\ \fBzzip_closedir\fR\fR\fB(\fR\fBZZIP_DIR*\ dir\fR\fB);\fR +.HP 27 +\fBzzip_char_t*\ \fBzzip_strerror\fR\fR\fB(\fR\fBint\ errcode\fR\fB);\fR +.HP 15 +\fBint\ \fBzzip_errno\fR\fR\fB(\fR\fBint\ errcode\fR\fB);\fR +.HP 22 +\fBuint32_t\ \fB__zzip_get32\fR\fR\fB(\fR\fBunsigned\ char\ *\ s\fR\fB);\fR +.HP 20 +\fBint\ \fBzzip_file_close\fR\fR\fB(\fR\fBZZIP_FILE\ *\ fp\fR\fB);\fR +.HP 27 +\fBZZIP_FILE\ *\ \fBzzip_file_open\fR\fR\fB(\fR\fBZZIP_DIR\ *\ dir\fR\fB, \fR\fBzzip_char_t*\ name\fR\fB, \fR\fBint\ o_mode\fR\fB);\fR +.HP 29 +\fBstatic\ int\ \fBzzip_inflate_init\fR\fR\fB(\fR\fBZZIP_FILE\ *\ fp\fR\fB, \fR\fBstruct\ zzip_dir_hdr*\ hdr\fR\fB);\fR +.HP 16 +\fBint\ \fBzzip_fclose\fR\fR\fB(\fR\fBZZIP_FILE\ *\ fp\fR\fB);\fR +.HP 28 +\fBzzip_ssize_t\ \fBzzip_file_read\fR\fR\fB(\fR\fBZZIP_FILE\ *\ fp\fR\fB, \fR\fBchar\ *\ buf\fR\fB, \fR\fBzzip_size_t\ len\fR\fB);\fR +.HP 23 +\fBzzip_ssize_t\ \fBzzip_read\fR\fR\fB(\fR\fBZZIP_FILE\ *\ fp\fR\fB, \fR\fBchar\ *\ buf\fR\fB, \fR\fBzzip_size_t\ len\fR\fB);\fR +.HP 22 +\fBZZIP_FILE*\ \fBzzip_fopen\fR\fR\fB(\fR\fBzzip_char_t*\ filename\fR\fB, \fR\fBzzip_char_t*\ mode\fR\fB);\fR +.HP 21 +\fBZZIP_FILE*\ \fBzzip_open\fR\fR\fB(\fR\fBzzip_char_t*\ filename\fR\fB, \fR\fBint\ o_flags\fR\fB);\fR +.HP 16 +\fBint\ \fBzzip_rewind\fR\fR\fB(\fR\fBZZIP_FILE\ *fp\fR\fB);\fR +.HP 21 +\fBzzip_off_t\ \fBzzip_seek\fR\fR\fB(\fR\fBZZIP_FILE\ *\ fp\fR\fB, \fR\fBzzip_off_t\ offset\fR\fB, \fR\fBint\ whence\fR\fB);\fR +.HP 21 +\fBzzip_off_t\ \fBzzip_tell\fR\fR\fB(\fR\fBZZIP_FILE\ *\ fp\fR\fB);\fR +.HP 34 +\fBzzip_off_t\ \fBzzip_entry_data_offset\fR\fR\fB(\fR\fBZZIP_ENTRY*\ entry\fR\fB);\fR +.HP 44 +\fBzzip__new__\ ZZIP_ENTRY*\ \fBzzip_entry_findfile\fR\fR\fB(\fR\fBFILE*\ disk\fR\fB, \fR\fBchar*\ filename\fR\fB, \fR\fBZZIP_ENTRY*\ _zzip_restrict\ entry\fR\fB, \fR\fBzzip_strcmp_fn_t\ compare\fR\fB);\fR +.HP 46 +\fBzzip__new__\ ZZIP_ENTRY_FILE*\ \fBzzip_entry_fopen\fR\fR\fB(\fR\fBZZIP_ENTRY*\ entry\fR\fB, \fR\fBint\ takeover\fR\fB);\fR +.HP 15 +\fBint\ \fBzzip_error\fR\fR\fB(\fR\fBZZIP_DIR\ *\ dir\fR\fB);\fR +.HP 26 +\fBZZIP_DIR\ *\ \fBzzip_dirhandle\fR\fR\fB(\fR\fBZZIP_FILE\ *\ fp\fR\fB);\fR +.HP 28 +\fBzzip_char_t*\ \fBzzip_compr_str\fR\fR\fB(\fR\fBint\ compr\fR\fB);\fR +.HP 19 +\fBint\ \fBzzip_file_real\fR\fR\fB(\fR\fBZZIP_FILE*\ fp\fR\fB);\fR +.HP 46 +\fBzzip__new__\ ZZIP_MEM_DISK*\ \fBzzip_mem_disk_open\fR\fR\fB(\fR\fBchar*\ filename\fR\fB);\fR +.HP 48 +\fBzzip__new__\ ZZIP_MEM_DISK*\ \fBzzip_mem_disk_fdopen\fR\fR\fB(\fR\fBint\ fd\fR\fB);\fR +.HP 24 +\fBlong\ \fBzzip_mem_disk_load\fR\fR\fB(\fR\fBZZIP_MEM_DISK*\ dir\fR\fB, \fR\fBZZIP_DISK*\ disk\fR\fB);\fR +.HP 47 +\fBzzip__new__\ ZZIP_MEM_ENTRY*\ \fBzzip_mem_entry_new\fR\fR\fB(\fR\fBZZIP_DISK*\ disk\fR\fB, \fR\fBZZIP_DISK_ENTRY*\ entry\fR\fB);\fR +.HP 38 +\fBzzip__new__\ ZZIP_DISK*\ \fBzzip_disk_mmap\fR\fR\fB(\fR\fBint\ fd\fR\fB);\fR +.HP 37 +\fBzzip_byte_t*\ \fBzzip_disk_entry_to_data\fR\fR\fB(\fR\fBZZIP_DISK*\ disk\fR\fB, \fR\fBstruct\ zzip_disk_entry*\ entry\fR\fB);\fR +.HP 43 +\fBstruct\ zzip_disk_entry*\ \fBzzip_disk_findfile\fR\fR\fB(\fR\fBZZIP_DISK*\ disk\fR\fB, \fR\fBchar*\ filename\fR\fB, \fR\fBstruct\ zzip_disk_entry*\ after\fR\fB, \fR\fBzzip_strcmp_fn_t\ compare\fR\fB);\fR +.HP 44 +\fBzzip__new__\ ZZIP_DISK_FILE*\ \fBzzip_disk_fopen\fR\fR\fB(\fR\fBZZIP_DISK*\ disk\fR\fB, \fR\fBchar*\ filename\fR\fB);\fR +.HP 17 +\fBint\ \fBzzip_init_io\fR\fR\fB(\fR\fBzzip_plugin_io_handlers_t\ io\fR\fB, \fR\fBint\ flags\fR\fB);\fR +.HP 18 +\fBint\ \fBzzip_dir_stat\fR\fR\fB(\fR\fBZZIP_DIR\ *\ dir\fR\fB, \fR\fBzzip_char_t*\ name\fR\fB, \fR\fBZZIP_STAT\ *\ zs\fR\fB, \fR\fBint\ flags\fR\fB);\fR +.HP 25 +\fBZZIP_DIR*\ \fBzzip_dir_creat\fR\fR\fB(\fR\fBzzip_char_t*\ name\fR\fB, \fR\fBint\ o_mode\fR\fB);\fR +.HP 25 +\fBZZIP_DIR*\ \fBzzip_createdir\fR\fR\fB(\fR\fBzzip_char_t*\ name\fR\fB, \fR\fBint\ o_mode\fR\fB);\fR +.HP 27 +\fBZZIP_FILE*\ \fBzzip_file_creat\fR\fR\fB(\fR\fBZZIP_DIR*\ dir\fR\fB, \fR\fBzzip_char_t*\ name\fR\fB, \fR\fBint\ o_mode\fR\fB);\fR +.HP 24 +\fBzzip_ssize_t\ \fBzzip_write\fR\fR\fB(\fR\fBZZIP_FILE*\ file\fR\fB, \fR\fBconst\ void*\ ptr\fR\fB, \fR\fBzzip_size_t\ len\fR\fB);\fR +.HP 22 +\fBint\ inline\ \fBzzip_mkdir\fR\fR\fB(\fR\fBzzip_char_t*\ name\fR\fB, \fR\fBint\ o_mode\fR\fB);\fR +.HP 24 +\fBvoid\ inline\ \fBzzip_mkfifo\fR\fR\fB(\fR\fBzzip_char_t*\ name\fR\fB, \fR\fBint\ o_mode\fR\fB);\fR +.HP 30 +\fBint\ \fB__zzip_fetch_disk_trailer\fR\fR\fB(\fR\fBint\ fd\fR\fB, \fR\fBzzip_off_t\ filesize\fR\fB, \fR\fBstruct\ _disk_trailer\ *\ _zzip_restrict\ trailer\fR\fB, \fR\fBzzip_plugin_io_t\ io\fR\fB);\fR +.HP 32 +\fBint\ \fB__zzip_parse_root_directory\fR\fR\fB(\fR\fBint\ fd\fR\fB, \fR\fBstruct\ _disk_trailer\ *\ trailer\fR\fB, \fR\fBstruct\ zzip_dir_hdr\ **\ hdr_return\fR\fB, \fR\fBzzip_plugin_io_t\ io\fR\fB);\fR +.HP 32 +\fBZZIP_DIR*\ \fBzzip_dir_alloc_ext_io\fR\fR\fB(\fR\fBzzip_strings_t*\ ext\fR\fB, \fR\fBconst\ zzip_plugin_io_t\ io\fR\fB);\fR +.HP 18 +\fBint\ \fBzzip_dir_free\fR\fR\fB(\fR\fBZZIP_DIR\ *\ dir\fR\fB);\fR +.HP 27 +\fBZZIP_DIR\ *\ \fBzzip_dir_fdopen\fR\fR\fB(\fR\fBint\ fd\fR\fB, \fR\fBzzip_error_t\ *\ errcode_p\fR\fB);\fR +.HP 20 +\fBint\ \fB__zzip_try_open\fR\fR\fB(\fR\fBzzip_char_t*\ filename\fR\fB, \fR\fBint\ filemode\fR\fB, \fR\fBzzip_strings_t*\ ext\fR\fB, \fR\fBzzip_plugin_io_t\ io\fR\fB);\fR +.HP 24 +\fBZZIP_DIR*\ \fBzzip_dir_open\fR\fR\fB(\fR\fBzzip_char_t*\ filename\fR\fB, \fR\fBzzip_error_t*\ e\fR\fB);\fR +.SH "DESCRIPTION" +.PP +zziplib library +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<too@iki.fi> +/1155 1154977710 1001 0 100644 766 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_MEM_DISK_FDOPEN" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_mem_disk_fdopen \- create new diskdir handle. +.SH "SYNOPSIS" +.PP +\fB + #include <zziplib.h> +\fR +.HP 48 +\fBzzip__new__\ ZZIP_MEM_DISK*\ \fBzzip_mem_disk_fdopen\fR\fR\fB(\fR\fBint\ fd\fR\fB);\fR +.SH "DESCRIPTION" +.PP +wraps underlying zzip_disk_open. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +/1179 1154977710 1001 0 100644 870 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_MEM_DISK_LOAD" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_mem_disk_load \- parse central dir. +.SH "SYNOPSIS" +.PP +\fB + #include <zziplib.h> +\fR +.HP 24 +\fBlong\ \fBzzip_mem_disk_load\fR\fR\fB(\fR\fBZZIP_MEM_DISK*\ dir\fR\fB, \fR\fBZZIP_DISK*\ disk\fR\fB);\fR +.SH "DESCRIPTION" +.PP +creates an internal copy of each entry converted to the local platform. returns: number of entries, or \-1 on error (setting errno) +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +/1201 1154977710 1001 0 100644 768 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_MEM_DISK_OPEN" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_mem_disk_open \- create new diskdir handle. +.SH "SYNOPSIS" +.PP +\fB + #include <zziplib.h> +\fR +.HP 46 +\fBzzip__new__\ ZZIP_MEM_DISK*\ \fBzzip_mem_disk_open\fR\fR\fB(\fR\fBchar*\ filename\fR\fB);\fR +.SH "DESCRIPTION" +.PP +wraps underlying zzip_disk_open. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +/1223 1154977710 1001 0 100644 1113 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_MEM_ENTRY_NEW" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_mem_entry_new \- convert a zip disk entry to internal format. +.SH "SYNOPSIS" +.PP +\fB + #include <zziplib.h> +\fR +.HP 47 +\fBzzip__new__\ ZZIP_MEM_ENTRY*\ \fBzzip_mem_entry_new\fR\fR\fB(\fR\fBZZIP_DISK*\ disk\fR\fB, \fR\fBZZIP_DISK_ENTRY*\ entry\fR\fB);\fR +.SH "DESCRIPTION" +.PP +creates a new item parsing the information out of the various places in the zip archive. This is a good place to extend functionality if you have a project with extra requirements as you can push more bits right into the diskdir_entry for later usage in higher layers. returns: new item, or null on error (setting errno) +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> + +zzip_mkdir.3/ 1154977710 1001 0 100644 2200 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_MKDIR" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_mkdir, zzip_creat \- create a zipped file/directory +.SH "SYNOPSIS" +.PP +\fB + #include <zziplib.h> +\fR +.HP 22 +\fBint\ inline\ \fBzzip_mkdir\fR\fR\fB(\fR\fBzzip_char_t*\ name\fR\fB, \fR\fBint\ o_mode\fR\fB);\fR +.HP 29 +\fBZZIP_FILE*\ inline\ \fBzzip_creat\fR\fR\fB(\fR\fBzzip_char_t*\ name\fR\fB, \fR\fBint\ o_mode\fR\fB);\fR +.SH "DESCRIPTION" +.PP +.PP +\fBThe zzip_mkdir function\fR +creates a directory entry in the default zip\-archive. If you did not specify a "#define zzip_savefile somevar" then the default zip\-archive is null and all directories are created as real directories in the filesystem. +\fBThe zzip_mkdir function\fR +is really a preprocessor macro or preferably an inline function around +\fBzzip_file_mkdir\fR, there is no such symbol generated into the library. The prototype is modelled after the posix +\fBmkdir\fR(2) call. +.sp +.nf + #ifndef zzip_savefile + #define zzip_savefile 0 + #endif + #define zzip_mkdir(name,mode) \\ \- +.fi +.sp +zzip_file_mkdir(zzip_savefile,name,mode) +.PP +.PP +.PP +\fBThe zzip_creat function\fR +creates a file in the default zip\-archive. If you did not specify a "#define zzip_savefile somevar" then the default zip\-archive is null and all files are created as real files. +\fBThe zzip_creat function\fR +is really a preprocessor macro or preferably an inline function around +\fBzzip_file_creat\fR, there is no such symbol generated into the library. The prototype is modelled after the posix +\fBcreat\fR(2) call. +.sp +.nf + #ifndef zzip_savefile + #define zzip_savefile 0 + #endif + #define zzip_creat(name,mode) \\ \- +.fi +.sp +zzip_file_creat(zzip_savefile,name,mode) +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +.SH "SEE ALSO" +.PP +zzip_dir_creat, mkdir(2), creat(2), zzip_start +zzip_mkfifo.3/ 1154977710 1001 0 100644 2613 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_MKFIFO" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_mkfifo, zzip_sync \- start writing to the magic zzip_savefile +.SH "SYNOPSIS" +.PP +\fB + #include <zziplib.h> +\fR +.HP 24 +\fBvoid\ inline\ \fBzzip_mkfifo\fR\fR\fB(\fR\fBzzip_char_t*\ name\fR\fB, \fR\fBint\ o_mode\fR\fB);\fR +.HP 22 +\fBvoid\ inline\ \fBzzip_sync\fR\fR\fB(\fR\fBvoid\fR\fB);\fR +.SH "DESCRIPTION" +.PP +.PP +open a zip archive for writing via the magic zzip_savefile macro variable. The name and mode are given to +\fBzzip_createdir\fR +and the result is stored into +\fBzzip_savefile\fR +\- if the +\fBzzip_savefile\fR +did already have a zzip_dir handle then it is automatically finalized with +\fBzzip_sync\fR +and the handle closed and the zzip_savefile variable reused for the new zip archive just started with this call. \- +\fBThe zzip_mkfifo function\fR +is really a preprocessor macro or preferably an inline function around +\fBzzip_dir_create\fR, there is no such symbol generated into the library. +.sp +.nf + #ifndef zzip_savefile + #define zzip_savefile 0 + #endif + #define zzip_start(name,mode,ext) \\ \- +.fi +.sp +{ if (zzip_savefile) zzip_closedir(zzip_savefile); \\ \- zzip_savefile = zzip_createdir(name,mode,ext); } +\fBThe zzip_mkfifo function\fR +returns null on error or a zzip_dir handle on success. It is perfectly okay to continue with a null in the zzip_savefile variable since it makes subsequent calls to +\fBzzip_creat\fR +and +\fBzzip_mkdir\fR +to run as +\fBcreat\fR(2) / +\fBmkdir\fR(2) on the real filesystem. +.PP +.PP +finalize a zip archive thereby writing the central directory to the end of the file. If it was a real directory then we do just nothing \- even that the prototype of the call itself is modelled to be similar to the posix +\fBsync\fR(2) call. +\fBThe zzip_sync function\fR +is really a preprocessor macro or preferably an inline function around +\fBzzip_closedir\fR, there is no such symbol generated into the library. +.sp +.nf + #ifndef zzip_savefile + #define zzip_savefile 0 + #endif + #define zzip_sync(name,mode) \\ \- +.fi +.sp +{ zzip_closedir(zzip_savefile); zzip_savefile = 0; } +.PP +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +.SH "SEE ALSO" +.PP +zzip_creat, zzip_write, zzip_closedir, sync(2) + +zzip_open.3/ 1154977710 1001 0 100644 4164 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_OPEN" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_open, zzip_open_ext_io, zzip_open_shared_io \- (zzip/file.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 21 +\fBZZIP_FILE*\ \fBzzip_open\fR\fR\fB(\fR\fBzzip_char_t*\ filename\fR\fB, \fR\fBint\ o_flags\fR\fB);\fR +.HP 28 +\fBZZIP_FILE*\ \fBzzip_open_ext_io\fR\fR\fB(\fR\fBzzip_char_t*\ filename\fR\fB, \fR\fBint\ o_flags\fR\fB, \fR\fBint\ o_modes\fR\fB, \fR\fBzzip_strings_t*\ ext\fR\fB, \fR\fBzzip_plugin_io_t\ io\fR\fB);\fR +.HP 31 +\fBZZIP_FILE*\ \fBzzip_open_shared_io\fR\fR\fB(\fR\fBZZIP_FILE*\ stream\fR\fB, \fR\fBzzip_char_t*\ filename\fR\fB, \fR\fBint\ o_flags\fR\fB, \fR\fBint\ o_modes\fR\fB, \fR\fBzzip_strings_t*\ ext\fR\fB, \fR\fBzzip_plugin_io_t\ io\fR\fB);\fR +.SH "DESCRIPTION" +.PP +\fBThe zzip_open function\fR +will +\fBopen\fR(2) a real/zipped file +.PP +It has some magic functionality builtin \- it will first try to open the given +\fIfilename\fR +as a normal file. If it does not exist, the given path to the filename (if any) is split into its directory\-part and the file\-part. A ".zip" extension is then added to the directory\-part to create the name of a zip\-archive. That zip\-archive (if it exists) is being searched for the file\-part, and if found a zzip\-handle is returned. +.PP +Note that if the file is found in the normal fs\-directory the returned structure is mostly empty and the +\fBzzip_read\fR +call will use the libc +\fBread\fR +to obtain data. Otherwise a +\fBzzip_file_open\fR +is performed and any error mapped to +\fBerrno\fR(3). +.PP +There was a possibility to transfer zziplib\-specific openmodes through o_flags but you should please not use them anymore and look into +\fBzzip_open_ext_io\fR +to submit them down. +\fBThe zzip_open function\fR +is shallow in that it just extracts the zzipflags and calls +.sp +.nf +\fB + zzip_open_ext_io(filename, o_flags, zzipflags|0664, 0, 0) \fR +.fi +.PP +you must stop using this extra functionality (not well known anyway) since zzip_open might be later usable to open files for writing in which case the _EXTRAFLAGS will get in conflict. +.PP +compare with +\fBopen\fR(2) and +\fBzzip_fopen\fR +.PP +.PP +\fBThe zzip_open_ext_io function\fR +uses explicit ext and io instead of the internal defaults, setting them to zero is equivalent to +\fBzzip_open\fR +.PP +note that the two flag types have been split into an o_flags (for fcntl\-like openflags) and o_modes where the latter shall carry the zzip_flags and possibly accessmodes for unix filesystems. Since this version of zziplib can not write zipfiles, it is not yet used for anything else than zzip\-specific modeflags. +.PP +.PP +\fBThe zzip_open_shared_io function\fR +takes an extra stream argument \- if a handle has been then ext/io can be left null and the new stream handle will pick up the ext/io. This should be used only in specific environment however since +\fBzzip_file_real\fR +does not store any ext\-sequence. +.PP +The benefit for +\fBthe zzip_open_shared_io function\fR +comes in when the old file handle was openened from a file within a zip archive. When the new file is in the same zip archive then the internal zzip_dir structures will be shared. It is even quicker, as no check needs to be done anymore trying to guess the zip archive place in the filesystem, here we just check whether the zip archive's filepath is a prefix part of the filename to be opened. +.PP +Note that +\fBthe zzip_open_shared_io function\fR +is also used by +\fBzzip_freopen\fR +that will unshare the old handle, thereby possibly closing the handle. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<Tomi.Ollila@iki.fi> +.TP +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<Tomi.Ollila@iki.fi> +.TP +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<Tomi.Ollila@iki.fi> +zzip_opendir.3/ 1154977710 1001 0 100644 1490 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_OPENDIR" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_opendir, zzip_opendir_ext_io \- (zzip/dir.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 23 +\fBZZIP_DIR*\ \fBzzip_opendir\fR\fR\fB(\fR\fBzzip_char_t*\ filename\fR\fB);\fR +.HP 30 +\fBZZIP_DIR*\ \fBzzip_opendir_ext_io\fR\fR\fB(\fR\fBzzip_char_t*\ filename\fR\fB, \fR\fBint\ o_modes\fR\fB, \fR\fBzzip_strings_t*\ ext\fR\fB, \fR\fBzzip_plugin_io_t\ io\fR\fB);\fR +.SH "DESCRIPTION" +.PP +\fBThe zzip_opendir function\fR +is the equivalent of +\fBopendir\fR(3) for a realdir or zipfile. +.PP +\fBThe zzip_opendir function\fR +has some magic \- if the given argument\-path is a directory, it will wrap a real +\fBopendir\fR(3) into the ZZIP_DIR structure. Otherwise it will divert to +\fBzzip_dir_open\fR +which can also attach a ".zip" extension if needed to find the archive. +.PP +the error\-code is mapped to +\fBerrno\fR(3). +.PP +\fBThe zzip_opendir_ext_io function\fR +uses explicit ext and io instead of the internal defaults, setting them to zero is equivalent to +\fBzzip_opendir\fR +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +/1245 1154977710 1001 0 100644 24 ` +.so man3/zzip_opendir.3 +/1268 1154977710 1001 0 100644 21 ` +.so man3/zzip_open.3 + +/1288 1154977710 1001 0 100644 21 ` +.so man3/zzip_open.3 + +/1311 1154977710 1001 0 100644 1125 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "__ZZIP_PARSE_ROOT_DI" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +__zzip_parse_root_directory \- (zzip/zip.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 32 +\fBint\ \fB__zzip_parse_root_directory\fR\fR\fB(\fR\fBint\ fd\fR\fB, \fR\fBstruct\ _disk_trailer\ *\ trailer\fR\fB, \fR\fBstruct\ zzip_dir_hdr\ **\ hdr_return\fR\fB, \fR\fBzzip_plugin_io_t\ io\fR\fB);\fR +.SH "DESCRIPTION" +.PP +\fBThe __zzip_parse_root_directory function\fR +is used by +\fBzzip_file_open\fR, it is usually called after +\fB__zzip_find_disk_trailer\fR. It will parse the zip's central directory information and create a zziplib private directory table in memory. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<too@iki.fi> + +zzip_read.3/ 1154977710 1001 0 100644 1578 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_READ" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_read, zzip_fread \- (zzip/file.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 23 +\fBzzip_ssize_t\ \fBzzip_read\fR\fR\fB(\fR\fBZZIP_FILE\ *\ fp\fR\fB, \fR\fBchar\ *\ buf\fR\fB, \fR\fBzzip_size_t\ len\fR\fB);\fR +.HP 23 +\fBzzip_size_t\ \fBzzip_fread\fR\fR\fB(\fR\fBvoid\ *ptr\fR\fB, \fR\fBzzip_size_t\ size\fR\fB, \fR\fBzzip_size_t\ nmemb\fR\fB, \fR\fBZZIP_FILE\ *file\fR\fB);\fR +.SH "DESCRIPTION" +.PP +\fBThe zzip_read function\fR +will read(2) data from a real/zipped file. +.PP +the replacement for +\fBread\fR(2) will fill the given buffer with bytes from the opened file. It will return the number of bytes read, so if the EOF is encountered you will be prompted with the number of bytes actually read. +.PP +If the file\-handle is wrapping a stat'able file then it will actually just perform a normal +\fBread\fR(2)\-call, otherwise +\fBzzip_file_read\fR +is called to decompress the data stream and any error is mapped to +\fBerrno\fR(3). +.PP +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<Tomi.Ollila@iki.fi> +.TP +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<Tomi.Ollila@iki.fi> +zzip_readdir.3/ 1154977710 1001 0 100644 1125 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_READDIR" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_readdir \- (zzip/dir.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 26 +\fBZZIP_DIRENT*\ \fBzzip_readdir\fR\fR\fB(\fR\fBZZIP_DIR\ *\ dir\fR\fB);\fR +.SH "DESCRIPTION" +.PP +\fBThe zzip_readdir function\fR +is the equivalent of a +\fBreaddir\fR(2) for a realdir or a zipfile referenced by the ZZIP_DIR returned from +\fBzzip_opendir\fR. +.PP +The ZZIP_DIR handle (as returned by +\fBzzip_opendir\fR) contains a few more entries than being copied into the ZZIP_DIRENT. The only valid fields in a ZZIP_DIRENT are d_name (the file name), d_compr (compression), d_csize (compressed size), st_size (uncompressed size). +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> + +zzip_realdir.3/ 1154977710 1001 0 100644 26 ` +.so man3/zzip_file_real.3 +zzip_realfd.3/ 1154977710 1001 0 100644 26 ` +.so man3/zzip_file_real.3 +zzip_rewind.3/ 1154977710 1001 0 100644 889 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_REWIND" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_rewind \- (zzip/file.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 16 +\fBint\ \fBzzip_rewind\fR\fR\fB(\fR\fBZZIP_FILE\ *fp\fR\fB);\fR +.SH "DESCRIPTION" +.PP +\fBThe zzip_rewind function\fR +will rewind a real/zipped file. +.PP +It seeks to the beginning of this file's data in the zip, or the beginning of the file for a stat'fd. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<Tomi.Ollila@iki.fi> + +/1342 1154977710 1001 0 100644 1398 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_REWINDDIR" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_rewinddir, zzip_telldir, zzip_seekdir \- (zzip/dir.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 20 +\fBvoid\ \fBzzip_rewinddir\fR\fR\fB(\fR\fBZZIP_DIR\ *\ dir\fR\fB);\fR +.HP 24 +\fBzzip_off_t\ \fBzzip_telldir\fR\fR\fB(\fR\fBZZIP_DIR*\ dir\fR\fB);\fR +.HP 18 +\fBvoid\ \fBzzip_seekdir\fR\fR\fB(\fR\fBZZIP_DIR*\ dir\fR\fB, \fR\fBzzip_off_t\ offset\fR\fB);\fR +.SH "DESCRIPTION" +.PP +\fBThe zzip_rewinddir function\fR +is the equivalent of a +\fBrewinddir\fR(2) for a realdir or the zipfile in place of a directory. The ZZIP_DIR handle returned from +\fBzzip_opendir\fR +has a flag saying realdir or zipfile. As for a zipfile, the filenames will include the filesubpath, so take care. +.PP +\fBThe zzip_telldir function\fR +is the equivalent of +\fBtelldir\fR(2) for a realdir or zipfile. +.PP +\fBThe zzip_seekdir function\fR +is the equivalent of +\fBseekdir\fR(2) for a realdir or zipfile. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +zzip_seek.3/ 1154977710 1001 0 100644 1450 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_SEEK" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_seek \- (zzip/file.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 21 +\fBzzip_off_t\ \fBzzip_seek\fR\fR\fB(\fR\fBZZIP_FILE\ *\ fp\fR\fB, \fR\fBzzip_off_t\ offset\fR\fB, \fR\fBint\ whence\fR\fB);\fR +.SH "DESCRIPTION" +.PP +\fBThe zzip_seek function\fR +will perform a +\fBlseek\fR(2) operation on a real/zipped file +.PP +It will try to seek to the offset specified by offset, relative to whence, which is one of SEEK_SET, SEEK_CUR or SEEK_END. +.PP +If the file\-handle is wrapping a stat'able file then it will actually just perform a normal +\fBlseek\fR(2)\-call. Otherwise the relative offset is calculated, negative offsets are transformed into positive ones by rewinding the file, and then data is read until the offset is reached. This can make the function terribly slow, but this is how gzio implements it, so I'm not sure there is a better way without using the internals of the algorithm. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<Tomi.Ollila@iki.fi> +zzip_seekdir.3/ 1154977710 1001 0 100644 26 ` +.so man3/zzip_rewinddir.3 +__zzip_set16.3/ 1154977710 1001 0 100644 24 ` +.so man3/__zzip_get32.3 +__zzip_set32.3/ 1154977710 1001 0 100644 24 ` +.so man3/__zzip_get32.3 +__zzip_set64.3/ 1154977710 1001 0 100644 24 ` +.so man3/__zzip_get32.3 +zzip_seterror.3/1154977710 1001 0 100644 22 ` +.so man3/zzip_error.3 +zzip_strerror.3/1154977710 1001 0 100644 1417 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_STRERROR" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_strerror, zzip_strerror_of \- (zzip/err.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 27 +\fBzzip_char_t*\ \fBzzip_strerror\fR\fR\fB(\fR\fBint\ errcode\fR\fB);\fR +.HP 30 +\fBzzip_char_t*\ \fBzzip_strerror_of\fR\fR\fB(\fR\fBZZIP_DIR*\ dir\fR\fB);\fR +.SH "DESCRIPTION" +.PP +returns the static string for the given error code. The error code can be either a normal system error (a positive error code will flag this), it can be +\fBlibz\fR +error code (a small negative error code will flag this) or it can be an error code from +\fBlibzzip\fR, which is an negative value lower than +\fBZZIP_ERROR\fR +.PP +\fBThe zzip_strerror_of function\fR +fetches the errorcode from the +\fBDIR\fR\-handle and runs it through +\fBzzip_strerror\fR +to obtain the static string describing the error. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<Tomi.Ollila@iki.fi> +.TP +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<Tomi.Ollila@iki.fi> + +/1360 1154977710 1001 0 100644 25 ` +.so man3/zzip_strerror.3 + +zzip_sync.3/ 1154977710 1001 0 100644 23 ` +.so man3/zzip_mkfifo.3 + +zzip_tell.3/ 1154977710 1001 0 100644 1154 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_TELL" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_tell \- (zzip/file.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 21 +\fBzzip_off_t\ \fBzzip_tell\fR\fR\fB(\fR\fBZZIP_FILE\ *\ fp\fR\fB);\fR +.SH "DESCRIPTION" +.PP +\fBThe zzip_tell function\fR +will +\fBtell\fR(2) the current position in a real/zipped file +.PP +It will return the current offset within the real/zipped file, measured in uncompressed bytes for the zipped\-file case. +.PP +If the file\-handle is wrapping a stat'able file then it will actually just perform a normal +\fBtell\fR(2)\-call, otherwise the offset is calculated from the amount of data left and the total uncompressed size; +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<Tomi.Ollila@iki.fi> +zzip_telldir.3/ 1154977710 1001 0 100644 26 ` +.so man3/zzip_rewinddir.3 +/1380 1154977710 1001 0 100644 991 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "__ZZIP_TRY_OPEN" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +__zzip_try_open \- (zzip/zip.c) +.SH "SYNOPSIS" +.PP +\fB + + +#include <zzip/lib.h> +\fR +.HP 20 +\fBint\ \fB__zzip_try_open\fR\fR\fB(\fR\fBzzip_char_t*\ filename\fR\fB, \fR\fBint\ filemode\fR\fB, \fR\fBzzip_strings_t*\ ext\fR\fB, \fR\fBzzip_plugin_io_t\ io\fR\fB);\fR +.SH "DESCRIPTION" +.PP +will attach a .zip extension and tries to open it the with +\fBopen\fR(2). This is a helper function for +\fBzzip_dir_open\fR, +\fBzzip_opendir\fR +and +\fBzzip_open\fR. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +.TP +\(bu +Tomi Ollila +<too@iki.fi> + +zzip_write.3/ 1154977710 1001 0 100644 2460 ` +.\" ** You probably do not want to edit this file directly ** +.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). +.\" Instead of manually editing it, you probably should edit the DocBook XML +.\" source for it and then use the DocBook XSL Stylesheets to regenerate it. +.TH "ZZIP_WRITE" "3" "0.13.47" "zziplib" "Manual Pages" +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.SH "NAME" +zzip_write, zzip_file_write, zzip_fwrite \- write to zzip storage +.SH "SYNOPSIS" +.PP +\fB + #include <zziplib.h> +\fR +.HP 24 +\fBzzip_ssize_t\ \fBzzip_write\fR\fR\fB(\fR\fBZZIP_FILE*\ file\fR\fB, \fR\fBconst\ void*\ ptr\fR\fB, \fR\fBzzip_size_t\ len\fR\fB);\fR +.HP 29 +\fBzzip_ssize_t\ \fBzzip_file_write\fR\fR\fB(\fR\fBZZIP_FILE*\ file\fR\fB, \fR\fBconst\ void*\ ptr\fR\fB, \fR\fBzzip_size_t\ len\fR\fB);\fR +.HP 24 +\fBzzip_size_t\ \fBzzip_fwrite\fR\fR\fB(\fR\fBconst\ void*\ ptr\fR\fB, \fR\fBzzip_size_t\ len\fR\fB, \fR\fBzzip_size_t\ multiply\fR\fB, \fR\fBZZIP_FILE*\ file\fR\fB);\fR +.SH "DESCRIPTION" +.PP +.PP +\fBThe zzip_write function\fR +will write data to a file descriptor. If the file descriptor represents a real file then it will be forwarded to call posix +\fBwrite\fR(2) directly. If it is a descriptor for a file within a zip directory then the data will be "deflated" using +\fBzlib\fR(3) and appended to the zip archive file. +.PP +.PP +\fBThe zzip_file_write function\fR +will write data to a file descriptor inside a zip archive. The data will be "deflated" using +\fBzlib\fR(3) compression and appended to the end of the zip archive file. Only one file descriptor may be open per zzip_dir archive handle (fifo\-like). +.PP +\fBThe zzip_file_write function\fR +is not yet implemented, check for #def ZZIP_NO_CREAT It returns immediately \-1 and sets errno=EROFS for indication. +.PP +\fBThe zzip_fwrite function\fR +is the stdc variant for writing and the arguments are forwarded to +\fBzzip_write\fR +\- the return value is floored to null as for STDC spec but there is no zzip_ferror call so far for the zziplib (later? is it actually needed?). +.PP +\fBThe zzip_fwrite function\fR +is not yet implemented, check for #def ZZIP_NO_CREAT Write\-support extends +\fBzzip_close\fR +with semantics to write out a file\-trailer to the zip\-archive leaving a name/offset marker in the (still\-open) ZZIP_DIR handle. +.SH "AUTHOR" +.TP 3 +\(bu +Guido Draheim +<guidod@gmx.de> +.SH "SEE ALSO" +.PP +write(2), zlib(3), zzip_file_creat diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/memdisk.htm b/Build/source/libs/zziplib/zziplib-0.13.58/docs/memdisk.htm new file mode 100644 index 00000000000..d5d25c9952d --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/memdisk.htm @@ -0,0 +1,116 @@ +<section> <date> 2005 </date> +<H2> zzip/memdisk </H2> zip cache for mmapped views + +<BLOCKQUOTE> + These routines are fully independent from the traditional zzip + implementation. They build on top of + <a href="mmapped.html">zzip/mmapped</a> that uses a readonly + mmapped sharedmem block. These functions add additional hints + how to parse extension blocks and how to cache the zip central + directory entries which does furthermore allow to convert them + to any host-local format as required. +</BLOCKQUOTE> + +<section> +<H3> zzip disk handle </H3> + +<P> + Other than with the <a href="fseeko.html">fseeko</a> alternative + interface there is no need to have an actual disk handle to the + zip archive. Instead you can use a bytewise copy of a file or + even use a mmapped view of a file. This is generally the fastest + way to get to the data contained in a zipped file. All it requires + is enough of virtual memory space but a desktop computer with a + a modern operating system will easily take care of that. +</P> + +<P> + The zzipmmapped library provides a number of calls to create a + disk handle representing a zip archive in virtual memory. Per + default we use the sys/mmap.h (or MappedView) functionality + of the operating system. See for more details in the + <a href="mmapped.html">zzip/mmapped</a> descriptions. +</P> +<P> + The zzip/memdisk extensions of zzip/mmapped are made to have a + very similar call API - therefore you will find again open and + close functions for filenames or filehandles. However the + direct mmap interface is not re-exported under the zzip_mem_disk + prefix (of the underlying zzip_disk prefix). The "_mem_" part + hints that the central directory of the underlying zzip_disk + is preparsed to a separate memory block. +<PRE> + ZZIP_MEM_DISK* zzip_mem_disk_open(char* filename); + ZZIP_MEM_DISK* zzip_mem_disk_fdopen(int fd); + void zzip_mem_disk_close(ZZIP_MEM_DISK* disk); + + int zzip_mem_disk_load (ZZIP_MEM_DISK* dir, ZZIP_DISK* disk); + void zzip_mem_disk_unload (ZZIP_MEM_DISK* dir); +</PRE> + The last two functions export some parts of the underlying + interface. It is possible to bind an existing ZZIP_MEM_DISK + handle with an arbitrary ZZIP_DISK handle. Upon calling "load" + the central directory will be loaded from the underlying zip + disk content and parsed to an internal mem block. The corresponding + "unload" function will trash that central directory cache but it + leaves the handles intact. +</P> + +</section><section> +<H3> reading the central directory </H3> + +<P> + All other zzip_mem_disk functions are simply re-exporting the + underlying zzip_disk functions. Note that the first field in + the ZZIP_MEM_DISK is a "ZZIP_DISK* disk" - the header file + zzip/memdisk.h will simply export inline functions where there + is no special zzip_mem_disk function. Therefore, whenever a + function call on a ZZIP_DISK handle is appropriate one can + also use its cousin for a ZZIP_MEM_DISK handle without any + penalties but future compatibility for extra functionality in + zzip/memdisk layer of the zzip/mmapped library. +</P> + +<P><small>Note: by default the re-exports are done with the help + of the C precompiler as precompiler macros. Using USE_INLINE + will force to make them real inlines. In the future that may + change in favor of a better autodetection for inline capabilities + of the compiler and/or using a standard cpp-define that enables + the C/C++ inline functions. The inline functions do have the + added value of having strongtyped arguments provoking more + readable warning messages in user application code.</small></P> + +<PRE> + inline ZZIP_DISK_ENTRY* +zzip_mem_disk_findfirst(ZZIP_MEM_DISK* dir); + inline ZZIP_DISK_ENTRY* +zzip_mem_disk_findnext(ZZIP_MEM_DISK* dir, ZZIP_DISK_ENTRY* entry); + inline char* _zzip_restrict +zzip_mem_disk_entry_strdup_name(ZZIP_MEM_DISK* dir, + ZZIP_DISK_ENTRY* entry); + inline struct zzip_file_header* +zzip_mem_disk_entry_to_file_header(ZZIP_MEM_DISK* dir, + ZZIP_DISK_ENTRY* entry); + inline char* +zzip_mem_disk_entry_to_data(ZZIP_MEM_DISK* dir, ZZIP_DISK_ENTRY* entry); + inline ZZIP_DISK_ENTRY* +zzip_mem_disk_findfile(ZZIP_MEM_DISK* dir, + char* filename, ZZIP_DISK_ENTRY* after, + zzip_strcmp_fn_t compare); + inline ZZIP_DISK_ENTRY* +zzip_mem_disk_findmatch(ZZIP_MEM_DISK* dir, + char* filespec, ZZIP_DISK_ENTRY* after, + zzip_fnmatch_fn_t compare, int flags); + inline ZZIP_DISK_FILE* _zzip_restrict +zzip_mem_disk_entry_fopen (ZZIP_MEM_DISK* dir, ZZIP_DISK_ENTRY* entry); + inline ZZIP_DISK_FILE* _zzip_restrict +zzip_mem_disk_fopen (ZZIP_MEM_DISK* dir, char* filename); + inline _zzip_size_t +zzip_mem_disk_fread (void* ptr, _zzip_size_t size, _zzip_size_t nmemb, + ZZIP_DISK_FILE* file); + inline int +zzip_mem_disk_fclose (ZZIP_DISK_FILE* file); + inline int +zzip_mem_disk_feof (ZZIP_DISK_FILE* file); +</PRE> +</section></section> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/mksite.pl b/Build/source/libs/zziplib/zziplib-0.13.58/docs/mksite.pl new file mode 100644 index 00000000000..650a8adec29 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/mksite.pl @@ -0,0 +1,2114 @@ +#! /usr/bin/perl +# this is the perl variant of the mksite script. It based directly on a +# copy of mksite.sh which is derived from snippets that I was using to +# finish doc pages for website publishing. Using only sh/sed along with +# files has a great disadvantage: it is very slow process atleast. The +# perl language in contrast has highly optimized string, replace, search +# functions as well as data structures to store intermediate values. As +# an advantage large parts of the syntax are similar to the sh/sed variant. +# +# http://zziplib.sf.net/mksite/ +# THE MKSITE.SH (ZLIB/LIBPNG) LICENSE +# Copyright (c) 2004 Guido Draheim <guidod@gmx.de> +# This software is provided 'as-is', without any express or implied warranty +# In no event will the authors be held liable for any damages arising +# from the use of this software. +# Permission is granted to anyone to use this software for any purpose, +# including commercial applications, and to alter it and redistribute it +# freely, subject to the following restrictions: +# 1. The origin of this software must not be misrepresented; you must not +# claim that you wrote the original software. If you use this software +# in a product, an acknowledgment in the product documentation would be +# appreciated but is not required. +# 2. Altered source versions must be plainly marked as such, and must not +# be misrepresented as being the original software. +# 3. This notice may not be removed or altered from any source distribution. +# $Id: mksite.pl,v 1.1 2005/12/13 00:27:06 guidod Exp $ + +use strict; use warnings; no warnings "uninitialized"; +use File::Basename qw(basename); +use POSIX qw(strftime); + +# initialize some defaults +my $SITEFILE=""; +$SITEFILE="site.htm" if not $SITEFILE and -f "site.htm"; +$SITEFILE="site.html" if not $SITEFILE and -f "site.html"; +$SITEFILE="site.htm" if not $SITEFILE; +# my $MK="-mksite"; # note the "-" at the start +my $SED="sed"; + +my $INFO="~~"; # extension for meta data files +my $HEAD="~head~"; # extension for head sed script +my $BODY="~body~"; # extension for body sed script +my $FOOT="~foot~"; # append to body text (non sed) + +my $SED_LONGSCRIPT="$SED -f"; + +my $az="a-z"; # for perl +my $AZ="A-Z"; # we may assume there are +my $NN="0-9"; # char-ranges available +my $AA="_$NN$AZ$az"; # that makes the resulting +my $AX="$AA.+-"; # script more readable + +my $n = "\n"; + +# LANG="C" ; LANGUAGE="C" ; LC_COLLATE="C" # these are needed for proper +# export LANG LANGUAGE LC_COLLATE # lowercasing as some collate + # treat A-Z to include a-z + +# ========================================================================== +# reading options from the command line GETOPT +my %o = (); # to store option variables +$o{variables}="files"; +$o{fileseparator}="?"; +$o{files}=""; +$o{main_file}=""; +$o{formatter}="$0"; +my $opt=""; +for my $arg (@ARGV) { # this variant should allow to embed spaces in $arg + if ($opt) { + $o{$opt}=$arg; + $opt=""; + } else { + $_=$arg; + if (/^-.*=.*$/) { + $opt=$arg; $opt =~ s/-*([$AA][$AA-]*).*/$1/; $opt =~ y/-/_/; + if (not $opt) { + print STDERR "ERROR: invalid option $arg$n"; + } else { + $arg =~ s/^[^=]*=//; + $o{$opt} = $arg; + $o{variables} .= " ".$opt; + } + $opt="";; + } elsif (/^-.*-.*$/) { + $opt=$arg; $opt =~ s/-*([$AA][$AA-]*).*/$1/; $opt =~ y/-/_/; + if (not $opt) { + print STDERR "ERROR: invalid option $arg$n"; + $opt=""; + } else { + # keep the option for next round + } ;; + } elsif (/^-.*/) { + $opt=$arg; $opt =~ s/^-*([$AA][$AA-]*).*/$1/; $opt =~ y/-/_/; + if (not $opt) { + print STDERR "ERROR: invalid option $arg$n"; + } else { + $arg =~ s/^[^=]*=//; + $o{$opt} = ' '; + } + $opt="" ;; + } else { + if (not $o{main_file}) { $o{main_file} = $arg; } else { + $o{files} .= $o{fileseparator} if $o{files}; + $o{files} .= $arg; }; + $opt="" ;; + }; + } +} ; if ($opt) { + $o{$opt}=" "; + $opt=""; + } + +### env | grep ^opt + +$SITEFILE=$o{main_file} if $o{main_file} and -f $o{main_file}; +$SITEFILE=$o{site_file} if $o{site_file} and -f $o{site_file}; + +if ($o{help}) { + $_=$SITEFILE; + print "$0 [sitefile]$n"; + print " default sitefile = $_$n"; + print "options:$n" + . " --filelist : show list of target files as ectracted from $_$n" + . " --src xx : if source files are not where mksite is executed$n"; + exit; + print " internal:$n" + ."--fileseparator=x : for building the internal filelist (def. '?')$n" + ."--files xx : for list of additional files to be processed$n" + ."--main-file xx : for the main sitefile to take file list from$n"; +} + +if (not $SITEFILE) { + print STDERR "error: no SITEFILE found (default would be 'site.htm')$n"; + exit 1; +} else { + print STDERR "NOTE: sitefile: ",`ls -s $SITEFILE`,"$n"; +} + +# we use internal hashes to store mappings - kind of relational tables +my @MK_TAGS= (); # "./$MK.tags.tmp" +my @MK_VARS= (); # "./$MK.vars.tmp" +my @MK_META= (); # "./$MK.meta.tmp" +my @MK_METT= (); # "./$MK.mett.tmp" +my @MK_TEST= (); # "./$MK.test.tmp" +my @MK_FAST= (); # "./$MK.fast.tmp" +my @MK_GETS= (); # "./$MK.gets.tmp" +my @MK_PUTS= (); # "./$MK.puts.tmp" +my @MK_OLDS= (); # "./$MK.olds.tmp" +my @MK_SITE= (); # "./$MK.site.tmp" +my @MK_SECT1= (); # "./$MK.sect1.tmp" +my @MK_SECT2= (); # "./$MK.sect2.tmp" +my @MK_SECT3= (); # "./$MK.sect3.tmp" +my @MK_INFO= (); # "./$MK~~" +my %INFO= (); # used for $F.$PARTs +my %FAST= (); + +# ======================================================================== +# ======================================================================== +# ======================================================================== +# MAGIC VARS +# IN $SITEFILE +my $printerfriendly=""; +my $sectionlayout="list"; +my $sitemaplayout="list"; +my $simplevars="warn"; # <!--varname-->default +my $attribvars=" "; # <x ref="${varname:=default}"> +my $updatevars=" "; # <!--$varname:=-->default +my $expandvars=" "; # <!--$varname--> +my $commentvars=" "; # $updatevars && $expandsvars && $simplevars +my $sectiontab=" "; # highlight ^<td class=...>...href="$section" +my $currenttab=" "; # highlight ^<br>..<a href="$topic"> +my $headsection="no"; +my $tailsection="no"; +my $sectioninfo="no"; # using <h2> title <h2> = info text +my $emailfooter="no"; + +for (source($SITEFILE)) { + if (/<!--multi-->/) { + warn("WARNING: do not use <!--multi-->," + ." change to <!--mksite:multi--> $SITEFILE" + ."warning: or" + ." <!--mksite:multisectionlayout-->" + ." <!--mksite:multisitemaplayout-->"); + $sectionlayout="multi"; + $sitemaplayout="multi"; + } + if (/<!--mksite:multi-->/) { + $sectionlayout="multi"; + $sitemaplayout="multi"; + } + if (/<!--mksite:multilayout-->/) { + $sectionlayout="multi"; + $sitemaplayout="multi"; + } +} + +sub mksite_magic_option +{ + # $1 is word/option to check for + my ($U,$INP,$Z) = @_; + $INP=$SITEFILE if not $INP; + for (source($INP)) { + s/(<!--mksite:)($U)-->/$1$2: -->/g; + s/(<!--mksite:)(\w\w*)($U)-->/$1$3:$2-->/g; + /<!--mksite:$U:/ or next; + s/.*<!--mksite:$U:([^<>]*)-->.*/$1/; + s/.*<!--mksite:$U:([^-]*)-->.*/$1/; + /<!--mksite:$U:/ and next; + chomp; + return $_; + } + return ""; +} + +{ + my $x; + $x=mksite_magic_option("sectionlayout"); if + ($x =~ /^(list|multi)$/) { $sectionlayout="$x" ; } + $x=mksite_magic_option("sitemaplayout"); if + ($x =~ /^(list|multi)$/) { $sitemaplayout="$x" ; } + $x=mksite_magic_option("simplevars"); if + ($x =~ /^( |no|warn)$/) { $simplevars="$x" ; } + $x=mksite_magic_option("attribvars"); if + ($x =~ /^( |no|warn)$/) { $attribvars="$x" ; } + $x=mksite_magic_option("updatevars"); if + ($x =~ /^( |no|warn)$/) { $updatevars="$x" ; } + $x=mksite_magic_option("expandvars"); if + ($x =~ /^( |no|warn)$/) { $expandvars="$x" ; } + $x=mksite_magic_option("commentvars"); if + ($x =~ /^( |no|warn)$/) { $commentvars="$x" ; } + $x=mksite_magic_option("printerfriendly"); if + ($x =~ /^( |[.].*|[-]-.*)$/) { $printerfriendly="$x" ; } + $x=mksite_magic_option("sectiontab"); if + ($x =~ /^( |no|warn)$/) { $sectiontab="$x" ; } + $x=mksite_magic_option("currenttab"); if + ($x =~ /^( |no|warn)$/) { $currenttab="$x" ; } + $x=mksite_magic_option("sectioninfo"); if + ($x =~ /^( |no|[=:-])$/) { $sectioninfo="$x" ; } + $x=mksite_magic_option("commentvars"); if + ($x =~ /^( |no|warn)$/) { $commentvars="$x" ; } + $x=mksite_magic_option("emailfooter"); if + ($x) { $emailfooter="$x"; } +} + +$printerfriendly=$o{print} if $o{print}; +$updatevars="no" if $commentvars eq "no"; # duplicated into +$expandvars="no" if $commentvars eq "no"; # info2vars_sed +$simplevars="no" if $commentvars eq "no"; # function above + +print "NOTE: '$sectionlayout\'sectionlayout '$sitemaplayout\'sitemaplayout$n" + if -d "DEBUG"; +print "NOTE: '$simplevars\'simplevars '$printerfriendly\'printerfriendly$n" + if -d "DEBUG"; +print "NOTE: '$attribvars\'attribvars '$updatevars\'updatevars$n" + if -d "DEBUG"; +print "NOTE: '$expandvars\'expandvars '$commentvars\'commentvars $n" + if -d "DEBUG"; +print "NOTE: '$currenttab\'currenttab '$sectiontab\'sectiontab$n" + if -d "DEBUG"; +print "NOTE: '$headsection\'headsection '$tailsection\'tailsection$n" + if -d "DEBUG"; + +# ========================================================================== +# init a few global variables +# 0. INIT + +# $MK.tags.tmp - originally, we would use a lambda execution on each +# uppercased html tag to replace <P> with <p class="P">. Here we just +# walk over all the known html tags and make an sed script that does +# the very same conversion. There would be a chance to convert a single +# tag via "h;y;x" or something we do want to convert all the tags on +# a single line of course. +@MK_TAGS=(); +for my $P (qw/P H1 H2 H3 H4 H5 H6 DL DD DT UL OL LI PRE CODE TABLE TR TD TH + B U I S Q EM STRONG STRIKE CITE BIG SMALL SUP SUB TT THEAD TBODY + CENTER HR BR NOBR WBR SPAN DIV IMG ADRESS BLOCKQUOTE/) { + my $M=lc($P); + push @MK_TAGS, "s|<$P>|<$M class=\\\"$P\\\">|g;"; + push @MK_TAGS, "s|<$P |<$M class=\\\"$P\\\" |g;"; + push @MK_TAGS, "s|</$P>|</$M>|g;"; +} +push @MK_TAGS, "s|<>|\\ \\;|g;"; +push @MK_TAGS, "s|<->|<WBR />\\;|g;"; +# also make sure that some non-html entries are cleaned away that +# we are generally using to inject meta information. We want to see +# that meta ino in the *.htm browser view during editing but they +# shall not get present in the final html page for publishing. +my @DC_VARS = + ("contributor", "date", "source", "language", "coverage", "identifier", + "rights", "relation", "creator", "subject", "description", + "publisher", "DCMIType"); +my @_EQUIVS = + ("refresh", "expires", "content-type", "cache-control", + "redirect", "charset", # mapped to refresh / content-type + "content-language", "content-script-type", "content-style-type"); +for my $P (@DC_VARS) { # dublin core embedded + push @MK_TAGS, "s|<$P>[^<>]*</$P>||g;"; +} +for my $P (@_EQUIVS) { + push @MK_TAGS, "s|<$P>[^<>]*</$P>||g;"; +} +push @MK_TAGS, "s|<!--sect[$AZ$NN]-->||g;"; +push @MK_TAGS, "s|<!--[$AX]*[?]-->||g;"; +push @MK_TAGS, "s|<!--\\\$[$AX]*[?]:-->||g;"; +push @MK_TAGS, "s|<!--\\\$[$AX]*:[?=]-->||g;"; +push @MK_TAGS, "s|(<[^<>]*)\\\${[$AX]*:[?=]([^<{}>]*)}([^<>]*>)|\$1\$2\$3|g;"; + +my $TRIMM=" -e 's:^ *::' -e 's: *\$::'"; # trimm away leading/trailing spaces +sub trimm +{ + my ($T,$Z) = @_; + $T =~ s:\A\s*::s; $T =~ s:\s*\Z::s; + return $T; +} +sub trimmm +{ + my ($T,$Z) = @_; + $T =~ s:\A\s*::s; $T =~ s:\s*\Z::s; $T =~ s:\s+: :g; + return $T; +} +sub timezone +{ + # +%z is an extension while +%Z is supposed to be posix + my $tz; + eval { $tz = strftime("%z", localtime()) }; + return $tz if $tz =~ /[+]/; + return $tz if $tz =~ /[-]/; + return strftime("%Z", localtime()); +} + +sub timetoday +{ + return strftime("%Y-%m-%d", localtime()); +} +sub timetodays +{ + return strftime("%Y-%m%d", localtime()); +} + +sub esc +{ + my ($TXT,$XXX) = @_; + $TXT =~ s|&|\\\\&|g; + return $TXT; +} + +my %SOURCE; +sub source # $file : @lines +{ + my ($FILE,$Z) = @_; + if (exists $SOURCE{$FILE}) { return @{$SOURCE{$FILE}}; } + my @TEXT = (); + open FILE, "<$FILE" or die "could not open $FILE: $!"; + for my $line (<FILE>) { + push @TEXT, $line; + } close FILE; + @{$SOURCE{$FILE}} = @TEXT; + return @{$SOURCE{$FILE}}; +} +sub savesource # $file \@lines +{ + my ($FILE,$LINES,$Z) = @_; + @{$SOURCE{$FILE}} = @{$LINES}; +} + +my $F; # current file during loop <<<<<<<<< +my $i = 100; +sub savelist { + if (-d "DEBUG") { + my $X = "$F._$i"; $i++; $X =~ s|/|:|g; + open X, ">DEBUG/$X" or die "could not open $X: $!"; + print X "#! /usr/bin/perl -".$#_."$n"; + print X join("$n", @{$_[0]}),$n; close X; + } +} + +sub eval_MK_LIST # $str @list +{ + my $result = $_[0]; shift @_; + my $extra = ""; + my $script = "\$_ = \$result; my \$Z;"; + $script .= join(";$n ", @_); + $script .= "$n;\$result = \$_;$n"; + eval $script; + return $result.$extra; +} + +sub eval_MK_FILE { + my $FILENAME = $_[0]; shift @_; + my $result = ""; + my $script = "my \$FILE; my \$extra = ''; my \$Z; $n"; + $script.= "for (source('$FILENAME')) { $n"; + $script.= join(";$n ", @_); + $script.= "$n; \$result .= \$_; "; + $script.= "$n if(\$extra){\$result.=\$extra;\$extra='';\$result.=\"\\n\"}"; + $script.= "$n} if(\$extra){\$result.=\$extra;}$n"; + savelist([$script,""]); + eval $script; + return $result; +} +my $sed_add = "\$extra .= "; # "/r "; + +sub foo { print " '$F'$n"; } +sub ls_s { + my $result = `ls -s @_`; + chomp($result); + return $result; +} + +# ====================================================================== +# FUNCS + +my $SOURCEFILE; # current file <<<<<<<< +my @FILELIST; # <<<<<<< + +sub sed_slash_key # helper to escape chars special in /anchor/ regex +{ # currently escaping "/" "[" "]" "." + my $R = $_[0]; $R =~ s|[\"./[-]|\\$&|g; $R =~ s|\]|\\\\$&|g; + return $R; +} +sub sed_piped_key # helper to escape chars special in s|anchor|| regex +{ # currently escaping "|" "[" "]" "." + my $R = $_[0]; $R =~ s/[\".|[-]/\\$&/g; $R =~ s/\]/\\\\$&/g; + return $R; +} + +sub back_path # helper to get the series of "../" for a given path +{ + my ($R,$Z) = @_; if ($R !~ /\//) { return ""; } + $R =~ s|/[^/]*$|/|; $R =~ s|[^/]*/|../|g; + return $R; +} + +sub dir_name +{ + my $R = $_[0]; $R =~ s:/[^/][^/]*\$::; + return $R; +} + +sub info2test_sed # \@ \@ # cut out all old-style <!--vars--> usages +{ + my ($INP,$XXX) = @_; + $INP = \@{$INFO{$F}} if not $INP; + my @OUT = (); + my $V8=" *([^ ][^ ]*) (.*)"; + my $V9=" *DC[.]([^ ][^ ]*) (.*)"; + my $q="\\\$"; + my ($_x_,$_y_,$_X_,$_Y_); my $W = "WARNING:"; + $_x_= sub {"$W: assumed simplevar <!--$1--> changed to <!--$q$1:=-->" }; + $_y_= sub {"$W: assumed simplevar <!--$1--> changed to <!--$q$1:?-->" }; + $_X_= sub {"$W: assumed tailvar <!--$q$1:--> changed to <!--$q$1:=-->" }; + $_Y_= sub {"$W: assumed tailvar <!--$q$1:--> changed to <!--$q$1:?-->" }; + push @OUT, "s/^/ /;"; + for (@$INP) { + if (/^=....=formatter /) { next; }; + if (/=[Tt]ext=$V9%/){ push @OUT, esc("s|.*<!--($1)-->.*|".&$_x_."|;");} + if (/=[Nn]ame=$V9%/){ push @OUT, esc("s|.*<!--($1)[?]-->.*|".&$_y_."|;");} + if (/=[Tt]ext=$V8%/){ push @OUT, esc("s|.*<!--($1)-->.*|".&$_x_."|;");} + if (/=[Nn]ame=$V8%/){ push @OUT, esc("s|.*<!--($1)[?]-->.*|".&$_y_."|;");} + } + for (@$INP) { + if (/^=....=formatter /) { next; }; + if (/=[Tt]ext=$V9%/){ push @OUT, esc("s|.*<!--($1):-->.*|".&$_X_."|;");} + if (/=[Nn]ame=$V9%/){ push @OUT, esc("s|.*<!--($1)[?]:-->.*|".&$_Y_."|;");} + if (/=[Tt]ext=$V8%/){ push @OUT, esc("s|.*<!--($1):-->.*|".&$_X_."|;");} + if (/=[Nn]ame=$V8%/){ push @OUT, esc("s|.*<!--($1)[?]:-->.*|".&$_Y_."|;");} + } + push @OUT, "/^WARNING:/ || next;"; + return @OUT; +} + +sub info2vars_sed # generate <!--$vars--> substition sed addon script +{ + my ($INP,$Z) = @_; + $INP = \@{$INFO{$F}} if not $INP; + my @OUT = (); + my $V8=" *([^ ][^ ]*) +(.*)"; + my $V9=" *DC[.]([^ ][^ ]*) +(.*)"; + my $N8=" *([^ ][^ ]*) ([$NN].*)"; + my $N9=" *DC[.]([^ ][^ ]*) ([$NN].*)"; + my $V0="([<]*)\\\$"; + my $V1="([^<>]*)\\\$"; + my $V2="([^{<>}]*)"; + my $V3="([^<>]*)"; + my $SS="<"."<>".">"; # spacer so value="2004" dont make for s|\(...\)|\12004| + $Z="\$Z="; + $updatevars = "no" if $commentvars eq "no"; # duplicated from + $expandvars = "no" if $commentvars eq "no"; # option handling + $simplevars = "no" if $commentvars eq "no"; # tests below + my @_INP = (); for (@{$INP}) { my $x=$_; $x =~ s/'/\\'/; push @_INP, $x; } + if ($expandvars ne "no") { + for (@_INP) { + if (/^=....=formatter /) { next; } + elsif (/^=name=$V9/){push @OUT, "\$Z='$2';s|<!--$V0$1\\?-->|- \$Z|;"} + elsif (/^=Name=$V9/){push @OUT, "\$Z='$2';s|<!--$V0$1\\?-->|(\$Z)|;"} + elsif (/^=name=$V8/){push @OUT, "\$Z='$2';s|<!--$V0$1\\?-->|- \$Z|;"} + elsif (/^=Name=$V8/){push @OUT, "\$Z='$2';s|<!--$V0$1\\?-->|(\$Z)|;"} + } + } + if ($expandvars ne "no") { + for (@_INP) { + if (/^=....=formatter /) { next; } + elsif (/^=text=$V9/){push @OUT, "\$Z='$2';s|<!--$V1$1-->|\$1$SS\$Z|;"} + elsif (/^=Text=$V9/){push @OUT, "\$Z='$2';s|<!--$V1$1-->|\$1$SS\$Z|;"} + elsif (/^=name=$V9/){push @OUT, "\$Z='$2';s|<!--$V1$1\\?-->|\$1$SS\$Z|;"} + elsif (/^=Name=$V9/){push @OUT, "\$Z='$2';s|<!--$V1$1\\?-->|\$1$SS\$Z|;"} + elsif (/^=text=$V8/){push @OUT, "\$Z='$2';s|<!--$V1$1-->|\$1$SS\$Z|;"} + elsif (/^=Text=$V8/){push @OUT, "\$Z='$2';s|<!--$V1$1-->|\$1$SS\$Z|;"} + elsif (/^=name=$V8/){push @OUT, "\$Z='$2';s|<!--$V1$1\\?-->|\$1$SS\$Z|;"} + elsif (/^=Name=$V8/){push @OUT, "\$Z='$2';s|<!--$V1$1\\?-->|\$1$SS\$Z|;"} + } + } + if ($simplevars ne "no" && $updatevars ne "no") { + for (@_INP) { my $Q = "[$AX]*"; + if (/^=....=formatter /) { next; } + elsif (/^=text=$V9/){push @OUT, "\$Z='$2';s|<!--$V0$1:-->$Q|\$Z|;"} + elsif (/^=Text=$V9/){push @OUT, "\$Z='$2';s|<!--$V0$1:-->$Q|\$Z|;"} + elsif (/^=name=$V9/){push @OUT, "\$Z='$2';s|<!--$V0$1\\?:-->$Q|- \$Z|;"} + elsif (/^=Name=$V9/){push @OUT, "\$Z='$2';s|<!--$V0$1\\?:-->$Q|(\$Z)|;"} + elsif (/^=text=$V8/){push @OUT, "\$Z='$2';s|<!--$V0$1:-->$Q|\$Z|;"} + elsif (/^=Text=$V8/){push @OUT, "\$Z='$2';s|<!--$V0$1:-->$Q|\$Z|;"} + elsif (/^=name=$V8/){push @OUT, "\$Z='$2';s|<!--$V0$1\\?:-->$Q|- \$Z|;"} + elsif (/^=Name=$V8/){push @OUT, "\$Z='$2';s|<!--$V0$1\\?:-->$Q|(\$Z)|;"} + } + } + if ($updatevars ne "no") { + for (@_INP) { my $Q = "[^<>]*"; + if (/^=....=formatter /) { next; } + elsif (/^=name=$V9/){push @OUT, "\$Z='$2';s|<!--$V0$1:\\?-->$Q|- \$Z|;"} + elsif (/^=Name=$V9/){push @OUT, "\$Z='$2';s|<!--$V0$1:\\?-->$Q|(\$Z)|;"} + elsif (/^=name=$V8/){push @OUT, "\$Z='$2';s|<!--$V0$1:\\?-->$Q|- \$Z|;"} + elsif (/^=Name=$V8/){push @OUT, "\$Z='$2';s|<!--$V0$1:\\?-->$Q|(\$Z)|;"} + } + } + if ($updatevars ne "no") { + for (@_INP) { my $Q = "[^<>]*"; + if (/^=....=formatter /) { next; } + elsif (/^=text=$V9/){push @OUT,"\$Z='$2';s|<!--$V1$1:\\=-->$Q|\$1$SS\$Z|;"} + elsif (/^=Text=$V9/){push @OUT,"\$Z='$2';s|<!--$V1$1:\\=-->$Q|\$1$SS\$Z|;"} + elsif (/^=name=$V9/){push @OUT,"\$Z='$2';s|<!--$V1$1:\\?-->$Q|\$1$SS\$Z|;"} + elsif (/^=Name=$V9/){push @OUT,"\$Z='$2';s|<!--$V1$1:\\?-->$Q|\$1$SS\$Z|;"} + elsif (/^=text=$V8/){push @OUT,"\$Z='$2';s|<!--$V1$1:\\=-->$Q|\$1$SS\$Z|;"} + elsif (/^=Text=$V8/){push @OUT,"\$Z='$2';s|<!--$V1$1:\\=-->$Q|\$1$SS\$Z|;"} + elsif (/^=name=$V8/){push @OUT,"\$Z='$2';s|<!--$V1$1:\\?-->$Q|\$1$SS\$Z|;"} + elsif (/^=Name=$V8/){push @OUT,"\$Z='$2';s|<!--$V1$1:\\?-->$Q|\$1$SS\$Z|;"} + } + } + if ($attribvars ne "no") { + for (@_INP) { my $Q = "[^<>]*"; + if (/^=....=formatter /) { next; } + elsif (/^=text=$V9/){push @OUT,"\$Z='$2';s|<$V1\{$1:[=]$V2}$V3>|<\$1$SS\$Z\$3>|;"} + elsif (/^=Text=$V9/){push @OUT,"\$Z='$2';s|<$V1\{$1:[=]$V2}$V3>|<\$1$SS\$Z\$3>|;"} + elsif (/^=name=$V9/){push @OUT,"\$Z='$2';s|<$V1\{$1:[?]$V2}$V3>|<\$1$SS\$Z\$3>|;"} + elsif (/^=Name=$V9/){push @OUT,"\$Z='$2';s|<$V1\{$1:[?]$V2}$V3>|<\$1$SS\$Z\$3>|;"} + elsif (/^=text=$V8/){push @OUT,"\$Z='$2';s|<$V1\{$1:[=]$V2}$V3>|<\$1$SS\$Z\$3>|;"} + elsif (/^=Text=$V8/){push @OUT,"\$Z='$2';s|<$V1\{$1:[=]$V2}$V3>|<\$1$SS\$Z\$3>|;"} + elsif (/^=name=$V8/){push @OUT,"\$Z='$2';s|<$V1\{$1:[?]$V2}$V3>|<\$1$SS\$Z\$3>|;"} + elsif (/^=Name=$V8/){push @OUT,"\$Z='$2';s|<$V1\{$1:[?]$V2}$V3>|<\$1$SS\$Z\$3>|;"} + } + for (split / /, $o{variables}) { + {push @OUT,"\$Z='$o{$_}';s|<$V1\{$_:[?]$V2}$V3>|<\$1$SS\$Z\$3>|;"} + } + } + if ($simplevars ne "no") { + for (@_INP) { my $Q = "[$AX]*"; + if (/^=....=formatter /) { next; } + elsif (/^=text=$V9/){push @OUT, "\$Z='$2';s|<!--$1-->$Q|\$Z|;"} + elsif (/^=Text=$V9/){push @OUT, "\$Z='$2';s|<!--$1-->$Q|\$Z|;"} + elsif (/^=name=$V9/){push @OUT, "\$Z='$2';s|<!--$1\\?-->$Q| - \$Z|;"} + elsif (/^=Name=$V9/){push @OUT, "\$Z='$2';s|<!--$1\\?-->$Q| (\$Z)|;"} + elsif (/^=text=$V8/){push @OUT, "\$Z='$2';s|<!--$1-->$Q|\$Z|;"} + elsif (/^=Text=$V8/){push @OUT, "\$Z='$2';s|<!--$1-->$Q|\$Z|;"} + elsif (/^=name=$V8/){push @OUT, "\$Z='$2';s|<!--$1\\?-->$Q| - \$Z|;"} + elsif (/^=Name=$V8/){push @OUT, "\$Z='$2';s|<!--$1\\?-->$Q| (\$Z)|;"} + } + } + # if value="2004" then generated sed might be "\\12004" which is bad + # instead we generate an edited value of "\\1$SS$value" and cut out + # the spacer now after expanding the variable values: + push @OUT, "s|$SS||g;"; + return @OUT; + +} + +sub info2meta_sed # generate <meta name..> text portion +{ + my ($INP,$XXX) = @_; + $INP = \@{$INFO{$F}} if not $INP; + my @OUT = (); + # http://www.metatab.de/meta_tags/DC_type.htm + my $V6=" *HTTP[.]([^ ]+) (.*)"; + my $V7=" *DC[.]([^ ]+) (.*)"; + my $V8=" *([^ ]+) (.*)" ; + sub __TYPE_SCHEME { "name=\"DC.type\" content=\"$2\" scheme=\"$1\"" }; + sub __DCMI { "name=\"$1\" content=\"$2\" scheme=\"DCMIType\"" }; + sub __NAME { "name=\"$1\" content=\"$2\"" }; + sub __NAME_TZ { "name=\"$1\" content=\"$2 ".&timezone()."\"" }; + sub __HTTP { "http-equiv=\"$1\" content=\"$2\"" }; + for (@$INP) { + if (/=....=today /) { next; } + if (/=meta=HTTP[.]/ && /=meta=$V6/) { + push @OUT, " <meta ${\(__HTTP)} />" if $2; next; } + if (/=meta=DC[.]DCMIType / && /=meta=$V7/) { + push @OUT, " <meta ${\(__TYPE_SCHEME)} />" if $2; next; } + if (/=meta=DC[.]type Collection$/ && /=meta=$V8/) { + push @OUT, " <meta ${\(__DCMI)} />" if $2; next; } + if (/=meta=DC[.]type Dataset$/ && /=meta=$V8/) { + push @OUT, " <meta ${\(__DCMI)} />" if $2; next; } + if (/=meta=DC[.]type Event$/ && /=meta=$V8/) { + push @OUT, " <meta ${\(__DCMI)} />" if $2; next; } + if (/=meta=DC[.]type Image$/ && /=meta=$V8/) { + push @OUT, " <meta ${\(__DCMI)} />" if $2; next; } + if (/=meta=DC[.]type Service$/ && /=meta=$V8/) { + push @OUT, " <meta ${\(__DCMI)} />" if $2; next; } + if (/=meta=DC[.]type Software$/ && /=meta=$V8/) { + push @OUT, " <meta ${\(__DCMI)} />" if $2; next; } + if (/=meta=DC[.]type Sound$/ && /=meta=$V8/) { + push @OUT, " <meta ${\(__DCMI)} />" if $2; next; } + if (/=meta=DC[.]type Text$/ && /=meta=$V8/) { + push @OUT, " <meta ${\(__DCMI)} />" if $2; next; } + if (/=meta=DC[.]date[.].*[+]/ && /=meta=$V8/) { + push @OUT, " <meta ${\(__NAME)} />" if $2; next; } + if (/=meta=DC[.]date[.].*[:]/ && /=meta=$V8/) { + push @OUT, " <meta ${\(__NAME_TZ)} />" if $2; next; } + if (/=meta=/ && /=meta=$V8/) { + push @OUT, " <meta ${\(__NAME)} />" if $2; next; } + } + return @OUT; +} + +sub info_get_entry # get the first <!--vars--> value known so far +{ + my ($TXT,$INP,$XXX) = @_; + $TXT = "sect" if not $TXT; + $INP = \@{$INFO{$F}} if not $INP; + for (grep {/=text=$TXT /} @$INP) { + my $info = $_; + $info =~ s/=text=$TXT //; + chomp($info); chomp($info); return $info; + } +} + +sub info1grep # test for a <!--vars--> substition to be already present +{ + my ($TXT,$INP,$XXX) = @_; + $TXT = "sect" if not $TXT; + $INP = \@{$INFO{$F}} if not $INP; + return scalar(grep {/^=text=$TXT /} @$INP); # returning the count +} + +sub dx_init +{ + @{$INFO{$F}} = (); + &dx_meta ("formatter", basename($o{formatter})); + for (split / /, $o{variables}) { # commandline --def=value + if (/_/) { my $u=$_; $u =~ y/_/-/; # makes for <!--$def--> override + &dx_meta ($u, $o{$_}); + } else { &dx_text ($_, $o{$_}); } + } +} + +sub dx_line +{ + my ($U,$V,$W,$Z) = @_; chomp($U); chomp($V); + push @{$INFO{$F}}, $U.$V." ".trimmm($W); +} + +sub DX_line +{ + my ($U,$V,$W,$Z) = @_; $W =~ s/<[^<>]*>//g; + &dx_line ($U,$V,$W); +} + +sub dx_text +{ + my ($U,$V,$Z) = @_; + &dx_line ("=text=",$U,$V); +} + +sub DX_text # add a <!--vars--> substition includings format variants +{ + my ($N, $T,$XXX) = @_; + $N = trimm($N); $T = trimm($T); + if ($N) { + if ($T) { + my $text=lc("$T"); $text =~ s/<[^<>]*>//g; + &dx_line ("=text=",$N,$T); + &dx_line ("=name=",$N,$text); + my $varname=$N; $varname =~ s/.*[.]//; # cut out front part + if ($N ne $varname and $varname) { + $text=lc("$varname $T"); $text =~ s/<[^<>]*>//g; + &dx_line ("=Text=",$varname,$T); + &dx_line ("=Name=",$varname,$text); + } + } + } +} + +sub dx_meta +{ + my ($U,$V,$Z) = @_; + &DX_line ("=meta=",$U,$V); +} + +sub DX_meta # add simple meta entry and its <!--vars--> subsitution +{ + my ($U,$V,$Z) = @_; + &DX_line ("=meta=",$U,$V); + &DX_text ("$U", $V); +} + +sub DC_meta # add new DC.meta entry plus two <!--vars--> substitutions +{ + my ($U,$V,$Z) = @_; + &DX_line ("=meta=","DC.$U",$V); + &DX_text ("DC.$U", $V); + &DX_text ("$U", $V); +} + +sub HTTP_meta # add new HTTP.meta entry plus two <!--vars--> substitutions +{ + my ($U,$V,$Z) = @_; + &DX_line ("=meta=","HTTP.$U",$V); + &DX_text ("HTTP.$U", $V); + &DX_text ("$U", $V); +} + +sub DC_VARS_Of # check DC vars as listed in $DC_VARS global/generate DC_meta +{ # the results will be added to .meta.tmp and .vars.tmp later + my ($FILENAME,$Z)= @_; + $FILENAME=$SOURCEFILE if not $FILENAME; + for my $M (@DC_VARS, "title") { + # scan for a <markup> of this name FIXME + my ($part,$text); + for (source($FILENAME)) { + /<$M>/ or next; s|.*<$M>||; s|</$M>.*||; + $part = trimm($_); last; + } + $text=$part; $text =~ s|^\w*:||; $text = trimm($text); + next if not $text; + # <mark:part> will be <meta name="mark.part"> + if ($text ne $part) { + my $N=$part; $N =~ s/:.*//; + &DC_meta ("$M.$N", $text); + } elsif ($M eq "date") { + &DC_meta ("$M.issued", $text); # "<date>" -> "<date>issued:" + } else { + &DC_meta ("$M", $text); + } + } +} + +sub HTTP_VARS_Of # check HTTP-EQUIVs as listed in $_EQUIV global then +{ # generate meta tags that are http-equiv= instead of name= + my ($FILENAME,$Z)= @_; + $FILENAME=$SOURCEFILE if not $FILENAME; + for my $M (@_EQUIVS) { + # scan for a <markup> of this name FIXME + my ($part,$text); + for (source($FILENAME)) { + /<$M>/ or next; s|.*<$M>||; s|</$M>.*||; + $part = trimm($_); last; + } + $text=$part; $text =~ s|^\w*:||; $text = trimm($text); + next if not $text; + if ($M eq "redirect") { + &HTTP_meta ("refresh", "5; url=$text"); &DX_text ("$M", $text); + } elsif ($M eq "charset") { + &HTTP_meta ("content-type", "text/html; charset=$text"); + } else { + &HTTP_meta ("$M", $text); + } + } +} + +sub DC_isFormatOf # make sure there is this DC.relation.isFormatOf tag +{ # choose argument for a fallback (usually $SOURCEFILE) + my ($NAME,$Z) = @_; + $NAME=$SOURCEFILE if not $NAME; + if (not &info1grep ("DC.relation.isFormatOf")) { + &DC_meta ("relation.isFormatOf", "$NAME"); + } +} + +sub DC_publisher # make sure there is this DC.publisher meta tag +{ # choose argument for a fallback (often $USER) + my ($NAME,$Z) = @_; + $NAME=$ENV{"USER"} if not $NAME; + if (not &info1grep ("DC.publisher")) { + &DC_meta ("publisher", "$NAME"); + } +} + +sub DC_modified # make sure there is a DC.date.modified meta tag +{ # maybe choose from filesystem dates if possible + my ($Q,$Z) = @_; # target file + if (not &info1grep ("DC.date.modified")) { + my @stats = stat($Q); + my $text = strftime("%Y-%m-%d", localtime($stats[9])); + &DC_meta ("date.modified", $text); + } +} + +sub DC_date # make sure there is this DC.date meta tag +{ # choose from one of the available DC.date.* specials + my ($Q,$Z) = @_; # source file + if (&info1grep ("DC.date")) { + &DX_text ("issue", "dated ".&info_get_entry("DC.date")); + &DX_text ("updated", &info_get_entry("DC.date")); + } else { + my $text=""; my $kind; + for $kind (qw/available issued modified created/) { + $text=&info_get_entry("DC.date.$kind"); + # test ".$text" != "." && echo "$kind = date = $text ($Q)" + last if $text; + } + if (not $text) { + my $part; my $M="date"; + for (source($Q)) { + /<$M>/ or next; s|.*<$M>||; s|</$M>.*||; + $part=trimm($_); last; + } + $text=$part; $text =~ s|^[$AA]*:||; + $text = &trimm ($text); + } + if (not $text) { + my $part; my $M="!--date:*=*--"; # takeover updateable variable... + for (source($Q)) { + /<$M>/ or next; s|.*<$M>||; s|</.*||; + $part=trimm($_); last; + } + $text=$part; $text =~ s|^[$AA]*:||; $text =~ s|\&.*||; + $text = &trimm ($text); + } + $text =~ s/[$NN]*:.*//; # cut way seconds + &DX_text ("updated", $text); + my $text1=$text; $text1 =~ s|^.* *updated ||; + if ($text ne $text1) { + $kind="modified" ; $text=$text1; $text =~ s|,.*||; + } + $text1=$text; $text1 =~ s|^.* *modified ||; + if ($text ne $text1) { + $kind="modified" ; $text=$text1; $text =~ s|,.*||; + } + $text1=$text; $text1 =~ s|^.* *created ||; + if ($text ne $text1) { + $kind="created" ; $text=$text1; $text =~ s|,.*||; + } + &DC_meta ("date", "$text"); + &DX_text ("issue", "$kind $text"); + } +} + +sub DC_title +{ + # choose a title for the document, either an explicit title-tag + # or one of the section headers in the document or fallback to filename + my ($Q,$Z) = @_; # target file + my ($term, $text); + if (not &info1grep ("DC.title")) { + for my $M (qw/TITLE title H1 h1 H2 h2 H3 H3 H4 H4 H5 h5 H6 h6/) { + for (source($Q)) { + /<$M>/ or next; s|.*<$M>||; s|</$M>.*||; + $text = trimm($_); last; + } + last if $text; + for (source($Q)) { + /<$M [^<>]*>/ or next; s|.*<$M [^<>]*>||; s|</$M>.*||; + $text = trimm($_); last; + } + last if $text; + } + if (not $text) { + $text=basename($Q,".html"); + $text=basename($text,".htm"); $text =~ y/_/ /; $text =~ s/$/ info/; + $text=~ s/\n/ /g; + } + $term=$text; $term =~ s/.*[\(]//; $term =~ s/[\)].*//; + $text =~ s/[\(][^\(\)]*[\)]//; + if (not $term or $term eq $text) { + &DC_meta ("title", "$text"); + } else { + &DC_meta ("title", "$term - $text"); + } + } +} + +sub site_get_section # return parent section page of given page +{ + my $_F_ = &sed_slash_key(@_); + for my $x (grep {/=sect=$_F_ /} @MK_INFO) { + my $info = $x; $info =~ s/=sect=[^ ]* //; return $info; + } +} + +sub DC_section # not really a DC relation (shall we use isPartOf ?) +{ # each document should know its section father + my $sectn = &site_get_section($F); + if ($sectn) { + &DC_meta ("relation.section", $sectn); + } +} + +sub info_get_entry_section +{ + return &info_get_entry("DC.relation.section"); +} + +sub site_get_selected # return section of given page +{ + my $_F_ = &sed_slash_key(@_); + for my $x (grep {/=[u]se.=$_F_ /} @MK_INFO) { + my $info = $x; $info =~ s/=[u]se.=[^ ]* //; return $info; + } +} + +sub DC_selected # not really a DC title (shall we use alternative ?) +{ + # each document might want to highlight the currently selected item + my $short=&site_get_selected($F); + if ($short) { + &DC_meta ("title.selected", $short); + } +} + +sub info_get_entry_selected +{ + return &info_get_entry("DC.title.selected"); +} + +sub site_get_rootsections # return all sections from root of nav tree +{ + my @OUT; + for (grep {/=[u]se1=/} @MK_INFO) { + my $x = $_; + $x =~ s/=[u]se.=([^ ]*) .*/$1/; + push @OUT, $x; + } + return @OUT; +} + +sub site_get_sectionpages # return all children pages in the given section +{ + my $_F_=&sed_slash_key(@_); + my @OUT = (); + for (grep {/^=sect=[^ ]* $_F_$/} @MK_INFO) { + my $x = $_; + $x =~ s/^=sect=//; $x =~ s/ .*//; + push @OUT, $x; + } + return @OUT; +} + +sub site_get_subpages # return all page children of given page +{ + my $_F_=&sed_slash_key(@_); + my @OUT = (); + for (grep {/^=node=[^ ]* $_F_$/} @MK_INFO) { + my $x = $_; + $x =~ s/^=node=//; $x =~ s/ .*//; + push @OUT, $x; + } + return @OUT; +} + +sub site_get_parentpage # ret parent page for given page (".." for sections) +{ + my $_F_=&sed_slash_key(@_); + for (grep {/^=node=$_F_ /} @MK_INFO) { + my $x = $_; + $x =~ s/^=node=[^ ]* //; + return $x; + } +} + +sub DX_alternative # detect wether page asks for alternative style +{ # which is generally a shortpage variant + my ($U,$Z) = @_; + my $x=&mksite_magic_option("alternative",$U); + $x =~ s/^ *//; $x =~s/ .*//; + if ($x) { + &DX_text ("alternative", $x); + } +} + +sub info2head_sed # append alternative handling script to $HEAD +{ + my @OUT = (); + my $have=&info_get_entry("alternative"); + if ($have) { + push @OUT, "/<!--mksite:alternative:$have .*-->/ && do {"; + push @OUT, "s/<!--mksite:alternative:$have( .*)-->/\$1/"; + push @OUT, "$sed_add \$_; last; };"; + } + return @OUT; +} +sub info2body_sed # append alternative handling script to $BODY +{ + my @OUT = (); + my $have=&info_get_entry("alternative"); + if ($have) { + push @OUT, "s/<!--mksite:alternative:$have( .*)-->/\$1/"; + } + return @OUT; +} + +sub bodymaker_for_sectioninfo +{ + if ($sectioninfo eq "no") { return ""; } + my $_x_="<!--mksite:sectioninfo::-->"; + my $_q_="([^<>]*[$AX][^<>]*)"; + $_q_="[ ][ ]*$sectioninfo([ ])" if $sectioninfo ne " "; + my @OUT = (); + push @OUT, "s|(^<[hH][$NN][ >].*</[hH][$NN]>)$_q_|\$1$_x_\$2|"; + push @OUT, "/$_x_/ and s|^|<table width=\"100%\"><tr valign=\"bottom\"><td>|"; + push @OUT, "/$_x_/ and s|</[hH][$NN]>|&</td><td align=\"right\"><i>|"; + push @OUT, "/$_x_/ and s|\$|</i></td></tr></table>|"; + push @OUT, "s|$_x_||"; + return @OUT; +} + +sub fast_href # args "$FILETOREFERENCE" "$FROMCURRENTFILE:$F" +{ # prints path to $FILETOREFERENCE href-clickable in $FROMCURRENTFILE + # if no subdirectoy then output is the same as input $FILETOREFERENCE + my ($T,$R,$Z) = @_; + my $S=&back_path ($R); + if (not $S) { + return $T; + } else { + my $t=$T; + $t =~ s/^ *$//; $t =~ s/^\/.*//; + $t =~ s/^[.][.].*//; $t =~ s/^\w*:.*//; + if (not $t) { # don't move any in the pattern above + return $T; + } else { + return "$S$T"; # prefixed with backpath + } + } +} + +sub make_fast # experimental - make a FAST file that can be applied +{ # to htm sourcefiles in a subdirectory of the sitefile. +# R="$1" ; test ".$R" = "." && R="$F" + my ($R,$Z) = @_; + my $S=&back_path ($R); + my @OUT = (); + if (not $S) { + # echo "backpath '$F' = none needed" + return @OUT; + } else { + # print "backpath '$F' -> '$S'$n"; + my @hrefs = (); + for (source($SITEFILE)) { + /href=\"[^\"]*\"/ or next; + s/.*href=\"//; s/\".*//; chomp; + if (/^ *$/ || /^\// || /^[.][.]/ || /^[\w]*:/) { next; } + push @hrefs, $_; + } + for (source($SOURCEFILE)) { + /href=\"[^\"]*\"/ or next; + s/.*href=\"//; s/\".*//; chomp; + if (/^ *$/ || /^\// || /^[.][.]/ || /^[\w]*:/) { next; } + push @hrefs, $_; + } + my $ref = ""; + for (sort(@hrefs)) { + next if /\$/; # some href="${...}" is problematic + next if $ref eq $_; $ref = $_; # uniq + push @OUT, "s|href=\\\"$ref\\\"|href=\\\"$S$ref\\\"|;"; + } + return @OUT; + } +} + +# ============================================================== SITE MAP INFO +# each entry needs atleast a list-title, a long-title, and a list-date +# these are the basic information to be printed in the sitemap file +# where it is bound the hierarchy of sect/subsect of the entries. + +sub site_map_list_title # $file $text +{ + my ($U,$V,$Z) = @_; chomp($U); + push @MK_INFO, "=list=$U ".trimm($V); +} +sub info_map_list_title # $file $text +{ + my ($U,$V,$Z) = @_; chomp($U); + push @{$INFO{$U}}, "=list=".trimm($V); +} +sub site_map_long_title # $file $text +{ + my ($U,$V,$Z) = @_; chomp($U); + push @MK_INFO, "=long=$U ".trimm($V); +} +sub info_map_long_title # $file $text +{ + my ($U,$V,$Z) = @_; chomp($U); + push @{$INFO{$U}}, "=long=".trimm($V); +} +sub site_map_list_date # $file $text +{ + my ($U,$V,$Z) = @_; chomp($U); + push @MK_INFO, "=date=$U ".trimm($V); +} +sub info_map_list_date # $file $text +{ + my ($U,$V,$Z) = @_; chomp($U); + push @{$INFO{$U}}, "=date=".trimm($V); +} + +sub site_get_list_title +{ + my ($U,$V,$Z) = @_; + for (@MK_INFO) { if (m|^=list=$U (.*)|) { return $1; } } return ""; +} +sub site_get_long_title +{ + my ($U,$V,$Z) = @_; + for (@MK_INFO) { if (m|^=long=$U (.*)|) { return $1; } } return ""; +} +sub site_get_list_date +{ + my ($U,$V,$Z) = @_; + for (@MK_INFO) { if (m|^=date=$U (.*)|) { return $1; } } return ""; +} + +sub siteinfo2sitemap# generate <name><page><date> addon sed scriptlet +{ # the resulting script will act on each item/line + # containing <!--"filename"--> and expand any following + # reference of <!--name--> or <!--date--> or <!--long--> + my ($INP,$Z) = @_ ; $INP= \@MK_INFO if not $INP; + my @OUT = (); + my $_list_= + sub{"s|<!--\\\"$1\\\"-->.*<!--name-->|\$\&<name href=\\\"$1\\\">$2</name>|"}; + my $_date_= + sub{"s|<!--\\\"$1\\\"-->.*<!--date-->|\$\&<date>$2</date>|"}; + my $_long_= + sub{"s|<!--\\\"$1\\\"-->.*<!--long-->|\$\&<long>$2</long>|"}; + + for (@$INP) { + my $info = $_; + $info =~ s:=list=([^ ]*) (.*):&$_list_:e; + $info =~ s:=date=([^ ]*) (.*):&$_date_:e; + $info =~ s:=long=([^ ]*) (.*):&$_long_:e; + $info =~ /^s\|/ || next; + push @OUT, $info; + } + return @OUT; +} + +sub make_multisitemap +{ # each category gets its own column along with the usual entries + my ($INPUTS,$Z)= @_ ; $INPUTS=\@MK_INFO if not $INPUTS; + @MK_SITE = &siteinfo2sitemap(); # have <name><long><date> addon-sed + my @OUT = (); + my $_form_= sub{"<!--\"$2\"--><!--use$1--><!--long--><!--end$1-->" + ."<br><!--name--><!--date-->" }; + my $_tiny_="small><small><small" ; my $_tinyX_="small></small></small "; + my $_tabb_="<br><$_tiny_> </$_tinyX_>" ; my $_bigg_="<big> </big>"; + push @OUT, "<table width=\"100%\"><tr><td> ".$n; + for (grep {/=[u]se.=/} @$INPUTS) { + my $x = $_; + $x =~ s|=[u]se(.)=([^ ]*) .*|&$_form_|e; + $x = &eval_MK_LIST($x, @MK_SITE); $x =~ /<name/ or next; + $x =~ s|<!--[u]se1-->|</td><td valign=\"top\"><b>|; + $x =~ s|<!--[e]nd1-->|</b>|; + $x =~ s|<!--[u]se2-->|<br>|; + $x =~ s|<!--[u]se.-->|<br>|; $x =~ s/<!--[^<>]*-->/ /g; + $x =~ s|<long>||; $x =~ s|</long>||; + $x =~ s|<name |<$_tiny_><a |; $x =~ s|</name>||; + $x =~ s|<date>| |; $x =~ s|</date>|</a><br></$_tinyX_>|; + push @OUT, $x.$n; + } + push @OUT, "</td><tr></table>".$n; + return @OUT; +} + +sub make_listsitemap +{ # traditional - the body contains a list with date and title extras + my ($INPUTS,$Z)= @_ ; $INPUTS=\@MK_INFO if not $INPUTS; + @MK_SITE = &siteinfo2sitemap(); # have <name><long><date> addon-sed + my @OUT = (); + my $_form_=sub{ + "<!--\"$2\"--><!--use$1--><!--name--><!--date--><!--long-->"}; + my $_tabb_="<td>\ \;</td>"; + push @OUT, "<table cellspacing=\"0\" cellpadding=\"0\">".$n; + my $xx; + for $xx (grep {/=[u]se.=/} @$INPUTS) { + my $x = "".$xx; + $x =~ s|=[u]se(.)=([^ ]*) .*|&$_form_|e; + $x = &eval_MK_LIST($x, @MK_SITE); $x =~ /<name/ or next; + $x =~ s|<!--[u]se(1)-->|<tr class=\"listsitemap$1\"><td>*</td>|; + $x =~ s|<!--[u]se(2)-->|<tr class=\"listsitemap$1\"><td>-</td>|; + $x =~ s|<!--[u]se(.)-->|<tr class=\"listsitemap$1\"><td> </td>|; + $x =~ /<tr.class=\"listsitemap3\">/ and $x =~ s|<name [^<>]*>|$&- |; + $x =~ s|<!--[^<>]*-->| |g; + $x =~ s|<name href=\"name:sitemap:|<name href=\"|; + $x =~ s|<name |<td><a |; $x =~ s|</name>|</a></td>$_tabb_|; + $x =~ s|<date>|<td><small>|; $x =~ s|</date>|</small></td>$_tabb_|; + $x =~ s|<long>|<td><em>|; $x =~ s|</long>|</em></td></tr>|; + push @OUT, $x; + } + for $xx (grep {/=[u]se.=/} @$INPUTS) { + my $x = $xx; $x =~ s/=[u]se.=name:sitemap://; $x =~ s:\s*::gs; + if (-f $x) { + for (grep {/<tr.class=\"listsitemap\d\">/} source($x)) { + push @OUT, $_; + } + } + } + push @OUT, "</table>".$n; + return @OUT; +} + +sub print_extension +{ + my ($ARG,$Z)= @_ ; $ARG=$o{print} if not $ARG; + if ($ARG =~ /^([.-])/) { + return $ARG; + } else { + return ".print"; + } +} + +sub html_sourcefile # generally just cut away the trailing "l" (ell) +{ # making "page.html" argument into "page.htm" return + my ($U,$Z) = @_; + my $_SRCFILE_=$U; $_SRCFILE_ =~ s/l$//; + if (-f $_SRCFILE_) { + return $_SRCFILE_; + } elsif (-f "$o{src_dir}/$_SRCFILE_") { + return "$o{src_dir}/$_SRCFILE_"; + } else { + return ".//$_SRCFILE_"; + } +} +sub html_printerfile_sourcefile +{ + my ($U,$Z) = @_; + if (not $printerfriendly) { + $U =~ s/l\$//; return $U; + } else { + my $_ext_=&sed_slash_key(&print_extension($printerfriendly)); + $U =~ s/l\$//; $U =~ s/$_ext_([.][\w]*)$/$1/; return $U; + } +} + +sub fast_html_printerfile { + my ($U,$V,$Z) = @_; + my $x=&html_printerfile($U) ; return basename($x); +# my $x=&html_printerfile($U) ; return &fast_href($x,$V); +} + +sub html_printerfile # generate the printerfile for a given normal output +{ + my ($U,$Z) = @_; + my $_ext_=&esc(&print_extension($printerfriendly)); + $U =~ s/([.][\w]*)$/$_ext_$1/; return $U; # index.html -> index.print.html +} + +sub make_printerfile_fast # generate s/file.html/file.print.html/ for hrefs +{ # we do that only for the $FILELIST + my ($U,$Z) = @_; + my $ALLPAGES=$U; + my @OUT = (); + for my $p (@$ALLPAGES) { + my $a=&sed_slash_key($p); + my $b=&html_printerfile($p); + if ($b ne $p) { + $b =~ s:/:\\/:g; + push @OUT, + "s/<a href=\\\"$a\\\"([^<>])*>/<a href=\\\"$b\\\"\$1>/;"; + } + } + return @OUT; +} + +sub echo_printsitefile_style +{ + my $_bold_="text-decoration : none ; font-weight : bold ; "; + return " <style>" + ."$n a:link { $_bold_ color : #000060 ; }" + ."$n a:visited { $_bold_ color : #000040 ; }" + ."$n body { background-color : white ; }" + ."$n </style>" + ."$n"; +} + +sub make_printsitefile_head # $sitefile +{ + my $MK_STYLE = &echo_printsitefile_style(); + my @OUT = (); + for (source($SITEFILE)) { + if (/<head>/) { push @OUT, $_; + push @OUT, $MK_STYLE; next; } + if (/<title>/) { push @OUT, $_; next; } + if (/<\/head>/) { push @OUT, $_; next; } + if (/<body>/) { push @OUT, $_; next; } + if (/<link [^<>]*rel=\"shortcut icon\"[^<>]*>/) { + push @OUT, $_; next; + } + } + return @OUT; +} + +# ------------------------------------------------------------------------ +# The printsitefile is a long text containing html href markups where +# each of the href lines in the file is being prefixed with the section +# relation. During a secondary call the printsitefile can grepp'ed for +# those lines that match a given output fast-file. The result is a +# navigation header with 1...3 lines matching the nesting level + +# these alt-texts will be only visible in with a text-mode browser: +my $printsitefile_square="width=\"8\" height=\"8\" border=\"0\""; +my $printsitefile_img_1="<img alt=\"|go text:\" $printsitefile_square />"; +my $printsitefile_img_2="<img alt=\"||topics:\" $printsitefile_square />"; +my $printsitefile_img_3="<img alt=\"|||pages:\" $printsitefile_square />"; +my $_SECT="mksite:sect:"; + +sub echo_current_line # $sect $extra +{ + # add the prefix which is used by select_in_printsitefile to cut out things + my ($N,$M,$Z) = @_; + return "<!--$_SECT\"$N\"-->$M"; +} +sub make_current_entry # $sect $file ## requires $MK_SITE +{ + my ($S,$R,$Z) = @_; + my $RR=&sed_slash_key($R); + my $sep=" - " ; my $_left_=" [ " ; my $_right_=" ] "; + my $name = site_get_list_title($R); + $_ = &echo_current_line ("$S", "<a href=\"$R\">$name</a>$sep"); + if ($R eq $S) { + s/<a href/$_left_$&/; + s/<\/a>/$&$_right_/; + } + return $_; +} +sub echo_subpage_line # $sect $extra +{ + my ($N,$M,$Z) = @_; + return "<!--$_SECT*:\"$N\"-->$M"; +} + +sub make_subpage_entry +{ + my ($S,$R,$Z) = @_; + my $RR=&sed_slash_key($R); + my $sep=" - " ; + my $name = site_get_list_title($R); + $_ = &echo_subpage_line ("$S", "<a href=\"$R\">$name</a>$sep"); + return $_; +} + +sub make_printsitefile +{ + # building the printsitefile looks big but its really a loop over sects + my ($INPUTS,$Z) = @_; $INPUTS=\@MK_INFO if not $INPUTS; + @MK_SITE = &siteinfo2sitemap(); # have <name><long><date> addon-sed + savelist(\@MK_SITE); + my @OUT = &make_printsitefile_head ($SITEFILE); + + my $sep=" - " ; + my $_sect1= + "<a href=\"#.\" title=\"section\">$printsitefile_img_1</a> ||$sep"; + my $_sect2= + "<a href=\"#.\" title=\"topics\">$printsitefile_img_2</a> ||$sep"; + my $_sect3= + "<a href=\"#.\" title=\"pages\">$printsitefile_img_3</a> ||$sep"; + + my $_SECT1="mksite:sect1"; + my $_SECT2="mksite:sect2"; + my $_SECT3="mksite:sect3"; + + @MK_SECT1 = &site_get_rootsections(); + # round one - for each root section print a current menu + for my $r (@MK_SECT1) { + push @OUT, &echo_current_line ("$r", "<!--$_SECT1:A--><br>$_sect1"); + for my $s (@MK_SECT1) { + push @OUT, &make_current_entry ("$r", "$s"); + } + push @OUT, &echo_current_line ("$r", "<!--$_SECT1:Z-->"); + } + + # round two - for each subsection print a current and subpage menu + for my $r (@MK_SECT1) { + @MK_SECT2 = &site_get_subpages ("$r"); + for my $s (@MK_SECT2) { + push @OUT, &echo_current_line ("$s", "<!--$_SECT2:A--><br>$_sect2"); + for my $t (@MK_SECT2) { + push @OUT, &make_current_entry ("$s", "$t"); + } # "$t" + push @OUT, &echo_current_line ("$s", "<!--$_SECT2:Z-->"); + } # "$s" + my $_have_children_=""; + for my $t (@MK_SECT2) { + if (not $_have_children_) { + push @OUT, &echo_subpage_line ("$r", "<!--$_SECT2:A--><br>$_sect2"); } + $_have_children_ .= "1"; + push @OUT, &make_subpage_entry ("$r", "$t"); + } + if ($_have_children_) { + push @OUT, &echo_subpage_line ("$r", "<!--$_SECT2:Z-->"); } + } # "$r" + + # round three - for each subsubsection print a current and subpage menu + for my $r (@MK_SECT1) { + @MK_SECT2 = &site_get_subpages ("$r"); + for my $s (@MK_SECT2) { + @MK_SECT3 = &site_get_subpages ("$s"); + for my $t (@MK_SECT3) { + push @OUT, &echo_current_line ("$t", "<!--$_SECT3:A--><br>$_sect3"); + for my $u (@MK_SECT3) { + push @OUT, &make_current_entry ("$t", "$u"); + } # "$t" + push @OUT, &echo_current_line ("$t", "<!--$_SECT3:Z-->"); + } # "$t" + my $_have_children_=""; + for my $u (@MK_SECT3) { + if (not $_have_children_) { + push @OUT, &echo_subpage_line ("$s", "<!--$_SECT3:A--><br>$_sect3"); } + $_have_children_ .= "1"; + push @OUT, &make_subpage_entry ("$s", "$u"); + } + if ($_have_children_) { + push @OUT, &echo_subpage_line ("$s", "<!--$_SECT3:Z-->"); } + } # "$s" + } # "$r" + push @OUT, "<a name=\".\"></a>"; + push @OUT, "</body></html>"; + return @OUT; +} + +# create a selector that can grep a printsitefile for the matching entries +sub select_in_printsitefile # arg = "page" : return to stdout >> $P.$HEAD +{ + my ($N,$Z) = @_; + my $_selected_="$N" ; $_selected_="$F" if not $_selected_; + my $_section_=&sed_slash_key($_selected_); + my @OUT = (); + push @OUT, "s/^<!--$_SECT\\\"$_section_\\\"-->//;"; # sect3 + push @OUT, "s/^<!--$_SECT\[*\]:\\\"$_section_\\\"-->//;"; # children + $_selected_=&site_get_parentpage($_selected_); + if ($F =~ /testscript/) { print "($F)parent=$_selected_$n"; } + $_section_=&sed_slash_key($_selected_); + push @OUT, "s/^<!--$_SECT\\\"$_section_\\\"-->//;"; # sect2 + $_selected_=&site_get_parentpage($_selected_); + $_section_=&sed_slash_key($_selected_); + push @OUT, "s/^<!--$_SECT\\\"$_section_\\\"-->//;"; # sect1 + push @OUT, "/^<!--$_SECT\\\"[^\\\"]*\\\"-->/ and next;"; + push @OUT, "/^<!--$_SECT\[*\]:\\\"[^\\\"]*\\\"-->/ and next;"; + push @OUT, "s/^<!--mksite:sect[$NN]:[$AZ]-->//;"; + return @OUT; +} + +sub body_for_emailfooter +{ + return "" if $emailfooter eq "no"; + my $_email_=$emailfooter; $_email_ =~ s|[?].*||; + my $_dated_=&info_get_entry("updated"); + return "<hr><table border=\"0\" width=\"100%\"><tr><td>" + ."$n"."<a href=\"mailto:$emailfooter\">$_email_</a>" + ."$n"."</td><td align=\"right\">" + ."$n"."$_dated_</td></tr></table>" + ."$n"; +} + +# ========================================================================== +# +# During processing we will create a series of intermediate files that +# store relations. They all have the same format being +# =relationtype=key value +# where key is usually s filename or an anchor. For mere convenience +# we assume that the source html text does not have lines that start +# off with =xxxx= (btw, ye remember perl section notation...). Of course +# any other format would be usuable as well. +# + +# we scan the SITEFILE for href references to be converted +# - in the new variant we use a ".gets.tmp" sed script that SECTS +# marks all interesting lines so they can be checked later +# with an sed anchor of <!--sect[$NN]--> (or <!--sect[$AZ]-->) +my $S="\\ \\;"; +# S="[&]nbsp[;]" + +# HR and EM style markups must exist in input - BR sometimes left out +# these routines in(ter)ject hardspace before, between, after markups +# note that "<br>" is sometimes used with HR - it must exist in input +sub echo_HR_EM_PP +{ + my ($U,$V,$W,$X,$Z) = @_; + my @list = ( + "/^$U$V$W*<a href=/ and s/^/$X/;", + "/^<>$U$V$W*<a href=/ and s/^/$X/;", + "/^$S$U$V$W*<a href=/ and s/^/$X/;", + "/^$U<>$V$W*<a href=/ and s/^/$X/;", + "/^$U$S$V$W*<a href=/ and s/^/$X/;", + "/^$U$V<>$W*<a href=/ and s/^/$X/;", + "/^$U$V$S$W*<a href=/ and s/^/$X/;" ); + return @list; +} + +sub echo_br_EM_PP +{ + my ($U,$V,$W,$X,$Z) = @_; + my @list = &echo_HR_EM_PP ("$U", "$V", "$W", "$X"); + my @listt = ( + "/^$V$W*<a href=/ and s/^/$X/;", + "/^<>$V$W*<a href=/ and s/^/$X/;", + "/^$S$V$W*<a href=/ and s/^/$X/;", + "/^$V<>$W*<a href=/ and s/^/$X/;", + "/^$V$S$W*<a href=/ and s/^/$X/;" ); + push @list, @listt; + return @list; +} + +sub echo_HR_PP +{ + my ($U,$V,$W,$Z) = @_; + my @list = ( + "/^$U$V*<a href=/ and s/^/$W/;", + "/^<>$U$V*<a href=/ and s/^/$W/;", + "/^$S$U$V*<a href=/ and s/^/$W/;", + "/^$U<>$V*<a href=/ and s/^/$W/;", + "/^$U$S$V*<a href=/ and s/^/$W/;" ); + return @list; +} +sub echo_br_PP +{ + my ($U,$V,$W,$Z) = @_; + my @list = &echo_HR_PP ("$U", "$V", "$W"); + my @listt = ( + "/^$V*<a href=/ and s/^/$W/;", + "/^<>$V*<a href=/ and s/^/$W/;", + "/^$S$V*<a href=/ and s/^/$W/;" ); + push @list, @listt; + return @list; +} +sub echo_sp_PP +{ + my ($U,$V,$Z) = @_; + my @list = ( + "/^<>$U*<a href=/ and s/^/$V/;", + "/^$S$U*<a href=/ and s/^/$V/;", + "/^<><>$U*<a href=/ and s/^/$V/;", + "/^$S$S$U*<a href=/ and s/^/$V/;", + "/^<>$U<>*<a href=/ and s/^/$V/;", + "/^$S$U$S*<a href=/ and s/^/$V/;", + "/^$U<><>*<a href=/ and s/^/$V/;", + "/^$U$S$S*<a href=/ and s/^/$V/;", + "/^$U<>*<a href=/ and s/^/$V/;", + "/^$U$S*<a href=/ and s/^/$V/;" ); + return @list; +} +sub echo_sp_sp +{ + my ($U,$V,$Z) = @_; + my @list = ( + "/^$U*<a name=/ and s/^/$V/;", + "/^<>$U*<a name=/ and s/^/$V/;", + "/^$S$U*<a name=/ and s/^/$V/;", + "/^<><>$U*<a name=/ and s/^/$V/;", + "/^$S$S$U*<a name=/ and s/^/$V/;", + "/^<>$U<>*<a name=/ and s/^/$V/;", + "/^$S$U$S*<a name=/ and s/^/$V/;", + "/^$U<><>*<a name=/ and s/^/$V/;", + "/^$U$S$S*<a name=/ and s/^/$V/;", + "/^$U<>*<a name=/ and s/^/$V/;", + "/^$U$S*<a name=/ and s/^/$V/;" ); + return @list; +} + +sub make_sitemap_init +{ + # build a list of detectors that map site.htm entries to a section table + # note that the resulting .gets.tmp / .puts.tmp are real sed-script + my $h1="[-|[]"; + my $b1="[*=]"; + my $b2="[-|[]"; + my $b3="[\\/:]"; + my $q3="[\\/:,[]"; + @MK_GETS = (); + push @MK_GETS, &echo_HR_PP ("<hr>", "$h1", "<!--sect1-->"); + push @MK_GETS, &echo_HR_EM_PP("<hr>","<em>", "$h1", "<!--sect1-->"); + push @MK_GETS, &echo_HR_EM_PP("<hr>","<strong>", "$h1", "<!--sect1-->"); + push @MK_GETS, &echo_HR_PP ("<br>", , "$b1$b1", "<!--sect1-->"); + push @MK_GETS, &echo_HR_PP ("<br>", , "$b2$b2", "<!--sect2-->"); + push @MK_GETS, &echo_HR_PP ("<br>", , "$b3$b3", "<!--sect3-->"); + push @MK_GETS, &echo_br_PP ("<br>", , "$b2$b2", "<!--sect2-->"); + push @MK_GETS, &echo_br_PP ("<br>", , "$b3$b3", "<!--sect3-->"); + push @MK_GETS, &echo_br_EM_PP("<br>","<small>" , "$q3" , "<!--sect3-->"); + push @MK_GETS, &echo_br_EM_PP("<br>","<em>" , "$q3" , "<!--sect3-->"); + push @MK_GETS, &echo_br_EM_PP("<br>","<u>" , "$q3" , "<!--sect3-->"); + push @MK_GETS, &echo_HR_PP ("<br>", , "$q3" , "<!--sect3-->"); + push @MK_GETS, &echo_sp_PP ( "$q3" , "<!--sect3-->"); + push @MK_GETS, &echo_sp_sp ( "$q3" , "<!--sect9-->"); + @MK_PUTS = map { my $x=$_; $x =~ s/(>)(\[)/$1 *$2/; $x } @MK_GETS; + # the .puts.tmp variant is used to <b><a href=..></b> some hrefs which + # shall not be used otherwise for being generated - this is nice for + # some quicklinks somewhere. The difference: a whitspace "<hr> <a...>" +} + +my $_uses_= sub{"=use$1=$2 $3" }; my $_name_= sub{"=use$1=name:$2 $3" }; +my $_getW_="<!--sect([$NN])-->"; +my $_getX_="<!--sect([$NN])--><[^<>]*>[^<>]*"; +my $_getY_="<!--sect([$NN])--><[^<>]*>[^<>]*<[^<>]*>[^<>]*"; + +sub make_sitemap_list +{ + # scan sitefile for references pages - store as "=use+=href+ anchortext" + for (source($SITEFILE)) { +# print join("$n;",@MK_GETS),$n; + $_ = &eval_MK_LIST($_, @MK_GETS); + /^<!--sect[$NN]-->/ or next; + s{^$_getX_<a href=\"([^\"]*)\"[^<>]*>(.*)</a>.*}{&$_uses_}e; + s{^$_getY_<a href=\"([^\"]*)\"[^<>]*>(.*)</a>.*}{&$_uses_}e; + s{^$_getW_<a name=\"([^\"]*)\"[^<>]*>(.*)</a>.*}{&$_name_}e; + s{^$_getX_<a name=\"([^\"]*)\"[^<>]*>(.*)</a>.*}{&$_name_}e; + s{^$_getY_<a name=\"([^\"]*)\"[^<>]*>(.*)</a>.*}{&$_name_}e; + /^=....=/ or next; + push @MK_INFO, $_; + } +} + +sub make_sitemap_sect +{ + # scan used pages and store prime section group relation =sect= and =node= + # (A) each "use1" creates "=sect=href+ href1" for all following non-"use1" + # (B) each "use1" creates "=node=href2 href1" for all following "use2" + my $sect = ""; + for (grep {/=[u]se.=/} @MK_INFO) { + if (/=[u]se1=([^ ]*) .*/) { $sect = $1; } + my $x = $_; $x =~ s/=[u]se.=([^ ]*) .*/=sect=$1/; chomp $x; + push @MK_INFO, "$x $sect"; + } + for (grep {/=[u]se.=/} @MK_INFO) { + if (/=[u]se1=([^ ]*) .*/) { $sect = $1; } + /=[u]se[13456789]=/ and next; + my $x = $_; $x =~ s/=[u]se.=([^ ]*) .*/=node=$1/; chomp $x; + push @MK_INFO, "$x $sect"; + } +} + +sub make_sitemap_page +{ + # scan used pages and store secondary group relation =page= and =node= + # the parenting =node= for use3 is usually a use2 (or use1 if none there) + my $sect = ""; + for (grep {/=[u]se.=/} @MK_INFO) { + if (/=[u]se1=([^ ]*) .*/) { $sect = $1; } + if (/=[u]se2=([^ ]*) .*/) { $sect = $1; } + /=[u]se[1]=/ and next; + my $x = $_; $x =~ s/=[u]se.=([^ ]*) .*/=page=$1/; chomp $x; + push @MK_INFO, "$x $sect"; + } + for (grep {/=[u]se.=/} @MK_INFO) { + if (/=[u]se1=([^ ]*) .*/) { $sect = $1; } + if (/=[u]se2=([^ ]*) .*/) { $sect = $1; } + /=[u]se[12456789]=/ and next; + my $x = $_; $x =~ s/=[u]se.=([^ ]*) .*/=node=$1/; chomp $x; + push @MK_INFO, "$x $sect"; print "(",$_,")","$x $sect", $n; + } + # and for the root sections we register ".." as the parenting group + for (grep {/=[u]se1=/} @MK_INFO) { + my $x = $_; $x =~ s/=[u]se.=([^ ]*) .*/=node=$1/; chomp $x; + push @MK_INFO, trimm("$x .."); + } +} +sub echo_site_filelist +{ + my @OUT = (); + for (grep {/=[u]se.=/} @MK_INFO) { + my $x = $_; $x =~ s/=[u]se.=//; $x =~ s/ .*[\n]*//; + push @OUT, $x; + } + return @OUT; +} + +# ========================================================================== +# originally this was a one-pass compiler but the more information +# we were scanning out the more slower the system ran - since we +# were rescanning files for things like section information. Now +# we scan the files first for global information. +# 1.PASS + +sub scan_sitefile # $F +{ + $SOURCEFILE=&html_sourcefile($F); + if ($SOURCEFILE ne $F) { + dx_init "$F"; + dx_text ("today", &timetoday()); + my $short=$F; + $short =~ s:.*/::; $short =~ s:[.].*::; # basename for all exts + $short .=" ~"; + DC_meta ("title", "$short"); + DC_meta ("date.available", &timetoday()); + DC_meta ("subject", "sitemap"); + DC_meta ("DCMIType", "Collection"); + DC_VARS_Of ($SOURCEFILE) ; HTTP_VARS_Of ($SOURCEFILE) ; + DC_modified ($SOURCEFILE) ; DC_date ($SOURCEFILE); + DC_section ($F); + DX_text ("date.formatted", &timetoday()); + if ($printerfriendly) { + DX_text ("printerfriendly", fast_html_printerfile($F)); } + if ($ENV{USER}) { DC_publisher ($ENV{USER}); } + print "'$SOURCEFILE': $short (sitemap)$n"; + site_map_list_title ($F, "$short"); + site_map_long_title ($F, "generated sitemap index"); + site_map_list_date ($F, &timetoday()); + } +} + +sub scan_htmlfile # "$F" +{ + my ($FF,$Z) = @_; + $SOURCEFILE=&html_sourcefile($F); # SCAN : + if ($SOURCEFILE ne $F) { # HTML : + if ( -f $SOURCEFILE) { + @{$FAST{$F}} = &make_fast ($F); + dx_init "$F"; + dx_text ("today", &timetoday()); + dx_text ("todays", &timetodays()); + DC_VARS_Of ($SOURCEFILE); HTTP_VARS_Of ($SOURCEFILE); + DC_title ($SOURCEFILE); + DC_isFormatOf ($SOURCEFILE); + DC_modified ($SOURCEFILE); + DC_date ($SOURCEFILE); DC_date ($SITEFILE); + DC_section ($F); DC_selected ($F); DX_alternative ($SOURCEFILE); + if ($ENV{USER}) { DC_publisher ($ENV{USER}); } + DX_text ("date.formatted", &timetoday()); + if ($printerfriendly) { + DX_text ("printerfriendly", fast_html_printerfile($F)); } + my $sectn=&info_get_entry("DC.relation.section"); + my $short=&info_get_entry("DC.title.selected"); + &site_map_list_title ($F, "$short"); + &info_map_list_title ($F, "$short"); + my $title=&info_get_entry("DC.title"); + &site_map_long_title ($F, "$title"); + &info_map_long_title ($F, "$title"); + my $edate=&info_get_entry("DC.date"); + my $issue=&info_get_entry("issue"); + &site_map_list_date ($F, "$edate"); + &info_map_list_date ($F, "$edate"); + print "'$SOURCEFILE': '$title' ('$short') @ '$issue' ('$sectn')$n"; + }else { + print "'$SOURCEFILE': does not exist$n"; + site_map_list_title ($F, "$F"); + site_map_long_title ($F, "$F (no source)"); + } + } else { + print "<$F> - skipped - ($SOURCEFILE)$n"; + } +} + +sub scan_namespec +{ + # nothing so far + # my ($F,$ZZZ) = @_; + if ($F =~ /^name:sitemap:/) { + my $short=$F; + $short =~ s:.*/::; $short =~ s:[.].*::; # basename for all exts + $short =~ s/name:sitemap://; + $short .=" ~"; + site_map_list_title ($F, "$short"); + site_map_long_title ($F, "external sitemap index"); + site_map_list_date ($F, &timetoday()); + print "'$F' external sitemap index$n"; + } +} +sub scan_httpspec +{ + # nothing so far +} + +sub skip_namespec +{ + # nothing so far +} +sub skip_httpspec +{ + # nothing so far +} + +# ========================================================================== +# and now generate the output pages +# 2.PASS + +sub head_sed_sitemap # $filename $section +{ + my ($U,$V,$Z) = @_; + my $FF=&sed_slash_key($U); + my $SECTION=&sed_slash_key($V); + my $SECTS="<!--sect[$NN$AZ]-->" ; + my $SECTN="<!--sect[$NN]-->"; # lines with hrefs + my @OUT = (); + push @OUT, "/^$SECTS.*<a href=\\\"$FF\\\">/ and s|</a>|</a></b>|;"; + push @OUT, "/^$SECTS.*<a href=\\\"$FF\\\">/ and s|<a href=|<b><a href=|;"; + push @OUT, "/ href=\\\"$SECTION\\\"/ " + ."and s|^<td class=\\\"[^\\\"]*\\\"|<td |;" if $sectiontab ne "no"; + return @OUT; +} + +sub head_sed_listsection # $filename $section +{ + # traditional.... the sitefile is the full navigation bar + my ($U,$V,$Z) = @_; + my $FF=&sed_slash_key($U); + my $SECTION=&sed_slash_key($V); + my $SECTS="<!--sect[$NN$AZ]-->" ; + my $SECTN="<!--sect[$NN]-->"; # lines with hrefs + my @OUT = (); + push @OUT, "/^$SECTS.*<a href=\\\"$FF\\\">/ and s|</a>|</a></b>|;"; + push @OUT, "/^$SECTS.*<a href=\\\"$FF\\\">/ and s|<a href=|<b><a href=|;"; + push @OUT, "/ href=\\\"$SECTION\\\"/ " + ."and s|^<td class=\\\"[^\\\"]*\\\"|<td |;" if $sectiontab ne "no"; + return @OUT; +} + +sub head_sed_multisection # $filename $section +{ + # sitefile navigation bar is split into sections + my ($U,$V,$Z) = @_; + my $FF=&sed_slash_key($U); + my $SECTION=&sed_slash_key($V); + my $SECTS="<!--sect[$NN$AZ]-->" ; + my $SECTN="<!--sect[$NN]-->"; # lines with hrefs + my @OUT = (); + # grep all pages with a =sect= relation to current $SECTION and + # build foreach an sed line "s|$SECTS\(<a href=$F>\)|<!--sectX-->\1|" + # after that all the (still) numeric SECTNs are deactivated / killed. + for my $section ($SECTION, $headsection, $tailsection) { + next if $section eq "no"; + for (grep {/^=sect=[^ ]* $section/} @MK_INFO) { + my $x = $_; + $x =~ s, .*,\\\"\)|<!--sectX-->\$1|,; + $x =~ s,^=sect=,s|^$SECTS\(.*<a href=\\\",; + push @OUT, $x.";"; + } + } + push @OUT, "s|^$SECTN\[^ \]*(<a href=[^<>]*>).*|<!-- \$1 -->|;"; + push @OUT, "/^$SECTS.*<a href=\\\"$FF\\\">/ and s|</a>|</a></b>|;"; + push @OUT, "/^$SECTS.*<a href=\\\"$FF\\\">/ and s|<a href=|<b><a href=|;"; + push @OUT, "/ href=\\\"$SECTION\\\"/ " + ."and s|^<td class=\\\"[^\\\"]*\\\"|<td |;" if $sectiontab ne "no"; + return @OUT; +} + +sub make_sitefile # "$F" +{ + $SOURCEFILE=&html_sourcefile($F); + if ($SOURCEFILE ne $F) { + if (-f $SOURCEFILE) { + # remember that in this case "${SITEFILE}l" = "$F" = "${SOURCEFILE}l" + @MK_VARS = &info2vars_sed(); # have <!--title--> vars substituted + @MK_META = &info2meta_sed(); # add <meta name="DC.title"> values + if ( $simplevars eq "warn") { + @MK_TEST = &info2test_sed(); # check <!--title--> vars old-style +## $SED_LONGSCRIPT ./$MK_TEST $SOURCEFILE | tee -a ./$MK_OLDS ; fi + } + my @F_HEAD = (); my @F_FOOT = (); + push @F_HEAD, @MK_PUTS; + push @F_HEAD, &head_sed_sitemap ($F, &info_get_entry_section()); + push @F_HEAD, "/<head>/ and $sed_add join(\"\\n\", \@MK_META);"; + push @F_HEAD, @MK_VARS; push @F_HEAD, @MK_TAGS; + push @F_HEAD, "/<\\/body>/ and next;"; #cut lastline + if ( $sitemaplayout eq "multi") { + push @F_FOOT, &make_multisitemap(); # here we use ~foot~ to + } else { + push @F_FOOT, &make_listsitemap(); # hold the main text + } + + my $html = ""; # + $html .= &eval_MK_FILE($SITEFILE, @F_HEAD); + $html .= join("", @F_FOOT); + for (source($SITEFILE)) { + /<\/body>/ or next; + $html .= &eval_MK_LIST($_, @MK_VARS); + } + open F, ">$F"; print F $html; close F; + print "'$SOURCEFILE': ",ls_s($SOURCEFILE)," >-> ",ls_s($F),"$n"; + savesource("$F.~head~", \@F_HEAD); + savesource("$F.~foot~", \@F_FOOT); +} else { + print "'$SOURCEFILE': does not exist$n"; +} } +} + +sub make_htmlfile # "$F" +{ + $SOURCEFILE=&html_sourcefile($F); # 2.PASS + if ("$SOURCEFILE" ne "$F") { + if (-f "$SOURCEFILE") { + if (grep {/<meta name="formatter"/} source($SOURCEFILE)) { + print "$SOURCEFILE: SKIP, this sourcefile looks like a formatted file$n"; + print "$SOURCEFILE: (may be a sourcefile in place of a targetfile?)$n"; + return; } + @MK_VARS = &info2vars_sed(); # have <!--title--> vars substituted + @MK_META = &info2meta_sed(); # add <meta name="DC.title"> values + if ( $simplevars eq "warn") { + @MK_TEST = &info2test_sed(); # check <!--title--> vars old-style +## $SED_LONGSCRIPT ./$MK_TEST $SOURCEFILE | tee -a ./$MK_OLDS ; fi + } + my @F_HEAD = (); my @F_BODY = (); my $F_FOOT = ""; + push @F_HEAD, @MK_PUTS; + if ( $sectionlayout eq "multi") { + push @F_HEAD, &head_sed_multisection ($F, &info_get_entry_section()); + } else { + push @F_HEAD, &head_sed_listsection ($F, &info_get_entry_section()); + } + push @F_HEAD, @MK_VARS; push @F_HEAD, @MK_TAGS; #tag and vars + push @F_HEAD, "/<\\/body>/ and next;"; #cut lastline + push @F_HEAD, "/<head>/ and $sed_add join(\"\\n\",\@MK_META);"; #add metatags + push @F_BODY, "/<title>/ and next;"; #not that line + push @F_BODY, @MK_VARS; push @F_BODY, @MK_TAGS; #tag and vars + push @F_BODY, &bodymaker_for_sectioninfo(); #if sectioninfo + push @F_BODY, &info2body_sed(); #cut early + push @F_HEAD, &info2head_sed(); + push @F_HEAD, @{$FAST{$F}}; + if ($emailfooter ne "no") { + $F_FOOT = &body_for_emailfooter(); + } + my $html = ""; + $html .= eval_MK_FILE($SITEFILE, @F_HEAD); + $html .= eval_MK_FILE($SOURCEFILE, @F_BODY); + $html .= $F_FOOT; + for (source($SITEFILE)) { + /<\/body>/ or next; + $_ = &eval_MK_LIST($_, @MK_VARS); + $html .= $_; + } + savelist(\@{$INFO{$F}}); + open F, ">$F" or die "could not write $F: $!"; print F $html; close F; + print "'$SOURCEFILE': ",&ls_s($SOURCEFILE)," -> ",&ls_s($F),"$n"; + savesource("$F.~head~", \@F_HEAD); + savesource("$F.~body~", \@F_BODY); + } else { + print "'$SOURCEFILE': does not exist$n"; + }} else { + print "<$F> - skipped$n"; + } +} + +my $PRINTSITEFILE; +sub make_printerfriendly # "$F" +{ # PRINTER + my $printsitefile="0"; # FRIENDLY + my @F_FAST = (); my $BODY_TXT; my $BODY_SED; + my $P=&html_printerfile ($F); + my @P_HEAD = (); my @P_BODY = (); + if ("$F" =~ /^(${SITEFILE}|${SITEFILE}l)$/) { + @F_FAST = &make_fast ("$F"); + $printsitefile=">=>" ; $BODY_TXT="$F.~foot~" ; + } elsif ("$F" =~ /^(.*[.]html)$/) { + $printsitefile="=>" ; $BODY_TXT="$SOURCEFILE"; + } + if (grep {/<meta name="formatter"/} source($BODY_TXT)) { return; } + if ($printsitefile ne "0" and -f $SOURCEFILE) { + @MK_FAST = &make_printerfile_fast (\@FILELIST); + push @P_HEAD, @MK_VARS; push @P_HEAD, @MK_TAGS; push @P_HEAD, @MK_FAST; + @MK_METT = map { my $x = $_; $x =~ + /DC.relation.isFormatOf/ and $x =~ s|content=\"[^\"]*\"|content=\"$F\"| ; + $x } @MK_META; + push @P_HEAD, "/<head>/ and $sed_add join(\"\\n\", \@MK_METT);"; + push @P_HEAD, "/<\\/body>/ and next;"; + push @P_HEAD, &select_in_printsitefile ("$F"); + my $_ext_=&print_extension($printerfriendly); + push @P_HEAD, map { my $x=$_; $x =~ s/[.]html\"|/$_ext_$&/g; $x} @F_FAST; +# my $line_=&sed_slash_key($printsitefile_img_2); + push @P_HEAD, "/\\|\\|topics:/" + ." and s| href=\\\"\\#\\.\\\"| href=\\\"$F\\\"|;"; + push @P_HEAD, "/\\|\\|\\|pages:/" + ." and s| href=\\\"\\#\\.\\\"| href=\\\"$F\\\"|;"; + push @P_HEAD, @F_FAST; + push @P_BODY, @MK_VARS; push @P_BODY, @MK_TAGS; push @P_BODY, @MK_FAST; + push @P_BODY, map { my $x=$_; $x =~ s/[.]html\"|/$_ext_$&/g; $x} @F_FAST; + push @P_BODY, @F_FAST; + my $html = ""; + $html .= eval_MK_FILE($PRINTSITEFILE, @P_HEAD); + $html .= eval_MK_FILE($BODY_TXT, @P_BODY); + for (source($PRINTSITEFILE)) { + /<\/body>/ or next; + $_ = &eval_MK_LIST($_, @MK_VARS); + $html .= $_; + } + open P, ">$P" or die "could not write $P: $!"; print P $html; close P; + print "'$SOURCEFILE': ",ls_s($SOURCEFILE)," $printsitefile ",ls_s($P),"$n"; + } +} + + +# ======================================================================== +# ======================================================================== +# ======================================================================== +# ======================================================================== +# #### 0. INIT +$F=$SITEFILE; +&make_sitemap_init(); +&make_sitemap_list(); +&make_sitemap_sect(); +&make_sitemap_page(); +savelist(\@MK_INFO); + +@FILELIST=&echo_site_filelist(); +if ($o{filelist} or $o{list} eq "file" or $o{list} eq "files") { + for (@FILELIST) { print $_,"$n"; } exit; # --filelist +} +if ($o{files}) { @FILELIST=split(/ /, $o{files}); } # --files +if ($#FILELIST < 0) { print STDERR "nothing to do$n"; } +if ($#FILELIST == 0 and + $FILELIST[0] eq $SITEFILE) { print STDERR "only '$SITEFILE'!?$n"; } + +for (@FILELIST) { #### 1. PASS + $F = $_; + if (/^(name:.*)$/) { + &scan_namespec ("$F"); + } elsif (/^(http:.*|.*:\/\/.*)$/) { + &scan_httpspec ("$F"); + } elsif (/^(${SITEFILE}|${SITEFILE}l)$/) { + &scan_sitefile ("$F") ;; # ........... SCAN SITE + } elsif (/^(\.\.\/.*)$/) { + print "!! -> '$F' (skipping topdir build)$n"; +# */*.html) +# make_fast # try for later subdir build +# echo "!! -> '$F' (skipping subdir build)" +# ;; +# */*/*/|*/*/|*/|*/index.htm|*/index.html) +# echo "!! -> '$F' (skipping subdir index.html)" +# ;; + } elsif (/^(.*\.html)$/) { + &scan_htmlfile ("$F") ;; # ........... SCAN HTML + } elsif (/^(.*\/)$/) { + print "'$F' : directory - skipped$n"; + &site_map_list_title ("$F", &sed_slash_key($F)); + &site_map_long_title ("$F", "(directory)"); + } else { + print "?? -> '$F'$n"; + } +} + +if ($printerfriendly) { # .......... PRINT VERSION + my $_ext_=esc(&print_extension($printerfriendly)); + $PRINTSITEFILE=$SITEFILE; $PRINTSITEFILE =~ s/(\.\w*)$/$_ext_$1/; + $F=$PRINTSITEFILE; + my @TEXT = &make_printsitefile(); + print "NOTE: going to create printer-friendly sitefile '$PRINTSITEFILE'" + ." $F._$i$n"; + savelist(\@TEXT); + my @LINES = map { chomp; $_."$n" } @TEXT; + savesource($PRINTSITEFILE, \@LINES); + if (1) { + if (open PRINTSITEFILE, ">$PRINTSITEFILE") { + print PRINTSITEFILE join("", @LINES); close PRINTSITEFILE; + } + } +} + +if ($simplevars eq " ") { + @MK_OLDS = (); +} + +for (@FILELIST) { #### 2. PASS + $F = $_; + if (/^(name:.*)$/) { + &skip_namespec ("$F") ;; + } elsif (/^(http:.*|.*:\/\/.*)$/) { + &skip_httpspec ("$F") ;; + } elsif (/^(${SITEFILE}|${SITEFILE}l)$/) { + &make_sitefile ("$F") ;; # ........ SITE FILE + &make_printerfriendly ("$F") if ($printerfriendly); + } elsif (/^(\.\.\/.*)$/) { + print "!! -> '$F' (skipping topdir build)$n"; +# */*.html) +# echo "!! -> '$F' (skipping subdir build)" +# ;; +# */*/*/|*/*/|*/|*/index.htm|*/index.html) +# echo "!! -> '$F' (skipping subdir index.html)" +# ;; + } elsif (/^(.*\.html)$/) { + &make_htmlfile ("$F") ;; # .................. HTML FILES + &make_printerfriendly ("$F") if ($printerfriendly); + } elsif (/^(.*\/)$/) { + print "'$F' : directory - skipped$n"; + } else { + print "?? -> '$F'$n"; + } +# .............. debug .................... +## if test -d DEBUG && test -f "./$F" ; then +## cp ./$F.$INFO DEBUG/$F.info.TMP +## for P in tags vars meta page date list html sect info ; do +## test -f ./$MK.$P.tmp && cp ./$MK.$P.tmp DEBUG/$F.$P.tmp +## test -f ./$MK.$P.TMP && cp ./$MK.$P.TMP DEBUG/$F.$P.TMP +## done +## fi +} # done + +if ( $simplevars eq "warn") { + my $oldvars = $#MK_OLDS; $oldvars ++; + if (not $oldvars) { +print "HINT: you have no simplevars in your htm sources, so you may want to$n"; +print "hint: set the magic <!--mksite:nosimplevars--> in your $SITEFILE$n"; +print "hint: which makes execution _faster_ actually in the 2. pass$n"; +print "note: simplevars expansion was the oldstyle way of variable expansion$n"; +} else { +print "HINT: there were $oldvars simplevars found in your htm sources.$n"; +print "hint: This style of variable expansion will be disabled in the near$n"; +print "hint: future. If you do not want change then add the $SITEFILE magic$n"; +print "hint: <!--mksite:simplevars--> somewhere to suppress this warning$n"; +print "note: simplevars expansion will be an explicit option in the future.$n"; +print "note: errornous simplevar detection can be suppressed with a magic$n"; +print "note: hint of <!--mksite:nosimplevars--> in the $SITEFILE for now.$n"; +} } + +## rm ./$MK.*.tmp +exit 0 diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/mksite.sh b/Build/source/libs/zziplib/zziplib-0.13.58/docs/mksite.sh new file mode 100644 index 00000000000..22a06431060 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/mksite.sh @@ -0,0 +1,1789 @@ +#! /bin/sh +# this is the sh/sed variant of the mksite script. It is largely +# derived from snippets that I was using to finish doc pages for +# website publishing. For the mksite project the functionaliy has +# been expanded of course. Still this one does only use simple unix +# commands like sed, date, and test. And it still works. :-)=) +# http://zziplib.sf.net/mksite/ +# THE MKSITE.SH (ZLIB/LIBPNG) LICENSE +# Copyright (c) 2004 Guido Draheim <guidod@gmx.de> +# This software is provided 'as-is', without any express or implied warranty +# In no event will the authors be held liable for any damages arising +# from the use of this software. +# Permission is granted to anyone to use this software for any purpose, +# including commercial applications, and to alter it and redistribute it +# freely, subject to the following restrictions: +# 1. The origin of this software must not be misrepresented; you must not +# claim that you wrote the original software. If you use this software +# in a product, an acknowledgment in the product documentation would be +# appreciated but is not required. +# 2. Altered source versions must be plainly marked as such, and must not +# be misrepresented as being the original software. +# 3. This notice may not be removed or altered from any source distribution. +# $Id: mksite.sh,v 1.4 2005/05/14 15:08:23 guidod Exp $ + +# Zsh is not Bourne compatible without the following: (seen in autobook) +if test -n "$ZSH_VERSION"; then + emulate sh + NULLCMD=: +fi + +# initialize some defaults +test ".$SITEFILE" = "." && test -f "site.htm" && SITEFILE="site.htm" +test ".$SITEFILE" = "." && test -f "site.html" && SITEFILE="site.html" +test ".$SITEFILE" = "." && SITEFILE="site.htm" +MK="-mksite" # note the "-" at the start +SED="sed" +CAT="cat" # "sed -e n" would be okay too +GREP="grep" +DATE_NOW="date" # should be available on all posix systems +DATE_R="date -r" # gnu date has it / solaris date not +STAT_R="stat" # gnu linux +LS_L="ls -l" # linux uses one less char than solaris + +INFO="~~" # extension for meta data files +HEAD="~head~" # extension for head sed script +BODY="~body~" # extension for body sed script +FOOT="~foot~" # append to body text (non sed) +FAST="~move~" # extension for printer friendly sed + +NULL="/dev/null" # to divert stdout/stderr +CATNULL="$CAT $NULL" # to create 0-byte files +SED_LONGSCRIPT="$SED -f" + +LOWER="abcdefghijklmnopqrstuvwxyz" +UPPER="ABCDEFGHIJKLMNOPQRSTUVWXYZ" +az="$LOWER" # some old sed tools can not +AZ="$UPPER" # use char-ranges in the +NN="0123456789" # match expressions so that +AA="_$NN$AZ$az" # we use their unrolled +AX="$AA.+-" # definition here +if $SED -V 2>$NULL | $GREP "GNU sed" >$NULL ; then +az="a-z" # but if we have GNU sed +AZ="A-Z" # then we assume there are +NN="0-9" # char-ranges available +AA="_$NN$AZ$az" # that makes the resulting +AX="$AA.+-" # script more readable +elif uname -s | $GREP HP-UX >$NULL ; then +SED_LONGSCRIPT="sed_longscript" # due to 100 sed lines limit +fi + +LANG="C" ; LANGUAGE="C" ; LC_COLLATE="C" # these are needed for proper +export LANG LANGUAGE LC_COLLATE # lowercasing as some collate + # treat A-Z to include a-z + +# ========================================================================== +# reading options from the command line GETOPT +opt_variables="files" +opt_fileseparator="?" +opt_files="" +opt_main_file="" +opt_formatter="$0" +opt="" +for arg in "$@" # this variant should allow to embed spaces in $arg +do if test ".$opt" != "." ; then + eval "export opt_$opt='$arg'" + opt="" + else + case "$arg" in + -*=*) + opt=`echo "$arg" | $SED -e "s/-*\\([$AA][$AA-]*\\).*/\\1/" -e y/-/_/` + if test ".$opt" = "." ; then + echo "ERROR: invalid option $arg" >&2 + else + arg=`echo "$arg" | $SED -e "s/^[^=]*=//"` + eval "export opt_$opt='$arg'" + opt_variables="$opt_variables $opt" + fi + opt="" ;; + -*-*) + opt=`echo "$arg" | $SED -e "s/-*\\([$AA][$AA-]*\\).*/\\1/" -e y/-/_/` + if test ".$opt" = "." ; then + echo "ERROR: invalid option $arg" >&2 + opt="" + else : + # keep the option for next round + fi ;; + -*) + opt=`echo "$arg" | $SED -e "s/^-*\\([$AA][$AA-]*\\).*/\\1/" -e y/-/_/` + if test ".$opt" = "." ; then + echo "ERROR: invalid option $arg" >&2 + else + arg=`echo "$arg" | $SED -e "s/^[^=]*=//"` + eval "export opt_$opt=' '" + fi + opt="" ;; + *) if test ".$opt_main_file" = "." ; then opt_main_file="$arg" ; else + test ".$opt_files" != "." && opt_files="$opt_files$opt_fileseparator" + opt_files="$opt_files$arg" ; fi + opt="" ;; + esac + fi +done ; if test ".$opt" != "." ; then + eval "export opt_$opt='$arg'" + opt="" +fi +### env | grep ^opt + +test ".$opt_main_file" != "." && test -f "$opt_main_file" && \ +SITEFILE="$opt_main_file" +test ".$opt_site_file" != "." && test -f "$opt_site_file" && \ +SITEFILE="$opt_site_file" + +if test ".$opt_help" != "." ; then + F="$SITEFILE" + echo "$0 [sitefile]"; + echo " default sitefile = $F"; + echo "options:"; + echo " --filelist : show list of target files as ectracted from $F" + echo " --src-dir xx : if source files are not where mksite is executed" + echo " --tmp-dir xx : use temp instead of local directory" + echo " --tmp : use automatic temp directory in ${TEMP-/tmp}/mksite.*" + exit; + echo " internal:" + echo "--fileseparator=x : for building the internal filelist (default '?')" + echo "--files xx : for list of additional files to be processed" + echo "--main-file xx : for the main sitefile to take file list from" +fi + +if test ".$SITEFILE" = "." ; then + echo "error: no SITEFILE found (default would be 'site.htm')" + exit 1 +else + echo "NOTE: sitefile: `ls -s $SITEFILE`" +fi + +if "${SHELL-/bin/sh}" -c 'foo () { exit 0; }; foo' 2>$NULL ; then : ; else +echo "!! sorry, this shell '$SHELL' does not support shell functions"; exit 1 +fi + +tmp="." ; if test ".$opt_tmp_dir" != "." ; then tmp="$opt_tmp_dir" ; fi +if test ".$opt_tmp_dir" = "." && test ".$opt_tmp" != "." ; then +tmp="${TEMP-/tmp}/mksite.$$" ; fi + +# we use external files to store mappings - kind of relational tables +MK_TAGS="$tmp/$MK.tags.tmp" +MK_VARS="$tmp/$MK.vars.tmp" +MK_META="$tmp/$MK.meta.tmp" +MK_METT="$tmp/$MK.mett.tmp" +MK_TEST="$tmp/$MK.test.tmp" +MK_FAST="$tmp/$MK.fast.tmp" +MK_GETS="$tmp/$MK.gets.tmp" +MK_PUTS="$tmp/$MK.puts.tmp" +MK_OLDS="$tmp/$MK.olds.tmp" +MK_SITE="$tmp/$MK.site.tmp" +MK_SECT1="$tmp/$MK.sect1.tmp" +MK_SECT2="$tmp/$MK.sect2.tmp" +MK_SECT3="$tmp/$MK.sect3.tmp" +MK_STYLE="$tmp/$MK.style.tmp" +MK_INFO="$tmp/$MK.$INFO" + +# ======================================================================== +# ======================================================================== +# ======================================================================== +# MAGIC VARS +# IN $SITEFILE +printerfriendly="" +sectionlayout="list" +sitemaplayout="list" +simplevars="warn" # <!--varname-->default +attribvars=" " # <x ref="${varname:=default}"> +updatevars=" " # <!--$varname:=-->default +expandvars=" " # <!--$varname--> +commentvars=" " # $updatevars && $expandsvars && $simplevars +sectiontab=" " # highlight ^<td class=...>...href="$section" +currenttab=" " # highlight ^<br>..<a href="$topic"> +headsection="no" +tailsection="no" +sectioninfo="no" # using <h2> title <h2> = info text +emailfooter="no" + +if $GREP "<!--multi-->" $SITEFILE >$NULL ; then +echo \ +"WARNING: do not use <!--multi-->, change to <!--mksite:multi--> " "$SITEFILE" +echo \ +"warning: or <!--mksite:multisectionlayout--> <!--mksite:multisitemaplayout-->" +sectionlayout="multi" +sitemaplayout="multi" +fi +if $GREP "<!--mksite:multi-->" $SITEFILE >$NULL ; then +sectionlayout="multi" +sitemaplayout="multi" +fi +if $GREP "<!--mksite:multilayout-->" $SITEFILE >$NULL ; then +sectionlayout="multi" +sitemaplayout="multi" +fi + +mksite_magic_option () +{ + # $1 is word/option to check for + INP="$2" ; test ".$INP" = "." && INP="$SITEFILE" + $SED \ + -e "s/\\(<!--mksite:\\)\\($1\\)-->/\\1\\2: -->/g" \ + -e "s/\\(<!--mksite:\\)\\([$AA][$AA]*\\)\\($1\\)-->/\\1\\3:\\2-->/g" \ + -e "/<!--mksite:$1:/!d" \ + -e "s/.*<!--mksite:$1:\\([^<>]*\\)-->.*/\\1/" \ + -e "s/.*<!--mksite:$1:\\([^-]*\\)-->.*/\\1/" \ + -e "/<!--mksite:$1:/d" -e q $INP # $++ +} + +x=`mksite_magic_option sectionlayout` ; case "$x" in + "list"|"multi") sectionlayout="$x" ;; esac +x=`mksite_magic_option sitemaplayout` ; case "$x" in + "list"|"multi") sitemaplayout="$x" ;; esac +x=`mksite_magic_option simplevars` ; case "$x" in + " "|"no"|"warn") simplevars="$x" ;; esac +x=`mksite_magic_option attribvars` ; case "$x" in + " "|"no"|"warn") attribvars="$x" ;; esac +x=`mksite_magic_option updatevars` ; case "$x" in + " "|"no"|"warn") updatevars="$x" ;; esac +x=`mksite_magic_option expandvars` ; case "$x" in + " "|"no"|"warn") expandvars="$x" ;; esac +x=`mksite_magic_option commentvars` ; case "$x" in + " "|"no"|"warn") commentvars="$x" ;; esac +x=`mksite_magic_option printerfriendly` ; case "$x" in + " "|".*"|"-*") printerfriendly="$x" ;; esac +x=`mksite_magic_option sectiontab` ; case "$x" in + " "|"no"|"warn") sectiontab="$x" ;; esac +x=`mksite_magic_option currenttab` ; case "$x" in + " "|"no"|"warn") currenttab="$x" ;; esac +x=`mksite_magic_option sectioninfo` ; case "$x" in + " "|"no"|"[=:-]") sectioninfo="$x" ;; esac +x=`mksite_magic_option emailfooter` + test ".$x" != "." && emailfooter="$x" + +test ".$opt_print" != "." && printerfriendly="$opt_print" +test ".$commentvars" = ".no" && updatevars="no" # duplicated into +test ".$commentvars" = ".no" && expandvars="no" # info2vars_sed () +test ".$commentvars" = ".no" && simplevars="no" # function above + +test -d DEBUG && \ +echo "NOTE: '$sectionlayout'sectionlayout '$sitemaplayout'sitemaplayout" +test -d DEBUG && \ +echo "NOTE: '$simplevars'simplevars '$printerfriendly'printerfriendly" +test -d DEBUG && \ +echo "NOTE: '$attribvars'attribvars '$updatevars'updatevars" +test -d DEBUG && \ +echo "NOTE: '$expandvars'expandvars '$commentvars'commentvars " +test -d DEBUG && \ +echo "NOTE: '$currenttab'currenttab '$sectiontab'sectiontab" +test -d DEBUG && \ +echo "NOTE: '$headsection'headsection '$tailsection'tailsection" + +if ($STAT_R "$SITEFILE" >$NULL) 2>$NULL ; then : ; else STAT_R=":" ; fi +# ========================================================================== +# init a few global variables +# 0. INIT + +mkpathdir () { + if test -n "$1" && test ! -d "$1" ; then + echo "!! mkdir '$1'" ; mkdir "$1" + test ! -d "$1" || mkdir -p "$1" + fi +} + +mkpathfile () { + dirname=`echo "$1" | $SED -e "s:/[^/][^/]*\$::"` + if test ".$1" != ".$dirname" && test ".$dirname" != "." ; + then mkpathdir "$dirname"; fi +} + +mknewfile () { + mkpathfile "$1" + $CATNULL > "$1" +} + +tmp_dir_was_created="no" +if test ! -d "$tmp" ; then mkpathdir "$tmp" ; tmp_dir_was_created="yes" ; fi + +# $MK_TAGS - originally, we would use a lambda execution on each +# uppercased html tag to replace <P> with <p class="P">. Here we just +# walk over all the known html tags and make an sed script that does +# the very same conversion. There would be a chance to convert a single +# tag via "h;y;x" or something we do want to convert all the tags on +# a single line of course. +mknewfile "$MK_TAGS" +for P in P H1 H2 H3 H4 H5 H6 DL DD DT UL OL LI PRE CODE TABLE TR TD TH \ + B U I S Q EM STRONG STRIKE CITE BIG SMALL SUP SUB TT THEAD TBODY \ + CENTER HR BR NOBR WBR SPAN DIV IMG ADRESS BLOCKQUOTE +do M=`echo "$P" | $SED -e "y/$UPPER/$LOWER/"` + echo "s|<$P>|<$M class=\"$P\">|g" >> "$MK_TAGS" + echo "s|<$P |<$M class=\"$P\" |g" >> "$MK_TAGS" + echo "s|</$P>|</$M>|g" >> "$MK_TAGS" +done + echo "s|<>|\\ \\;|g" >> "$MK_TAGS" + echo "s|<->|<WBR />\\;|g" >> "$MK_TAGS" +# also make sure that some non-html entries are cleaned away that +# we are generally using to inject meta information. We want to see +# that meta ino in the *.htm browser view during editing but they +# shall not get present in the final html page for publishing. +DC_VARS="contributor date source language coverage identifier" +DC_VARS="$DC_VARS rights relation creator subject description" +DC_VARS="$DC_VARS publisher DCMIType" +_EQUIVS="refresh expires content-type cache-control" +_EQUIVS="$_EQUIVS redirect charset" # mapped to refresh / content-type +_EQUIVS="$_EQUIVS content-language content-script-type content-style-type" +for P in $DC_VARS $_EQUIVS ; do # dublin core embedded + echo "s|<$P>[^<>]*</$P>||g" >> "$MK_TAGS" +done + echo "s|<!--sect[$AZ$NN]-->||g" >> "$MK_TAGS" + echo "s|<!--[$AX]*[?]-->||g" >> "$MK_TAGS" + echo "s|<!--\\\$[$AX]*[?]:-->||g" >> "$MK_TAGS" + echo "s|<!--\\\$[$AX]*:[?=]-->||g" >> "$MK_TAGS" + echo "s|\\(<[^<>]*\\)\\\${[$AX]*:[?=]\\([^<{}>]*\\)}\\([^<>]*>\\)|\\1\\2\\3|g" >>$MK_TAGS + +# see overview at www.metatab.de - http-equivs are +# <refresh>5; url=target</reresh> or <redirect>target</redirect> +# <content-type>text/html; charset=koi8-r</content-type> iso-8859-1/UTF-8 +# <content-language>de</content-language> <charset>UTF-8</charset> +# <content-script-type>text/javascript</content-script-type> /jscript/vbscript +# <content-style-type>text/css</content-style-type> +# <cache-control>no-cache</cache-control> + +trimm () +{ + echo "$1" | $SED -e "s:^ *::" -e "s: *\$::"; +} +trimmm () +{ + echo "$1" | $SED -e "s:^ *::" -e "s: *\$::" -e "s:[ ][ ]*: :g"; +} + +timezone () +{ + # +%z is an extension while +%Z is supposed to be posix + _timezone=`$DATE_NOW +%z` + case "$_timezone" in + *+*) echo "$_timezone" ;; + *-*) echo "$_timezone" ;; + *) $DATE_NOW +%Z + esac +} +timetoday () +{ + $DATE_NOW +%Y-%m-%d +} +timetodays () +{ + $DATE_NOW +%Y-%m%d +} + +# ====================================================================== +# FUNCS + +sed_longscript () +{ + # hpux sed has a limit of 100 entries per sed script ! + $SED -e "100q" "$1" > "$1~1~" + $SED -e "1,100d" -e "200q" "$1" > "$1~2~" + $SED -e "1,200d" -e "300q" "$1" > "$1~3~" + $SED -e "1,300d" -e "400q" "$1" > "$1~4~" + $SED -e "1,400d" -e "500q" "$1" > "$1~5~" + $SED -e "1,500d" -e "600q" "$1" > "$1~6~" + $SED -e "1,600d" -e "700q" "$1" > "$1~7~" + $SED -e "1,700d" -e "800q" "$1" > "$1~8~" + $SED -e "1,800d" -e "900q" "$1" > "$1~9~" + $SED -f "$1~1~" -f "$1~2~" -f "$1~3~" -f "$1~4~" -f "$1~5~" \ + -f "$1~6~" -f "$1~7~" -f "$1~8~" -f "$1~9~" "$2" +} + +sed_slash_key () # helper to escape chars special in /anchor/ regex +{ # currently escaping "/" "[" "]" "." + echo "$1" | $SED -e "s|[./[-]|\\\\&|g" -e "s|\\]|\\\\&|g" +} +sed_piped_key () # helper to escape chars special in s|anchor|| regex +{ # currently escaping "|" "[" "]" "." + echo "$1" | $SED -e "s/[.|[-]/\\\\&/g" -e "s/\\]/\\\\&/g" +} + +back_path () # helper to get the series of "../" for a given path +{ + echo "$1" | $SED -e "/\\//!d" -e "s|/[^/]*\$|/|" -e "s|[^/]*/|../|g" +} + +dir_name () +{ + echo "$1" | $SED -e "s:/[^/][^/]*\$::" +} + +info2test_sed () # cut out all old-style <!--vars--> usages +{ + INP="$1" ; test ".$INP" = "." && INP="$tmp/$F.$INFO" + V8=" *\\([^ ][^ ]*\\) \\(.*\\)" + V9=" *DC[.]\\([^ ][^ ]*\\) \\(.*\\)" + q="\\\$" + _x_="WARNING: assumed simplevar <!--\\\\1--> changed to <!--$q\\\\1:=-->" + _y_="WARNING: assumed simplevar <!--\\\\1--> changed to <!--$q\\\\1:?-->" + _X_="WARNING: assumed tailvar <!--$q\\\\1:--> changed to <!--$q\\\\1:=-->" + _Y_="WARNING: assumed tailvar <!--$q\\\\1:--> changed to <!--$q\\\\1:?-->" + echo "s/^/ /" # $++ + $SED -e "/^=....=formatter /d" \ + -e "/=text=/s%=text=$V9%s|.*<!--\\\\(\\1\\\\)-->.*|$_x_|%" \ + -e "/=Text=/s%=Text=$V9%s|.*<!--\\\\(\\1\\\\)-->.*|$_x_|%" \ + -e "/=name=/s%=name=$V9%s|.*<!--\\\\(\\1\\\\)[?]-->.*|$_y_|%" \ + -e "/=Name=/s%=Name=$V9%s|.*<!--\\\\(\\1\\\\)[?]-->.*|$_y_|%" \ + -e "/=text=/s%=text=$V8%s|.*<!--\\\\(\\1\\\\)-->.*|$_x_|%" \ + -e "/=Text=/s%=Text=$V8%s|.*<!--\\\\(\\1\\\\)-->.*|$_x_|%" \ + -e "/=name=/s%=name=$V8%s|.*<!--\\\\(\\1\\\\)[?]-->.*|$_y_|%" \ + -e "/=Name=/s%=Name=$V8%s|.*<!--\\\\(\\1\\\\)[?]-->.*|$_y_|%" \ + -e "/^=/d" -e "s|&|\\\\&|g" $INP # $++ + $SED -e "/^=....=formatter /d" \ + -e "/=text=/s%=text=$V9%s|.*<!--$q\\\\(\\1\\\\):-->.*|$_X_|%" \ + -e "/=Text=/s%=Text=$V9%s|.*<!--$q\\\\(\\1\\\\):-->.*|$_X_|%" \ + -e "/=name=/s%=name=$V9%s|.*<!--$q\\\\(\\1\\\\)[?]:-->.*|$_Y_|%" \ + -e "/=Name=/s%=Name=$V9%s|.*<!--$q\\\\(\\1\\\\)[?]:-->.*|$_Y_|%" \ + -e "/=text=/s%=text=$V8%s|.*<!--$q\\\\(\\1\\\\):-->.*|$_X_|%" \ + -e "/=Text=/s%=Text=$V8%s|.*<!--$q\\\\(\\1\\\\):-->.*|$_X_|%" \ + -e "/=name=/s%=name=$V8%s|.*<!--$q\\\\(\\1\\\\)[?]:-->.*|$_Y_|%" \ + -e "/=Name=/s%=Name=$V8%s|.*<!--$q\\\\(\\1\\\\)[?]:-->.*|$_Y_|%" \ + -e "/^=/d" -e "s|&|\\\\&|g" $INP # $++ + echo "/^WARNING:/!d" # $++ +} + +info2vars_sed () # generate <!--$vars--> substition sed addon script +{ + INP="$1" ; test ".$INP" = "." && INP="$tmp/$F.$INFO" + V8=" *\\([^ ][^ ]*\\) \\(.*\\)" + V9=" *DC[.]\\([^ ][^ ]*\\) \\(.*\\)" + N8=" *\\([^ ][^ ]*\\) \\([$NN].*\\)" + N9=" *DC[.]\\([^ ][^ ]*\\) \\([$NN].*\\)" + V0="\\\\([<]*\\\\)\\\\\\\$" + V1="\\\\([^<>]*\\\\)\\\\\\\$" + V2="\\\\([^{<>}]*\\\\)" + V3="\\\\([^<>]*\\\\)" + SS="<""<>"">" # spacer so value="2004" does not make for s|\(...\)|\12004| + test ".$commentvars" = ".no" && updatevars="no" # duplicated from + test ".$commentvars" = ".no" && expandvars="no" # option handling + test ".$commentvars" = ".no" && simplevars="no" # tests below + test ".$expandvars" != ".no" && \ + $SED -e "/^=....=formatter /d" \ + -e "/^=name=/s,=name=$V9,s|<!--$V0\\1[?]-->|- \\2|," \ + -e "/^=Name=/s,=Name=$V9,s|<!--$V0\\1[?]-->|(\\2)|," \ + -e "/^=name=/s,=name=$V8,s|<!--$V0\\1[?]-->|- \\2|," \ + -e "/^=Name=/s,=Name=$V8,s|<!--$V0\\1[?]-->|(\\2)|," \ + -e "/^=/d" -e "s|&|\\\\&|g" $INP # $++ + test ".$expandvars" != ".no" && \ + $SED -e "/^=....=formatter /d" \ + -e "/^=text=/s,=text=$V9,s|<!--$V1\\1-->|\\\\1$SS\\2|," \ + -e "/^=Text=/s,=Text=$V9,s|<!--$V1\\1-->|\\\\1$SS\\2|," \ + -e "/^=name=/s,=name=$V9,s|<!--$V1\\1[?]-->|\\\\1$SS\\2|," \ + -e "/^=Name=/s,=Name=$V9,s|<!--$V1\\1[?]-->|\\\\1$SS\\2|," \ + -e "/^=text=/s,=text=$V8,s|<!--$V1\\1-->|\\\\1$SS\\2|," \ + -e "/^=Text=/s,=Text=$V8,s|<!--$V1\\1-->|\\\\1$SS\\2|," \ + -e "/^=name=/s,=name=$V8,s|<!--$V1\\1[?]-->|\\\\1$SS\\2|," \ + -e "/^=Name=/s,=Name=$V8,s|<!--$V1\\1[?]-->|\\\\1$SS\\2|," \ + -e "/^=/d" -e "s|&|\\\\&|g" $INP # $++ + test ".$simplevars" != ".no" && test ".$updatevars" != ".no" && \ + $SED -e "/^=....=formatter /d" \ + -e "/^=text=/s,=text=$V9,s|<!--$V0\\1:-->[$AX]*|\\2|," \ + -e "/^=Text=/s,=Text=$V9,s|<!--$V0\\1:-->[$AX]*|\\2|," \ + -e "/^=name=/s,=name=$V9,s|<!--$V0\\1[?]:-->[$AX]*|- \\2|," \ + -e "/^=Name=/s,=Name=$V9,s|<!--$V0\\1[?]:-->[$AX]*| (\\2) |," \ + -e "/^=text=/s,=text=$V8,s|<!--$V0\\1:-->[$AX]*|\\2|," \ + -e "/^=Text=/s,=Text=$V8,s|<!--$V0\\1:-->[$AX]*|\\2|," \ + -e "/^=name=/s,=name=$V8,s|<!--$V0\\1[?]:-->[$AX]*|- \\2|," \ + -e "/^=Name=/s,=Name=$V8,s|<!--$V0\\1[?]:-->[$AX]*| (\\2) |," \ + -e "/^=/d" -e "s|&|\\\\&|g" $INP # $++ + test ".$updatevars" != ".no" && \ + $SED -e "/^=....=formatter /d" \ + -e "/^=name=/s,=name=$V9,s|<!--$V0\\1:[?]-->[^<>]*|- \\2|," \ + -e "/^=Name=/s,=Name=$V9,s|<!--$V0\\1:[?]-->[^<>]*| (\\2) |," \ + -e "/^=name=/s,=name=$V8,s|<!--$V0\\1:[?]-->[^<>]*|- \\2|," \ + -e "/^=Name=/s,=Name=$V8,s|<!--$V0\\1:[?]-->[^<>]*| (\\2) |," \ + -e "/^=/d" -e "s|&|\\\\&|g" $INP # $++ + test ".$updatevars" != ".no" && \ + $SED -e "/^=....=formatter /d" \ + -e "/^=text=/s,=text=$V9,s|<!--$V1\\1:[=]-->[^<>]*|\\\\1$SS\\2|," \ + -e "/^=Text=/s,=Text=$V9,s|<!--$V1\\1:[=]-->[^<>]*|\\\\1$SS\\2|," \ + -e "/^=name=/s,=name=$V9,s|<!--$V1\\1:[?]-->[^<>]*|\\\\1$SS\\2|," \ + -e "/^=Name=/s,=Name=$V9,s|<!--$V1\\1:[?]-->[^<>]*|\\\\1$SS\\2|," \ + -e "/^=text=/s,=text=$V8,s|<!--$V1\\1:[=]-->[^<>]*|\\\\1$SS\\2|," \ + -e "/^=Text=/s,=Text=$V8,s|<!--$V1\\1:[=]-->[^<>]*|\\\\1$SS\\2|," \ + -e "/^=name=/s,=name=$V8,s|<!--$V1\\1:[?]-->[^<>]*|\\\\1$SS\\2|," \ + -e "/^=Name=/s,=Name=$V8,s|<!--$V1\\1:[?]-->[^<>]*|\\\\1$SS\\2|," \ + -e "/^=/d" -e "s|&|\\\\&|g" $INP # $++ + test ".$attribvars" != ".no" && \ + $SED -e "/^=....=formatter /d" \ + -e "/^=text=/s,=text=$V9,s|<$V1{\\1:[=]$V2}$V3>|<\\\\1$SS\\2\\\\3>|," \ + -e "/^=Text=/s,=Text=$V9,s|<$V1{\\1:[=]$V2}$V3>|<\\\\1$SS\\2\\\\3>|," \ + -e "/^=name=/s,=name=$V9,s|<$V1{\\1:[?]$V2}$V3>|<\\\\1$SS\\2\\\\3>|," \ + -e "/^=Name=/s,=Name=$V9,s|<$V1{\\1:[?]$V2}$V3>|<\\\\1$SS\\2\\\\3>|," \ + -e "/^=text=/s,=text=$V8,s|<$V1{\\1:[=]$V2}$V3>|<\\\\1$SS\\2\\\\3>|," \ + -e "/^=Text=/s,=Text=$V8,s|<$V1{\\1:[=]$V2}$V3>|<\\\\1$SS\\2\\\\3>|," \ + -e "/^=name=/s,=name=$V8,s|<$V1{\\1:[?]$V2}$V3>|<\\\\1$SS\\2\\\\3>|," \ + -e "/^=Name=/s,=Name=$V8,s|<$V1{\\1:[?]$V2}$V3>|<\\\\1$SS\\2\\\\3>|," \ + -e "/^=/d" -e "s|&|\\\\&|g" $INP # $++ + test ".$simplevars" != ".no" && \ + $SED -e "/^=....=formatter /d" \ + -e "/^=text=/s,=text=$V9,s|<!--\\1-->[$AX]*|\\2|," \ + -e "/^=Text=/s,=Text=$V9,s|<!--\\1-->[$AX]*|\\2|," \ + -e "/^=name=/s,=name=$V9,s|<!--\\1[?]-->[$AX]*| - \\2|," \ + -e "/^=Name=/s,=Name=$V9,s|<!--\\1[?]-->[$AX]*| (\\2) |," \ + -e "/^=text=/s,=text=$V8,s|<!--\\1-->[$AX]*|\\2|," \ + -e "/^=Text=/s,=Text=$V8,s|<!--\\1-->[$AX]*|\\2|," \ + -e "/^=name=/s,=name=$V8,s|<!--\\1[?]-->[$AX]*| - \\2|," \ + -e "/^=Name=/s,=Name=$V8,s|<!--\\1[?]-->[$AX]*| (\\2) |," \ + -e "/^=/d" -e "s|&|\\\\&|g" $INP # $++ + # if value="2004" then generated sed might be "\\12004" which is bad + # instead we generate an edited value of "\\1$SS$value" and cut out + # the spacer now after expanding the variable values: + echo "s|$SS||g" # $++ +} + +info2meta_sed () # generate <meta name..> text portion +{ + # http://www.metatab.de/meta_tags/DC_type.htm + INP="$1" ; test ".$INP" = "." && INP="$tmp/$F.$INFO" + V6=" *HTTP[.]\\([^ ][^ ]*\\) \\(.*\\)" + V7=" *DC[.]\\([^ ][^ ]*\\) \\(.*\\)" + V8=" *\\([^ ][^ ]*\\) \\(.*\\)" + INFO_META_TYPE_SCHEME="name=\"DC.type\" content=\"\\2\" scheme=\"\\1\"" + INFO_META_DCMI="name=\"\\1\" content=\"\\2\" scheme=\"DCMIType\"" + INFO_META_NAME_TZ="name=\"\\1\" content=\"\\2 `timezone`\"" + INFO_META_NAME="name=\"\\1\" content=\"\\2\"" + INFO_META_HTTP="http-equiv=\"\\1\" content=\"\\2\"" + $SED -e "/=....=today /d" \ + -e "/=meta=HTTP[.]/s,=meta=$V6, <meta $INFO_META_HTTP />," \ + -e "/=meta=DC[.]DCMIType /s,=meta=$V7, <meta $INFO_META_TYPE_SCHEME />," \ + -e "/=meta=DC[.]type Collection$/s,=meta=$V8, <meta $INFO_META_DCMI />," \ + -e "/=meta=DC[.]type Dataset$/s,=meta=$V8, <meta $INFO_META_DCMI />," \ + -e "/=meta=DC[.]type Event$/s,=meta=$V8, <meta $INFO_META_DCMI />," \ + -e "/=meta=DC[.]type Image$/s,=meta=$V8, <meta $INFO_META_DCMI />," \ + -e "/=meta=DC[.]type Service$/s,=meta=$V8, <meta $INFO_META_DCMI />," \ + -e "/=meta=DC[.]type Software$/s,=meta=$V8, <meta $INFO_META_DCMI />," \ + -e "/=meta=DC[.]type Sound$/s,=meta=$V8, <meta $INFO_META_DCMI />," \ + -e "/=meta=DC[.]type Text$/s,=meta=$V8, <meta $INFO_META_DCMI />," \ + -e "/=meta=DC[.]date[.].*[+]/s,=meta=$V8, <meta $INFO_META_NAME />," \ + -e "/=meta=DC[.]date[.].*[:]/s,=meta=$V8, <meta $INFO_META_NAME_TZ />," \ + -e "/=meta=/s,=meta=$V8, <meta $INFO_META_NAME />," \ + -e "/<meta name=\"[^\"]*\" content=\"\" /d" \ + -e "/<meta http-equiv=\"[^\"]*\" content=\"\" /d" \ + -e "/^=/d" $INP # $++ +} + +info_get_entry () # get the first <!--vars--> value known so far +{ + TXT="$1" ; test ".$TXT" = "." && TXT="sect" + INP="$2" ; test ".$INP" = "." && INP="$tmp/$F.$INFO" + $SED -e "/=text=$TXT /!d" -e "s/=text=$TXT //" -e "q" $INP # $++ +} + +info1grep () # test for a <!--vars--> substition to be already present +{ + TXT="$1" ; test ".$TXT" = "." && TXT="sect" + INP="$2" ; test ".$INP" = "." && INP="$tmp/$F.$INFO" + $GREP "^=text=$TXT " $INP >$NULL + return $? +} + +dx_init() +{ + mkpathdir "$tmp" + dx_meta formatter `basename $opt_formatter` > "$tmp/$F.$INFO" + for opt in $opt_variables ; do case "$opt" in # commandline --def=value + *_*) op_=`echo "$opt" | sed -e "y/_/-/"` # makes for <!--$def--> + dx_meta "$op_" `eval echo "\\\$opt_$opt"` ;; + *) dx_text "$opt" `eval echo "\\\$opt_$opt"` ;; + esac ; done +} + +dx_line () +{ + echo "$1$2 "`trimmm "$3"` >> "$tmp/$F.$INFO" +} + +DX_line () +{ + dx_val_=`echo "$3" | sed -e "s/<[^<>]*>//g"` + dx_line "$1" "$2" "$dx_val_" +} + +dx_text () +{ + dx_line "=text=" "$1" "$2" +} + +DX_text () # add a <!--vars--> substition includings format variants +{ + N=`trimm "$1"` ; T=`trimm "$2"` + if test ".$N" != "." ; then + if test ".$T" != "." ; then + text=`echo "$T" | $SED -e "y/$UPPER/$LOWER/" -e "s/<[^<>]*>//g"` + dx_line "=text=" "$N" "$T" + dx_line "=name=" "$N" "$text" + varname=`echo "$N" | $SED -e 's/.*[.]//'` # cut out front part + if test ".$N" != ".$varname" ; then + text=`echo "$varname $T" | $SED -e "y/$UPPER/$LOWER/" -e "s/<[^<>]*>//g"` + dx_line "=Text=" "$varname" "$T" + dx_line "=Name=" "$varname" "$text" + fi + fi + fi +} + +dx_meta () +{ + DX_line "=meta=" "$1" "$2" +} + +DX_meta () # add simple meta entry and its <!--vars--> subsitution +{ + DX_line "=meta=" "$1" "$2" + DX_text "$1" "$2" +} + +DC_meta () # add new DC.meta entry plus two <!--vars--> substitutions +{ + DX_line "=meta=" "DC.$1" "$2" + DX_text "DC.$1" "$2" + DX_text "$1" "$2" +} + +HTTP_meta () # add new HTTP.meta entry plus two <!--vars--> substitutions +{ + DX_line "=meta=" "HTTP.$1" "$2" + DX_text "HTTP.$1" "$2" + DX_text "$1" "$2" +} + +DC_VARS_Of () # check DC vars as listed in $DC_VARS global and generate DC_meta +{ # the results will be added to .meta.tmp and .vars.tmp later + FILENAME="$1" ; test ".$FILENAME" = "." && FILENAME="$SOURCEFILE" + for M in $DC_VARS title ; do + # scan for a <markup> of this name + part=`$SED -e "/<$M>/!d" -e "s|.*<$M>||" -e "s|</$M>.*||" -e q $FILENAME` + part=`trimm "$part"` + text=`echo "$part" | $SED -e "s|^[$AA]*:||"` + text=`trimm "$text"` + test ".$text" = "." && continue + # <mark:part> will be <meta name="mark.part"> + if test ".$text" != ".$part" ; then + N=`echo "$part" | $SED -e "s/:.*//"` + DC_meta "$M.$N" "$text" + elif test ".$M" = ".date" ; then + DC_meta "$M.issued" "$text" # "<date>" -> "<date>issued:" + else + DC_meta "$M" "$text" + fi + done +} + +HTTP_VARS_Of () # check HTTP-EQUIVs as listed in $_EQUIV global then +{ # generate meta tags that are http-equiv= instead of name= + FILENAME="$1" ; test ".$FILENAME" = "." && FILENAME="$SOURCEFILE" + for M in $_EQUIVS ; do + # scan for a <markup> of this name + part=`$SED -e "/<$M>/!d" -e "s|.*<$M>||" -e "s|</$M>.*||" -e q $FILENAME` + part=`trimm "$part"` + text=`echo "$part" | $SED -e "s|^[$AA]*:||"` + text=`trimm "$text"` + test ".$text" = "." && continue + if test ".$M" = ".redirect" ; then + HTTP_meta "refresh" "5; url=$text" ; DX_text "$M" "$text" + elif test ".$M" = ".charset" ; then + HTTP_meta "content-type" "text/html; charset=$text" + else + HTTP_meta "$M" "$text" + fi + done +} + +DC_isFormatOf () # make sure there is this DC.relation.isFormatOf tag +{ # choose argument for a fallback (usually $SOURCEFILE) + NAME="$1" ; test ".$NAME" = "." && NAME="$SOURCEFILE" + info1grep DC.relation.isFormatOf || DC_meta relation.isFormatOf "$NAME" +} + +DC_publisher () # make sure there is this DC.publisher meta tag +{ # choose argument for a fallback (often $USER) + NAME="$1" ; test ".$NAME" = "." && NAME="$USER" + info1grep DC.publisher || DC_meta publisher "$NAME" +} + +DC_modified () # make sure there is a DC.date.modified meta tag +{ # maybe choose from filesystem dates if possible + Q="$1" # target file + if info1grep DC.date.modified ; then : + else + _42_chars="........................................." + cut_42_55="s/^$_42_chars\\(.............\\).*/\\1/" # i.e.`cut -b 42-55` + text=`$STAT_R $Q 2>$NULL | $SED -e '/odify:/!d' -e 's|.*fy:||' -e q` + text=`echo "$text" | $SED -e "s/:..[.][$NN]*//"` + text=`trimm "$text"` + test ".$text" = "." && \ + text=`$DATE_R "$Q" +%Y-%m-%d 2>$NULL` # GNU sed + test ".$text" = "." && + text=`$LS_L "$Q" | $SED -e "$cut_42_55" -e "s/^ *//g" -e "q"` + text=`echo "$text" | $SED -e "s/[$NN]*:.*//"` # cut way seconds + DC_meta date.modified `trimm "$text"` + fi +} + +DC_date () # make sure there is this DC.date meta tag +{ # choose from one of the available DC.date.* specials + Q="$1" # source file + if info1grep DC.date + then DX_text issue "dated `info_get_entry DC.date`" + DX_text updated "`info_get_entry DC.date`" + else text="" + for kind in available issued modified created ; do + text=`info_get_entry DC.date.$kind` + # test ".$text" != "." && echo "$kind = date = $text ($Q)" + test ".$text" != "." && break + done + if test ".$text" = "." ; then + M="date" + part=`$SED -e "/<$M>/!d" -e "s|.*<$M>||" -e "s|</$M>.*||" -e q $Q` + part=`trimm "$part"` + text=`echo "$part" | $SED -e "s|^[$AA]*:||"` + text=`trimm "$text"` + fi + if test ".$text" = "." ; then + M="!--date:*=*--" # takeover updateable variable... + part=`$SED -e "/<$M>/!d" -e "s|.*<$M>||" -e "s|</.*||" -e q $Q` + part=`trimm "$part"` + text=`echo "$part" | $SED -e "s|^[$AA]*:||" -e "s|\\&.*||"` + text=`trimm "$text"` + fi + text=`echo "$text" | $SED -e "s/[$NN]*:.*//"` # cut way seconds + DX_text updated "$text" + text1=`echo "$text" | $SED -e "s|^.* *updated ||"` + if test ".$text" != ".$text1" ; then + kind="modified" ; text=`echo "$text1" | $SED -e "s|,.*||"` + fi + text1=`echo "$text" | $SED -e "s|^.* *modified ||"` + if test ".$text" != ".$text1" ; then + kind="modified" ; text=`echo "$text1" | $SED -e "s|,.*||"` + fi + text1=`echo "$text" | $SED -e "s|^.* *created ||"` + if test ".$text" != ".$text1" ; then + kind="created" ; text=`echo "$text1" | $SED -e "s|,.*||"` + fi + text=`echo "$text" | $SED -e "s/[$NN]*:.*//"` # cut way seconds + DC_meta date `trimm "$text"` + DX_text issue `trimm "$kind $text"` + fi +} + +DC_title () +{ + # choose a title for the document, either an explicit title-tag + # or one of the section headers in the document or fallback to filename + Q="$1" # target file + if info1grep DC.title ; then : + else + for M in TITLE title H1 h1 H2 h2 H3 H3 H4 H4 H5 h5 H6 h6 ; do + text=`$SED -e "/<$M>/!d" -e "s|.*<$M>||" -e "s|</$M>.*||" -e q $Q` + text=`trimm "$text"` ; test ".$text" != "." && break + MM="$M [^<>]*" + text=`$SED -e "/<$MM>/!d" -e "s|.*<$MM>||" -e "s|</$M>.*||" -e q $Q` + text=`trimm "$text"` ; test ".$text" != "." && break + done + if test ".text" = "." ; then + text=`basename $Q .html` + text=`basename $text .htm | $SED -e 'y/_/ /' -e "s/\\$/ info/"` + fi + term=`echo "$text" | $SED -e 's/.*[(]//' -e 's/[)].*//'` + text=`echo "$text" | $SED -e 's/[(][^()]*[)]//'` + if test ".$term" = "." || test ".$term" = ".$text" ; then + DC_meta title "$text" + else + DC_meta title "$term - $text" + fi + fi +} + +site_get_section () # return parent section page of given page +{ + _F_=`sed_slash_key "$1"` + $SED -e "/^=sect=$_F_ /!d" -e "s/^=sect=$_F_ //" -e q "$MK_INFO" # $++ +} + +DC_section () # not really a DC relation (shall we use isPartOf ?) +{ # each document should know its section father + sectn=`site_get_section "$F"` + if test ".$sectn" != "." ; then + DC_meta relation.section "$sectn" + fi +} + +info_get_entry_section() +{ + info_get_entry DC.relation.section # $++ +} + +site_get_selected () # return section of given page +{ + _F_=`sed_slash_key "$1"` + $SED -e "/=use.=$_F_ /!d" -e "s/=use.=[^ ]* //" -e q "$MK_INFO" # $++ +} + +DC_selected () # not really a DC title (shall we use alternative ?) +{ + # each document might want to highlight the currently selected item + short=`site_get_selected "$F"` + if test ".$short" != "." ; then + DC_meta title.selected "$short" + fi +} + +info_get_entry_selected () +{ + info_get_entry DC.title.selected # $++ +} + +site_get_rootsections () # return all sections from root of nav tree +{ + $SED -e "/=use1=/!d" -e "s/=use.=\\([^ ]*\\) .*/\\1/" "$MK_INFO" # $++ +} + +site_get_sectionpages () # return all children pages in the given section +{ + _F_=`sed_slash_key "$1"` + $SED -e "/^=sect=[^ ]* $_F_\$/!d" -e "s/^=sect=//" \ + -e "s/ .*//" "$MK_INFO" # $++ +} + +site_get_subpages () # return all page children of given page +{ + _F_=`sed_slash_key "$1"` + $SED -e "/^=node=[^ ]* $_F_\$/!d" -e "s/^=node=//" -e "s/ .*//" "$MK_INFO" + # $++ +} + +site_get_parentpage () # return parent page for given page (".." for sections) +{ + _F_=`sed_slash_key "$1"` + $SED -e "/^=node=$_F_ /!d" -e "s/^=node=[^ ]* //" -e "q" "$MK_INFO" # $++ +} + +DX_alternative () # detect wether page asks for alternative style +{ # which is generally a shortpage variant + x=`mksite_magic_option alternative $1 | sed -e "s/^ *//" -e "s/ .*//"` + if test ".$x" != "." ; then + DX_text alternative "$x" + fi +} + +info2head_sed () # append alternative handling script to $HEAD +{ + have=`info_get_entry alternative` + if test ".$have" != "." ; then + echo "/<!--mksite:alternative:$have .*-->/{" # $++ + echo "s/<!--mksite:alternative:$have\\( .*\\)-->/\\1/" # $++ + echo "q" # $++ + echo "}" # $++ + fi +} +info2body_sed () # append alternative handling script to $BODY +{ + have=`info_get_entry alternative` + if test ".$have" != "." ; then + echo "s/<!--mksite:alternative:$have\\( .*\\)-->/\\1/" # $++ + fi +} + +bodymaker_for_sectioninfo () +{ + test ".$sectioninfo" = ".no" && return + _x_="<!--mksite:sectioninfo::-->" + _q_="\\([^<>]*[$AX][^<>]*\\)" + test ".$sectioninfo" != ". " && _q_="[ ][ ]*$sectioninfo\\([ ]\\)" + echo "s|\\(^<[hH][$NN][ >].*</[hH][$NN]>\\)$_q_|\\1$_x_\\2|" # $++ + echo "/$_x_/s|^|<table width=\"100%\"><tr valign=\"bottom\"><td>|" # $++ + echo "/$_x_/s|</[hH][$NN]>|&</td><td align=\"right\"><i>|" # $++ + echo "/$_x_/s|\$|</i></td></tr></table>|" # $++ + echo "s|$_x_||" # $++ +} + +fast_href () # args "$FILETOREFERENCE" "$FROMCURRENTFILE:$F" +{ # prints path to $FILETOREFERENCE href-clickable in $FROMCURRENTFILE + # if no subdirectoy then output is the same as input $FILETOREFERENCE + R="$2" ; test ".$R" = "." && R="$F" + S=`back_path "$R"` + if test ".$S" = "." + then echo "$1" # $++ + else _1_=`echo "$1" | \ + $SED -e "/^ *\$/d" -e "/^\\//d" -e "/^[.][.]/d" -e "/^[$AA]*:/d" ` + if test ".$_1_" = "." # don't move any in the pattern above + then echo "$1" # $++ + else echo "$S$1" # $++ prefixed with backpath + fi fi +} + +make_fast () # experimental - make a FAST file that can be applied +{ # to htm sourcefiles in a subdirectory of the sitefile. +# R="$1" ; test ".$R" = "." && R="$F" + S=`back_path "$F"` + if test ".$S" = "" ; then + # echo "backpath '$F' = none needed" + $CATNULL # $++ + else + # echo "backpath '$F' -> '$S'" + $SED -e "/href=\"[^\"]*\"/!d" -e "s/.*href=\"//" -e "s/\".*//" \ + -e "/^ *\$/d" -e "/^\\//d" -e "/^[.][.]/d" -e "/^[$AA]*:/d" \ + $SITEFILE $SOURCEFILE | sort | uniq \ + | $SED -e "s,.*,s|href=\"&\"|href=\"$S&\"|," # $++ + fi +} + +# ============================================================== SITE MAP INFO +# each entry needs atleast a list-title, a long-title, and a list-date +# these are the basic information to be printed in the sitemap file +# where it is bound the hierarchy of sect/subsect of the entries. + +site_map_list_title() # $file $text +{ + echo "=list=$1 $2" >> "$MK_INFO" +} +info_map_list_title() # $file $text +{ + echo "=list=$2" >> "$tmp/$1.$INFO" +} +site_map_long_title() # $file $text +{ + echo "=long=$1 $2" >> "$MK_INFO" +} +info_map_long_title() # $file $text +{ + echo "=long=$2" >> "$tmp/$1.$INFO" +} +site_map_list_date() # $file $text +{ + echo "=date=$1 $2" >> "$MK_INFO" +} +info_map_list_date() # $file $text +{ + echo "=date=$2" >> "$tmp/$1.$INFO" +} + +siteinfo2sitemap () # generate <name><page><date> addon sed scriptlet +{ # the resulting script will act on each item/line + # containing <!--"filename"--> and expand any following + # reference of <!--name--> or <!--date--> or <!--long--> + INP="$1" ; test ".$INP" = "." && INP="$MK_INFO" + _list_="s|<!--\"\\1\"-->.*<!--name-->|\\&<name href=\"\\1\">\\2</name>|" + _date_="s|<!--\"\\1\"-->.*<!--date-->|\\&<date>\\2</date>|" + _long_="s|<!--\"\\1\"-->.*<!--long-->|\\&<long>\\2</long>|" + $SED -e "s:&:\\\\&:g" \ + -e "s:=list=\\([^ ]*\\) \\(.*\\):$_list_:" \ + -e "s:=date=\\([^ ]*\\) \\(.*\\):$_date_:" \ + -e "s:=long=\\([^ ]*\\) \\(.*\\):$_long_:" \ + -e "/^s|/!d" $INP # $++ +} + +make_multisitemap () +{ # each category gets its own column along with the usual entries + INPUTS="$1" ; test ".$INPUTS" = "." && INPUTS="$MK_INFO" + siteinfo2sitemap > "$MK_SITE" # have <name><long><date> addon-sed + _form_="<!--\"\\2\"--><!--use\\1--><!--long--><!--end\\1-->" + _form_="$_form_<br><!--name--><!--date-->" + _tiny_="small><small><small" ; _tinyX_="small></small></small " + _tabb_="<br><$_tiny_> </$_tinyX_>" ; _bigg_="<big> </big>" + echo "<table width=\"100%\"><tr><td> " # $++ + $SED -e "/=use.=/!d" -e "s|=use\\(.\\)=\\([^ ]*\\) .*|$_form_|" \ + -f "$MK_SITE" -e "/<name/!d" \ + -e "s|<!--use1-->|</td><td valign=\"top\"><b>|" \ + -e "s|<!--end1-->|</b>|" \ + -e "s|<!--use2-->|<br>|" \ + -e "s|<!--use.-->|<br>|" -e "s/<!--[^<>]*-->/ /g" \ + -e "s|<long>||" -e "s|</long>||" \ + -e "s|<name |<$_tiny_><a |" -e "s|</name>||" \ + -e "s|<date>| |" -e "s|</date>|</a><br></$_tinyX_>|" \ + $INPUTS # $++ + echo "</td><tr></table>" # $++ +} + +make_listsitemap () +{ # traditional - the body contains a list with date and title extras + INPUTS="$1" ; test ".$INPUTS" = "." && INPUTS="$MK_INFO" + siteinfo2sitemap > "$MK_SITE" # have <name><long><date> addon-sed + _form_="<!--\"\\2\"--><!--use\\1--><!--name--><!--date--><!--long-->" + _tabb_="<td>\\ \\;</td>" + echo "<table cellspacing=\"0\" cellpadding=\"0\">" # $++ + $SED -e "/=use.=/!d" -e "s|=use\\(.\\)=\\([^ ]*\\) .*|$_form_|" \ + -f "$MK_SITE" -e "/<name/!d" \ + -e "s|<!--use\\(1\\)-->|<tr class=\"listsitemap\\1\"><td>*</td>|" \ + -e "s|<!--use\\(2\\)-->|<tr class=\"listsitemap\\1\"><td>-</td>|" \ + -e "s|<!--use\\(.\\)-->|<tr class=\"listsitemap\\1\"><td> </td>|" \ + -e "/<tr.class=\"listsitemap3\">/s|<name [^<>]*>|&- |" \ + -e "s|<!--[^<>]*-->| |g" \ + -e "s|<name href=\"name:sitemap:|<name href=\"|" \ + -e "s|<name |<td><a |" -e "s|</name>|</a></td>$_tabb_|" \ + -e "s|<date>|<td><small>|" -e "s|</date>|</small></td>$_tabb_|" \ + -e "s|<long>|<td><em>|" -e "s|</long>|</em></td></tr>|" \ + $INPUTS # $++ + for xx in `grep "=use.=name:sitemap:" $INPUTS` ; do + xx=`echo $xx | sed -e "s/=use.=name:sitemap://"` + if test -f "$xx" ; then + grep "<tr.class=\"listsitemap[$NN]\">" $xx # $++ + fi + done + echo "</table>" # $++ +} + +print_extension () +{ + ARG="$1" ; test ".$ARG" = "." && ARG="$opt_print" + case "$ARG" in + -*|.*) echo "$ARG" ;; # $++ + *) echo ".print" ;; # $++ + esac +} + +html_sourcefile () # generally just cut away the trailing "l" (ell) +{ # making "page.html" argument into "page.htm" return + _SRCFILE_=`echo "$1" | $SED -e "s/l\\$//"` + if test -f "$_SRCFILE_" ; then echo "$_SRCFILE_" # $++ + elif test -f "$opt_src_dir/$_SRCFILE_" + then echo "$opt_src_dir/$_SRCFILE_" # $++ + else echo ".//$_SRCFILE_" # $++ + fi +} +html_printerfile_sourcefile () +{ + if test ".$printerfriendly" = "." + then + echo "$1" | sed -e "s/l\$//" # $++ + else + _ext_=`print_extension "$printerfriendly"` + _ext_=`sed_slash_key "$_ext_"` + echo "$1" | sed -e "s/l\$//" -e "s/$_ext_\\([.][$AA]*\\)\$/\\1/" # $++ + fi +} + +fast_html_printerfile () { + x=`html_printerfile "$1"` ; basename "$x" # $++ +# x=`html_printerfile "$1"` ; fast_href "$x" $2 # $++ +} + +html_printerfile () # generate the printerfile for a given normal output +{ + _ext_=`print_extension "$printerfriendly" | sed -e "s/&/\\\\&/"` + echo "$1" | sed -e "s/\\([.][$AA]*\\)\$/$_ext_\\1/" # $++ +} + +make_printerfile_fast () # generate s/file.html/file.print.html/ for hrefs +{ # we do that only for the $FILELIST + ALLPAGES="$1" ; # ="$FILELIST" + for p in $ALLPAGES ; do + a=`sed_slash_key "$p"` + b=`html_printerfile "$p"` + if test "$b" != "$p" ; then + b=`html_printerfile "$p" | sed -e "s:&:\\\\&:g" -e "s:/:\\\\\\/:g"` + echo "s/<a href=\"$a\">/<a href=\"$b\">/" # $++ + echo "s/<a href=\"$a\" /<a href=\"$b\" /" # $++ + fi + done +} + +echo_printsitefile_style () +{ + _bold_="text-decoration : none ; font-weight : bold ; " + echo " <style>" # $+++ + echo " a:link { $_bold_ color : #000060 ; }" # $+++ + echo " a:visited { $_bold_ color : #000040 ; }" # $+++ + echo " body { background-color : white ; }" # $+++ + echo " </style>" # $+++ +} + +make_printsitefile_head() # $sitefile +{ + echo_printsitefile_style > "$MK_STYLE" + $SED -e "/<title>/p" -e "/<title>/d" \ + -e "/<head>/p" -e "/<head>/d" \ + -e "/<\/head>/p" -e "/<\/head>/d" \ + -e "/<body>/p" -e "/<body>/d" \ + -e "/^.*<link [^<>]*rel=\"shortcut icon\"[^<>]*>.*\$/p" \ + -e "d" $SITEFILE | $SED -e "/<head>/r $MK_STYLE" # $+++ +} + + +# ------------------------------------------------------------------------ +# The printsitefile is a long text containing html href markups where +# each of the href lines in the file is being prefixed with the section +# relation. During a secondary call the printsitefile can grepp'ed for +# those lines that match a given output fast-file. The result is a +# navigation header with 1...3 lines matching the nesting level + +# these alt-texts will be only visible in with a text-mode browser: +printsitefile_square="width=\"8\" height=\"8\" border=\"0\"" +printsitefile_img_1="<img alt=\"|go text:\" $printsitefile_square />" +printsitefile_img_2="<img alt=\"||topics:\" $printsitefile_square />" +printsitefile_img_3="<img alt=\"|||pages:\" $printsitefile_square />" +_SECT="mksite:sect:" + +echo_current_line () # $sect $extra +{ + echo "<!--$_SECT\"$1\"-->$2" # $++ +} +make_current_entry () # $sect $file ## requires $MK_SITE +{ + S="$1" ; R="$2" + SSS=`sed_slash_key "$S"` + sep=" - " ; _left_=" [ " ; _right_=" ] " + echo_current_line "$S" "<a href=\"$R\"><!--\"$R\"--><!--name--></a>$sep" \ + | $SED -f "$MK_SITE" -e "s/<name[^<>]*>//" -e "s/<\\/name>//" \ + -e "/<a href=\"$SSS\"/s/<a href/$_left_&/" \ + -e "/<a href=\"$SSS\"/s/<\\/a>/&$_right_/" \ + -e "s/<!--\"[^\"]*\"--><!--name-->//" # $+++ +} +echo_subpage_line () # $sect $extra +{ + echo "<!--$_SECT*:\"$1\"-->$2" # $++ +} + +make_subpage_entry () +{ + S="$1" ; R="$2" + RR=`sed_slash_key "$R"` + sep=" - " ; + echo_subpage_line "$S" "<a href=\"$R\"><!--\"$R\"--><!--name--></a>$sep" \ + | $SED -f "$MK_SITE" -e "s/<name[^<>]*>//" -e "s/<\\/name>//" \ + -e "s/<!--\"[^\"]*\"--><!--name-->//" # $+++ +} + +make_printsitefile () +{ + # building the printsitefile looks big but its really a loop over sects + INPUTS="$1" ; test ".$INPUTS" = "." && INPUTS="$MK_INFO" + siteinfo2sitemap > "$MK_SITE" # have <name><long><date> addon-sed + make_printsitefile_head $SITEFILE # $++ + + sep=" - " + _sect1="<a href=\"#.\" title=\"section\">$printsitefile_img_1</a> ||$sep" + _sect2="<a href=\"#.\" title=\"topics\">$printsitefile_img_2</a> ||$sep" + _sect3="<a href=\"#.\" title=\"pages\">$printsitefile_img_3</a> ||$sep" + site_get_rootsections > "$MK_SECT1" + # round one - for each root section print a current menu + for r in `cat "$MK_SECT1"` ; do + echo_current_line "$r" "<!--mksite:sect1:A--><br>$_sect1" # $++ + for s in `cat "$MK_SECT1"` ; do + make_current_entry "$r" "$s" # $++ + done + echo_current_line "$r" "<!--mksite:sect1:Z-->" # $++ + done # "$r" + + # round two - for each subsection print a current and subpage menu + for r in `cat "$MK_SECT1"` ; do + site_get_subpages "$r" > "$MK_SECT2" + for s in `cat "$MK_SECT2"` ; do test "$r" = "$s" && continue + echo_current_line "$s" "<!--mksite:sect2:A--><br>$_sect2" # $++ + for t in `cat "$MK_SECT2"` ; do test "$r" = "$t" && continue + make_current_entry "$s" "$t" # $++ + done # "$t" + echo_current_line "$s" "<!--mksite:sect2:Z-->" # $++ + done # "$s" + _have_children_="0" + for t in `cat "$MK_SECT2"` ; do test "$r" = "$t" && continue + test "$_have_children_" = "0" && _have_children_="1" && \ + echo_subpage_line "$r" "<!--mksite:sect2:A--><br>$_sect2" # $++ + make_subpage_entry "$r" "$t" # $++ + done # "$t" + test "$_have_children_" = "1" && \ + echo_subpage_line "$r" "<!--mksite:sect2:Z-->" # $++ + done # "$r" + + # round three - for each subsubsection print a current and subpage menu + for r in `cat "$MK_SECT1"` ; do + site_get_subpages "$r" > "$MK_SECT2" + for s in `cat "$MK_SECT2"` ; do test "$r" = "$s" && continue + site_get_subpages "$s" > "$MK_SECT3" + for t in `cat "$MK_SECT3"` ; do test "$s" = "$t" && continue + echo_current_line "$t" "<!--mksite:sect3:A--><br>$_sect3" # $++ + for u in `cat "$MK_SECT3"` ; do test "$s" = "$u" && continue + make_current_entry "$t" "$u" # $++ + done # "$u" + echo_current_line "$t" "<!--mksite:sect3:Z-->" # $++ + done # "$t" + _have_children_="0" + for u in `cat "$MK_SECT3"` ; do test "$u" = "$s" && continue + test "$_have_children_" = "0" && _have_children_="1" && \ + echo_subpage_line "$s" "<!--mksite:sect3:A--><br>$_sect3" # $++ + make_subpage_entry "$s" "$u" # $++ + done # "$u" + test "$_have_children_" = "1" && \ + echo_subpage_line "$s" "<!--mksite:sect3:Z-->" # $++ + done # "$s" + done # "$r" + echo "<a name=\".\"></a>" # $++ + echo "</body></html>" # $++ +} + +# create a selector that can grep a printsitefile for the matching entries +select_in_printsitefile () # arg = "page" : return to stdout >> $P.$HEAD +{ + _selected_="$1" ; test ".$_selected_" = "." && _selected_="$F" + _section_=`sed_slash_key "$_selected_"` + echo "s/^<!--$_SECT\"$_section_\"-->//" # sect3 + echo "s/^<!--$_SECT[*]:\"$_section_\"-->//" # children + _selected_=`site_get_parentpage "$_selected_"` + _section_=`sed_slash_key "$_selected_"` + echo "s/^<!--$_SECT\"$_section_\"-->//" # sect2 + _selected_=`site_get_parentpage "$_selected_"` + _section_=`sed_slash_key "$_selected_"` + echo "s/^<!--$_SECT\"$_section_\"-->//" # sect1 + echo "/^<!--$_SECT\"[^\"]*\"-->/d" + echo "/^<!--$_SECT[*]:\"[^\"]*\"-->/d" + echo "s/^<!--mksite:sect[$NN]:[$AZ]-->//" +} + +body_for_emailfooter () +{ + test ".$emailfooter" = ".no" && return + _email_=`echo "$emailfooter" | sed -e "s|[?].*||"` + _dated_=`info_get_entry updated` + echo "<hr><table border=\"0\" width=\"100%\"><tr><td>" + echo "<a href=\"mailto:$emailfooter\">$_email_</a>" + echo "</td><td align=\"right\">" + echo "$_dated_</td></tr></table>" +} + +# ========================================================================== +# +# During processing we will create a series of intermediate files that +# store relations. They all have the same format being +# =relationtype=key value +# where key is usually s filename or an anchor. For mere convenience +# we assume that the source html text does not have lines that start +# off with =xxxx= (btw, ye remember perl section notation...). Of course +# any other format would be usuable as well. +# + +# we scan the SITEFILE for href references to be converted +# - in the new variant we use a ".gets.tmp" sed script that SECTS +# marks all interesting lines so they can be checked later +# with an sed anchor of <!--sect[$NN]--> (or <!--sect[$AZ]-->) +S="\\ \\;" +# S="[&]nbsp[;]" + +# HR and EM style markups must exist in input - BR sometimes left out +# these routines in(ter)ject hardspace before, between, after markups +# note that "<br>" is sometimes used with HR - it must exist in input +echo_HR_EM_PP () +{ + echo "/^$1$2$3*<a href=/s/^/$4/" + echo "/^<>$1$2$3*<a href=/s/^/$4/" + echo "/^$S$1$2$3*<a href=/s/^/$4/" + echo "/^$1<>$2$3*<a href=/s/^/$4/" + echo "/^$1$S$2$3*<a href=/s/^/$4/" + echo "/^$1$2<>$3*<a href=/s/^/$4/" + echo "/^$1$2$S$3*<a href=/s/^/$4/" +} + +echo_br_EM_PP () +{ + echo_HR_EM_PP "$1" "$2" "$3" "$4" + echo "/^$2$3*<a href=/s/^/$4/" + echo "/^<>$2$3*<a href=/s/^/$4/" + echo "/^$S$2$3*<a href=/s/^/$4/" + echo "/^$2<>$3*<a href=/s/^/$4/" + echo "/^$2$S$3*<a href=/s/^/$4/" +} + +echo_HR_PP () +{ + echo "/^$1$2*<a href=/s/^/$3/" + echo "/^<>$1$2*<a href=/s/^/$3/" + echo "/^$S$1$2*<a href=/s/^/$3/" + echo "/^$1<>$2*<a href=/s/^/$3/" + echo "/^$1$S$2*<a href=/s/^/$3/" +} +echo_br_PP () +{ + echo_HR_PP "$1" "$2" "$3" + echo "/^$2*<a href=/s/^/$3/" + echo "/^<>$2*<a href=/s/^/$3/" + echo "/^$S$2*<a href=/s/^/$3/" +} +echo_sp_PP () +{ + echo "/^<>$1*<a href=/s/^/$2/" + echo "/^$S$1*<a href=/s/^/$2/" + echo "/^<><>$1*<a href=/s/^/$2/" + echo "/^$S$S$1*<a href=/s/^/$2/" + echo "/^<>$1<>*<a href=/s/^/$2/" + echo "/^$S$1$S*<a href=/s/^/$2/" + echo "/^$1<><>*<a href=/s/^/$2/" + echo "/^$1$S$S*<a href=/s/^/$2/" + echo "/^$1<>*<a href=/s/^/$2/" + echo "/^$1$S*<a href=/s/^/$2/" +} + +echo_sp_sp () +{ + echo "/^$1*<a name=/s/^/$2/" + echo "/^<>$1*<a name=/s/^/$2/" + echo "/^$S$1*<a name=/s/^/$2/" + echo "/^<><>$1*<a name=/s/^/$2/" + echo "/^$S$S$1*<a name=/s/^/$2/" + echo "/^<>$1<>*<a name=/s/^/$2/" + echo "/^$S$1$S*<a name=/s/^/$2/" + echo "/^$1<><>*<a name=/s/^/$2/" + echo "/^$1$S$S*<a name=/s/^/$2/" + echo "/^$1<>*<a name=/s/^/$2/" + echo "/^$1$S*<a name=/s/^/$2/" +} + +make_sitemap_init() +{ + # build a list of detectors that map site.htm entries to a section table + # note that the resulting .gets.tmp / .puts.tmp are real sed-script + h1="[-|[]" + b1="[*=]" + b2="[-|[]" + b3="[\\/:]" + q3="[\\/:,[]" + echo_HR_PP "<hr>" "$h1" "<!--sect1-->" > "$MK_GETS" + echo_HR_EM_PP "<hr>" "<em>" "$h1" "<!--sect1-->" >> "$MK_GETS" + echo_HR_EM_PP "<hr>" "<strong>" "$h1" "<!--sect1-->" >> "$MK_GETS" + echo_HR_PP "<br>" "$b1$b1" "<!--sect1-->" >> "$MK_GETS" + echo_HR_PP "<br>" "$b2$b2" "<!--sect2-->" >> "$MK_GETS" + echo_HR_PP "<br>" "$b3$b3" "<!--sect3-->" >> "$MK_GETS" + echo_br_PP "<br>" "$b2$b2" "<!--sect2-->" >> "$MK_GETS" + echo_br_PP "<br>" "$b3$b3" "<!--sect3-->" >> "$MK_GETS" + echo_br_EM_PP "<br>" "<small>" "$q3" "<!--sect3-->" >> "$MK_GETS" + echo_br_EM_PP "<br>" "<em>" "$q3" "<!--sect3-->" >> "$MK_GETS" + echo_br_EM_PP "<br>" "<u>" "$q3" "<!--sect3-->" >> "$MK_GETS" + echo_HR_PP "<br>" "$q3" "<!--sect3-->" >> "$MK_GETS" + echo_sp_PP "$q3" "<!--sect3-->" >> "$MK_GETS" + echo_sp_sp "$q3" "<!--sect9-->" >> "$MK_GETS" + $SED -e "s/\\(>\\)\\(\\[\\)/\\1 *\\2/" "$MK_GETS" > "$MK_PUTS" + # the .puts.tmp variant is used to <b><a href=..></b> some hrefs which + # shall not be used otherwise for being generated - this is nice for + # some quicklinks somewhere. The difference: a whitspace "<hr> <a...>" +} + +_uses_="=use\\1=\\2 \\3" ; _name_="=use\\1=name:\\2 \\3" ; +_getW_="<!--sect\\([$NN]\\)-->" +_getX_="<!--sect\\([$NN]\\)--><[^<>]*>[^<>]*" +_getY_="<!--sect\\([$NN]\\)--><[^<>]*>[^<>]*<[^<>]*>[^<>]*" + +make_sitemap_list() +{ + # scan sitefile for references pages - store as "=use+=href+ anchortext" + $SED -f $MK_GETS -e "/^<!--sect[$NN]-->/!d" \ + -e "s|^$_getX_<a href=\"\\([^\"]*\\)\"[^<>]*>\\(.*\\)</a>.*|$_uses_|" \ + -e "s|^$_getY_<a href=\"\\([^\"]*\\)\"[^<>]*>\\(.*\\)</a>.*|$_uses_|" \ + -e "s|^$_getW_<a name=\"\\([^\"]*\\)\"[^<>]*>\\(.*\\)</a>.*|$_name_|" \ + -e "s|^$_getX_<a name=\"\\([^\"]*\\)\"[^<>]*>\\(.*\\)</a>.*|$_name_|" \ + -e "s|^$_getY_<a name=\"\\([^\"]*\\)\"[^<>]*>\\(.*\\)</a>.*|$_name_|" \ + -e "/^=....=/!d" "$SITEFILE" > "$MK_INFO" +} + +make_sitemap_sect() +{ + # scan used pages and store prime section group relation =sect= and =node= + # (A) each "use1" creates "=sect=href+ href1" for all following non-"use1" + # (B) each "use1" creates "=node=href2 href1" for all following "use2" + $SED -e "/=use.=/!d" \ + -e "/=use1=/{" -e "h" -e "s:=use1=\\([^ ]*\\) .*:\\1:" -e "x" -e "}" \ + -e "s/=use.=\\([^ ]*\\) .*/=sect=\\1/" \ + -e G -e "s:\\n: :" "$MK_INFO" >> "$MK_INFO" + $SED -e "/=use.=/!d" \ + -e "/=use1=/{" -e "h" -e "s:=use1=\\([^ ]*\\) .*:\\1:" -e "x" -e "}" \ + -e "/=use[13456789]=/d" \ + -e "s/=use.=\\([^ ]*\\) .*/=node=\\1/" \ + -e G -e "s:\\n: :" "$MK_INFO" >> "$MK_INFO" +} + +make_sitemap_page() +{ + # scan used pages and store secondary group relation =page= and =node= + # the parenting =node= for use3 is usually a use2 (or use1 if none there) + $SED -e "/=use.=/!d" \ + -e "/=use1=/{" -e "h" -e "s:=use1=\\([^ ]*\\) .*:\\1:" -e "x" -e "}" \ + -e "/=use2=/{" -e "h" -e "s:=use2=\\([^ ]*\\) .*:\\1:" -e "x" -e "}" \ + -e "/=use[1]=/d" \ + -e "s/=use.=\\([^ ]*\\) .*/=page=\\1/" \ + -e G -e "s:\\n: :" "$MK_INFO" >> "$MK_INFO" + $SED -e "/=use.=/!d" \ + -e "/=use1=/{" -e "h" -e "s:=use1=\\([^ ]*\\) .*:\\1:" -e "x" -e "}" \ + -e "/=use2=/{" -e "h" -e "s:=use2=\\([^ ]*\\) .*:\\1:" -e "x" -e "}" \ + -e "/=use[12456789]=/d" \ + -e "s/=use.=\\([^ ]*\\) .*/=node=\\1/" \ + -e G -e "s:\\n: :" "$MK_INFO" >> "$MK_INFO" + # and for the root sections we register ".." as the parenting group + $SED -e "/=use1=/!d" \ + -e "s/=use.=\\([^ ]*\\) .*/=node=\\1 ../" "$MK_INFO" >> "$MK_INFO" +} +echo_site_filelist() +{ + $SED -e "/=use.=/!d" -e "s/=use.=//" -e "s/ .*//" "$MK_INFO" +} + +# ========================================================================== +# originally this was a one-pass compiler but the more information +# we were scanning out the more slower the system ran - since we +# were rescanning files for things like section information. Now +# we scan the files first for global information. +# 1.PASS + +scan_sitefile () # $F +{ + SOURCEFILE=`html_sourcefile "$F"` + if test "$SOURCEFILE" != "$F" ; then + dx_init "$F" + dx_text today "`timetoday`" + short=`echo "$F" | $SED -e "s:.*/::" -e "s:[.].*::"` # basename for all exts + short="$short ~" + DC_meta title "$short" + DC_meta date.available "`timetoday`" + DC_meta subject sitemap + DC_meta DCMIType Collection + DC_VARS_Of "$SOURCEFILE" ; HTTP_VARS_Of "$SOURCEFILE" + DC_modified "$SOURCEFILE" ; DC_date "$SOURCEFILE" + DC_section "$F" + DX_text date.formatted `timetoday` + test ".$printerfriendly" != "." && \ + DX_text "printerfriendly" `fast_html_printerfile "$F"` + test ".$USER" != "." && DC_publisher "$USER" + echo "'$SOURCEFILE': $short (sitemap)" + site_map_list_title "$F" "$short" + site_map_long_title "$F" "generated sitemap index" + site_map_list_date "$F" "`timetoday`" + fi +} + +scan_htmlfile() # "$F" +{ + SOURCEFILE=`html_sourcefile "$F"` # SCAN : + if test "$SOURCEFILE" != "$F" ; then : # HTML : + if test -f "$SOURCEFILE" ; then make_fast "$F" > "$tmp/$F.$FAST" + dx_init "$F" + dx_text today "`timetoday`" + dx_text todays "`timetodays`" + DC_VARS_Of "$SOURCEFILE" ; HTTP_VARS_Of "$SOURCEFILE" + DC_title "$SOURCEFILE" + DC_isFormatOf "$SOURCEFILE" + DC_modified "$SOURCEFILE" ; DC_date "$SOURCEFILE" ; DC_date "$SITEFILE" + DC_section "$F" ; DC_selected "$F" ; DX_alternative "$SOURCEFILE" + test ".$USER" != "." && DC_publisher "$USER" + DX_text date.formatted "`timetoday`" + test ".$printerfriendly" != "." && \ + DX_text "printerfriendly" `fast_html_printerfile "$F"` + sectn=`info_get_entry DC.relation.section` + short=`info_get_entry DC.title.selected` + site_map_list_title "$F" "$short" + info_map_list_title "$F" "$short" + title=`info_get_entry DC.title` + site_map_long_title "$F" "$title" + info_map_long_title "$F" "$title" + edate=`info_get_entry DC.date` + issue=`info_get_entry issue` + site_map_list_date "$F" "$edate" + info_map_list_date "$F" "$edate" + echo "'$SOURCEFILE': '$title' ('$short') @ '$issue' ('$sectn')" + else + echo "'$SOURCEFILE': does not exist" + site_map_list_title "$F" "$F" + site_map_long_title "$F" "$F (no source)" + fi ; else + echo "<$F> - skipped" + fi +} + +scan_namespec () +{ + # nothing so far + case "$1" in + name:sitemap:*) + short=`echo "$F" | $SED -e "s:.*/::" -e "s:[.].*::"` + short=`echo "$short ~" | $SED -e "s/name:sitemap://"` + site_map_list_title "$F" "$short" + site_map_long_title "$F" "external sitemap index" + site_map_list_date "$F" "`timetoday`" + echo "'$F' external sitemap index$n" + ;; + esac +} +scan_httpspec () +{ + # nothing so far + return; +} + +skip_namespec () +{ + # nothing so far + return; +} +skip_httpspec () +{ + # nothing so far + return; +} + +# ========================================================================== +# and now generate the output pages +# 2.PASS + +head_sed_sitemap() # $filename $section +{ + FF="$1" + SECTION=`sed_slash_key "$2"` + SECTS="<!--sect[$NN$AZ]-->" ; SECTN="<!--sect[$NN]-->" # lines with hrefs + echo "/^$SECTS.*<a href=\"$FF\">/s|</a>|</a></b>|" # $++ + echo "/^$SECTS.*<a href=\"$FF\">/s|<a href=|<b><a href=|" # $++ + test ".$sectiontab" != ".no" && \ + echo "/ href=\"$SECTION\"/s|^<td class=\"[^\"]*\"|<td |" # $++ +} + +head_sed_listsection() # $filename $section +{ + # traditional.... the sitefile is the full navigation bar + FF=`sed_slash_key "$1"` + SECTION=`sed_slash_key "$2"` + SECTS="<!--sect[$NN$AZ]-->" ; SECTN="<!--sect[$NN]-->" # lines with hrefs + echo "/^$SECTS.*<a href=\"$FF\">/s|</a>|</a></b>|" # $++ + echo "/^$SECTS.*<a href=\"$FF\">/s|<a href=|<b><a href=|" # $++ + test ".$sectiontab" != ".no" && \ + echo "/ href=\"$SECTION\"/s|^<td class=\"[^\"]*\"|<td |" # $++ +} + +head_sed_multisection() # $filename $section +{ + # sitefile navigation bar is split into sections + FF=`sed_slash_key "$1"` + SECTION=`sed_slash_key "$2"` + SECTS="<!--sect[$NN$AZ]-->" ; SECTN="<!--sect[$NN]-->" # lines with hrefs + # grep all pages with a =sect= relation to current $SECTION and + # build foreach an sed line "s|$SECTS\(<a href=$F>\)|<!--sectX-->\1|" + # after that all the (still) numeric SECTNs are deactivated / killed. + for section in $SECTION $headsection $tailsection ; do + test ".$section" = ".no" && continue + $SED -e "/^=sect=[^ ]* $section/!d" \ + -e "s, .*,\"\\\\)|<!--sectX-->\\\\1|," \ + -e "s,^=sect=,s|^$SECTS\\\\(.*<a href=\"," "$MK_INFO" # $++ + done + echo "s|^$SECTN[^ ]*\\(<a href=[^<>]*>\\).*|<!-- \\1 -->|" # $++ + echo "/^$SECTS.*<a href=\"$FF\">/s|</a>|</a></b>|" # $++ + echo "/^$SECTS.*<a href=\"$FF\">/s|<a href=|<b><a href=|" # $++ + test ".$sectiontab" != ".no" && \ + echo "/ href=\"$SECTION\"/s|^<td class=\"[^\"]*\"|<td |" # $++ +} + +make_sitefile () # "$F" +{ + SOURCEFILE=`html_sourcefile "$F"` + if test "$SOURCEFILE" != "$F" ; then + if test -f "$SOURCEFILE" ; then + # remember that in this case "${SITEFILE}l" = "$F" = "${SOURCEFILE}l" + info2vars_sed > $MK_VARS # have <!--title--> vars substituted + info2meta_sed > $MK_META # add <meta name="DC.title"> values + if test ".$simplevars" = ".warn" ; then + info2test_sed > $MK_TEST # check <!--title--> vars old-style + $SED_LONGSCRIPT "$MK_TEST" "$SOURCEFILE" | tee -a "$MK_OLDS" ; fi + F_HEAD="$tmp/$F.$HEAD" ; F_FOOT="$tmp/$F.$FOOT" + $CAT "$MK_PUTS" > "$F_HEAD" + head_sed_sitemap "$F" "`info_get_entry_section`" >> "$F_HEAD" + echo "/<head>/r $MK_META" >> "$F_HEAD" + $CAT "$MK_VARS" "$MK_TAGS" >> "$F_HEAD" + echo "/<\\/body>/d" >> "$F_HEAD" + case "$sitemaplayout" in + multi) make_multisitemap > "$F_FOOT" ;; # here we use ~foot~ to + *) make_listsitemap > "$F_FOOT" ;; # hold the main text + esac + + mkpathfile "$F" + $SED_LONGSCRIPT "$F_HEAD" "$SITEFILE" > $F # ~head~ + $CAT "$F_FOOT" >> $F # ~body~ + $SED -e "/<\\/body>/!d" -f "$MK_VARS" "$SITEFILE" >> $F #</body> + echo "'$SOURCEFILE': " `ls -s $SOURCEFILE` ">->" `ls -s $F` "(sitemap)" + else + echo "'$SOURCEFILE': does not exist" + fi fi +} + +make_htmlfile() # "$F" +{ + SOURCEFILE=`html_sourcefile "$F"` # 2.PASS + if test "$SOURCEFILE" != "$F" ; then + if test -f "$SOURCEFILE" ; then + if grep '<meta name="formatter"' "$SOURCEFILE" >/dev/null ; then + echo "$SOURCEFILE: SKIP, this sourcefile looks like a formatted file" + echo "$SOURCEFILE: (may be a sourcefile in place of a targetfile?)" + return + fi + info2vars_sed > $MK_VARS # have <!--$title--> vars substituted + info2meta_sed > $MK_META # add <meta name="DC.title"> values + if test ".$simplevars" = ".warn" ; then + info2test_sed > $MK_TEST # check <!--title--> vars old-style + $SED_LONGSCRIPT "$MK_TEST" "$SOURCEFILE" | tee -a "$MK_OLDS" ; fi + F_HEAD="$tmp/$F.$HEAD" ; F_BODY="$tmp/$F.$BODY" ; F_FOOT="$tmp/$F.$FOOT" + $CAT "$MK_PUTS" > "$F_HEAD" + case "$sectionlayout" in + multi) head_sed_multisection "$F" "`info_get_entry_section`" >> "$F_HEAD" ;; + *) head_sed_listsection "$F" "`info_get_entry_section`" >> "$F_HEAD" ;; + esac + $CAT "$MK_VARS" "$MK_TAGS" >> "$F_HEAD" #tag and vars + echo "/<\\/body>/d" >> "$F_HEAD" #cut lastline + echo "/<head>/r $MK_META" >> "$F_HEAD" #add metatags + echo "/<title>/d" > "$F_BODY" #not that line + $CAT "$MK_VARS" "$MK_TAGS" >> "$F_BODY" #tag and vars + bodymaker_for_sectioninfo >> "$F_BODY" #if sectioninfo + info2body_sed >> "$F_BODY" #cut early + info2head_sed >> "$F_HEAD" + $CAT "$tmp/$F.$FAST" >> "$F_HEAD" + test ".$emailfooter" != ".no" && \ + body_for_emailfooter > "$F_FOOT" + + mkpathfile "$F" + $SED_LONGSCRIPT "$F_HEAD" $SITEFILE > $F # ~head~ + $SED_LONGSCRIPT "$F_BODY" $SOURCEFILE >> $F # ~body~ + test -f "$F_FOOT" && $CAT "$F_FOOT" >> $F # ~foot~ + $SED -e "/<\\/body>/!d" -f "$MK_VARS" "$SITEFILE" >> $F #</body> + echo "'$SOURCEFILE': " `ls -s $SOURCEFILE` "->" `ls -s $F` + else # test -f $SOURDEFILE + echo "'$SOURCEFILE': does not exist" + fi ; else + echo "<$F> - skipped" + fi +} + +make_printerfriendly () # "$F" +{ # PRINTER + printsitefile="0" # FRIENDLY + P=`html_printerfile "$F"` + F_FAST="$tmp/$F.$FAST" + P_HEAD="$tmp/$P.$HEAD" + P_BODY="$tmp/$P.$BODY" + case "$F" in + ${SITEFILE}|${SITEFILE}l) make_fast "$F" > "$F_FAST" + printsitefile=">=>" ; BODY_TXT="$tmp/$F.$FOOT" ;; + *.html) printsitefile="=>" ; BODY_TXT="$SOURCEFILE" ;; + esac + if grep '<meta name="formatter"' "$BODY_TXT" >/dev/null ; then return; fi + if test ".$printsitefile" != ".0" && test -f "$SOURCEFILE" ; then + make_printerfile_fast "$FILELIST" > ./$MK_FAST + $CAT "$MK_VARS" "$MK_TAGS" "$MK_FAST" > "$P_HEAD" + $SED -e "/DC.relation.isFormatOf/s|content=\"[^\"]*\"|content=\"$F\"|" \ + "$MK_META" > "$MK_METT" + echo "/<head>/r $MK_METT" >> "$P_HEAD" # meta + echo "/<\\/body>/d" >> "$P_HEAD" + select_in_printsitefile "$F" >> "$P_HEAD" + _ext_=`print_extension "$printerfriendly"` # head- + $SED -e "s/[.]html\"|/$_ext_&/g" "$F_FAST" >> "$P_HEAD" # hrefs + # line_=`sed_slash_key "$printsitefile_img_2"` # back- + echo "/||topics:/s| href=\"[#][.]\"| href=\"$F\"|" >> "$P_HEAD" + echo "/|||pages:/s| href=\"[#][.]\"| href=\"$F\"|" >> "$P_HEAD" + $CAT "$F_FAST" >> "$P_HEAD" # subdir + $CAT "$MK_VARS" "$MK_TAGS" "$MK_FAST" > "$P_BODY" + $SED -e "s/[.]html\"|/$_ext_&/g" "$F_FAST" >> "$P_BODY" # body- + $CAT "$F_FAST" >> "$P_BODY" # hrefs + + mkpathfile "$P" + $SED_LONGSCRIPT "$P_HEAD" $PRINTSITEFILE > $P # ~head~ + $SED_LONGSCRIPT "$P_BODY" $BODY_TXT >> $P # ~body~ + $SED -e "/<\\/body>/!d" -f $MK_VARS $PRINTSITEFILE >> $P #</body> + echo "'$SOURCEFILE': " `ls -s $SOURCEFILE` "$printsitefile" `ls -s $P` + fi +} + + +# ======================================================================== +# ======================================================================== +# ======================================================================== + +# ======================================================================== +# #### 0. INIT +make_sitemap_init +make_sitemap_list +make_sitemap_sect +make_sitemap_page + +FILELIST=`echo_site_filelist` +if test ".$opt_filelist" != "." || test ".$opt_list" = ".file"; then + for F in $FILELIST; do echo "$F" ; done ; exit # --filelist +fi +if test ".$opt_files" != "." ; then FILELIST="$opt_files" ; fi # --files +if test ".$FILELIST" = "."; then echo "nothing to do" >&2 ; fi +if test ".$FILELIST" = ".SITEFILE" ; then echo "only '$SITEFILE'?!" >&2 ; fi + +for F in $FILELIST ; do case "$F" in #### 1. PASS +name:*) scan_namespec "$F" ;; +http:*|*://*) scan_httpspec "$F" ;; +${SITEFILE}|${SITEFILE}l) scan_sitefile "$F" ;; # ........... SCAN SITE +../*) + echo "!! -> '$F' (skipping topdir build)" + ;; +# */*.html) +# make_fast > $F.$FAST # try for later subdir build +# echo "!! -> '$F' (skipping subdir build)" +# ;; +# */*/*/|*/*/|*/|*/index.htm|*/index.html) +# echo "!! -> '$F' (skipping subdir index.html)" +# ;; +*.html) scan_htmlfile "$F" ;; # ........... SCAN HTML +*/) echo "'$F' : directory - skipped" + site_map_list_title "$F" "`sed_slash_key $F`" + site_map_long_title "$F" "(directory)" + ;; +*) echo "?? -> '$F'" + ;; +esac done + +if test ".$printerfriendly" != "." ; then # .......... PRINT VERSION + _ext_=`print_extension "$printerfriendly" | sed -e "s/&/\\\\&/"` + PRINTSITEFILE=`echo "$SITEFILE" | sed -e "s/\\.[$AA]*\$/$_ext_&/"` + echo "NOTE: going to create printer-friendly sitefile $PRINTSITEFILE" + make_printsitefile > "$PRINTSITEFILE" +fi + +if test ".$simplevars" = ". " ; then +mknewfile $MK_OLDS +fi + +for F in $FILELIST ; do case "$F" in #### 2. PASS +name:*) skip_namespec "$F" ;; +http:*|*://*) skip_httpspec "$F" ;; +${SITEFILE}|${SITEFILE}l) make_sitefile "$F" # ........ SITE FILE + if test ".$printerfriendly" != "." ; then make_printerfriendly "$F" ; fi ;; +../*) + echo "!! -> '$F' (skipping topdir build)" + ;; +# */*.html) +# echo "!! -> '$F' (skipping subdir build)" +# ;; +# */*/*/|*/*/|*/|*/index.htm|*/index.html) +# echo "!! -> '$F' (skipping subdir index.html)" +# ;; +*.html) make_htmlfile "$F" # .................. HTML FILES + if test ".$printerfriendly" != "." ; then make_printerfriendly "$F" ; fi ;; +*/) echo "'$F' : directory - skipped" + ;; +*) echo "?? -> '$F'" + ;; +esac +# .............. debug .................... + if test -d DEBUG && test -f "./$F" ; then + FFFF=`echo "$F" | sed -e s,/,:,g` + cp "$tmp/$F.$INFO" DEBUG/$FFFF.info.TMP + for P in tags vars meta page date list html sect info ; do + test -f $tmp/$MK.$P.tmp && cp $tmp/$MK.$P.tmp DEBUG/$FFFF.$P.tmp + test -f $tmp/$MK.$P.TMP && cp $tmp/$MK.$P.TMP DEBUG/$FFFF.$P.TMP + done + fi +done + +if test ".$simplevars" = ".warn" ; then if test -f "$MK_OLDS" ; then +oldvars=`cat "$MK_OLDS" | wc -l | $SED -e "s/ *//g"` +if test "$oldvars" = "0" ; then +echo "HINT: you have no simplevars in your htm sources, so you may want to" +echo "hint: set the magic <!--mksite:nosimplevars--> in your $SITEFILE" +echo "hint: which makes execution _faster_ actually in the 2. pass" +echo "note: simplevars expansion was the oldstyle way of variable expansion" +else +echo "HINT: there were $oldvars simplevars found in your htm sources." +echo "hint: This style of variable expansion will be disabled in the near" +echo "hint: future. If you do not want change then add the $SITEFILE magic" +echo "hint: <!--mksite:simplevars--> somewhere to suppress this warning" +echo "note: simplevars expansion will be an explicit option in the future." +echo "note: errornous simplevar detection can be suppressed with a magic" +echo "note: hint of <!--mksite:nosimplevars--> in the $SITEFILE for now." +fi fi fi + +rm $tmp/$MK.*.tmp +if test ".$tmp_dir_was_created" != ".no" ; then rm $tmp/* ; rmdir $tmp ; fi +exit 0 diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/mmapped.htm b/Build/source/libs/zziplib/zziplib-0.13.58/docs/mmapped.htm new file mode 100644 index 00000000000..9ac35ece988 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/mmapped.htm @@ -0,0 +1,226 @@ +<section> <date> 2005 </date> +<H2> zzip/mmapped </H2> zip access for mmapped views + +<BLOCKQUOTE> + These routines are fully independent from the traditional zzip + implementation. They assume a readonly mmapped sharedmem block + representing a complete zip file. The functions show how to + parse the structure, find files and return a decoded bytestream. +</BLOCKQUOTE> + +<section> +<H3> zzip disk handle </H3> + +<P> + Other than with the <a href="fseeko.html">fseeko</a> alternative + interface there is no need to have an actual disk handle to the + zip archive. Instead you can use a bytewise copy of a file or + even use a mmapped view of a file. This is generally the fastest + way to get to the data contained in a zipped file. All it requires + is enough of virtual memory space but a desktop computer with a + a modern operating system will easily take care of that. +</P> + +<P> + The zzipmmapped library provides a number of calls to create a + disk handle representing a zip archive in virtual memory. Per + default we use the sys/mmap.h (or MappedView) functionality + of the operating system. The <code>zzip_disk_open</code> will + open a system file descriptor and try to <code>zzip_disk_mmap</code> + the complete zip content. When finished with the zip archive + call <code>zzip_disk_close</code> to release the mapped view + and all management data. +</P> + +<PRE> + ZZIP_DISK* zzip_disk_open(char* filename); + int zzip_disk_close(ZZIP_DISK* disk); + + ZZIP_DISK* zzip_disk_new(void); + ZZIP_DISK* zzip_disk_mmap(int fd); + int zzip_disk_munmap(ZZIP_DISK* disk); + int zzip_disk_init(ZZIP_DISK* disk, + char* buffer, zzip_size_t buflen); +</PRE> + +</section><section> +<H3> reading the central directory </H3> + +<P> + To get access to a zipped file, you need a pointer to an entry in the + mmapped zip disk known under the type <code>ZZIP_DISK_ENTRY</code>. + This is again modelled after the <code>DIR_ENTRY</code> type in being + a representation of a file name inside the zip central directory. To + get an initial zzip disk entry pointer, use <code>zzip_disk_findfirst</code>, + to move the pointer to the next entry use <code>zzip_disk_findnext</code>. +</P> +<PRE> + extern ZZIP_ENTRY* zzip_disk_findfirst(FILE* disk); + extern ZZIP_ENTRY* zzip_disk_findnext(ZZIP_ENTRY* entry); +</PRE> +<P> + These two calls will allow to walk all zip archive members in the + order listed in the zip central directory. To actually implement a + directory lister ("zzipdir"), you need to get the name string of the + zzip entry. This is not just a pointer: the zzip disk entry is not + null terminated actually. Therefore we have a helper function that + will <code>strdup</code> the entry name as a normal C string: +</P> +<PRE> + #include <zzip/mmapped.h> + void _zzip_dir(char* filename) + { + ZZIP_DISK* disk = zzip_disk_open (filename); + if (! disk) return disk; + for (ZZIP_DISK_ENTRY* entry = zzip_disk_findfirst (disk); + entry ; entry = zzip_disk_findnext (entry)) { + char* name = zzip_disk_entry_strdup_name (entry); + puts (name); free (name); + } + } +</PRE> + +</section><section> +<H3> find a zipped file </H3> + +<P> + The central directory walk can be used to find any file in the + zip archive. The <code>zzipfseeko</code> library however provides + two convenience functions that allow to jump directly to the + zip disk entry of a given name or pattern. You are free to use + the returned <code>ZZIP_DISK_ENTRY</code> pointer for later calls + that type. There is no need to free this pointer as it is really + a pointer into the mmapped area of the <code>ZZIP_DISK</code>. + But do not forget to free that one via <code>zzip_disk_close</code>. +</P> +<PRE> + ZZIP_DISK_ENTRY* zzip_disk_findfile(ZZIP_DISK* disk, char* filename, + ZZIP_DISK_ENTRY* after, + zzip_strcmp_fn_t compare); + + ZZIP_DISK_ENTRY* zzip_disk_findmatch(ZZIP_DISK* disk, char* filespec, + ZZIP_ENTRY* after, + zzip_fnmatch_fn_t compare, int flags); +</PRE> +<P> + In general only the first two arguments are non-null pointing to the + zip disk handle and the file name to look for. The "after" argument + is an old value and allows you to walk the zip directory similar to + <code>zzip_disk_entry_findnext</code> but actually leaping forward. The + compare function can be used for alternate match behavior: the default + of <code>strcmp</code> might be changed to <code>strncmp</code> for + a caseless match. The "flags" of the second call are forwarded to the + posix <code>fnmatch</code> which we use as the default function. +</P> +<P> + If you do know a specific zzipped filename then you can just use + <code>zzip_disk_entry_findfile</code> and supply the return value to + <code>zzip_disk_entry_fopen</code>. There is a convenience function + <code>zzip_disk_fopen</code> that will do just that and therefore + only requires a disk handle and a filename to find-n-open. +</P> +<PRE> + #include <zzip/mmapped.h> + + int _zzip_read(ZZIP_DISK* disk, char* filename, void* buffer, int bytes) + { + ZZIP_DISK_FILE* file = zzip_disk_fopen (disk, filename); + if (! file) return -1; + int bytes = zzip_disk_fread (buffer, 1, bytes, file); + zzip_disk_fclose (file); + return bytes; + } +</PRE> + +</section><section> +<H3> reading bytes </H3> + +<P> + The example has shown already how to read some bytes off the head of + a zipped file. In general the zzipmmapped api is used to replace a few + system file routines that access a file. For that purpose we provide three + functions that look very similar to the stdio functions of + <code>fopen()</code>, <code>fread()</code> and <code>fclose()</code>. + These work on an active file descriptor of type <code>ZZIP_DISK_FILE</code>. +</P> + +<PRE> + ZZIP_DISK_FILE* zzip_disk_entry_fopen (ZZIP_DISK* disk, + ZZIP_DISK_ENTRY* entry); + ZZIP_DISK_FILE* zzip_disk_fopen (ZZIP_DISK* disk, char* filename); + zzip_size_t zzip_disk_fread (void* ptr, + zzip_size_t sized, zzip_size_t nmemb, + ZZIP_DISK_FILE* file); + int zzip_disk_fclose (ZZIP_DISK_FILE* file); + int zzip_disk_feof (ZZIP_DISK_FILE* file); +</PRE> + +<P> + In all of the examples you need to remember that you provide a single + <code>ZZIP_DISK</code> descriptor for a memory block which is in reality + a virtual filesystem on its own. Per default filenames are matched case + sensitive also on win32 systems. The findnext function will walk all + files on the zip virtual filesystem table and return a name entry + with the full pathname, i.e. including any directory names to the + root of the zip disk <code>FILE</code>. +</P> + +</section><section> +<H3> ZZIP_DISK_ENTRY inspection </H3> + +<P> + The <code>ZZIP_DISK_FILE</code> is a special file descriptor handle + of the <code>zzipmmapped</code> library - but the + <code>ZZIP_DISK_ENTRY</code> is not so special. It is actually a pointer + directly into the zip central directory managed by <code>ZZIP_DISK</code>. + While <code>zzip/mmapped.h</code> will not reveal the structure on its own, + you can include <code>zzip/format.h</code> to get access to the actual + structure content of a <code>ZZIP_DISK_ENTRY</code> by its definition +<br><b><code> struct zzip_disk_entry</code></b>. +</P> + +<P> + In reality however it is not a good idea to actually read the bytes + in the <code>zzip_disk_entry</code> structure unless you seriously know + the internals of a zip archive entry. That includes any byteswapping + needed on bigendian platforms. Instead you want to take advantage of + helper macros defined in <code>zzip/fetch.h</code>. These will take + care to convert any struct data member to the host native format. +</P> +<PRE> +extern uint16_t zzip_disk_entry_get_flags( zzip_disk_entry* entry); +extern uint16_t zzip_disk_entry_get_compr( zzip_disk_entry* entry); +extern uint32_t zzip_disk_entry_get_crc32( zzip_disk_entry* entry); + +extern zzip_size_t zzip_disk_entry_csize( zzip_disk_entry* entry); +extern zzip_size_t zzip_disk_entry_usize( zzip_disk_entry* entry); +extern zzip_size_t zzip_disk_entry_namlen( zzip_disk_entry* entry); +extern zzip_size_t zzip_disk_entry_extras( zzip_disk_entry* entry); +extern zzip_size_t zzip_disk_entry_comment( zzip_disk_entry* entry); +extern int zzip_disk_entry_diskstart( zzip_disk_entry* entry); +extern int zzip_disk_entry_filetype( zzip_disk_entry* entry); +extern int zzip_disk_entry_filemode( zzip_disk_entry* entry); + +extern zzip_off_t zzip_disk_entry_fileoffset( zzip_disk_entry* entry); +extern zzip_size_t zzip_disk_entry_sizeof_tail( zzip_disk_entry* entry); +extern zzip_size_t zzip_disk_entry_sizeto_end( zzip_disk_entry* entry); +extern char* zzip_disk_entry_skipto_end( zzip_disk_entry* entry); +</PRE> + +<P> + Additionally the <code>zzipmmapped</code> library has two additional + functions that can convert a mmapped disk entry to (a) the local + file header of a compressed file and (b) the start of the data area + of the compressed file. These are used internally upon opening of + a disk entry but they may be useful too for direct inspection of the + zip data area in special applications. +</P> +<PRE> + char* zzip_disk_entry_to_data(ZZIP_DISK* disk, + struct zzip_disk_entry* entry); + struct zzip_file_header* + zzip_disk_entry_to_file_header(ZZIP_DISK* disk, + struct zzip_disk_entry* entry); +</PRE> + +</section></section> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/referentials.htm b/Build/source/libs/zziplib/zziplib-0.13.58/docs/referentials.htm new file mode 100644 index 00000000000..3ba1171e32c --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/referentials.htm @@ -0,0 +1,65 @@ +<section><date> 15. July 2002 </date> +<h2> ZZIP Referentials </h2> Where is it used. + +<!--noborder--> + +<section> +<h3> GPL Rant </h3> + +<BLOCKQUOTE> + The GPL/LGPL do not have a clause like MPL and others to notify the + original author about certain usages of the library - that's a pity + since I do not get to know many of the areas where zziplib has come + to be used. I can only ask you to send me an e-mail, so I can put a + link from here to your project. Within thousands of downloads less + than a handful of people wrote to me - mostly for having found a bug + or having a feature request. Be nice, and write even if you have had + successfully implanted zziplib in your project... I love to hear that ;-) +</BLOCKQUOTE> + +</section><section> +<h3> opensource games </h3> + +<BLOCKQUOTE> + Although the library has not been written focusing on game data, + it has it greatest success just there. The SDL-rwops example did + further it by great amounts, people just like it to have the + thousand of small bitmaps to be assembled into one big dat file, + and put the AI scripts just next to them. +</BLOCKQUOTE> + +<ul><li> Underworld Adventures: <br> +<a href="http://uwadv.sourceforge.net"> + http://uwadv.sourceforge.net</a> +</li></ul> + +</section><section> +<h3> opensource apps/libs </h3> + +<BLOCKQUOTE> + Here the most important feature has been the smalls size of this + library and the possible to use its autoconf script and even for + those who don't, it is easy to make a custom configuration. The + source code is easy to understand and therefore to customize for + the needs of the app/lib that wants to use the functionality. +</BLOCKQUOTE> + +<ul><li> PHP ZIP Module <br> +<a href="http://www.php.net/manual/en/ref.zip.php"> + http://www.php.net/manual/en/ref.zip.php</a> +</li></ul> + +</section><section> +<h3> commercial usage </h3> + +<BLOCKQUOTE> + For commercial usage, you can bind many small files into a zip + file for easier handling. Obfuscation and io-wrapping help + greatly to implant it in areas even far from posix-io grounds. +</BLOCKQUOTE> + +<ul><li> Media Portal Backside <br> +<a href="http://www.appwares.com"> + http://www.appwares.com</a> +</li></ul> +</section></section> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/sfx-make.htm b/Build/source/libs/zziplib/zziplib-0.13.58/docs/sfx-make.htm new file mode 100644 index 00000000000..5e092e47a11 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/sfx-make.htm @@ -0,0 +1,167 @@ +<section> <date> February 2003 </date> +<h2> SFX-Make </h2> combining an EXE with a ZIP archive + +<!--border--> + +<section> +<h3> How To </h3> +<P> + In this section we walk you through the steps of combining an EXE + with a ZIP archive. The basic scheme goes like this: the final + file will have an EXE starting at offset null, followed by the + data entries of a ZIP archive. The <em>last</em> part of the ZIP + archive is the ZIP central-directory which ends at the end of the file. +</P> +<P> + The basic problem lies in the fact that the zip central-directory + entries reference their data section with an offset from the + start-of-file so that you can not just append a zip archive after + an exe stub. The trick goes like adding the EXE as the first data + part of the ZIP archive - so that the offsets for each entry will + be correct when we are finished with it. +</P> +<P> + Again, one can not just use a zip tool to put the EXE as the first + part - since each data part is preceded with an infoblock of a + few bytes. The data of the first data part will therefore not + start at offset zero. We solve this problem with moving the data + a few bytes later - so that the final file will not start with a + "PK" magic (from the zip info header) but with an "MZ" or "ELF" + magic (from the exe info header). +</P> + +</section><section> +<h3> Step 1: Creating The Zip Combination </h3> +<P> + Choose your exe file (example.exe) and wrap that file into a + zip container - ensure that the zip tool does <em>not</em> + use any compression algorithm on the data. This is usually + done with saying "zero compression level" as an option to + the zip tool. Also note that <em>no other</em> file is + wrapped as some zip tools reorder the entries from the + order on the command line to alphabetic order. Here is an + example with infozip's `zip` (e.g. on linux): + <pre> zip -0 -j example.zip example.exe </pre> +</P> +<P> + There is no zip tool that would reorder the data entries in + an existing zip archive. This mode is used here - the real + compressed data entries can now be added to the existing + zip archive that currently just wraps the exe part. With + specifying maximum compression ("-9" = compression level 9) + and throwing away any subdirectory part ("-j" = junk path) + it might look like + <pre> zip -9 -j example.zip data/* </pre> +</P> +<P> + Now we need to move the exe part by a few bytes to the + real start of the file. This can be done as easily as + writing the exe file again on to the start of the file. + However, one can not just use a shell-direction or + copy-operation since that would truncate (!!) the zip + file to the length of the exe part. The overwrite-operation + must be done without truncation. For maximum OS independence + the zziplib ships with a little tool in "test/zzipsetstub.c" + that you can reuse for this task: + <pre> zzipsetstub example.zip example.exe </pre> +</P> +<P> + This is it - the `unzip` tool can still access all data + entries but the first EXE - the first EXE will be listed + in the central-directory of the ZIP archive but one can + not extract the data since the "PK" magic at offset null + has been overwritten with the EXE magic. The data of all + the other entries can still be extracted with a normal + `unzip` tool - or any tool from the zziplib be used for + the same task. +</P> + +</section><section> +<h3> Step 2: Accessing The Data From The Program </h3> + +<P> + There is an example in test/zzipself.c that show how to do + it. The OS will provide each program with its own name in + argv[0] of the main() routine. This program file (!!) is + also the zip archive that carries the compressed data + entries along. Therefore, we can just issue a zzip_opendir + on argv[0] to access the zip central-directory. +</P> +<P> + Likewise one can open a file within it by just prepending + the string argv[0] to the filename stem, i.e. you could + do like + <pre> ZZIP_FILE* f = zzip_fopen ("example.exe/start.gif", "rbi")</pre> +</P><P> + however you are advised to use the _ext_io cousin to be + platform independet - different Operating Systems use + different file extensions for executables, it's not always + an ".exe". +</P> +<P> + Once the file is opened, the data can be zzip_fread or + passed through an SDL_rwops structure into the inner + parts of your program. +</P> + +</section><section> +<h3> Step 3: Using Obfuscation Along </h3> + +<P> + The next level uses obfuscatation on the data part of the + application. That way there is no visible data to be seen + from outside, it looks like it had been compiled right into + the C source part. One can furthermore confuse a possible + attacker with staticlinking the zziplib into the executable + (this is possible in a limited set of conditions). +</P> +<P> + The first pass is again in creating the zip - here we must + ensure that only the ZIP archive part is obfuscated but + the EXE part must be plain data so that the operationg + system can read and relocate it into main memory. Using + xor-obfuscation this is easy - applying xor twice will + yield the original data. The steps look like this now: + <pre> + zzipxorcopy example.exe example.xor + zip -0 application.zip example.xor + zip -9 application.zip data/* + zzipsetstub application.zip example.xor + zzipxorcopy application.zip application.exe + </pre> +</P> +<P> + In the second step the open-routine in your application + needs to be modified - there are quite some examples in + the zziplib that show you how to add an xor-read routine + and passing it in the "io"-part of an zzip_open_ext_io + routine (see zzipxorcat.c). + <pre> + static int xor_value = 0x55; + + static zzip_ssize_t xor_read (int f, void* p, zzip_size_t l) + { + zzip_ssize_t r = read(f, p, l); + zzip_ssize_t x; char* q; for (x=0, q=p; x < r; x++) q[x] ^= xor_value; + return r; + } + + static struct zzip_plugin_io xor_handlers; + static zzip_strings_t xor_fileext[] = { ".exe", ".EXE", "", 0 }; + + main(...) + { + zzip_init_io (&xor_handlers, 0); xor_handlers.read = &xor_read; + + ZZIP_FILE* fp = zzip_open_ext_io (filename, + O_RDONLY|O_BINARY, ZZIP_CASELESS|ZZIP_ONLYZIP, + xor_fileext, &xor_handlers); + .... + </pre> +</P> +<P> + You may want to pick your own xor-value instead of the default 0x55, + the zziplib-shipped tool `zzipxorcopy` does know an option to just + set the xor-value with which to obfuscate the data. +</P> +</section></section> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-api.htm b/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-api.htm new file mode 100644 index 00000000000..79bed1401d4 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-api.htm @@ -0,0 +1,30 @@ +<section> <date> 20. July 2002 </date> +<h2> ZZIP Programmers Interface </h2> The complete API description. + +<!--border--> + +<P> + The zzip library was orginally developped by Tomi Ollila as a + set of zip decoder routines. Guido Draheim did pick it up and + wrapped them under a call synopsis matching their posix + api calls. Therefore <code>zzip_open()</code> has the same + synopsis as <code>open(2)</code> but it can open zipped files. + Later the distinction was made between magic wrappers and apis + for direct access to zip archives and the files contained + in the archive. +</P> +<P> + These (three) functional apis have little helper functions + alongside including those to get the posix filehandle out of a + zzip handle and to get some attributes about the data handle + represented by a zzip handle. Plus checking for error codes + that may have been generated from internal checks. +</P> + +<dl> +<dt> <a href="zzip-basics.html">Basics</a> </dt> +<dd> Magic Wrappers, Zip Archive Dir access, Zipped File access </dd> +<dt> <a href="zzip-extras.html">Extras</a> </dt> +<dd> ext/io init, StdC calls, Error defs, ReOpen, FileStat </dd> +</dl> +</section> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-basics.htm b/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-basics.htm new file mode 100644 index 00000000000..0d0504710e7 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-basics.htm @@ -0,0 +1,163 @@ +<section> <date> 20. July 2002 </date> +<h2> ZZIP API Basics </h2> The open/close API description. + +<!--border--> + +<section> +<h3> Basics </h3> + +<P> + The naming schem of functions in this library follow a simple rule: + if you see a function with a <code>zzip_</code> prefix followed by + compact name representing otherwise a C library or posix function then + it is a magic wrapper that can automagically handle both real + files/directories or zip-contained files. This includes: +</P> +<table cellpadding=10 width=100%><tr><td><table width=100% border=1> + <tr><td width=50%> zzip_opendir </td><td width=50%> opendir </td></tr> + <tr><td width=50%> zzip_readdir </td><td width=50%> readdir </td></tr> + <tr><td width=50%> zzip_closedir </td><td width=50%> closedir </td></tr> + <tr><td width=50%> zzip_rewinddir </td><td width=50%> rewinddir </td></tr> + <tr><td width=50%> zzip_telldir </td><td width=50%> telldir </td></tr> + <tr><td width=50%> zzip_seekdir </td><td width=50%> seekdir </td></tr> +</table></td></tr></table> +<P> + The ZZIP_DIR handle can wrap both a real directory or a zip-file. + Note that you can not open a virtual directory <em>within</em> a + zip-file, the ZZIP_DIR is either a real DIR-handle of a real + directory or the reference of ZIP-file but never a DIR-handle + within a ZIP-file - there is no such schema of a SUB-DIR handle + implemented in this library. A ZZIP_DIR does actually represent + the central directory of a ZIP-file, so that each file entry in + this ZZIP-DIR can possibly have a subpath prepended. +</P> + +<P> + This form of magic has historic reasons as originally the + magic wrappers of this library were not meant to wrap a complete + subtree of a real file tree but only a single directory being + wrapped with into a zip-file and placed instead. Later proposals + and patches were coming in to support subtree wrapping by not + only making a split between the dir-part and file-part but + going recursivly up through all "/"-dirseparators of a filepath + given to <code>zzip_open</code> and looking for zip-file there. +</P> + +<P> + To open a zip-file unconditionally one should be using their + respective methods that would return a ZZIP_DIR handle being + the representant memory instance of a ZIP-DIR, the central + directory of a zip-file. From that ZZIP-DIR one can open a + compressed file entry which will be returned as a ZZIP_FILE + pointer. +</P> +<table cellpadding=10 width=100%><tr><td><table border=1 width=100%> + <tr><td width=50%> zzip_dir_open </td> + <td width=50%> open a zip-file and parse the central directory + to a memory shadow</td></tr> + <tr><td width=50%> zzip_dir_close </td> + <td width=50%> close a zip-file and free the memory shadow</td></tr> + <tr><td width=50%> zzip_dir_fdopen </td> + <td width=50%> aquire the given posix-file and try to parse it + as a zip-file.</td></tr> + <tr><td width=50%> zzip_dir_read </td> + <td width=50%> return the next info entry of a zip-file's central + directory - this would include a possible subpath </td></tr> +</table></td></tr></table> + +<P> + To unconditionally access a zipped-file (as the counter-part of a + zip-file's directory) you should be using the functions having a + <code>zzip_file_</code> prefix which are the methods working on + ZZIP_FILE pointers directly and assuming those are references of + a zipped file with a ZZIP_DIR. +</P> +<table cellpadding=10 width=100%><tr><td><table border=1 width=100%> + <tr><td width=50%> zzip_file_open </td> + <td width=50%> open a file within a zip and prepare a zlib + compressor for it - note the ZZIP_DIR argument, + multiple ZZIP_FILE's may share the same central + directory shadow.</td></tr> + <tr><td width=50%> zzip_file_close </td> + <td width=50%> close the handle of zippedfile + and free zlib compressor of it</td></tr> + <tr><td width=50%> zzip_file_read </td> + <td width=50%> decompress the next part of a compressed file + within a zip-file</td></tr> +</table></td></tr></table> +<P> + From here it is only a short step to the magic wrappers for + file-access - when being given a filepath to zzip_open then + the filepath is checked first for being possibly a real file + (we can often do that by a <code>stat</code> call) and if there is + a real file under that name then the returned ZZIP_FILE is + nothing more than a wrapper around a file-descriptor of the + underlying operating system. Any other calls like zzip_read + will see the realfd-flag in the ZZIP_FILE and forward the + execution to the read() function of the underlying operating system. +</P> + +<P> + However if that fails then the filepath is cut at last directory + separator, i.e. a filepath of "this/test/README" is cut into the + dir-part "this/test" and a file-part "README". Then the possible + zip-extensions are attached (".zip" and ".ZIP") and we check if + there is a real file under that name. If a file "this/test.zip" + does exist then it is given to zzip_dir_open which will create + a ZZIP_DIR instance of it, and when that was successul (so it + was in zip-format) then we call zzip_file_open which will see + two arguments - the just opened ZZIP_DIR and the file-part. The + resulting ZZIP_FILE has its own copy of a ZZIP_DIR, so if you + open multiple files from the same zip-file than you will also + have multiple in-memory copies of the zip's central directory + whereas otherwise multiple ZZIP_FILE's may share a common + ZZIP_DIR when being opened with zzip_file_open directly - the + zzip_file_open's first argument is the ZZIP_DIR and the second + one the file-part to be looked up within that zip-directory. +</P> + +<table cellpadding=10 width=100%><tr><td><table border=1 width=100%> + <tr><td width=50%> zzip_open </td> + <td width=50%> try the file-path as a real-file, and if not + there, look for the existance of ZZIP_DIR by + applying extensions, and open the file + contained within that one.</td></tr> + <tr><td width=50%> zzip_close </td> + <td width=50%> if the ZZIP_FILE wraps a real-file, then call + read(), otherwise call zzip_file_read() </td></tr> + <tr><td width=50%> zzip_close </td> + <td width=50%> if the ZZIP_FILE wraps a real-file, then call + close(), otherwise call zzip_file_close() </td></tr> +</table></td></tr></table> + +<P> + Up to here we have the original functionality of the zziplib + when I (Guido Draheim) created the magic functions around the work from + Tomi Ollila who wrote the routines to read and decompress files from + a zip archive - unlike other libraries it was quite readable and + intelligible source code (after many changes there is not much + left of the original zip08x source code but that's another story). + Later however some request and proposals and patches were coming in. +</P> + +<P> + Among the first extensions was the recursive zzip_open magic. In + the first instance, the library did just do as described above: + a file-path of "this/test/README" might be a zip-file known as + "this/test.zip" containing a compressed file "README". But if + there is neither a real file "this/test/README" and no real + zip-file "this/test.zip" then the call would have failed but + know the zzip_open call will recursivly check the parent + directories - so it can now find a zip-file "this.zip" which + contains a file-part "test/README". +</P> + +<P> + This dissolves the original meaning of a ZZIP_DIR and it has lead + to some confusion later on - you can not create a DIRENT-like handle + for "this/test/" being within a "test.zip" file. And actually, I did + never see a reason to implement it so far (open "this.zip" and set + an initial subpath of "test" and let zzip_readdir skip all entries + that do not start with "test/"). This is left for excercie ;-) +</P> +</section></section> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-crypt.htm b/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-crypt.htm new file mode 100644 index 00000000000..9d55ba97215 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-crypt.htm @@ -0,0 +1,92 @@ +<section> <date> 15. July 2002 </date> +<h2> ZIP Std Encryption </h2> Standard Zip Encryption is Weak! + +<!--border--> + +<section> +<h3> Some rationale </h3> + +<P> + Some people might ask why not adding standard zip-encryption. Well, + first of all the standard zip-encryption has not been strong enough + for modern computers, and there are hacker tools that even a + half-literate computer-user can use to crack the password of a + zip-archive. In other words: <b> every encrypted zip file can be + cracked using freely downloadable helper tools </b>. That's because + standard zip encryption is weak regarding modern personal computer + power. Furthermore, adding <em>real</em> encryption is a heavy weight + that many people do not need, see the last argument for seeing the + standard one is useless anyway, and adding a non-standard one + should not be the case of the standard zziplib either, ye know. +</P><P> + On the other hand, obfuscation is a means to fear off half-literates + just as well - there are no <em>premade</em> tools for the obfuscation you + can invent from the xor examples. And a hacker that can de-obfuscate + such a dat-file is able to dissassemble your program as well - just to + remind you that the disassembly of a program will reveal the decryption + routine <em>and</em> the decryption key, even for a heavyweight crypt + algorithm. Although there is a difference, it just ranges on about times + and exprience, not magnitudes. Remember the old saying: you can irritate + some people for some time but not irritate all people for all the time. + As for encryption of artwork and AI scripts in games and applications, + just keep in mind that the final recipient has the decryption key on + his system anyway, just obfuscated. So each such encryption is nothing + more than just a clever form of obfuscation, nothing mathematical strong. +</P><P> + Some other people might ask why to obfuscate anyway. Well, the reason + is theft. Even people who write opensource free software generally + like to get some reward for what they do, some fame or atleast some + sweet dream to have helped the world go a bit easier in the future. + As for program text this is quite natural for the programmers who + pick up some code from somewhere else - it happens that most of them + have gone through some formation and they know how hard it is to get + even some lines of code out of your brain. This is not the case for + some artwork and AI parameters, people do not have much respect for + those - they just pick it up, put it under their umbrella, and + that's it - they even claim they could have done that themselves, + and in most cases it is that they never have been really trying to + do it and think of it as being comparable to that action-art they've + seen on TV. +</P><P> + Just be sure that there is nothing wrong with obfuscating + things for a binary distribution of your program even for the + opensource case - the program text itself is an obfuscation in its + source form when being compiled into cpu instructions. Still, the + interested people can get hold of the source code since you provide + it somewhere and actually the original programmers like to hear + from literate people who could help with modifying the project. The + same is true for you artwork and AI scripts, the interested people + can still see them in the opensource project material, but only + those will look who dare to, not just the halfwit next door. +</P><P> + Well, you do not need to that on the other hand - ID software has + shown that it can be very helpful since people will start to + write new maps and new bots, pack them and publish them. An open + data format is a form of attraction for people who can use a + graphics program and an editor but who do not know how to program. + And if you use obfuscation within an opensource program, it is + surely enought to just use the xor-format presented here, so that + it easy for third people to get involved if they want to, they + just have to rewrite their new datapacks with zzxorcopy, and + that's it. +</P><P> + As for the non-opensource projects, be aware that there are + some ways to even staticlink the zziplib into your project, so + you can even hide that you used zip tools to create your dat files. + This is well enough for anyone to do - as soon as a hacker will + get to the point to notice you used a zip format, he would have + had found any other deobfusation or decryption routine as well. + If you are frightened, just encrypt the executable with tools + you bought from somewhere else. On the other hand, should there + be problems or bugs, you have an easier time to find them when + they could be caused by your dat entries, and it is again easy + to send a fixup file to your clients, since the command line + tools are just a breeze compared with some other anti-hacking + tools you'll find on the market. +</P><P> + Well, hope this is enough rationale to tell you that I do not + see a need to implement anything more than obfuscation within + zziplib - if you need real encryption, use real encryption + software and its fileformat that supports it, not zip files. +</P> +</section></section> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-cryptoid.htm b/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-cryptoid.htm new file mode 100644 index 00000000000..ee6b120d7f9 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-cryptoid.htm @@ -0,0 +1,106 @@ +<section> <date> 11. May 2004 </date> +<h2> ZIP Ext Encryption </h2> ext/io used for cryptoid plugins + +<!--border--> + +<section> +<h3> Stronger Obfuscation For ZZip </h3> + +<P> + Some people feel that a simple bytewise xor is not strong enough + as an obfuscation for the data. There we have the question how to + implant a stronger obfuscation routine to protect that data of an + application from artwork theft. Perhaps there is even the idea to + use an obfuscation in the range of a real crypt routine - in which + case I want to recommend strongly to read the + <a href="zzip-crypt.html"> reasoning page </a> why it can not be + real encryption and that the resulting obfuscation has an upper + limit being <em>lower</em> than the crypt routine complexity. +</P> + +<P> + After reminding you of this fact we can go at evaluationg how to + implant a stronger obfusction routine to protect your data. The + ext/io feature uses a callback routine "read" that must read a + block of the given size - for the obfuscation case it will call + the "read()" function of the underlying operation system, and + the obfuscated block will be deobfuscated before returning it to + the caller. +</P> + +<P> + In this mechanism there is not asseration at which file-offset + the ext/io-read() callback is triggered. That is the reason we + have shown obfuscation with bytewise xor-key example - formally + this is using obfuscation blocks of 8bit width being aligned + on 8bit boundaries in the data file, and our decryption stream + is stateless being the same for each obfuscation block (of 8bit + width). +</P> +<P> + In order for a stronger obfuscation we have to break those + limitations which are directly derived from the natural way + of the handling of files by a contemporary operating system. + This is triggered as the call synopsis of the ext/io read() + callback matches <em>exactly</em> the one of posix, so that + one can use the posix read() function reference as the default + for ensuring the most minimal overhead in accessing non-obfuscated + zip files. +<br><small>And btw, the abbreviation "posix" stands for + "Portable Open System in Unix".</small> +</P> + +<P> + The trick we show here: the first argument of the ext/io read + callback is the file descriptor of the underlying operationg + system. While we can not add another argument to the ext/io + read call we can pick up additional information with the help + of that file descriptor id being globally unique even across + multiple threads. One solution would make the application map + that descriptor id to a special argument but this is often too + much overhead: the current file position is enough. +</P> +<P> + The current file position is managed by the operation system + via the file descriptor table. There is a function call to + map a file descriptor to the current read position offset + usually named "tell(fd)". Since this call is not mandated by + posix, you can emulate it with the posix lseek() call which + returns the resulting offset after the operation was performed, + so we just seek by a zero offset: <br><code> + <> <> <> <> #define tell(fd) lseek(fd,0,SEEK_CUR) +</code> +</P> + +<P> + That file offset is measured from the start of the zip archive, + not per each zipped file. Remind yourself of that fact when + creating your own "zzobfuscate.exe" which should work on the + zip archive and not per file before zipping. That is a difference + over normal zip archives where the user can atleast recognized the + dat file as a zip archive and see a list of files contained in the + archive, atleast their names and data start offset. +</P> +<P> + Now, let's use the file read offset to break the blocking + limitations of 8bit/8bit to a larger xor-key. In our example + we expand to a 32bit/32bit xor-key giving a search space of + 4<>billion keys instead of the just 256<>keys in 8bit blocking. + That is simply done by a static 4<>byte xor-key sequence and using + modulo operations for alignment. For the 2^X cases any modulo + operations shrink to a set of ultra-fast bitwise-and operations. +</P> + +<pre> + static char xor_value[4] = { 0x55, 0x63, 0x27, 0x31 }; + static zzip_ssize_t xor_read (int f, void* p, zzip_size_t l) + { + zzip_off_t y = tell(f); + zzip_size_t r = read(f, p, l); + zzip_size_t x; char* q = p; + for (x=0; x < r; x++) q[x] ^= xor_value[(y+x)&3]; + return r; + } +</pre> + +</section></section> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-extio.htm b/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-extio.htm new file mode 100644 index 00000000000..c7c47f1a37d --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-extio.htm @@ -0,0 +1,188 @@ +<section> <date>15. July 2002 </date> +<h2> ZZIP-EXT/IO </h2> Customizing the file access + +<!--border--> + +<section> +<h3> The EXT/IO calls </h3> + +<P> + There were quite some requests from game developers and graphics-apps + developers who wanted various extensions to be included into the + <a href="zziplib.html">zziplib library</a>, but most of them were + only of specific usage. After some discussions we came up with a + model to customize the <a href="zziplib.html">zziplib library</a> + calls in a number of ways - and adding two or three arguments to + the zzip_* calls. The standard <a href="zziplib.html">zziplib library</a> + will actually call these *_ext_io functions with these extra arguments + to be set to zero. +</P><P> + The EXT feature describes a way to customize the extensions used in + the magic wrapper to find a .ZIP file. It turned out that there are + quite a number of applications that did chose the zip file format as + their native document format and where just the file extension had + been changed. This includes file types like Quake3 ".PK3" files from + ID Software, the Java library files called ".JAR", and lately the + OpenOffice-6 (resp. StarOffice-6) documents which carry xml-files along. + Just build a zero-termined string-list of file-extensions and submit it + to the _ext_io calls to let the <a href="zziplib.html">zziplib</a> find + parts of those zip-documents automagically. +</P><P> + In quite some of these cases, it is very benefical to make use of the + o_modes functionality that allows to submit extra bit-options into + the <a href="zziplib.html">zziplib</a> - this includes options like + <code>ZZIP_PREFERZIP</code> or even <code>ZZIP_ONLYZIP</code> which + modifies the default behaviour of looking for real files first instead + of some within a zipped directory tree. Other bit-options include + <code>ZZIP_CASELESS</code> to imitate win32-like filematching for a + zipped filetree. +</P><P> + Other wishes on <a href="zziplib.html">zziplib</a> circulated around + <a href="zzip-xor.html">obfuscation</a> or access to zip-files wrapped + in other data areas including encrpyted resources from other applications. + This has been adressed with the IO-handlers that you can explicitly + submit to the *_ext_io functions - the default will be posix-IO + open/read/write and seek/tell. An application using + <a href="zziplib.html">zziplib</a> can divert these to its own set of + these calls - and it only needs to declare them on opening a zipped file. +</P> + +</section><section> +<h3> The EXT stringlist </h3> + +<P> + Declaring an EXT stringlist is very simple as it is simply a + list of strings, the <a href="zziplib.html">zziplib</a> provides + you with a double-const <code>zzip_strings_t</code> type to help + you move a global declaration into the writeonly segment of your + app - it turned out that about all developers wanted just some + extensions on the default and they were fine with having them + global-const for their application, nothing like dynamically + modifying them. Well, you are still allowed to make it fully + dynamic... if you find a use case for that. +</P><P> + Extending the magic zip-extensions is just done by adding the + additional extensions to be recognized - just remember to add + the uppercased variants too since those will be needed on + (unx-like) filesystems that are case-sensitive. In the internet + age, quite some downloaded will appear in uppercased format since + the other side declared it as that and that other end was happy + with it as being a (w32-like) case-insensitive server. Therefore, + it should look like <pre> + static zzip_strings_t my_ext[] = { ".zip", ".ZIP", ".jar", ".JAR", 0 }; + </pre> +</P><P> + There is one frequently asked question in this area - how to open + a zipped file as "test.zip/README" instead of "test/README". Other + than some people might expect, the library will not find it - if + you want to have that one needs a fileext list that contains the + empty string - not the zero string, an empty string that is. It + looks like <pre> + static zzip_strings_t my_ext[] = { ".zip", ".ZIP", "", 0 }; + </pre> +</P><P> + And last not least, people want to tell the libary to not try to + open a real file that lives side by side with the same path as the + file path that can be matched by the zziplib. Actually, the magic + wrappers were never meant to be used like - the developer should + have used zzip_dir_* functions to open a zip-file and the + zzip_file_* functions to read entries from that zip-file. However, + the magic-wrappers look rather more familiar, and so you will find + now a bit-option ZZIP_ONLYZIP that can be passed down to the _ext_io + variants of the magic-wrapper calls, and a real-file will never get + tested for existance. Actually, I would rather recommend that for + application data the option ZZIP_PREFERZIP, so that one can enter + debugging mode by unpacking the zip-file as a real directory tree + in the place of the original zip. +</P> + +</section><section> +<h3> The IO handlers </h3> + +<P> + While you will find the zzip_plugin_io_t declared in the zziplib + headers, you are not advised to make much assumptions about their + structure. Still we gone the path of simplicity, so you can use + a global static for this struct too just like one can do for the + EXT-list. This again mimics the internals of zziplib. There is + even a helper function zzip_init_io that will copy the zziplib + internal handlers to your own handlers-set. Actually, this is + barely needed since the zziplib library will not check for nulls + in the plugin_io structure, all handlers must be filled, and the + zziplib routines call them unconditionally - that's simply + because a conditional-call will be ten times slower than an + unconditional call which adds mostly just one or two cpu cycles + in the place so you won't ever notice zziplib to be anywhat + slower than before adding IO-handlers. +</P><P> + However, you better instantiate your handlers in your application + and call that zzip_init_io on that instance to have everything + filled, only then modify the entry you actually wish to have + modified. For <a href="zzip-xor.html">obfuscation</a> this + will mostly be just the <code>read()</code> routine. But one can + also use IO-handlers to wrap zip-files into another data part + for which one (also) wants to modify the open/close routines + as well. +</P><P> + Therefore, you can modify your normal stdio code to start using + zipped files by exchaning the fopen/fread/fclose calls by their + magic counterparts, i.e. <pre> + // FILE* file = fopen ("test/README", "rb"); + ZZIP_FILE* file = zzip_fopen ("test/README", "rb"); + // while (0 < fread (buffer, 1, buflen, file))) + while (0 < zzip_fread (buffer, 1, buflen, file))) + { do something } + // fclose (file); + zzip_fclose (file); + </pre> +</P><P> + and you then need to prefix this code with some additional + code to support your own EXT/IO set, so the code will finally + look like <pre> + /* use .DAT extension to find some files */ + static zzip_strings_t ext[] = { ".dat", ".DAT", "", 0 }; + /* add obfuscation routine - see zzxorcat.c examples */ + static zzip_plugin_io_t io; + zzip_init_io (& io, 0); + io.read = xor_read; + /* and the rest of the code, just as above, but with ext/io */ + ZZIP_FILE* file = zzip_open_ext_io ("test/README", O_RDONLY|O_BINARY, + ZZIP_ONLYZIP|ZZIP_CASELESS, ext, io); + while (0 < zzip_fread (buffer, 1, buflen, file))) + { do something } + zzip_fclose (file); + </pre> +</P> + +</section><section> +<h3> Finally </h3> + +<P> + What's more to it? Well, if you have some ideas then please mail me + about it - don't worry, I'll probably reject it to be part of the + standard zziplib dll, but perhaps it is worth to be added as a + configure option and can help others later, and even more perhaps + it can be somehow generalized just as the ext/io features have been + generalized now. In most respects, this ext/io did not add much + code to the <a href="zziplib.html">zziplib</a> - the posix-calls + in the implemenation, like <code>"read(file)"</code> were simply + exchanged with <code>"zip->io->read(file)"</code>, and the + old <code>"zzip_open(name,mode)"</code> call is split up - the old + entry still persists but directly calls + <code>"zzip_open_ext_io(name,mode,0,0,0)"</code> which has the + old implementation code with just one addition: when the ZIP_FILE + handle is created, it uses the transferred io-handlers (or the + default ones if io==0), and initialized the io-member of that + structure for usage within the <code>zzip_read</code> calls. +</P><P> + This adds just a few bytes to the libs and just consumes additional + cpu cycles that can be rightfully called to be negligable (unlike + most commerical vendors will tell you when they indeed want to + tell you that for soooo many new features you have to pay a price). + It makes for greater variability without adding fatness to the + core in the default case, this is truly efficient I'd say. Well, + call this a German desease :-)=) ... and again, if you have another + idea, write today... or next week. +</P> + +</section></section> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-extras.htm b/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-extras.htm new file mode 100644 index 00000000000..1d771160cb9 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-extras.htm @@ -0,0 +1,164 @@ +<section><date> 20. July 2002 </date> +<h2> ZZIP API extras </h2> The check/init API description. + +<!--border--> + +<section> +<h3> Extras </h3> + +<P> + The next requests circulated around other file-extensions to + automagically look inside filetypes that have zip-format too but + carry other fileextensions - most famous might be the ".PK3" + files of ID's Quake game. There have been a number of these + requests and in a lot of cases it dawned to me that those guys + may have overlooked the zzip_dir_open functions to travel + through documents of zipformat under any name - that is that the + "magic" was not actually needed but they just wanted to read + files in zipformat with the zziplib. +</P> + +<P> + Other requests circulated around encryption but I did reject + those bluntly, always. Instead there have been always examples + for doing some obfuscation around the zip-format so that the + stock zip/unzip tools do not recognize them but a game + software developer can pack/unpack his AI scripts and bitmaps + into such a zipformat-like file. +</P> + +<P> + After some dead-end patches (being shipped along with the + zziplib as configure-time compile-options - greetings to + Lutz Sammer and Andreas Schiffler), the general approach + of _ext_io came up, and finally implemented (greetings go + to Mike Nordell). The _open()-calls do now each have a + cousin of _open_ext_io() with two/three additional arguments + being a set of extensions to loop through our magic testing, + a callback-handler plugin-table for obfuscation-means, + and (often) a bit-mask for extra-options - this bitmask even + has "PREFERZIP" and "ONLYZIP" options to skip the real-file + test magic in those <code>zzip_*open</code> functions. +</P> + +<table cellpadding=10 width=100%><tr><td><table border=1 width=100%> + <tr><td width=50%> zzip_open(name,flags) </td> + <td width=50%> zzip_open_ext_io(name,flags,mode,ext,io) </td></tr> + <tr><td width=50%> zzip_opendir(name) </td> + <td width=50%> zzip_opendir_ext_io(name,mode,ext,io) </td></tr> + <tr><td width=50%> zzip_dir_open(name,errp) </td> + <td width=50%> zzip_dir_open_ext_io(name,errp,ext,io) </td></tr> + <tr><td width=50%> zzip_dir_fdopen(fd,errp) </td> + <td width=50%> zzip_dir_fdopen_ext_io(fd,errp,ext,io) </td></tr> + <tr><td width=50%> zzip_file_open(dir,name,mode) </td> + <td width=50%> zzip_file_open_ext_io(dir,name,mode,ext,io) </td></tr> +</table></td></tr></table> + +<P> + Oh, and note that the mode,ext,io extras are memorized + in the respecitive ZZIP_DIR handle attached, so each + of the other calls like <code>zzip_file_open()</code> + and <code>zzip_read()</code> will be using them. There + are a few helper routines to help setup a new io-plugin + where the init_io will currently just memcopy the + default_io entries into the user-supplied plugin-struct. +</P> + +<table cellpadding=10 width=100%><tr><td><table border=1 width=100%> + <tr><td width=50%> zzip_init_io </td> + <td width=50%> the recommended way to do things </td></tr> + <tr><td width=50%> zzip_get_default_io </td> + <td width=50%> used internally whenever you supply a null + for the io-argument of a _ext_io()-call </td></tr> + <tr><td width=50%> zzip_get_default_ext </td> + <td width=50%> used internally but not exported </td></tr> +</table></td></tr></table> + + +<P> + And last some stdio-like replacements were build but these + happen to be actually just small wrappers around the other + posix-like magic-calls. It just offers some convenience + since wrappers like "SDL_rwops" tend to use a stringised + open-mode - and I took the occasion to fold the zzip-bits + for the _ext_io-calls right in there recognized via + special extensions to the openmode-string of zzip_fopen(). +</P> + +<table cellpadding=10 width=100%><tr><td><table border=1 width=100%> + <tr><td width=50%> zzip_fopen </td> + <td width=50%> convert stringmode and call zzip_open_ext_io </td></tr> + <tr><td width=50%> zzip_fread </td> + <td width=50%> slower way to say zzip_read </td></tr> + <tr><td width=50%> zzip_fclose </td> + <td width=50%> a synonym of zzip_close </td></tr> +</table></td></tr></table> + +<P> + For some reason, people did need the full set of function-calls() + to be working on zzip-wrappers too, so here they are - if the + ZZIP_FILE instance did wrap a real file, then the real posix-call + will be used, otherwise it is simulated on the compressed stream + with a zip-contained file - especially <code>seek()</code> can be + a slow operation: + if the new point is later then just read out more bytes till we + hit that position but if it is an earlier point then rewind to the + beginning of the compressed data and start reading/decompression + until the position is met. +</P> + +<table cellpadding=10 width=100%><tr><td><table border=1 width=100%> + <tr><td width=50%> zzip_rewind </td> + <td width=50%> magic for rewind() </td></tr> + <tr><td width=50%> zzip_tell </td> + <td width=50%> magic for tell() </td></tr> + <tr><td width=50%> zzip_seek </td> + <td width=50%> magic for seek() </td></tr> +</table></td></tr></table> + +<P> + And last not least, there are few informative functions to + use function-calls to read parts of the opaque structures + of zzip-objects and their zzip-factory. +</P> + +<table cellpadding=10 width=100%><tr><td><table border=1 width=100%> + <tr><td width=50%> zzip_dir_stat </td> + <td width=50%> a stat()-like thing on a file within a ZZIP_DIR </td></tr> + <tr><td width=50%> zzip_dir_real </td> + <td width=50%> check if ZZIP_DIR wraps a stat'able posix-dirent</td></tr> + <tr><td width=50%> zzip_file_real </td> + <td width=50%> check if ZZIP_FILE wraps a stat'able posix-file </td></tr> + <tr><td width=50%> zzip_realdir </td> + <td width=50%> if zzip_dir_real then return the posix-dirent </td></tr> + <tr><td width=50%> zzip_realfd </td> + <td width=50%> if zzip_file_real then return the posix-file </td></tr> + <tr><td width=50%> zzip_dirhandle </td> + <td width=50%> the attached ZZIP_DIR of compressed ZZIP_FILE </td></tr> + <tr><td width=50%> zzip_dirfd </td> + <td width=50%> the attached posix-file of ZZIP_DIR zip-file </td></tr> + <tr><td width=50%> zzip_set_error </td> + <td width=50%> set the last ZZIP_DIR error-code </td></tr> + <tr><td width=50%> zzip_error </td> + <td width=50%> get the last ZZIP_DIR error-code </td></tr> + <tr><td width=50%> zzip_strerror </td> + <td width=50%> convert a zzip_error into a readable string </td></tr> + <tr><td width=50%> zzip_strerror_of </td> + <td width=50%> combine both above zzip_strerror of zzip_error </td></tr> + <tr><td width=50%> zzip_errno </td> + <td width=50%> helper to wrap a zzip-error to a posix-errno </td></tr> + <tr><td width=50%> zzip_compr_str </td> + <td width=50%> helper to wrap a compr-number to a readable string + </td></tr> + <tr><td width=50%> zzip_dir_free </td> + <td width=50%> internally called by zzip_dir_close if the ref-count + of the ZZIP_DIR has gone zero</td></tr> + <tr><td width=50%> zzip_freopen </td> + <td width=50%> to reuse the ZZIP_DIR from another ZZIP_FILE so it does + not need to be parsed again </td></tr> + <tr><td width=50%> zzip_open_shared_io </td> + <td width=50%> the ext/io cousin but it does not close the old ZZIP_FILE + and instead just shares the ZZIP_DIR if possible</td></tr> +</table></td></tr></table> + +</section></section> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-file.htm b/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-file.htm new file mode 100644 index 00000000000..241baef85a7 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-file.htm @@ -0,0 +1,183 @@ +<section> <date> 1. June 2000 </date> +<h2> ZIP File Access </h2> Using Zipped Files Transparently + +<!--border--> + +<section> +<h3>The Typedef</h3> + +<P> + The typedef <code>ZZIP_FILE</code> can serve as a replacement + for a normal file descriptor. As long as it is only used + for reading a file, the zzlib-user can actually replace + the posix functions <code>open/read/close</code> + by their counterparts from the + <a href="zziplib.html">zziplib library</a>: + <code>zzip_open/zzip_read/zzip_close</code>. +</P> +<P> + As long as the filename path given to <code>zzip_open</code> + refers to a real file in the filesystem, it will almost + directly forward the call to the respective posix <code>open</code> + call. The returned file descriptor is then stored in + a member-variable of the <code>ZZIP_FILE</code> structure. +</P> +<P> + Any subsequent calls to <code>zzip_read</code> will then + be forwarded to the posix <code>read</code> call on the + memorized file descriptor. The same about <code>zzip_close</code> + which will call the posix <code>close</code> function and then + <code>free</code> the <code>ZZIP_FILE</code> structure. +</P> +<P> + The real benefit of the + <a href="zziplib.html">zziplib library</a> + comes about when the filename argument does actually refer + to a file that is zipped in a zip-archive. It happens that + even both a real file and a zipped file can live under the + same pathname given to the <code>zzip_open</code> call, + whereas the real file is used in preference. +</P> + +</section><section> +<h3>Zipped File</h3> + +<P> + Suppose you have subdirectory called '<tt>test/</tt>'. In + this directory is just one file, called '<tt>README</tt>'. + Calling the <code>zzip_open</code> function with an + argument of '<i>optional-path/</i> <tt>test/README</tt>', + then it will open that file for subsequent reading with + <code>zzip_read</code>. In this case the real (<i>stat'able</i>) + file is opened. +</P> +<P> + Now you can go to the '<tt>test/</tt>' directory and zip up + the files in there by calling + <nobr><tt>`zip ../test.zip *`</tt></nobr>. + After this, you can delete the '<tt>test/</tt>' directory and + the call to <code>zzip_open</code> will still succeed. + The reason is that the part of the path saying + '<tt>test/README</tt>' will be replaced by sth. like + '<tt>test.zip:README</tt>' - that is the real file '<tt>test.zip</tt>' + is opened and searched for a contained file '<tt>README</tt>'. +</P> +<P> + Calling <code>zzip_read</code> on the zipped '<tt>README</tt>' file + will return the very same data as if it is a real file in a + real directory. If the zipped file is compressed it will be + decompressed on the fly. +</P> + +</section><section> +<h3>Zip Directory</h3> + +<P> + The same applies to the use of <code>opendir/readdir/closedir</code> + which can safely be replaced with their counterparts from the + <a href="zziplib.html">zziplib library</a> - again their prototype + follows the scheme of the original calls, just prepend <tt>zzip_</tt> + to the function calls and <tt>ZZIP_</tt> to the struct-typedefs. +</P> +<P> + To call <code>zzip_opendir</code> on a real directory will then + return a <code>ZZIP_DIR</code> whose member-variable + <code>realdir</code> points to the actual <code>DIR</code>-structure + returned by the underlying posix <code>opendir</code>-call. +</P> +<P> + If a real directory '<tt>test</tt>' does not exist, then the + <code>zzip_opendir</code> will try to open a file '<tt>test.zip</tt>' + with a call to <code>zzip_dir_open</code>. + Subsequent calls to <code>zzip_readdir</code> will then return + information as being obtained from the central archive directory + of the zip-file. +</P> + +</section><section> +<h3>Differences</h3> + +<P> + There are no differences between the posix calls and their counterparts + from the <a href="zziplib.html">zziplib library</a> - well, just + as long as the zip-file contains just the plain files from a directory. +</P> +<P> + If the zip-file contains directory entries you may be prompted with + some awkward behaviour, since in zip-file a directory happens to be + just an empty file. Note that the posix function <code>open</code> + may also open a directory for reading - it will only return + <code>EISDIR</code> if the <code>open</code> mode-argument included + write-access. +</P> +<P> + What the current of version of the + <a href="zziplib.html">zziplib library</a> + can definitly not do: calling zzip_opendir on a directory zippend + <em>inside</em> a zip-file. +</P> +<P> + To prevent the enrollment of directories into the zip-archive, you + can use the <tt>-D</tt> option of the <tt>zip</tt> program. That + is in any <tt>Makefile</tt> you may want to use + <nobr><tt>`cd $(dir) && zip -D ../$(dir).zip *`</tt></nobr>. +</P> + +</section><section> +<h3>Advantages</h3> + +<P> + Distribution of a set of files is much easier if it just means + to wrap up a group of files into a zip-archive - and copy that + zip-archive to the respective destination directory. + Even more the files can be compressed and unlike a <tt>tar.gz</tt> + archive there is no need to decompress the archive in temporary + location before accessing a member-file. +</P> +<P> + On the other hand, there is no chance to scatter files around + on the disk like it could easily happen with a set of gzip'ed + man-pages in a single `<tt>man</tt>`-directory. The reader + application does not specifically need to know that the file + is compressed, so that reading a script like + `<tt>share/guile/x.x.x/ice-9/popen.scm</tt>` is done by simple + calls to <code>zzip_read</code> which works on zip-file named + `<tt>share/guile/x.x.x/ice-9.zip</tt>`. +</P> +<P> + A version mismatch between different files in a group is now + obvious: either the opened file belongs to the distribution + archive, or otherwise in resides in a real directory <em>just + next to the zip-archive that contains the original</em>. +</P> + +</section><section> +<h3>Issues</h3> + +<P> + The <a href="zziplib.html">zziplib library</a> does not + use any code piece from the <code>zip</code> programs, neither + <em>pkzip</em> nor <em>infozip</em>, so there is no license + issue here. The decompression is done by using the free + <a href="http://www.gzip.org/zlib">zlib library</a> which has no special + issues with respect to licensing. + The rights to the <a href="zziplib.html">zziplib library</a> + are reserved to the copyright holders, there is a public + license that puts most the sources themselves under + <a href="COPYING.LIB">the GNU Lesser General Public License</a>, + so that the use of a shared library instance of the + <a href="zziplib.html">zziplib library</a> + has no restrictions of interest to application programmers. + For more details and hints about static linking, check + the <a href="copying.html">COPYING</a> information. +</P> +<P> + The only issue you have with the + <a href="zziplib.html">zziplib library</a> + is the fact that you can only <em>read</em> the contained files. + Writing/Compression is not implemented. Even more, a compressed + file is not seekable at the moment although I hope that someone + will stand up to implement that functionality someday. +</P> + +</section></section> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-index.htm b/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-index.htm new file mode 100644 index 00000000000..8b7a9bb6637 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-index.htm @@ -0,0 +1,55 @@ +<section> <date> created 1.Jun.2000, last updated 09.Feb.2003 </date> +<h2> The Library </h2> Overview + +<!--border--> + +<!-- 1. section of zzip-zip.html --> + +<P> + The <a href="zziplib.html">zziplib library</a> is intentionally + lightweight, it offers the ability to easily extract data from + files archived in a single zip file. Applications can bundle + files into a single zip archive and access them. + The implementation is based only on the (free) subset of + compression with the <a href="http://www.gzip.org/zlib"> + zlib algorithm</a> which is actually used by the <tt>zip/unzip</tt> tools. +</P> + +<center> + The library allows reading zip archives in a number of ways, +</center><dl> +<dt>archive mode:</dt> +<dd> reading the zip directory and extracting files from it. + This is the traditional mode as seen with unzip-utilities. + Some extra unzip-utiles for transparent/magic mode are + shipped as well. +</dd> +<dt>replacement mode:</dt> +<dd> Use ZZIP_FILE / ZZIP_DIR pointers provided by zziplib and + put them to work with routines originally developped to + work with real directories and file handles. The API calls + do follow traditional synopsis from posix/stdio. +</dd> +<dt>transparent mode:</dt> +<dd> Use replacement handles and allow the open()-calls to + automatically detect when a file is contained in a zip + archive or when it is a real file in the file system. + A filepath can be partly in a real filesystem and partly + within the zip archive when one is seen. +</dd> +<dt> ext magic </dt> +<dd> Use the same filepath to access either a zipped or real + file - it looks for a real file and there is none then + every subdirectory of the path is checked, a ".zip" + extension appended, and the zipped file transparently + opened. This can speed up dat-file development + dramatically. +</dd> +<dt> io/xor magic </dt> +<dd> The access to the filesystem can be hooked up - examples + are given for xor obfuscation which is great for game + artwork and AI data. A small intro for SDLrwops usage is + given as well. +</dd> +</dl> +</section> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-parse.htm b/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-parse.htm new file mode 100644 index 00000000000..a3c49dcba76 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-parse.htm @@ -0,0 +1,219 @@ +<section> <date> 17. December 2002 </date> +<h2> ZIP Format </h2> About Zip Parsing Internals... + +<!--border--> + +<section> +<h3> ZIP Trailer Block </h3> + +<P> + The general ZIP file format is written sequentially - each file + being added gets a local file header and its inflated data. When + all files are written then a central directory is written - and + this central directory may even span multiple disks. And each + disk gets a descriptor block that contains a pointer to the start + of the central directory. This descriptor is always written last + and therefore we call it the "ZIP File Trailer Block". +</P> +<P> + Okay, so we know that this ZIP Trailer is always at the end of a zip + file and that is has a fixed length, and a magic four-byte value at + its block start. That should make it easy to detect zip files but in + the real world it is not that easy - it is allowed to add a zip + archive comment text <em>after</em> the Trailer block. It's rarely + used these days but it turns out that a zip reader must be ready + to search for the Trailer block starting at the end of the file + and looking upwards for the Trailer magic (it's "PK\5\6" btw). +</P> +<P> + Now that's what the internal function __zip_find_disk_trailer is + used for. It's somewhat optimized as we try to use mmap features + of the underlying operating system. The returned structure is + called zzip_disk_trailer in the library source code, and we only + need two values actually: u_rootseek and u_rootsize. The first of + these can be used to lseek to the place of the central directory + and the second value tells us the byte size of the central directory. +</P> + +</section><section> +<h3> ZIP Central Directory </h3> + +<P> + So here we are at the central directory. The disk trailer did also + tell us how many entries are there but it is not that easy to read + them. Each directory entry (zzip_root_dirent type) has again a + magic value up front followed by a few items but they all have some + dos format - consider the timestamps, and atleast size/seek values + are in intel byteorder. So we might want to parse them into a format + that is easier to handle in internal code. +</P> +<P> + That is also needed for another reason - there are three items in that + directory entry being size values of three variadic fields following + right after the directory. That's right, three of these. The first + variadic field is the filename of this directory entry. In other + words, the root directory entry does not contain a seek value of + where the filename starts off, the start of the filename is + implicitly given with the end address of the directory entry. +</P> +<P> + The size value for the filename does simply say how long the + filename is - however, and more importantly, it allows us to + compute the start of the next variadic field, called the extra + info field. Well, we do not need any value from that extra info + block (it has unix filemode bits when packed under unix) but we + can be quite sure that this field is not null either. And that + was the second variadic field. +</P> +<P> + There is a third variadic field however - it's the comment field. + That was pretty heavily used in the good old DOS days. We are not + used to it anymore since filenames are generally self-descriptive + today but in the DOS days a filename was 8+3 chars maximum - and + it was in the comment field that told users what's in there. It + turned out that many software archives used zip format for just + that purpose as their primary distribution format - for being + able to attach a comment line with each entry. +</P> +<P> + Now, these three variadic fields have each an entry in the + directory entry header telling of their size. And after these + three variadic fields the next directory entry follows right in. + Yes, again there is no seek value here - we have to take the sum + of the three field sizes and add that to the end address of the + directory entry - just to be able to get to the next entry. +</P> + +</section><section> +<h3> Internal Directory </h3> + +<P> + Now, the external ZIP format is too complicated. We cut it down + to the bare minimum we actually need. The fields in the entry + are parsed into a format directly usable, and from the variadic + fields we only keep the filename. Oh, and we ensure that the + filename gets a trailing null byte, so it can surely be passed + down into libc routines. +</P> +<P> + There is another trick by the way - we use the u_rootsize value + to malloc a block for the internal directory. That ensures the + internal root directory entries are in nearby locations, and + including the filenames themselves which we put in between the + dirent entries. That's not only similar to the external directory + format, but when calling readdir and looking for a matching + filename of an zzip_open call, this will ensure the memory is + fetched in a linear fashion. Modern cpu architectures are able + to burst through it. +</P> +<P> + One might think to use a more complicated internal directory + format - like hash tables or something. However, they all suffer + from the fact that memory access patterns will be somewhat random + which eats a lot of speed. It is hardly predictable under what + circumstances it gets us a benefit, but the problem is certainly + not off-world: there are zzip archives with 13k+ entries. In a real + filesystem people will not put 13k files into one directory, of + course - but for the zip central directory all entries are listed + in parallel with their subdirectory paths attached. So, if the + original subtree had a number of directories, they'll end up in + parallel in the zip's central directory. +</P> + +</section><section> +<h3> File Entry </h3> + +<P> + The zip directory entry has one value that is called z_off in the + zziplib sources - it's the seek value to the start of the actual + file data, or more correctly it points to the "local file header". + Each file data block is preceded/followed with a little frame. + There is not much interesting information in these framing blocks, + the values are duplicates of the ones found in the zip central + directory - however, we must skip the local file header (and a + possible duplicate of filename and extrainfo) to arrive at the + actual file data. +</P> +<P> + When the start of the actual file data, we can finally read data. + The zziplib library does only know about two choices defined by + the value in the z_compr field - a value of "0" means "stored" + and data has been stored in uncompresed format, so that we can + just copy it out of the file to the application buffer. +</P> +<P> + A value of "8" means "deflated", and here we initialize the zlib + and every file data is decompressed before copying it to the + application buffer. Care must be taken here since zlib input data + and decompressed data may differ significantly. The zlib compression + will not even obey byte boundaries - a single bit may expand to + hundreds of bytes. That's why each ZZIP_FILE has a decompression + buffer attached. +</P> +<P> + All the other z_compr values are only of historical meaning, + the infozip unix tools will only create deflated content, and + the same applies to pkzip 2.x tools. If there would be any other + value than "0" or "8" then zziplib can not decompress it, simple + as that. +</P> + +</section><section> +<h3> ZZIP_DIR / ZZIP_FILE </h3> + +<P> + The ZZIP_DIR internal structures stores a posix handle to the + zip file, and a pointer to the parsed central directory block. + One can use readdir/rewinddir to walk each entry in the central + directory and compare with the filenames attached. And that's + what will be done at a zzip_open call to find the file entry. +</P> +<P> + There are a few more fields in the ZZIP_DIR structure, where + most of these are related to the use of this struct as a + shared recource. You can use zzip_file_open to walk the + preparsed central directory and return a new ZZIP_FILE handle + for that entry. +</P> +<P> + That ZZIP_FILE handle contains a back pointer its ZZIP_DIR + that it was made from - and the back pointer also serves as flag + that the ZZIP_FILE handle points to a file within a ZIP file as + opposed to wrapping a real file in the real directory tree. + Each ZZIP_FILE will increment a shared counter, so that the + next dir_close will be deferred until all ZZIP_FILE have been + destroyed. +</P> +<P> + Another optmization is the cache-pointer in the ZZIP_DIR. It is + quite common to read data entries sequentially, as that the + zip directory is scanned for files matching a specific pattern, + and when a match is seen, that file is openened. However, each + ZZIP_FILE needs a decompression buffer, and we keep a cache of + the last one freed so that it can be picked up right away for the + next zzip_file_open. +</P> +<P> + Note that using multiple zzip_open() directly, each will open + and parse a zip directory of its own. That's bloat both in + terms of memory consumption and execution speed. One should try + to take advantage of the feature that multiple ZZIP_FILE's can + share a common ZZIP_DIR with a common preparsed copy of the + zip's central directory. That can be done directly with using + zzip_file_open to use a ZZIP_DIR as a factory for ZZIP_FILE, + but also zzip_freopen can be used to reuse the old internal + central directory, instead of parsing it again. +</P> +<P> + And while zzip_freopen would release the old ZZIP_FILE handle + only resuing the ZZIP_DIR attached, one can use another routine + directly called zzip_open_shared that will create a ZZIP_FILE + from an existing ZZIP_FILE. Oh, and not need to worry about + problems when a filepath given to zzip_freopen() happens to + be in another place, another directory, another zip archive. + In that case, the old zzip's internal directory is freed and + the others directory read - the preparsed central directory + is only used if that is actually possible. +</P> + +</section></section> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-sdl-rwops.htm b/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-sdl-rwops.htm new file mode 100644 index 00000000000..38923f6f0be --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-sdl-rwops.htm @@ -0,0 +1,90 @@ +<section> <date> 19. Aug 2001 </date> +<h2> SDL rwops </h2> Example to make an SDL_rwops interface. + +<p><small> some <b>MSVC</b> help in + <a href="README.MSVC6">README.MSVC6</a> and + <a href="README.SDL">README.SDL</a> +</small></p> + +<!--border--> + +<section> +<h3> Source </h3> + +<P> + The example sources of the <a href="zziplib.html">zziplib library</a> + are usually put under the <a href="COPYING.ZLIB">ZLIB license</a> so + that you can reuse the code freely in your own projects. Here we talk + about the example that might be most useful for + <a href="http://libsdl.org">SDL</a> based programs. + Just copy the two files + <a href="SDL_rwops_zzip.h">SDL_rwops_zzip.h</a> + and + <a href="SDL_rwops_zzip.c">SDL_rwops_zzip.c</a> + to the directory with your other project sources, and make sure + to link it somehow to your programs. I did not make the effort to + create a seperate library out of it - it would just export one + single function <tt>SDL_RWFromZZIP</tt> that has the same call-synopsis + like <tt>SDL_RWFromFile</tt> (but it can not (yet) write a zip-file). +</P> + +<P> + The source file <a href="SDL_rwops_zzip.c">SDL_rwops_zzip.c</a> is + quite short - it just stores a ZZIP_FILE handle in the userdata + field of the <tt>SDL_rwops</tt> structure. The SDL'rwop calls will then + fetch that pointer and call the corresponding functions from the + <a href="zziplib.html">zziplib library</a>. Most of the glue code + is in the <tt>SDL_RWFromZZIP</tt> function that allocates an + <tt>SDL_rwops</tt> structure and fills the handler-functions + into the callback fields. +</P> + +</section><section> +<h3> Usage </h3> + +<P> + If you link this file to your project, remember that your executables + do now have additional dependencies - not only -lzzip to link with + the <a href="zziplib.html">zziplib library</a> - do not forget to + link with zlib library via -lz. Of course, there is a lib-config + script that you can use: `zzip-config --libs` will return these + linker-infos (unless you have a native-windows system - it is + shell-script). +</P> + +<P> + As an example, replace that <tt>SDL_RWFromFile</tt> that accesses your + game-graphic files - these files are stored in shared/myapp + of course where they belong. When you've done that + then go to X/share/myapp and +<br><code> + `(cd graphics/ && zip -9r ../graphics.zip .)` </code><br> + and rename the graphics/ subfolder - and still all your files + are found: a filepath like X/shared/graphics/game/greetings.bmp + will open X/shared/graphics.zip and return the zipped file + game/greetings.bmp in the zip-archive (for reading that is). +</P> + +</section><section> +<h3> Test </h3> + +<P> + The <a href="zziplib.html">zziplib</a> configure script does not + look for <a href="http://libsdl.org">SDL</a>. If you know that + you have <a href="http://libsdl.org">SDL</a> installed + then you can check this <tt>SDL_rwops</tt> example by using + <code><nobr>`make testsdl`</nobr></code>. This will compile the + two source files <a href="SDL_rwops_zzip.c">SDL_rwops_zzip.c</a> + and <a href="SDL_rwops_zzcat.c">SDL_rwops_zzcat.c</a> to be linked + together into an executable called <code>zzcatsdl</code>. The test + will continue with a <code><nobr>`zzcatsdl test/README`</nobr></code> + - just like it is done for <code><nobr>`make test3`</nobr></code>. +</P> +<P> + The corresponding section in the <a href="Makefile.am">Makefile.am</a> + is also an example how to use lib-config scripts to build files. Here + there is no build-processing that had been tweaked much by automake/autoconf. + Just use sdl-config and zzip-config to add the needed flags. +</P> +</section></section> + diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-xor.htm b/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-xor.htm new file mode 100644 index 00000000000..2434c2974a9 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-xor.htm @@ -0,0 +1,77 @@ +<section> <date> 15. July 2002 </date> +<h2> ZIP Obfuscation </h2> Using obfuscations like XOR. + +<!--border--> + +<section> +<h3> The EXT/IO calls </h3> + +<P> + You really should read the section about the + <a href="zzip-extio.html">EXT/IO feature</a> of the zziplib since the + obfuscation routines are built on top of it. In order to use obfuscation, + you will generally need to use all the three additional argument that + can be passsed to _open_ext_io functions. For the XOR-example, only one + IO-handler is modified being the read()-call that will simply xor each + data byte upon read with a specific value. It two advantages - doing an + xor twice does yield the same data, so as a developer you do not have + to wonder about the encryption/decryption pair, and it is a stateless + obfuscation that does not need to know about the current position + within the zip-datafile or zippedfile-datatream. +</P><P> + The examples provided just use a simple routine for xoring data that + is defined in all the three of the example programs: <pre> + static int xor_value = 0x55; + static zzip_ssize_t xor_read (int f, void* p, zzip_size_t l) + { + zzip_size_t r = read(f, p, l); + zzip_size_t x; char* q = p; + for (x=0; x < r; x++) q[x] ^= xor_value; + return r; + } + </pre> +</P><P> + and place this routine into the io-handlers after initializing + the structure: <pre> + zzip_init_io (&xor_handlers, 0); xor_handlers.read = &xor_read; + </pre> +</P> + +</section><section> +<h3> The examples </h3> + +<P> + There are three example programs. The first one is + <a href="zzxorcopy.c">zzxorcopy.c</a> which actually is not a zziplib + based program. It just opens a file via stdio, loops through all data bytes + it can read thereby xor'ing it, and writes it out to the output file. A + call like <code><nobr>"zzxorcopy file.zip file.dat"</nobr></code> will + create an obfuscated dat-file from a zip-file that has been possibly + create with the normal infozip tools or any other archive program to + generate a zip-file. The output dat-file is not recognized by normal + zip-enabled apps - the filemagic is obfuscated too. This output + dat-file however is subject to the other two example programs. +</P><P> + The <a href="zzxordir.c">zzxordir.c</a> program will open such an obfuscated + zip file and decode the central directory of that zip. Everything is + still there in just the way it can be shown with the normal unzip + programs and routines. And the <a href="zzxorcat.c">zzxorcat.c</a> program + can extract data from this obfuscated zip - and print it un-obfuscated + to the screen. These example programs can help you jumpstart with + your own set of obfuscator routines, possibly more complex ones. +</P><P> + By the way, just compare those with their non-xor counterparts that + you can find in <a href="zzdir.c">zzdir.c</a> and + <a href="zzxorcat.c">zzxorcat.c</a>. Notice that the difference is + in the setup part until the _open_ call after which one can just + use the normal zzip_ routines on that obfuscated file. This is + great for developing since you can start of with the magic-wrappers + working on real-files then slowly turning to pack-files that hold + most of the data and finally ending with a zip-only and obfuscated + dat-file for your project. +</P> + +<p align="right"><small><small> +<a href="copying.html">staticlinking?</a> +</small></small></p> +</section></section> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-zip.htm b/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-zip.htm new file mode 100644 index 00000000000..141700044a5 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/zzip-zip.htm @@ -0,0 +1,146 @@ +<section><date> 1. June 2000 </date> +<h2> ZIP Access </h2> Accessing Zip Archives with ZLib Decompression + +<!--border--> + +<section> +<h3> The Library </h3> + +<P> + The <a href="zziplib.html">zziplib library</a> offers users the + ability to easily extract data from files archived in a single + zip file. This way, programs that use many "read-only" files from + a program specific source directory can have a single zip + archive +</P> +<P> + This library offers only a (free) subset of compression methods + provided in a full implementation but that is well enough. The + idea here is that <tt>zip/unzip</tt> utilities can be used + to create archives that will later be read by using this library. + Yet those programmes (or a library with their functionality) + is not needed in that final operation. +</P> + +</section><section> +<h3> Using A Zip-File </h3> + +<P> + Before a file in the zip-archive is accessed, the application + must first get a handle to the central directory contained in the + zip-file. This is achived by calling + <a href="zziplib.html#zzip_dir_open"> zzip_dir_open </a> + or + <a href="zziplib.html#zzip_dir_fdopen"> zzip_dir_fdopen </a>. + The directory entries in the zip-archives can be obtained + with + <a href="zziplib.html#zzip_dir_read"> zzip_dir_read </a>. + After being done, the zip-dir handle should be closed with + <a href="zziplib.html#zzip_dir_close"> zzip_dir_close </a>. +</P> +<p><pre> ZZIP_DIR* dir = zzip_dir_open("test.zip",0); + if (dir) { + ZZIP_DIRENT dirent; + if (zzip_dir_read(dir,&dirent) { + /* show info for first file */ + print("%s %i/%i", dirent.d_name, dirent.d_csize, dirent.st_size); + } + zzip_dir_close(dir); + } +</pre></p> +<P> + From the zip-dir handle a compressed file can be opened + for reading. This is achieved by using + <a href="zziplib.html#zzip_file_open"> zzip_file_open </a> + and providing it with the dir-handle and a name of the file. + The function + <a href="zziplib.html#zzip_file_read"> zzip_file_read </a> + is used to get pieces of uncompressed data from the file, and + the file-handle should be closed with + <a href="zziplib.html#zzip_file_close"> zzip_file_close </a> +</P> +<p><pre> ZZIP_FILE* fp = zzip_file_open(dir,"README",0); + if (fp) { + char buf[10]; + zzip_ssize_t len = zzip_file_read(fp, buf, 10); + if (len) { + /* show head of README */ + write(1, buf, len); + } + zzip_file_close(fp); + } +</pre></p> + +</section><section> +<h3> Magic Zipped Files </h3> + +<P> + There is actually no need to directly use the zip-centric functions + as described above. Instead there are magic replacements for the + posix calls <code>open/read/close</code> and + <code>opendir/readdir/closedir</code>. The prototypes of these + functions had been the guideline for the design of their magic + counterparts of the + <a href="zziplib.html">zziplib library</a>. +</P> +<P> + The magic functions are described in a seperated document on + <a href="zzip-file.html"> Using Zipped Files </a>. In general, + the functions have a prefix <tt>zzip_</tt> and their argument + types have a prefix <tt>ZZIP_</tt> where appropriate. Calls + to the magic functions and the direct functions above can + be mixed as long as the magic functions have not been opening + a real file. +</P> +<P> + To detect a real file (or directory), the info functions + <a href="zziplib.html#zzip_file_real"> zzip_file_real </a> + and + <a href="zziplib.html#zzip_dir_real"> zzip_dir_real </a> + can be used. + If these return a true value, the standard posix functions + are more apropriate. The posix handles can be obtained with + a call to + <a href="zziplib.html#zzip_realdir"> zzip_realdir </a> and + <a href="zziplib.html#zzip_realfd"> zzip_realfd </a> respectivly. +</P> + +</section><section> +<h3> Errors & Infos </h3> + +<P> + There are a set of error and info functions available. To handle + error conditions specific to the + <a href="zziplib.html">zziplib library</a> + there are these functions: + <a href="zziplib.html#zzip_error"> zzip_error </a>, + <a href="zziplib.html#zzip_seterror"> zzip_seterror </a> + and their string representations with + <a href="zziplib.html#zzip_strerror"> zzip_strerror </a>, + <a href="zziplib.html#zzip_strerror_of"> zzip_strerror_of </a>. + The magic functions will map any of these specific library + error conditions to the more generic system <code>errno</code> + codes with + <a href="zziplib.html#zzip_errno"> zzip_errno </a>. +</P> +<P> + More information on stream can be obtained with + <a href="zziplib.html#zzip_dir_stat"> zzip_dir_stat </a> and + <a href="zziplib.html#zzip_dirhandle"> zzip_dirhandle. </a> + The latter is used to obtain the dir-handle that every zipped file + handle has even if not explicitly opened. +</P> +<P> + The usage of many functions are shown in the example programs + that come along with the + <a href="zziplib.html">zziplib library</a>. See the files + <a href="zzcat.c"> zzcat.c </a> and + <a href="zzdir.c"> zzdir.c </a>. The + <a href="zziptest.c"> zziptest.c </a> program needs the + private header file + <a href="zzip.h"> zzip.h </a> whereas the library installer + will only copy the public include file + <a href="zziplib.h"> zziplib.h </a> to your system's + <tt>include</tt> directory. +</P> +</section></section> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/zziplib-master.dbk b/Build/source/libs/zziplib/zziplib-0.13.58/docs/zziplib-master.dbk new file mode 100644 index 00000000000..8384c282428 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/zziplib-master.dbk @@ -0,0 +1,59 @@ +<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" + "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> +<!-- using <chapter> allows to append a <reference> with manpages --> +<section> +<sectioninfo> +<date> 2006-01-01</date> +<authorblurb><simpara> Guido Draheim </simpara></authorblurb> +</sectioninfo> +<title> ZZIPlib Documentation </title> + +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="xml" + href="zzip-index.xml" /> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="xml" + href="zzip-zip.xml" /> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="xml" + href="zzip-file.xml" /> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="xml" + href="zzip-sdl-rwops.xml" /> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="xml" + href="zzip-extio.xml" /> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="xml" + href="zzip-xor.xml" /> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="xml" + href="zzip-crypt.xml" /> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="xml" + href="zzip-cryptoid.xml" /> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="xml" + href="zzip-api.xml" /> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="xml" + href="zzip-basics.xml" /> +<!-- +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="xml" + href="zzip-extras.xml" /> +--> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="xml" + href="zzip-parse.xml" /> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="xml" + href="64on32.xml" /> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="xml" + href="future.xml" /> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="xml" + href="fseeko.xml" /> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="xml" + href="mmapped.xml" /> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="xml" + href="memdisk.xml" /> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="xml" + href="configs.xml" /> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="xml" + href="sfx-make.xml" /> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="xml" + href="history.xml" /> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="xml" + href="referentials.xml" /> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="xml" + href="copying.xml" /> +<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="xml" + href="faq.xml" /> +</section> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/docs/zziplib.html b/Build/source/libs/zziplib/zziplib-0.13.58/docs/zziplib.html new file mode 100644 index 00000000000..96852c510cc --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/docs/zziplib.html @@ -0,0 +1,3795 @@ +<html><head><title>zziplibautodoc documentation </title></head> +<body> + +<h1>zziplib <small><small><i>- 0.13.47</i></small></small></h1> +<table border=0 cellspacing=2 cellpadding=0><tr valign="top"> + <td valign="top"><code>int +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#__zzip_fetch_disk_trailer"> + <code>__zzip_fetch_disk_trailer</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>int fd</nobr>, +<nobr>zzip_off_t filesize</nobr>, +<nobr>struct _disk_trailer * _zzip_restrict trailer</nobr>, +<nobr>zzip_plugin_io_t io</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>uint32_t </code></td> + <td valign="top"> </td> + <td valign="top"><a href="#__zzip_get32"> + <code>__zzip_get32</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>unsigned char * s</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>uint16_t </code></td> + <td valign="top"> </td> + <td valign="top"><a href="#__zzip_get16"> + <code>__zzip_get16</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>unsigned char * s</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>uint64_t </code></td> + <td valign="top"> </td> + <td valign="top"><a href="#__zzip_get64"> + <code>__zzip_get64</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>unsigned char * s</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>void </code></td> + <td valign="top"> </td> + <td valign="top"><a href="#__zzip_set32"> + <code>__zzip_set32</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>unsigned char * s</nobr>, +<nobr>uint32_t v</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>void </code></td> + <td valign="top"> </td> + <td valign="top"><a href="#__zzip_set16"> + <code>__zzip_set16</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>unsigned char * s</nobr>, +<nobr>uint16_t v</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>void </code></td> + <td valign="top"> </td> + <td valign="top"><a href="#__zzip_set64"> + <code>__zzip_set64</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>unsigned char * s</nobr>, +<nobr>uint64_t v</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>int +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#__zzip_parse_root_directory"> + <code>__zzip_parse_root_directory</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>int fd</nobr>, +<nobr>struct _disk_trailer * trailer</nobr>, +<nobr>struct zzip_dir_hdr ** hdr_return</nobr>, +<nobr>zzip_plugin_io_t io</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>int +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#__zzip_try_open"> + <code>__zzip_try_open</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>zzip_char_t* filename</nobr>, +<nobr>int filemode</nobr>, +<nobr>zzip_strings_t* ext</nobr>, +<nobr>zzip_plugin_io_t io</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>int +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_closedir"> + <code>zzip_closedir</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DIR* dir</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>zzip_char_t* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_compr_str"> + <code>zzip_compr_str</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>int compr</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>ZZIP_DIR* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_createdir"> + <code>zzip_createdir</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>zzip_char_t* name</nobr>, +<nobr>int o_mode</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>ZZIP_DIR* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_dir_alloc_ext_io"> + <code>zzip_dir_alloc_ext_io</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>zzip_strings_t* ext</nobr>, +<nobr>const zzip_plugin_io_t io</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>ZZIP_DIR* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_dir_alloc"> + <code>zzip_dir_alloc</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>zzip_strings_t* fileext</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>ZZIP_DIR* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_dir_creat"> + <code>zzip_dir_creat</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>zzip_char_t* name</nobr>, +<nobr>int o_mode</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>ZZIP_DIR* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_dir_creat_ext_io"> + <code>zzip_dir_creat_ext_io</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>zzip_char_t* name</nobr>, +<nobr>int o_mode</nobr>, +<nobr>zzip_strings_t* ext</nobr>, +<nobr>zzip_plugin_io_t io</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>ZZIP_DIR * +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_dir_fdopen"> + <code>zzip_dir_fdopen</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>int fd</nobr>, +<nobr>zzip_error_t * errcode_p</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>ZZIP_DIR * +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_dir_fdopen_ext_io"> + <code>zzip_dir_fdopen_ext_io</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>int fd</nobr>, +<nobr>zzip_error_t * errcode_p</nobr>, +<nobr>zzip_strings_t* ext</nobr>, +<nobr>const zzip_plugin_io_t io</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>int +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_dir_free"> + <code>zzip_dir_free</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DIR * dir</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>int +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_dir_close"> + <code>zzip_dir_close</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DIR * dir</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>ZZIP_DIR* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_dir_open"> + <code>zzip_dir_open</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>zzip_char_t* filename</nobr>, +<nobr>zzip_error_t* e</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>ZZIP_DIR* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_dir_open_ext_io"> + <code>zzip_dir_open_ext_io</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>zzip_char_t* filename</nobr>, +<nobr>zzip_error_t* e</nobr>, +<nobr>zzip_strings_t* ext</nobr>, +<nobr>zzip_plugin_io_t io</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>int +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_dir_read"> + <code>zzip_dir_read</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DIR * dir</nobr>, +<nobr>ZZIP_DIRENT * d</nobr> )</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>int +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_dir_stat"> + <code>zzip_dir_stat</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DIR * dir</nobr>, +<nobr>zzip_char_t* name</nobr>, +<nobr>ZZIP_STAT * zs</nobr>, +<nobr>int flags</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>int </code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_file_stat"> + <code>zzip_file_stat</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_FILE* file</nobr>, +<nobr>ZZIP_STAT* zs</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>int </code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_fstat"> + <code>zzip_fstat</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_FILE* file</nobr>, +<nobr>ZZIP_STAT* zs</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>ZZIP_DIR * +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_dirhandle"> + <code>zzip_dirhandle</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_FILE * fp</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>int +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_dirfd"> + <code>zzip_dirfd</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DIR* dir</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>zzip_byte_t* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_disk_entry_to_data"> + <code>zzip_disk_entry_to_data</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DISK* disk</nobr>, +<nobr>struct zzip_disk_entry* entry</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>struct zzip_file_header* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_disk_entry_to_file_header"> + <code>zzip_disk_entry_to_file_header</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DISK* disk</nobr>, +<nobr>struct zzip_disk_entry* entry</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>zzip__new__ char* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_disk_entry_strdup_name"> + <code>zzip_disk_entry_strdup_name</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DISK* disk</nobr>, +<nobr>struct zzip_disk_entry* entry</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>zzip__new__ char* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_disk_entry_strdup_comment"> + <code>zzip_disk_entry_strdup_comment</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DISK* disk</nobr>, +<nobr>struct zzip_disk_entry* entry</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>struct zzip_disk_entry* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_disk_findfile"> + <code>zzip_disk_findfile</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DISK* disk</nobr>, +<nobr>char* filename</nobr>, +<nobr>struct zzip_disk_entry* after</nobr>, +<nobr>zzip_strcmp_fn_t compare</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>struct zzip_disk_entry* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_disk_findfirst"> + <code>zzip_disk_findfirst</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DISK* disk</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>struct zzip_disk_entry* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_disk_findnext"> + <code>zzip_disk_findnext</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DISK* disk</nobr>, +<nobr>struct zzip_disk_entry* entry</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>struct zzip_disk_entry* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_disk_findmatch"> + <code>zzip_disk_findmatch</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DISK* disk</nobr>, +<nobr>char* filespec</nobr>, +<nobr>struct zzip_disk_entry* after</nobr>, +<nobr>zzip_fnmatch_fn_t compare</nobr>, +<nobr>int flags</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>zzip__new__ ZZIP_DISK_FILE* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_disk_fopen"> + <code>zzip_disk_fopen</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DISK* disk</nobr>, +<nobr>char* filename</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>zzip__new__ ZZIP_DISK_FILE* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_disk_entry_fopen"> + <code>zzip_disk_entry_fopen</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DISK* disk</nobr>, +<nobr>ZZIP_DISK_ENTRY* entry</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>zzip_size_t +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_disk_fread"> + <code>zzip_disk_fread</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>void* ptr</nobr>, +<nobr>zzip_size_t sized</nobr>, +<nobr>zzip_size_t nmemb</nobr>, +<nobr>ZZIP_DISK_FILE* file</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>int +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_disk_fclose"> + <code>zzip_disk_fclose</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DISK_FILE* file</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>int +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_disk_feof"> + <code>zzip_disk_feof</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DISK_FILE* file</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>zzip__new__ ZZIP_DISK* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_disk_mmap"> + <code>zzip_disk_mmap</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>int fd</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>int +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_disk_init"> + <code>zzip_disk_init</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DISK* disk</nobr>, +<nobr>void* buffer</nobr>, +<nobr>zzip_size_t buflen</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>zzip__new__ ZZIP_DISK* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_disk_new"> + <code>zzip_disk_new</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>void</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>int +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_disk_munmap"> + <code>zzip_disk_munmap</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DISK* disk</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>ZZIP_DISK* zzip__new__ +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_disk_open"> + <code>zzip_disk_open</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>char* filename</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>int +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_disk_close"> + <code>zzip_disk_close</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DISK* disk</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>zzip_off_t +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_entry_data_offset"> + <code>zzip_entry_data_offset</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_ENTRY* entry</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>static zzip_off_t +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_entry_fread_file_header"> + <code>zzip_entry_fread_file_header</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_ENTRY* entry</nobr>, +<nobr>struct zzip_file_header* file_header</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>zzip__new__ char* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_entry_strdup_name"> + <code>zzip_entry_strdup_name</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_ENTRY* entry</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>zzip__new__ ZZIP_ENTRY* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_entry_findfile"> + <code>zzip_entry_findfile</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>FILE* disk</nobr>, +<nobr>char* filename</nobr>, +<nobr>ZZIP_ENTRY* _zzip_restrict entry</nobr>, +<nobr>zzip_strcmp_fn_t compare</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>zzip__new__ ZZIP_ENTRY* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_entry_findfirst"> + <code>zzip_entry_findfirst</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>FILE* disk</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>zzip__new__ ZZIP_ENTRY* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_entry_findnext"> + <code>zzip_entry_findnext</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_ENTRY* _zzip_restrict entry</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>int +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_entry_free"> + <code>zzip_entry_free</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_ENTRY* entry</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>zzip__new__ ZZIP_ENTRY* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_entry_findmatch"> + <code>zzip_entry_findmatch</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>FILE* disk</nobr>, +<nobr>char* filespec</nobr>, +<nobr>ZZIP_ENTRY* _zzip_restrict entry</nobr>, +<nobr>zzip_fnmatch_fn_t compare</nobr>, +<nobr>int flags</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>zzip__new__ ZZIP_ENTRY_FILE* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_entry_fopen"> + <code>zzip_entry_fopen</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_ENTRY* entry</nobr>, +<nobr>int takeover</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>zzip__new__ ZZIP_ENTRY_FILE* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_entry_ffile"> + <code>zzip_entry_ffile</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>FILE* disk</nobr>, +<nobr>char* filename</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>zzip_size_t +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_entry_fread"> + <code>zzip_entry_fread</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>void* ptr</nobr>, +<nobr>zzip_size_t sized</nobr>, +<nobr>zzip_size_t nmemb</nobr>, +<nobr>ZZIP_ENTRY_FILE* file</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>int +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_entry_fclose"> + <code>zzip_entry_fclose</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_ENTRY_FILE* file</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>int +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_entry_feof"> + <code>zzip_entry_feof</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_ENTRY_FILE* file</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>int +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_errno"> + <code>zzip_errno</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>int errcode</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>int +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_error"> + <code>zzip_error</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DIR * dir</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>void +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_seterror"> + <code>zzip_seterror</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DIR * dir</nobr>, +<nobr>int errcode</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>int +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_fclose"> + <code>zzip_fclose</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_FILE * fp</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>int +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_close"> + <code>zzip_close</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_FILE* fp</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>int +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_file_close"> + <code>zzip_file_close</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_FILE * fp</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>ZZIP_FILE* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_file_creat"> + <code>zzip_file_creat</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DIR* dir</nobr>, +<nobr>zzip_char_t* name</nobr>, +<nobr>int o_mode</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>int +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_file_mkdir"> + <code>zzip_file_mkdir</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DIR* dir</nobr>, +<nobr>zzip_char_t* name</nobr>, +<nobr>int o_mode</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>ZZIP_FILE * +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_file_open"> + <code>zzip_file_open</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DIR * dir</nobr>, +<nobr>zzip_char_t* name</nobr>, +<nobr>int o_mode</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>zzip_ssize_t +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_file_read"> + <code>zzip_file_read</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_FILE * fp</nobr>, +<nobr>char * buf</nobr>, +<nobr>zzip_size_t len</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>int +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_file_real"> + <code>zzip_file_real</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_FILE* fp</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>int +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_dir_real"> + <code>zzip_dir_real</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DIR* dir</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>void* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_realdir"> + <code>zzip_realdir</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DIR* dir</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>int +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_realfd"> + <code>zzip_realfd</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_FILE* fp</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>ZZIP_FILE* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_fopen"> + <code>zzip_fopen</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>zzip_char_t* filename</nobr>, +<nobr>zzip_char_t* mode</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>ZZIP_FILE* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_freopen"> + <code>zzip_freopen</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>zzip_char_t* filename</nobr>, +<nobr>zzip_char_t* mode</nobr>, +<nobr>ZZIP_FILE* stream</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>static int +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_inflate_init"> + <code>zzip_inflate_init</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_FILE * fp</nobr>, +<nobr>struct zzip_dir_hdr* hdr</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>int </code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_init_io"> + <code>zzip_init_io</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>zzip_plugin_io_handlers_t io</nobr>, +<nobr>int flags</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>zzip_plugin_io_t +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_get_default_io"> + <code>zzip_get_default_io</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr></nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>zzip__new__ ZZIP_MEM_DISK* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_mem_disk_fdopen"> + <code>zzip_mem_disk_fdopen</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>int fd</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>long +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_mem_disk_load"> + <code>zzip_mem_disk_load</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_MEM_DISK* dir</nobr>, +<nobr>ZZIP_DISK* disk</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>zzip__new__ ZZIP_MEM_DISK* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_mem_disk_open"> + <code>zzip_mem_disk_open</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>char* filename</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>zzip__new__ ZZIP_MEM_ENTRY* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_mem_entry_new"> + <code>zzip_mem_entry_new</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DISK* disk</nobr>, +<nobr>ZZIP_DISK_ENTRY* entry</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>int inline +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_mkdir"> + <code>zzip_mkdir</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>zzip_char_t* name</nobr>, +<nobr>int o_mode</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>ZZIP_FILE* inline +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_creat"> + <code>zzip_creat</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>zzip_char_t* name</nobr>, +<nobr>int o_mode</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>void inline +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_mkfifo"> + <code>zzip_mkfifo</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>zzip_char_t* name</nobr>, +<nobr>int o_mode</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>void inline +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_sync"> + <code>zzip_sync</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>void</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>ZZIP_FILE* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_open"> + <code>zzip_open</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>zzip_char_t* filename</nobr>, +<nobr>int o_flags</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>ZZIP_FILE* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_open_ext_io"> + <code>zzip_open_ext_io</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>zzip_char_t* filename</nobr>, +<nobr>int o_flags</nobr>, +<nobr>int o_modes</nobr>, +<nobr>zzip_strings_t* ext</nobr>, +<nobr>zzip_plugin_io_t io</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>ZZIP_FILE* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_open_shared_io"> + <code>zzip_open_shared_io</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_FILE* stream</nobr>, +<nobr>zzip_char_t* filename</nobr>, +<nobr>int o_flags</nobr>, +<nobr>int o_modes</nobr>, +<nobr>zzip_strings_t* ext</nobr>, +<nobr>zzip_plugin_io_t io</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>ZZIP_DIR* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_opendir"> + <code>zzip_opendir</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>zzip_char_t* filename</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>ZZIP_DIR* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_opendir_ext_io"> + <code>zzip_opendir_ext_io</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>zzip_char_t* filename</nobr>, +<nobr>int o_modes</nobr>, +<nobr>zzip_strings_t* ext</nobr>, +<nobr>zzip_plugin_io_t io</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>zzip_ssize_t +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_read"> + <code>zzip_read</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_FILE * fp</nobr>, +<nobr>char * buf</nobr>, +<nobr>zzip_size_t len</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>zzip_size_t +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_fread"> + <code>zzip_fread</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>void *ptr</nobr>, +<nobr>zzip_size_t size</nobr>, +<nobr>zzip_size_t nmemb</nobr>, +<nobr>ZZIP_FILE *file</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>ZZIP_DIRENT* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_readdir"> + <code>zzip_readdir</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DIR * dir</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>int +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_rewind"> + <code>zzip_rewind</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_FILE *fp</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>void +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_rewinddir"> + <code>zzip_rewinddir</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DIR * dir</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>zzip_off_t +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_telldir"> + <code>zzip_telldir</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DIR* dir</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>void +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_seekdir"> + <code>zzip_seekdir</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DIR* dir</nobr>, +<nobr>zzip_off_t offset</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>zzip_off_t +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_seek"> + <code>zzip_seek</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_FILE * fp</nobr>, +<nobr>zzip_off_t offset</nobr>, +<nobr>int whence</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>zzip_char_t* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_strerror"> + <code>zzip_strerror</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>int errcode</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>zzip_char_t* +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_strerror_of"> + <code>zzip_strerror_of</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_DIR* dir</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>zzip_off_t +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_tell"> + <code>zzip_tell</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_FILE * fp</nobr>)</code> + +</td> +</tr> +<tr valign="top"> + <td valign="top"><code>zzip_ssize_t +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_write"> + <code>zzip_write</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_FILE* file</nobr>, +<nobr>const void* ptr</nobr>, +<nobr>zzip_size_t len</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>zzip_ssize_t +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_file_write"> + <code>zzip_file_write</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>ZZIP_FILE* file</nobr>, +<nobr>const void* ptr</nobr>, +<nobr>zzip_size_t len</nobr>)</code> + +</td> + +</tr><tr valign="top"> + <td valign="top"><code>zzip_size_t +</code></td> + <td valign="top"> </td> + <td valign="top"><a href="#zzip_fwrite"> + <code>zzip_fwrite</code> </a></td> + <td valign="top"> </td> + <td valign="top"> + <code>(<nobr>const void* ptr</nobr>, +<nobr>zzip_size_t len</nobr>, +<nobr>zzip_size_t multiply</nobr>, +<nobr>ZZIP_FILE* file</nobr>)</code> + +</td> +</tr> + +</table> +<h3>Documentation</h3> + +<dl> +<dt><a name="__zzip_fetch_disk_trailer" /> + <code>int +</code> + <br /><b><code>__zzip_fetch_disk_trailer</code></b> + <code> + <code>(<nobr>int fd</nobr>, +<nobr>zzip_off_t filesize</nobr>, +<nobr>struct _disk_trailer * _zzip_restrict trailer</nobr>, +<nobr>zzip_plugin_io_t io</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/zip.c) + +</em></para><p> + <br /> <function>The __zzip_fetch_disk_trailer function</function> is used by <a href="#zzip_file_open"><code>zzip_file_open</code></a>. It tries to find + <br /> the zip's central directory info that is usually a few + <br /> bytes off the end of the file. + +</p> +<p align="right"><small>(../../zzip/zip.c)</small></p></dd> +<dt><a name="__zzip_get32" /> <a name="__zzip_get16" /> <a name="__zzip_get64" /> <a name="__zzip_set32" /> <a name="__zzip_set16" /> <a name="__zzip_set64" /> + <code>uint32_t </code> + <br /><b><code>__zzip_get32</code></b> + <code> + <code>(<nobr>unsigned char * s</nobr>)</code> + +</code> + +<br /> <code>uint16_t </code> + <br /><b><code>__zzip_get16</code></b> + <code> + <code>(<nobr>unsigned char * s</nobr>)</code> + +</code> + +<br /> <code>uint64_t </code> + <br /><b><code>__zzip_get64</code></b> + <code> + <code>(<nobr>unsigned char * s</nobr>)</code> + +</code> + +<br /> <code>void </code> + <br /><b><code>__zzip_set32</code></b> + <code> + <code>(<nobr>unsigned char * s</nobr>, +<nobr>uint32_t v</nobr>)</code> + +</code> + +<br /> <code>void </code> + <br /><b><code>__zzip_set16</code></b> + <code> + <code>(<nobr>unsigned char * s</nobr>, +<nobr>uint16_t v</nobr>)</code> + +</code> + +<br /> <code>void </code> + <br /><b><code>__zzip_set64</code></b> + <code> + <code>(<nobr>unsigned char * s</nobr>, +<nobr>uint64_t v</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/fetch.c) + +</em></para><p> + <br /> Make 32 bit value in host byteorder from little-endian mapped octet-data + <br /> (works also on machines which SIGBUS on misaligned data access (eg. 68000)) + +</p> +<p> + <br /> <function>The __zzip_get16 function</function> does the same for a 16 bit value. + +</p> +<p> + <br /> <function>The __zzip_get64 function</function> does the same for an off64_t value. + +</p> +<p> + <br /> <function>The __zzip_set32 function</function> pushes a 32bit value at the specified address + +</p> +<p> + <br /> <function>The __zzip_set16 function</function> does the same for a 16 bit value. + +</p> +<p> + <br /> <function>The __zzip_set64 function</function> pushes a off64_t value at the specified address + +</p> +<p align="right"><small>(../../zzip/fetch.c)</small></p></dd> +<dt><a name="__zzip_parse_root_directory" /> + <code>int +</code> + <br /><b><code>__zzip_parse_root_directory</code></b> + <code> + <code>(<nobr>int fd</nobr>, +<nobr>struct _disk_trailer * trailer</nobr>, +<nobr>struct zzip_dir_hdr ** hdr_return</nobr>, +<nobr>zzip_plugin_io_t io</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/zip.c) + +</em></para><p> + <br /> <function>The __zzip_parse_root_directory function</function> is used by <a href="#zzip_file_open"><code>zzip_file_open</code></a>, it is usually called after + <br /> <code>__zzip_find_disk_trailer</code>. It will parse the zip's central directory + <br /> information and create a zziplib private directory table in + <br /> memory. + +</p> +<p align="right"><small>(../../zzip/zip.c)</small></p></dd> +<dt><a name="__zzip_try_open" /> + <code>int +</code> + <br /><b><code>__zzip_try_open</code></b> + <code> + <code>(<nobr>zzip_char_t* filename</nobr>, +<nobr>int filemode</nobr>, +<nobr>zzip_strings_t* ext</nobr>, +<nobr>zzip_plugin_io_t io</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/zip.c) + +</em></para><p> + <br /> will attach a .zip extension and tries to open it + <br /> the with <code>open</code>(2). This is a helper function for + <br /> <a href="#zzip_dir_open"><code>zzip_dir_open</code></a>, <a href="#zzip_opendir"><code>zzip_opendir</code></a> and <a href="#zzip_open"><code>zzip_open</code></a>. + +</p> +<p align="right"><small>(../../zzip/zip.c)</small></p></dd> +<dt><a name="zzip_closedir" /> + <code>int +</code> + <br /><b><code>zzip_closedir</code></b> + <code> + <code>(<nobr>ZZIP_DIR* dir</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/dir.c) + +</em></para><p> + <br /> <function>The zzip_closedir function</function> is the equivalent of <code>closedir</code>(3) for a realdir or zipfile. + +</p><p> + + <function>The zzip_closedir function</function> is magic - if the given arg-ZZIP_DIR + <br /> is a real directory, it will call the real <code>closedir</code>(3) and then + <br /> free the wrapping ZZIP_DIR structure. Otherwise it will divert + <br /> to <a href="#zzip_dir_close"><code>zzip_dir_close</code></a> which will free the ZZIP_DIR structure. + +</p> +<p align="right"><small>(../../zzip/dir.c)</small></p></dd> +<dt><a name="zzip_compr_str" /> + <code>zzip_char_t* +</code> + <br /><b><code>zzip_compr_str</code></b> + <code> + <code>(<nobr>int compr</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/info.c) + +</em></para><p> + <br /> return static const string of the known compression methods, + <br /> otherwise just "zipped" is returned + +</p> +<p align="right"><small>(../../zzip/info.c)</small></p></dd> +<dt><a name="zzip_createdir" /> + <code>ZZIP_DIR* +</code> + <br /><b><code>zzip_createdir</code></b> + <code> + <code>(<nobr>zzip_char_t* name</nobr>, +<nobr>int o_mode</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> create a new archive area for writing + + +</em></para><p> + +</p><p> + + <function>The zzip_createdir function</function> will create a new archive area. This may either be a + <br /> a new zip archive or a new directory in the filesystem. The returned + <br /> parameter is a new "zzip dir" handle that should be saved to a variable + <br /> so it can be used a base argument for <a href="#zzip_file_mkdir"><code>zzip_file_mkdir</code></a> and + <br /> <a href="#zzip_file_creat"><code>zzip_file_creat</code></a> calls. The returned handle wraps both possibilities, + <br /> it can be representing a zip central directory that must be + <br /> saved to disk using <a href="#zzip_closedir"><code>zzip_closedir</code></a> or it is just a handle for the + <br /> name of the real directory that still must be run through + <br /> <a href="#zzip_closedir"><code>zzip_closedir</code></a> to release the wrapper around the directory name. + +</p><p> + + The magic is pushed through the o_mode argument. Using a mode that + <br /> has no group-write bit set (S_IWGRP = 0040) then the file is + <br /> created as a zip directory. Note that this is unabridged of any + <br /> umask value in the system where the argument to <function>the zzip_createdir function</function> could + <br /> be 0775 but with an umask of 0755 it turns out as 0755 for a real + <br /> directory. Using 0755 directly would not create it as a real directory + <br /> but as a zip archive handle. + +</p><p> + + <function>The zzip_createdir function</function> is not yet implemented, check for #def ZZIP_NO_CREAT + <br /> Write-support will extend <a href="#zzip_closedir"><code>zzip_closedir</code></a> with semantics to finalize the + <br /> zip-archive by writing the zip-trailer and closing the archive file. + +</p><p> + + Returns null on error and sets errno. Remember, according to posix + <br /> the <code>creat</code>(2) call is equivalent to + <pre> open (path, O_WRONLY | O_CREAT | O_TRUNC, o_mode) </pre> + <br /> so any previous zip-archive will be overwritten unconditionally and + <br /> EEXIST errors from <code>mkdir</code>(2) are suppressed. (fixme: delete the + <br /> given subtree? like suggested by O_TRUNC? not done so far!) + +</p> +<p align="right"><small>(../../zzip/write.c)</small></p></dd> +<dt><a name="zzip_dir_alloc_ext_io" /> <a name="zzip_dir_alloc" /> + <code>ZZIP_DIR* +</code> + <br /><b><code>zzip_dir_alloc_ext_io</code></b> + <code> + <code>(<nobr>zzip_strings_t* ext</nobr>, +<nobr>const zzip_plugin_io_t io</nobr>)</code> + +</code> + +<br /> <code>ZZIP_DIR* +</code> + <br /><b><code>zzip_dir_alloc</code></b> + <code> + <code>(<nobr>zzip_strings_t* fileext</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/zip.c) + +</em></para><p> + <br /> allocate a new ZZIP_DIR handle and do basic + <br /> initializations before usage by <a href="#zzip_dir_fdopen"><code>zzip_dir_fdopen</code></a> + <br /> <a href="#zzip_dir_open"><code>zzip_dir_open</code></a> <a href="#zzip_file_open"><code>zzip_file_open</code></a> or through + <br /> <a href="#zzip_open"><code>zzip_open</code></a> + <br /> (ext==null flags uses { ".zip" , ".ZIP" } ) + <br /> (io ==null flags use of posix io defaults) + +</p> +<p> + <br /> <function>the zzip_dir_alloc function</function> is obsolete - it was generally used for implementation + <br /> and exported to let other code build on it. It is now advised to + <br /> use <a href="#zzip_dir_alloc_ext_io"><code>zzip_dir_alloc_ext_io</code></a> now on explicitly, just set that second + <br /> argument to zero to achieve the same functionality as the old style. + +</p> +<p align="right"><small>(../../zzip/zip.c)</small></p></dd> +<dt><a name="zzip_dir_creat" /> <a name="zzip_dir_creat_ext_io" /> + <code>ZZIP_DIR* +</code> + <br /><b><code>zzip_dir_creat</code></b> + <code> + <code>(<nobr>zzip_char_t* name</nobr>, +<nobr>int o_mode</nobr>)</code> + +</code> + +<br /> <code>ZZIP_DIR* +</code> + <br /><b><code>zzip_dir_creat_ext_io</code></b> + <code> + <code>(<nobr>zzip_char_t* name</nobr>, +<nobr>int o_mode</nobr>, +<nobr>zzip_strings_t* ext</nobr>, +<nobr>zzip_plugin_io_t io</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> create a new zip archive for writing + + +</em></para><p> + +</p><p> + + <function>The zzip_dir_creat function</function> will create a new zip archive. The returned parameter + <br /> is a new "zzip dir" handle that should be saved to a variable so it + <br /> can be used a base argument for <a href="#zzip_mkdir"><code>zzip_mkdir</code></a> and <a href="#zzip_creat"><code>zzip_creat</code></a> calls. + <br /> The returned handle represents a zip central directory that must be + <br /> saved to disk using <a href="#zzip_closedir"><code>zzip_closedir</code></a>. + +</p><p> + + Returns null on error and sets errno. Remember, according to posix + <br /> the <code>creat</code>(2) call is equivalent to + <pre> open (path, O_WRONLY | O_CREAT | O_TRUNC, o_mode) </pre> + <br /> so any previous zip-archive will be overwritten unconditionally and + <br /> EEXIST errors from <code>mkdir</code>(2) are suppressed. (fixme: delete the + <br /> given subtree? like suggested by O_TRUNC? not done so far!) + +</p> +<p> + +</p><p> + + If the third argument "ext" has another special meaning here, as it + <br /> is used to ensure that a given zip-file is created with the first entry + <br /> of the ext-list appended as an extension unless the file-path already + <br /> ends with a file-extension registered in the list. Therefore {"",0} + <br /> matches all files and creates them as zip-archives under the given + <br /> nonmodified name. (Some magic here? If the path ends in the path + <br /> separator then make a real directory even in the presence of ext-list?) + +</p><p> + + <function>The zzip_dir_creat_ext_io function</function> is not yet implemented, check for #def ZZIP_NO_CREAT + <br /> Write-support will extend <a href="#zzip_closedir"><code>zzip_closedir</code></a> with semantics to finalize the + <br /> zip-archive by writing the zip-trailer and closing the archive file. + +</p> +<p align="right"><small>(../../zzip/write.c)</small></p></dd> +<dt><a name="zzip_dir_fdopen" /> <a name="zzip_dir_fdopen_ext_io" /> + <code>ZZIP_DIR * +</code> + <br /><b><code>zzip_dir_fdopen</code></b> + <code> + <code>(<nobr>int fd</nobr>, +<nobr>zzip_error_t * errcode_p</nobr>)</code> + +</code> + +<br /> <code>ZZIP_DIR * +</code> + <br /><b><code>zzip_dir_fdopen_ext_io</code></b> + <code> + <code>(<nobr>int fd</nobr>, +<nobr>zzip_error_t * errcode_p</nobr>, +<nobr>zzip_strings_t* ext</nobr>, +<nobr>const zzip_plugin_io_t io</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/zip.c) + +</em></para><p> + <br /> used by the <a href="#zzip_dir_open"><code>zzip_dir_open</code></a> and zzip_opendir(2) call. Opens the + <br /> zip-archive as specified with the fd which points to an + <br /> already openend file. <function>The zzip_dir_fdopen function</function> then search and parse + <br /> the zip's central directory. + +</p><p> + + NOTE: refcount is zero, so an _open/_close pair will also delete + <br /> this _dirhandle + +</p> +<p> + <br /> <function>the zzip_dir_fdopen_ext_io function</function> uses explicit ext and io instead of the internal + <br /> defaults, setting these to zero is equivalent to <a href="#zzip_dir_fdopen"><code>zzip_dir_fdopen</code></a> + +</p> +<p align="right"><small>(../../zzip/zip.c)</small></p></dd> +<dt><a name="zzip_dir_free" /> <a name="zzip_dir_close" /> + <code>int +</code> + <br /><b><code>zzip_dir_free</code></b> + <code> + <code>(<nobr>ZZIP_DIR * dir</nobr>)</code> + +</code> + +<br /> <code>int +</code> + <br /><b><code>zzip_dir_close</code></b> + <code> + <code>(<nobr>ZZIP_DIR * dir</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/zip.c) + +</em></para><p> + <br /> will free the zzip_dir handle unless there are still + <br /> zzip_files attached (that may use its cache buffer). + <br /> This is the inverse of <a href="#zzip_dir_alloc"><code>zzip_dir_alloc</code></a> , and both + <br /> are helper functions used implicitly in other zzipcalls + <br /> e.g. <a href="#zzip_dir_close"><code>zzip_dir_close</code></a> = zzip_close + +</p><p> + + returns zero on sucess + <br /> returns the refcount when files are attached. + +</p> +<p><small><code>zzip_dir_close</code></small> - + <br /> It will also <code>free</code>(2) the <code>ZZIP_DIR</code>-handle given. + <br /> the counterpart for <a href="#zzip_dir_open"><code>zzip_dir_open</code></a> + <br /> see also <a href="#zzip_dir_free"><code>zzip_dir_free</code></a> + +</p> +<p align="right"><small>(../../zzip/zip.c)</small></p></dd> +<dt><a name="zzip_dir_open" /> <a name="zzip_dir_open_ext_io" /> <a name="zzip_dir_read" /> + <code>ZZIP_DIR* +</code> + <br /><b><code>zzip_dir_open</code></b> + <code> + <code>(<nobr>zzip_char_t* filename</nobr>, +<nobr>zzip_error_t* e</nobr>)</code> + +</code> + +<br /> <code>ZZIP_DIR* +</code> + <br /><b><code>zzip_dir_open_ext_io</code></b> + <code> + <code>(<nobr>zzip_char_t* filename</nobr>, +<nobr>zzip_error_t* e</nobr>, +<nobr>zzip_strings_t* ext</nobr>, +<nobr>zzip_plugin_io_t io</nobr>)</code> + +</code> + +<br /> <code>int +</code> + <br /><b><code>zzip_dir_read</code></b> + <code> + <code>(<nobr>ZZIP_DIR * dir</nobr>, +<nobr>ZZIP_DIRENT * d</nobr> )</code> + +</code> +<dt> +<dd> +<para><em> (zzip/zip.c) + +</em></para><p> + <br /> Opens the zip-archive (if available). + <br /> the two ext_io arguments will default to use posix io and + <br /> a set of default fileext that can atleast add .zip ext itself. + +</p> +<p> + <br /> <function>the zzip_dir_open_ext_io function</function> uses explicit ext and io instead of the internal + <br /> defaults. Setting these to zero is equivalent to <a href="#zzip_dir_open"><code>zzip_dir_open</code></a> + +</p> +<p><small><code>zzip_dir_read</code></small> - + <br /> fills the dirent-argument with the values and + <br /> increments the read-pointer of the dir-argument. + +</p><p> + + returns 0 if there no entry (anymore). + +</p> +<p align="right"><small>(../../zzip/zip.c)</small></p></dd> +<dt><a name="zzip_dir_stat" /> <a name="zzip_file_stat" /> <a name="zzip_fstat" /> + <code>int +</code> + <br /><b><code>zzip_dir_stat</code></b> + <code> + <code>(<nobr>ZZIP_DIR * dir</nobr>, +<nobr>zzip_char_t* name</nobr>, +<nobr>ZZIP_STAT * zs</nobr>, +<nobr>int flags</nobr>)</code> + +</code> + +<br /> <code>int </code> + <br /><b><code>zzip_file_stat</code></b> + <code> + <code>(<nobr>ZZIP_FILE* file</nobr>, +<nobr>ZZIP_STAT* zs</nobr>)</code> + +</code> + +<br /> <code>int </code> + <br /><b><code>zzip_fstat</code></b> + <code> + <code>(<nobr>ZZIP_FILE* file</nobr>, +<nobr>ZZIP_STAT* zs</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/stat.c) + +</em></para><p> + <br /> obtain information about a filename in an opened zip-archive without + <br /> opening that file first. Mostly used to obtain the uncompressed + <br /> size of a file inside a zip-archive. see <a href="#zzip_dir_open"><code>zzip_dir_open</code></a>. + +</p> +<p> + <br /> <function>The zzip_file_stat function</function> will obtain information about a opened file _within_ a + <br /> zip-archive. The file is supposed to be open (otherwise -1 is returned). + <br /> The st_size stat-member contains the uncompressed size. The optional + <br /> d_name is never set here. + +</p> +<p> + <br /> <function>The zzip_fstat function</function> will obtain information about a opened file which may be + <br /> either real/zipped. The file is supposed to be open (otherwise -1 is + <br /> returned). The st_size stat-member contains the uncompressed size. + <br /> The optional d_name is never set here. For a real file, we do set the + <br /> d_csize := st_size and d_compr := 0 for meaningful defaults. + +</p> +<p align="right"><small>(../../zzip/stat.c)</small></p></dd> +<dt><a name="zzip_dirhandle" /> <a name="zzip_dirfd" /> + <code>ZZIP_DIR * +</code> + <br /><b><code>zzip_dirhandle</code></b> + <code> + <code>(<nobr>ZZIP_FILE * fp</nobr>)</code> + +</code> + +<br /> <code>int +</code> + <br /><b><code>zzip_dirfd</code></b> + <code> + <code>(<nobr>ZZIP_DIR* dir</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/info.c) + +</em></para><p> + <br /> <function>The zzip_dirhandle function</function> will just return fp<small>-></small>dir + +</p><p> + + If a ZZIP_FILE is contained within a zip-file that one will be a valid + <br /> pointer, otherwise a NULL is returned and the ZZIP_FILE wraps a real file. + +</p> +<p> + <br /> <function>The zzip_dirfd function</function> will just return dir<small>-></small>fd + +</p><p> + + If a ZZIP_DIR does point to a zipfile then the file-descriptor of that + <br /> zipfile is returned, otherwise a NULL is returned and the ZZIP_DIR wraps + <br /> a real directory DIR (if you have dirent on your system). + +</p> +<p align="right"><small>(../../zzip/info.c)</small></p></dd> +<dt><a name="zzip_disk_entry_to_data" /> <a name="zzip_disk_entry_to_file_header" /> <a name="zzip_disk_entry_strdup_name" /> <a name="zzip_disk_entry_strdup_comment" /> + <code>zzip_byte_t* +</code> + <br /><b><code>zzip_disk_entry_to_data</code></b> + <code> + <code>(<nobr>ZZIP_DISK* disk</nobr>, +<nobr>struct zzip_disk_entry* entry</nobr>)</code> + +</code> + +<br /> <code>struct zzip_file_header* +</code> + <br /><b><code>zzip_disk_entry_to_file_header</code></b> + <code> + <code>(<nobr>ZZIP_DISK* disk</nobr>, +<nobr>struct zzip_disk_entry* entry</nobr>)</code> + +</code> + +<br /> <code>zzip__new__ char* +</code> + <br /><b><code>zzip_disk_entry_strdup_name</code></b> + <code> + <code>(<nobr>ZZIP_DISK* disk</nobr>, +<nobr>struct zzip_disk_entry* entry</nobr>)</code> + +</code> + +<br /> <code>zzip__new__ char* +</code> + <br /><b><code>zzip_disk_entry_strdup_comment</code></b> + <code> + <code>(<nobr>ZZIP_DISK* disk</nobr>, +<nobr>struct zzip_disk_entry* entry</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> helper functions for (mmapped) zip access api + + +</em></para><p> + +</p><p> + + <function>The zzip_disk_entry_to_data function</function> augments the other zzip_disk_entry_* helpers: here we move + <br /> a disk_entry pointer (as returned by _find* functions) into a pointer to + <br /> the data block right after the file_header. Only disk<small>-></small>buffer would be + <br /> needed to perform the seek but we check the mmapped range end as well. + +</p> +<p> + <br /> <function>The zzip_disk_entry_to_file_header function</function> does half the job of <a href="#zzip_disk_entry_to_data"><code>zzip_disk_entry_to_data</code></a> where it + <br /> can augment with <code>zzip_file_header_to_data</code> helper from format/fetch.h + +</p> +<p> + <br /> <function>The zzip_disk_entry_strdup_name function</function> is a big helper despite its little name: in a zip file the + <br /> encoded filenames are usually NOT zero-terminated but for common usage + <br /> with libc we need it that way. Secondly, the filename SHOULD be present + <br /> in the zip central directory but if not then we fallback to the filename + <br /> given in the file_header of each compressed data portion. + +</p> +<p> + <br /> <function>The zzip_disk_entry_strdup_comment function</function> is similar creating a reference to a zero terminated + <br /> string but it can only exist in the zip central directory entry. + +</p> +<p align="right"><small>(../../zzip/mmapped.c)</small></p></dd> +<dt><a name="zzip_disk_findfile" /> <a name="zzip_disk_findfirst" /> <a name="zzip_disk_findnext" /> <a name="zzip_disk_findmatch" /> + <code>struct zzip_disk_entry* +</code> + <br /><b><code>zzip_disk_findfile</code></b> + <code> + <code>(<nobr>ZZIP_DISK* disk</nobr>, +<nobr>char* filename</nobr>, +<nobr>struct zzip_disk_entry* after</nobr>, +<nobr>zzip_strcmp_fn_t compare</nobr>)</code> + +</code> + +<br /> <code>struct zzip_disk_entry* +</code> + <br /><b><code>zzip_disk_findfirst</code></b> + <code> + <code>(<nobr>ZZIP_DISK* disk</nobr>)</code> + +</code> + +<br /> <code>struct zzip_disk_entry* +</code> + <br /><b><code>zzip_disk_findnext</code></b> + <code> + <code>(<nobr>ZZIP_DISK* disk</nobr>, +<nobr>struct zzip_disk_entry* entry</nobr>)</code> + +</code> + +<br /> <code>struct zzip_disk_entry* +</code> + <br /><b><code>zzip_disk_findmatch</code></b> + <code> + <code>(<nobr>ZZIP_DISK* disk</nobr>, +<nobr>char* filespec</nobr>, +<nobr>struct zzip_disk_entry* after</nobr>, +<nobr>zzip_fnmatch_fn_t compare</nobr>, +<nobr>int flags</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> search for files in the (mmapped) zip central directory + + +</em></para><p> + +</p><p> + + <function>The zzip_disk_findfile function</function> is given a filename as an additional argument, to find the + <br /> disk_entry matching a given filename. The compare-function is usually + <br /> strcmp or strcasecmp or perhaps strcoll, if null then strcmp is used. + <br /> - use null as argument for "after"-entry when searching the first + <br /> matching entry, otherwise the last returned value if you look for other + <br /> entries with a special "compare" function (if null then a doubled search + <br /> is rather useless with this variant of _findfile). + +</p> +<p> + +</p><p> + + <function>The zzip_disk_findfirst function</function> is the first call of all the zip access functions here. + <br /> It contains the code to find the first entry of the zip central directory. + <br /> Here we require the mmapped block to represent a real zip file where the + <br /> disk_trailer is _last_ in the file area, so that its position would be at + <br /> a fixed offset from the end of the file area if not for the comment field + <br /> allowed to be of variable length (which needs us to do a little search + <br /> for the disk_tailer). However, in this simple implementation we disregard + <br /> any disk_trailer info telling about multidisk archives, so we just return + <br /> a pointer to the zip central directory. + +</p><p> + + For an actual means, we are going to search backwards from the end + <br /> of the mmaped block looking for the PK-magic signature of a + <br /> disk_trailer. If we see one then we check the rootseek value to + <br /> find the first disk_entry of the root central directory. If we find + <br /> the correct PK-magic signature of a disk_entry over there then we + <br /> assume we are done and we are going to return a pointer to that label. + +</p><p> + + The return value is a pointer to the first zzip_disk_entry being checked + <br /> to be within the bounds of the file area specified by the arguments. If + <br /> no disk_trailer was found then null is returned, and likewise we only + <br /> accept a disk_trailer with a seekvalue that points to a disk_entry and + <br /> both parts have valid PK-magic parts. Beyond some sanity check we try to + <br /> catch a common brokeness with zip archives that still allows us to find + <br /> the start of the zip central directory. + +</p> +<p> + +</p><p> + + <function>The zzip_disk_findnext function</function> takes an existing disk_entry in the central root directory + <br /> (e.g. from zzip_disk_findfirst) and returns the next entry within in + <br /> the given bounds of the mmapped file area. + +</p> +<p> + +</p><p> + + <function>The zzip_disk_findmatch function</function> uses a compare-function with an additional argument + <br /> and it is called just like fnmatch(3) from POSIX.2 AD:1993), i.e. + <br /> the argument filespec first and the ziplocal filename second with + <br /> the integer-flags put in as third to the indirect call. If the + <br /> platform has fnmatch available then null-compare will use that one + <br /> and otherwise we fall back to mere strcmp, so if you need fnmatch + <br /> searching then please provide an implementation somewhere else. + <br /> - use null as argument for "after"-entry when searching the first + <br /> matching entry, or the last disk_entry return-value to find the + <br /> next entry matching the given filespec. + +</p> +<p align="right"><small>(../../zzip/mmapped.c)</small></p></dd> +<dt><a name="zzip_disk_fopen" /> <a name="zzip_disk_entry_fopen" /> <a name="zzip_disk_fread" /> <a name="zzip_disk_fclose" /> <a name="zzip_disk_feof" /> + <code>zzip__new__ ZZIP_DISK_FILE* +</code> + <br /><b><code>zzip_disk_fopen</code></b> + <code> + <code>(<nobr>ZZIP_DISK* disk</nobr>, +<nobr>char* filename</nobr>)</code> + +</code> + +<br /> <code>zzip__new__ ZZIP_DISK_FILE* +</code> + <br /><b><code>zzip_disk_entry_fopen</code></b> + <code> + <code>(<nobr>ZZIP_DISK* disk</nobr>, +<nobr>ZZIP_DISK_ENTRY* entry</nobr>)</code> + +</code> + +<br /> <code>zzip_size_t +</code> + <br /><b><code>zzip_disk_fread</code></b> + <code> + <code>(<nobr>void* ptr</nobr>, +<nobr>zzip_size_t sized</nobr>, +<nobr>zzip_size_t nmemb</nobr>, +<nobr>ZZIP_DISK_FILE* file</nobr>)</code> + +</code> + +<br /> <code>int +</code> + <br /><b><code>zzip_disk_fclose</code></b> + <code> + <code>(<nobr>ZZIP_DISK_FILE* file</nobr>)</code> + +</code> + +<br /> <code>int +</code> + <br /><b><code>zzip_disk_feof</code></b> + <code> + <code>(<nobr>ZZIP_DISK_FILE* file</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> openening a file part wrapped within a (mmapped) zip archive + + +</em></para><p> + +</p><p> + + <function>The zzip_disk_fopen function</function> opens a file found by name, so it does a search into + <br /> the zip central directory with <a href="#zzip_disk_findfile"><code>zzip_disk_findfile</code></a> and whatever + <br /> is found first is given to <a href="#zzip_disk_entry_fopen"><code>zzip_disk_entry_fopen</code></a> + +</p> +<p> + +</p><p> + + the ZZIP_DISK_FILE* is rather simple in just encapsulating the + <br /> arguments given to <function>the zzip_disk_entry_fopen function</function> plus a zlib deflate buffer. + <br /> Note that the ZZIP_DISK pointer does already contain the full + <br /> mmapped file area of a zip disk, so open()ing a file part within + <br /> that area happens to be a lookup of its bounds and encoding. That + <br /> information is memorized on the ZZIP_DISK_FILE so that subsequent + <br /> _read() operations will be able to get the next data portion or + <br /> return an eof condition for that file part wrapped in the zip archive. + +</p> +<p> + +</p><p> + + <function>The zzip_disk_fread function</function> reads more bytes into the output buffer specified as + <br /> arguments. The return value is null on eof or error, the stdio-like + <br /> interface can not distinguish between these so you need to check + <br /> with <a href="#zzip_disk_feof"><code>zzip_disk_feof</code></a> for the difference. + +</p> +<p> + <br /> <function>The zzip_disk_fclose function</function> releases any zlib decoder info needed for decompression + <br /> and dumps the ZZIP_DISK_FILE* then. + +</p> +<p> + +</p><p> + + <function>The zzip_disk_feof function</function> allows to distinguish an error from an eof condition. + <br /> Actually, if we found an error but we did already reach eof then we + <br /> just keep on saying that it was an eof, so the app can just continue. + +</p> +<p align="right"><small>(../../zzip/mmapped.c)</small></p></dd> +<dt><a name="zzip_disk_mmap" /> <a name="zzip_disk_init" /> <a name="zzip_disk_new" /> <a name="zzip_disk_munmap" /> <a name="zzip_disk_open" /> <a name="zzip_disk_close" /> + <code>zzip__new__ ZZIP_DISK* +</code> + <br /><b><code>zzip_disk_mmap</code></b> + <code> + <code>(<nobr>int fd</nobr>)</code> + +</code> + +<br /> <code>int +</code> + <br /><b><code>zzip_disk_init</code></b> + <code> + <code>(<nobr>ZZIP_DISK* disk</nobr>, +<nobr>void* buffer</nobr>, +<nobr>zzip_size_t buflen</nobr>)</code> + +</code> + +<br /> <code>zzip__new__ ZZIP_DISK* +</code> + <br /><b><code>zzip_disk_new</code></b> + <code> + <code>(<nobr>void</nobr>)</code> + +</code> + +<br /> <code>int +</code> + <br /><b><code>zzip_disk_munmap</code></b> + <code> + <code>(<nobr>ZZIP_DISK* disk</nobr>)</code> + +</code> + +<br /> <code>ZZIP_DISK* zzip__new__ +</code> + <br /><b><code>zzip_disk_open</code></b> + <code> + <code>(<nobr>char* filename</nobr>)</code> + +</code> + +<br /> <code>int +</code> + <br /><b><code>zzip_disk_close</code></b> + <code> + <code>(<nobr>ZZIP_DISK* disk</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> turn a filehandle into a mmapped zip disk archive handle + + +</em></para><p> + +</p><p> + + <function>The zzip_disk_mmap function</function> uses the given file-descriptor to detect the length of the + <br /> file and calls the system <code>mmap</code>(2) to put it in main memory. If it is + <br /> successful then a newly allocated ZZIP_DISK* is returned with + <br /> disk<small>-></small>buffer pointing to the mapview of the zipdisk content. + +</p> +<p> + <br /> <function>The zzip_disk_init function</function> does primary initialization of a disk-buffer struct. + +</p> +<p> + <br /> <function>The zzip_disk_new function</function> allocates a new disk-buffer with <code>malloc</code>(3) + +</p> +<p> + <br /> <function>The zzip_disk_munmap function</function> is the inverse of <a href="#zzip_disk_mmap"><code>zzip_disk_mmap</code></a> and using the system + <br /> munmap(2) on the buffer area and <code>free</code>(3) on the ZZIP_DISK structure. + +</p> +<p> + +</p><p> + + <function>The zzip_disk_open function</function> opens the given archive by name and turn the filehandle + <br /> to <a href="#zzip_disk_mmap"><code>zzip_disk_mmap</code></a> for bringing it to main memory. If it can not + <br /> be <code>mmap</code>(2)'ed then we slurp the whole file into a newly <code>malloc</code>(2)'ed + <br /> memory block. Only if that fails too then we return null. Since handling + <br /> of disk<small>-></small>buffer is ambigous it should not be snatched away please. + +</p> +<p> + +</p><p> + + <function>The zzip_disk_close function</function> will release all data needed to access a (mmapped) + <br /> zip archive, including any malloc()ed blocks, sharedmem mappings + <br /> and it dumps the handle struct as well. + +</p> +<p align="right"><small>(../../zzip/mmapped.c)</small></p></dd> +<dt><a name="zzip_entry_data_offset" /> <a name="zzip_entry_fread_file_header" /> <a name="zzip_entry_strdup_name" /> + <code>zzip_off_t +</code> + <br /><b><code>zzip_entry_data_offset</code></b> + <code> + <code>(<nobr>ZZIP_ENTRY* entry</nobr>)</code> + +</code> + +<br /> <code>static zzip_off_t +</code> + <br /><b><code>zzip_entry_fread_file_header</code></b> + <code> + <code>(<nobr>ZZIP_ENTRY* entry</nobr>, +<nobr>struct zzip_file_header* file_header</nobr>)</code> + +</code> + +<br /> <code>zzip__new__ char* +</code> + <br /><b><code>zzip_entry_strdup_name</code></b> + <code> + <code>(<nobr>ZZIP_ENTRY* entry</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> helper functions for (fseeko) zip access api + + +</em></para><p> + +</p><p> + + <function>The zzip_entry_data_offset function</function>s returns the seekval offset of the data portion of the + <br /> file referenced by the given zzip_entry. It requires an intermediate + <br /> check of the file_header structure (i.e. it reads it from disk). After + <br /> this call, the contained diskfile readposition is already set to the + <br /> data_offset returned here. On error -1 is returned. + +</p> +<p> + <br /> <function>The zzip_entry_fread_file_header function</function>s read the correspoding struct zzip_file_header from + <br /> the zip disk of the given "entry". The returned off_t points to the + <br /> end of the file_header where the current fseek pointer has stopped. + <br /> This is used to immediatly parse out any filename/extras block following + <br /> the file_header. The return value is null on error. + +</p> +<p> + <br /> <function>The zzip_entry_strdup_name function</function> is a big helper despite its little name: in a zip file the + <br /> encoded filenames are usually NOT zero-terminated but for common usage + <br /> with libc we need it that way. Secondly, the filename SHOULD be present + <br /> in the zip central directory but if not then we fallback to the filename + <br /> given in the file_header of each compressed data portion. + +</p> +<p align="right"><small>(../../zzip/fseeko.c)</small></p></dd> +<dt><a name="zzip_entry_findfile" /> <a name="zzip_entry_findfirst" /> <a name="zzip_entry_findnext" /> <a name="zzip_entry_free" /> <a name="zzip_entry_findmatch" /> + <code>zzip__new__ ZZIP_ENTRY* +</code> + <br /><b><code>zzip_entry_findfile</code></b> + <code> + <code>(<nobr>FILE* disk</nobr>, +<nobr>char* filename</nobr>, +<nobr>ZZIP_ENTRY* _zzip_restrict entry</nobr>, +<nobr>zzip_strcmp_fn_t compare</nobr>)</code> + +</code> + +<br /> <code>zzip__new__ ZZIP_ENTRY* +</code> + <br /><b><code>zzip_entry_findfirst</code></b> + <code> + <code>(<nobr>FILE* disk</nobr>)</code> + +</code> + +<br /> <code>zzip__new__ ZZIP_ENTRY* +</code> + <br /><b><code>zzip_entry_findnext</code></b> + <code> + <code>(<nobr>ZZIP_ENTRY* _zzip_restrict entry</nobr>)</code> + +</code> + +<br /> <code>int +</code> + <br /><b><code>zzip_entry_free</code></b> + <code> + <code>(<nobr>ZZIP_ENTRY* entry</nobr>)</code> + +</code> + +<br /> <code>zzip__new__ ZZIP_ENTRY* +</code> + <br /><b><code>zzip_entry_findmatch</code></b> + <code> + <code>(<nobr>FILE* disk</nobr>, +<nobr>char* filespec</nobr>, +<nobr>ZZIP_ENTRY* _zzip_restrict entry</nobr>, +<nobr>zzip_fnmatch_fn_t compare</nobr>, +<nobr>int flags</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> search for files in the (fseeko) zip central directory + + +</em></para><p> + +</p><p> + + <function>The zzip_entry_findfile function</function> is given a filename as an additional argument, to find the + <br /> disk_entry matching a given filename. The compare-function is usually + <br /> strcmp or strcasecmp or perhaps strcoll, if null then strcmp is used. + <br /> - use null as argument for "old"-entry when searching the first + <br /> matching entry, otherwise the last returned value if you look for other + <br /> entries with a special "compare" function (if null then a doubled search + <br /> is rather useless with this variant of _findfile). If no further entry is + <br /> found then null is returned and any "old"-entry gets already free()d. + +</p> +<p> + +</p><p> + + <function>The zzip_entry_findfirst function</function> is the first call of all the zip access functions here. + <br /> It contains the code to find the first entry of the zip central directory. + <br /> Here we require the stdio handle to represent a real zip file where the + <br /> disk_trailer is _last_ in the file area, so that its position would be at + <br /> a fixed offset from the end of the file area if not for the comment field + <br /> allowed to be of variable length (which needs us to do a little search + <br /> for the disk_tailer). However, in this simple implementation we disregard + <br /> any disk_trailer info telling about multidisk archives, so we just return + <br /> a pointer to the first entry in the zip central directory of that file. + +</p><p> + + For an actual means, we are going to search backwards from the end + <br /> of the mmaped block looking for the PK-magic signature of a + <br /> disk_trailer. If we see one then we check the rootseek value to + <br /> find the first disk_entry of the root central directory. If we find + <br /> the correct PK-magic signature of a disk_entry over there then we + <br /> assume we are done and we are going to return a pointer to that label. + +</p><p> + + The return value is a pointer to the first zzip_disk_entry being checked + <br /> to be within the bounds of the file area specified by the arguments. If + <br /> no disk_trailer was found then null is returned, and likewise we only + <br /> accept a disk_trailer with a seekvalue that points to a disk_entry and + <br /> both parts have valid PK-magic parts. Beyond some sanity check we try to + <br /> catch a common brokeness with zip archives that still allows us to find + <br /> the start of the zip central directory. + +</p> +<p> + +</p><p> + + <function>The zzip_entry_findnext function</function> takes an existing "entry" in the central root directory + <br /> (e.g. from zzip_entry_findfirst) and moves it to point to the next entry. + <br /> On error it returns 0, otherwise the old entry. If no further match is + <br /> found then null is returned and the entry already free()d. If you want + <br /> to stop searching for matches before that case then please call + <br /> <a href="#zzip_entry_free"><code>zzip_entry_free</code></a> on the cursor struct ZZIP_ENTRY. + +</p> +<p> + <br /> <function>the zzip_entry_free function</function> releases the malloc()ed areas needed for zzip_entry, the + <br /> pointer is invalid afterwards. <function>The zzip_entry_free function</function> has #define synonyms of + <br /> zzip_entry_findlast(), zzip_entry_findlastfile(), zzip_entry_findlastmatch() + +</p> +<p> + +</p><p> + + <function>The zzip_entry_findmatch function</function> uses a compare-function with an additional argument + <br /> and it is called just like fnmatch(3) from POSIX.2 AD:1993), i.e. + <br /> the argument filespec first and the ziplocal filename second with + <br /> the integer-flags put in as third to the indirect call. If the + <br /> platform has fnmatch available then null-compare will use that one + <br /> and otherwise we fall back to mere strcmp, so if you need fnmatch + <br /> searching then please provide an implementation somewhere else. + <br /> - use null as argument for "after"-entry when searching the first + <br /> matching entry, or the last disk_entry return-value to find the + <br /> next entry matching the given filespec. If no further entry is + <br /> found then null is returned and any "old"-entry gets already free()d. + +</p> +<p align="right"><small>(../../zzip/fseeko.c)</small></p></dd> +<dt><a name="zzip_entry_fopen" /> <a name="zzip_entry_ffile" /> <a name="zzip_entry_fread" /> <a name="zzip_entry_fclose" /> <a name="zzip_entry_feof" /> + <code>zzip__new__ ZZIP_ENTRY_FILE* +</code> + <br /><b><code>zzip_entry_fopen</code></b> + <code> + <code>(<nobr>ZZIP_ENTRY* entry</nobr>, +<nobr>int takeover</nobr>)</code> + +</code> + +<br /> <code>zzip__new__ ZZIP_ENTRY_FILE* +</code> + <br /><b><code>zzip_entry_ffile</code></b> + <code> + <code>(<nobr>FILE* disk</nobr>, +<nobr>char* filename</nobr>)</code> + +</code> + +<br /> <code>zzip_size_t +</code> + <br /><b><code>zzip_entry_fread</code></b> + <code> + <code>(<nobr>void* ptr</nobr>, +<nobr>zzip_size_t sized</nobr>, +<nobr>zzip_size_t nmemb</nobr>, +<nobr>ZZIP_ENTRY_FILE* file</nobr>)</code> + +</code> + +<br /> <code>int +</code> + <br /><b><code>zzip_entry_fclose</code></b> + <code> + <code>(<nobr>ZZIP_ENTRY_FILE* file</nobr>)</code> + +</code> + +<br /> <code>int +</code> + <br /><b><code>zzip_entry_feof</code></b> + <code> + <code>(<nobr>ZZIP_ENTRY_FILE* file</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> open a file within a zip disk for reading + + +</em></para><p> + +</p><p> + + <function>The zzip_entry_fopen function</function> does take an "entry" argument and copies it (or just takes + <br /> it over as owner) to a new ZZIP_ENTRY_FILE handle structure. That + <br /> structure contains also a zlib buffer for decoding. <function>The zzip_entry_fopen function</function> does + <br /> seek to the file_header of the given "entry" and validates it for the + <br /> data buffer following it. We do also prefetch some data from the data + <br /> buffer thereby trying to match the disk pagesize for faster access later. + <br /> The <a href="#zzip_entry_fread"><code>zzip_entry_fread</code></a> will then read in chunks of pagesizes which is + <br /> the size of the internal readahead buffer. If an error occurs then null + <br /> is returned. + +</p> +<p> + +</p><p> + + <function>The zzip_entry_ffile function</function> opens a file found by name, so it does a search into + <br /> the zip central directory with <a href="#zzip_entry_findfile"><code>zzip_entry_findfile</code></a> and whatever + <br /> is found first is given to <a href="#zzip_entry_fopen"><code>zzip_entry_fopen</code></a> + +</p> +<p> + +</p><p> + + <function>The zzip_entry_fread function</function> reads more bytes into the output buffer specified as + <br /> arguments. The return value is null on eof or error, the stdio-like + <br /> interface can not distinguish between these so you need to check + <br /> with <a href="#zzip_entry_feof"><code>zzip_entry_feof</code></a> for the difference. + +</p> +<p> + <br /> <function>The zzip_entry_fclose function</function> releases any zlib decoder info needed for decompression + <br /> and dumps the ZZIP_ENTRY_FILE struct then. + +</p> +<p> + +</p><p> + + <function>The zzip_entry_feof function</function> allows to distinguish an error from an eof condition. + <br /> Actually, if we found an error but we did already reach eof then we + <br /> just keep on saying that it was an eof, so the app can just continue. + +</p> +<p align="right"><small>(../../zzip/fseeko.c)</small></p></dd> +<dt><a name="zzip_errno" /> + <code>int +</code> + <br /><b><code>zzip_errno</code></b> + <code> + <code>(<nobr>int errcode</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/err.c) + +</em></para><p> + <br /> map the error code to a system error code. This is used + <br /> for the drop-in replacement functions to return a value + <br /> that can be interpreted correctly by code sections that + <br /> are unaware of the fact they their <code>open</code>(2) call had been + <br /> diverted to a file inside a zip-archive. + +</p> +<p align="right"><small>(../../zzip/err.c)</small></p></dd> +<dt><a name="zzip_error" /> <a name="zzip_seterror" /> + <code>int +</code> + <br /><b><code>zzip_error</code></b> + <code> + <code>(<nobr>ZZIP_DIR * dir</nobr>)</code> + +</code> + +<br /> <code>void +</code> + <br /><b><code>zzip_seterror</code></b> + <code> + <code>(<nobr>ZZIP_DIR * dir</nobr>, +<nobr>int errcode</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/info.c) + +</em></para><p> + <br /> just returns dir<small>-></small>errcode of the ZZIP_DIR handle + <br /> see: <a href="#zzip_dir_open"><code>zzip_dir_open</code></a>, <code>zzip_diropen</code>, <a href="#zzip_readdir"><code>zzip_readdir</code></a>, <a href="#zzip_dir_read"><code>zzip_dir_read</code></a> + +</p> +<p> + <br /> <function>The zzip_seterror function</function> just does dir<small>-></small>errcode = errcode + +</p> +<p align="right"><small>(../../zzip/info.c)</small></p></dd> +<dt><a name="zzip_fclose" /> <a name="zzip_close" /> + <code>int +</code> + <br /><b><code>zzip_fclose</code></b> + <code> + <code>(<nobr>ZZIP_FILE * fp</nobr>)</code> + +</code> + +<br /> <code>int +</code> + <br /><b><code>zzip_close</code></b> + <code> + <code>(<nobr>ZZIP_FILE* fp</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/file.c) + +</em></para><p> + <br /> <function>The zzip_fclose function</function> closes the given ZZIP_FILE handle. + +</p><p> + + If the ZZIP_FILE wraps a normal stat'fd then it is just that int'fd + <br /> that is being closed and the otherwise empty ZZIP_FILE gets freed. + +</p> +<p><small><code>zzip_close</code></small> - + +</p> +<p align="right"><small>(../../zzip/file.c)</small></p></dd> +<dt><a name="zzip_file_close" /> + <code>int +</code> + <br /><b><code>zzip_file_close</code></b> + <code> + <code>(<nobr>ZZIP_FILE * fp</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/file.c) + +</em></para><p> + <br /> the direct function of <a href="#zzip_close"><code>zzip_close</code></a>(fp). it will cleanup the + <br /> inflate-portion of <code>zlib</code> and free the structure given. + +</p><p> + + it is called quite from the error-cleanup parts + <br /> of the various <code>_open</code> functions. + +</p><p> + + the .refcount is decreased and if zero the fp<small>-></small>dir is closed just as well. + +</p> +<p align="right"><small>(../../zzip/file.c)</small></p></dd> +<dt><a name="zzip_file_creat" /> <a name="zzip_file_mkdir" /> + <code>ZZIP_FILE* +</code> + <br /><b><code>zzip_file_creat</code></b> + <code> + <code>(<nobr>ZZIP_DIR* dir</nobr>, +<nobr>zzip_char_t* name</nobr>, +<nobr>int o_mode</nobr>)</code> + +</code> + +<br /> <code>int +</code> + <br /><b><code>zzip_file_mkdir</code></b> + <code> + <code>(<nobr>ZZIP_DIR* dir</nobr>, +<nobr>zzip_char_t* name</nobr>, +<nobr>int o_mode</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> start next file entry in a zip archive + + +</em></para><p> + +</p><p> + + <function>The zzip_file_creat function</function> will create a new file within a zzip archive, the + <br /> one given as the primary argument and additionally to the posix + <br /> creat(2) - just like zzip_mkdir has an additional argument over + <br /> the posix mkdir(2) spec. For <function>the zzip_file_creat function</function> the primary parameter + <br /> can be null as well thereby creating a real file instead of a new + <br /> one inside the zip-archive otherwise given. If the primary parameter is + <br /> not null but wraps a real directory then all new files are also real. + +</p><p> + + <function>The zzip_file_creat function</function> is not yet implemented, check for #def ZZIP_NO_CREAT + +</p><p> + + Returns NULL on an error setting errno, and opening a file _within_ + <br /> a zip archive using O_RDONLY (and similar stuff) will surely lead to + <br /> an error. + +</p> +<p> + +</p><p> + + <function>The zzip_file_mkdir function</function> has an additional primary argument over the posix + <br /> mkdir(2) - if it is null then <function>the zzip_file_mkdir function</function> behaves just like + <br /> posix mkdir(2). The zzip_dir argument can be set to the result + <br /> of a <a href="#zzip_createdir"><code>zzip_createdir</code></a> which allows for some magic that the + <br /> given directory name is created as an entry in the zip archive. + +</p><p> + + If the given dir name argument is not within the basepath of + <br /> the zip central directory then a real directory is created. + <br /> Any EEXIST errors are not suppressed unlike with <a href="#zzip_createdir"><code>zzip_createdir</code></a> + +</p><p> + + Standard usage accepts a global/threaded/modular ZZIP_DIR pointer + <br /> for all zip archive operations like in: + <pre> ZZIP_DIR* zip = zzip_createdir (sysconfpath, 0755, zip); + zzip_file_mkdir (zip, filepath[i], 0755); + ZZIP_FILE* file = zzip_file_creat (zip, filename[i], 0644); + zzip_write (file, buf, len); + zzip_close (file); file = 0; + zzip_closedir (zip); zip = 0; </pre> + +</p><p> + + compare with <a href="#zzip_mkdir"><code>zzip_mkdir</code></a> inline macro which allows to + <br /> collapse the examples script to + <pre> #define zzip_savefile myproject_saveconfig + #include <zzip/zzip.h> + ZZIP_DIR* zzip_savefile = zzip_createdir (sysconfpath, 0755); + zzip_mkdir (filepath[i], 0755); + ZZIP_FILE* file = zzip_creat(filepath[i], 0644); + zzip_write (file, buf, len); + zzip_close (file); file = 0; + zzip_closedir (zip_savefile); </pre> + +</p> +<p align="right"><small>(../../zzip/write.c)</small></p></dd> +<dt><a name="zzip_file_open" /> + <code>ZZIP_FILE * +</code> + <br /><b><code>zzip_file_open</code></b> + <code> + <code>(<nobr>ZZIP_DIR * dir</nobr>, +<nobr>zzip_char_t* name</nobr>, +<nobr>int o_mode</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/file.c) + +</em></para><p> + <br /> open an <code>ZZIP_FILE</code> from an already open <code>ZZIP_DIR</code> handle. Since + <br /> we have a chance to reuse a cached <code>buf32k</code> and <code>ZZIP_FILE</code> memchunk + <br /> this is the best choice to unpack multiple files. + +</p><p> + + Note: the zlib supports 2..15 bit windowsize, hence we provide a 32k + <br /> memchunk here... just to be safe. + +</p> +<p align="right"><small>(../../zzip/file.c)</small></p></dd> +<dt><a name="zzip_file_read" /> + <code>zzip_ssize_t +</code> + <br /><b><code>zzip_file_read</code></b> + <code> + <code>(<nobr>ZZIP_FILE * fp</nobr>, +<nobr>char * buf</nobr>, +<nobr>zzip_size_t len</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/file.c) + +</em></para><p> + <br /> <function>The zzip_file_read function</function>s read data from zip-contained file. + +</p><p> + + It works like <code>read</code>(2) and will fill the given buffer with bytes from + <br /> the opened file. It will return the number of bytes read, so if the <code>EOF</code> + <br /> is encountered you will be prompted with the number of bytes actually read. + +</p><p> + + This is the routines that needs the <code>buf32k</code> buffer, and it would have + <br /> need for much more polishing but it does already work quite well. + +</p><p> + + Note: the 32K buffer is rather big. The original inflate-algorithm + <br /> required just that but the latest zlib would work just fine with + <br /> a smaller buffer. + +</p> +<p align="right"><small>(../../zzip/file.c)</small></p></dd> +<dt><a name="zzip_file_real" /> <a name="zzip_dir_real" /> <a name="zzip_realdir" /> <a name="zzip_realfd" /> + <code>int +</code> + <br /><b><code>zzip_file_real</code></b> + <code> + <code>(<nobr>ZZIP_FILE* fp</nobr>)</code> + +</code> + +<br /> <code>int +</code> + <br /><b><code>zzip_dir_real</code></b> + <code> + <code>(<nobr>ZZIP_DIR* dir</nobr>)</code> + +</code> + +<br /> <code>void* +</code> + <br /><b><code>zzip_realdir</code></b> + <code> + <code>(<nobr>ZZIP_DIR* dir</nobr>)</code> + +</code> + +<br /> <code>int +</code> + <br /><b><code>zzip_realfd</code></b> + <code> + <code>(<nobr>ZZIP_FILE* fp</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/info.c) + +</em></para><p> + <br /> <function>The zzip_file_real function</function> checks if the ZZIP_FILE-handle is wrapping + <br /> a real file or a zip-contained file. + <br /> Returns 1 for a stat'able file, and 0 for a file inside a zip-archive. + +</p> +<p> + <br /> <function>The zzip_dir_real function</function> checks if the ZZIP_DIR-handle is wrapping + <br /> a real directory or a zip-archive. + <br /> Returns 1 for a stat'able directory, and 0 for a handle to zip-archive. + +</p> +<p> + <br /> <function>The zzip_realdir function</function> returns the posix DIR* handle (if one exists). + <br /> Check before with <a href="#zzip_dir_real"><code>zzip_dir_real</code></a> if the + <br /> the ZZIP_DIR points to a real directory. + +</p> +<p> + <br /> <function>The zzip_realfd function</function> returns the posix file descriptor (if one exists). + <br /> Check before with <a href="#zzip_file_real"><code>zzip_file_real</code></a> if the + <br /> the ZZIP_FILE points to a real file. + +</p> +<p align="right"><small>(../../zzip/info.c)</small></p></dd> +<dt><a name="zzip_fopen" /> <a name="zzip_freopen" /> + <code>ZZIP_FILE* +</code> + <br /><b><code>zzip_fopen</code></b> + <code> + <code>(<nobr>zzip_char_t* filename</nobr>, +<nobr>zzip_char_t* mode</nobr>)</code> + +</code> + +<br /> <code>ZZIP_FILE* +</code> + <br /><b><code>zzip_freopen</code></b> + <code> + <code>(<nobr>zzip_char_t* filename</nobr>, +<nobr>zzip_char_t* mode</nobr>, +<nobr>ZZIP_FILE* stream</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/file.c) + +</em></para><p> + <br /> <function>The zzip_fopen function</function> will <code>fopen</code>(3) a real/zipped file. + +</p><p> + + It has some magic functionality builtin - it will first try to open + <br /> the given <em>filename</em> as a normal file. If it does not + <br /> exist, the given path to the filename (if any) is split into + <br /> its directory-part and the file-part. A ".zip" extension is + <br /> then added to the directory-part to create the name of a + <br /> zip-archive. That zip-archive (if it exists) is being searched + <br /> for the file-part, and if found a zzip-handle is returned. + +</p><p> + + Note that if the file is found in the normal fs-directory the + <br /> returned structure is mostly empty and the <a href="#zzip_read"><code>zzip_read</code></a> call will + <br /> use the libc <code>read</code> to obtain data. Otherwise a <a href="#zzip_file_open"><code>zzip_file_open</code></a> + <br /> is performed and any error mapped to <code>errno</code>(3). + +</p><p> + + unlike the posix-wrapper <a href="#zzip_open"><code>zzip_open</code></a> the mode-argument is + <br /> a string which allows for more freedom to support the extra + <br /> zzip modes called ZZIP_CASEINSENSITIVE and ZZIP_IGNOREPATH. + <br /> Currently, this <a href="#zzip_fopen"><code>zzip_fopen</code></a> call will convert the following + <br /> characters in the mode-string into their corrsponding mode-bits: + <br /> <ul><li><code> "r" : O_RDONLY : </code> read-only + <br /> </li><li><code> "b" : O_BINARY : </code> binary (win32 specific) + <br /> </li><li><code> "f" : O_NOCTTY : </code> no char device (unix) + <br /> </li><li><code> "i" : ZZIP_CASELESS : </code> inside zip file + <br /> </li><li><code> "*" : ZZIP_NOPATHS : </code> inside zip file only + <br /> </ul> all other modes will be ignored for zip-contained entries + <br /> but they are transferred for compatibility and portability, + <br /> including these extra sugar bits: + <br /> <ul><li><code> "x" : O_EXCL :</code> fail if file did exist + <br /> </li><li><code> "s" : O_SYNC :</code> synchronized access + <br /> </li><li><code> "n" : O_NONBLOCK :</code> nonblocking access + <br /> </li><li><code> "z#" : compression level :</code> for zlib + <br /> </li><li><code> "g#" : group access :</code> unix access bits + <br /> </li><li><code> "u#" : owner access :</code> unix access bits + <br /> </li><li><code> "o#" : world access :</code> unix access bits + <br /> </ul>... the access bits are in traditional unix bit format + <br /> with 7 = read/write/execute, 6 = read/write, 4 = read-only. + +</p><p> + + The default access mode is 0664, and the compression level + <br /> is ignored since the lib can not yet write zip files, otherwise + <br /> it would be the initialisation value for the zlib deflateInit + <br /> where 0 = no-compression, 1 = best-speed, 9 = best-compression. + +</p> +<p> + +</p><p> + + <function>The zzip_freopen function</function> receives an additional argument pointing to + <br /> a ZZIP_FILE* being already in use. If this extra argument is + <br /> null then <function>the zzip_freopen function</function> is identical with calling <a href="#zzip_fopen"><code>zzip_fopen</code></a> + +</p><p> + + Per default, the old file stream is closed and only the internal + <br /> structures associated with it are kept. These internal structures + <br /> may be reused for the return value, and this is a lot quicker when + <br /> the filename matches a zipped file that is incidently in the very + <br /> same zip arch as the old filename wrapped in the stream struct. + +</p><p> + + That's simply because the zip arch's central directory does not + <br /> need to be read again. As an extension for <function>the zzip_freopen function</function>, if the + <br /> mode-string contains a "q" then the old stream is not closed but + <br /> left untouched, instead it is only given as a hint that a new + <br /> file handle may share/copy the zip arch structures of the old file + <br /> handle if that is possible, i.e when they are in the same zip arch. + +</p> +<p align="right"><small>(../../zzip/file.c)</small></p></dd> +<dt><a name="zzip_inflate_init" /> + <code>static int +</code> + <br /><b><code>zzip_inflate_init</code></b> + <code> + <code>(<nobr>ZZIP_FILE * fp</nobr>, +<nobr>struct zzip_dir_hdr* hdr</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/file.c) + +</em></para><p> + <br /> call <code>inflateInit</code> and setup fp's iterator variables, + <br /> used by lowlevel <code>_open</code> functions. + +</p> +<p align="right"><small>(../../zzip/file.c)</small></p></dd> +<dt><a name="zzip_init_io" /> <a name="zzip_get_default_io" /> + <code>int </code> + <br /><b><code>zzip_init_io</code></b> + <code> + <code>(<nobr>zzip_plugin_io_handlers_t io</nobr>, +<nobr>int flags</nobr>)</code> + +</code> + +<br /> <code>zzip_plugin_io_t +</code> + <br /><b><code>zzip_get_default_io</code></b> + <code> + <code>(<nobr></nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/plugin.c) + +</em></para><p> + <br /> <function>The zzip_init_io function</function> initializes the users handler struct to default values + <br /> being the posix io functions in default configured environments. + +</p> +<p> + <br /> <function>The zzip_get_default_io function</function> returns a zzip_plugin_io_t handle to static defaults + <br /> wrapping the posix io file functions for actual file access. + +</p> +<p align="right"><small>(../../zzip/plugin.c)</small></p></dd> +<dt><a name="zzip_mem_disk_fdopen" /> + <code>zzip__new__ ZZIP_MEM_DISK* +</code> + <br /><b><code>zzip_mem_disk_fdopen</code></b> + <code> + <code>(<nobr>int fd</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> create new diskdir handle. + + +</em></para><p> + <br /> wraps underlying zzip_disk_open. +</p> +<p align="right"><small>(../../zzip/memdisk.c)</small></p></dd> +<dt><a name="zzip_mem_disk_load" /> + <code>long +</code> + <br /><b><code>zzip_mem_disk_load</code></b> + <code> + <code>(<nobr>ZZIP_MEM_DISK* dir</nobr>, +<nobr>ZZIP_DISK* disk</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> parse central dir. + + +</em></para><p> + <br /> creates an internal copy of each entry converted to the local platform. + <br /> returns: number of entries, or -1 on error (setting errno) + +</p> +<p align="right"><small>(../../zzip/memdisk.c)</small></p></dd> +<dt><a name="zzip_mem_disk_open" /> + <code>zzip__new__ ZZIP_MEM_DISK* +</code> + <br /><b><code>zzip_mem_disk_open</code></b> + <code> + <code>(<nobr>char* filename</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> create new diskdir handle. + + +</em></para><p> + <br /> wraps underlying zzip_disk_open. +</p> +<p align="right"><small>(../../zzip/memdisk.c)</small></p></dd> +<dt><a name="zzip_mem_entry_new" /> + <code>zzip__new__ ZZIP_MEM_ENTRY* +</code> + <br /><b><code>zzip_mem_entry_new</code></b> + <code> + <code>(<nobr>ZZIP_DISK* disk</nobr>, +<nobr>ZZIP_DISK_ENTRY* entry</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> convert a zip disk entry to internal format. + + +</em></para><p> + <br /> creates a new item parsing the information out of the various places + <br /> in the zip archive. This is a good place to extend functionality if + <br /> you have a project with extra requirements as you can push more bits + <br /> right into the diskdir_entry for later usage in higher layers. + <br /> returns: new item, or null on error (setting errno) + +</p> +<p align="right"><small>(../../zzip/memdisk.c)</small></p></dd> +<dt><a name="zzip_mkdir" /> <a name="zzip_creat" /> + <code>int inline +</code> + <br /><b><code>zzip_mkdir</code></b> + <code> + <code>(<nobr>zzip_char_t* name</nobr>, +<nobr>int o_mode</nobr>)</code> + +</code> + +<br /> <code>ZZIP_FILE* inline +</code> + <br /><b><code>zzip_creat</code></b> + <code> + <code>(<nobr>zzip_char_t* name</nobr>, +<nobr>int o_mode</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> create a zipped file/directory + + +</em></para><p> + +</p><p> + + <function>The zzip_mkdir function</function> creates a directory entry in the default zip-archive. + <br /> If you did not specify a "#define zzip_savefile somevar" + <br /> then the default zip-archive is null and all directories are + <br /> created as real directories in the filesystem. <function>The zzip_mkdir function</function> is + <br /> really a preprocessor macro or preferably an inline function + <br /> around <a href="#zzip_file_mkdir"><code>zzip_file_mkdir</code></a>, there is no such symbol generated + <br /> into the library. The prototype is modelled after the posix + <br /> <code>mkdir</code>(2) call. + <pre> #ifndef zzip_savefile + #define zzip_savefile 0 + #endif + #define zzip_mkdir(name,mode) \ - </pre> + zzip_file_mkdir(zzip_savefile,name,mode) + +</p><p> + +</p> +<p> + +</p><p> + + <function>The zzip_creat function</function> creates a file in the default zip-archive. + <br /> If you did not specify a "#define zzip_savefile somevar" + <br /> then the default zip-archive is null and all files are created + <br /> as real files. <function>The zzip_creat function</function> is really a preprocessor macro + <br /> or preferably an inline function around <a href="#zzip_file_creat"><code>zzip_file_creat</code></a>, + <br /> there is no such symbol generated into the library. The prototype + <br /> is modelled after the posix <code>creat</code>(2) call. + <pre> #ifndef zzip_savefile + #define zzip_savefile 0 + #endif + #define zzip_creat(name,mode) \ - </pre> + zzip_file_creat(zzip_savefile,name,mode) + +</p> +<p align="right"><small>(../../zzip/write.c)</small></p></dd> +<dt><a name="zzip_mkfifo" /> <a name="zzip_sync" /> + <code>void inline +</code> + <br /><b><code>zzip_mkfifo</code></b> + <code> + <code>(<nobr>zzip_char_t* name</nobr>, +<nobr>int o_mode</nobr>)</code> + +</code> + +<br /> <code>void inline +</code> + <br /><b><code>zzip_sync</code></b> + <code> + <code>(<nobr>void</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> start writing to the magic zzip_savefile + + +</em></para><p> + +</p><p> + + open a zip archive for writing via the magic zzip_savefile macro + <br /> variable. The name and mode are given to <a href="#zzip_createdir"><code>zzip_createdir</code></a> and + <br /> the result is stored into <code>zzip_savefile</code> - if the <code>zzip_savefile</code> + <br /> did already have a zzip_dir handle then it is automatically + <br /> finalized with <a href="#zzip_sync"><code>zzip_sync</code></a> and the handle closed and the + <br /> zzip_savefile variable reused for the new zip archive just started + <br /> with this call. - <function>The zzip_mkfifo function</function> is really a preprocessor macro + <br /> or preferably an inline function around <code>zzip_dir_create</code>, there + <br /> is no such symbol generated into the library. + <pre> #ifndef zzip_savefile + #define zzip_savefile 0 + #endif + #define zzip_start(name,mode,ext) \ - </pre> + { if (zzip_savefile) zzip_closedir(zzip_savefile); \ - + zzip_savefile = zzip_createdir(name,mode,ext); } + <br /> <function>The zzip_mkfifo function</function> returns null on error or a zzip_dir handle on + <br /> success. It is perfectly okay to continue with a null in the + <br /> zzip_savefile variable since it makes subsequent calls to + <br /> <a href="#zzip_creat"><code>zzip_creat</code></a> and <a href="#zzip_mkdir"><code>zzip_mkdir</code></a> to run as <code>creat</code>(2) / <code>mkdir</code>(2) + <br /> on the real filesystem. + +</p> +<p> + +</p><p> + + finalize a zip archive thereby writing the central directory to + <br /> the end of the file. If it was a real directory then we do just + <br /> nothing - even that the prototype of the call itself is modelled + <br /> to be similar to the posix <code>sync</code>(2) call. <function>The zzip_sync function</function> is + <br /> really a preprocessor macro or preferably an inline function + <br /> around <a href="#zzip_closedir"><code>zzip_closedir</code></a>, there is no such symbol generated + <br /> into the library. + <pre> #ifndef zzip_savefile + #define zzip_savefile 0 + #endif + #define zzip_sync(name,mode) \ - </pre> + { zzip_closedir(zzip_savefile); zzip_savefile = 0; } + +</p><p> + +</p> +<p align="right"><small>(../../zzip/write.c)</small></p></dd> +<dt><a name="zzip_open" /> <a name="zzip_open_ext_io" /> <a name="zzip_open_shared_io" /> + <code>ZZIP_FILE* +</code> + <br /><b><code>zzip_open</code></b> + <code> + <code>(<nobr>zzip_char_t* filename</nobr>, +<nobr>int o_flags</nobr>)</code> + +</code> + +<br /> <code>ZZIP_FILE* +</code> + <br /><b><code>zzip_open_ext_io</code></b> + <code> + <code>(<nobr>zzip_char_t* filename</nobr>, +<nobr>int o_flags</nobr>, +<nobr>int o_modes</nobr>, +<nobr>zzip_strings_t* ext</nobr>, +<nobr>zzip_plugin_io_t io</nobr>)</code> + +</code> + +<br /> <code>ZZIP_FILE* +</code> + <br /><b><code>zzip_open_shared_io</code></b> + <code> + <code>(<nobr>ZZIP_FILE* stream</nobr>, +<nobr>zzip_char_t* filename</nobr>, +<nobr>int o_flags</nobr>, +<nobr>int o_modes</nobr>, +<nobr>zzip_strings_t* ext</nobr>, +<nobr>zzip_plugin_io_t io</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/file.c) + +</em></para><p> + <br /> <function>The zzip_open function</function> will <code>open</code>(2) a real/zipped file + +</p><p> + + It has some magic functionality builtin - it will first try to open + <br /> the given <em>filename</em> as a normal file. If it does not + <br /> exist, the given path to the filename (if any) is split into + <br /> its directory-part and the file-part. A ".zip" extension is + <br /> then added to the directory-part to create the name of a + <br /> zip-archive. That zip-archive (if it exists) is being searched + <br /> for the file-part, and if found a zzip-handle is returned. + +</p><p> + + Note that if the file is found in the normal fs-directory the + <br /> returned structure is mostly empty and the <a href="#zzip_read"><code>zzip_read</code></a> call will + <br /> use the libc <code>read</code> to obtain data. Otherwise a <a href="#zzip_file_open"><code>zzip_file_open</code></a> + <br /> is performed and any error mapped to <code>errno</code>(3). + +</p><p> + + There was a possibility to transfer zziplib-specific openmodes + <br /> through o_flags but you should please not use them anymore and + <br /> look into <a href="#zzip_open_ext_io"><code>zzip_open_ext_io</code></a> to submit them down. <function>The zzip_open function</function> + <br /> is shallow in that it just extracts the zzipflags and calls <ul><li><code> + <br /> zzip_open_ext_io(filename, o_flags, zzipflags|0664, 0, 0) </code></li></ul> + <br /> you must stop using this extra functionality (not well known + <br /> anyway) since zzip_open might be later usable to open files + <br /> for writing in which case the _EXTRAFLAGS will get in conflict. + +</p><p> + + compare with <code>open</code>(2) and <a href="#zzip_fopen"><code>zzip_fopen</code></a> + +</p> +<p> + +</p><p> + + <function>The zzip_open_ext_io function</function> uses explicit ext and io instead of the internal + <br /> defaults, setting them to zero is equivalent to <a href="#zzip_open"><code>zzip_open</code></a> + +</p><p> + + note that the two flag types have been split into an o_flags + <br /> (for fcntl-like openflags) and o_modes where the latter shall + <br /> carry the zzip_flags and possibly accessmodes for unix filesystems. + <br /> Since this version of zziplib can not write zipfiles, it is not + <br /> yet used for anything else than zzip-specific modeflags. + +</p> +<p> + +</p><p> + + <function>The zzip_open_shared_io function</function> takes an extra stream argument - if a handle has been + <br /> then ext/io can be left null and the new stream handle will pick up + <br /> the ext/io. This should be used only in specific environment however + <br /> since <a href="#zzip_file_real"><code>zzip_file_real</code></a> does not store any ext-sequence. + +</p><p> + + The benefit for <function>the zzip_open_shared_io function</function> comes in when the old file handle + <br /> was openened from a file within a zip archive. When the new file + <br /> is in the same zip archive then the internal zzip_dir structures + <br /> will be shared. It is even quicker, as no check needs to be done + <br /> anymore trying to guess the zip archive place in the filesystem, + <br /> here we just check whether the zip archive's filepath is a prefix + <br /> part of the filename to be opened. + +</p><p> + + Note that <function>the zzip_open_shared_io function</function> is also used by <a href="#zzip_freopen"><code>zzip_freopen</code></a> that + <br /> will unshare the old handle, thereby possibly closing the handle. + +</p> +<p align="right"><small>(../../zzip/file.c)</small></p></dd> +<dt><a name="zzip_opendir" /> <a name="zzip_opendir_ext_io" /> + <code>ZZIP_DIR* +</code> + <br /><b><code>zzip_opendir</code></b> + <code> + <code>(<nobr>zzip_char_t* filename</nobr>)</code> + +</code> + +<br /> <code>ZZIP_DIR* +</code> + <br /><b><code>zzip_opendir_ext_io</code></b> + <code> + <code>(<nobr>zzip_char_t* filename</nobr>, +<nobr>int o_modes</nobr>, +<nobr>zzip_strings_t* ext</nobr>, +<nobr>zzip_plugin_io_t io</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/dir.c) + +</em></para><p> + <br /> <function>The zzip_opendir function</function> is the equivalent of <code>opendir</code>(3) for a realdir or zipfile. + +</p><p> + + <function>The zzip_opendir function</function> has some magic - if the given argument-path + <br /> is a directory, it will wrap a real <code>opendir</code>(3) into the ZZIP_DIR + <br /> structure. Otherwise it will divert to <a href="#zzip_dir_open"><code>zzip_dir_open</code></a> which + <br /> can also attach a ".zip" extension if needed to find the archive. + +</p><p> + + the error-code is mapped to <code>errno</code>(3). + +</p> +<p> + <br /> <function>The zzip_opendir_ext_io function</function> uses explicit ext and io instead of the internal + <br /> defaults, setting them to zero is equivalent to <a href="#zzip_opendir"><code>zzip_opendir</code></a> + +</p> +<p align="right"><small>(../../zzip/dir.c)</small></p></dd> +<dt><a name="zzip_read" /> <a name="zzip_fread" /> + <code>zzip_ssize_t +</code> + <br /><b><code>zzip_read</code></b> + <code> + <code>(<nobr>ZZIP_FILE * fp</nobr>, +<nobr>char * buf</nobr>, +<nobr>zzip_size_t len</nobr>)</code> + +</code> + +<br /> <code>zzip_size_t +</code> + <br /><b><code>zzip_fread</code></b> + <code> + <code>(<nobr>void *ptr</nobr>, +<nobr>zzip_size_t size</nobr>, +<nobr>zzip_size_t nmemb</nobr>, +<nobr>ZZIP_FILE *file</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/file.c) + +</em></para><p> + <br /> <function>The zzip_read function</function> will read(2) data from a real/zipped file. + +</p><p> + + the replacement for <code>read</code>(2) will fill the given buffer with bytes from + <br /> the opened file. It will return the number of bytes read, so if the EOF + <br /> is encountered you will be prompted with the number of bytes actually read. + +</p><p> + + If the file-handle is wrapping a stat'able file then it will actually just + <br /> perform a normal <code>read</code>(2)-call, otherwise <a href="#zzip_file_read"><code>zzip_file_read</code></a> is called + <br /> to decompress the data stream and any error is mapped to <code>errno</code>(3). + +</p> +<p><small><code>zzip_fread</code></small> - + +</p> +<p align="right"><small>(../../zzip/file.c)</small></p></dd> +<dt><a name="zzip_readdir" /> + <code>ZZIP_DIRENT* +</code> + <br /><b><code>zzip_readdir</code></b> + <code> + <code>(<nobr>ZZIP_DIR * dir</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/dir.c) + +</em></para><p> + <br /> <function>The zzip_readdir function</function> is the equivalent of a <code>readdir</code>(2) for a realdir + <br /> or a zipfile referenced by the ZZIP_DIR returned from <a href="#zzip_opendir"><code>zzip_opendir</code></a>. + +</p><p> + + The ZZIP_DIR handle (as returned by <a href="#zzip_opendir"><code>zzip_opendir</code></a>) contains a few more + <br /> entries than being copied into the ZZIP_DIRENT. The only valid fields in + <br /> a ZZIP_DIRENT are d_name (the file name), d_compr (compression), d_csize + <br /> (compressed size), st_size (uncompressed size). + +</p> +<p align="right"><small>(../../zzip/dir.c)</small></p></dd> +<dt><a name="zzip_rewind" /> + <code>int +</code> + <br /><b><code>zzip_rewind</code></b> + <code> + <code>(<nobr>ZZIP_FILE *fp</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/file.c) + +</em></para><p> + <br /> <function>The zzip_rewind function</function> will rewind a real/zipped file. + +</p><p> + + It seeks to the beginning of this file's data in the zip, + <br /> or the beginning of the file for a stat'fd. + +</p> +<p align="right"><small>(../../zzip/file.c)</small></p></dd> +<dt><a name="zzip_rewinddir" /> <a name="zzip_telldir" /> <a name="zzip_seekdir" /> + <code>void +</code> + <br /><b><code>zzip_rewinddir</code></b> + <code> + <code>(<nobr>ZZIP_DIR * dir</nobr>)</code> + +</code> + +<br /> <code>zzip_off_t +</code> + <br /><b><code>zzip_telldir</code></b> + <code> + <code>(<nobr>ZZIP_DIR* dir</nobr>)</code> + +</code> + +<br /> <code>void +</code> + <br /><b><code>zzip_seekdir</code></b> + <code> + <code>(<nobr>ZZIP_DIR* dir</nobr>, +<nobr>zzip_off_t offset</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/dir.c) + +</em></para><p> + <br /> <function>The zzip_rewinddir function</function> is the equivalent of a <code>rewinddir</code>(2) for a realdir or + <br /> the zipfile in place of a directory. The ZZIP_DIR handle returned from + <br /> <a href="#zzip_opendir"><code>zzip_opendir</code></a> has a flag saying realdir or zipfile. As for a zipfile, + <br /> the filenames will include the filesubpath, so take care. + +</p> +<p> + <br /> <function>The zzip_telldir function</function> is the equivalent of <code>telldir</code>(2) for a realdir or zipfile. + +</p> +<p> + <br /> <function>The zzip_seekdir function</function> is the equivalent of <code>seekdir</code>(2) for a realdir or zipfile. + +</p> +<p align="right"><small>(../../zzip/dir.c)</small></p></dd> +<dt><a name="zzip_seek" /> + <code>zzip_off_t +</code> + <br /><b><code>zzip_seek</code></b> + <code> + <code>(<nobr>ZZIP_FILE * fp</nobr>, +<nobr>zzip_off_t offset</nobr>, +<nobr>int whence</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/file.c) + +</em></para><p> + <br /> <function>The zzip_seek function</function> will perform a <code>lseek</code>(2) operation on a real/zipped file + +</p><p> + + It will try to seek to the offset specified by offset, relative to whence, + <br /> which is one of SEEK_SET, SEEK_CUR or SEEK_END. + +</p><p> + + If the file-handle is wrapping a stat'able file then it will actually just + <br /> perform a normal <code>lseek</code>(2)-call. Otherwise the relative offset + <br /> is calculated, negative offsets are transformed into positive ones + <br /> by rewinding the file, and then data is read until the offset is + <br /> reached. This can make the function terribly slow, but this is + <br /> how gzio implements it, so I'm not sure there is a better way + <br /> without using the internals of the algorithm. + +</p> +<p align="right"><small>(../../zzip/file.c)</small></p></dd> +<dt><a name="zzip_strerror" /> <a name="zzip_strerror_of" /> + <code>zzip_char_t* +</code> + <br /><b><code>zzip_strerror</code></b> + <code> + <code>(<nobr>int errcode</nobr>)</code> + +</code> + +<br /> <code>zzip_char_t* +</code> + <br /><b><code>zzip_strerror_of</code></b> + <code> + <code>(<nobr>ZZIP_DIR* dir</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/err.c) + +</em></para><p> + <br /> returns the static string for the given error code. The + <br /> error code can be either a normal system error (a + <br /> positive error code will flag this), it can be <code>libz</code> + <br /> error code (a small negative error code will flag this) + <br /> or it can be an error code from <code>libzzip</code>, which is an + <br /> negative value lower than <code>ZZIP_ERROR</code> + +</p> +<p> + <br /> <function>The zzip_strerror_of function</function> fetches the errorcode from the <code>DIR</code>-handle and + <br /> runs it through <a href="#zzip_strerror"><code>zzip_strerror</code></a> to obtain the static string + <br /> describing the error. + +</p> +<p align="right"><small>(../../zzip/err.c)</small></p></dd> +<dt><a name="zzip_tell" /> + <code>zzip_off_t +</code> + <br /><b><code>zzip_tell</code></b> + <code> + <code>(<nobr>ZZIP_FILE * fp</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> (zzip/file.c) + +</em></para><p> + <br /> <function>The zzip_tell function</function> will <code>tell</code>(2) the current position in a real/zipped file + +</p><p> + + It will return the current offset within the real/zipped file, + <br /> measured in uncompressed bytes for the zipped-file case. + +</p><p> + + If the file-handle is wrapping a stat'able file then it will actually just + <br /> perform a normal <code>tell</code>(2)-call, otherwise the offset is + <br /> calculated from the amount of data left and the total uncompressed + <br /> size; + +</p> +<p align="right"><small>(../../zzip/file.c)</small></p></dd> +<dt><a name="zzip_write" /> <a name="zzip_file_write" /> <a name="zzip_fwrite" /> + <code>zzip_ssize_t +</code> + <br /><b><code>zzip_write</code></b> + <code> + <code>(<nobr>ZZIP_FILE* file</nobr>, +<nobr>const void* ptr</nobr>, +<nobr>zzip_size_t len</nobr>)</code> + +</code> + +<br /> <code>zzip_ssize_t +</code> + <br /><b><code>zzip_file_write</code></b> + <code> + <code>(<nobr>ZZIP_FILE* file</nobr>, +<nobr>const void* ptr</nobr>, +<nobr>zzip_size_t len</nobr>)</code> + +</code> + +<br /> <code>zzip_size_t +</code> + <br /><b><code>zzip_fwrite</code></b> + <code> + <code>(<nobr>const void* ptr</nobr>, +<nobr>zzip_size_t len</nobr>, +<nobr>zzip_size_t multiply</nobr>, +<nobr>ZZIP_FILE* file</nobr>)</code> + +</code> +<dt> +<dd> +<para><em> write to zzip storage + + +</em></para><p> + +</p><p> + + <function>The zzip_write function</function> will write data to a file descriptor. If the file + <br /> descriptor represents a real file then it will be forwarded to + <br /> call posix <code>write</code>(2) directly. If it is a descriptor for a + <br /> file within a zip directory then the data will be "deflated" + <br /> using <code>zlib</code>(3) and appended to the zip archive file. + +</p> +<p> + +</p><p> + + <function>The zzip_file_write function</function> will write data to a file descriptor inside a zip + <br /> archive. The data will be "deflated" using <code>zlib</code>(3) compression + <br /> and appended to the end of the zip archive file. Only one file + <br /> descriptor may be open per zzip_dir archive handle (fifo-like). + +</p><p> + + <function>The zzip_file_write function</function> is not yet implemented, check for #def ZZIP_NO_CREAT + <br /> It returns immediately -1 and sets errno=EROFS for indication. + +</p> +<p> + <br /> <function>The zzip_fwrite function</function> is the stdc variant for writing and the arguments + <br /> are forwarded to <a href="#zzip_write"><code>zzip_write</code></a> - the return value is floored to + <br /> null as for STDC spec but there is no zzip_ferror call so far + <br /> for the zziplib (later? is it actually needed?). + +</p><p> + + <function>The zzip_fwrite function</function> is not yet implemented, check for #def ZZIP_NO_CREAT + <br /> Write-support extends <a href="#zzip_close"><code>zzip_close</code></a> with semantics to write out a + <br /> file-trailer to the zip-archive leaving a name/offset marker in + <br /> the (still-open) ZZIP_DIR handle. + +</p> +<p align="right"><small>(../../zzip/write.c)</small></p></dd> +</dl> +</body></html> + diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/m4/ac_compile_check_sizeof.m4 b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ac_compile_check_sizeof.m4 new file mode 100644 index 00000000000..fbdb534b41f --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ac_compile_check_sizeof.m4 @@ -0,0 +1,78 @@ +dnl @synopsis AC_COMPILE_CHECK_SIZEOF(TYPE [, HEADERS [, EXTRA_SIZES...]]) +dnl +dnl This macro checks for the size of TYPE using compile checks, not +dnl run checks. You can supply extra HEADERS to look into. the check +dnl will cycle through 1 2 4 8 16 and any EXTRA_SIZES the user +dnl supplies. If a match is found, it will #define SIZEOF_`TYPE' to +dnl that value. Otherwise it will emit a configure time error +dnl indicating the size of the type could not be determined. +dnl +dnl The trick is that C will not allow duplicate case labels. While +dnl this is valid C code: +dnl +dnl switch (0) case 0: case 1:; +dnl +dnl The following is not: +dnl +dnl switch (0) case 0: case 0:; +dnl +dnl Thus, the AC_TRY_COMPILE will fail if the currently tried size does +dnl not match. +dnl +dnl Here is an example skeleton configure.in script, demonstrating the +dnl macro's usage: +dnl +dnl AC_PROG_CC +dnl AC_CHECK_HEADERS(stddef.h unistd.h) +dnl AC_TYPE_SIZE_T +dnl AC_CHECK_TYPE(ssize_t, int) +dnl +dnl headers='#ifdef HAVE_STDDEF_H +dnl #include <stddef.h> +dnl #endif +dnl #ifdef HAVE_UNISTD_H +dnl #include <unistd.h> +dnl #endif +dnl ' +dnl +dnl AC_COMPILE_CHECK_SIZEOF(char) +dnl AC_COMPILE_CHECK_SIZEOF(short) +dnl AC_COMPILE_CHECK_SIZEOF(int) +dnl AC_COMPILE_CHECK_SIZEOF(long) +dnl AC_COMPILE_CHECK_SIZEOF(unsigned char *) +dnl AC_COMPILE_CHECK_SIZEOF(void *) +dnl AC_COMPILE_CHECK_SIZEOF(size_t, $headers) +dnl AC_COMPILE_CHECK_SIZEOF(ssize_t, $headers) +dnl AC_COMPILE_CHECK_SIZEOF(ptrdiff_t, $headers) +dnl AC_COMPILE_CHECK_SIZEOF(off_t, $headers) +dnl +dnl @category Misc +dnl @author Kaveh Ghazi <ghazi@caip.rutgers.edu> +dnl @version 2000-07-19 +dnl @license GPLWithACException + +AC_DEFUN([AC_COMPILE_CHECK_SIZEOF], +[changequote(<<, >>)dnl +dnl The name to #define. +define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl +dnl The cache variable name. +define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl +changequote([, ])dnl +AC_MSG_CHECKING(size of $1) +AC_CACHE_VAL(AC_CV_NAME, +[for ac_size in 4 8 1 2 16 $2 ; do # List sizes in rough order of prevalence. + AC_TRY_COMPILE([#include "confdefs.h" +#include <sys/types.h> +$2 +], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size) + if test x$AC_CV_NAME != x ; then break; fi +done +]) +if test x$AC_CV_NAME = x ; then + AC_MSG_ERROR([cannot determine a size for $1]) +fi +AC_MSG_RESULT($AC_CV_NAME) +AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1]) +undefine([AC_TYPE_NAME])dnl +undefine([AC_CV_NAME])dnl +]) diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/m4/ac_set_default_paths_system.m4 b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ac_set_default_paths_system.m4 new file mode 100644 index 00000000000..6c201488ec2 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ac_set_default_paths_system.m4 @@ -0,0 +1,104 @@ +dnl @synopsis AC_SET_DEFAULT_PATHS_SYSTEM +dnl +dnl the most interesting changes go about windows-targets - where the +dnl default_prefix is set to /programs, and quite some directories are +dnl aliased: sbindir := libdir := bindir and the docprefix-defaults are +dnl also a bit different, even on FHS2-compliant systems where the +dnl mandir is going to $prefix/man only if prefix=/usr, otherwise they +dnl shall go to $datadir/man. We use an extra docprefix to express it +dnl which is either defined as being prefix or datadir. not SUBSTed +dnl here. +dnl +dnl @category Misc +dnl @author Guido Draheim <guidod@gmx.de> +dnl @version 2001-08-25 +dnl @license GPLWithACException + +AC_DEFUN([AC_SET_DEFAULT_PATHS_SYSTEM], +[AC_REQUIRE([AC_CANONICAL_HOST]) # -------------------------------------------- +case "$prefix:$ac_default_prefix" in + NONE:/usr/local) + result="" + AC_MSG_CHECKING(default prefix path) + case "${target_os}" in + *cygwin* | *mingw* | *uwin* | *djgpp | *emx* ) + if test "${host_os}" = "${target_os}" ; then + ac_default_prefix="/programs" + result="(win/dos target)" + else + case "$PATH" in + *:/usr/local/cross-tools/$target_alias/bin:*) + ac_default_prefix="/usr/local/cross-tools/$target_alias" ;; + *:/usr/local/$target_alias/bin:*) + ac_default_prefix="/usr/local/$target_alias" ;; + *:/usr/local/$target_cpu-$target_os/bin:*) + ac_default_prefix="/usr/local/$target_cpu-$target_os" ;; + *) + ac_default_prefix="/programs" ;; + esac + result="(win/dos cross-compiler)" + fi + ;; + esac + AC_MSG_RESULT($ac_default_prefix $result) + ;; +esac +AC_MSG_CHECKING(default prefix system) +result="$prefix" ; test "$result" = "NONE" && result="$ac_default_prefix" +case ${result} in + /programs | /programs/*) result="is win-/programs" + # on win/dos, .exe .dll and .cfg live in the same directory + libdir=`echo $libdir |sed -e 's:^..exec_prefix./lib$:${bindir}:'` + sbindir=`echo $sbindir |sed -e 's:^..exec_prefix./sbin$:${libdir}:'` + sysconfdir=`echo $sysconfdir |sed -e 's:^..prefix./etc$:${sbindir}:'` + libexecdir=`echo $libexecdir |sed -e 's:/libexec$:/system:'` + # help-files shall be set with --infodir, docprefix is datadir + docprefix="${datadir}" + mandir=`echo $mandir \ + |sed -e 's:^..prefix./man$:${datadir}/info:'` + includedir=`echo $includedir \ + |sed -e 's:^..prefix./include$:${datadir}/include:'` + # other state files (but /etc) are moved to datadir + sharedstatedir=`echo $sharedstatedir \ + |sed -e 's:^..prefix./com$:${datadir}/default:'` + localstatedir=`echo $localstatedir \ + |sed -e 's:^..prefix./var$:${datadir}/current:'` + ;; + /usr) result="is /usr-shipped" + # doc files are left at prefix + docprefix="${prefix}" + # state files go under /top + sysconfdir=`echo $sysconfdir |sed -e 's:^..prefix./etc$:/etc:'` + sharedstatedir=`echo $sharedstatedir \ + |sed -e 's:^..prefix./com$:/etc/default:'` + # $prefix/var is going to end up in /var/lib + localstatedir=`echo $localstatedir \ + |sed -e 's:^..prefix./var$:/var/lib:'` + ;; + /opt | /opt/*) result="is /opt-package" + # state files go under /top/prefix + sysconfdir=`echo $sysconfdir \ + |sed -e 's:^..prefix./etc$:/etc${prefix}:'` + sharedstatedir=`echo $sharedstatedir \ + |sed -e 's:^..prefix./com$:/etc/default${prefix}:'` + # $prefix/var is going to to be /var$prefix... once again + localstatedir=`echo $localstatedir \ + |sed -e 's:^..prefix./var$:/var${prefix}:'` + # doc files are left at prefix + docprefix="${prefix}" + ;; + *) result="is /local-package" + # doc files are moved from prefix down to datadir + docprefix="${datadir}" + mandir=`echo $mandir \ + |sed -e 's:^..prefix./man$:${datadir}/man:'` + infodir=`echo $infodir \ + |sed -e 's:^..prefix./infodir$:${datadir}/info:'` + # never use $prefix/com - that is no good idea + sharedstatedir=`echo $sharedstatedir \ + |sed -e 's:^..prefix./com$:${sysconfdir}/default:'` + ;; +esac +AC_MSG_RESULT($result) +# -------------------------------------------------------- +]) diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/m4/ac_sys_largefile_sensitive.m4 b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ac_sys_largefile_sensitive.m4 new file mode 100644 index 00000000000..6116b827deb --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ac_sys_largefile_sensitive.m4 @@ -0,0 +1,46 @@ +dnl @synopsis AC_SYS_LARGEFILE_SENSITIVE +dnl +dnl checker whether the current system is sensitive to -Ddefines making +dnl off_t having different types/sizes. Automatically define a config.h +dnl symbol LARGEFILE_SENSITIVE if that is the case, otherwise leave +dnl everything as is. +dnl +dnl This macro builds on top of AC_SYS_LARGEFILE to detect whether +dnl special options are neede to make the code use 64bit off_t - in +dnl many setups this will also make the code use 64bit off_t +dnl immediatly. +dnl +dnl The common use of a LARGEFILE_SENSITIVE config.h-define is to +dnl rename exported functions, usually adding a 64 to the original +dnl function name. Such renamings are only needed on systems being both +dnl (a) 32bit off_t by default and (b) implementing large.file +dnl extensions (as for unix98). +dnl +dnl a renaming section could look like this: +dnl +dnl #if defined LARGEFILE_SENSITIVE && _FILE_OFFSET_BITS+0 == 64 +dnl #define zzip_open zzip_open64 +dnl #define zzip_seek zzip_seek64 +dnl #endif +dnl +dnl for libraries, it is best to take advantage of the prefix-config.h +dnl macro, otherwise you want to export a renamed LARGEFILE_SENSITIVE +dnl in an installed header file. -> see AX_PREFIX_CONFIG_H +dnl +dnl @category Misc +dnl @author Guido Draheim <guidod@gmx.de> +dnl @version 2003-02-02 +dnl @license GPLWithACException + +AC_DEFUN([AC_SYS_LARGEFILE_SENSITIVE],[dnl +AC_REQUIRE([AC_SYS_LARGEFILE])dnl +# we know about some internals of ac_sys_largefile here... +AC_MSG_CHECKING(whether system differentiates 64bit off_t by defines) +ac_cv_sys_largefile_sensitive="no" +if test ".$ac_cv_sys_file_offset_bits$ac_cv_sys_large_files" != ".nono" +then ac_cv_sys_largefile_sensitive="yes" + AC_DEFINE(LARGEFILE_SENSITIVE, 1, + [whether the system defaults to 32bit off_t but can do 64bit when requested]) +fi +AC_MSG_RESULT([$ac_cv_sys_largefile_sensitive]) +]) diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/m4/acx_restrict.m4 b/Build/source/libs/zziplib/zziplib-0.13.58/m4/acx_restrict.m4 new file mode 100644 index 00000000000..333f2592df4 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/m4/acx_restrict.m4 @@ -0,0 +1,32 @@ +dnl @synopsis ACX_C_RESTRICT +dnl +dnl This macro determines whether the C compiler supports the "restrict" +dnl keyword introduced in ANSI C99, or an equivalent. Does nothing if +dnl the compiler accepts the keyword. Otherwise, if the compiler supports +dnl an equivalent (like gcc's __restrict__) defines "restrict" to be that. +dnl Otherwise, defines "restrict" to be empty. +dnl +dnl @version $Id: acx_restrict.m4,v 1.1 2005/12/09 07:47:34 guidod Exp $ +dnl @author Steven G. Johnson <stevenj@alum.mit.edu> + +AC_DEFUN([ACX_C_RESTRICT], +[AC_CACHE_CHECK([for C restrict keyword], acx_cv_c_restrict, +[acx_cv_c_restrict=unsupported + AC_LANG_SAVE + AC_LANG_C + # Try the official restrict keyword, then gcc's __restrict__, then + # SGI's __restrict. __restrict has slightly different semantics than + # restrict (it's a bit stronger, in that __restrict pointers can't + # overlap even with non __restrict pointers), but I think it should be + # okay under the circumstances where restrict is normally used. + for acx_kw in restrict __restrict__ __restrict; do + AC_TRY_COMPILE([], [float * $acx_kw x;], [acx_cv_c_restrict=$acx_kw; break]) + done + AC_LANG_RESTORE +]) + if test "$acx_cv_c_restrict" != "restrict"; then + acx_kw="$acx_cv_c_restrict" + if test "$acx_kw" = unsupported; then acx_kw=""; fi + AC_DEFINE_UNQUOTED(restrict, $acx_kw, [Define to equivalent of C99 restrict keyword, or to nothing if this is not supported. Do not define if restrict is supported directly.]) + fi +]) diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_cflags_gcc_option.m4 b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_cflags_gcc_option.m4 new file mode 100644 index 00000000000..dcd85797e54 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_cflags_gcc_option.m4 @@ -0,0 +1,187 @@ +dnl @synopsis AX_CFLAGS_GCC_OPTION (optionflag [,[shellvar][,[A][,[NA]]]) +dnl +dnl AX_CFLAGS_GCC_OPTION(-fvomit-frame) would show a message as like +dnl "checking CFLAGS for gcc -fvomit-frame ... yes" and adds the +dnl optionflag to CFLAGS if it is understood. You can override the +dnl shellvar-default of CFLAGS of course. The order of arguments stems +dnl from the explicit macros like AX_CFLAGS_WARN_ALL. +dnl +dnl The cousin AX_CXXFLAGS_GCC_OPTION would check for an option to add +dnl to CXXFLAGS - and it uses the autoconf setup for C++ instead of C +dnl (since it is possible to use different compilers for C and C++). +dnl +dnl The macro is a lot simpler than any special AX_CFLAGS_* macro (or +dnl ac_cxx_rtti.m4 macro) but allows to check for arbitrary options. +dnl However, if you use this macro in a few places, it would be great +dnl if you would make up a new function-macro and submit it to the +dnl ac-archive. +dnl +dnl - $1 option-to-check-for : required ("-option" as non-value) +dnl - $2 shell-variable-to-add-to : CFLAGS (or CXXFLAGS in the other case) +dnl - $3 action-if-found : add value to shellvariable +dnl - $4 action-if-not-found : nothing +dnl +dnl note: in earlier versions, $1-$2 were swapped. We try to detect the +dnl situation and accept a $2=~/-/ as being the old +dnl option-to-check-for. +dnl +dnl also: there are other variants that emerged from the original macro +dnl variant which did just test an option to be possibly added. +dnl However, some compilers accept an option silently, or possibly for +dnl just another option that was not intended. Therefore, we have to do +dnl a generic test for a compiler family. For gcc we check "-pedantic" +dnl being accepted which is also understood by compilers who just want +dnl to be compatible with gcc even when not being made from gcc +dnl sources. +dnl +dnl see also: +dnl +dnl AX_CFLAGS_SUN_OPTION AX_CFLAGS_HPUX_OPTION +dnl AX_CFLAGS_AIX_OPTION AX_CFLAGS_IRIX_OPTION +dnl +dnl @category C +dnl @author Guido Draheim <guidod@gmx.de> +dnl @version 2003-11-04 +dnl @license GPLWithACException + +AC_DEFUN([AX_CFLAGS_GCC_OPTION_OLD], [dnl +AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl +AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_gcc_option_$2])dnl +AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)], +VAR,[VAR="no, unknown" + AC_LANG_SAVE + AC_LANG_C + ac_save_[]FLAGS="$[]FLAGS" +for ac_arg dnl +in "-pedantic % m4_ifval($2,$2,-option)" dnl GCC + # +do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` + AC_TRY_COMPILE([],[return 0;], + [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break]) +done + FLAGS="$ac_save_[]FLAGS" + AC_LANG_RESTORE +]) +case ".$VAR" in + .ok|.ok,*) m4_ifvaln($3,$3) ;; + .|.no|.no,*) m4_ifvaln($4,$4) ;; + *) m4_ifvaln($3,$3,[ + if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null + then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR]) + else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"]) + m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR" + fi ]) ;; +esac +AS_VAR_POPDEF([VAR])dnl +AS_VAR_POPDEF([FLAGS])dnl +]) + + +dnl the only difference - the LANG selection... and the default FLAGS + +AC_DEFUN([AX_CXXFLAGS_GCC_OPTION_OLD], [dnl +AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl +AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_gcc_option_$2])dnl +AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)], +VAR,[VAR="no, unknown" + AC_LANG_SAVE + AC_LANG_CXX + ac_save_[]FLAGS="$[]FLAGS" +for ac_arg dnl +in "-pedantic % m4_ifval($2,$2,-option)" dnl GCC + # +do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` + AC_TRY_COMPILE([],[return 0;], + [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break]) +done + FLAGS="$ac_save_[]FLAGS" + AC_LANG_RESTORE +]) +case ".$VAR" in + .ok|.ok,*) m4_ifvaln($3,$3) ;; + .|.no|.no,*) m4_ifvaln($4,$4) ;; + *) m4_ifvaln($3,$3,[ + if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null + then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR]) + else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"]) + m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR" + fi ]) ;; +esac +AS_VAR_POPDEF([VAR])dnl +AS_VAR_POPDEF([FLAGS])dnl +]) + +dnl ------------------------------------------------------------------------- + +AC_DEFUN([AX_CFLAGS_GCC_OPTION_NEW], [dnl +AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl +AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_gcc_option_$1])dnl +AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for gcc m4_ifval($1,$1,-option)], +VAR,[VAR="no, unknown" + AC_LANG_SAVE + AC_LANG_C + ac_save_[]FLAGS="$[]FLAGS" +for ac_arg dnl +in "-pedantic % m4_ifval($1,$1,-option)" dnl GCC + # +do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` + AC_TRY_COMPILE([],[return 0;], + [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break]) +done + FLAGS="$ac_save_[]FLAGS" + AC_LANG_RESTORE +]) +case ".$VAR" in + .ok|.ok,*) m4_ifvaln($3,$3) ;; + .|.no|.no,*) m4_ifvaln($4,$4) ;; + *) m4_ifvaln($3,$3,[ + if echo " $[]m4_ifval($2,$2,FLAGS) " | grep " $VAR " 2>&1 >/dev/null + then AC_RUN_LOG([: m4_ifval($2,$2,FLAGS) does contain $VAR]) + else AC_RUN_LOG([: m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"]) + m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR" + fi ]) ;; +esac +AS_VAR_POPDEF([VAR])dnl +AS_VAR_POPDEF([FLAGS])dnl +]) + + +dnl the only difference - the LANG selection... and the default FLAGS + +AC_DEFUN([AX_CXXFLAGS_GCC_OPTION_NEW], [dnl +AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl +AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_gcc_option_$1])dnl +AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for gcc m4_ifval($1,$1,-option)], +VAR,[VAR="no, unknown" + AC_LANG_SAVE + AC_LANG_CXX + ac_save_[]FLAGS="$[]FLAGS" +for ac_arg dnl +in "-pedantic % m4_ifval($1,$1,-option)" dnl GCC + # +do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` + AC_TRY_COMPILE([],[return 0;], + [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break]) +done + FLAGS="$ac_save_[]FLAGS" + AC_LANG_RESTORE +]) +case ".$VAR" in + .ok|.ok,*) m4_ifvaln($3,$3) ;; + .|.no|.no,*) m4_ifvaln($4,$4) ;; + *) m4_ifvaln($3,$3,[ + if echo " $[]m4_ifval($2,$2,FLAGS) " | grep " $VAR " 2>&1 >/dev/null + then AC_RUN_LOG([: m4_ifval($2,$2,FLAGS) does contain $VAR]) + else AC_RUN_LOG([: m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"]) + m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR" + fi ]) ;; +esac +AS_VAR_POPDEF([VAR])dnl +AS_VAR_POPDEF([FLAGS])dnl +]) + +AC_DEFUN([AX_CFLAGS_GCC_OPTION],[ifelse(m4_bregexp([$2],[-]),-1, +[AX_CFLAGS_GCC_OPTION_NEW($@)],[AX_CFLAGS_GCC_OPTION_OLD($@)])]) + +AC_DEFUN([AX_CXXFLAGS_GCC_OPTION],[ifelse(m4_bregexp([$2],[-]),-1, +[AX_CXXFLAGS_GCC_OPTION_NEW($@)],[AX_CXXFLAGS_GCC_OPTION_OLD($@)])]) diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_cflags_no_writable_strings.m4 b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_cflags_no_writable_strings.m4 new file mode 100644 index 00000000000..e13ec09c278 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_cflags_no_writable_strings.m4 @@ -0,0 +1,140 @@ +dnl @synopsis AX_CFLAGS_NO_WRITABLE_STRINGS [(shellvar [,default, [A/NA]])] +dnl +dnl Try to find a compiler option that makes all stringliteral +dnl readonly. +dnl +dnl The sanity check is done by looking at string.h which has a set of +dnl strcpy definitions that should be defined with const-modifiers to +dnl not emit a warning in all so many places. +dnl +dnl For the GNU CC compiler it will be -fno-writable-strings +dnl -Wwrite-strings The result is added to the shellvar being CFLAGS by +dnl default. +dnl +dnl DEFAULTS: +dnl +dnl - $1 shell-variable-to-add-to : CFLAGS +dnl - $2 add-value-if-not-found : nothing +dnl - $3 action-if-found : add value to shellvariable +dnl - $4 action-if-not-found : nothing +dnl +dnl @category C +dnl @author Guido Draheim <guidod@gmx.de> +dnl @version 2003-05-21 +dnl @license GPLWithACException + +AC_DEFUN([AX_CFLAGS_NO_WRITABLE_STRINGS],[dnl +AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl +AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_no_writable_strings])dnl +AC_CACHE_CHECK([m4_ifval([$1],[$1],FLAGS) making strings readonly], +VAR,[VAR="no, unknown" + AC_LANG_SAVE + AC_LANG_C + ac_save_[]FLAGS="$[]FLAGS" +# IRIX C compiler: +# -use_readonly_const is the default for IRIX C, +# puts them into .rodata, but they are copied later. +# need to be "-G0 -rdatashared" for strictmode but +# I am not sure what effect that has really. - guidod +for ac_arg dnl +in "-Wall % -fno-writable-strings -Wwrite-strings" dnl GCC + "-v -Xc % -xstrconst" dnl Solaris C - strings go into readonly segment + "+w1 -Aa % +ESlit" dnl HP-UX C - strings go into readonly segment + "-w0 -std1 % -readonly_strings" dnl Digital Unix - again readonly segment + "-fullwarn -use_readonly_const %% ok, its the default" dnl IRIX C + # +do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` + AC_TRY_COMPILE([],[return 0;], + [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break]) +done +case ".$VAR" in + .|.no|.no,*) ;; + *) # sanity check - testing strcpy() from string.h + cp config.log config.tmp + AC_TRY_COMPILE([#include <string.h>],[ + char test[16]; + if (strcpy (test, "test")) return 1;], + dnl the original did use test -n `$CC testprogram.c` + [if test `diff config.log config.tmp | grep -i warning | wc -l` != 0 + then VAR="no, suppressed, string.h," ; fi], + [VAR="no, suppressed, string.h"]) + rm config.tmp + ;; +esac + FLAGS="$ac_save_[]FLAGS" + AC_LANG_RESTORE +]) +case ".$VAR" in + .ok|.ok,*) m4_ifvaln($3,$3) ;; + .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[ + AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"]) + m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;; + *) m4_ifvaln($3,$3,[ + if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null + then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR]) + else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"]) + m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR" + fi ]) ;; +esac +AS_VAR_POPDEF([VAR])dnl +AS_VAR_POPDEF([FLAGS])dnl +]) + +dnl the only difference - the LANG selection... and the default FLAGS + +AC_DEFUN([AX_CXXFLAGS_NO_WRITABLE_STRINGS],[dnl +AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl +AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_no_writable_strings])dnl +AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) making strings readonly], +VAR,[VAR="no, unknown" + AC_LANG_SAVE + AC_LANG_CXX + ac_save_[]FLAGS="$[]FLAGS" +# IRIX C compiler: +# -use_readonly_const is the default for IRIX C, +# puts them into .rodata, but they are copied later. +# need to be "-G0 -rdatashared" for strictmode but +# I am not sure what effect that has really. - guidod +for ac_arg dnl +in "-Wall % -fno-writable-strings -Wwrite-strings" dnl GCC + "-v -Xc % -xstrconst" dnl Solaris C - strings go into readonly segment + "+w1 -Aa % +ESlit" dnl HP-UX C - strings go into readonly segment + "-w0 -std1 % -readonly_strings" dnl Digital Unix - again readonly segment + "-fullwarn -use_readonly_const %% ok, its the default" dnl IRIX C + # +do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` + AC_TRY_COMPILE([],[return 0;], + [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break]) +done +case ".$VAR" in + .|.no|.no,*) ;; + *) # sanity check - testing strcpy() from string.h + cp config.log config.tmp + AC_TRY_COMPILE([#include <string.h>],[[ + char test[16]; + if (strcpy (test, "test")) return 1;]], + dnl the original did use test -n `$CC testprogram.c` + [if test `diff config.log config.tmp | grep -i warning | wc -l` != 0 + then VAR="no, suppressed, string.h," ; fi], + [VAR="no, suppressed, string.h"]) + rm config.tmp + ;; +esac + FLAGS="$ac_save_[]FLAGS" + AC_LANG_RESTORE +]) +case ".$VAR" in + .ok|.ok,*) m4_ifvaln($3,$3) ;; + .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[ + AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"]) + m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;; + *) m4_ifvaln($3,$3,[ + if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null + then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR]) + else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"]) + m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR" + fi ]) ;; +esac +AS_VAR_POPDEF([VAR])dnl +AS_VAR_POPDEF([FLAGS])dnl +]) diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_cflags_strict_prototypes.m4 b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_cflags_strict_prototypes.m4 new file mode 100644 index 00000000000..518c247e8fd --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_cflags_strict_prototypes.m4 @@ -0,0 +1,127 @@ +dnl @synopsis AX_CFLAGS_STRICT_PROTOTYPES [(shellvar [,default, [A/NA]] +dnl +dnl Try to find a compiler option that requires strict prototypes. +dnl +dnl The sanity check is done by looking at sys/signal.h which has a set +dnl of macro-definitions SIG_DFL and SIG_IGN that are cast to the local +dnl signal-handler type. If that signal-handler type is not fully +dnl qualified then the system headers are not seen as strictly +dnl prototype clean. +dnl +dnl For the GNU CC compiler it will be -fstrict-prototypes +dnl -Wstrict-prototypes The result is added to the shellvar being +dnl CFLAGS by default. +dnl +dnl DEFAULTS: +dnl +dnl - $1 shell-variable-to-add-to : CFLAGS +dnl - $2 add-value-if-not-found : nothing +dnl - $3 action-if-found : add value to shellvariable +dnl - $4 action-if-not-found : nothing +dnl +dnl @category C +dnl @author Guido Draheim <guidod@gmx.de> +dnl @version 2003-05-21 +dnl @license GPLWithACException + +AC_DEFUN([AX_CFLAGS_STRICT_PROTOTYPES],[dnl +AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl +AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_strict_prototypes])dnl +AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for strict prototypes], +VAR,[VAR="no, unknown" + AC_LANG_SAVE + AC_LANG_C + ac_save_[]FLAGS="$[]FLAGS" +for ac_arg dnl +in "-Wall % -fstrict-prototypes -Wstrict-prototypes" dnl GCC + "-Wall % -Wstrict-prototypes" dnl try to warn atleast + # +do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` + AC_TRY_COMPILE([],[return 0;], + [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break]) +done +case ".$VAR" in + .|.no|.no,*) ;; + *) # sanity check with signal() from sys/signal.h + cp config.log config.tmp + AC_TRY_COMPILE([#include <signal.h>],[ + if (signal (SIGINT, SIG_IGN) == SIG_DFL) return 1; + if (signal (SIGINT, SIG_IGN) != SIG_DFL) return 2;], + dnl the original did use test -n `$CC testprogram.c` + [if test `diff config.log config.tmp | grep -i warning | wc -l` != 0 +then if test `diff config.log config.tmp | grep -i warning | wc -l` != 1 +then VAR="no, suppressed, signal.h," ; fi ; fi], + [VAR="no, suppressed, signal.h"]) + rm config.tmp + ;; +esac + FLAGS="$ac_save_[]FLAGS" + AC_LANG_RESTORE +]) +case ".$VAR" in + .ok|.ok,*) m4_ifvaln($3,$3) ;; + .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[ + AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"]) + m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;; + *) m4_ifvaln($3,$3,[ + if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null + then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR]) + else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"]) + m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR" + fi ]) ;; +esac +AS_VAR_POPDEF([VAR])dnl +AS_VAR_POPDEF([FLAGS])dnl +]) + +dnl the only difference - the LANG selection... and the default FLAGS + +AC_DEFUN([AX_CXXFLAGS_STRICT_PROTOTYPES],[dnl +AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl +AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_strict_prototypes])dnl +AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for strict prototypes], +VAR,[VAR="no, unknown" + AC_LANG_SAVE + AC_LANG_CXX + ac_save_[]FLAGS="$[]FLAGS" +for ac_arg dnl +in "-Wall % -fstrict-prototypes -Wstrict-prototypes" dnl GCC + "-Wall % -Wstrict-prototypes" dnl try to warn atleast + # +do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` + AC_TRY_COMPILE([],[return 0;], + [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break]) +done +case ".$VAR" in + .|.no|.no,*) ;; + *) # sanity check with signal() from sys/signal.h + cp config.log config.tmp + AC_TRY_COMPILE([#include <signal.h>],[ + if (signal (SIGINT, SIG_IGN) == SIG_DFL) return 1; + if (signal (SIGINT, SIG_IGN) != SIG_DFL) return 2;], + dnl the original did use test -n `$CC testprogram.c` + [if test `diff config.log config.tmp | grep -i warning | wc -l` != 0 +then if test `diff config.log config.tmp | grep -i warning | wc -l` != 1 +then VAR="no, suppressed, signal.h," ; fi ; fi], + [VAR="no, suppressed, signal.h"]) + rm config.tmp + ;; +esac + FLAGS="$ac_save_[]FLAGS" + AC_LANG_RESTORE +]) +case ".$VAR" in + .ok|.ok,*) m4_ifvaln($3,$3) ;; + .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[ + AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"]) + m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;; + *) m4_ifvaln($3,$3,[ + if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null + then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR]) + else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"]) + m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR" + fi ]) ;; +esac +AS_VAR_POPDEF([VAR])dnl +AS_VAR_POPDEF([FLAGS])dnl +]) diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_cflags_warn_all.m4 b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_cflags_warn_all.m4 new file mode 100644 index 00000000000..fa9bf30e17f --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_cflags_warn_all.m4 @@ -0,0 +1,118 @@ +dnl @synopsis AX_CFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])] +dnl +dnl Try to find a compiler option that enables most reasonable +dnl warnings. This macro is directly derived from VL_PROG_CC_WARNINGS +dnl which is split up into two AX_CFLAGS_WARN_ALL and +dnl AX_CFLAGS_WARN_ALL_ANSI +dnl +dnl For the GNU CC compiler it will be -Wall (and -ansi -pedantic) The +dnl result is added to the shellvar being CFLAGS by default. +dnl +dnl Currently this macro knows about GCC, Solaris C compiler, Digital +dnl Unix C compiler, C for AIX Compiler, HP-UX C compiler, IRIX C +dnl compiler, NEC SX-5 (Super-UX 10) C compiler, and Cray J90 (Unicos +dnl 10.0.0.8) C compiler. +dnl +dnl - $1 shell-variable-to-add-to : CFLAGS +dnl - $2 add-value-if-not-found : nothing +dnl - $3 action-if-found : add value to shellvariable +dnl - $4 action-if-not-found : nothing +dnl +dnl @category C +dnl @author Guido Draheim <guidod@gmx.de> +dnl @version 2003-01-06 +dnl @license GPLWithACException + +AC_DEFUN([AX_CFLAGS_WARN_ALL],[dnl +AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl +AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_warn_all])dnl +AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings], +VAR,[VAR="no, unknown" + AC_LANG_SAVE + AC_LANG_C + ac_save_[]FLAGS="$[]FLAGS" +for ac_arg dnl +in "-pedantic % -Wall" dnl GCC + "-xstrconst % -v" dnl Solaris C + "-std1 % -verbose -w0 -warnprotos" dnl Digital Unix + "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX + "-ansi -ansiE % -fullwarn" dnl IRIX + "+ESlit % +w1" dnl HP-UX C + "-Xc % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10) + "-h conform % -h msglevel 2" dnl Cray C (Unicos) + # +do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` + AC_TRY_COMPILE([],[return 0;], + [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break]) +done + FLAGS="$ac_save_[]FLAGS" + AC_LANG_RESTORE +]) +case ".$VAR" in + .ok|.ok,*) m4_ifvaln($3,$3) ;; + .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[ + AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"]) + m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;; + *) m4_ifvaln($3,$3,[ + if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null + then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR]) + else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"]) + m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR" + fi ]) ;; +esac +AS_VAR_POPDEF([VAR])dnl +AS_VAR_POPDEF([FLAGS])dnl +]) + +dnl the only difference - the LANG selection... and the default FLAGS + +AC_DEFUN([AX_CXXFLAGS_WARN_ALL],[dnl +AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl +AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_warn_all])dnl +AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings], +VAR,[VAR="no, unknown" + AC_LANG_SAVE + AC_LANG_CXX + ac_save_[]FLAGS="$[]FLAGS" +for ac_arg dnl +in "-pedantic % -Wall" dnl GCC + "-xstrconst % -v" dnl Solaris C + "-std1 % -verbose -w0 -warnprotos" dnl Digital Unix + "-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX + "-ansi -ansiE % -fullwarn" dnl IRIX + "+ESlit % +w1" dnl HP-UX C + "-Xc % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10) + "-h conform % -h msglevel 2" dnl Cray C (Unicos) + # +do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` + AC_TRY_COMPILE([],[return 0;], + [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break]) +done + FLAGS="$ac_save_[]FLAGS" + AC_LANG_RESTORE +]) +case ".$VAR" in + .ok|.ok,*) m4_ifvaln($3,$3) ;; + .|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[ + AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"]) + m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;; + *) m4_ifvaln($3,$3,[ + if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null + then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR]) + else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"]) + m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR" + fi ]) ;; +esac +AS_VAR_POPDEF([VAR])dnl +AS_VAR_POPDEF([FLAGS])dnl +]) + +dnl implementation tactics: +dnl the for-argument contains a list of options. The first part of +dnl these does only exist to detect the compiler - usually it is +dnl a global option to enable -ansi or -extrawarnings. All other +dnl compilers will fail about it. That was needed since a lot of +dnl compilers will give false positives for some option-syntax +dnl like -Woption or -Xoption as they think of it is a pass-through +dnl to later compile stages or something. The "%" is used as a +dnl delimimiter. A non-option comment can be given after "%%" marks. diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_create_pkgconfig_info.m4 b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_create_pkgconfig_info.m4 new file mode 100644 index 00000000000..7cf6c2c6ca3 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_create_pkgconfig_info.m4 @@ -0,0 +1,312 @@ +dnl @synopsis AX_CREATE_PKGCONFIG_INFO [(outputfile, [requires [,libs [,summary [,cflags [, ldflags]]]]])] +dnl +dnl defaults: +dnl +dnl $1 = $PACKAGE_NAME.pc +dnl $2 = (empty) +dnl $3 = $PACKAGE_LIBS $LIBS (as set at that point in configure.ac) +dnl $4 = $PACKAGE_SUMMARY (or $1 Library) +dnl $5 = $CPPFLAGS $PACKAGE_CFLAGS (as set at the point in configure.ac) +dnl $6 = $LDFLAGS $PACKAGE_LDFLAGS (as set at the point in configure.ac) +dnl +dnl PACKAGE_NAME defaults to $PACKAGE if not set. +dnl PACKAGE_LIBS defaults to -l$PACKAGE_NAME if not set. +dnl +dnl the resulting file is called $PACKAGE.pc.in / $PACKAGE.pc +dnl +dnl You will find this macro most useful in conjunction with +dnl ax_spec_defaults that can read good initializers from the .spec +dnl file. In consequencd, most of the generatable installable stuff can +dnl be made from information being updated in a single place for the +dnl whole project. +dnl +dnl @category InstalledPackages +dnl @author Sven Verdoolaege <skimo*liacs.nl> +dnl @author Guido Draheim <guidod@gmx.de> +dnl @version 2003-10-19 +dnl @license GPLWithACException + +AC_DEFUN([AX_CREATE_PKGCONFIG_INFO],[dnl +AS_VAR_PUSHDEF([PKGCONFIG_suffix],[ax_create_pkgconfig_suffix])dnl +AS_VAR_PUSHDEF([PKGCONFIG_libdir],[ax_create_pkgconfig_libdir])dnl +AS_VAR_PUSHDEF([PKGCONFIG_libfile],[ax_create_pkgconfig_libfile])dnl +AS_VAR_PUSHDEF([PKGCONFIG_libname],[ax_create_pkgconfig_libname])dnl +AS_VAR_PUSHDEF([PKGCONFIG_version],[ax_create_pkgconfig_version])dnl +AS_VAR_PUSHDEF([PKGCONFIG_description],[ax_create_pkgconfig_description])dnl +AS_VAR_PUSHDEF([PKGCONFIG_requires],[ax_create_pkgconfig_requires])dnl +AS_VAR_PUSHDEF([PKGCONFIG_pkglibs],[ax_create_pkgconfig_pkglibs])dnl +AS_VAR_PUSHDEF([PKGCONFIG_libs],[ax_create_pkgconfig_libs])dnl +AS_VAR_PUSHDEF([PKGCONFIG_ldflags],[ax_create_pkgconfig_ldflags])dnl +AS_VAR_PUSHDEF([PKGCONFIG_cppflags],[ax_create_pkgconfig_cppflags])dnl +AS_VAR_PUSHDEF([PKGCONFIG_generate],[ax_create_pkgconfig_generate])dnl +AS_VAR_PUSHDEF([PKGCONFIG_src_libdir],[ax_create_pkgconfig_src_libdir])dnl +AS_VAR_PUSHDEF([PKGCONFIG_src_headers],[ax_create_pkgconfig_src_headers])dnl + +# we need the expanded forms... +test "x$prefix" = xNONE && prefix=$ac_default_prefix +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +AC_MSG_CHECKING(our pkgconfig libname) +test ".$PKGCONFIG_libname" != "." || \ +PKGCONFIG_libname="ifelse($1,,${PACKAGE_NAME},`basename $1 .pc`)" +test ".$PKGCONFIG_libname" != "." || \ +PKGCONFIG_libname="$PACKAGE" +PKGCONFIG_libname=`eval echo "$PKGCONFIG_libname"` +PKGCONFIG_libname=`eval echo "$PKGCONFIG_libname"` +AC_MSG_RESULT($PKGCONFIG_libname) + +AC_MSG_CHECKING(our pkgconfig version) +test ".$PKGCONFIG_version" != "." || \ +PKGCONFIG_version="${PACKAGE_VERSION}" +test ".$PKGCONFIG_version" != "." || \ +PKGCONFIG_version="$VERSION" +PKGCONFIG_version=`eval echo "$PKGCONFIG_version"` +PKGCONFIG_version=`eval echo "$PKGCONFIG_version"` +AC_MSG_RESULT($PKGCONFIG_version) + +AC_MSG_CHECKING(our pkgconfig_libdir) +test ".$pkgconfig_libdir" = "." && \ +pkgconfig_libdir='${libdir}/pkgconfig' +PKGCONFIG_libdir=`eval echo "$pkgconfig_libdir"` +PKGCONFIG_libdir=`eval echo "$PKGCONFIG_libdir"` +PKGCONFIG_libdir=`eval echo "$PKGCONFIG_libdir"` +AC_MSG_RESULT($pkgconfig_libdir) +test "$pkgconfig_libdir" != "$PKGCONFIG_libdir" && ( +AC_MSG_RESULT(expanded our pkgconfig_libdir... $PKGCONFIG_libdir)) +AC_SUBST([pkgconfig_libdir]) + +AC_MSG_CHECKING(our pkgconfig_libfile) +test ".$pkgconfig_libfile" != "." || \ +pkgconfig_libfile="ifelse($1,,$PKGCONFIG_libname.pc,`basename $1`)" +PKGCONFIG_libfile=`eval echo "$pkgconfig_libfile"` +PKGCONFIG_libfile=`eval echo "$PKGCONFIG_libfile"` +AC_MSG_RESULT($pkgconfig_libfile) +test "$pkgconfig_libfile" != "$PKGCONFIG_libfile" && ( +AC_MSG_RESULT(expanded our pkgconfig_libfile... $PKGCONFIG_libfile)) +AC_SUBST([pkgconfig_libfile]) + +AC_MSG_CHECKING(our package / suffix) +PKGCONFIG_suffix="$program_suffix" +test ".$PKGCONFIG_suffix" != .NONE || PKGCONFIG_suffix="" +AC_MSG_RESULT(${PACKAGE_NAME} / ${PKGCONFIG_suffix}) + +AC_MSG_CHECKING(our pkgconfig description) +PKGCONFIG_description="ifelse($4,,$PACKAGE_SUMMARY,$4)" +test ".$PKGCONFIG_description" != "." || \ +PKGCONFIG_description="$PKGCONFIG_libname Library" +PKGCONFIG_description=`eval echo "$PKGCONFIG_description"` +PKGCONFIG_description=`eval echo "$PKGCONFIG_description"` +AC_MSG_RESULT($PKGCONFIG_description) + +AC_MSG_CHECKING(our pkgconfig requires) +PKGCONFIG_requires="ifelse($2,,$PACKAGE_REQUIRES,$2)" +PKGCONFIG_requires=`eval echo "$PKGCONFIG_requires"` +PKGCONFIG_requires=`eval echo "$PKGCONFIG_requires"` +AC_MSG_RESULT($PKGCONFIG_requires) + +AC_MSG_CHECKING(our pkgconfig ext libs) +PKGCONFIG_pkglibs="$PACKAGE_LIBS" +test ".$PKGCONFIG_pkglibs" != "." || PKGCONFIG_pkglibs="-l$PKGCONFIG_libname" +PKGCONFIG_libs="ifelse($3,,$PKGCONFIG_pkglibs $LIBS,$3)" +PKGCONFIG_libs=`eval echo "$PKGCONFIG_libs"` +PKGCONFIG_libs=`eval echo "$PKGCONFIG_libs"` +AC_MSG_RESULT($PKGCONFIG_libs) + +AC_MSG_CHECKING(our pkgconfig cppflags) +PKGCONFIG_cppflags="ifelse($5,,$CPPFLAGS $PACKAGE_CFLAGS,$5)" +PKGCONFIG_cppflags=`eval echo "$PKGCONFIG_cppflags"` +PKGCONFIG_cppflags=`eval echo "$PKGCONFIG_cppflags"` +AC_MSG_RESULT($PKGCONFIG_cppflags) + +AC_MSG_CHECKING(our pkgconfig ldflags) +PKGCONFIG_ldflags="ifelse($6,,$LDFLAGS $PACKAGE_LDFLAGS,$5)" +PKGCONFIG_ldflags=`eval echo "$PKGCONFIG_ldflags"` +PKGCONFIG_ldflags=`eval echo "$PKGCONFIG_ldflags"` +AC_MSG_RESULT($PKGCONFIG_ldflags) + +test ".$PKGCONFIG_generate" != "." || \ +PKGCONFIG_generate="ifelse($1,,$PKGCONFIG_libname.pc,$1)" +PKGCONFIG_generate=`eval echo "$PKGCONFIG_generate"` +PKGCONFIG_generate=`eval echo "$PKGCONFIG_generate"` +test "$pkgconfig_libfile" != "$PKGCONFIG_generate" && ( +AC_MSG_RESULT(generate the pkgconfig later... $PKGCONFIG_generate)) + +if test ".$PKGCONFIG_src_libdir" = "." ; then +PKGCONFIG_src_libdir=`pwd` +PKGCONFIG_src_libdir=`AS_DIRNAME("$PKGCONFIG_src_libdir/$PKGCONFIG_generate")` +test ! -d $PKGCONFIG_src_libdir/src || \ +PKGCONFIG_src_libdir="$PKGCONFIG_src_libdir/src" +case ".$objdir" in +*libs) PKGCONFIG_src_libdir="$PKGCONFIG_src_libdir/$objdir" ;; esac +AC_MSG_RESULT(noninstalled pkgconfig -L $PKGCONFIG_src_libdir) +fi + +if test ".$PKGCONFIG_src_headers" = "." ; then +PKGCONFIG_src_headers=`pwd` +v="$ac_top_srcdir" ; +test ".$v" != "." || v="$ax_spec_dir" +test ".$v" != "." || v="$srcdir" +case "$v" in /*) PKG_CONFIG_src_headers="" ;; esac +PKGCONFIG_src_headers=`AS_DIRNAME("$PKGCONFIG_src_headers/$v/x")` +test ! -d $PKGCONFIG_src_headers/incl[]ude || \ +PKGCONFIG_src_headers="$PKGCONFIG_src_headers/incl[]ude" +AC_MSG_RESULT(noninstalled pkgconfig -I $PKGCONFIG_src_headers) +fi + + +dnl AC_CONFIG_COMMANDS crap disallows to use $PKGCONFIG_libfile here... +AC_CONFIG_COMMANDS([$ax_create_pkgconfig_generate],[ +pkgconfig_generate="$ax_create_pkgconfig_generate" +if test ! -f "$pkgconfig_generate.in" +then generate="true" +elif grep ' generated by configure ' $pkgconfig_generate.in >/dev/null +then generate="true" +else generate="false"; +fi +if $generate ; then +AC_MSG_NOTICE(creating $pkgconfig_generate.in) +cat > $pkgconfig_generate.in <<AXEOF +# generated by configure / remove this line to disable regeneration +prefix=@prefix@ +exec_prefix=@exec_prefix@ +bindir=@bindir@ +libdir=@libdir@ +datadir=@datadir@ +sysconfdir=@sysconfdir@ +includedir=@includedir@ +package=@PACKAGE@ +suffix=@suffix@ + +Name: @PACKAGE_NAME@ +Description: @PACKAGE_DESCRIPTION@ +Version: @PACKAGE_VERSION@ +Requires: @PACKAGE_REQUIRES@ +Libs: -L\${libdir} @LDFLAGS@ @LIBS@ +Cflags: -I\${includedir} @CPPFLAGS@ +AXEOF +fi # DONE generate $pkgconfig_generate.in +AC_MSG_NOTICE(creating $pkgconfig_generate) +cat >conftest.sed <<AXEOF +s|@prefix@|${pkgconfig_prefix}| +s|@exec_prefix@|${pkgconfig_execprefix}| +s|@bindir@|${pkgconfig_bindir}| +s|@libdir@|${pkgconfig_libdir}| +s|@datadir@|${pkgconfig_datadir}| +s|@sysconfdir@|${pkgconfig_sysconfdir}| +s|@includedir@|${pkgconfig_includedir}| +s|@suffix@|${pkgconfig_suffix}| +s|@PACKAGE@|${pkgconfig_package}| +s|@PACKAGE_NAME@|${pkgconfig_libname}| +s|@PACKAGE_DESCRIPTION@|${pkgconfig_description}| +s|@PACKAGE_VERSION@|${pkgconfig_version}| +s|@PACKAGE_REQUIRES@|${pkgconfig_requires}| +s|@LIBS@|${pkgconfig_libs}| +s|@LDFLAGS@|${pkgconfig_ldflags}| +s|@CPPFLAGS@|${pkgconfig_cppflags}| +AXEOF +sed -f conftest.sed $pkgconfig_generate.in > $pkgconfig_generate +if test ! -s $pkgconfig_generate ; then + AC_MSG_ERROR([$pkgconfig_generate is empty]) +fi ; rm conftest.sed # DONE generate $pkgconfig_generate +pkgconfig_uninstalled=`echo $pkgconfig_generate |sed 's/.pc$/-uninstalled.pc/'` +AC_MSG_NOTICE(creating $pkgconfig_uninstalled) +cat >conftest.sed <<AXEOF +s|@prefix@|${pkgconfig_prefix}| +s|@exec_prefix@|${pkgconfig_execprefix}| +s|@bindir@|${pkgconfig_bindir}| +s|@libdir@|${pkgconfig_src_libdir}| +s|@datadir@|${pkgconfig_datadir}| +s|@sysconfdir@|${pkgconfig_sysconfdir}| +s|@includedir@|${pkgconfig_src_headers}| +s|@suffix@|${pkgconfig_suffix}| +s|@PACKAGE@|${pkgconfig_package}| +s|@PACKAGE_NAME@|${pkgconfig_libname}| +s|@PACKAGE_DESCRIPTION@|${pkgconfig_description}| +s|@PACKAGE_VERSION@|${pkgconfig_version}| +s|@PACKAGE_REQUIRES@|${pkgconfig_requires}| +s|@LIBS@|${pkgconfig_libs}| +s|@LDFLAGS@|${pkgconfig_ldflags}| +s|@CPPFLAGS@|${pkgconfig_cppflags}| +AXEOF +sed -f conftest.sed $pkgconfig_generate.in > $pkgconfig_uninstalled +if test ! -s $pkgconfig_uninstalled ; then + AC_MSG_ERROR([$pkgconfig_uninstalled is empty]) +fi ; rm conftest.sed # DONE generate $pkgconfig_uninstalled + pkgconfig_requires_add=`echo ${pkgconfig_requires}` +if test ".$pkgconfig_requires_add" != "." ; then + pkgconfig_requires_add="pkg-config $pkgconfig_requires_add" + else pkgconfig_requires_add=":" ; fi +pkgconfig_uninstalled=`echo $pkgconfig_generate |sed 's/.pc$/-uninstalled.sh/'` +AC_MSG_NOTICE(creating $pkgconfig_uninstalled) +cat >conftest.sed <<AXEOF +s|@prefix@|\"${pkgconfig_prefix}\"| +s|@exec_prefix@|\"${pkgconfig_execprefix}\"| +s|@bindir@|\"${pkgconfig_bindir}\"| +s|@libdir@|\"${pkgconfig_src_libdir}\"| +s|@datadir@|\"${pkgconfig_datadir}\"| +s|@sysconfdir@|\"${pkgconfig_sysconfdir}\"| +s|@includedir@|\"${pkgconfig_src_headers}\"| +s|@suffix@|\"${pkgconfig_suffix}\"| +s|@PACKAGE@|\"${pkgconfig_package}\"| +s|@PACKAGE_NAME@|\"${pkgconfig_libname}\"| +s|@PACKAGE_DESCRIPTION@|\"${pkgconfig_description}\"| +s|@PACKAGE_VERSION@|\"${pkgconfig_version}\"| +s|@PACKAGE_REQUIRES@|\"${pkgconfig_requires}\"| +s|@LIBS@|\"${pkgconfig_libs}\"| +s|@LDFLAGS@|\"${pkgconfig_ldflags}\"| +s|@CPPFLAGS@|\"${pkgconfig_cppflags}\"| +s>Name:>for option\\; do case \"\$option\" in --list-all|--name) echo > +s>Description: *>\\;\\; --help) pkg-config --help \\; echo Buildscript Of > +s>Version: *>\\;\\; --modversion|--version) echo > +s>Requires:>\\;\\; --requires) echo $pkgconfig_requires_add> +s>Libs: *>\\;\\; --libs) echo > +s>Cflags: *>\\;\\; --cflags) echo > +/--libs)/a\\ + $pkgconfig_requires_add +/--cflags)/a\\ + $pkgconfig_requires_add\\ +;; --variable=*) eval echo '\$'\`echo \$option | sed -e 's/.*=//'\`\\ +;; --uninstalled) exit 0 \\ +;; *) ;; esac done +AXEOF +sed -f conftest.sed $pkgconfig_generate.in > $pkgconfig_uninstalled +if test ! -s $pkgconfig_uninstalled ; then + AC_MSG_ERROR([$pkgconfig_uninstalled is empty]) +fi ; rm conftest.sed # DONE generate $pkgconfig_uninstalled +],[ +dnl AC_CONFIG_COMMANDS crap, the AS_PUSHVAR defines are invalid here... +ax_create_pkgconfig_generate="$ax_create_pkgconfig_generate" +pkgconfig_prefix='$prefix' +pkgconfig_execprefix='$exec_prefix' +pkgconfig_bindir='$bindir' +pkgconfig_libdir='$libdir' +pkgconfig_includedir='$includedir' +pkgconfig_datadir='$datadir' +pkgconfig_sysconfdir='$sysconfdir' +pkgconfig_suffix='$ax_create_pkgconfig_suffix' +pkgconfig_package='$PACKAGE_NAME' +pkgconfig_libname='$ax_create_pkgconfig_libname' +pkgconfig_description='$ax_create_pkgconfig_description' +pkgconfig_version='$ax_create_pkgconfig_version' +pkgconfig_requires='$ax_create_pkgconfig_requires' +pkgconfig_libs='$ax_create_pkgconfig_libs' +pkgconfig_ldflags='$ax_create_pkgconfig_ldflags' +pkgconfig_cppflags='$ax_create_pkgconfig_cppflags' +pkgconfig_src_libdir='$ax_create_pkgconfig_src_libdir' +pkgconfig_src_headers='$ax_create_pkgconfig_src_headers' +])dnl +AS_VAR_POPDEF([PKGCONFIG_suffix])dnl +AS_VAR_POPDEF([PKGCONFIG_libdir])dnl +AS_VAR_POPDEF([PKGCONFIG_libfile])dnl +AS_VAR_POPDEF([PKGCONFIG_libname])dnl +AS_VAR_POPDEF([PKGCONFIG_version])dnl +AS_VAR_POPDEF([PKGCONFIG_description])dnl +AS_VAR_POPDEF([PKGCONFIG_requires])dnl +AS_VAR_POPDEF([PKGCONFIG_pkglibs])dnl +AS_VAR_POPDEF([PKGCONFIG_libs])dnl +AS_VAR_POPDEF([PKGCONFIG_ldflags])dnl +AS_VAR_POPDEF([PKGCONFIG_cppflags])dnl +AS_VAR_POPDEF([PKGCONFIG_generate])dnl +AS_VAR_POPDEF([PKGCONFIG_src_libdir])dnl +AS_VAR_POPDEF([PKGCONFIG_src_headers])dnl +]) diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_enable_builddir_uname.m4 b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_enable_builddir_uname.m4 new file mode 100644 index 00000000000..4e795fc8274 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_enable_builddir_uname.m4 @@ -0,0 +1,160 @@ +dnl @synopsis AX_ENABLE_BUILDDIR_UNAME [(dirstring-or-command [,Makefile.mk])] +dnl +dnl if the current configure was run within the srcdir then we move all +dnl configure-files into a subdir and let the configure steps continue +dnl there. We provide an option --disable-builddir to suppress the move +dnl into a separate builddir. +dnl +dnl Defaults: +dnl +dnl $1 = $build (defaults to `uname -msr`.d) +dnl $2 = Makefile.mk +dnl $3 = -all +dnl +dnl This macro must be called before AM_INIT_AUTOMAKE. +dnl +dnl it creates a default toplevel srcdir Makefile from the information +dnl found in the created toplevel builddir Makefile. It just copies the +dnl variables and rule-targets, each extended with a default +dnl rule-execution that recurses into the build directory of the +dnl current "BUILD". You can override the auto-dection through +dnl `uname -msr | tr " /" "__"`.d at build-time of course, as in +dnl +dnl make BUILD=i386-mingw-cross +dnl +dnl After the default has been created, additional rules can be +dnl appended that will not just recurse into the subdirectories and +dnl only ever exist in the srcdir toplevel makefile - these parts are +dnl read from the $2 = Makefile.mk file +dnl +dnl The automatic rules are usually scanning the toplevel Makefile for +dnl lines like '#### $build |$builddir' to recognize the place where to +dnl recurse into. Usually, the last one is the only one used. However, +dnl almost all targets have an additional "*-all" rule which makes the +dnl script to recurse into _all_ variants of the current BUILD (!!) +dnl setting. The "-all" suffix can be overriden for the macro as well. +dnl +dnl a special rule is only given for things like "dist" that will copy +dnl the tarball from the builddir to the sourcedir (or $(PUB)) for +dnl reason of convenience. +dnl +dnl @category Misc +dnl @author Guido U. Draheim +dnl @version 2005-12-03 +dnl @license GPLWithACException + +AC_DEFUN([AX_ENABLE_BUILDDIR_UNAME],[AC_REQUIRE([AC_CANONICAL_HOST])[]dnl +AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl +AS_VAR_PUSHDEF([SUB],[ax_enable_builddir])dnl +AS_VAR_PUSHDEF([SED],[ax_enable_builddir_sed])dnl +SUB="." +AC_ARG_ENABLE([builddir], AC_HELP_STRING( + [--disable-builddir],[disable automatic build in subdir of sources]) + ,[SUB="$enableval"], [SUB="yes"]) +if test ".$ac_srcdir_defaulted" != ".no" ; then +if test ".$srcdir" = ".." ; then + if test -f config.status ; then + AC_MSG_NOTICE(toplevel srcdir already configured... skipping subdir build) + else + test ".$SUB" = "." && SUB="." + test ".$SUB" = ".no" && SUB="." + test ".$BUILD" = "." && BUILD=`uname -msr | tr " /" "__"`.d + test ".$SUB" = ".yes" && SUB="m4_ifval([$1], [$1],[$BUILD])" + if test ".$SUB" != ".." ; then # we know where to go and + AS_MKDIR_P([$SUB]) + echo __.$SUB.__ > $SUB/conftest.tmp + cd $SUB + if grep __.$SUB.__ conftest.tmp >/dev/null 2>/dev/null ; then + rm conftest.tmp + AC_MSG_RESULT([continue configure in default builddir "./$SUB"]) + else + AC_MSG_ERROR([could not change to default builddir "./$SUB"]) + fi + srcdir=`echo "$SUB" | + sed -e 's,^\./,,;s,[[^/]]$,&/,;s,[[^/]]*/,../,g;s,[[/]]$,,;'` + # going to restart from subdirectory location + test -f $srcdir/config.log && mv $srcdir/config.log . + test -f $srcdir/confdefs.h && mv $srcdir/confdefs.h . + test -f $srcdir/conftest.log && mv $srcdir/conftest.log . + test -f $srcdir/$cache_file && mv $srcdir/$cache_file . + AC_MSG_RESULT(....exec $SHELL $srcdir/[$]0 "--srcdir=$srcdir" "--enable-builddir=$SUB" ${1+"[$]@"}) + case "[$]0" in # restart + [/\\]) exec $SHELL [$]0 "--srcdir=$srcdir" "--enable-builddir=$SUB" ${1+"[$]@"} ;; + *) exec $SHELL $srcdir/[$]0 "--srcdir=$srcdir" "--enable-builddir=$SUB" ${1+"[$]@"} ;; + esac + fi + fi +fi fi +dnl ac_path_prog uses "set dummy" to override $@ which would defeat the "exec" +AC_PATH_PROG(SED,gsed sed, sed) +AS_VAR_POPDEF([SED])dnl +AS_VAR_POPDEF([SUB])dnl +AC_CONFIG_COMMANDS([buildir],[dnl .............. config.status .............. +AS_VAR_PUSHDEF([SUB],[ax_enable_builddir])dnl +AS_VAR_PUSHDEF([TOP],[top_srcdir])dnl +AS_VAR_PUSHDEF([SRC],[ac_top_srcdir])dnl +AS_VAR_PUSHDEF([SED],[ax_enable_builddir_sed])dnl +pushdef([END],[Makefile.mk])dnl + SRC="$ax_enable_builddir_srcdir" + if test ".$SUB" = "." ; then + if test -f "$TOP/Makefile" ; then + AC_MSG_NOTICE([skipping TOP/Makefile - left untouched]) + else + AC_MSG_NOTICE([skipping TOP/Makefile - not created]) + fi + else + AC_MSG_NOTICE([create TOP/Makefile guessed from local Makefile]) + x='`' ; cat >$tmp/conftemp.sed <<_EOF +/^\$/n +x +/^\$/bS +x +/\\\\\$/{H;d;} +{H;s/.*//;x;} +bM +:S +x +/\\\\\$/{h;d;} +{h;s/.*//;x;} +:M +s/\\(\\n\\) /\\1 /g +/^ /d +/^[[ ]]*[[\\#]]/d +/^VPATH *=/d +s/^srcdir *=.*/srcdir = ./ +s/^top_srcdir *=.*/top_srcdir = ./ +/[[:=]]/!d +/^\\./d +s/:.*/:/ +/:\$/s/ / /g +/:\$/s/ / /g +/^.*[[=]]/!s%\$% ; (cd \$(BUILD) \\&\\& \$(ISNOTSRCDIR) \\&\\& \$(MAKE) "\$\@") || exit ; \$(MAKE) done "RULE=\$\@"% +_EOF + test ".$USE_MAINTAINER_MODE" = ".no" || \ + cp "$tmp/conftemp.sed" "$SRC/makefile.sed~" ## DEBUGGING + echo 'BUILD=`uname -msr | tr " /" "__"`.d' >$SRC/Makefile + echo 'ISNOTSRCDIR=test ! -f configure' >>$SRC/Makefile + $SED -f $tmp/conftemp.sed Makefile >>$SRC/Makefile + echo 'done: ;@ if grep "$(RULE)-done .*:" Makefile > /dev/null; then dnl + echo $(MAKE) $(RULE)-done ; $(MAKE) $(RULE)-done ; else true ; fi' dnl + >> $SRC/Makefile + if test -f "$SRC/m4_ifval([$2],[$2],[END])" ; then + AC_MSG_NOTICE([extend TOP/Makefile with TOP/m4_ifval([$2],[$2],[END])]) + cat $SRC/END >>$SRC/Makefile + fi + AC_MSG_NOTICE([make uses BUILD=$SUB (on $ax_enable_builddir_host:)]) + fi +popdef([END])dnl +AS_VAR_POPDEF([SED])dnl +AS_VAR_POPDEF([SRC])dnl +AS_VAR_POPDEF([TOP])dnl +AS_VAR_POPDEF([SUB])dnl +],[dnl +ax_enable_builddir_srcdir="$srcdir" # $srcdir +ax_enable_builddir_host="$HOST" # $HOST / $host +ax_enable_builddir_version="$VERSION" # $VERSION +ax_enable_builddir_package="$PACKAGE" # $PACKAGE +ax_enable_builddir_sed="$ax_enable_builddir_sed" # $SED +ax_enable_builddir="$ax_enable_builddir" # $SUB +])dnl +]) diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_expand_prefix.m4 b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_expand_prefix.m4 new file mode 100644 index 00000000000..95407ce99e2 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_expand_prefix.m4 @@ -0,0 +1,33 @@ +dnl @synopsis AX_EXPAND_PREFIX +dnl +dnl when $prefix and $exec_prefix are still set to NONE then set them +dnl to the usual default values - being based on $ac_default_prefix. - +dnl this macro can be AC_REQUIREd by other macros that need to compute +dnl values for installation directories. It has been observed that it +dnl was done wrong over and over again, so this is a bit more safe to +dnl do. +dnl +dnl remember - setting exec_prefix='${prefix}' needs you interpolate +dnl directories multiple times, it is not sufficient to just say +dnl MYVAR="${datadir}/putter" but you do have to run `eval` a few +dnl times, sth. like MYVAR=`eval "echo \"$MYVAR\""` done atleast two +dnl times. +dnl +dnl The implementation of this macro simply picks up the lines that +dnl would be run at the start of AC_OUTPUT anyway to set the +dnl prefix/exec_prefix defaults. Between AC_INIT and the first command +dnl to AC_REQUIRE this macro you can set the two variables to something +dnl explicit instead. Probably, any command to compute installation +dnl directories should be run _after_ AM_INIT_AUTOMAKE +dnl +dnl @category Misc +dnl @author Guido Draheim <guidod@gmx.de> +dnl @version 2005-01-21 +dnl @license GPLWithACException + +AC_DEFUN([AX_EXPAND_PREFIX],[dnl + # The prefix default can be set in configure.ac (otherwise it is /usr/local) + test "x$prefix" = xNONE && prefix=$ac_default_prefix + # Let make expand exec_prefix. Allows to override the makevar 'prefix' later + test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +]) diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_maintainer_mode_auto_silent.m4 b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_maintainer_mode_auto_silent.m4 new file mode 100644 index 00000000000..de6c41ec04c --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_maintainer_mode_auto_silent.m4 @@ -0,0 +1,38 @@ +dnl @synopsis AX_MAINTAINER_MODE_AUTO_SILENT +dnl +dnl Set autotools to error/sleep settings so that they are not run when +dnl being errornously triggered. Likewise make libtool-silent when +dnl libtool has been used. +dnl +dnl I am using the macro quite a lot since some automake versions had +dnl the tendency to try to rerun some autotools on a mere make even +dnl when not quite in --maintainer-mode. That is very annoying. +dnl Likewise, a user who installs from source does not want to see +dnl doubled compiler messages. +dnl +dnl I did not put an AC-REQUIRE(MAINTAINER_MODE) in here - should I? +dnl +dnl @category Misc +dnl @category Automake +dnl @author Guido Draheim <guidod@gmx.de> +dnl @version 2005-01-21 +dnl @license GPLWithACException + +AC_DEFUN([AX_MAINTAINER_MODE_AUTO_SILENT],[dnl +dnl ac_REQUIRE([am_MAINTAINER_MODE])dn +AC_MSG_CHECKING(auto silent in maintainer mode) +if test "$USE_MAINTAINER_MODE" = "no" ; then + test ".$TIMEOUT" = "." && TIMEOUT="9" + AUTOHEADER="sleep $TIMEOUT ; true || autoheader || skipped" + AUTOMAKE="sleep $TIMEOUT ; true || automake || skipped" + AUTOCONF="sleep $TIMEOUT ; true || autoconf || skipped" + if test ".$LIBTOOL" != "." ; then + LIBTOOL="$LIBTOOL --silent" + AC_MSG_RESULT([libtool-silent, auto-sleep-9]) + else + AC_MSG_RESULT([auto-sleep-9]) + fi +else + AC_MSG_RESULT([no]) +fi +]) diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_not_enable_frame_pointer.m4 b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_not_enable_frame_pointer.m4 new file mode 100644 index 00000000000..94be736537b --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_not_enable_frame_pointer.m4 @@ -0,0 +1,31 @@ + +dnl ______ /usr/share/aclocal/guidod/ax_not_enable_frame_pointer.m4 ______ +dnl @synopsis AX_NOT_ENABLE_FRAME_POINTER ([shellvar]) +dnl +dnl add --enable-frame-pointer option, the default will add the gcc +dnl --fomit-frame-pointer option to the shellvar (per default CFLAGS) +dnl and remove the " -g " debuginfo option from it. In other words, +dnl the default is "--disable-frame-pointer" +dnl +dnl @author guidod@gmx.de +dnl @version 2004-11-30 + +AC_DEFUN([AX_NOT_ENABLE_FRAME_POINTER],[dnl +AS_VAR_PUSHDEF([VAR],[enable_frame_pointer])dnl +AC_MSG_CHECKING([m4_ifval($1,$1,CFLAGS) frame-pointer]) +AC_ARG_ENABLE([frame-pointer], AC_HELP_STRING( + [--enable-frame-pointer],[enable callframe generation for debugging])) +case ".$VAR" in + .|.no|.no,*) test ".$VAR" = "." && VAR="no" + m4_ifval($1,$1,CFLAGS)=`echo dnl + " $m4_ifval($1,$1,CFLAGS) " | sed -e 's/ -g / /'` + if test ".$GCC" = ".yes" ; then + m4_ifval($1,$1,CFLAGS)="$m4_ifval($1,$1,CFLAGS) -fomit-frame-pointer" + AC_MSG_RESULT([$VAR, -fomit-frame-pointer added]) + else + AC_MSG_RESULT([$VAR, -g removed]) + fi ;; + *) AC_MSG_RESULT([$VAR, kept]) ;; +esac +AS_VAR_POPDEF([VAR])dnl +]) diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_prefix_config_h.m4 b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_prefix_config_h.m4 new file mode 100644 index 00000000000..efd8bad52f8 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_prefix_config_h.m4 @@ -0,0 +1,171 @@ +dnl @synopsis AX_PREFIX_CONFIG_H [(OUTPUT-HEADER [,PREFIX [,ORIG-HEADER]])] +dnl +dnl This is a new variant from ac_prefix_config_ this one will use a +dnl lowercase-prefix if the config-define was starting with a +dnl lowercase-char, e.g. "#define const", "#define restrict", or +dnl "#define off_t", (and this one can live in another directory, e.g. +dnl testpkg/config.h therefore I decided to move the output-header to +dnl be the first arg) +dnl +dnl takes the usual config.h generated header file; looks for each of +dnl the generated "#define SOMEDEF" lines, and prefixes the defined +dnl name (ie. makes it "#define PREFIX_SOMEDEF". The result is written +dnl to the output config.header file. The PREFIX is converted to +dnl uppercase for the conversions. +dnl +dnl Defaults: +dnl +dnl OUTPUT-HEADER = $PACKAGE-config.h +dnl PREFIX = $PACKAGE +dnl ORIG-HEADER, from AM_CONFIG_HEADER(config.h) +dnl +dnl Your configure.ac script should contain both macros in this order, +dnl and unlike the earlier variations of this prefix-macro it is okay +dnl to place the AX_PREFIX_CONFIG_H call before the AC_OUTPUT +dnl invokation. +dnl +dnl Example: +dnl +dnl AC_INIT(config.h.in) # config.h.in as created by "autoheader" +dnl AM_INIT_AUTOMAKE(testpkg, 0.1.1) # makes #undef VERSION and PACKAGE +dnl AM_CONFIG_HEADER(config.h) # prep config.h from config.h.in +dnl AX_PREFIX_CONFIG_H(mylib/_config.h) # prep mylib/_config.h from it.. +dnl AC_MEMORY_H # makes "#undef NEED_MEMORY_H" +dnl AC_C_CONST_H # makes "#undef const" +dnl AC_OUTPUT(Makefile) # creates the "config.h" now +dnl # and also mylib/_config.h +dnl +dnl if the argument to AX_PREFIX_CONFIG_H would have been omitted then +dnl the default outputfile would have been called simply +dnl "testpkg-config.h", but even under the name "mylib/_config.h" it +dnl contains prefix-defines like +dnl +dnl #ifndef TESTPKG_VERSION +dnl #define TESTPKG_VERSION "0.1.1" +dnl #endif +dnl #ifndef TESTPKG_NEED_MEMORY_H +dnl #define TESTPKG_NEED_MEMORY_H 1 +dnl #endif +dnl #ifndef _testpkg_const +dnl #define _testpkg_const _const +dnl #endif +dnl +dnl and this "mylib/_config.h" can be installed along with other +dnl header-files, which is most convenient when creating a shared +dnl library (that has some headers) where some functionality is +dnl dependent on the OS-features detected at compile-time. No need to +dnl invent some "mylib-confdefs.h.in" manually. :-) +dnl +dnl Note that some AC_DEFINEs that end up in the config.h file are +dnl actually self-referential - e.g. AC_C_INLINE, AC_C_CONST, and the +dnl AC_TYPE_OFF_T say that they "will define inline|const|off_t if the +dnl system does not do it by itself". You might want to clean up about +dnl these - consider an extra mylib/conf.h that reads something like: +dnl +dnl #include <mylib/_config.h> +dnl #ifndef _testpkg_const +dnl #define _testpkg_const const +dnl #endif +dnl +dnl and then start using _testpkg_const in the header files. That is +dnl also a good thing to differentiate whether some library-user has +dnl starting to take up with a different compiler, so perhaps it could +dnl read something like this: +dnl +dnl #ifdef _MSC_VER +dnl #include <mylib/_msvc.h> +dnl #else +dnl #include <mylib/_config.h> +dnl #endif +dnl #ifndef _testpkg_const +dnl #define _testpkg_const const +dnl #endif +dnl +dnl @category Misc +dnl @author Guido Draheim <guidod@gmx.de> +dnl @version 2003-07-03 +dnl @license GPLWithACException +AC_DEFUN([AX_PREFIX_CONFIG_H],[AC_REQUIRE([AC_CONFIG_HEADER]) +AC_CONFIG_COMMANDS([ifelse($1,,$PACKAGE-config.h,$1)],[dnl +AS_VAR_PUSHDEF([_OUT],[ac_prefix_conf_OUT])dnl +AS_VAR_PUSHDEF([_DEF],[ac_prefix_conf_DEF])dnl +AS_VAR_PUSHDEF([_PKG],[ac_prefix_conf_PKG])dnl +AS_VAR_PUSHDEF([_LOW],[ac_prefix_conf_LOW])dnl +AS_VAR_PUSHDEF([_UPP],[ac_prefix_conf_UPP])dnl +AS_VAR_PUSHDEF([_INP],[ac_prefix_conf_INP])dnl +m4_pushdef([_script],[conftest.prefix])dnl +m4_pushdef([_symbol],[m4_cr_Letters[]m4_cr_digits[]_])dnl +_OUT=`echo ifelse($1, , $PACKAGE-config.h, $1)` +_DEF=`echo _$_OUT | sed -e "y:m4_cr_letters:m4_cr_LETTERS[]:" -e "s/@<:@^m4_cr_Letters@:>@/_/g"` +_PKG=`echo ifelse($2, , $PACKAGE, $2)` +_LOW=`echo _$_PKG | sed -e "y:m4_cr_LETTERS-:m4_cr_letters[]_:"` +_UPP=`echo $_PKG | sed -e "y:m4_cr_letters-:m4_cr_LETTERS[]_:" -e "/^@<:@m4_cr_digits@:>@/s/^/_/"` +_INP=`echo "ifelse($3,,,$3)" | sed -e 's/ *//'` +if test ".$_INP" = "."; then + for ac_file in : $CONFIG_HEADERS; do test "_$ac_file" = _: && continue + case "$ac_file" in + *.h) _INP=$ac_file ;; + *) + esac + test ".$_INP" != "." && break + done +fi +if test ".$_INP" = "."; then + case "$_OUT" in + */*) _INP=`basename "$_OUT"` + ;; + *-*) _INP=`echo "$_OUT" | sed -e "s/@<:@_symbol@:>@*-//"` + ;; + *) _INP=config.h + ;; + esac +fi +if test -z "$_PKG" ; then + AC_MSG_ERROR([no prefix for _PREFIX_PKG_CONFIG_H]) +else + if test ! -f "$_INP" ; then if test -f "$srcdir/$_INP" ; then + _INP="$srcdir/$_INP" + fi fi + AC_MSG_NOTICE(creating $_OUT - prefix $_UPP for $_INP defines) + if test -f $_INP ; then + echo "s/@%:@undef *\\(@<:@m4_cr_LETTERS[]_@:>@\\)/@%:@undef $_UPP""_\\1/" > _script + echo "s/@%:@undef *\\(@<:@m4_cr_letters@:>@\\)/@%:@undef $_LOW""_\\1/" >> _script + echo "s/@%:@def[]ine *\\(@<:@m4_cr_LETTERS[]_@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_UPP""_\\1 \\" >> _script + echo "@%:@def[]ine $_UPP""_\\1 \\2 \\" >> _script + echo "@%:@endif/" >>_script + echo "s/@%:@def[]ine *\\(@<:@m4_cr_letters@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_LOW""_\\1 \\" >> _script + echo "@%:@define $_LOW""_\\1 \\2 \\" >> _script + echo "@%:@endif/" >> _script + # now executing _script on _DEF input to create _OUT output file + echo "@%:@ifndef $_DEF" >$tmp/pconfig.h + echo "@%:@def[]ine $_DEF 1" >>$tmp/pconfig.h + echo ' ' >>$tmp/pconfig.h + echo /'*' $_OUT. Generated automatically at end of configure. '*'/ >>$tmp/pconfig.h + + sed -f _script $_INP >>$tmp/pconfig.h + echo ' ' >>$tmp/pconfig.h + echo '/* once:' $_DEF '*/' >>$tmp/pconfig.h + echo "@%:@endif" >>$tmp/pconfig.h + if cmp -s $_OUT $tmp/pconfig.h 2>/dev/null; then + AC_MSG_NOTICE([$_OUT is unchanged]) + else + ac_dir=`AS_DIRNAME(["$_OUT"])` + AS_MKDIR_P(["$ac_dir"]) + rm -f "$_OUT" + mv $tmp/pconfig.h "$_OUT" + fi + cp _script _configs.sed + else + AC_MSG_ERROR([input file $_INP does not exist - skip generating $_OUT]) + fi + rm -f conftest.* +fi +m4_popdef([_symbol])dnl +m4_popdef([_script])dnl +AS_VAR_POPDEF([_INP])dnl +AS_VAR_POPDEF([_UPP])dnl +AS_VAR_POPDEF([_LOW])dnl +AS_VAR_POPDEF([_PKG])dnl +AS_VAR_POPDEF([_DEF])dnl +AS_VAR_POPDEF([_OUT])dnl +],[PACKAGE="$PACKAGE"])]) diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_set_version_info.m4 b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_set_version_info.m4 new file mode 100644 index 00000000000..742b6c19772 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_set_version_info.m4 @@ -0,0 +1,178 @@ +dnl @synopsis AX_SET_VERSION_INFO [(VERSION [,PREFIX])] +dnl @synopsis default $1 = $PACKAGE_VERSION +dnl @synopsis default $2 = <none> +dnl +dnl This macro is the successor of AC_SET_RELEASEINFO_VERSIONINFO but +dnl it can be used in parallel because it uses all different variables. +dnl +dnl check the $VERSION number and cut the two last digit-sequences off +dnl which will form a -version-info in a @VERSION_INFO@ ac_subst while +dnl the rest is going to the -release name in a @RELEASE_INFO@ +dnl ac_subst. +dnl +dnl you should keep these two seperate - the release-name may contain +dnl alpha-characters and can be modified later with extra release-hints +dnl e.g. RELEASE_INFO="$RELEASE_INFO-debug" for a debug version of your +dnl lib. The $VERSION_INFO however should not be touched. +dnl +dnl example: a VERSION="2.4.18" will be transformed into +dnl +dnl RELEASE_INFO = -release 2 +dnl VERSION_INFO = -versioninfo 4:18 +dnl +dnl then use these two variables and push them to your libtool linker +dnl +dnl libtest_la_LIBADD = @RELEASE_INFO@ @VERSION_INFO@ +dnl +dnl and for a linux-target this will tell libtool to install the lib as +dnl +dnl libmy.so libmy.la libmy.a libmy-2.so.4 libmy-2.so.4.0.18 +dnl +dnl and executables will get link-resolve-infos for libmy-2.so.4 - +dnl therefore the patch-level is ignored during ldso linking, and ldso +dnl will use the one with the highest patchlevel. Using just "-release +dnl $(VERSION)" during libtool-linking would not do that - omitting the +dnl -version-info will libtool install libmy.so libmy.la libmy.a +dnl libmy-2.4.18.so and executables would get hardlinked with the +dnl 2.4.18 version of your lib. +dnl +dnl This background does also explain the default dll name for a win32 +dnl target : libtool will choose to make up libmy-2-4.dll for this +dnl version spec. +dnl +dnl this macro does also set the usual three parts of a version spec +dnl $MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION but does not ac_subst +dnl for the plain AX_SET_VERSION_INFO macro. Use instead one of the +dnl numbered macros AX_SET_VERSION_INFO1 (use first number for release +dnl part) or that AX_SET_VERSION_INFO2 (use the first two numbers for +dnl release part). +dnl +dnl You may add sublevel parts like "1.4.2-ac5" where the sublevel is +dnl just killed from these version/release substvars. That allows to +dnl grab the version off a .spec file like with AX_SPEC_PACKAGE_VERSION +dnl where the $VERSION is used to name a tarball or distpack like +dnl mylib-2.2.9pre4 +dnl +dnl Unlike earlier macros, you can use this one to break up different +dnl VERSIONs and put them into different variables, just hint with +dnl PREFIX-setting - i.e. _VERSION(2.4.5,TEST) will set variables named +dnl TEST_MAJOR_VERSION=2... and of course $TEST_RELEASE_INFO etc. (for +dnl the moment, it needs to be a literal prefix *sigh*) +dnl +dnl @category Misc +dnl @author Guido Draheim <guidod@gmx.de> +dnl @version 2005-01-21 +dnl @license GPLWithACException + +AC_DEFUN([AX_SET_VERSION_INFO1],[dnl +AS_VAR_PUSHDEF([MAJOR],ifelse($2,,[MAJOR_VERSION],[$2_MAJOR_VERSION]))dnl +AS_VAR_PUSHDEF([MINOR],ifelse($2,,[MINOR_VERSION],[$2_MINOR_VERSION]))dnl +AS_VAR_PUSHDEF([MICRO],ifelse($2,,[MICRO_VERSION],[$2_MICRO_VERSION]))dnl +AS_VAR_PUSHDEF([PATCH],ifelse($2,,[PATCH_VERSION],[$2_PATCH_VERSION]))dnl +AS_VAR_PUSHDEF([LTREL],ifelse($2,,[RELEASE_INFO],[$2_RELEASE_INFO]))dnl +AS_VAR_PUSHDEF([LTVER],ifelse($2,,[VERSION_INFO],[$2_VERSION_INFO]))dnl +test ".$PACKAGE_VERSION" = "." && PACKAGE_VERSION="$VERSION" +AC_MSG_CHECKING(ifelse($2,,,[$2 ])out linker version info dnl +ifelse($1,,$PACKAGE_VERSION,$1) ) + MINOR=`echo ifelse( $1, , $PACKAGE_VERSION, $1 )` + MAJOR=`echo "$MINOR" | sed -e 's/[[.]].*//'` + MINOR=`echo "$MINOR" | sed -e "s/^$MAJOR//" -e 's/^.//'` + MICRO="$MINOR" + MINOR=`echo "$MICRO" | sed -e 's/[[.]].*//'` + MICRO=`echo "$MICRO" | sed -e "s/^$MINOR//" -e 's/^.//'` + PATCH="$MICRO" + MICRO=`echo "$PATCH" | sed -e 's/[[^0-9]].*//'` + PATCH=`echo "$PATCH" | sed -e "s/^$MICRO//" -e 's/^[[-.]]//'` + if test "_$MICRO" = "_" ; then MICRO="0" ; fi + if test "_$MINOR" = "_" ; then MINOR="$MAJOR" ; MAJOR="0" ; fi + MINOR=`echo "$MINOR" | sed -e 's/[[^0-9]].*//'` + LTREL="-release $MAJOR" + LTVER="-version-info $MINOR:$MICRO" +AC_MSG_RESULT([/$MAJOR/$MINOR:$MICRO (-$MAJOR.so.$MINOR.0.$MICRO)]) +AC_SUBST(MAJOR) +AC_SUBST(MINOR) +AC_SUBST(MICRO) +AC_SUBST(PATCH) +AC_SUBST(LTREL) +AC_SUBST(LTVER) +AS_VAR_POPDEF([LTVER])dnl +AS_VAR_POPDEF([LTREL])dnl +AS_VAR_POPDEF([PATCH])dnl +AS_VAR_POPDEF([MICRO])dnl +AS_VAR_POPDEF([MINOR])dnl +AS_VAR_POPDEF([MAJOR])dnl +]) + +AC_DEFUN([AX_SET_VERSION_INFO2],[dnl +AS_VAR_PUSHDEF([MAJOR],ifelse($2,,[MAJOR_VERSION],[$2_MAJOR_VERSION]))dnl +AS_VAR_PUSHDEF([MINOR],ifelse($2,,[MINOR_VERSION],[$2_MINOR_VERSION]))dnl +AS_VAR_PUSHDEF([MICRO],ifelse($2,,[MICRO_VERSION],[$2_MICRO_VERSION]))dnl +AS_VAR_PUSHDEF([PATCH],ifelse($2,,[PATCH_VERSION],[$2_PATCH_VERSION]))dnl +AS_VAR_PUSHDEF([LTREL],ifelse($2,,[RELEASE_INFO],[$2_RELEASE_INFO]))dnl +AS_VAR_PUSHDEF([LTVER],ifelse($2,,[VERSION_INFO],[$2_VERSION_INFO]))dnl +test ".$PACKAGE_VERSION" = "." && PACKAGE_VERSION="$VERSION" +AC_MSG_CHECKING(ifelse($2,,,[$2 ])out linker version info dnl +ifelse($1,,$PACKAGE_VERSION,$1) ) + MINOR=`echo ifelse( $1, , $PACKAGE_VERSION, $1 )` + MAJOR=`echo "$MINOR" | sed -e 's/[[.]].*//'` + MINOR=`echo "$MINOR" | sed -e "s/^$MAJOR//" -e 's/^.//'` + MICRO="$MINOR" + MINOR=`echo "$MICRO" | sed -e 's/[[.]].*//'` + MICRO=`echo "$MICRO" | sed -e "s/^$MINOR//" -e 's/^.//'` + PATCH="$MICRO" + MICRO=`echo "$PATCH" | sed -e 's/[[^0-9]].*//'` + PATCH=`echo "$PATCH" | sed -e "s/^$MICRO//" -e 's/^[[-.]]//'` + test "_$MICRO" != "_" || MICRO="0" + if test "_$MINOR" != "_" ; then MINOR="$MAJOR" ; MAJOR="0" ; fi + MINOR=`echo "$MINOR" | sed -e 's/[[^0-9]].*//'` + LTREL="-release $MAJOR.$MINOR" + LTVER="-version-info 0:$MICRO" +AC_MSG_RESULT([/$MAJOR/$MINOR:$MICRO (-$MAJOR.so.$MINOR.0.$MICRO)]) +AC_SUBST(MAJOR) +AC_SUBST(MINOR) +AC_SUBST(MICRO) +AC_SUBST(PATCH) +AC_SUBST(LTREL) +AC_SUBST(LTVER) +AS_VAR_POPDEF([LTVER])dnl +AS_VAR_POPDEF([LTREL])dnl +AS_VAR_POPDEF([PATCH])dnl +AS_VAR_POPDEF([MICRO])dnl +AS_VAR_POPDEF([MINOR])dnl +AS_VAR_POPDEF([MAJOR])dnl +]) + +AC_DEFUN([AX_SET_VERSION_INFO],[dnl +AS_VAR_PUSHDEF([MAJOR],ifelse($2,,[MAJOR_VERSION],[$2_MAJOR_VERSION]))dnl +AS_VAR_PUSHDEF([MINOR],ifelse($2,,[MINOR_VERSION],[$2_MINOR_VERSION]))dnl +AS_VAR_PUSHDEF([MICRO],ifelse($2,,[MICRO_VERSION],[$2_MICRO_VERSION]))dnl +AS_VAR_PUSHDEF([PATCH],ifelse($2,,[PATCH_VERSION],[$2_PATCH_VERSION]))dnl +AS_VAR_PUSHDEF([LTREL],ifelse($2,,[RELEASE_INFO],[$2_RELEASE_INFO]))dnl +AS_VAR_PUSHDEF([LTVER],ifelse($2,,[VERSION_INFO],[$2_VERSION_INFO]))dnl +test ".$PACKAGE_VERSION" = "." && PACKAGE_VERSION="$VERSION" +AC_MSG_CHECKING(ifelse($2,,,[$2 ])out linker version info dnl +ifelse($1,,$PACKAGE_VERSION,$1) ) + MINOR=`echo ifelse( $1, , $PACKAGE_VERSION, $1 )` + MAJOR=`echo "$MINOR" | sed -e 's/[[.]].*//'` + MINOR=`echo "$MINOR" | sed -e "s/^$MAJOR//" -e 's/^.//'` + MICRO="$MINOR" + MINOR=`echo "$MICRO" | sed -e 's/[[.]].*//'` + MICRO=`echo "$MICRO" | sed -e "s/^$MINOR//" -e 's/^.//'` + PATCH="$MICRO" + MICRO=`echo "$PATCH" | sed -e 's/[[^0-9]].*//'` + PATCH=`echo "$PATCH" | sed -e "s/^$MICRO//" -e 's/[[-.]]//'` + if test "_$MICRO" = "_" ; then MICRO="0" ; fi + if test "_$MINOR" = "_" ; then MINOR="$MAJOR" ; MAJOR="0" ; fi + MINOR=`echo "$MINOR" | sed -e 's/[[^0-9]].*//'` + LTREL="-release $MAJOR" + LTVER="-version-info $MINOR:$MICRO" +AC_MSG_RESULT([/$MAJOR/$MINOR:$MICRO (-$MAJOR.so.$MINOR.0.$MICRO)]) +AC_SUBST(LTREL) +AC_SUBST(LTVER) +AS_VAR_POPDEF([LTVER])dnl +AS_VAR_POPDEF([LTREL])dnl +AS_VAR_POPDEF([PATCH])dnl +AS_VAR_POPDEF([MICRO])dnl +AS_VAR_POPDEF([MINOR])dnl +AS_VAR_POPDEF([MAJOR])dnl +]) diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_spec_file.m4 b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_spec_file.m4 new file mode 100644 index 00000000000..a12955db3dd --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_spec_file.m4 @@ -0,0 +1,98 @@ +dnl @synopsis AX_SPEC_FILE [(rpmspecfile [,subdirpath])] +dnl +dnl set the specfile - if no argument has been given then check whether +dnl the ac_unique_file looks like a .spec file and use it. This macro +dnl is ac_REQUIRED by many AX_SPEC_ routines. +dnl +dnl the AX_SPEC_EXTRACT macro is a helper used by many AX_SPEC_ +dnl routines and therefore placed here to be automatically included in +dnl the macro set of (older) aclocal/acinclude. +dnl +dnl AX_SPEC_EXTRACT(shellvar [,specvar [,defaultvalue]]) +dnl +dnl @category Misc +dnl @author Guido Draheim <guidod@gmx.de> +dnl @version 2005-01-21 +dnl @license GPLWithACException + +AC_DEFUN([AX_SPEC_FILE], +[ AC_MSG_CHECKING([rpm spec file]) + if test ".$1" != "." ; then + ax_spec_file_="$1" + ax_spec_file=`basename $1` + else + case ".$ac_unique_file" in + *.spec) ax_spec_file="$ac_unique_file" + ax_spec_file_="$ac_unique_file" ;; + *) ax_spec_file="TODO" + if test ".$PACKAGE" != "." + then ax_spec_file_="$PACKAGE.spec" + else ax_spec_file_="README" + fi + cat m4_ifset([AS_MESSAGE_LOG_FD],[>&AS_MESSAGE_LOG_FD],[>>config.log]) <<EOF + no ax_spec_file argument has been given, using defaults of + (1) $ax_spec_file_ + (2) $ax_spec_file +EOF + ;; + esac + fi + # find specfile + for i in ifelse($2,,,$2) . $srcdir $srcdir/.. .. ; do + if test -f "$i/$ax_spec_file_" ; then + ax_spec_dir="$i" + ax_spec_file="$ax_spec_dir/$ax_spec_file_" + break + fi + if test -f "$i/$ax_spec_file" ; then + ax_spec_dir="$i" + ax_spec_file="$ax_spec_dir/$ax_spec_file" + break + fi + done + case "$ax_spec_file" in + ./*) if test "$ax_spec_file" = "./$ax_spec_file_" ; then + ax_spec_file="$ax_spec_file_" + fi + AC_MSG_RESULT([$ax_spec_file]) ;; + */*) AC_MSG_RESULT([$ax_spec_file]) ;; + *) AC_MSG_ERROR([no rpm spec file found]) ;; + esac + m4_define([m4_ax_spec_file],[ax_spec_file]) +]) + +dnl AX_SPEC_EXTRACT(shellvar [,specvar [,defaultvalue]]) + +AC_DEFUN([AX_SPEC_EXTRACT], +[ + if test ".$[]$1" = "." ; then + $1=`grep -i '^[[ ]]*m4_ifval([$2],[$2],[$1])[[ ]]*:' dnl + "$ax_spec_file" | sed -e 's/.*:[[ ]]*//' dnl + -e 's/[[ ]][[ ]]*/ /g' -e 's/^ //' -e 's/ $[]//' -e 'q'` + if test ".$[]$1" = "." ; then + for $1 in $2 $1 m4_tolower([$1]) ; do + $1=`echo "$[]$1" | sed -e 's/^%//g'` + $1=`sed dnl + -e "/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]/!d" dnl + -e "s/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]*//" dnl + -e 's/[[ ]][[ ]]*/ /' -e 's/ $[]//' -e 'q' $ax_spec_file` + test ".$1" != "." && break + done + fi + case ".$[]$1" in + .%{*) + $1=`echo "$[]$1" | sed -e 's/%{//' -e 's/}$[]//'` + $1=`sed dnl + -e "/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]/!d" dnl + -e "s/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]*//" dnl + -e 's/[[ ]][[ ]]*/ /' -e 's/ $[]//' -e 'q' $ax_spec_file` ;; + .%*) + $1=`echo "$[]$1" | sed -e 's/%//'` + $1=`sed dnl + -e "/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]/!d" dnl + -e "s/^%[[ ]]*def[]ine[[ ]][[ ]]*$[]$1[[ ]]*//" dnl + -e 's/[[ ]][[ ]]*/ /' -e 's/ $[]//' -e 'q' $ax_spec_file` ;; + esac + m4_ifval([$3],[test ".$[]$1" = "." && $1="$3"]) + fi # test ".$[]$1" = "." +]) diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_spec_package_version.m4 b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_spec_package_version.m4 new file mode 100644 index 00000000000..39766d96091 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_spec_package_version.m4 @@ -0,0 +1,227 @@ +dnl @synopsis AX_SPEC_PACKAGE_AND_VERSION ([specfile]) +dnl @synopsis AX_SPEC_PACKAGE_NAME ([shellvar],[defaultvalue]) +dnl @synopsis AX_SPEC_PACKAGE_VERSION ([shellvar],[defaultvalue]) +dnl @synopsis AX_SPEC_PACKAGE_SUMMARY ([shellvar],[defaultvalue]) +dnl @synopsis AX_SPEC_PACKAGE_LICENSE ([shellvar],[defaultvalue]) +dnl @synopsis AX_SPEC_PACKAGE_CATEGORY ([shellvar],[defaultvalue]) +dnl @synopsis AX_SPEC_PACKAGE_ICON ([shellvar],[defaultvalue]) +dnl @synopsis AX_SPEC_DEFAULTS([specfile]) +dnl +dnl set PACKAGE from the given specfile - default to basename of the +dnl rpmspecfile if no "name:" could be found in the spec file. +dnl +dnl set VERSION from the given specfile - default to a date-derived +dnl value if no "version:" could be found in the spec file. +dnl +dnl this macro builds on top of AX_SPEC_FILE / AX_SPEC_EXTRACT +dnl +dnl more specific: if not "name:" or "%define name" was found in the +dnl myproject.spec file then the PACKAGE var is set to the basename +dnl "myproject". When no spec file was present then it will usually +dnl default to "TODO". +dnl +dnl The version spec looks for "version:" or "%define version" in the +dnl spec file. When no such value was seen or no spec file had been +dnl present then the value is set to `date +0.%y.%W%w`. +dnl +dnl the version value itself is sanitized somewhat with making it to +dnl always carry atleast three digits (1.2.3) and clensing superflous +dnl "0" chars around from generating numbers elsewhere. +dnl +dnl additional macros are provided that extract a specific value from +dnl the spec file, among these: +dnl +dnl set PACKAGE_SUMMARY from the given specfile - default to package +dnl and try to detect a type suffix if "summary:" was not in the spec +dnl file +dnl +dnl set PACKAGE_LICENSE from the given specfile - if no "license:" tag +dnl was given in the spec file then various COPYING files are grepped +dnl to have a guess and the final fallback will be GNU GPL (or GNU +dnl LGPL). +dnl +dnl set PACKAGE_ICON from the given specfile - if no "icon:" tag was +dnl given in the spec file then we default to $PACKAGE-icon.png +dnl +dnl the final AX_SPEC_INIT(specfile) will initialize all variables to +dnl its defaults according to the spec file given. +dnl +dnl @category Misc +dnl @author Guido Draheim <guidod@gmx.de> +dnl @version 2005-01-21 +dnl @license GPLWithACException + +AC_DEFUN([AX_SPEC_PACKAGE_LICENSE],[AC_REQUIRE([AX_SPEC_FILE])dnl + AS_VAR_PUSHDEF([VAR],[PACKAGE_LICENSE])dnl + AC_MSG_CHECKING([for spec license type]) + if test ".$VAR" = "." ; then if test ! -f $ax_spec_file + then k="(w/o spec)" + else k="" + AX_SPEC_EXTRACT(VAR,[license],m4_ifval($1,$1)) + VAR=`echo $VAR | sed -e 's/ *License//g'` + fi fi + test ".$VAR" = "." && k="(fallback)" + ifelse($2,,[dnl here the defaults for LICENSE / COPYRIGHT + if test ".$VAR" = "." ; then + for ac_file in "$srcdir/COPYING" "$srcdir/COPYING" "$srcdir/LICENSE" ; do + test -f "$ac_file" || continue +dnl http://www.ibiblio.org/osrt/omf/omf_elements "16. Rights" + if grep "GNU LESSER GENERAL PUBLIC LICENSE" "$ac_file" >/dev/null + then VAR="GNU LGPL" ; break + elif grep "GNU GENERAL PUBLIC LICENSE" "$ac_file" >/dev/null + then VAR="GNU GPL" ; break + elif grep "MOZILLA PUBLIC LICENSE" "$ac_file" >/dev/null + then VAR="MPL" ; break + elif grep "Mozilla Public License" "$ac_file" >/dev/null + then VAR="MPL" ; break + elif grep -i "artistic license" "$ac_file" >/dev/null + then VAR="Artistic" ; break + elif grep -i "artistic control" "$ac_file" >/dev/null + then VAR="Artistic" ; break + elif grep -i "semblance of artistic" "$ac_file" >/dev/null + then VAR="Artistic" ; break + elif grep -i "above copyright notice" "$ac_file" >/dev/null + then VAR="BSD" ; break + fi + done + if test ".$VAR" = "." ; then + if test "$srcdir/COPYING.LIB" ; then VAR="GNU LGPL" + elif test ".$ltmain" != "." ; then VAR="GNU LGPL" + else VAR="GNU GPL" + fi + fi + fi + ],[test ".$VAR" = "." && VAR="$2"]) + test "$VAR" = "GPL" && VAR="GNU GPL" + test "$VAR" = "LGPL" && VAR="GNU LGPL" + AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k]) + AS_VAR_POPDEF([VAR])dnl +]) + +AC_DEFUN([AX_SPEC_PACKAGE_SUMMARY],[AC_REQUIRE([AX_SPEC_FILE])dnl + AS_VAR_PUSHDEF([VAR],[PACKAGE_SUMMARY])dnl + AC_MSG_CHECKING([for spec summary]) + if test ".$VAR" = "." ; then if test ! -f $ax_spec_file + then k="(w/o spec)" + else k="" + AX_SPEC_EXTRACT(VAR,[summary],m4_ifval($1,$1)) + fi fi + test ".$VAR" = "." && k="(fallback)" + ifelse($2,,[dnl here the defaults for SUMMARY + if test ".$VAR" = "." ; then VAR="$PACKAGE" + test ".$VAR" = "." && VAR="foo" + test ".$ltmain" != "." && VAR="$VAR library" + fi + ],[test ".$VAR" = "." && VAR="$2"]) + AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k]) + AS_VAR_POPDEF([VAR])dnl +]) + +AC_DEFUN([AX_SPEC_PACKAGE_ICON],[AC_REQUIRE([AX_SPEC_FILE])dnl + AS_VAR_PUSHDEF([VAR],[PACKAGE_ICON])dnl + AC_MSG_CHECKING([for spec icon]) + if test ".$VAR" = "." ; then if test ! -f $ax_spec_file + then k="(w/o spec)" + else k="" + AX_SPEC_EXTRACT(VAR,[icon],m4_ifval($1,$1)) + fi fi + test ".$VAR" = "." && k="(fallback)" + ifelse($2,,[dnl here the defaults for ICON + if test ".$VAR" = "." ; then VAR="$PACKAGE-icon.png" ; fi + ],[test ".$VAR" = "." && VAR="$2"]) + AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k]) + AS_VAR_POPDEF([VAR])dnl +]) + +AC_DEFUN([AX_SPEC_PACKAGE_CATEGORY],[AC_REQUIRE([AX_SPEC_FILE])dnl + AS_VAR_PUSHDEF([VAR],[PACKAGE_CATEGORY])dnl + AC_MSG_CHECKING([for spec category]) + if test ".$VAR" = "." ; then if test ! -f $ax_spec_file + then k="(w/o spec)" + else k="" + AX_SPEC_EXTRACT(VAR,[group],m4_ifval($1,$1)) + VAR=`echo $VAR | sed -e 's/ /-/g'` + fi fi + test ".$VAR" = "." && k="(fallback)" + ifelse($2,,[dnl here the defaults for CATEGORY + if test ".$VAR" = "." ; then if test ".$ltmain" != "." + then VAR="Development/Library" + else VAR="Development/Other" + fi fi + ],[test ".$VAR" = "." && VAR="$2"]) + AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k]) + AS_VAR_POPDEF([VAR])dnl +]) + +AC_DEFUN([AX_SPEC_PACKAGE_NAME],[AC_REQUIRE([AX_SPEC_FILE])dnl + AS_VAR_PUSHDEF([VAR],[PACKAGE_NAME])dnl + AC_MSG_CHECKING([for spec package]) + if test ".$VAR" = "." ; then if test ! -f $ax_spec_file + then k="(w/o spec)" + else k="" + AX_SPEC_EXTRACT(VAR,[name],m4_ifval($1,$1)) + VAR=`echo $VAR | sed -e 's/ /-/g'` + fi fi + test ".$VAR" = "." && k="(fallback)" + ifelse($2,,[dnl here the defaults for PACKAGE + test ".$VAR" = "." && VAR=`basename $ax_spec_file .spec` + test ".$VAR" = ".README" && VAR="TODO" + test ".$VAR" = ".TODO" && VAR="foo" + ],[test ".$VAR" = "." && VAR="$2"]) + test "VAR" = "PACKAGE_NAME" && test ".$PACKAGE" = "." && PACKAGE="$VAR" + AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k]) + AS_VAR_POPDEF([VAR])dnl +]) + +AC_DEFUN([AX_SPEC_PACKAGE_VERSION_],[AC_REQUIRE([AX_SPEC_FILE])dnl + AS_VAR_PUSHDEF([VAR],[PACKAGE_VERSION])dnl + AC_MSG_CHECKING([for spec version]) + if test ".$VAR" = "." ; then if test ! -f $ax_spec_file + then k="(w/o spec)" + else k="" + AX_SPEC_EXTRACT(VAR,[version],m4_ifval($1,$1)) + VAR=`echo $VAR | sed -e 's/ /-/g'` + fi fi + test ".$VAR" = "." && k="(fallback)" + ifelse($2,,[dnl here the defaults for VERSION + test ".$VAR" = "." && VAR=`date +0.%y.%W%w` + ],[test ".$VAR" = "." && VAR="$2"]) + test "VAR" = "PACKAGE_VERSION" && test ".$VERSION" = "." && VERSION="$VAR" + case "$VAR" in # note we set traditional VERSION before cleaning things up + *.*.) VAR="$VAR"`date +%W%w` ;; + *.*.*) ;; + *.) VAR="$VAR"`date +%y.%W%w` ;; + *.*) VAR="$VAR.0" ;; + *) VAR=AS_TR_SH([$VAR]) ; VAR="$VAR.`date +%y.%W%w`" ;; + esac + VAR=`echo $VAR | sed -e "s/[[.]][0]\\([0-9]\\)/.\\1/g"` + AC_MSG_RESULT([m4_ifval([$1],[$1 = ])$VAR $k]) + AS_VAR_POPDEF([VAR])dnl +]) + +dnl for compatibility, we define ax_spec_package_version +dnl to do all of ax_spec_package_name as well. +AC_DEFUN([AX_SPEC_PACKAGE_VERSION],[AC_REQUIRE([AX_SPEC_FILE])dnl + ifelse($1,, + AC_MSG_WARN([please use ax_spec_package_AND_version now!]), + AC_MSG_ERROR([please use ax_spec_package_AND_version now!])) + AX_SPEC_PACKAGE_NAME + AX_SPEC_PACKAGE_VERSION_ + +]) + +AC_DEFUN([AX_SPEC_PACKAGE_AND_VERSION],[ + m4_ifset([m4_ax_spec_file],,[AX_SPEC_FILE($1)]) + AX_SPEC_PACKAGE_NAME + AX_SPEC_PACKAGE_VERSION_ +]) + +AC_DEFUN([AX_SPEC_DEFAULTS],[ + m4_ifset([m4_ax_spec_file],,[AX_SPEC_FILE($1)]) + AX_SPEC_PACKAGE_NAME + AX_SPEC_PACKAGE_VERSION_ + AX_SPEC_PACKAGE_LICENSE + AX_SPEC_PACKAGE_SUMMARY + AX_SPEC_PACKAGE_CATEGORY + AX_SPEC_PACKAGE_ICON +]) diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_warning_default_aclocaldir.m4 b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_warning_default_aclocaldir.m4 new file mode 100644 index 00000000000..c53576fd83f --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_warning_default_aclocaldir.m4 @@ -0,0 +1,113 @@ +dnl @synopsis AX_WARNING_DEFAULT_ACLOCALDIR [(dirvariable [,[defsetting][,[A][,[N/A]]]])] +dnl @synopsis AX_ENABLE_DEFAULT_ACLOCALDIR [(dirvariable [,defsetting])] +dnl +dnl print a warning message if the $(datadir)/aclocal directory is not +dnl in the dirlist searched by the aclocal tool. This macro is useful +dnl if some `make install` would target $(datadir)/aclocal to install +dnl an autoconf m4 file of your project to be picked up by other +dnl projects. +dnl +dnl default $1 dirvariable = aclocaldir +dnl default $2 defsetting = ${datadir}/aclocal +dnl default $3 action = nothing to do +dnl default $4 action = warn the user about mismatch +dnl +dnl In the _WARNING_ variant, the defsetting is not placed in +dnl dirvariable nor is it ac_subst'ed in any way. The default +dnl fail-action $4 is to send a warning message to the user, and the +dnl default accept-action $3 is nothing. It is expected that a Makefile +dnl is generated with aclocaldir=${datadir}/aclocal +dnl +dnl The _ENABLE_ variant however will set not only the $aclocaldir +dnl shell var of the script, but it is also AC-SUBST'ed on default - +dnl and furthermore a configure option "--enable-default-aclocaldir" is +dnl provided. Only if that option is set then $2 default is not set to +dnl the canonic default in the a $prefix subpath but instead $2 default +dnl is set to the primary path where `aclocal` looks for macros. The +dnl user may also override the default on the command line. +dnl +dnl @category Misc +dnl @category Automake +dnl @author Guido Draheim <guidod@gmx.de> +dnl @version 2005-01-21 +dnl @license GPLWithACException + +AC_DEFUN([AX_WARNING_DEFAULT_ACLOCALDIR],[dnl +AC_REQUIRE([AX_EXPAND_PREFIX])dnl +AS_VAR_PUSHDEF([DIR],[ax_warning_default_aclocal_dir])dnl +AS_VAR_PUSHDEF([BIN],[ax_warning_default_aclocal_bin])dnl +AS_VAR_PUSHDEF([LOC],[ax_warning_default_aclocal_loc])dnl +LOC='m4_if([$2],,[${datadir}/aclocal],[$2])' +m4_ifval([$1],[test ".$[]$1" != "." && LOC="$[]$1"]) + if test ".$ACLOCAL" = "." ; then + AC_PATH_PROG([ACLOCAL],[aclocal],[:]) + fi + BIN="$ACLOCAL" + test ".$BIN" = "." && BIN="aclocal" + DIR=`test ".$SHELL" = "." && SHELL="'sh'" ; eval "$BIN --print-ac-dir"` + test ".$DIR" = "." && test -d "/usr/share/aclocal" && DIR="/usr/share/aclocal" + test ".$DIR" = "." && DIR="/tmp" +DIR=`eval "echo $DIR"` # we need to expand +DIR=`eval "echo $DIR"` +LOC=`eval "echo $LOC"` +LOC=`eval "echo $LOC"` +LOC=`eval "echo $LOC"` +LOC=`eval "echo $LOC"` +AC_RUN_LOG([: test "$LOC" = "$DIR"]) +if test "$LOC" != "$DIR" ; then + if test -f "$DIR/dirlist" ; then + for DIR in `cat $DIR/dirlist` $DIR ; do + AC_RUN_LOG([: test "$LOC" = "$DIR"]) + test "$LOC" = "$DIR" && break + done + fi + if test "$LOC" != "$DIR" ; then + m4_ifval([$4],[$4],[dnl + AC_MSG_NOTICE([warning: m4_if([$1],,[aclocaldir],[$1])=$LOC dnl +(see config.log)]) + AC_MSG_NOTICE([perhaps: make install m4_if([$1],,[aclocaldir],[$1])=$DIR]) + cat m4_ifset([AS_MESSAGE_LOG_FD],[>&AS_MESSAGE_LOG_FD],[>>config.log]) <<EOF + aclocaldir: the m4_if([$1],,[default aclocaldir],[$1 value]) of $LOC + aclocaldir: is not listed in the dirlist where aclocal will look + aclocaldir: for macros - you can override the install-path using + aclocaldir: make install aclocaldir=$DIR + aclocaldir: or append the directory to aclocal reconfigures later as + aclocaldir: aclocal -I $LOC + aclocaldir: when an autoconf macro is needed from that directory +EOF + m4_ifvaln([$5],[$5])])dnl + m4_ifvaln([$3],[else $3])dnl + fi +fi +AS_VAR_POPDEF([LOC])dnl +AS_VAR_POPDEF([BIN])dnl +AS_VAR_POPDEF([DIR])dnl +]) + +AC_DEFUN([AX_ENABLE_DEFAULT_ACLOCALDIR],[dnl +AS_VAR_PUSHDEF([BIN],[ax_warning_default_aclocal_bin])dnl +AS_VAR_PUSHDEF([DIR],[ax_warning_default_aclocal_def])dnl +AS_VAR_PUSHDEF([DEF],[ax_warning_default_aclocal_def])dnl +AC_ARG_ENABLE([enable-default-aclocaldir], +[ --enable-default-aclocaldir(=PATH) override the datadir/aclocal default]) +test ".$enable_default_aclocaldir" = "." && enable_default_aclocaldir="no" +case ".$enable_default_aclocaldir" in + .no) DIR='m4_if([$2],,[${datadir}/aclocal],[$2])' ;; + .yes) # autodetect + if test ".$ACLOCAL" = "." ; then + AC_PATH_PROG([ACLOCAL],[aclocal],[:]) + fi + BIN="$ACLOCAL" + test ".$BIN" = "." && BIN="aclocal" + DIR=`test ".$SHELL" = "." && SHELL="'sh'" ; eval "$BIN --print-ac-dir"` + test ".$DIR" = "." && test -d "/usr/share/aclocal" && DIR="/usr/share/aclocal" + test ".$DIR" = "." && DIR="/tmp" ;; + *) DIR="$enable_default_aclocaldir" ;; +esac +AX_WARNING_DEFAULT_ACLOCALDIR([$1],[$DEF],[$3],[$4],[$5]) +m4_if([$1],,[aclocaldir],[$1])="$ax_warning_default_aclocal_dir" +AC_SUBST(m4_if([$1],,[aclocaldir],[$1])) +AS_VAR_POPDEF([DEF])dnl +AS_VAR_POPDEF([DIR])dnl +AS_VAR_POPDEF([BIN])dnl +]) diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_warning_default_pkgconfig.m4 b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_warning_default_pkgconfig.m4 new file mode 100644 index 00000000000..557588e0c17 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/m4/ax_warning_default_pkgconfig.m4 @@ -0,0 +1,127 @@ +dnl @synopsis AX_WARNING_DEFAULT_PKGCONFIGDIR [(dirvariable [,[defsetting][,[A][,[N/A]]]])] +dnl @synopsis AX_ENABLE_DEFAULT_PKGCONFIGDIR [(dirvariable [,defsetting])] +dnl +dnl print a warning message if the $(datadir)/aclocal directory is not +dnl in the dirlist searched by the aclocal tool. This macro is useful +dnl if some `make install` would target $(datadir)/aclocal to install +dnl an autoconf m4 file of your project to be picked up by other +dnl projects. +dnl +dnl default $1 dirvariable = pkgconfigdir +dnl default $2 defsetting = ${libdir}/pkgconfig +dnl default $3 action = nothing to do +dnl default $4 action = warn the user about mismatch +dnl +dnl In the _WARNING_ variant, the defsetting is not placed in +dnl dirvariable nor is it ac_subst'ed in any way. The default +dnl fail-action $4 is to send a warning message to the user, and the +dnl default accept-action $3 is nothing. It is expected that a Makefile +dnl is generated with pkgconfigdir=${libdir}/pkgconfig +dnl +dnl The _ENABLE_ variant however will set not only the $pkgconfigdir +dnl shell var of the script, but it is also AC-SUBST'ed on default - +dnl and furthermore a configure option "--enable-default-pkgconfigdir" +dnl is provided. Only if that option is set then $2 default is not set +dnl to the canonic default in the a $prefix subpath but instead $2 +dnl default is set to the primary path where `pkg-config` looks for .pc +dnl files. The user may also override the default on the command line. +dnl +dnl @category Misc +dnl @author Guido Draheim <guidod@gmx.de> +dnl @version 2005-01-21 +dnl @license GPLWithACException + +AC_DEFUN([AX_WARNING_DEFAULT_PKGCONFIGDIR],[dnl +AC_REQUIRE([AX_EXPAND_PREFIX])dnl +AS_VAR_PUSHDEF([DIR],[ax_warning_default_pkgconfig_dir])dnl +AS_VAR_PUSHDEF([BIN],[ax_warning_default_pkgconfig_bin])dnl +AS_VAR_PUSHDEF([LOC],[ax_warning_default_pkgconfig_loc])dnl +LOC='m4_if([$2],,[${libdir}/pkgconfig],[$2])' +m4_ifval([$1],[test ".$[]$1" != "." && LOC="$[]$1"]) + if test ".$PKG_CONFIG" = "." ; then # we use the same default as in pkg.m4 + AC_PATH_PROG([PKG_CONFIG],[pkg-config],[no]) + fi + if test "$PKG_CONFIG" = "no" + then DIR="/" ; test -d "/usr/lib/pkgconfig" && DIR="/usr/lib/pkgconfig" + else BIN=`AS_DIRNAME(["$DIR"])` ; + if test -d "$BIN/lib/pkgconfig" ; then + DIR="$BIN/lib/pkgconfig" + else BIN=`AS_DIRNAME(["$DIR"])` + if test -d "$BIN/lib/pkgconfig" ; then + DIR="$BIN/lib/pkgconfig" + else + if test -d "/usr/lib/pkgconfig" ; then + DIR="/usr/lib/pkgconfig" + else + DIR="/" + fi fi fi + fi +AC_RUN_LOG([: last pkgconfig dir is assumed as "$DIR"]) +DIR=`eval "echo $DIR"` +DIR=`eval "echo $DIR"` +LOC=`eval "echo $LOC"` +LOC=`eval "echo $LOC"` +LOC=`eval "echo $LOC"` +LOC=`eval "echo $LOC"` +for DIR in `echo "$PKG_CONFIG_PATH:$DIR" | sed -e 's,:, ,g'` ; do + AC_RUN_LOG([: test ".$LOC" = ".$DIR"]) + test ".$LOC" = ".$DIR" && break +done +if test "$LOC" != "$DIR" ; then + m4_ifval([$4],[$4],[dnl + AC_MSG_NOTICE([warning: m4_if([$1],,[pkgconfigdir],[$1])=$LOC dnl +(see config.log)]) + AC_MSG_NOTICE([perhaps: make install m4_if([$1],,[pkgconfigdir],[$1])=$DIR]) + cat m4_ifset([AS_MESSAGE_LOG_FD],[>&AS_MESSAGE_LOG_FD],[>>config.log]) <<EOF + pkgconfigdir: the m4_if([$1],,[default pkgconfigdir],[$1 value]) of $LOC + pkgconfigdir: is not listed in the dirlist where pkg-config will look for + pkgconfigdir: package-configs - you can override the install-path using + pkgconfigdir: make install m4_if([$1],,[pkgconfigdir],[$1])=$DIR + pkgconfigdir: or set/append the directory to the environment variable + pkgconfigdir: PKG_CONFIG_PATH="$LOC" +EOF + m4_ifvaln([$5],[$5])])dnl + m4_ifvaln([$3],[else $3])dnl +fi +AS_VAR_POPDEF([LOC])dnl +AS_VAR_POPDEF([BIN])dnl +AS_VAR_POPDEF([DIR])dnl +]) + +AC_DEFUN([AX_ENABLE_DEFAULT_PKGCONFIGDIR],[dnl +AS_VAR_PUSHDEF([BIN],[ax_warning_default_pkgconfig_bin])dnl +AS_VAR_PUSHDEF([DIR],[ax_warning_default_pkgconfig_def])dnl +AS_VAR_PUSHDEF([DEF],[ax_warning_default_pkgconfig_def])dnl +AC_ARG_ENABLE([enable-default-pkgconfigdir], +[ --enable-default-pkgconfigdir(=PATH) override the libdir/pkgconfig default]) +test ".$enable_default_pkgconfigdir" = "." && enable_default_pkgconfigdir="no" +case ".$enable_default_pkgconfigdir" in + .no) DIR='m4_if([$2],,[${libdir}/pkgconfig],[$2])' ;; + .yes) # autodetect + if test ".$PKG_CONFIG" = "." ; then # we use the same default as in pkg.m4 + AC_PATH_PROG([PKG_CONFIG],[pkg-config],[no]) + fi + if test "$PKG_CONFIG" = "no" + then DIR="/tmp" ; test -d "/usr/lib/pkgconfig" && DIR="/usr/lib/pkgconfig" + else BIN=`AS_DIRNAME(["$DIR"])` ; + if test -d "$BIN/lib/pkgconfig" ; then + DIR="$BIN/lib/pkgconfig" + else BIN=`AS_DIRNAME(["$DIR"])` + if test -d "$BIN/lib/pkgconfig" ; then + DIR="$BIN/lib/pkgconfig" + else + if test -d "/usr/lib/pkgconfig" ; then + DIR="/usr/lib/pkgconfig" + else + DIR="/tmp" + fi fi fi + fi ;; + *) DIR="$enable_default_pkgconfigdir" ;; +esac +AX_WARNING_DEFAULT_PKGCONFIGDIR([$1],[$DEF],[$3],[$4],[$5]) +m4_if([$1],,[pkgconfigdir],[$1])="$ax_warning_default_pkgconfig_dir" +AC_SUBST(m4_if([$1],,[pkgconfigdir],[$1])) +AS_VAR_POPDEF([DEF])dnl +AS_VAR_POPDEF([DIR])dnl +AS_VAR_POPDEF([BIN])dnl +]) diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/m4/patch_libtool_on_darwin_zsh_overquoting.m4 b/Build/source/libs/zziplib/zziplib-0.13.58/m4/patch_libtool_on_darwin_zsh_overquoting.m4 new file mode 100644 index 00000000000..99100148e0f --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/m4/patch_libtool_on_darwin_zsh_overquoting.m4 @@ -0,0 +1,36 @@ +dnl @synopsis PATCH_LIBTOOL_ON_DARWIN_ZSH_OVERQUOTING +dnl +dnl libtool 1.4.x has a bug on darwin where the "zsh" is installed as +dnl the bourne shell replacement. Of course, the zsh is called in a +dnl compatibility mode but there is a common problem with it, probably +dnl a bug of zsh. Newer darwin systems have a "bash" installed now, but +dnl the configure-default will be "zsh" in most systems still. +dnl +dnl The bug revelas itself as an overquoted statement in the libtool +dnl cmds-spec for sharedlib creation on testing for "module" builds. +dnl Later libtool has gone rid of it by simply removing the quotes at +dnl that point . Here we maintain the original style and simply remove +dnl the extra escape character, i.e. we look for "archive_cmds" and +dnl replace a sequence of triple-backslash-and-doublequote with +dnl single-backslash-and-doublequote. +dnl +dnl @category Misc +dnl @author Guido Draheim <guidod@gmx.de> +dnl @version 2003-03-23 +dnl @license GPLWithACException + +AC_DEFUN([PATCH_LIBTOOL_ON_DARWIN_ZSH_OVERQUOTING], +[# libtool-1.4 specific, on zsh target the final requoting does one too much +case "$host_os" in + darwin*) + if grep "1.92" libtool >/dev/null ; then +AC_MSG_RESULT(patching libtool on .so-sharedlib creation (zsh overquoting)) + test -f libtool.old || (mv libtool libtool.old && cp libtool.old libtool) + sed -e '/archive_cmds=/s:[[\\]][[\\]][[\\]]*":\\":g' libtool >libtool.new + (test -s libtool.new || rm libtool.new) 2>/dev/null + test -f libtool.new && mv libtool.new libtool # not 2>/dev/null !! + test -f libtool || mv libtool.old libtool + fi + ;; +esac +]) diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/m4/patch_libtool_sys_lib_search_path_spec.m4 b/Build/source/libs/zziplib/zziplib-0.13.58/m4/patch_libtool_sys_lib_search_path_spec.m4 new file mode 100644 index 00000000000..1310373291c --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/m4/patch_libtool_sys_lib_search_path_spec.m4 @@ -0,0 +1,37 @@ +dnl @synopsis PATCH_LIBTOOL_SYS_LIB_SEARCH_PATH_SPEC +dnl +dnl Cross-compiling to win32 from a unix system reveals a bug - the +dnl path-separator has been set to ";" depending on the target system. +dnl However, the crossgcc search_path_spec works in a unix-environment +dnl with unix-style directories and unix-stylish path_separator. The +dnl result: the search_path_spec is a single word still containing the +dnl ":" separators. +dnl +dnl This macro fixes the situation: when we see the libtool PATH_SEP to +dnl be ":" and search_path_spec to contain ":" characters, then these +dnl are replaced with spaces to let the resulting string work as a +dnl for-loop argument in libtool scripts that resolve -no-undefined +dnl libraries. +dnl +dnl Later libtool generations have fixed the situation with using +dnl $PATH_SEPARATOR in the first place as the original path delimiter +dnl that will be scanned for and replaced into spaces. +dnl +dnl @category Misc +dnl @author Guido Draheim <guidod@gmx.de> +dnl @version 2005-01-21 +dnl @license GPLWithACException + +AC_DEFUN([PATCH_LIBTOOL_SYS_LIB_SEARCH_PATH_SPEC], +[# patch libtool to fix sys_lib_search_path (e.g. crosscompiling a win32 dll) +if test "_$PATH_SEPARATOR" = "_:" ; then + if grep "^sys_lib_search_path_spec.*:" libtool >/dev/null ; then +AC_MSG_RESULT(patching libtool to fix sys_lib_search_path_spec) + test -f libtool.old || (mv libtool libtool.old && cp libtool.old libtool) + sed -e "/^sys_lib_search_path_spec/s/:/ /g" libtool >libtool.new + (test -s libtool.new || rm libtool.new) 2>/dev/null + test -f libtool.new && mv libtool.new libtool # not 2>/dev/null !! + test -f libtool || mv libtool.old libtool + fi +fi +]) diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/m4/patch_libtool_to_add_host_cc.m4 b/Build/source/libs/zziplib/zziplib-0.13.58/m4/patch_libtool_to_add_host_cc.m4 new file mode 100644 index 00000000000..22b45ca8396 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/m4/patch_libtool_to_add_host_cc.m4 @@ -0,0 +1,64 @@ +dnl @synopsis PATCH_LIBTOOL_TO_ADD_HOST_CC +dnl +dnl The libtool 1.4.x processing (and patched 1.3.5) uses a little +dnl "impgen" tool to turn a "*.dll" into an import "*.lib" as it is +dnl needed for win32 targets. However, this little tool is not shipped +dnl by binutils, it is not even a command option of dlltool or dllwrap. +dnl It happens to be a C source snippet implanted into the libtool +dnl sources - it gets written to ".libs", compiled into a binary +dnl on-the-fly, and executed right away on the "dll" file to create the +dnl import-lib (dll.a files in gcc-speak). +dnl +dnl This mode works fine for a native build within mingw or cygwin, but +dnl it does not work in cross-compile mode since CC is a crosscompiler +dnl - it will create an .exe file on a non-win32 system, and as a +dnl result an impgen.exe is created on-the-fly that can not be executed +dnl on-the-fly. Luckily, the actual libtool snippet uses HOST_CC to +dnl compile the sources which has a fallback to CC when the HOST_CC +dnl variable was not set. +dnl +dnl this ac-macro is trying to detect a valid HOST_CC which is not a +dnl cross-compiler. This is done by looking into the $PATH for a "cc" +dnl and the result is patched into libtool a HOST_CC, iow it adds +dnl another configured variable at the top of the libtool script. +dnl +dnl In discussions on the libtool mailinglist it occurred that later +dnl gcc/binutils generations are able to link with dlls directly, i.e. +dnl there is no import-lib needed anymore. The import-table is created +dnl within the linker itself (in-memory) and bound to the .exe/.dll +dnl currently in the making. The whole stuff of impgen exe and +dnl compiling it on-the-fly, well, it is superflouos then. +dnl +dnl Since mingw crosscompilers tend to be quite a fresh development it +dnl was agreed to remove the impgen stuff completly from libtool +dnl sources. Still however, this macro does not hurt since it does not +dnl patch impgen cmds but it just adds HOST_CC which might be useful in +dnl other cross-compiling cases as well. Therefore, you can leave it in +dnl for maximum compatibility and portability. +dnl +dnl @category Misc +dnl @category C +dnl @author Guido Draheim <guidod@gmx.de> +dnl @version 2005-01-21 +dnl @license GPLWithACException + +AC_DEFUN([PATCH_LIBTOOL_TO_ADD_HOST_CC], +[# patch libtool to add HOST_CC sometimes needed in crosscompiling a win32 dll +if grep "HOST_CC" libtool >/dev/null; then + if test "$build" != "$host" ; then + if test "_$HOST_CC" = "_" ; then + HOST_CC="false" + for i in `echo $PATH | sed 's,:, ,g'` ; do + test -x $i/cc && HOST_CC=$i/cc + done + fi +AC_MSG_RESULT(patching libtool to add HOST_CC=$HOST_CC) + test -f libtool.old || (mv libtool libtool.old && cp libtool.old libtool) + sed -e "/BEGIN.*LIBTOOL.*CONFIG/a\\ +HOST_CC=$HOST_CC" libtool >libtool.new + (test -s libtool.new || rm libtool.new) 2>/dev/null + test -f libtool.new && mv libtool.new libtool # not 2>/dev/null !! + test -f libtool || mv libtool.old libtool + fi +fi +]) diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc6/zzcat.dsp b/Build/source/libs/zziplib/zziplib-0.13.58/msvc6/zzcat.dsp new file mode 100644 index 00000000000..861c81b5d44 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc6/zzcat.dsp @@ -0,0 +1,98 @@ +# Microsoft Developer Studio Project File - Name="zzcat" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=zzcat - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "zzcat.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "zzcat.mak" CFG="zzcat - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "zzcat - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "zzcat - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "zzcat - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release/zzcat" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I ".." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x41d /d "NDEBUG" +# ADD RSC /l 0x41d /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib zzip-1.lib libz.lib /nologo /version:10 /subsystem:console /machine:I386 /libpath:"d:\lib" /libpath:"Release" + +!ELSEIF "$(CFG)" == "zzcat - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug/zzcat" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x41d /d "_DEBUG" +# ADD RSC /l 0x41d /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib zziplib.lib libz.lib /nologo /version:10 /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"d:\lib" /libpath:"Debug" + +!ENDIF + +# Begin Target + +# Name "zzcat - Win32 Release" +# Name "zzcat - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "c;cpp" +# Begin Source File + +SOURCE=..\bins\zzcat.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h" +# End Group +# End Target +# End Project diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc6/zzdir.dsp b/Build/source/libs/zziplib/zziplib-0.13.58/msvc6/zzdir.dsp new file mode 100644 index 00000000000..37431dc6c84 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc6/zzdir.dsp @@ -0,0 +1,98 @@ +# Microsoft Developer Studio Project File - Name="zzdir" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=zzdir - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "zzdir.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "zzdir.mak" CFG="zzdir - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "zzdir - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "zzdir - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "zzdir - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release/zzdir" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I ".." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x41d /d "NDEBUG" +# ADD RSC /l 0x41d /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib zzip-1.lib libz.lib /nologo /version:10 /subsystem:console /machine:I386 /libpath:"d:\lib" /libpath:"Release" + +!ELSEIF "$(CFG)" == "zzdir - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug/zzdir" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x41d /d "_DEBUG" +# ADD RSC /l 0x41d /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib zziplib.lib libz.lib /nologo /version:10 /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"d:\lib" /libpath:"Debug" + +!ENDIF + +# Begin Target + +# Name "zzdir - Win32 Release" +# Name "zzdir - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "c;cpp" +# Begin Source File + +SOURCE=..\bins\zzdir.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h" +# End Group +# End Target +# End Project diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc6/zzip.dsp b/Build/source/libs/zziplib/zziplib-0.13.58/msvc6/zzip.dsp new file mode 100644 index 00000000000..09ce2566a14 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc6/zzip.dsp @@ -0,0 +1,183 @@ +# Microsoft Developer Studio Project File - Name="zzip" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=zzip - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "zzip.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "zzip.mak" CFG="zzip - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "zzip - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "zzip - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "zzip - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release/zzip" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZZIP_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I ".." /I "d:\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZZIP_EXPORTS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x407 /d "NDEBUG" +# ADD RSC /l 0x407 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 kernel32.lib libz.lib /nologo /version:10 /dll /machine:I386 /out:"Release/zzip-1.dll" /libpath:"d:\lib" + +!ELSEIF "$(CFG)" == "zzip - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug/zzip" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZZIP_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ".." /I "D:\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ZZIP_EXPORTS" /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x407 /d "_DEBUG" +# ADD RSC /l 0x407 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib libz.lib /nologo /version:10 /dll /debug /machine:I386 /out:"Debug/zzip-1.dll" /pdbtype:sept /libpath:"d:\lib" + +!ENDIF + +# Begin Target + +# Name "zzip - Win32 Release" +# Name "zzip - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\zzip\dir.c +# End Source File +# Begin Source File + +SOURCE=..\zzip\err.c +# End Source File +# Begin Source File + +SOURCE=..\zzip\file.c +# End Source File +# Begin Source File + +SOURCE=..\zzip\info.c +# End Source File +# Begin Source File + +SOURCE=..\zzip\plugin.c +# End Source File +# Begin Source File + +SOURCE=..\zzip\stat.c +# End Source File +# Begin Source File + +SOURCE=..\zzip\write.c +# End Source File +# Begin Source File + +SOURCE=..\zzip\zip.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\zzip\__dirent.h +# End Source File +# Begin Source File + +SOURCE=..\zzip\__mmap.h +# End Source File +# Begin Source File + +SOURCE=..\zzip\_config.h +# End Source File +# Begin Source File + +SOURCE=..\zzip\_msvc.h +# End Source File +# Begin Source File + +SOURCE=..\zzip\conf.h +# End Source File +# Begin Source File + +SOURCE=..\zzip\file.h +# End Source File +# Begin Source File + +SOURCE=..\zzip\format.h +# End Source File +# Begin Source File + +SOURCE=..\zzip\lib.h +# End Source File +# Begin Source File + +SOURCE=..\zzip\plugin.h +# End Source File +# Begin Source File + +SOURCE=..\zzip\stdint.h +# End Source File +# Begin Source File + +SOURCE=..\zzip\zzip.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\docs\README.MSVC6 +# End Source File +# End Target +# End Project diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc6/zziplib.dsp b/Build/source/libs/zziplib/zziplib-0.13.58/msvc6/zziplib.dsp new file mode 100644 index 00000000000..ac5b7eab754 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc6/zziplib.dsp @@ -0,0 +1,172 @@ +# Microsoft Developer Studio Project File - Name="zziplib" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=zziplib - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "zziplib.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "zziplib.mak" CFG="zziplib - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "zziplib - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "zziplib - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "zziplib - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release/zziplib" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I ".." /I "d:\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x41d /d "NDEBUG" +# ADD RSC /l 0x41d /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "zziplib - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug/zziplib" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I ".." /I "d:\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0x41d /d "_DEBUG" +# ADD RSC /l 0x41d /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "zziplib - Win32 Release" +# Name "zziplib - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "c;cpp" +# Begin Source File + +SOURCE="..\zzip\dir.c" +# End Source File +# Begin Source File + +SOURCE="..\zzip\err.c" +# End Source File +# Begin Source File + +SOURCE="..\zzip\file.c" +# End Source File +# Begin Source File + +SOURCE="..\zzip\info.c" +# End Source File +# Begin Source File + +SOURCE="..\zzip\plugin.c" +# End Source File +# Begin Source File + +SOURCE="..\zzip\stat.c" +# End Source File +# Begin Source File + +SOURCE="..\zzip\write.c" +# End Source File +# Begin Source File + +SOURCE="..\zzip\zip.c" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h" +# Begin Source File + +SOURCE="..\zzip\__dirent.h" +# End Source File +# Begin Source File + +SOURCE="..\zzip\__mmap.h" +# End Source File +# Begin Source File + +SOURCE="..\zzip\_config.h" +# End Source File +# Begin Source File + +SOURCE="..\zzip\_msvc.h" +# End Source File +# Begin Source File + +SOURCE="..\zzip\conf.h" +# End Source File +# Begin Source File + +SOURCE="..\zzip\file.h" +# End Source File +# Begin Source File + +SOURCE=..\zzip\format.h +# End Source File +# Begin Source File + +SOURCE=..\zzip\lib.h +# End Source File +# Begin Source File + +SOURCE="..\zzip\plugin.h" +# End Source File +# Begin Source File + +SOURCE="..\zzip\stdint.h" +# End Source File +# Begin Source File + +SOURCE=..\zzip\zzip.h +# End Source File +# End Group +# Begin Source File + +SOURCE=..\docs\README.MSVC6 +# End Source File +# End Target +# End Project diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc6/zziplib.dsw b/Build/source/libs/zziplib/zziplib-0.13.58/msvc6/zziplib.dsw new file mode 100644 index 00000000000..5c7e1766bca --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc6/zziplib.dsw @@ -0,0 +1,116 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "zzcat"=".\zzcat.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name zziplib + End Project Dependency +}}} + +############################################################################### + +Project: "zzdir"=".\zzdir.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name zziplib + End Project Dependency +}}} + +############################################################################### + +Project: "zzip"=".\zzip.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "zziplib"=".\zziplib.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "zziptest"=".\zziptest.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name zziplib + End Project Dependency +}}} + +############################################################################### + +Project: "zzipwrap"=".\zzipwrap.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name zziplib + End Project Dependency +}}} + +############################################################################### + +Project: "zzobfuscated"=".\zzobfuscated.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name zziplib + End Project Dependency +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc6/zziptest.dsp b/Build/source/libs/zziplib/zziplib-0.13.58/msvc6/zziptest.dsp new file mode 100644 index 00000000000..605265be925 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc6/zziptest.dsp @@ -0,0 +1,98 @@ +# Microsoft Developer Studio Project File - Name="zziptest" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=zziptest - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "zziptest.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "zziptest.mak" CFG="zziptest - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "zziptest - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "zziptest - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "zziptest - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release/zziptest" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I ".." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x41d /d "NDEBUG" +# ADD RSC /l 0x41d /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib zzip-1.lib libz.lib /nologo /version:10 /subsystem:console /machine:I386 /libpath:"d:\lib" /libpath:"Release" + +!ELSEIF "$(CFG)" == "zziptest - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug/zziptest" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x41d /d "_DEBUG" +# ADD RSC /l 0x41d /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib zziplib.lib libz.lib /nologo /version:10 /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"d:\lib" /libpath:"Debug" + +!ENDIF + +# Begin Target + +# Name "zziptest - Win32 Release" +# Name "zziptest - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "c;cpp" +# Begin Source File + +SOURCE=..\bins\zziptest.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h" +# End Group +# End Target +# End Project diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc6/zzipwrap.dsp b/Build/source/libs/zziplib/zziplib-0.13.58/msvc6/zzipwrap.dsp new file mode 100644 index 00000000000..4f6a328aac8 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc6/zzipwrap.dsp @@ -0,0 +1,106 @@ +# Microsoft Developer Studio Project File - Name="zzipwrap" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=zzipwrap - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "zzipwrap.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "zzipwrap.mak" CFG="zzipwrap - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "zzipwrap - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "zzipwrap - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "zzipwrap - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release/zzipwrap" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I ".." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x41d /d "NDEBUG" +# ADD RSC /l 0x41d /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib zzip-1.lib libz.lib /nologo /version:10 /subsystem:console /machine:I386 /libpath:"d:\lib" /libpath:"Release" + +!ELSEIF "$(CFG)" == "zzipwrap - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug/zzipwrap" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x41d /d "_DEBUG" +# ADD RSC /l 0x41d /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib zziplib.lib libz.lib /nologo /version:10 /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"d:\lib" /libpath:"Debug" + +!ENDIF + +# Begin Target + +# Name "zzipwrap - Win32 Release" +# Name "zzipwrap - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "c;cpp" +# Begin Source File + +SOURCE=..\zzipwrap\wrap.c +# End Source File +# Begin Source File + +SOURCE="..\zzipwrap\zzipwrap.c" +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h" +# Begin Source File + +SOURCE=..\zzipwrap\wrap.h +# End Source File +# End Group +# End Target +# End Project diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc6/zzobfuscated.dsp b/Build/source/libs/zziplib/zziplib-0.13.58/msvc6/zzobfuscated.dsp new file mode 100644 index 00000000000..566365cf4ac --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc6/zzobfuscated.dsp @@ -0,0 +1,98 @@ +# Microsoft Developer Studio Project File - Name="zzobfuscated" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=zzobfuscated - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "zzobfuscated.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "zzobfuscated.mak" CFG="zzobfuscated - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "zzobfuscated - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "zzobfuscated - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "zzobfuscated - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release/zzobfuscated" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I ".." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x41d /d "NDEBUG" +# ADD RSC /l 0x41d /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib zzip-1.lib libz.lib /nologo /version:10 /subsystem:console /machine:I386 /libpath:"d:\lib" /libpath:"Release" + +!ELSEIF "$(CFG)" == "zzobfuscated - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug/zzobfuscated" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x41d /d "_DEBUG" +# ADD RSC /l 0x41d /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib zziplib.lib libz.lib /nologo /version:10 /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"d:\lib" /libpath:"Debug" + +!ENDIF + +# Begin Target + +# Name "zzobfuscated - Win32 Release" +# Name "zzobfuscated - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "c;cpp" +# Begin Source File + +SOURCE=..\bins\zzobfuscated.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h" +# End Group +# End Target +# End Project diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/test.zip b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/test.zip Binary files differnew file mode 100644 index 00000000000..ce4770015f4 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/test.zip diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/test1.zip b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/test1.zip Binary files differnew file mode 100644 index 00000000000..c46015d9431 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/test1.zip diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzcat.sln b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzcat.sln new file mode 100644 index 00000000000..1dca79c0131 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzcat.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zziptest", "zziptest.vcproj", "{FCEF4E99-72DB-4422-95BB-3C83673B66E9}"
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ ConfigName.0 = Debug
+ ConfigName.1 = Release
+ EndGlobalSection
+ GlobalSection(ProjectDependencies) = postSolution
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Debug.ActiveCfg = Debug|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Debug.Build.0 = Debug|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Release.ActiveCfg = Release|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzcat.vcproj b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzcat.vcproj new file mode 100644 index 00000000000..a9d4809e91e --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzcat.vcproj @@ -0,0 +1,202 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8,00" + Name="zziptest" + ProjectGUID="{FCEF4E99-72DB-4422-95BB-3C83673B66E9}" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..;../zlib/include;"$(MSSdk)/Include"" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="zziplib-$(ConfigurationName).lib" + OutputFile="zziptest-$(ConfigurationName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(OutDir)/zziptest.pdb" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + OmitFramePointers="true" + AdditionalIncludeDirectories="..;../zlib/include;"$(MSSdk)/Include"" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="true" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="zziplib-$(ConfigurationName).lib" + OutputFile="zziptest-$(ConfigurationName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Quelldateien" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm" + > + <File + RelativePath="..\bins\zziptest.c" + > + </File> + </Filter> + <File + RelativePath="zziplib.sln" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzdir.sln b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzdir.sln new file mode 100644 index 00000000000..1dca79c0131 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzdir.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zziptest", "zziptest.vcproj", "{FCEF4E99-72DB-4422-95BB-3C83673B66E9}"
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ ConfigName.0 = Debug
+ ConfigName.1 = Release
+ EndGlobalSection
+ GlobalSection(ProjectDependencies) = postSolution
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Debug.ActiveCfg = Debug|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Debug.Build.0 = Debug|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Release.ActiveCfg = Release|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzdir.vcproj b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzdir.vcproj new file mode 100644 index 00000000000..a6c40e2a8fa --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzdir.vcproj @@ -0,0 +1,202 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8,00" + Name="zzdir" + ProjectGUID="{C118D86C-06E2-4949-B4F1-DB05C823C8E1}" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..;../zlib/include;"$(MSSdk)/Include"" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="zziplib-$(ConfigurationName).lib" + OutputFile="zzdir-$(ConfigurationName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(OutDir)/zziptest.pdb" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + OmitFramePointers="true" + AdditionalIncludeDirectories="..;../zlib/include;"$(MSSdk)/Include"" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="true" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="zziplib-$(ConfigurationName).lib" + OutputFile="zzdir-$(ConfigurationName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Quelldateien" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm" + > + <File + RelativePath="..\bins\zzdir.c" + > + </File> + </Filter> + <File + RelativePath="zziplib.sln" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzip.sln b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzip.sln new file mode 100644 index 00000000000..74c2b124420 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzip.sln @@ -0,0 +1,69 @@ +Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual C++ Express 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zziptest", "zzcat.vcproj", "{FCEF4E99-72DB-4422-95BB-3C83673B66E9}"
+ ProjectSection(ProjectDependencies) = postProject
+ {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD} = {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zzcat", "zzipself.vcproj", "{0FBB8EFD-652C-4BD6-B165-6C65357FEDFC}"
+ ProjectSection(ProjectDependencies) = postProject
+ {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD} = {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zzipsetstub", "zzipsetstub.vcproj", "{D15BE737-CF23-4243-A8C4-DB5EE3F5689D}"
+ ProjectSection(ProjectDependencies) = postProject
+ {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD} = {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zzdir", "zzdir.vcproj", "{C118D86C-06E2-4949-B4F1-DB05C823C8E1}"
+ ProjectSection(ProjectDependencies) = postProject
+ {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD} = {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zziplib", "zziplib.vcproj", "{CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zzipself", "zziptest.vcproj", "{8D0233CC-F821-4853-BE2A-B55B680A49E9}"
+ ProjectSection(ProjectDependencies) = postProject
+ {D15BE737-CF23-4243-A8C4-DB5EE3F5689D} = {D15BE737-CF23-4243-A8C4-DB5EE3F5689D}
+ {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD} = {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zzipobfuscated", "zzobfuscated.vcproj", "{3EC53ADE-2D87-4023-B34A-BA1CF0EA0F01}"
+ ProjectSection(ProjectDependencies) = postProject
+ {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD} = {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Debug|Win32.Build.0 = Debug|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Release|Win32.ActiveCfg = Release|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Release|Win32.Build.0 = Release|Win32
+ {0FBB8EFD-652C-4BD6-B165-6C65357FEDFC}.Debug|Win32.ActiveCfg = Debug|Win32
+ {0FBB8EFD-652C-4BD6-B165-6C65357FEDFC}.Release|Win32.ActiveCfg = Release|Win32
+ {0FBB8EFD-652C-4BD6-B165-6C65357FEDFC}.Release|Win32.Build.0 = Release|Win32
+ {D15BE737-CF23-4243-A8C4-DB5EE3F5689D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D15BE737-CF23-4243-A8C4-DB5EE3F5689D}.Release|Win32.ActiveCfg = Release|Win32
+ {D15BE737-CF23-4243-A8C4-DB5EE3F5689D}.Release|Win32.Build.0 = Release|Win32
+ {C118D86C-06E2-4949-B4F1-DB05C823C8E1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C118D86C-06E2-4949-B4F1-DB05C823C8E1}.Release|Win32.ActiveCfg = Release|Win32
+ {C118D86C-06E2-4949-B4F1-DB05C823C8E1}.Release|Win32.Build.0 = Release|Win32
+ {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}.Debug|Win32.Build.0 = Debug|Win32
+ {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}.Release|Win32.ActiveCfg = Release|Win32
+ {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}.Release|Win32.Build.0 = Release|Win32
+ {8D0233CC-F821-4853-BE2A-B55B680A49E9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8D0233CC-F821-4853-BE2A-B55B680A49E9}.Release|Win32.ActiveCfg = Release|Win32
+ {8D0233CC-F821-4853-BE2A-B55B680A49E9}.Release|Win32.Build.0 = Release|Win32
+ {3EC53ADE-2D87-4023-B34A-BA1CF0EA0F01}.Debug|Win32.ActiveCfg = Debug|Win32
+ {3EC53ADE-2D87-4023-B34A-BA1CF0EA0F01}.Release|Win32.ActiveCfg = Release|Win32
+ {3EC53ADE-2D87-4023-B34A-BA1CF0EA0F01}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzip.vcproj b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzip.vcproj new file mode 100644 index 00000000000..77c4646d077 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzip.vcproj @@ -0,0 +1,166 @@ +<?xml version="1.0" encoding = "Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.00" + Name="zzip" + ProjectGUID="{CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}" + Keyword="Win32Proj"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="4" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB" + MinimalRebuild="TRUE" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="4"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLibrarianTool" + OutputFile="lib/zziplibd.lib"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + AdditionalIncludeDirectories="C:\lib\zziplib"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="4" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + OmitFramePointers="TRUE" + PreprocessorDefinitions="WIN32;NDEBUG;_LIB" + StringPooling="TRUE" + RuntimeLibrary="0" + EnableFunctionLevelLinking="TRUE" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="3"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLibrarianTool" + OutputFile="lib/zziplib.lib"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + </Configuration> + </Configurations> + <Files> + <Filter + Name="Quelldateien" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"> + <File + RelativePath="..\zzip\dir.c"> + </File> + <File + RelativePath="..\zzip\err.c"> + </File> + <File + RelativePath="..\zzip\file.c"> + </File> + <File + RelativePath="..\zzip\info.c"> + </File> + <File + RelativePath="..\zzip\plugin.c"> + </File> + <File + RelativePath="..\zzip\stat.c"> + </File> + <File + RelativePath="..\zzip\zip.c"> + </File> + </Filter> + <Filter + Name="Headerdateien" + Filter="h;hpp;hxx;hm;inl;inc"> + <File + RelativePath="..\zzip\__debug.h"> + </File> + <File + RelativePath="..\zzip\__dirent.h"> + </File> + <File + RelativePath="..\zzip\__hints.h"> + </File> + <File + RelativePath="..\zzip\__mmap.h"> + </File> + <File + RelativePath="..\zzip\_config.h"> + </File> + <File + RelativePath="..\zzip\_msvc.h"> + </File> + <File + RelativePath="..\zzip\conf.h"> + </File> + <File + RelativePath="..\zzip\file.h"> + </File> + <File + RelativePath="..\zzip\format.h"> + </File> + <File + RelativePath="..\zzip\lib.h"> + </File> + <File + RelativePath="..\zzip\plugin.h"> + </File> + <File + RelativePath="..\zzip\stdint.h"> + </File> + <File + RelativePath="..\zzip\zzip.h"> + </File> + </Filter> + <Filter + Name="Ressourcendateien" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"> + </Filter> + <File + RelativePath="ReadMe.txt"> + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zziplib.sln b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zziplib.sln new file mode 100644 index 00000000000..087e0bb3dc3 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zziplib.sln @@ -0,0 +1,19 @@ +Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual C++ Express 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zziplib", "zziplib.vcproj", "{CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}.Debug|Win32.Build.0 = Debug|Win32
+ {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}.Release|Win32.ActiveCfg = Release|Win32
+ {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zziplib.vcproj b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zziplib.vcproj new file mode 100644 index 00000000000..6c5f71c06c5 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zziplib.vcproj @@ -0,0 +1,260 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8,00" + Name="zziplib" + ProjectGUID="{CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="4" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..;../zlib/include" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + AdditionalIncludeDirectories="C:\lib\zziplib" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + AdditionalDependencies="zdll.lib" + OutputFile="zziplib-$(ConfigurationName).lib" + AdditionalLibraryDirectories="../zlib/lib" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="4" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + OmitFramePointers="true" + AdditionalIncludeDirectories="..;../zlib/include" + PreprocessorDefinitions="WIN32;NDEBUG;_LIB" + StringPooling="true" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + AdditionalDependencies="zdll.lib" + OutputFile="zziplib-$(ConfigurationName).lib" + AdditionalLibraryDirectories="../zlib/lib" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Quelldateien" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm" + > + <File + RelativePath="..\zzip\dir.c" + > + </File> + <File + RelativePath="..\zzip\err.c" + > + </File> + <File + RelativePath="..\zzip\file.c" + > + </File> + <File + RelativePath="..\zzip\info.c" + > + </File> + <File + RelativePath="..\zzip\plugin.c" + > + </File> + <File + RelativePath="..\zzip\stat.c" + > + </File> + <File + RelativePath="..\zzip\zip.c" + > + </File> + </Filter> + <Filter + Name="Headerdateien" + Filter="h;hpp;hxx;hm;inl;inc" + > + <File + RelativePath="..\zzip\__debug.h" + > + </File> + <File + RelativePath="..\zzip\__dirent.h" + > + </File> + <File + RelativePath="..\zzip\__hints.h" + > + </File> + <File + RelativePath="..\zzip\__mmap.h" + > + </File> + <File + RelativePath="..\zzip\_config.h" + > + </File> + <File + RelativePath="..\zzip\_msvc.h" + > + </File> + <File + RelativePath="..\zzip\conf.h" + > + </File> + <File + RelativePath="..\zzip\file.h" + > + </File> + <File + RelativePath="..\zzip\format.h" + > + </File> + <File + RelativePath="..\zzip\lib.h" + > + </File> + <File + RelativePath="..\zzip\plugin.h" + > + </File> + <File + RelativePath="..\zzip\stdint.h" + > + </File> + <File + RelativePath="..\zzip\zzip.h" + > + </File> + </Filter> + <Filter + Name="Ressourcendateien" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" + > + </Filter> + <File + RelativePath="ReadMe.txt" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzipself.bat b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzipself.bat new file mode 100755 index 00000000000..b0bc8688def --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzipself.bat @@ -0,0 +1,18 @@ +@echo off +rem DOS pkzip.exe does not work under WinXP ! +rem instead using infozip zip.exe + +IF EXIST zzipselftest%1.zip del zzipselftest%1.zip +echo zip -0 zzipselftest%1.zip zzipself%1.exe + zip -0 zzipselftest%1.zip zzipself%1.exe +echo zip -9 zzipselftest%1.zip zzipself.txt + zip -9 zzipselftest%1.zip zzipself.txt +echo zzipsetstub%1.exe zzipselftest%1.zip zzipself%1.exe + zzipsetstub%1.exe zzipselftest%1.zip zzipself%1.exe +echo rename zzipselftest%1.zip zzipselftest%1.exe +IF EXIST zzipselftest%1.exe del zzipselftest%1.exe + ren zzipselftest%1.zip zzipselftest%1.exe + +REM testrun: +echo now testing zzipselftest%1.exe +zzipselftest%1.exe zzipself.txt diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzipself.sln b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzipself.sln new file mode 100644 index 00000000000..1dca79c0131 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzipself.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zziptest", "zziptest.vcproj", "{FCEF4E99-72DB-4422-95BB-3C83673B66E9}"
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ ConfigName.0 = Debug
+ ConfigName.1 = Release
+ EndGlobalSection
+ GlobalSection(ProjectDependencies) = postSolution
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Debug.ActiveCfg = Debug|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Debug.Build.0 = Debug|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Release.ActiveCfg = Release|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzipself.txt b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzipself.txt new file mode 100644 index 00000000000..f423a018e29 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzipself.txt @@ -0,0 +1,9 @@ +HOWTO create an exe-file with an appended zip-resource - file + +we assume an imaginary game called "tetris.exe" +1. create a zip-archive "tetris.zip" and store "tetris.exe" with NO COMPRESSION (-e0 option in pkzip) +2. add your data-files, images and sounds to "tetris.zip" with arbitrary compression +3. call "setstub tetris.zip tetris.exe" +4. rename tetris.zip into tetris.exe + +now your app should be able read data from itself.
\ No newline at end of file diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzipself.vcproj b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzipself.vcproj new file mode 100644 index 00000000000..a2ecfa151c4 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzipself.vcproj @@ -0,0 +1,202 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8,00" + Name="zzcat" + ProjectGUID="{0FBB8EFD-652C-4BD6-B165-6C65357FEDFC}" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..;../zlib/include;"$(MSSdk)/Include"" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="zziplib-$(ConfigurationName).lib" + OutputFile="zzcat-$(ConfigurationName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(OutDir)/zziptest.pdb" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + OmitFramePointers="true" + AdditionalIncludeDirectories="..;../zlib/include;"$(MSSdk)/Include"" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="true" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="zziplib-$(ConfigurationName).lib" + OutputFile="zzcat-$(ConfigurationName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Quelldateien" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm" + > + <File + RelativePath="..\bins\zzcat.c" + > + </File> + </Filter> + <File + RelativePath="zziplib.sln" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzipsetstub.sln b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzipsetstub.sln new file mode 100644 index 00000000000..fb070235225 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzipsetstub.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zzipsetstub", "zzipsetstub.vcproj", "{FCEF4E99-72DB-4422-95BB-3C83673B66E9}"
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ ConfigName.0 = Debug
+ ConfigName.1 = Release
+ EndGlobalSection
+ GlobalSection(ProjectDependencies) = postSolution
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Debug.ActiveCfg = Debug|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Debug.Build.0 = Debug|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Release.ActiveCfg = Release|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzipsetstub.vcproj b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzipsetstub.vcproj new file mode 100644 index 00000000000..a2d58135ca2 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzipsetstub.vcproj @@ -0,0 +1,201 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8,00" + Name="zzipsetstub" + ProjectGUID="{D15BE737-CF23-4243-A8C4-DB5EE3F5689D}" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..;../zlib/include;"$(MSSdk)/Include"" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="zziplib-$(ConfigurationName).lib" + OutputFile="zzipsetstub-$(ConfigurationName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(OutDir)/zzipsetstub.pdb" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + OmitFramePointers="true" + AdditionalIncludeDirectories="..;../zlib/include;"$(MSSdk)/Include"" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="true" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="zziplib-$(ConfigurationName).lib" + OutputFile="zzipsetstub-$(ConfigurationName).exe" + LinkIncremental="1" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Quelldateien" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm" + > + <File + RelativePath="..\test\zzipsetstub.c" + > + </File> + </Filter> + <File + RelativePath="zziplib.sln" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zziptest.sln b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zziptest.sln new file mode 100644 index 00000000000..1dca79c0131 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zziptest.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zziptest", "zziptest.vcproj", "{FCEF4E99-72DB-4422-95BB-3C83673B66E9}"
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ ConfigName.0 = Debug
+ ConfigName.1 = Release
+ EndGlobalSection
+ GlobalSection(ProjectDependencies) = postSolution
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Debug.ActiveCfg = Debug|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Debug.Build.0 = Debug|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Release.ActiveCfg = Release|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zziptest.vcproj b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zziptest.vcproj new file mode 100644 index 00000000000..b34253efbda --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zziptest.vcproj @@ -0,0 +1,204 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8,00" + Name="zzipself" + ProjectGUID="{8D0233CC-F821-4853-BE2A-B55B680A49E9}" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..;../zlib/include;"$(MSSdk)/Include"" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="zziplib-$(ConfigurationName).lib" + OutputFile="zzipself-$(ConfigurationName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(OutDir)/zziptest.pdb" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="zzipself.bat -$(ConfigurationName)" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + OmitFramePointers="true" + AdditionalIncludeDirectories="..;../zlib/include;"$(MSSdk)/Include"" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="true" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="zziplib-$(ConfigurationName).lib" + OutputFile="zzipself-$(ConfigurationName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="zzipself.bat -$(ConfigurationName)" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Quelldateien" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm" + > + <File + RelativePath="..\test\zzipself.c" + > + </File> + </Filter> + <File + RelativePath="zziplib.sln" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzobfuscated.sln b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzobfuscated.sln new file mode 100644 index 00000000000..1dca79c0131 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzobfuscated.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zziptest", "zziptest.vcproj", "{FCEF4E99-72DB-4422-95BB-3C83673B66E9}"
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ ConfigName.0 = Debug
+ ConfigName.1 = Release
+ EndGlobalSection
+ GlobalSection(ProjectDependencies) = postSolution
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Debug.ActiveCfg = Debug|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Debug.Build.0 = Debug|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Release.ActiveCfg = Release|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzobfuscated.vcproj b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzobfuscated.vcproj new file mode 100644 index 00000000000..e2de1c1008b --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc7/zzobfuscated.vcproj @@ -0,0 +1,202 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8,00" + Name="zzipobfuscated" + ProjectGUID="{3EC53ADE-2D87-4023-B34A-BA1CF0EA0F01}" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..;../zlib/include;"$(MSSdk)/Include"" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="zziplib-$(ConfigurationName).lib" + OutputFile="zzipobfuscated-$(ConfigurationName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(OutDir)/zziptest.pdb" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + OmitFramePointers="true" + AdditionalIncludeDirectories="..;../zlib/include;"$(MSSdk)/Include"" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="true" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="zziplib-$(ConfigurationName).lib" + OutputFile="zzipobfuscated-$(ConfigurationName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Quelldateien" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm" + > + <File + RelativePath="..\bins\zzobfuscated.c" + > + </File> + </Filter> + <File + RelativePath="zziplib.sln" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/README.TXT b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/README.TXT new file mode 100644 index 00000000000..dbbd5febabf --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/README.TXT @@ -0,0 +1,31 @@ +These project files were tested with the +free Microsoft Visual C++ 2005 Express Edition. + +Visual C++ Express does NOT include the Win32 SDK Headers. +They must be downloaded separately as documented in the +installation instructions at Microsoft - consequently that +extra installation must be referenced via a system variable: +Set MSSdk=C:\Program Files\Microsoft Platform SDK + +In order to compile you need a valid Zlib SDK - you can +download it from zlib.org in the archive zlib123-dll.zip - +I had unpacked them to $(zziplibdir)/zlib inside the +toplevel of the zziplib source tree. That SDK does ship +with a "zlib1.dll" runtime and "zdll.lib" import library. + +The new Visual Studio has depracated most of the Win32 API +just as well as most of the Posix API. That provokes a lot +of warning message in surplus of the many warning message +that occur on every implicit conversion between signed and +unsigned types. Other compilers are more clever about +detecting real conversion issues, therefore they are not +going to be "patched away" with an explicit conversion in +the source files (I expect Microsoft to get it right somewhen). + +== Download Places == +download.microsoft.com/download/a/5/f/a5f0d781-e201-4ab6-8c6a-9bb4efed1e1a/ +PSDK-x86.exe = Win32 SDK - online installer +download.microsoft.com/download/A/9/1/A91D6B2B-A798-47DF-9C7E-A97854B7DD18/ +VC.iso = Visual C++ Express CD-image +download.microsoft.com/download/C/6/F/C6F4733B-67C7-4C15-9F21-61F7A3167505/ +VCS.iso = Visual C# Express CD-image diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/test.zip b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/test.zip Binary files differnew file mode 100644 index 00000000000..ce4770015f4 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/test.zip diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/test1.zip b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/test1.zip Binary files differnew file mode 100644 index 00000000000..c46015d9431 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/test1.zip diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzcat.sln b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzcat.sln new file mode 100644 index 00000000000..1dca79c0131 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzcat.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zziptest", "zziptest.vcproj", "{FCEF4E99-72DB-4422-95BB-3C83673B66E9}"
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ ConfigName.0 = Debug
+ ConfigName.1 = Release
+ EndGlobalSection
+ GlobalSection(ProjectDependencies) = postSolution
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Debug.ActiveCfg = Debug|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Debug.Build.0 = Debug|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Release.ActiveCfg = Release|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzcat.vcproj b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzcat.vcproj new file mode 100644 index 00000000000..a9d4809e91e --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzcat.vcproj @@ -0,0 +1,202 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8,00" + Name="zziptest" + ProjectGUID="{FCEF4E99-72DB-4422-95BB-3C83673B66E9}" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..;../zlib/include;"$(MSSdk)/Include"" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="zziplib-$(ConfigurationName).lib" + OutputFile="zziptest-$(ConfigurationName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(OutDir)/zziptest.pdb" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + OmitFramePointers="true" + AdditionalIncludeDirectories="..;../zlib/include;"$(MSSdk)/Include"" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="true" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="zziplib-$(ConfigurationName).lib" + OutputFile="zziptest-$(ConfigurationName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Quelldateien" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm" + > + <File + RelativePath="..\bins\zziptest.c" + > + </File> + </Filter> + <File + RelativePath="zziplib.sln" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzdir.sln b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzdir.sln new file mode 100644 index 00000000000..1dca79c0131 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzdir.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zziptest", "zziptest.vcproj", "{FCEF4E99-72DB-4422-95BB-3C83673B66E9}"
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ ConfigName.0 = Debug
+ ConfigName.1 = Release
+ EndGlobalSection
+ GlobalSection(ProjectDependencies) = postSolution
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Debug.ActiveCfg = Debug|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Debug.Build.0 = Debug|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Release.ActiveCfg = Release|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzdir.vcproj b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzdir.vcproj new file mode 100644 index 00000000000..a6c40e2a8fa --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzdir.vcproj @@ -0,0 +1,202 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8,00" + Name="zzdir" + ProjectGUID="{C118D86C-06E2-4949-B4F1-DB05C823C8E1}" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..;../zlib/include;"$(MSSdk)/Include"" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="zziplib-$(ConfigurationName).lib" + OutputFile="zzdir-$(ConfigurationName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(OutDir)/zziptest.pdb" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + OmitFramePointers="true" + AdditionalIncludeDirectories="..;../zlib/include;"$(MSSdk)/Include"" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="true" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="zziplib-$(ConfigurationName).lib" + OutputFile="zzdir-$(ConfigurationName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Quelldateien" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm" + > + <File + RelativePath="..\bins\zzdir.c" + > + </File> + </Filter> + <File + RelativePath="zziplib.sln" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzip.sln b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzip.sln new file mode 100644 index 00000000000..74c2b124420 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzip.sln @@ -0,0 +1,69 @@ +Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual C++ Express 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zziptest", "zzcat.vcproj", "{FCEF4E99-72DB-4422-95BB-3C83673B66E9}"
+ ProjectSection(ProjectDependencies) = postProject
+ {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD} = {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zzcat", "zzipself.vcproj", "{0FBB8EFD-652C-4BD6-B165-6C65357FEDFC}"
+ ProjectSection(ProjectDependencies) = postProject
+ {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD} = {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zzipsetstub", "zzipsetstub.vcproj", "{D15BE737-CF23-4243-A8C4-DB5EE3F5689D}"
+ ProjectSection(ProjectDependencies) = postProject
+ {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD} = {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zzdir", "zzdir.vcproj", "{C118D86C-06E2-4949-B4F1-DB05C823C8E1}"
+ ProjectSection(ProjectDependencies) = postProject
+ {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD} = {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zziplib", "zziplib.vcproj", "{CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zzipself", "zziptest.vcproj", "{8D0233CC-F821-4853-BE2A-B55B680A49E9}"
+ ProjectSection(ProjectDependencies) = postProject
+ {D15BE737-CF23-4243-A8C4-DB5EE3F5689D} = {D15BE737-CF23-4243-A8C4-DB5EE3F5689D}
+ {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD} = {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zzipobfuscated", "zzobfuscated.vcproj", "{3EC53ADE-2D87-4023-B34A-BA1CF0EA0F01}"
+ ProjectSection(ProjectDependencies) = postProject
+ {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD} = {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Debug|Win32.Build.0 = Debug|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Release|Win32.ActiveCfg = Release|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Release|Win32.Build.0 = Release|Win32
+ {0FBB8EFD-652C-4BD6-B165-6C65357FEDFC}.Debug|Win32.ActiveCfg = Debug|Win32
+ {0FBB8EFD-652C-4BD6-B165-6C65357FEDFC}.Release|Win32.ActiveCfg = Release|Win32
+ {0FBB8EFD-652C-4BD6-B165-6C65357FEDFC}.Release|Win32.Build.0 = Release|Win32
+ {D15BE737-CF23-4243-A8C4-DB5EE3F5689D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D15BE737-CF23-4243-A8C4-DB5EE3F5689D}.Release|Win32.ActiveCfg = Release|Win32
+ {D15BE737-CF23-4243-A8C4-DB5EE3F5689D}.Release|Win32.Build.0 = Release|Win32
+ {C118D86C-06E2-4949-B4F1-DB05C823C8E1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C118D86C-06E2-4949-B4F1-DB05C823C8E1}.Release|Win32.ActiveCfg = Release|Win32
+ {C118D86C-06E2-4949-B4F1-DB05C823C8E1}.Release|Win32.Build.0 = Release|Win32
+ {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}.Debug|Win32.Build.0 = Debug|Win32
+ {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}.Release|Win32.ActiveCfg = Release|Win32
+ {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}.Release|Win32.Build.0 = Release|Win32
+ {8D0233CC-F821-4853-BE2A-B55B680A49E9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8D0233CC-F821-4853-BE2A-B55B680A49E9}.Release|Win32.ActiveCfg = Release|Win32
+ {8D0233CC-F821-4853-BE2A-B55B680A49E9}.Release|Win32.Build.0 = Release|Win32
+ {3EC53ADE-2D87-4023-B34A-BA1CF0EA0F01}.Debug|Win32.ActiveCfg = Debug|Win32
+ {3EC53ADE-2D87-4023-B34A-BA1CF0EA0F01}.Release|Win32.ActiveCfg = Release|Win32
+ {3EC53ADE-2D87-4023-B34A-BA1CF0EA0F01}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzip.vcproj b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzip.vcproj new file mode 100644 index 00000000000..77c4646d077 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzip.vcproj @@ -0,0 +1,166 @@ +<?xml version="1.0" encoding = "Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.00" + Name="zzip" + ProjectGUID="{CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}" + Keyword="Win32Proj"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="4" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB" + MinimalRebuild="TRUE" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="4"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLibrarianTool" + OutputFile="lib/zziplibd.lib"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool" + AdditionalIncludeDirectories="C:\lib\zziplib"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="4" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + OmitFramePointers="TRUE" + PreprocessorDefinitions="WIN32;NDEBUG;_LIB" + StringPooling="TRUE" + RuntimeLibrary="0" + EnableFunctionLevelLinking="TRUE" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="3"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLibrarianTool" + OutputFile="lib/zziplib.lib"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + </Configuration> + </Configurations> + <Files> + <Filter + Name="Quelldateien" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"> + <File + RelativePath="..\zzip\dir.c"> + </File> + <File + RelativePath="..\zzip\err.c"> + </File> + <File + RelativePath="..\zzip\file.c"> + </File> + <File + RelativePath="..\zzip\info.c"> + </File> + <File + RelativePath="..\zzip\plugin.c"> + </File> + <File + RelativePath="..\zzip\stat.c"> + </File> + <File + RelativePath="..\zzip\zip.c"> + </File> + </Filter> + <Filter + Name="Headerdateien" + Filter="h;hpp;hxx;hm;inl;inc"> + <File + RelativePath="..\zzip\__debug.h"> + </File> + <File + RelativePath="..\zzip\__dirent.h"> + </File> + <File + RelativePath="..\zzip\__hints.h"> + </File> + <File + RelativePath="..\zzip\__mmap.h"> + </File> + <File + RelativePath="..\zzip\_config.h"> + </File> + <File + RelativePath="..\zzip\_msvc.h"> + </File> + <File + RelativePath="..\zzip\conf.h"> + </File> + <File + RelativePath="..\zzip\file.h"> + </File> + <File + RelativePath="..\zzip\format.h"> + </File> + <File + RelativePath="..\zzip\lib.h"> + </File> + <File + RelativePath="..\zzip\plugin.h"> + </File> + <File + RelativePath="..\zzip\stdint.h"> + </File> + <File + RelativePath="..\zzip\zzip.h"> + </File> + </Filter> + <Filter + Name="Ressourcendateien" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"> + </Filter> + <File + RelativePath="ReadMe.txt"> + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zziplib.sln b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zziplib.sln new file mode 100644 index 00000000000..087e0bb3dc3 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zziplib.sln @@ -0,0 +1,19 @@ +Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual C++ Express 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zziplib", "zziplib.vcproj", "{CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}.Debug|Win32.Build.0 = Debug|Win32
+ {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}.Release|Win32.ActiveCfg = Release|Win32
+ {CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zziplib.vcproj b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zziplib.vcproj new file mode 100644 index 00000000000..6c5f71c06c5 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zziplib.vcproj @@ -0,0 +1,260 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8,00" + Name="zziplib" + ProjectGUID="{CB440073-2ED3-48CE-A1A1-B6EACB3A44BD}" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="4" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..;../zlib/include" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_DEPRECATE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + AdditionalIncludeDirectories="C:\lib\zziplib" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + AdditionalDependencies="zdll.lib" + OutputFile="zziplib-$(ConfigurationName).lib" + AdditionalLibraryDirectories="../zlib/lib" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="4" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + OmitFramePointers="true" + AdditionalIncludeDirectories="..;../zlib/include" + PreprocessorDefinitions="WIN32;NDEBUG;_LIB" + StringPooling="true" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + AdditionalDependencies="zdll.lib" + OutputFile="zziplib-$(ConfigurationName).lib" + AdditionalLibraryDirectories="../zlib/lib" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Quelldateien" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm" + > + <File + RelativePath="..\zzip\dir.c" + > + </File> + <File + RelativePath="..\zzip\err.c" + > + </File> + <File + RelativePath="..\zzip\file.c" + > + </File> + <File + RelativePath="..\zzip\info.c" + > + </File> + <File + RelativePath="..\zzip\plugin.c" + > + </File> + <File + RelativePath="..\zzip\stat.c" + > + </File> + <File + RelativePath="..\zzip\zip.c" + > + </File> + </Filter> + <Filter + Name="Headerdateien" + Filter="h;hpp;hxx;hm;inl;inc" + > + <File + RelativePath="..\zzip\__debug.h" + > + </File> + <File + RelativePath="..\zzip\__dirent.h" + > + </File> + <File + RelativePath="..\zzip\__hints.h" + > + </File> + <File + RelativePath="..\zzip\__mmap.h" + > + </File> + <File + RelativePath="..\zzip\_config.h" + > + </File> + <File + RelativePath="..\zzip\_msvc.h" + > + </File> + <File + RelativePath="..\zzip\conf.h" + > + </File> + <File + RelativePath="..\zzip\file.h" + > + </File> + <File + RelativePath="..\zzip\format.h" + > + </File> + <File + RelativePath="..\zzip\lib.h" + > + </File> + <File + RelativePath="..\zzip\plugin.h" + > + </File> + <File + RelativePath="..\zzip\stdint.h" + > + </File> + <File + RelativePath="..\zzip\zzip.h" + > + </File> + </Filter> + <Filter + Name="Ressourcendateien" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" + > + </Filter> + <File + RelativePath="ReadMe.txt" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzipself.bat b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzipself.bat new file mode 100755 index 00000000000..b0bc8688def --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzipself.bat @@ -0,0 +1,18 @@ +@echo off +rem DOS pkzip.exe does not work under WinXP ! +rem instead using infozip zip.exe + +IF EXIST zzipselftest%1.zip del zzipselftest%1.zip +echo zip -0 zzipselftest%1.zip zzipself%1.exe + zip -0 zzipselftest%1.zip zzipself%1.exe +echo zip -9 zzipselftest%1.zip zzipself.txt + zip -9 zzipselftest%1.zip zzipself.txt +echo zzipsetstub%1.exe zzipselftest%1.zip zzipself%1.exe + zzipsetstub%1.exe zzipselftest%1.zip zzipself%1.exe +echo rename zzipselftest%1.zip zzipselftest%1.exe +IF EXIST zzipselftest%1.exe del zzipselftest%1.exe + ren zzipselftest%1.zip zzipselftest%1.exe + +REM testrun: +echo now testing zzipselftest%1.exe +zzipselftest%1.exe zzipself.txt diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzipself.sln b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzipself.sln new file mode 100644 index 00000000000..1dca79c0131 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzipself.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zziptest", "zziptest.vcproj", "{FCEF4E99-72DB-4422-95BB-3C83673B66E9}"
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ ConfigName.0 = Debug
+ ConfigName.1 = Release
+ EndGlobalSection
+ GlobalSection(ProjectDependencies) = postSolution
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Debug.ActiveCfg = Debug|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Debug.Build.0 = Debug|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Release.ActiveCfg = Release|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzipself.txt b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzipself.txt new file mode 100644 index 00000000000..f423a018e29 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzipself.txt @@ -0,0 +1,9 @@ +HOWTO create an exe-file with an appended zip-resource - file + +we assume an imaginary game called "tetris.exe" +1. create a zip-archive "tetris.zip" and store "tetris.exe" with NO COMPRESSION (-e0 option in pkzip) +2. add your data-files, images and sounds to "tetris.zip" with arbitrary compression +3. call "setstub tetris.zip tetris.exe" +4. rename tetris.zip into tetris.exe + +now your app should be able read data from itself.
\ No newline at end of file diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzipself.vcproj b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzipself.vcproj new file mode 100644 index 00000000000..a2ecfa151c4 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzipself.vcproj @@ -0,0 +1,202 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8,00" + Name="zzcat" + ProjectGUID="{0FBB8EFD-652C-4BD6-B165-6C65357FEDFC}" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..;../zlib/include;"$(MSSdk)/Include"" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="zziplib-$(ConfigurationName).lib" + OutputFile="zzcat-$(ConfigurationName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(OutDir)/zziptest.pdb" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + OmitFramePointers="true" + AdditionalIncludeDirectories="..;../zlib/include;"$(MSSdk)/Include"" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="true" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="zziplib-$(ConfigurationName).lib" + OutputFile="zzcat-$(ConfigurationName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Quelldateien" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm" + > + <File + RelativePath="..\bins\zzcat.c" + > + </File> + </Filter> + <File + RelativePath="zziplib.sln" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzipsetstub.sln b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzipsetstub.sln new file mode 100644 index 00000000000..fb070235225 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzipsetstub.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zzipsetstub", "zzipsetstub.vcproj", "{FCEF4E99-72DB-4422-95BB-3C83673B66E9}"
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ ConfigName.0 = Debug
+ ConfigName.1 = Release
+ EndGlobalSection
+ GlobalSection(ProjectDependencies) = postSolution
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Debug.ActiveCfg = Debug|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Debug.Build.0 = Debug|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Release.ActiveCfg = Release|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzipsetstub.vcproj b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzipsetstub.vcproj new file mode 100644 index 00000000000..a2d58135ca2 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzipsetstub.vcproj @@ -0,0 +1,201 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8,00" + Name="zzipsetstub" + ProjectGUID="{D15BE737-CF23-4243-A8C4-DB5EE3F5689D}" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..;../zlib/include;"$(MSSdk)/Include"" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="zziplib-$(ConfigurationName).lib" + OutputFile="zzipsetstub-$(ConfigurationName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(OutDir)/zzipsetstub.pdb" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + OmitFramePointers="true" + AdditionalIncludeDirectories="..;../zlib/include;"$(MSSdk)/Include"" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="true" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="zziplib-$(ConfigurationName).lib" + OutputFile="zzipsetstub-$(ConfigurationName).exe" + LinkIncremental="1" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Quelldateien" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm" + > + <File + RelativePath="..\test\zzipsetstub.c" + > + </File> + </Filter> + <File + RelativePath="zziplib.sln" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zziptest.sln b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zziptest.sln new file mode 100644 index 00000000000..1dca79c0131 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zziptest.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zziptest", "zziptest.vcproj", "{FCEF4E99-72DB-4422-95BB-3C83673B66E9}"
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ ConfigName.0 = Debug
+ ConfigName.1 = Release
+ EndGlobalSection
+ GlobalSection(ProjectDependencies) = postSolution
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Debug.ActiveCfg = Debug|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Debug.Build.0 = Debug|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Release.ActiveCfg = Release|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zziptest.vcproj b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zziptest.vcproj new file mode 100644 index 00000000000..b34253efbda --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zziptest.vcproj @@ -0,0 +1,204 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8,00" + Name="zzipself" + ProjectGUID="{8D0233CC-F821-4853-BE2A-B55B680A49E9}" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..;../zlib/include;"$(MSSdk)/Include"" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="zziplib-$(ConfigurationName).lib" + OutputFile="zzipself-$(ConfigurationName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(OutDir)/zziptest.pdb" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="zzipself.bat -$(ConfigurationName)" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + OmitFramePointers="true" + AdditionalIncludeDirectories="..;../zlib/include;"$(MSSdk)/Include"" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="true" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="zziplib-$(ConfigurationName).lib" + OutputFile="zzipself-$(ConfigurationName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="zzipself.bat -$(ConfigurationName)" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Quelldateien" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm" + > + <File + RelativePath="..\test\zzipself.c" + > + </File> + </Filter> + <File + RelativePath="zziplib.sln" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzobfuscated.sln b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzobfuscated.sln new file mode 100644 index 00000000000..1dca79c0131 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzobfuscated.sln @@ -0,0 +1,21 @@ +Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zziptest", "zziptest.vcproj", "{FCEF4E99-72DB-4422-95BB-3C83673B66E9}"
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ ConfigName.0 = Debug
+ ConfigName.1 = Release
+ EndGlobalSection
+ GlobalSection(ProjectDependencies) = postSolution
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Debug.ActiveCfg = Debug|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Debug.Build.0 = Debug|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Release.ActiveCfg = Release|Win32
+ {FCEF4E99-72DB-4422-95BB-3C83673B66E9}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzobfuscated.vcproj b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzobfuscated.vcproj new file mode 100644 index 00000000000..e2de1c1008b --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/msvc8/zzobfuscated.vcproj @@ -0,0 +1,202 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8,00" + Name="zzipobfuscated" + ProjectGUID="{3EC53ADE-2D87-4023-B34A-BA1CF0EA0F01}" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..;../zlib/include;"$(MSSdk)/Include"" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="zziplib-$(ConfigurationName).lib" + OutputFile="zzipobfuscated-$(ConfigurationName).exe" + LinkIncremental="2" + AdditionalLibraryDirectories="" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(OutDir)/zziptest.pdb" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="1" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + InlineFunctionExpansion="1" + OmitFramePointers="true" + AdditionalIncludeDirectories="..;../zlib/include;"$(MSSdk)/Include"" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + StringPooling="true" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="zziplib-$(ConfigurationName).lib" + OutputFile="zzipobfuscated-$(ConfigurationName).exe" + LinkIncremental="1" + AdditionalLibraryDirectories="" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Quelldateien" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm" + > + <File + RelativePath="..\bins\zzobfuscated.c" + > + </File> + </Filter> + <File + RelativePath="zziplib.sln" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/test/Makefile.am b/Build/source/libs/zziplib/zziplib-0.13.58/test/Makefile.am new file mode 100644 index 00000000000..38195247bfc --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/test/Makefile.am @@ -0,0 +1,263 @@ +AUTOMAKE_OPTIONS = 1.4 foreign +AUTOTOOL_VERSION=autoconf-2.52 automake-1.5 libtool-1.4.2 +DEFAULT_INCLUDES = # nothing - no default of -I. -I$(srcdir) +DEFS = @DEFS@ -I$(top_builddir) -I$(top_srcdir) # also for automake 1.4 + +EXTRA_DIST = test.zip test1.zip +DISTCLEANFILES = test*.dat test2.zip test3.zip + +zzcat = ../bins/zzcat$(EXEEXT) +zzdir = ../bins/zzdir$(EXEEXT) +zziptest = ../bins/zziptest$(EXEEXT) +zzxorcat = ../bins/zzxorcat$(EXEEXT) +zzxordir = ../bins/zzxordir$(EXEEXT) +zzxorcopy = ../bins/zzxorcopy$(EXEEXT) + +$(zzcat) $(zzdir) $(zziptest) $(zzxorcat) $(zzxordir) $(xorcopy) : \ + @top_srcdir@/bins/*.c @top_srcdir@/zzip/*.c + (cd ../bins && $(MAKE)) + +# ------------------------------------------------------------------- +NULL=/dev/null +README = $(top_srcdir)/README +testdatadir = $(top_srcdir)/testdata.d + +testzip testzips : test.zip test1.zip test2.zip test3.zip + +test.zip tmp/../test.zip : $(README) + - test -d tmp || mkdir tmp + - $(MAKE) test0.zip && mv test0.zip $@ + test -s $@ || cp $(srcdir)/test.zip $@ +test0.zip : $(README) + test -f README || ln -s $(README) . + - $(MKZIP) test_.zip README + @ if test -s test_.zip ;then echo mv test_.zip $@ ; mv test_.zip $@ ;fi + @ test -d $(testdatadir) || mkdir $(testdatadir); if test -s $@ \ + ; then echo cp $@ $(testdatadir)/ ; cp $@ $(testdatadir)/ \ + ; else echo cp $(testdatadir)/$@ .; cp $(testdatadir)/$@ . \ + ; fi ; echo test -s $@ ; test -s $@ + +test1.zip : + @ echo $(MKZIP) $@ ... "(10 files)" \ + ; mkdir test.tmp \ + ; for i in 1 2 3 4 5 6 8 9 \ + ; do echo "file-$i" >test.tmp/file.$$i ; done \ + ; echo " a plain text file here" >test.tmp/README \ + ; (cd test.tmp && $(MKZIP) ../$@ file.* >$(NULL)) \ + ; rm -rf test.tmp + @ test -d $(testdatadir) || mkdir $(testdatadir); if test -s $@ \ + ; then echo cp $@ $(testdatadir)/ ; cp $@ $(testdatadir)/ \ + ; else echo cp $(testdatadir)/$@ .; cp $(testdatadir)/$@ . \ + ; fi ; echo test -s $@ ; test -s $@ + +test2.zip : # will not be shipped in source tarball + @ echo $(MKZIP) $@ ... "(100 files)" \ + ; mkdir test.tmp \ + ; for i in 1 2 3 4 5 6 8 9 ; do for j in 1 2 3 4 5 6 7 8 9 \ + ; do echo "file-$i" >test.tmp/file.$$j$$i ; done done \ + ; (cd test.tmp && $(MKZIP) ../$@ file.* >$(NULL)) \ + ; rm -rf test.tmp + @ test -d $(testdatadir) || mkdir $(testdatadir); if test -s $@ \ + ; then echo cp $@ $(testdatadir)/ ; cp $@ $(testdatadir)/ \ + ; else echo cp $(testdatadir)/$@ .; cp $(testdatadir)/$@ . \ + ; fi ; echo test -s $@ ; test -s $@ + +test3.zip : # will not be shipped in source tarball + @ echo $(MKZIP) $@ ... "(1000 files)" \ + ; mkdir test.tmp ; for h in 1 2 3 4 5 6 7 8 9 ; do : \ + ; for i in 1 2 3 4 5 6 8 9 ; do for j in 1 2 3 4 5 6 7 8 9 \ + ; do echo "file-$i" >test.tmp/file.$$h$$j$$i ; done done done \ + ; (cd test.tmp && $(MKZIP) ../$@ file.* >$(NULL)) \ + ; rm -rf test.tmp + @ test -d $(testdatadir) || mkdir $(testdatadir); if test -s $@ \ + ; then echo cp $@ $(testdatadir)/ ; cp $@ $(testdatadir)/ \ + ; else echo cp $(testdatadir)/$@ .; cp $(testdatadir)/$@ . \ + ; fi ; echo test -s $@ ; test -s $@ + +test.dat : test.zip + $(zzxorcopy) $? $@ +test1.dat : test1.zip + $(zzxorcopy) $? $@ +test2.dat : test2.zip + $(zzxorcopy) $? $@ +test3.dat : test3.zip + $(zzxorcopy) $? $@ + +# ------------------------------------------------------------------- + +stdtests = @ZIPTESTS@ check-test0 check-test1 check-zzdir check-zzcat +xortests = @ZIPTESTS@ check-zzxor check-zzxordir check-zzxorcat +sfxtests = @ZIPTESTS@ check-sfx + +check-local: check-readme $(stdtests) $(xortests) $(sfxtests) + +check-readme : $(zzcat) test.zip + @ test -f test.zip || $(MAKE) tmp/../test.zip + test -s test.zip + @ echo :$@: checking $(zzcat) test/README + @ $(zzcat) test/README >test.out + @ if diff test.out $(README) >$(NULL) \ + ; then rm test.out ; echo check OK ; true \ + ; else rm test.out ; echo check FAIL ; false ; fi + +check-zzxor : $(zzxorcat) test.dat + @ echo :$@: checking $(zzxorcat) test.dat/README + @ $(zzxorcat) test.dat/README >test.out + @ if diff test.out $(README) >$(NULL) \ + ; then rm test.out ; echo check OK ; true \ + ; else rm test.out ; echo check FAIL ; false ; fi + +test: test0 test1 test2 test3 +test0: $(zziptest) + $(zziptest) test.zip +test1: $(zziptest) + $(zziptest) test1.zip +test2: $(zzcat) + $(zzcat) test/README +test3: $(zzdir) + $(zzdir) test1.zip + +check-test0 : $(zziptest) + @ echo :$@: quick selftest + $(zziptest) test.zip >test.out + rm test.out +check-test1 : $(zziptest) + @ test -f test1.zip || ln -s $(srcdir)/test1.zip test1.zip + @ echo :$@: longer selftest "(about ten seconds)" + $(zziptest) test1.zip >test.out + rm test.out + +check-zzdir : test1.zip test2.zip test3.zip $(zzdir) + @ echo :$@: zip directory access + ./$(zzdir) test1 > test.out + @ X="$(zzdir) test1 "\ + ; if grep file.1 test.out >$(NULL) ; then : \ + ; if grep file.9 test.out >$(NULL) ; then : \ + ; echo ..$$X.. OK ; true ; else echo ..$$X.. FAIL ; false ; fi fi + ./$(zzdir) test2 > test.out + @ X="$(zzdir) test2 "\ + ; if grep file.11 test.out >$(NULL) ; then : \ + ; if grep file.99 test.out >$(NULL) ; then : \ + ; echo ..$$X.. OK ; true ; else echo ..$$X.. FAIL ; false ; fi fi + ./$(zzdir) test3 > test.out + @ X="$(zzdir) test3 "\ + ; if grep file.111 test.out >$(NULL) ; then : \ + ; if grep file.999 test.out >$(NULL) ; then : \ + ; echo ..$$X.. OK ; true ; else echo ..$$X.. FAIL ; false ; fi fi + @ X="$(zzdir) test000" ; echo ./$$X "(negative test)" \ + ; if ./$(zzdir) test000 >test.out ; then : \ + ; echo ..$$X.. FAIL ; false ; else echo ..$$X.. OK ; true ; fi + rm test.out + +check-zzcat : test1.zip test2.zip test3.zip $(zzcat) + @ echo ___ $@ ___ + ./$(zzcat) test1/file.1 test1/file.9 > test.out + @ X="$(zzcat) test1/file.1 test1/file.9 "\ + ; if grep file-1 test.out >$(NULL) ; then : \ + ; if grep file-9 test.out >$(NULL) ; then : \ + ; echo ..$$X.. OK ; true ; else echo ..$$X.. FAIL ; false ; fi fi + ./$(zzcat) test2/file.11 test2/file.99 > test.out + @ X="$(zzcat) test2/file.10 test2/file.99 "\ + ; if grep file-10 test.out >$(NULL) ; then : \ + ; if grep file-99 test.out >$(NULL) ; then : \ + ; echo ..$$X.. OK ; true ; else echo ..$$X.. FAIL ; false ; fi fi + ./$(zzcat) test3/file.111 test3/file.999 > test.out + @ X="$(zzcat) test3/file.111 test3/file.999 "\ + ; if grep file-100 test.out >$(NULL) ; then : \ + ; if grep file-999 test.out >$(NULL) ; then : \ + ; echo ..$$X.. OK ; true ; else echo ..$$X.. FAIL ; false ; fi fi + @ X="$(zzcat) test1/file.999" ; echo ./$$X "(negative test)" \ + ; if ./$(zzdir) test1/file.999 >test.out ; then : \ + ; echo ..$$X.. FAIL ; false ; else echo ..$$X.. OK ; true ; fi + rm test.out + +check-zzxordir : test1.dat test2.dat $(zzxordir) + @ echo ___ $@ ___ + ./$(zzxordir) test1 > test.out + @ X="$(zzxordir) test1 "\ + ; if grep file.1 test.out >$(NULL) ; then : \ + ; if grep file.9 test.out >$(NULL) ; then : \ + ; echo ..$$X.. OK ; true ; else echo ..$$X.. FAIL ; false ; fi fi + ./$(zzxordir) test2.dat > test.out + @ X="$(zzxordir) test2.dat "\ + ; if grep file.11 test.out >$(NULL) ; then : \ + ; if grep file.99 test.out >$(NULL) ; then : \ + ; echo ..$$X.. OK ; true ; else echo ..$$X.. FAIL ; false ; fi fi + rm test.out + +check-zzxorcat : test1.dat test2.dat $(zzxorcat) + @ echo ___ $@ ___ + ./$(zzxorcat) test1/file.1 test1/file.9 > test.out + @ X="$(zzxorcat) test1/file.1 test1/file.9 "\ + ; if grep file-1 test.out >$(NULL) ; then : \ + ; if grep file-9 test.out >$(NULL) ; then : \ + ; echo ..$$X.. OK ; true ; else echo ..$$X.. FAIL ; false ; fi fi + ./$(zzxorcat) test2.dat/file.11 test2/file.99 > test.out + @ X="$(zzxorcat) test2.dat/file.10 test2/file.99 "\ + ; if grep file-10 test.out >$(NULL) ; then : \ + ; if grep file-99 test.out >$(NULL) ; then : \ + ; echo ..$$X.. OK ; true ; else echo ..$$X.. FAIL ; false ; fi fi + rm test.out + +# ------------------------------------------------------------------- +ECHON = echo -n +BRUTE = 0 # default is less than a thousand tests +brute : # which is still a brute force selftest + @ echo $(MKZIP) $@: \ + ; for u in 1 2 3 4 5 6 8 9 ; do for v in 1 2 3 4 5 6 7 8 9 ; do : \ + ; for w in 1 2 3 4 5 6 8 9 ; do for x in $(BRUTE) ; do : \ + ; $(ECHON) $$u$$v$$w$$x: \ + ; rm -rf test.tmp ; mkdir test.tmp \ + ; for i in 1 2 3 4 5 6 8 9 ; do for j in 1 2 3 4 5 6 7 8 9 ; do : \ + ; for m in 1 2 3 4 5 6 8 9 ; do for n in $(BRUTE) ; do : \ + ; echo "file-$$i$$j$$m$$n" >test.tmp/file$$i$$j$$m$$n.txt \ + ; test "$$i$$j$$m$$n" = "$$u$$v$$w$$x" && break \ + ; done ; test "$$i$$j$$m$$n" = "$$u$$v$$w$$x" && break \ + ; done ; test "$$i$$j$$m$$n" = "$$u$$v$$w$$x" && break \ + ; done ; test "$$i$$j$$m$$n" = "$$u$$v$$w$$x" && break \ + ; done ; test -f test.tmp/file$$i$$j$$m$$n.txt || exit 2 \ + ; (cd test.tmp && $(MKZIP) ../test$$u$$v$$w$$x.zip file*.* >$(NULL)) \ + ; rm -rf test.tmp \ + ; for i in 1 2 3 4 5 6 8 9 ; do for j in 1 2 3 4 5 6 7 8 9 ; do : \ + ; for m in 1 2 3 4 5 6 8 9 ; do for n in $(BRUTE) ; do : \ + ; ./$(zzcat) test$$u$$v$$w$$x/file$$i$$j$$m$$n.txt >test.out \ + ; if grep file-$$i$$j$$m$$n test.out >$(NULL) ; then rm test.out \ + ; else echo ERROR file-$$i$$j$$m$$n diff in test$$u$$v$$w$$x \ + ; exit 1 ; fi \ + ; ./$(zzdir) test$$u$$v$$w$$x >test.out \ + ; if grep file$$i$$j$$m$$n.txt test.out >$(NULL) ; then rm test.out \ + ; else echo ERROR file$$i$$j$$m$$n.txt not in test$$u$$v$$w$$x \ + ; exit 1 ; fi \ + ; test "$$i$$j$$m$$n" = "$$u$$v$$w$$x" && break \ + ; done ; test "$$i$$j$$m$$n" = "$$u$$v$$w$$x" && break \ + ; done ; test "$$i$$j$$m$$n" = "$$u$$v$$w$$x" && break \ + ; done ; test "$$i$$j$$m$$n" = "$$u$$v$$w$$x" && break \ + ; done ; rm test$$u$$v$$w$$x.zip \ + ; done ; done ; done ; done ; true + +# ------------------------------------------------------------------- + +noinst_PROGRAMS = zzipself zzipsetstub + +zzipself_LDFLAGS = @ZZIPLIB_LDFLAGS@ +zzipself_LDADD = ../zzip/libzzip.la @RESOLVES@ -lz + +../zzip/libzzip.la : @top_srcdir@/zzip/*.c + (cd ../zzip && $(MAKE) `basename $@`) + +zzshowme$(EXEEXT) : zzipself$(EXEEXT) zzipsetstub$(EXEEXT) + $(MKZIP) -0 -j $@ .libs/zzipself$(EXEEXT) + $(MKZIP) -9 -j $@ $(README) + - test -s $@ || cp test2.zip $@ + test ! -f $@.zip || mv $@.zip $@ + ./zzipsetstub $@ .libs/zzipself$(EXEEXT) + - chmod +x $@ + +check-sfx : zzshowme$(EXEEXT) + echo :$@: "./zzshowme readme >readme.out 2>readme.err" + export LD_LIBRARY_PATH="../zzip/.libs:$$LD_LIBRARY_PATH" \ + ; ./zzshowme readme >readme.out 2>readme.err ; true + @ echo 'diff readme.out $(README) || grep "libzzip-" readme.err' \ + ; if test -s readme.out ; then diff readme.out $(README) \ + ; else grep "libzzip-" readme.err || echo "readme.out is empty!" ; fi + rm readme.out readme.err diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/test/Makefile.in b/Build/source/libs/zziplib/zziplib-0.13.58/test/Makefile.in new file mode 100644 index 00000000000..996f9dfbbd4 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/test/Makefile.in @@ -0,0 +1,737 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 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@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +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@ +target_triplet = @target@ +noinst_PROGRAMS = zzipself$(EXEEXT) zzipsetstub$(EXEEXT) +subdir = test +DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_compile_check_sizeof.m4 \ + $(top_srcdir)/m4/ac_set_default_paths_system.m4 \ + $(top_srcdir)/m4/ac_sys_largefile_sensitive.m4 \ + $(top_srcdir)/m4/acx_restrict.m4 \ + $(top_srcdir)/m4/ax_cflags_gcc_option.m4 \ + $(top_srcdir)/m4/ax_cflags_no_writable_strings.m4 \ + $(top_srcdir)/m4/ax_cflags_strict_prototypes.m4 \ + $(top_srcdir)/m4/ax_cflags_warn_all.m4 \ + $(top_srcdir)/m4/ax_create_pkgconfig_info.m4 \ + $(top_srcdir)/m4/ax_enable_builddir_uname.m4 \ + $(top_srcdir)/m4/ax_expand_prefix.m4 \ + $(top_srcdir)/m4/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/m4/ax_not_enable_frame_pointer.m4 \ + $(top_srcdir)/m4/ax_prefix_config_h.m4 \ + $(top_srcdir)/m4/ax_set_version_info.m4 \ + $(top_srcdir)/m4/ax_spec_file.m4 \ + $(top_srcdir)/m4/ax_spec_package_version.m4 \ + $(top_srcdir)/m4/ax_warning_default_aclocaldir.m4 \ + $(top_srcdir)/m4/ax_warning_default_pkgconfig.m4 \ + $(top_srcdir)/m4/patch_libtool_on_darwin_zsh_overquoting.m4 \ + $(top_srcdir)/m4/patch_libtool_sys_lib_search_path_spec.m4 \ + $(top_srcdir)/m4/patch_libtool_to_add_host_cc.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/uses/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +PROGRAMS = $(noinst_PROGRAMS) +zzipself_SOURCES = zzipself.c +zzipself_OBJECTS = zzipself.$(OBJEXT) +zzipself_DEPENDENCIES = ../zzip/libzzip.la +zzipsetstub_SOURCES = zzipsetstub.c +zzipsetstub_OBJECTS = zzipsetstub.$(OBJEXT) +zzipsetstub_LDADD = $(LDADD) +depcomp = $(SHELL) $(top_srcdir)/uses/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = zzipself.c zzipsetstub.c +DIST_SOURCES = zzipself.c zzipsetstub.c +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONFIG_FILES = @CONFIG_FILES@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ -I$(top_builddir) -I$(top_srcdir) # also for automake 1.4 +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LARGEFILE_CFLAGS = @LARGEFILE_CFLAGS@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +MKZIP = @MKZIP@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PKG_CONFIG = @PKG_CONFIG@ +PYTHON = @PYTHON@ +RANLIB = @RANLIB@ +RELEASE_INFO = @RELEASE_INFO@ +RESOLVES = @RESOLVES@ +SDL = @SDL@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +THREAD_SAFE = @THREAD_SAFE@ +VERSION = @VERSION@ +VERSION_INFO = @VERSION_INFO@ +XMLTO = @XMLTO@ +ZIPTESTS = @ZIPTESTS@ +ZLIB_INCL = @ZLIB_INCL@ +ZLIB_LDIR = @ZLIB_LDIR@ +ZLIB_VERSION = @ZLIB_VERSION@ +ZZIPLIB_LDFLAGS = @ZZIPLIB_LDFLAGS@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_AS = @ac_ct_AS@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +aclocaldir = @aclocaldir@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +ax_enable_builddir_sed = @ax_enable_builddir_sed@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +docdir = @docdir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pkgconfig_libdir = @pkgconfig_libdir@ +pkgconfig_libfile = @pkgconfig_libfile@ +pkgconfigdir = @pkgconfigdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +AUTOMAKE_OPTIONS = 1.4 foreign +AUTOTOOL_VERSION = autoconf-2.52 automake-1.5 libtool-1.4.2 +DEFAULT_INCLUDES = # nothing - no default of -I. -I$(srcdir) +EXTRA_DIST = test.zip test1.zip +DISTCLEANFILES = test*.dat test2.zip test3.zip +zzcat = ../bins/zzcat$(EXEEXT) +zzdir = ../bins/zzdir$(EXEEXT) +zziptest = ../bins/zziptest$(EXEEXT) +zzxorcat = ../bins/zzxorcat$(EXEEXT) +zzxordir = ../bins/zzxordir$(EXEEXT) +zzxorcopy = ../bins/zzxorcopy$(EXEEXT) + +# ------------------------------------------------------------------- +NULL = /dev/null +README = $(top_srcdir)/README +testdatadir = $(top_srcdir)/testdata.d + +# ------------------------------------------------------------------- +stdtests = @ZIPTESTS@ check-test0 check-test1 check-zzdir check-zzcat +xortests = @ZIPTESTS@ check-zzxor check-zzxordir check-zzxorcat +sfxtests = @ZIPTESTS@ check-sfx + +# ------------------------------------------------------------------- +ECHON = echo -n +BRUTE = 0 # default is less than a thousand tests +zzipself_LDFLAGS = @ZZIPLIB_LDFLAGS@ +zzipself_LDADD = ../zzip/libzzip.la @RESOLVES@ -lz +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 \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign 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 + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +zzipself$(EXEEXT): $(zzipself_OBJECTS) $(zzipself_DEPENDENCIES) + @rm -f zzipself$(EXEEXT) + $(LINK) $(zzipself_LDFLAGS) $(zzipself_OBJECTS) $(zzipself_LDADD) $(LIBS) +zzipsetstub$(EXEEXT): $(zzipsetstub_OBJECTS) $(zzipsetstub_DEPENDENCIES) + @rm -f zzipsetstub$(EXEEXT) + $(LINK) $(zzipsetstub_LDFLAGS) $(zzipsetstub_OBJECTS) $(zzipsetstub_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zzipself.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zzipsetstub.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +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)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$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 + $(MAKE) $(AM_MAKEFLAGS) check-local +check: check-am +all-am: Makefile $(PROGRAMS) +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: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +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-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +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-info-am + +.PHONY: CTAGS GTAGS all all-am check check-am check-local clean \ + clean-generic clean-libtool clean-noinstPROGRAMS ctags \ + 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-exec install-exec-am install-info \ + install-info-am install-man 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 uninstall uninstall-am uninstall-info-am + + +$(zzcat) $(zzdir) $(zziptest) $(zzxorcat) $(zzxordir) $(xorcopy) : \ + @top_srcdir@/bins/*.c @top_srcdir@/zzip/*.c + (cd ../bins && $(MAKE)) + +testzip testzips : test.zip test1.zip test2.zip test3.zip + +test.zip tmp/../test.zip : $(README) + - test -d tmp || mkdir tmp + - $(MAKE) test0.zip && mv test0.zip $@ + test -s $@ || cp $(srcdir)/test.zip $@ +test0.zip : $(README) + test -f README || ln -s $(README) . + - $(MKZIP) test_.zip README + @ if test -s test_.zip ;then echo mv test_.zip $@ ; mv test_.zip $@ ;fi + @ test -d $(testdatadir) || mkdir $(testdatadir); if test -s $@ \ + ; then echo cp $@ $(testdatadir)/ ; cp $@ $(testdatadir)/ \ + ; else echo cp $(testdatadir)/$@ .; cp $(testdatadir)/$@ . \ + ; fi ; echo test -s $@ ; test -s $@ + +test1.zip : + @ echo $(MKZIP) $@ ... "(10 files)" \ + ; mkdir test.tmp \ + ; for i in 1 2 3 4 5 6 8 9 \ + ; do echo "file-$i" >test.tmp/file.$$i ; done \ + ; echo " a plain text file here" >test.tmp/README \ + ; (cd test.tmp && $(MKZIP) ../$@ file.* >$(NULL)) \ + ; rm -rf test.tmp + @ test -d $(testdatadir) || mkdir $(testdatadir); if test -s $@ \ + ; then echo cp $@ $(testdatadir)/ ; cp $@ $(testdatadir)/ \ + ; else echo cp $(testdatadir)/$@ .; cp $(testdatadir)/$@ . \ + ; fi ; echo test -s $@ ; test -s $@ + +test2.zip : # will not be shipped in source tarball + @ echo $(MKZIP) $@ ... "(100 files)" \ + ; mkdir test.tmp \ + ; for i in 1 2 3 4 5 6 8 9 ; do for j in 1 2 3 4 5 6 7 8 9 \ + ; do echo "file-$i" >test.tmp/file.$$j$$i ; done done \ + ; (cd test.tmp && $(MKZIP) ../$@ file.* >$(NULL)) \ + ; rm -rf test.tmp + @ test -d $(testdatadir) || mkdir $(testdatadir); if test -s $@ \ + ; then echo cp $@ $(testdatadir)/ ; cp $@ $(testdatadir)/ \ + ; else echo cp $(testdatadir)/$@ .; cp $(testdatadir)/$@ . \ + ; fi ; echo test -s $@ ; test -s $@ + +test3.zip : # will not be shipped in source tarball + @ echo $(MKZIP) $@ ... "(1000 files)" \ + ; mkdir test.tmp ; for h in 1 2 3 4 5 6 7 8 9 ; do : \ + ; for i in 1 2 3 4 5 6 8 9 ; do for j in 1 2 3 4 5 6 7 8 9 \ + ; do echo "file-$i" >test.tmp/file.$$h$$j$$i ; done done done \ + ; (cd test.tmp && $(MKZIP) ../$@ file.* >$(NULL)) \ + ; rm -rf test.tmp + @ test -d $(testdatadir) || mkdir $(testdatadir); if test -s $@ \ + ; then echo cp $@ $(testdatadir)/ ; cp $@ $(testdatadir)/ \ + ; else echo cp $(testdatadir)/$@ .; cp $(testdatadir)/$@ . \ + ; fi ; echo test -s $@ ; test -s $@ + +test.dat : test.zip + $(zzxorcopy) $? $@ +test1.dat : test1.zip + $(zzxorcopy) $? $@ +test2.dat : test2.zip + $(zzxorcopy) $? $@ +test3.dat : test3.zip + $(zzxorcopy) $? $@ + +check-local: check-readme $(stdtests) $(xortests) $(sfxtests) + +check-readme : $(zzcat) test.zip + @ test -f test.zip || $(MAKE) tmp/../test.zip + test -s test.zip + @ echo :$@: checking $(zzcat) test/README + @ $(zzcat) test/README >test.out + @ if diff test.out $(README) >$(NULL) \ + ; then rm test.out ; echo check OK ; true \ + ; else rm test.out ; echo check FAIL ; false ; fi + +check-zzxor : $(zzxorcat) test.dat + @ echo :$@: checking $(zzxorcat) test.dat/README + @ $(zzxorcat) test.dat/README >test.out + @ if diff test.out $(README) >$(NULL) \ + ; then rm test.out ; echo check OK ; true \ + ; else rm test.out ; echo check FAIL ; false ; fi + +test: test0 test1 test2 test3 +test0: $(zziptest) + $(zziptest) test.zip +test1: $(zziptest) + $(zziptest) test1.zip +test2: $(zzcat) + $(zzcat) test/README +test3: $(zzdir) + $(zzdir) test1.zip + +check-test0 : $(zziptest) + @ echo :$@: quick selftest + $(zziptest) test.zip >test.out + rm test.out +check-test1 : $(zziptest) + @ test -f test1.zip || ln -s $(srcdir)/test1.zip test1.zip + @ echo :$@: longer selftest "(about ten seconds)" + $(zziptest) test1.zip >test.out + rm test.out + +check-zzdir : test1.zip test2.zip test3.zip $(zzdir) + @ echo :$@: zip directory access + ./$(zzdir) test1 > test.out + @ X="$(zzdir) test1 "\ + ; if grep file.1 test.out >$(NULL) ; then : \ + ; if grep file.9 test.out >$(NULL) ; then : \ + ; echo ..$$X.. OK ; true ; else echo ..$$X.. FAIL ; false ; fi fi + ./$(zzdir) test2 > test.out + @ X="$(zzdir) test2 "\ + ; if grep file.11 test.out >$(NULL) ; then : \ + ; if grep file.99 test.out >$(NULL) ; then : \ + ; echo ..$$X.. OK ; true ; else echo ..$$X.. FAIL ; false ; fi fi + ./$(zzdir) test3 > test.out + @ X="$(zzdir) test3 "\ + ; if grep file.111 test.out >$(NULL) ; then : \ + ; if grep file.999 test.out >$(NULL) ; then : \ + ; echo ..$$X.. OK ; true ; else echo ..$$X.. FAIL ; false ; fi fi + @ X="$(zzdir) test000" ; echo ./$$X "(negative test)" \ + ; if ./$(zzdir) test000 >test.out ; then : \ + ; echo ..$$X.. FAIL ; false ; else echo ..$$X.. OK ; true ; fi + rm test.out + +check-zzcat : test1.zip test2.zip test3.zip $(zzcat) + @ echo ___ $@ ___ + ./$(zzcat) test1/file.1 test1/file.9 > test.out + @ X="$(zzcat) test1/file.1 test1/file.9 "\ + ; if grep file-1 test.out >$(NULL) ; then : \ + ; if grep file-9 test.out >$(NULL) ; then : \ + ; echo ..$$X.. OK ; true ; else echo ..$$X.. FAIL ; false ; fi fi + ./$(zzcat) test2/file.11 test2/file.99 > test.out + @ X="$(zzcat) test2/file.10 test2/file.99 "\ + ; if grep file-10 test.out >$(NULL) ; then : \ + ; if grep file-99 test.out >$(NULL) ; then : \ + ; echo ..$$X.. OK ; true ; else echo ..$$X.. FAIL ; false ; fi fi + ./$(zzcat) test3/file.111 test3/file.999 > test.out + @ X="$(zzcat) test3/file.111 test3/file.999 "\ + ; if grep file-100 test.out >$(NULL) ; then : \ + ; if grep file-999 test.out >$(NULL) ; then : \ + ; echo ..$$X.. OK ; true ; else echo ..$$X.. FAIL ; false ; fi fi + @ X="$(zzcat) test1/file.999" ; echo ./$$X "(negative test)" \ + ; if ./$(zzdir) test1/file.999 >test.out ; then : \ + ; echo ..$$X.. FAIL ; false ; else echo ..$$X.. OK ; true ; fi + rm test.out + +check-zzxordir : test1.dat test2.dat $(zzxordir) + @ echo ___ $@ ___ + ./$(zzxordir) test1 > test.out + @ X="$(zzxordir) test1 "\ + ; if grep file.1 test.out >$(NULL) ; then : \ + ; if grep file.9 test.out >$(NULL) ; then : \ + ; echo ..$$X.. OK ; true ; else echo ..$$X.. FAIL ; false ; fi fi + ./$(zzxordir) test2.dat > test.out + @ X="$(zzxordir) test2.dat "\ + ; if grep file.11 test.out >$(NULL) ; then : \ + ; if grep file.99 test.out >$(NULL) ; then : \ + ; echo ..$$X.. OK ; true ; else echo ..$$X.. FAIL ; false ; fi fi + rm test.out + +check-zzxorcat : test1.dat test2.dat $(zzxorcat) + @ echo ___ $@ ___ + ./$(zzxorcat) test1/file.1 test1/file.9 > test.out + @ X="$(zzxorcat) test1/file.1 test1/file.9 "\ + ; if grep file-1 test.out >$(NULL) ; then : \ + ; if grep file-9 test.out >$(NULL) ; then : \ + ; echo ..$$X.. OK ; true ; else echo ..$$X.. FAIL ; false ; fi fi + ./$(zzxorcat) test2.dat/file.11 test2/file.99 > test.out + @ X="$(zzxorcat) test2.dat/file.10 test2/file.99 "\ + ; if grep file-10 test.out >$(NULL) ; then : \ + ; if grep file-99 test.out >$(NULL) ; then : \ + ; echo ..$$X.. OK ; true ; else echo ..$$X.. FAIL ; false ; fi fi + rm test.out +brute : # which is still a brute force selftest + @ echo $(MKZIP) $@: \ + ; for u in 1 2 3 4 5 6 8 9 ; do for v in 1 2 3 4 5 6 7 8 9 ; do : \ + ; for w in 1 2 3 4 5 6 8 9 ; do for x in $(BRUTE) ; do : \ + ; $(ECHON) $$u$$v$$w$$x: \ + ; rm -rf test.tmp ; mkdir test.tmp \ + ; for i in 1 2 3 4 5 6 8 9 ; do for j in 1 2 3 4 5 6 7 8 9 ; do : \ + ; for m in 1 2 3 4 5 6 8 9 ; do for n in $(BRUTE) ; do : \ + ; echo "file-$$i$$j$$m$$n" >test.tmp/file$$i$$j$$m$$n.txt \ + ; test "$$i$$j$$m$$n" = "$$u$$v$$w$$x" && break \ + ; done ; test "$$i$$j$$m$$n" = "$$u$$v$$w$$x" && break \ + ; done ; test "$$i$$j$$m$$n" = "$$u$$v$$w$$x" && break \ + ; done ; test "$$i$$j$$m$$n" = "$$u$$v$$w$$x" && break \ + ; done ; test -f test.tmp/file$$i$$j$$m$$n.txt || exit 2 \ + ; (cd test.tmp && $(MKZIP) ../test$$u$$v$$w$$x.zip file*.* >$(NULL)) \ + ; rm -rf test.tmp \ + ; for i in 1 2 3 4 5 6 8 9 ; do for j in 1 2 3 4 5 6 7 8 9 ; do : \ + ; for m in 1 2 3 4 5 6 8 9 ; do for n in $(BRUTE) ; do : \ + ; ./$(zzcat) test$$u$$v$$w$$x/file$$i$$j$$m$$n.txt >test.out \ + ; if grep file-$$i$$j$$m$$n test.out >$(NULL) ; then rm test.out \ + ; else echo ERROR file-$$i$$j$$m$$n diff in test$$u$$v$$w$$x \ + ; exit 1 ; fi \ + ; ./$(zzdir) test$$u$$v$$w$$x >test.out \ + ; if grep file$$i$$j$$m$$n.txt test.out >$(NULL) ; then rm test.out \ + ; else echo ERROR file$$i$$j$$m$$n.txt not in test$$u$$v$$w$$x \ + ; exit 1 ; fi \ + ; test "$$i$$j$$m$$n" = "$$u$$v$$w$$x" && break \ + ; done ; test "$$i$$j$$m$$n" = "$$u$$v$$w$$x" && break \ + ; done ; test "$$i$$j$$m$$n" = "$$u$$v$$w$$x" && break \ + ; done ; test "$$i$$j$$m$$n" = "$$u$$v$$w$$x" && break \ + ; done ; rm test$$u$$v$$w$$x.zip \ + ; done ; done ; done ; done ; true + +../zzip/libzzip.la : @top_srcdir@/zzip/*.c + (cd ../zzip && $(MAKE) `basename $@`) + +zzshowme$(EXEEXT) : zzipself$(EXEEXT) zzipsetstub$(EXEEXT) + $(MKZIP) -0 -j $@ .libs/zzipself$(EXEEXT) + $(MKZIP) -9 -j $@ $(README) + - test -s $@ || cp test2.zip $@ + test ! -f $@.zip || mv $@.zip $@ + ./zzipsetstub $@ .libs/zzipself$(EXEEXT) + - chmod +x $@ + +check-sfx : zzshowme$(EXEEXT) + echo :$@: "./zzshowme readme >readme.out 2>readme.err" + export LD_LIBRARY_PATH="../zzip/.libs:$$LD_LIBRARY_PATH" \ + ; ./zzshowme readme >readme.out 2>readme.err ; true + @ echo 'diff readme.out $(README) || grep "libzzip-" readme.err' \ + ; if test -s readme.out ; then diff readme.out $(README) \ + ; else grep "libzzip-" readme.err || echo "readme.out is empty!" ; fi + rm readme.out readme.err +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/test/README b/Build/source/libs/zziplib/zziplib-0.13.58/test/README new file mode 100644 index 00000000000..5668eda043a --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/test/README @@ -0,0 +1,47 @@ +PROJECT + The zziplib provides read access to zipped files in a zip-archive, + using compression based solely on free algorithms provided by zlib. + It also provides a functionality to overlay the archive filesystem + with the filesystem of the operating system environment. + +AUTHOR + The project was originally written by Tomi Ollila, later largely + rewritten by Guido Draheim, and extended with contributions in + the years to follow. Guido Draheim <guidod@gmx.de> holds the full + copyright to the zziplib sources. + +COPYING + The zziplib may be used freely under the restrictions of the + GNU Lesser General Public License version 2 or later. Alternativly + the Mozilla Public license can be chosen. The sources are under + a dual license, as long as the MPL hint is not removed, the modified + files will be again under a dual license for the final recipient. + +LICENSING + If you can not use a dynalinked library according to LGPL rules, + then look at docs/copying.htm for a few hints. Generally the LGPL + has a way for staticlinking as well as the MPL has a way. Anyway, + special (paid) licenses can be negotiated with the copyright holder. + +HOMEPAGE + The zziplib project is hosted at SourceForge, the complete + documentation can be found at http://zziplib.sf.net - the + SourceForge servers are also used to distribute the sources + of the zziplib project. Releases are announced via the + freshmeat services on http://freshmeat.net/projects/zziplib + +INSTALLATION + The zziplib sources are built with gnu autotools and they should + be easy to install on unixish systems via the usual sequence of + `configure && make && make check && make install`. Many distributors + ship prebuilt packages e.g. in rpm format. Additionally there are + MSVC project files shipped along for usage with the Microsoft + VisualC series of compilers. There should be no problem either + when crosscompiling the zziplib for a third host platform. + +MAINTAINANCE + The zziplib library is intentionally a lightweight interface to + zip files. The author take patches but please consider to put + complex extensions into separate modules rather than implanting them + right into the core of the library engine. All Patches and Bug Reports + should be sent to Guido Draheim <guidod@gmx.de>. diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/test/test.zip b/Build/source/libs/zziplib/zziplib-0.13.58/test/test.zip Binary files differnew file mode 100644 index 00000000000..8f361c77f3f --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/test/test.zip diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/test/test1.zip b/Build/source/libs/zziplib/zziplib-0.13.58/test/test1.zip Binary files differnew file mode 100644 index 00000000000..c46015d9431 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/test/test1.zip diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/test/zzipself.c b/Build/source/libs/zziplib/zziplib-0.13.58/test/zzipself.c new file mode 100644 index 00000000000..2cd115e75af --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/test/zzipself.c @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2000,2001,2002 Guido Draheim <guidod@gmx.de> + * Use freely under the restrictions of the ZLIB License + */ + +#include <stdio.h> +#include <stdlib.h> +#include <zzip/zzip.h> + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +static const char usage[] = +{ + " zzipself <file>... \n" + " - prints the file to stdout, so you may want to redirect the output; \n" + " the file can be a normal file or an inflated part of a zip-archive, \n" + " however in this case the zip-archive happens to be the executed\n" + " binary itself, as if this program is a self-extract header of a zip. \n" + " zzipself README # same as # zzcat zzipself/README \n" +}; + +int +main (int argc, char ** argv) +{ + int status = 0; + int argn; + if (argc <= 1) + { + printf (usage); + exit (0); + } + + for (argn=1; argn < argc; argn++) + { + /* ZZIP_FILE* fp = zzip_fopen (argv[0]+"/"+argv[argn], "rbi"); */ + /* .... = zzip_open (argv[0]+"/"+argv[argn], O_RDONLY|O_BINARY, + * ZZIP_CASELESS|ZZIP_ONLYZIP, ext, 0); */ + + static const char* ext[] = { "", ".exe", ".EXE", 0 }; + ZZIP_FILE* fp; + ZZIP_DIR* zip = zzip_opendir_ext_io (argv[0], + ZZIP_CASELESS|ZZIP_ONLYZIP, ext, 0); + + if (! zip) { perror(argv[0]); break; } + + fp = zzip_file_open (zip, argv[argn], ZZIP_CASELESS); + + if (! fp) + { + perror (argv[argn]); + continue; + }else{ + char buf[17]; + int n; + + /* read chunks of 16 bytes into buf and print them to stdout */ + while (0 < (n = zzip_read(fp, buf, 16))) + { + buf[n] = '\0'; +# ifdef STDOUT_FILENO + write (STDOUT_FILENO, buf, n); +# else + fwrite (buf, 1, n, stdout); +# endif + } + + if (n == -1) + { + perror (argv[argn]); + status ++; + } + } + + zzip_file_close (fp); + zzip_closedir (zip); + } + + return status; +} + +/* + * Local variables: + * c-file-style: "stroustrup" + * End: + */ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/test/zzipsetstub.c b/Build/source/libs/zziplib/zziplib-0.13.58/test/zzipsetstub.c new file mode 100644 index 00000000000..5d5ad0c903b --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/test/zzipsetstub.c @@ -0,0 +1,61 @@ +#include <stdio.h> +#include <stdlib.h> + +static const char usage[] = +{ + "zzipsetstub <zipfile> <zipsfxstub>... \n" + " overwrite the header of the zipfile with the sfxstub code.\n" + " this is usually the last step in creating a selfextract archive\n" + " or an application with all its data appended as a zip.\n" +}; + +int +main (int argc, char ** argv) +{ + int argn; + if (argc <= 2) + { + printf (usage); + exit (0); + } + + { + char buf[17]; int n; + char* zipfile = 0; FILE* zipFILE = 0; + char* sfxfile = 0; FILE* sfxFILE = 0; + + for (argn=1; argn < argc; argn++) + { + if (argv[argn][0] == '-') continue; + if (! zipfile) { zipfile = argv[argn]; continue; } + if (! sfxfile) { sfxfile = argv[argn]; continue; } + /* superflous argument */ + } + + zipFILE = fopen (zipfile, "r+b"); + if (! zipFILE) { perror (zipfile); return 1; } + + sfxFILE = fopen (sfxfile, "rb"); + if (! sfxFILE) { perror (sfxfile); return 1; } + + while (0 < (n = fread(buf, 1, 16, sfxFILE))) + { + buf[n] = '\0'; + fwrite (buf, 1, n, zipFILE); + } + + if (n == -1) + perror (argv[argn]); + + fclose (sfxFILE); + fclose (zipFILE); + } + + return 0; +} + +/* + * Local variables: + * c-file-style: "stroustrup" + * End: + */ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/Makefile b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/Makefile new file mode 100644 index 00000000000..0380cd25c4d --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/Makefile @@ -0,0 +1,22 @@ + +top_srcdir = ../../../../libs/zziplib +srcdir = $(top_srcdir)/zzip + +CC = gcc +AR = ar cru +RANLIB = ranlib + +OBJECTS =dir.o err.o fetch.o file.o info.o memdisk.o mmapped.o \ + plugin.o stat.o write.o zip.o + +_CFLAGS = -DHAVE_CONFIG_H -I.. -I../../../../libs/zziplib -I../../../../libs/zlib + +XCFLAGS = $(_CFLAGS) + +all: $(OBJECTS) + $(AR) libzzip.a $(OBJECTS) + $(RANLIB) libzzip.a + +%.o: $(srcdir)/%.c + $(CC) $(CFLAGS) $(XCFLAGS) -c $< -o $@ + diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/Makefile.am b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/Makefile.am new file mode 100644 index 00000000000..95fb8f17f78 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/Makefile.am @@ -0,0 +1,142 @@ +AUTOMAKE_OPTIONS = 1.5 foreign +AUTOTOOL_VERSION=autoconf-2.52 automake-1.5 libtool-1.4.2 +DEFAULT_INCLUDES = # nothing - no default of -I. -I$(srcdir) +DEFS = @DEFS@ -I$(top_builddir) -I$(top_srcdir) # also for automake 1.4 + +lib_LTLIBRARIES = libzzip.la libzzipmmapped.la libzzipfseeko.la +zzipdir = ${includedir}/zzip +zzip_HEADERS = $(libzzip_la_headers) \ + $(libzzipmmapped_la_headers) \ + $(libzzipfseeko_la_headers) +noinst_HEADERS = __debug.h __hints.h __mmap.h __dirent.h __fnmatch.h +# +VERSION_INFO=@VERSION_INFO@ +RELEASE_INFO=@RELEASE_INFO@ +THREAD_SAFE=@THREAD_SAFE@ +# + +libzzip_la_SOURCES = \ + zip.c \ + file.c \ + dir.c \ + stat.c \ + info.c \ + err.c \ + plugin.c \ + write.c \ + fetch.c +libzzip_la_headers = \ + stdint.h \ + file.h \ + plugin.h \ + lib.h \ + zzip.h \ + fetch.h \ + format.h \ + info.h \ + autoconf.h \ + types.h \ + conf.h \ + _config.h \ + _msvc.h +libzzip_la_LDFLAGS= @ZZIPLIB_LDFLAGS@ $(RELEASE_INFO) $(VERSION_INFO) \ + $(THREAD_SAFE) +libzzip_la_LIBADD= -lz @RESOLVES@ + +libzzipmmapped_la_SOURCES = mmapped.c memdisk.c fetch.c +libzzipmmapped_la_headers = mmapped.h memdisk.h fetch.h +libzzipmmapped_la_LDFLAGS= @ZZIPLIB_LDFLAGS@ $(RELEASE_INFO) $(VERSION_INFO) \ + $(THREAD_SAFE) +libzzipmmapped_la_LIBADD= -lz @RESOLVES@ + +libzzipfseeko_la_SOURCES = fseeko.c fetch.c +libzzipfseeko_la_headers = fseeko.h fetch.h +libzzipfseeko_la_LDFLAGS= @ZZIPLIB_LDFLAGS@ $(RELEASE_INFO) $(VERSION_INFO) \ + $(THREAD_SAFE) +libzzipfseeko_la_LIBADD= -lz @RESOLVES@ + +WCC10_DIST = zziplib.wpj +WCC10_CLEAN = *.obj *.lk1 *.mk1 *.mk *.sym *.tgt + +EXTRA_DIST = $(WCC10_DIST) _msvc.sed +CONFIG_CLEAN_FILES = _config.h +MAINTAINERCLEANFILES = _msvc.h +CLEANFILES = $(WCC10_CLEAN) *.pc *.omf + +# here is some backward compatibility with version 0.10.* of zziplib +install-data-local : install-zzipHEADERS + echo '#ifndef ZZIP_WARNING' > $(DESTDIR)$(includedir)/zzip.h + echo '#define ZZIP_WARNING 1' >>$(DESTDIR)$(includedir)/zzip.h + echo '#ifdef __GNUC__' >>$(DESTDIR)$(includedir)/zzip.h + echo '#warning do no not use <zzip.h>, update to include <zzip/lib.h>'\ + >>$(DESTDIR)$(includedir)/zzip.h + echo '#else' >>$(DESTDIR)$(includedir)/zzip.h + echo '#error do no not use <zzip.h>, update to include <zzip/lib.h>'\ + >>$(DESTDIR)$(includedir)/zzip.h + echo '#endif' >>$(DESTDIR)$(includedir)/zzip.h + echo '#endif' >>$(DESTDIR)$(includedir)/zzip.h + echo '#include "zzip/lib.h"' >>$(DESTDIR)$(includedir)/zzip.h + sed -e 's|zzip.h|zziplib.h|' -e 's|zzip/lib.h|zzip/zzip.h|' \ + $(DESTDIR)$(includedir)/zzip.h >$(DESTDIR)$(includedir)/zziplib.h + sed -e 's|zzip.h|zzip-io.h|' -e 's|zzip/lib.h|zzip/plugin.h|' \ + $(DESTDIR)$(includedir)/zzip.h >$(DESTDIR)$(includedir)/zzip-io.h + +install-exec-local: + @ for i in . $(DESTDIR)$(libdir)/libzzip*.so.13 \ + ; do test -d $$i && continue ; lib=`basename "$$i" .so.13` \ + ; echo "$(DESTDIR)$(libdir): ln -s $$lib.so.13 $$lib.so.10" \ + ; (cd $(DESTDIR)$(libdir) && ln -s $$lib.so.13 $$lib.so.10) \ + ; echo "$(DESTDIR)$(libdir): ln -s $$lib.so.13 $$lib.so.11" \ + ; (cd $(DESTDIR)$(libdir) && ln -s $$lib.so.13 $$lib.so.11) \ + ; echo "$(DESTDIR)$(libdir): ln -s $$lib.so.13 $$lib.so.12" \ + ; (cd $(DESTDIR)$(libdir) && ln -s $$lib.so.13 $$lib.so.12) \ + ; done ; true + +uninstall-local : + (cd $(DESTDIR)$(includedir) && rm zziplib.h zzip.h zzip-io.h) + + +# ---------------------------------------------------------------------- +pkgconfigdir=$(libdir)/pkgconfig +pkgconfig_HEADERS= zzip-zlib-config.pc zziplib.pc \ + zzipmmapped.pc zzipfseeko.pc + +zziplib.pc : Makefile + (cd .. && sh config.status zzip/zziplib.pc) + +zzip-zlib-config.pc : Makefile + @ echo "zlib_libs=@ZLIB_LDIR@ -lz" >$@ + @ echo "zlib_cflags=@ZLIB_INCL@" >>$@ + @ echo " " >>$@ + @ echo "Name: zzip-zlib-config" >>$@ + @ echo "Version: @ZLIB_VERSION@" >>$@ + @ echo "Description: ZLib Config (for ZZipLib)" >>$@ + echo 'Libs: $${zlib_libs}' >>$@ + echo 'Cflags: $${zlib_cflags}' >>$@ + +zzipmmapped.pc : zziplib.pc + sed -e 's/-lzzip/-lzzipmmapped/' -e 's/zziplib/zzipmmapped/' \ + zziplib.pc >$@ +zzipfseeko.pc : zziplib.pc + sed -e 's/-lzzip/-lzzipfseeko/' -e 's/zziplib/zzipfseeko/' \ + zziplib.pc >$@ + +__zziplib.pc : Makefile + @ echo "prefix=$(prefix)" >$@ + @ echo "libdir=$(libdir)" >>$@ + @ echo "includedir=$(includedir)" >>$@ + @ echo "largefile=$(LARGEFILE_CFLAGS)" >>$@ + @ echo "zlib_libs=@ZLIB_LDIR@ -lz" >>$@ + @ echo "zlib_cflags=@ZLIB_INCL@" >>$@ + @ echo " " >>$@ + @ echo "Name: zziplib" >>$@ + @ echo "Version: $(VERSION)" >>$@ + @ head $(top_srcdir)/$(PACKAGE).spec \ + | grep Summary | sed -e s,Summary,Description, >> $@ + echo 'Requires: zzip-zlib-config' >>$@ + echo 'Libs: -L$${libdir} -lzzip' >>$@ + echo 'Cflags: $${largefile} -I$${includedir}' >>$@ + +# ---------------------------------------------------------------------- +.c.i : + $(COMPILE) -E $< >$@ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/Makefile.in b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/Makefile.in new file mode 100644 index 00000000000..695af34ae04 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/Makefile.in @@ -0,0 +1,712 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 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@ + + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +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@ +target_triplet = @target@ +subdir = zzip +DIST_COMMON = $(noinst_HEADERS) $(pkgconfig_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in $(zzip_HEADERS) +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_compile_check_sizeof.m4 \ + $(top_srcdir)/m4/ac_set_default_paths_system.m4 \ + $(top_srcdir)/m4/ac_sys_largefile_sensitive.m4 \ + $(top_srcdir)/m4/acx_restrict.m4 \ + $(top_srcdir)/m4/ax_cflags_gcc_option.m4 \ + $(top_srcdir)/m4/ax_cflags_no_writable_strings.m4 \ + $(top_srcdir)/m4/ax_cflags_strict_prototypes.m4 \ + $(top_srcdir)/m4/ax_cflags_warn_all.m4 \ + $(top_srcdir)/m4/ax_create_pkgconfig_info.m4 \ + $(top_srcdir)/m4/ax_enable_builddir_uname.m4 \ + $(top_srcdir)/m4/ax_expand_prefix.m4 \ + $(top_srcdir)/m4/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/m4/ax_not_enable_frame_pointer.m4 \ + $(top_srcdir)/m4/ax_prefix_config_h.m4 \ + $(top_srcdir)/m4/ax_set_version_info.m4 \ + $(top_srcdir)/m4/ax_spec_file.m4 \ + $(top_srcdir)/m4/ax_spec_package_version.m4 \ + $(top_srcdir)/m4/ax_warning_default_aclocaldir.m4 \ + $(top_srcdir)/m4/ax_warning_default_pkgconfig.m4 \ + $(top_srcdir)/m4/patch_libtool_on_darwin_zsh_overquoting.m4 \ + $(top_srcdir)/m4/patch_libtool_sys_lib_search_path_spec.m4 \ + $(top_srcdir)/m4/patch_libtool_to_add_host_cc.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/uses/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +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 = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \ + "$(DESTDIR)$(zzipdir)" +libLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(lib_LTLIBRARIES) +libzzip_la_DEPENDENCIES = +am_libzzip_la_OBJECTS = zip.lo file.lo dir.lo stat.lo info.lo err.lo \ + plugin.lo write.lo fetch.lo +libzzip_la_OBJECTS = $(am_libzzip_la_OBJECTS) +libzzipfseeko_la_DEPENDENCIES = +am_libzzipfseeko_la_OBJECTS = fseeko.lo fetch.lo +libzzipfseeko_la_OBJECTS = $(am_libzzipfseeko_la_OBJECTS) +libzzipmmapped_la_DEPENDENCIES = +am_libzzipmmapped_la_OBJECTS = mmapped.lo memdisk.lo fetch.lo +libzzipmmapped_la_OBJECTS = $(am_libzzipmmapped_la_OBJECTS) +depcomp = $(SHELL) $(top_srcdir)/uses/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(libzzip_la_SOURCES) $(libzzipfseeko_la_SOURCES) \ + $(libzzipmmapped_la_SOURCES) +DIST_SOURCES = $(libzzip_la_SOURCES) $(libzzipfseeko_la_SOURCES) \ + $(libzzipmmapped_la_SOURCES) +pkgconfigHEADERS_INSTALL = $(INSTALL_HEADER) +zzipHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(noinst_HEADERS) $(pkgconfig_HEADERS) $(zzip_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONFIG_FILES = @CONFIG_FILES@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ -I$(top_builddir) -I$(top_srcdir) # also for automake 1.4 +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LARGEFILE_CFLAGS = @LARGEFILE_CFLAGS@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +MKZIP = @MKZIP@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PKG_CONFIG = @PKG_CONFIG@ +PYTHON = @PYTHON@ +RANLIB = @RANLIB@ +RELEASE_INFO = @RELEASE_INFO@ +RESOLVES = @RESOLVES@ +SDL = @SDL@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +THREAD_SAFE = @THREAD_SAFE@ +VERSION = @VERSION@ +# +VERSION_INFO = @VERSION_INFO@ +XMLTO = @XMLTO@ +ZIPTESTS = @ZIPTESTS@ +ZLIB_INCL = @ZLIB_INCL@ +ZLIB_LDIR = @ZLIB_LDIR@ +ZLIB_VERSION = @ZLIB_VERSION@ +ZZIPLIB_LDFLAGS = @ZZIPLIB_LDFLAGS@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_AS = @ac_ct_AS@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +aclocaldir = @aclocaldir@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +ax_enable_builddir_sed = @ax_enable_builddir_sed@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +docdir = @docdir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pkgconfig_libdir = @pkgconfig_libdir@ +pkgconfig_libfile = @pkgconfig_libfile@ + +# ---------------------------------------------------------------------- +pkgconfigdir = $(libdir)/pkgconfig +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +AUTOMAKE_OPTIONS = 1.5 foreign +AUTOTOOL_VERSION = autoconf-2.52 automake-1.5 libtool-1.4.2 +DEFAULT_INCLUDES = # nothing - no default of -I. -I$(srcdir) +lib_LTLIBRARIES = libzzip.la libzzipmmapped.la libzzipfseeko.la +zzipdir = ${includedir}/zzip +zzip_HEADERS = $(libzzip_la_headers) \ + $(libzzipmmapped_la_headers) \ + $(libzzipfseeko_la_headers) + +noinst_HEADERS = __debug.h __hints.h __mmap.h __dirent.h __fnmatch.h +# +libzzip_la_SOURCES = \ + zip.c \ + file.c \ + dir.c \ + stat.c \ + info.c \ + err.c \ + plugin.c \ + write.c \ + fetch.c + +libzzip_la_headers = \ + stdint.h \ + file.h \ + plugin.h \ + lib.h \ + zzip.h \ + fetch.h \ + format.h \ + info.h \ + autoconf.h \ + types.h \ + conf.h \ + _config.h \ + _msvc.h + +libzzip_la_LDFLAGS = @ZZIPLIB_LDFLAGS@ $(RELEASE_INFO) $(VERSION_INFO) \ + $(THREAD_SAFE) + +libzzip_la_LIBADD = -lz @RESOLVES@ +libzzipmmapped_la_SOURCES = mmapped.c memdisk.c fetch.c +libzzipmmapped_la_headers = mmapped.h memdisk.h fetch.h +libzzipmmapped_la_LDFLAGS = @ZZIPLIB_LDFLAGS@ $(RELEASE_INFO) $(VERSION_INFO) \ + $(THREAD_SAFE) + +libzzipmmapped_la_LIBADD = -lz @RESOLVES@ +libzzipfseeko_la_SOURCES = fseeko.c fetch.c +libzzipfseeko_la_headers = fseeko.h fetch.h +libzzipfseeko_la_LDFLAGS = @ZZIPLIB_LDFLAGS@ $(RELEASE_INFO) $(VERSION_INFO) \ + $(THREAD_SAFE) + +libzzipfseeko_la_LIBADD = -lz @RESOLVES@ +WCC10_DIST = zziplib.wpj +WCC10_CLEAN = *.obj *.lk1 *.mk1 *.mk *.sym *.tgt +EXTRA_DIST = $(WCC10_DIST) _msvc.sed +CONFIG_CLEAN_FILES = _config.h +MAINTAINERCLEANFILES = _msvc.h +CLEANFILES = $(WCC10_CLEAN) *.pc *.omf +pkgconfig_HEADERS = zzip-zlib-config.pc zziplib.pc \ + zzipmmapped.pc zzipfseeko.pc + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .i .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 \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign zzip/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign zzip/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 +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + else :; fi; \ + done + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libzzip.la: $(libzzip_la_OBJECTS) $(libzzip_la_DEPENDENCIES) + $(LINK) -rpath $(libdir) $(libzzip_la_LDFLAGS) $(libzzip_la_OBJECTS) $(libzzip_la_LIBADD) $(LIBS) +libzzipfseeko.la: $(libzzipfseeko_la_OBJECTS) $(libzzipfseeko_la_DEPENDENCIES) + $(LINK) -rpath $(libdir) $(libzzipfseeko_la_LDFLAGS) $(libzzipfseeko_la_OBJECTS) $(libzzipfseeko_la_LIBADD) $(LIBS) +libzzipmmapped.la: $(libzzipmmapped_la_OBJECTS) $(libzzipmmapped_la_DEPENDENCIES) + $(LINK) -rpath $(libdir) $(libzzipmmapped_la_LDFLAGS) $(libzzipmmapped_la_OBJECTS) $(libzzipmmapped_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dir.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/err.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fetch.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fseeko.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memdisk.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmapped.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zip.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +install-pkgconfigHEADERS: $(pkgconfig_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)" + @list='$(pkgconfig_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgconfigHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + $(pkgconfigHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done + +uninstall-pkgconfigHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done +install-zzipHEADERS: $(zzip_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(zzipdir)" || $(mkdir_p) "$(DESTDIR)$(zzipdir)" + @list='$(zzip_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(zzipHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(zzipdir)/$$f'"; \ + $(zzipHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(zzipdir)/$$f"; \ + done + +uninstall-zzipHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(zzip_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(zzipdir)/$$f'"; \ + rm -f "$(DESTDIR)$(zzipdir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +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)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$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)$(pkgconfigdir)" "$(DESTDIR)$(zzipdir)"; 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: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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 "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-data-local install-pkgconfigHEADERS \ + install-zzipHEADERS + +install-exec-am: install-exec-local install-libLTLIBRARIES + +install-info: install-info-am + +install-man: + +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-info-am uninstall-libLTLIBRARIES \ + uninstall-local uninstall-pkgconfigHEADERS \ + uninstall-zzipHEADERS + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool ctags 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-data-local install-exec install-exec-am \ + install-exec-local install-info install-info-am \ + install-libLTLIBRARIES install-man install-pkgconfigHEADERS \ + install-strip install-zzipHEADERS installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-info-am uninstall-libLTLIBRARIES \ + uninstall-local uninstall-pkgconfigHEADERS \ + uninstall-zzipHEADERS + + +# here is some backward compatibility with version 0.10.* of zziplib +install-data-local : install-zzipHEADERS + echo '#ifndef ZZIP_WARNING' > $(DESTDIR)$(includedir)/zzip.h + echo '#define ZZIP_WARNING 1' >>$(DESTDIR)$(includedir)/zzip.h + echo '#ifdef __GNUC__' >>$(DESTDIR)$(includedir)/zzip.h + echo '#warning do no not use <zzip.h>, update to include <zzip/lib.h>'\ + >>$(DESTDIR)$(includedir)/zzip.h + echo '#else' >>$(DESTDIR)$(includedir)/zzip.h + echo '#error do no not use <zzip.h>, update to include <zzip/lib.h>'\ + >>$(DESTDIR)$(includedir)/zzip.h + echo '#endif' >>$(DESTDIR)$(includedir)/zzip.h + echo '#endif' >>$(DESTDIR)$(includedir)/zzip.h + echo '#include "zzip/lib.h"' >>$(DESTDIR)$(includedir)/zzip.h + sed -e 's|zzip.h|zziplib.h|' -e 's|zzip/lib.h|zzip/zzip.h|' \ + $(DESTDIR)$(includedir)/zzip.h >$(DESTDIR)$(includedir)/zziplib.h + sed -e 's|zzip.h|zzip-io.h|' -e 's|zzip/lib.h|zzip/plugin.h|' \ + $(DESTDIR)$(includedir)/zzip.h >$(DESTDIR)$(includedir)/zzip-io.h + +install-exec-local: + @ for i in . $(DESTDIR)$(libdir)/libzzip*.so.13 \ + ; do test -d $$i && continue ; lib=`basename "$$i" .so.13` \ + ; echo "$(DESTDIR)$(libdir): ln -s $$lib.so.13 $$lib.so.10" \ + ; (cd $(DESTDIR)$(libdir) && ln -s $$lib.so.13 $$lib.so.10) \ + ; echo "$(DESTDIR)$(libdir): ln -s $$lib.so.13 $$lib.so.11" \ + ; (cd $(DESTDIR)$(libdir) && ln -s $$lib.so.13 $$lib.so.11) \ + ; echo "$(DESTDIR)$(libdir): ln -s $$lib.so.13 $$lib.so.12" \ + ; (cd $(DESTDIR)$(libdir) && ln -s $$lib.so.13 $$lib.so.12) \ + ; done ; true + +uninstall-local : + (cd $(DESTDIR)$(includedir) && rm zziplib.h zzip.h zzip-io.h) + +zziplib.pc : Makefile + (cd .. && sh config.status zzip/zziplib.pc) + +zzip-zlib-config.pc : Makefile + @ echo "zlib_libs=@ZLIB_LDIR@ -lz" >$@ + @ echo "zlib_cflags=@ZLIB_INCL@" >>$@ + @ echo " " >>$@ + @ echo "Name: zzip-zlib-config" >>$@ + @ echo "Version: @ZLIB_VERSION@" >>$@ + @ echo "Description: ZLib Config (for ZZipLib)" >>$@ + echo 'Libs: $${zlib_libs}' >>$@ + echo 'Cflags: $${zlib_cflags}' >>$@ + +zzipmmapped.pc : zziplib.pc + sed -e 's/-lzzip/-lzzipmmapped/' -e 's/zziplib/zzipmmapped/' \ + zziplib.pc >$@ +zzipfseeko.pc : zziplib.pc + sed -e 's/-lzzip/-lzzipfseeko/' -e 's/zziplib/zzipfseeko/' \ + zziplib.pc >$@ + +__zziplib.pc : Makefile + @ echo "prefix=$(prefix)" >$@ + @ echo "libdir=$(libdir)" >>$@ + @ echo "includedir=$(includedir)" >>$@ + @ echo "largefile=$(LARGEFILE_CFLAGS)" >>$@ + @ echo "zlib_libs=@ZLIB_LDIR@ -lz" >>$@ + @ echo "zlib_cflags=@ZLIB_INCL@" >>$@ + @ echo " " >>$@ + @ echo "Name: zziplib" >>$@ + @ echo "Version: $(VERSION)" >>$@ + @ head $(top_srcdir)/$(PACKAGE).spec \ + | grep Summary | sed -e s,Summary,Description, >> $@ + echo 'Requires: zzip-zlib-config' >>$@ + echo 'Libs: -L$${libdir} -lzzip' >>$@ + echo 'Cflags: $${largefile} -I$${includedir}' >>$@ + +# ---------------------------------------------------------------------- +.c.i : + $(COMPILE) -E $< >$@ +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/__debug.h b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/__debug.h new file mode 100644 index 00000000000..13c7d895443 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/__debug.h @@ -0,0 +1,89 @@ +#ifndef __ZZIP_INTERNAL_DEBUG_H +#define __ZZIP_INTERNAL_DEBUG_H + +#include <zzip/conf.h> +#include <zzip/__hints.h> + +/* perhaps want to show on syslog(3) ?? */ + +#ifdef DEBUG +#include <stdio.h> +#define DBG1(X1) ZZIP_FOR1 { \ + fprintf(stderr,"\n%s:%i:"X1"\n", ZZIP_FUNC,__LINE__ \ + ); } ZZIP_END1 +#define DBG2(X1,X2) ZZIP_FOR1 { \ + fprintf(stderr,"\n%s:%i:"X1"\n", ZZIP_FUNC,__LINE__ \ + ,X2);} ZZIP_END1 +#define DBG3(X1,X2,X3) ZZIP_FOR1 { \ + fprintf(stderr,"\n%s:%i:"X1"\n", ZZIP_FUNC,__LINE__ \ + ,X2,X3); } ZZIP_END1 +#define DBG4(X1,X2,X3,X4) ZZIP_FOR1 { \ + fprintf(stderr,"\n%s:%i:"X1"\n", ZZIP_FUNC,__LINE__ \ + ,X2,X3,X4); } ZZIP_END1 +#define DBG5(X1,X2,X3,X4,X5) ZZIP_FOR1 { \ + fprintf(stderr,"\n%s:%i:"X1"\n", ZZIP_FUNC,__LINE__ \ + ,X2,X3,X4,X5); } ZZIP_END1 +#define DBG6(X1,X2,X3,X4,X5,X6) ZZIP_FOR1 { \ + fprintf(stderr,"\n%s:%i:"X1"\n", ZZIP_FUNC,__LINE__ \ + ,X2,X3,X4,X5,X6); } ZZIP_END1 + +#else +#define DBG1(X1) {} +#define DBG2(X1,X2) {} +#define DBG3(X1,X2,X3) {} +#define DBG4(X1,X2,X3,X4) {} +#define DBG5(X1,X2,X3,X4,X5) {} +#define DBG6(X1,X2,X3,X4,X5,X6) {} +#endif + +#define HINT1(X1) DBG1("HINT: " X1) +#define HINT2(X1,X2) DBG2("HINT: " X1,X2) +#define HINT3(X1,X2,X3) DBG3("HINT: " X1,X2,X3) +#define HINT4(X1,X2,X3,X4) DBG4("HINT: " X1,X2,X3,X4) +#define HINT5(X1,X2,X3,X4,X5) DBG5("HINT: " X1,X2,X3,X4,X5) +#define HINT6(X1,X2,X3,X4,X5,X6) DBG6("HINT: " X1,X2,X3,X4,X5,X6) + +#define NOTE1(X1) DBG1("NOTE: " X1) +#define NOTE2(X1,X2) DBG2("NOTE: " X1,X2) +#define NOTE3(X1,X2,X3) DBG3("NOTE: " X1,X2,X3) +#define NOTE4(X1,X2,X3,X4) DBG4("NOTE: " X1,X2,X3,X4) +#define NOTE5(X1,X2,X3,X4,X5) DBG5("NOTE: " X1,X2,X3,X4,X5) +#define NOTE6(X1,X2,X3,X4,X5,X6) DBG6("NOTE: " X1,X2,X3,X4,X5,X6) + +#define WARN1(X1) DBG1("WARN: " X1) +#define WARN2(X1,X2) DBG2("WARN: " X1,X2) +#define WARN3(X1,X2,X3) DBG3("WARN: " X1,X2,X3) +#define WARN4(X1,X2,X3,X4) DBG4("WARN: " X1,X2,X3,X4) +#define WARN5(X1,X2,X3,X4,X5) DBG5("WARN: " X1,X2,X3,X4,X5) +#define WARN6(X1,X2,X3,X4,X5,X6) DBG6("WARN: " X1,X2,X3,X4,X5,X6) + +#define FAIL1(X1) DBG1("FAIL: " X1) +#define FAIL2(X1,X2) DBG2("FAIL: " X1,X2) +#define FAIL3(X1,X2,X3) DBG3("FAIL: " X1,X2,X3) +#define FAIL4(X1,X2,X3,X4) DBG4("FAIL: " X1,X2,X3,X4) +#define FAIL5(X1,X2,X3,X4,X5) DBG5("FAIL: " X1,X2,X3,X4,X5) +#define FAIL6(X1,X2,X3,X4,X5,X6) DBG6("FAIL: " X1,X2,X3,X4,X5,X6) + + + +#ifdef DEBUG +_zzip_inline static void zzip_debug_xbuf (unsigned char* p, int l) + /* ZZIP_GNUC_UNUSED */ +{ +# define q(a) ((a&0x7F)<32?32:(a&0x7F)) + while (l > 0) + { + fprintf (stderr, + "%02x %02x %02x %02x " + "%02x %02x %02x %02x " + "%c%c%c%c %c%c%c%c\n", + p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7], + q(p[0]), q(p[1]), q(p[2]), q(p[3]), + q(p[4]), q(p[5]), q(p[6]), q(p[7])); + p += 8; l -= 8; + } +# undef q +} +#endif + +#endif diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/__dirent.h b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/__dirent.h new file mode 100644 index 00000000000..fc3e08f03d1 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/__dirent.h @@ -0,0 +1,393 @@ +#ifndef ZZIP_INTERNAL_DIRENT_H +#define ZZIP_INTERNAL_DIRENT_H +#include <zzip/conf.h> + +/* + * DO NOT USE THIS CODE. + * + * It is an internal header file for zziplib that carries some inline + * functions (or just static members) and a few defines, simply to be + * able to reuse these across - and have everything in a specific place. + * + * Copyright (c) 2002,2003 Guido Draheim + * All rights reserved, + * use under the restrictions of the + * Lesser GNU General Public License + * or alternatively the restrictions + * of the Mozilla Public License 1.1 + */ + +#ifdef ZZIP_HAVE_DIRENT_H +#define USE_DIRENT 1 + +#define _zzip_opendir opendir +#define _zzip_readdir readdir +#define _zzip_closedir closedir +#define _zzip_rewinddir rewinddir +#define _zzip_telldir telldir +#define _zzip_seekdir seekdir +#define _zzip_DIR DIR + +#include <dirent.h> + +#elif defined ZZIP_HAVE_WINBASE_H +#define USE_DIRENT 2 + +#define _zzip_opendir win32_opendir +#define _zzip_readdir win32_readdir +#define _zzip_closedir win32_closedir +#define _zzip_rewinddir win32_rewinddir +#define _zzip_telldir win32_telldir +#define _zzip_seekdir win32_seekdir +#define _zzip_DIR DIR + +/* + * DIRENT.H (formerly DIRLIB.H) + * + * by M. J. Weinstein Released to public domain 1-Jan-89 + * + * Because I have heard that this feature (opendir, readdir, closedir) + * it so useful for programmers coming from UNIX or attempting to port + * UNIX code, and because it is reasonably light weight, I have included + * it in the Mingw32 package. I have also added an implementation of + * rewinddir, seekdir and telldir. + * - Colin Peters <colin@bird.fu.is.saga-u.ac.jp> + * + * This code is distributed in the hope that is will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAMED. This includeds but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ + +#include <io.h> + +struct dirent +{ + long d_ino; /* Always zero. */ + unsigned short d_reclen; /* Always zero. */ + unsigned short d_namlen; /* Length of name in d_name. */ + char* d_name; /* File name. */ + /* NOTE: The name in the dirent structure points to the name in the + * finddata_t structure in the DIR. */ +}; + +/* + * This is an internal data structure. Good programmers will not use it + * except as an argument to one of the functions below. + */ +typedef struct +{ + /* disk transfer area for this dir */ + struct _finddata_t dd_dta; + + /* dirent struct to return from dir (NOTE: this makes this thread + * safe as long as only one thread uses a particular DIR struct at + * a time) */ + struct dirent dd_dir; + + /* _findnext handle */ + long dd_handle; + + /* + * Status of search: + * 0 = not started yet (next entry to read is first entry) + * -1 = off the end + * positive = 0 based index of next entry + */ + short dd_stat; + + /* given path for dir with search pattern (struct is extended) */ + char dd_name[1]; +} DIR; + +/* + * dirent.c + * + * Derived from DIRLIB.C by Matt J. Weinstein + * This note appears in the DIRLIB.H + * DIRLIB.H by M. J. Weinstein Released to public domain 1-Jan-89 + * + * Updated by Jeremy Bettis <jeremy@hksys.com> + * Significantly revised and rewinddir, seekdir and telldir added by Colin + * Peters <colin@fu.is.saga-u.ac.jp> + */ + +#include <direct.h> +#include <errno.h> +#include <io.h> +#include <stdlib.h> +#include <string.h> +#include <sys/stat.h> + +#define win32_SUFFIX "*" +#define win32_SLASH "\\" + +#ifndef S_ISDIR +#define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR) /* is a directory */ +#endif S_ISDIR + + +/* + opendir + + Returns a pointer to a DIR structure appropriately filled in to begin + searching a directory. +*/ +static DIR* +win32_opendir (const char *szPath) +{ + DIR *nd; + struct _stat statDir; + + errno = 0; + + if (!szPath) { + errno = EFAULT; + return (DIR *) 0; + } + + if (szPath[0] == '\0') { + errno = ENOTDIR; + return (DIR *) 0; + } + + /* Attempt to determine if the given path really is a directory. */ + if (_stat (szPath, &statDir)) { + /* Error, stat should have set an error value. */ + return (DIR *) 0; + } + + if (!S_ISDIR (statDir.st_mode)) { + /* Error, stat reports not a directory. */ + errno = ENOTDIR; + return (DIR *) 0; + } + + /* Allocate enough space to store DIR structure and the complete * + directory path given. */ + nd = (DIR *) calloc (1, sizeof (DIR) + strlen (szPath) + + strlen (win32_SLASH) + strlen (win32_SUFFIX)); + + if (!nd) { + /* Error, out of memory. */ + errno = ENOMEM; + return (DIR *) 0; + } + + /* Create the search expression. */ + strcpy (nd->dd_name, szPath); + + /* Add on a slash if the path does not end with one. */ + if (nd->dd_name[0] != '\0' && + nd->dd_name[strlen (nd->dd_name) - 1] != '/' && + nd->dd_name[strlen (nd->dd_name) - 1] != '\\') { + strcat (nd->dd_name, win32_SLASH); + } + + /* Add on the search pattern */ + strcat (nd->dd_name, win32_SUFFIX); + + /* Initialize handle to -1 so that a premature closedir doesn't try * to + call _findclose on it. */ + nd->dd_handle = -1; + + /* Initialize the status. */ + nd->dd_stat = 0; + + /* Initialize the dirent structure. ino and reclen are invalid under * + Win32, and name simply points at the appropriate part of the * + findfirst_t structure. */ + nd->dd_dir.d_ino = 0; + nd->dd_dir.d_reclen = 0; + nd->dd_dir.d_namlen = 0; + nd->dd_dir.d_name = nd->dd_dta.name; + + return nd; +} + +/* + readdir + + Return a pointer to a dirent structure filled with the information on the + next entry in the directory. +*/ +static struct dirent * +win32_readdir (DIR * dirp) +{ + errno = 0; + + /* Check for valid DIR struct. */ + if (!dirp) { + errno = EFAULT; + return (struct dirent *) 0; + } + + if (dirp->dd_dir.d_name != dirp->dd_dta.name) { + /* The structure does not seem to be set up correctly. */ + errno = EINVAL; + return (struct dirent *) 0; + } + + if (dirp->dd_stat < 0) { + /* We have already returned all files in the directory * (or the + structure has an invalid dd_stat). */ + return (struct dirent *) 0; + } else if (dirp->dd_stat == 0) { + /* We haven't started the search yet. */ + /* Start the search */ + dirp->dd_handle = _findfirst (dirp->dd_name, &(dirp->dd_dta)); + + if (dirp->dd_handle == -1) { + /* Whoops! Seems there are no files in that * directory. */ + dirp->dd_stat = -1; + } else { + dirp->dd_stat = 1; + } + } else { + /* Get the next search entry. */ + if (_findnext (dirp->dd_handle, &(dirp->dd_dta))) { + /* We are off the end or otherwise error. */ + _findclose (dirp->dd_handle); + dirp->dd_handle = -1; + dirp->dd_stat = -1; + } else { + /* Update the status to indicate the correct * number. */ + dirp->dd_stat++; + } + } + + if (dirp->dd_stat > 0) { + /* Successfully got an entry. Everything about the file is * already + appropriately filled in except the length of the * file name. */ + dirp->dd_dir.d_namlen = (unsigned short) strlen (dirp->dd_dir.d_name); + return &dirp->dd_dir; + } + + return (struct dirent *) 0; +} + +/* + closedir + + Frees up resources allocated by opendir. +*/ +static int +win32_closedir (DIR * dirp) +{ + int rc; + + errno = 0; + rc = 0; + + if (!dirp) { + errno = EFAULT; + return -1; + } + + if (dirp->dd_handle != -1) { + rc = _findclose (dirp->dd_handle); + } + + /* Delete the dir structure. */ + free (dirp); + + return rc; +} + +/* + rewinddir + + Return to the beginning of the directory "stream". We simply call findclose + and then reset things like an opendir. +*/ +static void +win32_rewinddir (DIR * dirp) +{ + errno = 0; + + if (!dirp) { + errno = EFAULT; + return; + } + + if (dirp->dd_handle != -1) { + _findclose (dirp->dd_handle); + } + + dirp->dd_handle = -1; + dirp->dd_stat = 0; +} + +/* + telldir + + Returns the "position" in the "directory stream" which can be used with + seekdir to go back to an old entry. We simply return the value in stat. +*/ +static long +win32_telldir (DIR * dirp) +{ + errno = 0; + + if (!dirp) { + errno = EFAULT; + return -1; + } + return dirp->dd_stat; +} + +/* + seekdir + + Seek to an entry previously returned by telldir. We rewind the directory + and call readdir repeatedly until either dd_stat is the position number + or -1 (off the end). This is not perfect, in that the directory may + have changed while we weren't looking. But that is probably the case with + any such system. +*/ +static void +win32_seekdir (DIR * dirp, long lPos) +{ + errno = 0; + + if (!dirp) { + errno = EFAULT; + return; + } + + if (lPos < -1) { + /* Seeking to an invalid position. */ + errno = EINVAL; + return; + } else if (lPos == -1) { + /* Seek past end. */ + if (dirp->dd_handle != -1) { + _findclose (dirp->dd_handle); + } + dirp->dd_handle = -1; + dirp->dd_stat = -1; + } else { + /* Rewind and read forward to the appropriate index. */ + win32_rewinddir (dirp); + + while ((dirp->dd_stat < lPos) && win32_readdir (dirp)); + } +} + +#else +#define USE_DIRENT 0 + +#define _zzip_opendir(_N_) 0 +#define _zzip_readdir(_D_) 0 +#define _zzip_closedir(_D_) /* omit return code */ +#define _zzip_rewinddir(_D_) +#define _zzip_telldir(_D_) 0 +#define _zzip_seekdir(_D_,_V_) /* omit return code */ +#define _zzip_DIR void* + +/* end of DIRENT implementation */ +#endif + +/* once */ +#endif diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/__fnmatch.h b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/__fnmatch.h new file mode 100644 index 00000000000..9759a7423d8 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/__fnmatch.h @@ -0,0 +1,28 @@ +#ifndef __ZZIP_INTERNAL_FNMATCH_H +#define __ZZIP_INTERNAL_FNMATCH_H +/** included by fseeko.c, mmapped.c, memdisk.c */ + +#include <zzip/conf.h> + +#ifdef ZZIP_HAVE_FNMATCH_H +#include <fnmatch.h> +#endif + +#ifdef ZZIP_HAVE_FNMATCH_H +#define _zzip_fnmatch fnmatch +# ifdef FNM_CASEFOLD +# define _zzip_fnmatch_CASEFOLD FNM_CASEFOLD +# else +# define _zzip_fnmatch_CASEFOLD 0 +# endif +#else +# define _zzip_fnmatch_CASEFOLD 0 +/* if your system does not have fnmatch, we fall back to strcmp: */ +static int _zzip_fnmatch(char* pattern, char* string, int flags) +{ + puts ("<zzip:mmapped:strcmp>"); + return strcmp (pattern, string); +} +#endif + +#endif diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/__hints.h b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/__hints.h new file mode 100644 index 00000000000..ed5b2ad9799 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/__hints.h @@ -0,0 +1,189 @@ +#ifndef __ZZIP_INTERNAL_HINTS_H +#define __ZZIP_INTERNAL_HINTS_H +#include <zzip/conf.h> + +#ifndef ZZIP_GNUC_ATLEAST +# if defined __GNUC__ && defined __GNUC_MINOR__ +# define ZZIP_GNUC_ATLEAST(_M_,_N_) \ + ((__GNUC__ << 10) + __GNUC_MINOR__ >= ((_M_) << 10) + (_N_)) +# elif defined __GNUC__ +# define ZZIP_GNUC_ATLEAST(_M_,_N_) \ + ((__GNUC__ << 10) >= ((_M_) << 10)) +# else +# define ZZIP_GNUC_ATLEAST(_M_, _N_) 0 +# endif +#endif + +#ifndef ZZIP_GNUC_EXTENSION +# if ZZIP_GNUC_ATLEAST(2,8) +# define ZZIP_GNUC_EXTENSION __extension__ +# else +# define ZZIP_GNUC_EXTENSION +# endif +#endif + +/* func has no side effects, return value depends only on params and globals */ +#ifndef ZZIP_GNUC_PURE +# if ZZIP_GNUC_ATLEAST(2,8) +# define ZZIP_GNUC_PURE __attribute__((__pure__)) +# else +# define ZZIP_GNUC_PURE +# endif +#endif + +/* func has no side effects, return value depends only on params */ +#ifndef ZZIP_GNUC_CONST +# if ZZIP_GNUC_ATLEAST(2,4) +# define ZZIP_GNUC_CONST __attribute__((__const__)) +# else +# define ZZIP_GNUC_CONST +# endif +#endif + +/* typename / variable / function possibly unused */ +#ifndef ZZIP_GNUC_UNUSED +# if ZZIP_GNUC_ATLEAST(2,4) +# define ZZIP_GNUC_UNUSED __attribute__((__unused__)) +# else +# define ZZIP_GNUC_UNUSED +# endif +#endif + +/* obvious. btw, a noreturn-func should return void */ +#ifndef ZZIP_GNUC_NORETURN +# if ZZIP_GNUC_ATLEAST(2,5) +# define ZZIP_GNUC_NORETURN __attribute__((__noreturn__)) +# else +# define ZZIP_GNUC_NORETURN +# endif +#endif + +/* omit function from profiling with -finstrument-functions */ +#ifndef ZZIP_GNUC_NO_INSTRUMENT +# if ZZIP_GNUC_ATLEAST(2,4) +# define ZZIP_GNUC_NO_INSTRUMENT __attribute__((__no_instrument_function__)) +# else +# define ZZIP_GNUC_NO_INSTRUMENT +# endif +#endif + +/* all pointer args must not be null, and allow optimiztons based on the fact*/ +#ifndef ZZIP_GNUC_NONNULL +# if ZZIP_GNUC_ATLEAST(3,1) +# define ZZIP_GNUC_NONNULL __attribute__((nonnull)) +# else +# define ZZIP_GNUC_NONNULL +# endif +#endif + +/* the function can not throw - the libc function are usually nothrow */ +#ifndef ZZIP_GNUC_NOTHROW +# if ZZIP_GNUC_ATLEAST(3,2) +# define ZZIP_GNUC_NOTHROW __attribute__((nothrow)) +# else +# define ZZIP_GNUC_NOTHROW +# endif +#endif + +/* typename / function / variable is obsolete but still listed in headers */ +#ifndef ZZIP_GNUC_DEPRECATED +# if ZZIP_GNUC_ATLEAST(3,1) +# define ZZIP_GNUC_DEPRECATED __attribute__((deprecated)) +# else +# define ZZIP_GNUC_DEPRECATED +# endif +#endif + +/* resolve references to this function during pre-linking the libary */ +#ifndef ZZIP_GNUC_LIB_PROTECTED +# if ZZIP_GNUC_ATLEAST(3,1) +# define ZZIP_GNUC_LIB_PROTECTED __attribute__((visiblity("protected"))) +# else +# define ZZIP_GNUC_LIB_PROTECTED +# endif +#endif + +/* func shall only be usable within the same lib (so, no entry in lib symtab)*/ +#ifndef ZZIP_GNUC_LIB_PRIVATE +# if ZZIP_GNUC_ATLEAST(3,1) +# define ZZIP_GNUC_LIB_PRIVATE __attribute__((visiblity("hidden"))) +# else +# define ZZIP_GNUC_LIB_PRIVATE +# endif +#endif + +/* ... and not even passed as a function pointer reference to outside the lib*/ +#ifndef ZZIP_GNUC_LIB_INTERNAL +# if ZZIP_GNUC_ATLEAST(3,1) +# define ZZIP_GNUC_LIB_INTERNAL __attribute__((visiblity("internal"))) +# else +# define ZZIP_GNUC_LIB_INTERNAL +# endif +#endif + + +#ifndef ZZIP_GNUC_FORMAT +# if ZZIP_GNUC_ATLEAST(2,4) +# define ZZIP_GNUC_FORMAT(_X_) __attribute__((__format_arg__(_X_))) +# else +# define ZZIP_GNUC_FORMAT(_X_) +# endif +#endif + +#ifndef ZZIP_GNUC_SCANF +# if ZZIP_GNUC_ATLEAST(2,4) +# define ZZIP_GNUC_SCANF(_S_,_X_) __attribute__((__scanf__(_S_,_X_))) +# else +# define ZZIP_GNUC_SCANF(_S_,_X_) +# endif +#endif + +#ifndef ZZIP_GNUC_PRINTF +# if ZZIP_GNUC_ATLEAST(2,4) +# define ZZIP_GNUC_PRINTF(_S_,_X_) __attribute__((__printf__(_S_,_X_))) +# else +# define ZZIP_GNUC_PRINTF(_S_,_X_) +# endif +#endif + +#ifndef ZZIP_FUNCTION +# if ZZIP_GNUC_ATLEAST(2,6) +# define ZZIP_FUNC __FUNCTION__ +# define ZZIP_FUNCTION __FUNCTION__ +# elif defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L +# define ZZIP_FUNC __func__ +# define ZZIP_FUNCTION "" +# else +# define ZZIP_FUNC 0 +# define ZZIP_FUNCTION "" +# endif +#endif + +#ifndef ZZIP_STRING +#define ZZIP_STRING(_X_) ZZIP_STRING_(_X_) +#define ZZIP_STRING_(_Y_) #_Y_ +#endif + +#ifndef ZZIP_DIM +#define ZZIP_DIM(_A_) (sizeof(_A_) / sizeof ((_A_)[0])) +#endif + +#if !(defined ZZIP_FOR1 && defined ZZIP_END1) +# if defined sun || defined __sun__ +# define ZZIP_FOR1 if (1) +# define ZZIP_END1 else (void)0 +# else +# define ZZIP_FOR1 do +# define ZZIP_END1 while (0) +# endif +#endif + +#ifndef ZZIP_BRANCH_OVER +# if ZZIP_GNUC_ATLEAST(2,96) +# define ZZIP_BRANCH_OVER(_X_) __builtin_expect((_X_),0) +# else +# define ZZIP_BRANCH_OVER(_X_) (_X_) +# endif +#endif + +#endif diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/__mmap.h b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/__mmap.h new file mode 100644 index 00000000000..121c8bd82f8 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/__mmap.h @@ -0,0 +1,107 @@ +#ifndef __ZZIP_INTERNAL_MMAP_H +#define __ZZIP_INTERNAL_MMAP_H +#include <zzip/types.h> + +/* + * DO NOT USE THIS CODE. + * + * It is an internal header file for zziplib that carries some inline + * functions (or just static members) and a few defines, simply to be + * able to reuse these across - and have everything in a specific place. + * + * Copyright (c) 2002,2003 Guido Draheim + * All rights reserved, + * use under the restrictions of the + * Lesser GNU General Public License + * or alternatively the restrictions + * of the Mozilla Public License 1.1 + */ + +#ifdef _USE_MMAP +#if defined ZZIP_HAVE_SYS_MMAN_H +#include <sys/mman.h> +#define USE_POSIX_MMAP 1 +#elif defined ZZIP_HAVE_WINBASE_H || defined WIN32 +#include <windows.h> +#define USE_WIN32_MMAP 1 +#else +#undef _USE_MMAP +#endif +#endif + +/* -------------- specify MMAP function imports --------------------------- */ + +#if defined USE_POSIX_MMAP +#define USE_MMAP 1 + +#define _zzip_mmap(user, fd, offs, len) \ + mmap (0, len, PROT_READ, MAP_SHARED, fd, offs) +#define _zzip_munmap(user, ptr, len) \ + munmap (ptr, len) +#define _zzip_getpagesize(user) getpagesize() + +#ifndef MAP_FAILED /* hpux10.20 does not have it */ +#define MAP_FAILED ((void*)(-1)) +#endif + +#elif defined USE_WIN32_MMAP +#define USE_MMAP 1 +#ifndef MAP_FAILED +#define MAP_FAILED 0 +#endif +/* we (ab)use the "*user" variable to store the FileMapping handle */ + /* which assumes (sizeof(long) == sizeof(HANDLE)) */ + +static size_t win32_getpagesize () +{ + SYSTEM_INFO si; GetSystemInfo (&si); + return si.dwAllocationGranularity; +} +static void* win32_mmap (long* user, int fd, zzip_off_t offs, size_t len) +{ + if (! user || *user != 1) /* || offs % getpagesize() */ + return 0; + { + HANDLE hFile = (HANDLE)_get_osfhandle(fd); + if (hFile) + *user = (int) CreateFileMapping (hFile, 0, PAGE_READONLY, 0, 0, NULL); + if (*user) + { + char* p = 0; + p = MapViewOfFile(*(HANDLE*)user, FILE_MAP_READ, 0, offs, len); + if (p) return p + offs; + CloseHandle (*(HANDLE*)user); *user = 1; + } + return MAP_FAILED; + } +} +static void win32_munmap (long* user, char* fd_map, size_t len) +{ + UnmapViewOfFile (fd_map); + CloseHandle (*(HANDLE*)user); *user = 1; +} + +#define _zzip_mmap(user, fd, offs, len) \ + win32_mmap ((long*) &(user), fd, offs, len) +#define _zzip_munmap(user, ptr, len) \ + win32_munmap ((long*) &(user), ptr, len) +#define _zzip_getpagesize(user) win32_getpagesize() + +#else /* disable */ +#define USE_MMAP 0 +/* USE_MAP is intentional: we expect the compiler to do some "code removal" + * on any source code enclosed in if (USE_MMAP) {...} i.e. the unreachable + * branch of an if (0) {....} is not emitted to the final object binary. */ + +#ifndef MAP_FAILED +#define MAP_FAILED 0 +#endif + +#define _zzip_mmap(user, fd, offs, len) (MAP_FAILED) +#define _zzip_munmap(user, ptr, len) {} +#define _zzip_getpagesize(user) 1 + +#endif /* USE_MMAP defines */ + + +#endif diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/_config.h b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/_config.h new file mode 100644 index 00000000000..65873ed7143 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/_config.h @@ -0,0 +1,248 @@ +#ifndef _ZZIP__CONFIG_H +#define _ZZIP__CONFIG_H 1 + +/* Define to 1 if you have the <byteswap.h> header file. */ +/* #undef ZZIP_HAVE_BYTESWAP_H */ + +/* TH need this to get the proper definition of _mkdir() in write.c */ + +/* Define to 1 if you have the <direct.h> header file. */ +#ifndef ZZIP_HAVE_DIRECT_H +#ifdef WIN32 +#define ZZIP_HAVE_DIRECT_H 1 +#endif +#endif + +/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. + */ +#ifndef ZZIP_HAVE_DIRENT_H +#define ZZIP_HAVE_DIRENT_H 1 +#endif + +/* Define to 1 if you have the <dlfcn.h> header file. */ +#ifndef ZZIP_HAVE_DLFCN_H +#define ZZIP_HAVE_DLFCN_H 1 +#endif + +/*TH Zziplibs's own __fnmatch.h gives a compiler warning because it + uses puts() without loading stdio.h, so I prefer not to use it if + there is a correct system header, even though the warning is + harmless. +*/ + +/* Define to 1 if you have the <fnmatch.h> header file. */ +#ifndef ZZIP_HAVE_FNMATCH_H +#ifndef WIN32 +#define ZZIP_HAVE_FNMATCH_H 1 +#endif +#endif + +/* Define to 1 if you have the <inttypes.h> header file. */ +#ifndef ZZIP_HAVE_INTTYPES_H +#define ZZIP_HAVE_INTTYPES_H 1 +#endif + +/* Define to 1 if you have the <io.h> header file. */ +#ifndef ZZIP_HAVE_IO_H +#ifdef WIN32 +#define ZZIP_HAVE_IO_H 1 +#endif +#endif + +/* Define to 1 if you have the <memory.h> header file. */ +#ifndef ZZIP_HAVE_MEMORY_H +#define ZZIP_HAVE_MEMORY_H 1 +#endif + +/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ +/* #undef ZZIP_HAVE_NDIR_H */ + +#if defined __sun__ || defined __sun +/* Define to 1 if you have the <sys/int_types.h> header file. */ +#define ZZIP_HAVE_SYS_INT_TYPES_H 1 +#elif defined(_AIX) +#else +/* Define to 1 if you have the <stdint.h> header file. */ +#define ZZIP_HAVE_STDINT_H 1 +#endif + + +/* Define to 1 if you have the <stdlib.h> header file. */ +#ifndef ZZIP_HAVE_STDLIB_H +#define ZZIP_HAVE_STDLIB_H 1 +#endif + +/* Define to 1 if you have the `strcasecmp' function. */ +#ifndef ZZIP_HAVE_STRCASECMP +#define ZZIP_HAVE_STRCASECMP 1 +#endif + +/* Define to 1 if you have the <strings.h> header file. */ +#ifndef ZZIP_HAVE_STRINGS_H +#define ZZIP_HAVE_STRINGS_H 1 +#endif + +/* Define to 1 if you have the <string.h> header file. */ +#ifndef ZZIP_HAVE_STRING_H +#define ZZIP_HAVE_STRING_H 1 +#endif + +/* Define to 1 if you have the `strndup' function. */ +#ifndef ZZIP_HAVE_STRNDUP +#define ZZIP_HAVE_STRNDUP 1 +#endif + +/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. + */ +/* #undef ZZIP_HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the <sys/mman.h> header file. */ +/* undefe ZZIP_HAVE_SYS_MMAN_H */ + +/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. + */ +/* #undef ZZIP_HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the <sys/param.h> header file. */ +#ifndef ZZIP_HAVE_SYS_PARAM_H +#define ZZIP_HAVE_SYS_PARAM_H 1 +#endif + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#ifndef ZZIP_HAVE_SYS_STAT_H +#define ZZIP_HAVE_SYS_STAT_H 1 +#endif + +/* Define to 1 if you have the <sys/types.h> header file. */ +#ifndef ZZIP_HAVE_SYS_TYPES_H +#define ZZIP_HAVE_SYS_TYPES_H 1 +#endif + +/* Define to 1 if you have the <unistd.h> header file. */ +#ifndef ZZIP_HAVE_UNISTD_H +#define ZZIP_HAVE_UNISTD_H 1 +#endif + +/* Define to 1 if you have the <winbase.h> header file. */ +/* #undef ZZIP_HAVE_WINBASE_H */ + +/* Define to 1 if you have the <windows.h> header file. */ +/* #undef ZZIP_HAVE_WINDOWS_H */ + +/* Define to 1 if you have the <winnt.h> header file. */ +/* #undef ZZIP_HAVE_WINNT_H */ + +/* Define to 1 if you have the <zlib.h> header file. */ +#ifndef ZZIP_HAVE_ZLIB_H +#define ZZIP_HAVE_ZLIB_H 1 +#endif + +/* whether the system defaults to 32bit off_t but can do 64bit when requested + */ +#ifndef ZZIP_LARGEFILE_SENSITIVE +#define ZZIP_LARGEFILE_SENSITIVE 1 +#endif + +/* Name of package */ +#ifndef ZZIP_PACKAGE +#define ZZIP_PACKAGE "zziplib" +#endif + +/* Define to the address where bug reports for this package should be sent. */ +#ifndef ZZIP_PACKAGE_BUGREPORT +#define ZZIP_PACKAGE_BUGREPORT "" +#endif + +/* Define to the full name of this package. */ +#ifndef ZZIP_PACKAGE_NAME +#define ZZIP_PACKAGE_NAME "" +#endif + +/* Define to the full name and version of this package. */ +#ifndef ZZIP_PACKAGE_STRING +#define ZZIP_PACKAGE_STRING "" +#endif + +/* Define to the one symbol short name of this package. */ +#ifndef ZZIP_PACKAGE_TARNAME +#define ZZIP_PACKAGE_TARNAME "" +#endif + +/* Define to the version of this package. */ +#ifndef ZZIP_PACKAGE_VERSION +#define ZZIP_PACKAGE_VERSION "" +#endif + +/* The number of bytes in type int */ +#ifndef ZZIP_SIZEOF_INT +#define ZZIP_SIZEOF_INT 4 +#endif + +/* The number of bytes in type long */ +#ifndef ZZIP_SIZEOF_LONG +#define ZZIP_SIZEOF_LONG 4 +#endif + +/* The number of bytes in type short */ +#ifndef ZZIP_SIZEOF_SHORT +#define ZZIP_SIZEOF_SHORT 2 +#endif + +/* Define to 1 if you have the ANSI C header files. */ +#ifndef ZZIP_STDC_HEADERS +#define ZZIP_STDC_HEADERS 1 +#endif + +/* Version number of package */ +#ifndef ZZIP_VERSION +#define ZZIP_VERSION "0.13.47" +#endif + +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +/* #undef ZZIP_WORDS_BIGENDIAN */ + +/* Number of bits in a file offset, on hosts where this is settable. */ +#ifndef ZZIP__FILE_OFFSET_BITS +#define ZZIP__FILE_OFFSET_BITS 64 +#endif + +/* Define for large files, on AIX-style hosts. */ +/* #undef ZZIP__LARGE_FILES */ + +/* Define to `long long' if <sys/types.h> does not define. */ +#ifndef ZZIP___int64 +#define ZZIP___int64 long long +#endif + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef _zzip_const */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef _zzip_inline */ +#endif + +/* Define to `_zzip_off_t' if <sys/types.h> does not define. */ +#ifndef _zzip_off64_t +#define _zzip_off64_t _zzip_off_t +#endif + +/* Define to `long' if <sys/types.h> does not define. */ +/* #undef _zzip_off_t */ + +/* Define to equivalent of C99 restrict keyword, or to nothing if this is not + supported. Do not define if restrict is supported directly. */ +#ifndef _zzip_restrict +#define _zzip_restrict +#endif + +/* Define to `unsigned' if <sys/types.h> does not define. */ +/* #undef _zzip_size_t */ + +/* Define to `int' if <sys/types.h> does not define. */ +/* #undef _zzip_ssize_t */ + +/* once: _ZZIP__CONFIG_H */ +#endif diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/_msvc.h b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/_msvc.h new file mode 100644 index 00000000000..e852513445c --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/_msvc.h @@ -0,0 +1,211 @@ +#ifndef _ZZIP__MSVC_H +#define _ZZIP__MSVC_H 1 + +/* zzip/_msvc.h. Generated automatically at end of configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the <byteswap.h> header file. */ +/* #undef ZZIP_HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the <direct.h> header file. */ +#ifndef ZZIP_HAVE_DIRECT_H +#define ZZIP_HAVE_DIRECT_H 1 +#endif + +/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. + */ +/* #undef ZZIP_HAVE_DIRENT_H */ + +/* Define to 1 if you have the <dlfcn.h> header file. */ +/* #undef ZZIP_HAVE_DLFCN_H */ + +/* Define to 1 if you have the <fnmatch.h> header file. */ +/* #undef ZZIP_HAVE_FNMATCH_H */ + +/* Define to 1 if you have the <inttypes.h> header file. */ +/* #undef ZZIP_HAVE_INTTYPES_H */ + +/* Define to 1 if you have the <io.h> header file. */ +#ifndef ZZIP_HAVE_IO_H +#define ZZIP_HAVE_IO_H 1 +#endif + +/* Define to 1 if you have the <memory.h> header file. */ +#ifndef ZZIP_HAVE_MEMORY_H +#define ZZIP_HAVE_MEMORY_H 1 +#endif + +/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ +/* #undef ZZIP_HAVE_NDIR_H */ + +/* Define to 1 if you have the <stdint.h> header file. */ +/* #undef ZZIP_HAVE_STDINT_H */ + +/* Define to 1 if you have the <stdlib.h> header file. */ +#ifndef ZZIP_HAVE_STDLIB_H +#define ZZIP_HAVE_STDLIB_H 1 +#endif + +/* Define to 1 if you have the `strcasecmp' function. */ +/* #undef ZZIP_HAVE_STRCASECMP */ + +/* Define to 1 if you have the <strings.h> header file. */ +/* #undef ZZIP_HAVE_STRINGS_H */ + +/* Define to 1 if you have the <string.h> header file. */ +#ifndef ZZIP_HAVE_STRING_H +#define ZZIP_HAVE_STRING_H 1 +#endif + +/* Define to 1 if you have the `strndup' function. */ +/* #undef ZZIP_HAVE_STRNDUP */ + +/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. + */ +/* #undef ZZIP_HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the <sys/int_types.h> header file. */ +/* #undef ZZIP_HAVE_SYS_INT_TYPES_H */ + +/* Define to 1 if you have the <sys/mman.h> header file. */ +/* #undef ZZIP_HAVE_SYS_MMAN_H */ + +/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. + */ +/* #undef ZZIP_HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the <sys/param.h> header file. */ +/* #undef ZZIP_HAVE_SYS_PARAM_H */ + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#ifndef ZZIP_HAVE_SYS_STAT_H +#define ZZIP_HAVE_SYS_STAT_H 1 +#endif + +/* Define to 1 if you have the <sys/types.h> header file. */ +#ifndef ZZIP_HAVE_SYS_TYPES_H +#define ZZIP_HAVE_SYS_TYPES_H 1 +#endif + +/* Define to 1 if you have the <unistd.h> header file. */ +/* #undef ZZIP_HAVE_UNISTD_H */ + +/* Define to 1 if you have the <winbase.h> header file. */ +#ifndef ZZIP_HAVE_WINBASE_H +#define ZZIP_HAVE_WINBASE_H 1 /* hmm, is that win32 ? */ +#endif + +/* Define to 1 if you have the <windows.h> header file. */ +#ifndef ZZIP_HAVE_WINDOWS_H +#define ZZIP_HAVE_WINDOWS_H 1 /* yes, this is windows */ +#endif + +/* Define to 1 if you have the <winnt.h> header file. */ +#ifndef ZZIP_HAVE_WINNT_H +#define ZZIP_HAVE_WINNT_H 1 /* is that always true? */ +#endif + +/* Define to 1 if you have the <zlib.h> header file. */ +#ifndef ZZIP_HAVE_ZLIB_H +#define ZZIP_HAVE_ZLIB_H 1 /* you do have it, right? */ +#endif + +/* whether the system defaults to 32bit off_t but can do 64bit when requested + */ +/* #undef ZZIP_LARGEFILE_SENSITIVE */ + +/* Name of package */ +#ifndef ZZIP_PACKAGE +#define ZZIP_PACKAGE "zziplib-msvc" /* yes, make it known */ +#endif + +/* Define to the address where bug reports for this package should be sent. */ +/* #undef ZZIP_PACKAGE_BUGREPORT */ + +/* Define to the full name of this package. */ +/* #undef ZZIP_PACKAGE_NAME */ + +/* Define to the full name and version of this package. */ +/* #undef ZZIP_PACKAGE_STRING */ + +/* Define to the one symbol short name of this package. */ +/* #undef ZZIP_PACKAGE_TARNAME */ + +/* Define to the version of this package. */ +/* #undef ZZIP_PACKAGE_VERSION */ + +/* The number of bytes in type int */ +#ifndef ZZIP_SIZEOF_INT +#define ZZIP_SIZEOF_INT 4 +#endif + +/* The number of bytes in type long */ +#ifndef ZZIP_SIZEOF_LONG +#define ZZIP_SIZEOF_LONG 4 +#endif + +/* The number of bytes in type short */ +#ifndef ZZIP_SIZEOF_SHORT +#define ZZIP_SIZEOF_SHORT 2 +#endif + +/* Define to 1 if you have the ANSI C header files. */ +#ifndef ZZIP_STDC_HEADERS +#define ZZIP_STDC_HEADERS 1 +#endif + +/* Version number of package */ +#ifndef ZZIP_VERSION +#define ZZIP_VERSION "0.13.x" +#endif + +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +/* #undef ZZIP_WORDS_BIGENDIAN */ + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef ZZIP__FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef ZZIP__LARGE_FILES */ + +/* Define to `long long' if <sys/types.h> does not define. */ +/* #undef ZZIP___int64 */ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef _zzip_const */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#ifndef _zzip_inline +#define _zzip_inline __inline +#endif +#endif + +/* Define to `_zzip_off_t' if <sys/types.h> does not define. */ +#ifndef _zzip_off64_t +#define _zzip_off64_t __int64 +#endif + +/* Define to `long' if <sys/types.h> does not define. */ +#ifndef _zzip_off_t +#define _zzip_off_t long +#endif + +/* Define to equivalent of C99 restrict keyword, or to nothing if this is not + supported. Do not define if restrict is supported directly. */ +#ifndef _zzip_restrict +#define _zzip_restrict +#endif + +/* Define to `unsigned' if <sys/types.h> does not define. */ +/* #undef _zzip_size_t */ + +/* Define to `int' if <sys/types.h> does not define. */ +#ifndef _zzip_ssize_t +#define _zzip_ssize_t int +#endif + +/* once: _ZZIP__MSVC_H */ +#endif diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/_msvc.sed b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/_msvc.sed new file mode 100644 index 00000000000..ec1fcbba192 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/_msvc.sed @@ -0,0 +1,26 @@ +s:undef *HAVE_MEMORY_H *$:define HAVE_MEMORY_H 1: +s:undef *HAVE_STDLIB_H *$:define HAVE_STDLIB_H 1: +s:undef *HAVE_STRING_H *$:define HAVE_STRING_H 1: +s:undef *HAVE_SYS_STAT_H *$:define HAVE_SYS_STAT_H 1: +s:undef *HAVE_SYS_TYPES_H *$:define HAVE_SYS_TYPES_H 1: +s:undef *HAVE_DIRECT_H *$:define HAVE_DIRECT_H 1: +s:undef *HAVE_IO_H *$:define HAVE_IO_H 1: +s:undef *HAVE_WINDOWS_H *$:define HAVE_WINDOWS_H 1 /* yes, this is windows */: +s:undef *HAVE_WINBASE_H *$:define HAVE_WINBASE_H 1 /* hmm, is that win32 ? */: +s:undef *HAVE_WINNT_H *$:define HAVE_WINNT_H 1 /* is that always true? */: +s:undef *HAVE_ZLIB_H *$:define HAVE_ZLIB_H 1 /* you do have it, right? */: +s:undef *PACKAGE *$:define PACKAGE "zziplib-msvc" /* yes, make it known */: +s:undef *SIZEOF_INT *$:define SIZEOF_INT 4: +s:undef *SIZEOF_LONG *$:define SIZEOF_LONG 4: +s:undef *SIZEOF_SHORT *$:define SIZEOF_SHORT 2: +s:undef *STDC_HEADERS *$:define STDC_HEADERS 1: +s:undef *inline *$:define inline __inline: +s:undef *off_t *$:define off_t long: +s:undef *off64_t *$:define off64_t __int64: +s:undef *ssize_t *$:define ssize_t int: +s:undef restrict *$:define restrict: +s:undef VERSION:define VERSION "0.13.x": +s:^ *# *undef.*$:/* & */: +/Generated automatically .* by autoheader/a\ +/* config values have been automatically set by zzip/_msvc.sed */ + diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/autoconf.h b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/autoconf.h new file mode 100644 index 00000000000..f0d6841454a --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/autoconf.h @@ -0,0 +1,45 @@ +#ifndef _ZZIP_AUTOCONF_H_ +#define _ZZIP_AUTOCONF_H_ 1 + +/* + * This file is trying to override configure time checks of zzip with + * definitions at compile time. This is not used by zzip sources themselves + * but it may be really helpful with thirdparty software that happens to + * include zzip headers from a central place but running on a different host. + */ + +#include "conf.h" /* <zzip/conf.h> : <zzip/_config.h> */ + +#if defined HAVE_ENDIAN_H || defined ZZIP_HAVE_ENDIAN_H +#include <endian.h> /* glibc */ +#elif defined HAVE_SYS_PARAM_H || defined ZZIP_HAVE_SYS_PARAM_H +#include <sys/param.h> /* solaris */ +#endif + +#if defined __BYTE_ORDER +#define ZZIP_BYTE_ORDER __BYTE_ORDER +#elif defined BYTE_ORDER +#define ZZIP_BYTE_ORDER BYTE_ORDER +#elif defined _LITTLE_ENDIAN +#define ZZIP_BYTE_ORDER 1234 +#elif defined _BIG_ENDIAN +#define ZZIP_BYTE_ORDER 4321 +#elif defined __i386__ +#define ZZIP_BYTE_ORDER 1234 +#elif defined WORDS_BIGENDIAN || defined ZZIP_WORDS_BIGENDIAN +#define ZZIP_BYTE_ORDER 4321 +#else +#define ZZIP_BYTE_ORDER 1234 +#endif + +/* override ZZIP_WORDS_BIGENDIAN : macros ZZIP_GET16 / ZZIP_GET32 */ +#ifdef ZZIP_BYTE_ORDER+0 == 1234 +#undef ZZIP_WORDS_BIGENDIAN +#endif +#ifdef ZZIP_BYTE_ORDER+0 == 4321 +#ifndef ZZIP_WORDS_BIGENDIAN +#define ZZIP_WORDS_BIGENDIAN 1 +#endif +#endif + +#endif diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/conf.h b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/conf.h new file mode 100644 index 00000000000..c6d7ad6f84d --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/conf.h @@ -0,0 +1,273 @@ +/* + * Here we postprocess autoconf generated prefix-config.h entries. + * This is generally for things like "off_t" which is left undefined + * in plain config.h if the host system does already have it but we do + * need the prefix variant - so we add here a #define _zzip_off_t off_t + * + * This file is supposed to only carry '#define's. + * See <zzip/types.h> for definitions that might be seen by the compiler. + * + * Author: + * Guido Draheim <guidod@gmx.de> + * + * Copyright (c) 2001,2002,2003,2004 Guido Draheim + * All rights reserved, + * use under the restrictions of the + * Lesser GNU General Public License + * or alternatively the restrictions + * of the Mozilla Public License 1.1 + */ + +#ifndef _ZZIP_CONF_H +#define _ZZIP_CONF_H 1 + +#if !defined ZZIP_OMIT_CONFIG_H +# if defined _MSC_VER || defined __BORLANDC__ || defined __WATCOMC__ +# include <zzip/_msvc.h> +# elif defined ZZIP_1_H +# include "zzip-1.h" +# elif defined ZZIP_2_H +# include "zzip-2.h" +# elif defined ZZIP_3_H +# include "zzip-3.h" +# elif defined ZZIP_4_H +# include "zzip-4.h" +# elif defined ZZIP_5_H +# include "zzip-5.h" +# else /* autoconf generated */ +# include <zzip/_config.h> +# endif +#endif + +/* especially win32 platforms do not declare off_t so far - see zzip-msvc.h */ +#ifndef _zzip_off_t +#ifdef ZZIP_off_t +#define _zzip_off_t ZZIP_off_t +#else +#define _zzip_off_t off_t +#endif +#endif + +#ifndef _zzip_off64_t +#ifdef ZZIP_off64_t +#define _zzip_off64_t ZZIP_off64_t +#else +#define _zzip_off64_t off64_t +#endif +#endif + +/* currently unused, all current zziplib-users do have ansi-C94 compilers. */ +#ifndef _zzip_const +#ifdef ZZIP_const +#define _zzip_const ZZIP_const +#else +#define _zzip_const const +#endif +#endif +#ifdef _AIX +#define _zzip_inline __inline +#endif +#ifndef _zzip_inline +#ifdef ZZIP_inline +#define _zzip_inline ZZIP_inline +#else +#define _zzip_inline inline +#endif +#endif +#ifndef _zzip_restrict +#ifdef ZZIP_restrict +#define _zzip_restrict ZZIP_restrict +#else +#define _zzip_restrict restrict +#endif +#endif +#if defined __linux__ && __GNUC__+0 >= 4 +#define zzip__new__ __attribute__((malloc)) +#elif defined __linux__ && __GNUC__+0 >= 3 && __GNUC_MINOR_+0 >= 3 +#define zzip__new__ __attribute__((malloc)) +#else +#define zzip__new__ +#endif + +#ifndef _zzip_size_t +#ifdef ZZIP_size_t +#define _zzip_size_t ZZIP_size_t +#else +#define _zzip_size_t size_t +#endif +#endif +#ifndef _zzip_ssize_t +#ifdef ZZIP_ssize_t +#define _zzip_ssize_t ZZIP_ssize_t +#else +#define _zzip_ssize_t ssize_t +#endif +#endif +#ifndef _zzip___int64 +#ifdef ZZIP___int64 +#define _zzip___int64 ZZIP___int64 +#else +#define _zzip___int64 long long +#endif +#endif + +/* whether this library shall use a 64bit off_t largefile variant in 64on32: */ +/* (some exported names must be renamed to avoid bad calls after linking) */ +#if defined ZZIP_LARGEFILE_SENSITIVE +# if _FILE_OFFSET_BITS+0 == 64 +# define ZZIP_LARGEFILE_RENAME +# elif defined _LARGE_FILES /* used on older AIX to get at 64bit off_t */ +# define ZZIP_LARGEFILE_RENAME +# elif defined _ZZIP_LARGEFILE /* or simply use this one for zzip64 runs */ +# define ZZIP_LARGEFILE_RENAME +# endif +#endif + +/* if the environment did not setup these for 64bit off_t largefile... */ +#ifdef ZZIP_LARGEFILE_RENAME +# ifndef _FILE_OFFSET_BITS +# ifdef ZZIP__FILE_OFFSET_BITS /* == 64 */ +# define _FILE_OFFSET_BITS ZZIP__FILE_OFFSET_BITS +# endif +# endif +# ifndef _LARGE_FILES +# ifdef ZZIP__LARGE_FILES /* == 1 */ +# define _LARGE_FILES ZZIP__LARGE_FILES +# endif +# endif +# ifndef _LARGEFILE_SOURCE +# ifdef ZZIP__LARGEFILE_SOURCE /* == 1 */ +# define _LARGEFILE_SOURCE ZZIP__LARGEFILE_SOURCE +# endif +# endif +#endif + +#include <errno.h> + +/* mingw32msvc errno : would be in winsock.h */ +#ifndef EREMOTE +#define EREMOTE ESPIPE +#endif + +#ifndef ELOOP +#if defined EILSEQ +#define ELOOP EILSEQ +#else +#define ELOOP ENOEXEC +#endif +#endif + +#if defined __WATCOMC__ +#undef _zzip_inline +#define _zzip_inline static +#endif + +#if defined _MSC_VER || defined __WATCOMC__ +#include <io.h> +#endif + +#ifdef _MSC_VER +# if !__STDC__ +# ifndef _zzip_lseek +# define _zzip_lseek _lseek +# endif +# ifndef _zzip_read +# define _zzip_read _read +# endif +# ifndef _zzip_write +# define _zzip_write _write +# endif +# if 0 +# ifndef _zzip_stat +# define _zzip_stat _stat +# endif +# endif +# endif /* !__STDC__ */ +#endif + /*MSVC*/ + +#if defined _MSC_VER || defined __WATCOMC__ +# ifndef strcasecmp +# define strcasecmp _stricmp +# endif +#endif + +# ifndef _zzip_lseek +# define _zzip_lseek lseek +# endif + +# ifndef _zzip_read +# define _zzip_read read +# endif + +# ifndef _zzip_write +# define _zzip_write write +# endif + +# if 0 +# ifndef _zzip_stat +# define _zzip_stat stat +# endif +# endif + + +#if defined __GNUC__ || defined __attribute__ +#define __zzip_attribute__(X) __attribute__(X) +#else +#define __zzip_attribute__(X) +#endif + +#if defined ZZIP_EXPORTS || defined ZZIPLIB_EXPORTS +# undef ZZIP_DLL +#define ZZIP_DLL 1 +#endif + +/* based on zconf.h : */ +/* compile with -DZZIP_DLL for Windows DLL support */ +#if defined ZZIP_DLL +# if defined _WINDOWS || defined WINDOWS || defined _WIN32 +/*# include <windows.h>*/ +# endif +# if !defined _zzip_export && defined _MSC_VER && (defined WIN32 || defined _WIN32) +# define _zzip_export __declspec(dllexport) /*WINAPI*/ +# endif +# if !defined _zzip_export && defined __BORLANDC__ +# if __BORLANDC__ >= 0x0500 && defined WIN32 +# include <windows.h> +# define _zzip_export __declspec(dllexport) /*WINAPI*/ +# else +# if defined _Windows && defined __DLL__ +# define _zzip_export _export +# endif +# endif +# endif +# if !defined _zzip_export && defined __GNUC__ +# if defined __declspec +# define _zzip_export extern __declspec(dllexport) +# else +# define _zzip_export extern +# endif +# endif +# if !defined _zzip_export && defined __BEOS__ +# define _zzip_export extern __declspec(export) +# endif +# if !defined _zzip_export && defined __WATCOMC__ +# define _zzip_export extern __declspec(dllexport) +# define ZEXPORT __syscall +# define ZEXTERN extern +# endif +#endif + +#if !defined _zzip_export +# if defined __GNUC__ /* || !defined HAVE_LIBZZIP */ +# define _zzip_export extern +# elif defined __declspec || (defined _MSC_VER && defined ZZIP_DLL) +# define _zzip_export extern __declspec(dllimport) +# else +# define _zzip_export extern +# endif +#endif + +#endif + + diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/dir.c b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/dir.c new file mode 100644 index 00000000000..a84a130486a --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/dir.c @@ -0,0 +1,296 @@ +/* + * Author: + * Guido Draheim <guidod@gmx.de> + * + * Copyright (c) 1999,2000,2001,2002,2003 Guido Draheim + * All rights reserved, + * use under the restrictions of the + * Lesser GNU General Public License + * or alternatively the restrictions + * of the Mozilla Public License 1.1 + */ + +#include <zzip/lib.h> /* exported... */ +#include <zzip/file.h> +#include <stddef.h> /*offsetof*/ +#include <stdlib.h> +#include <string.h> +#include <errno.h> + +#ifdef ZZIP_HAVE_SYS_STAT_H +#include <sys/stat.h> +#else +#include <stdio.h> +#endif + +#include <zzip/__dirent.h> + +#ifndef offsetof +#pragma warning had to DEFINE offsetof as it was not in stddef.h +#define offsetof(T,M) ((unsigned)(& ((T*)0)->M)) +#endif + +#ifdef ZZIP_HAVE_SYS_STAT_H +/* MSVC does have IFbitmask but not the corresponding IStests */ +# if !defined S_ISDIR && defined S_IFDIR +# define S_ISDIR(_X_) ((_X_) & S_IFDIR) +# endif +# if !defined S_ISREG && defined S_IFREG +# define S_ISREG(_X_) ((_X_) & S_IFREG) +# endif +#endif + +/** + * This function is the equivalent of a => rewinddir(2) for a realdir or + * the zipfile in place of a directory. The ZZIP_DIR handle returned from + * => zzip_opendir has a flag saying realdir or zipfile. As for a zipfile, + * the filenames will include the filesubpath, so take care. + */ +void +zzip_rewinddir(ZZIP_DIR * dir) +{ + if (! dir) return; + + if (USE_DIRENT && dir->realdir) + { + _zzip_rewinddir(dir->realdir); + return; + } + + if (dir->hdr0) + dir->hdr = dir->hdr0; + else + dir->hdr = 0; +} + +#if ! USE_DIRENT +#define real_readdir(_X_) 1 +#else +static int +real_readdir(ZZIP_DIR* dir) +{ + struct stat st = { 0 }; + char filename[PATH_MAX]; + struct dirent* dirent = _zzip_readdir(dir->realdir); + if (! dirent) return 0; + + dir->dirent.d_name = dirent->d_name; + strcpy(filename, dir->realname); + strcat(filename, "/"); + strcat(filename, dirent->d_name); + + if (stat(filename, &st) == -1) + return -1; + + dir->dirent.d_csize = dir->dirent.st_size = st.st_size; + + if (st.st_mode) + { + if (! S_ISREG(st.st_mode)) + { + dir->dirent.d_compr = st.st_mode; + dir->dirent.d_compr |= 0x80000000; + /* makes it effectively negative, + * but can still be fed to S_ISXXX(x) */ + }else + { + dir->dirent.d_compr = 0; /* stored */ + } + }else + { + dir->dirent.d_compr = 0; /* stored */ + } + + return 1; +} +#endif + +/** + * This function is the equivalent of a => readdir(2) for a realdir + * or a zipfile referenced by the ZZIP_DIR returned from => zzip_opendir. + * + * The ZZIP_DIR handle (as returned by => zzip_opendir) contains a few more + * entries than being copied into the ZZIP_DIRENT. The only valid fields in + * a ZZIP_DIRENT are d_name (the file name), d_compr (compression), d_csize + * (compressed size), st_size (uncompressed size). + */ +ZZIP_DIRENT* +zzip_readdir(ZZIP_DIR * dir) +{ + if (! dir) { errno=EBADF; return 0; } + + if (USE_DIRENT && dir->realdir) + { + if (! real_readdir(dir)) + return 0; + }else + { + if (! dir->hdr) return 0; + + dir->dirent.d_name = dir->hdr->d_name; + dir->dirent.d_compr = dir->hdr->d_compr; + + dir->dirent.d_csize = dir->hdr->d_csize; + dir->dirent.st_size = dir->hdr->d_usize; + + if (! dir->hdr->d_reclen) dir->hdr = 0; + else dir->hdr = (struct zzip_dir_hdr *) + ((char *)dir->hdr + dir->hdr->d_reclen); + } + return &dir->dirent; +} + +/** => zzip_rewinddir + * This function is the equivalent of => telldir(2) for a realdir or zipfile. + */ +zzip_off_t +zzip_telldir(ZZIP_DIR* dir) +{ + if (! dir) { errno=EBADF; return -1; } + + if (USE_DIRENT && dir->realdir) + { + return _zzip_telldir(dir->realdir); + }else + { + return ((zzip_off_t) ((char*) dir->hdr - (char*) dir->hdr0)); + } +} + +/** => zzip_rewinddir + * This function is the equivalent of => seekdir(2) for a realdir or zipfile. + */ +void +zzip_seekdir(ZZIP_DIR* dir, zzip_off_t offset) +{ + if (! dir) return; + + if (USE_DIRENT && dir->realdir) + { + _zzip_seekdir(dir->realdir, offset); + }else + { + dir->hdr = (struct zzip_dir_hdr*) + (dir->hdr0 ? (char*) dir->hdr0 + (size_t) offset : 0); + } +} + +#if defined ZZIP_LARGEFILE_RENAME && defined EOVERFLOW && defined PIC +#undef zzip_seekdir /* zzip_seekdir64 */ +#undef zzip_telldir /* zzip_telldir64 */ + +long zzip_telldir(ZZIP_DIR* dir); +void zzip_seekdir(ZZIP_DIR* dir, long offset); + +/* DLL compatibility layer - so that 32bit code can link with this lib too */ + +long zzip_telldir(ZZIP_DIR* dir) +{ + off_t off = zzip_telldir64 (dir); + long offs = off; + if (offs != off) { errno = EOVERFLOW; return -1; } + return offs; +} + +void zzip_seekdir(ZZIP_DIR* dir, long offset) +{ + zzip_seekdir64 (dir, offset); +} +#endif + +/** + * This function is the equivalent of => opendir(3) for a realdir or zipfile. + * + * This function has some magic - if the given argument-path + * is a directory, it will wrap a real => opendir(3) into the ZZIP_DIR + * structure. Otherwise it will divert to => zzip_dir_open which + * can also attach a ".zip" extension if needed to find the archive. + * + * the error-code is mapped to => errno(3). + */ +ZZIP_DIR* +zzip_opendir(zzip_char_t* filename) +{ + return zzip_opendir_ext_io (filename, 0, 0, 0); +} + +/** => zzip_opendir + * This function uses explicit ext and io instead of the internal + * defaults, setting them to zero is equivalent to => zzip_opendir + */ +ZZIP_DIR* +zzip_opendir_ext_io(zzip_char_t* filename, int o_modes, + zzip_strings_t* ext, zzip_plugin_io_t io) +{ + zzip_error_t e; + ZZIP_DIR* dir; + +# ifdef ZZIP_HAVE_SYS_STAT_H + struct stat st; +# endif + + if (o_modes & (ZZIP_PREFERZIP|ZZIP_ONLYZIP)) goto try_zzip; + try_real: + +# ifdef ZZIP_HAVE_SYS_STAT_H + if (stat(filename, &st) >= 0 && S_ISDIR(st.st_mode) + ){ + if (USE_DIRENT) + { + _zzip_DIR* realdir = _zzip_opendir(filename); + if (realdir) + { + if (! (dir = (ZZIP_DIR *)calloc(1, sizeof (*dir)))) + { + _zzip_closedir(realdir); + return 0; + }else + { + dir->realdir = realdir; + dir->realname = strdup(filename); + return dir; + } + } + } + return 0; + } +# endif /* HAVE_SYS_STAT_H */ + + try_zzip: + dir = zzip_dir_open_ext_io (filename, &e, ext, io); + if (! dir && (o_modes & ZZIP_PREFERZIP)) goto try_real; + if (e) errno = zzip_errno(e); + return dir; +} + +/** + * This function is the equivalent of => closedir(3) for a realdir or zipfile. + * + * This function is magic - if the given arg-ZZIP_DIR + * is a real directory, it will call the real => closedir(3) and then + * free the wrapping ZZIP_DIR structure. Otherwise it will divert + * to => zzip_dir_close which will free the ZZIP_DIR structure. + */ +int +zzip_closedir(ZZIP_DIR* dir) +{ + if (! dir) { errno = EBADF; return -1; } + + if (USE_DIRENT && dir->realdir) + { + _zzip_closedir(dir->realdir); + free(dir->realname); + free(dir); + return 0; + }else + { + zzip_dir_close(dir); + return 0; + } +} + +/* + * Local variables: + * c-file-style: "stroustrup" + * End: + */ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/err.c b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/err.c new file mode 100644 index 00000000000..2f05bb92247 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/err.c @@ -0,0 +1,156 @@ +/* + * Author: + * Guido Draheim <guidod@gmx.de> + * Tomi Ollila <Tomi.Ollila@iki.fi> + * + * Copyright (c) 1999,2000,2001,2002,2003 Guido Draheim + * All rights reserved, + * use under the restrictions of the + * Lesser GNU General Public License + * or alternatively the restrictions + * of the Mozilla Public License 1.1 + */ + +#include <zzip/lib.h> /* exported... */ +#include <zlib.h> + +#include <string.h> +#include <errno.h> + +#include <zzip/file.h> + +static struct errlistentry { int code; const char* mesg; } +errlist[] = +{ + { ZZIP_NO_ERROR, "No error" }, + { ZZIP_OUTOFMEM, + "could not get temporary memory for internal structures" }, + { ZZIP_DIR_OPEN, "Failed to open zip-file %s" }, + { ZZIP_DIR_STAT, "Failed to fstat zip-file %s" }, + { ZZIP_DIR_SEEK, "Failed to lseek zip-file %s" }, + { ZZIP_DIR_READ, "Failed to read zip-file %s"}, + { ZZIP_DIR_TOO_SHORT, "zip-file %s too short" }, + { ZZIP_DIR_EDH_MISSING, "zip-file central directory not found" }, + { ZZIP_DIRSIZE, "Directory size too big..." }, + { ZZIP_ENOENT, "No such file found in zip-file %s" }, + { ZZIP_UNSUPP_COMPR, "Unsupported compression format" }, + { ZZIP_CORRUPTED, "Zipfile corrupted" }, + { ZZIP_UNDEF, "Some undefined error occurred" }, + { ZZIP_DIR_LARGEFILE, "Directory is largefile variant" }, + { 0, 0 }, +}; + +#define errlistSIZE (sizeof(errlist)/sizeof(*errlist)) + +/** + * returns the static string for the given error code. The + * error code can be either a normal system error (a + * positive error code will flag this), it can be => libz + * error code (a small negative error code will flag this) + * or it can be an error code from => libzzip, which is an + * negative value lower than => ZZIP_ERROR + */ +zzip_char_t* +zzip_strerror(int errcode) +{ + if (errcode < ZZIP_ERROR && errcode > ZZIP_ERROR-32) + { + struct errlistentry* err = errlist; + for (; err->mesg ; err++) + { + if (err->code == errcode) + return err->mesg; + } + errcode = EINVAL; + } + + if (errcode < 0) + { + if (errcode == -1) + return strerror(errcode); + else + return zError(errcode); + } + + return strerror (errcode); +} + +/** => zzip_strerror + * This function fetches the errorcode from the => DIR-handle and + * runs it through => zzip_strerror to obtain the static string + * describing the error. + */ +zzip_char_t* +zzip_strerror_of(ZZIP_DIR* dir) +{ + if (! dir) return strerror (errno); + return zzip_strerror(dir->errcode); +} + +static struct errnolistentry { int code; int e_no; } +errnolist[] = +{ + { Z_STREAM_ERROR, EPIPE }, + { Z_DATA_ERROR, ESPIPE }, + { Z_MEM_ERROR, ENOMEM }, + { Z_BUF_ERROR, EMFILE }, + { Z_VERSION_ERROR, ENOEXEC }, + + { ZZIP_DIR_OPEN, ENOTDIR }, + { ZZIP_DIR_STAT, EREMOTE }, + { ZZIP_DIR_SEEK, ESPIPE }, +# ifdef ESTRPIPE + { ZZIP_DIR_READ, ESTRPIPE}, +# else + { ZZIP_DIR_READ, EPIPE}, +# endif + { ZZIP_DIR_TOO_SHORT, ENOEXEC }, +# ifdef ENOMEDIUM + { ZZIP_DIR_EDH_MISSING, ENOMEDIUM }, +# else + { ZZIP_DIR_EDH_MISSING, EIO }, +# endif + { ZZIP_DIRSIZE, EFBIG }, + { ZZIP_OUTOFMEM, ENOMEM }, + { ZZIP_ENOENT, ENOENT }, +# ifdef EPFNOSUPPORT + { ZZIP_UNSUPP_COMPR, EPFNOSUPPORT }, +# else + { ZZIP_UNSUPP_COMPR, EACCES }, +# endif +# ifdef EILSEQ + { ZZIP_CORRUPTED, EILSEQ }, +# else + { ZZIP_CORRUPTED, ELOOP }, +# endif + { ZZIP_UNDEF, EINVAL }, + { 0, 0 }, +}; + +/** + * map the error code to a system error code. This is used + * for the drop-in replacement functions to return a value + * that can be interpreted correctly by code sections that + * are unaware of the fact they their => open(2) call had been + * diverted to a file inside a zip-archive. + */ +int +zzip_errno(int errcode) +{ + if (errcode >= -1) return errno; + + { struct errnolistentry* err = errnolist; + for (; err->code ; err++) + { + if (err->code == errcode) + return err->e_no; + } + } + return EINVAL; +} + +/* + * Local variables: + * c-file-style: "stroustrup" + * End: + */ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/fetch.c b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/fetch.c new file mode 100644 index 00000000000..23be82376df --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/fetch.c @@ -0,0 +1,117 @@ +#include <zzip/fetch.h> + +#if defined ZZIP_WORDS_BIGENDIAN && \ + defined bswap_16 && defined bswap_32 && defined bswap_64 +# define __ZZIP_GET16(__p) bswap_16(*(uint16_t*)(__p)) +# define __ZZIP_GET32(__p) bswap_32(*(uint32_t*)(__p)) +# define __ZZIP_SET16(__p,__x) (*(uint16_t*)(__p) = bswap_16((uint16_t)(__x))) +# define __ZZIP_SET32(__p,__x) (*(uint32_t*)(__p) = bswap_32((uint32_t)(__x))) +# define __ZZIP_GET64(__p) bswap_64(*(zzip_off64_t*)(__p)) +# define __ZZIP_SET64(__p,__x) \ + (*(zzip_off64_t*)(__p) = bswap_64((zzip_off64_t)(__x))) +#endif + +/* ------------------------- fetch helpers --------------------------------- */ + +/** + * Make 32 bit value in host byteorder from little-endian mapped octet-data + * (works also on machines which SIGBUS on misaligned data access (eg. 68000)) + */ +uint32_t __zzip_get32(unsigned char * s) +{ +#if defined __ZZIP_GET32 + return __ZZIP_GET32(s); +#else + return ((uint32_t)s[3] << 24) | ((uint32_t)s[2] << 16) + | ((uint32_t)s[1] << 8) | ((uint32_t)s[0]); +#endif +} + +/** => __zzip_get32 + * This function does the same for a 16 bit value. + */ +uint16_t __zzip_get16(unsigned char * s) +{ +#if defined __ZZIP_GET16 + return __ZZIP_GET16(s); +#else + return ((uint16_t)s[1] << 8) | ((uint16_t)s[0]); +#endif +} + +/** => __zzip_get32 + * This function does the same for an off64_t value. + */ +uint64_t __zzip_get64(unsigned char * s) +{ +#ifdef __GNUC__ + register uint64_t v + = s[7]; v <<= 8; + v |= s[6]; v <<= 8; + v |= s[5]; v <<= 8; + v |= s[4]; v <<= 8; + v |= s[3]; v <<= 8; + v |= s[2]; v <<= 8; + v |= s[1]; v <<= 8; + v |= s[0]; return v; +#else + return ((uint64_t)s[7] << 56) | ((uint64_t)s[6] << 48) + | ((uint64_t)s[5] << 40) | ((uint64_t)s[4] << 32) + | ((uint64_t)s[3] << 24) | ((uint64_t)s[2] << 16) + | ((uint64_t)s[1] << 8) | ((uint64_t)s[0]); +#endif +} + +/** => __zzip_get32 + * This function pushes a 32bit value at the specified address + */ +void __zzip_set32(unsigned char * s, uint32_t v) +{ +#if defined __ZZIP_SET32 + return __ZZIP_SET32(s, v); +#else + s[0] = (unsigned char) (v); + v >>= 8; + s[1] = (unsigned char) (v); + v >>= 8; + s[2] = (unsigned char) (v); + v >>= 8; + s[3] = (unsigned char) (v); +#endif +} + +/** => __zzip_get32 + * This function does the same for a 16 bit value. + */ +void __zzip_set16(unsigned char * s, uint16_t v) +{ +#if defined __ZZIP_SET16 + return __ZZIP_SET16(s, v); +#else + s[0] = (unsigned char) (v); + v >>= 8; + s[1] = (unsigned char) (v); +#endif +} + +/** => __zzip_get32 + * This function pushes a off64_t value at the specified address + */ +void __zzip_set64(unsigned char * s, uint64_t v) +{ + s[0] = (unsigned char) (v); + v >>= 8; + s[1] = (unsigned char) (v); + v >>= 8; + s[2] = (unsigned char) (v); + v >>= 8; + s[3] = (unsigned char) (v); + v >>= 8; + s[4] = (unsigned char) (v); + v >>= 8; + s[5] = (unsigned char) (v); + v >>= 8; + s[6] = (unsigned char) (v); + v >>= 8; + s[7] = (unsigned char) (v); +} diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/fetch.h b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/fetch.h new file mode 100644 index 00000000000..fda6f9067e6 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/fetch.h @@ -0,0 +1,343 @@ +#ifndef _ZZIP_FORMATS_H +#define _ZZIP_FORMATS_H + +#include <zzip/types.h> +#include <zzip/format.h> +#include <zzip/stdint.h> + +/* linux knows "byteswap.h" giving us an optimized variant */ +#ifdef ZZIP_HAVE_BYTESWAP_H +#include <byteswap.h> +#endif + +/* get 16/32 bits from little-endian zip-file to host byteorder */ +extern uint32_t __zzip_get32(zzip_byte_t * s) __zzip_attribute__((const)); +extern uint16_t __zzip_get16(zzip_byte_t * s) __zzip_attribute__((const)); +extern void __zzip_set32(zzip_byte_t * s, uint32_t v); +extern void __zzip_set16(zzip_byte_t * s, uint16_t v); + +extern uint64_t __zzip_get64(zzip_byte_t * s) __zzip_attribute__((const)); +extern void __zzip_set64(zzip_byte_t * s, uint64_t v); + +#ifdef ZZIP_WORDS_BIGENDIAN +# if defined bswap_16 && defined bswap_32 && defined bswap_64 /* i.e. linux */ +# define ZZIP_GET16(__p) bswap_16(*(uint16_t*)(__p)) +# define ZZIP_GET32(__p) bswap_32(*(uint32_t*)(__p)) +# define ZZIP_GET64(__p) bswap_64(*(uint64_t*)(__p)) +# define ZZIP_SET16(__p,__x) (*(uint16_t*)(__p) = bswap_16((uint16_t)(__x))) +# define ZZIP_SET32(__p,__x) (*(uint32_t*)(__p) = bswap_32((uint32_t)(__x))) +# define ZZIP_SET64(__p,__x) (*(uint64_t*)(__p) = bswap_64((uint64_t)(__x))) +# else +# define ZZIP_GET64(__p) (__zzip_get64((__p))) +# define ZZIP_GET32(__p) (__zzip_get32((__p))) +# define ZZIP_GET16(__p) (__zzip_get16((__p))) +# define ZZIP_SET64(__p,__x) (__zzip_set64((__p),(__x))) +# define ZZIP_SET32(__p,__x) (__zzip_set32((__p),(__x))) +# define ZZIP_SET16(__p,__x) (__zzip_set16((__p),(__x))) +# endif +#else /* little endian is the original zip format byteorder */ +# define ZZIP_GET16(__p) (*(uint16_t*)(__p)) +# define ZZIP_GET32(__p) (*(uint32_t*)(__p)) +# define ZZIP_GET64(__p) (*(uint64_t*)(__p)) +# define ZZIP_SET16(__p,__x) (*(uint16_t*)(__p) = (uint16_t)(__x)) +# define ZZIP_SET32(__p,__x) (*(uint32_t*)(__p) = (uint32_t)(__x)) +# define ZZIP_SET64(__p,__x) (*(uint64_t*)(__p) = (uint64_t)(__x)) +#endif + +/* ..................... bitcorrect physical access .................... */ + +/* zzip_file_header - the local file header */ +#define zzip_file_header_get_magic(__p) ZZIP_GET32((__p)->z_magic) +#define zzip_file_header_set_magic(__p,__x) ZZIP_SET32((__p)->z_magic,(__x)) +#define zzip_file_header_get_flags(__p) ZZIP_GET16((__p)->z_flags) +#define zzip_file_header_set_flags(__p,__x) ZZIP_SET16((__p)->z_flags,(__x)) +#define zzip_file_header_get_compr(__p) ZZIP_GET16((__p)->z_compr) +#define zzip_file_header_set_compr(__p,__x) ZZIP_SET16((__p)->z_compr,(__x)) +#define zzip_file_header_get_crc32(__p) ZZIP_GET32((__p)->z_crc32) +#define zzip_file_header_set_crc32(__p,__x) ZZIP_SET32((__p)->z_crc32,(__x)) +#define zzip_file_header_get_csize(__p) ZZIP_GET32((__p)->z_csize) +#define zzip_file_header_set_csize(__p,__x) ZZIP_SET32((__p)->z_csize,(__x)) +#define zzip_file_header_get_usize(__p) ZZIP_GET32((__p)->z_usize) +#define zzip_file_header_set_usize(__p,__x) ZZIP_SET32((__p)->z_usize,(__x)) +#define zzip_file_header_get_namlen(__p) ZZIP_GET16((__p)->z_namlen) +#define zzip_file_header_set_namlen(__p,__x) ZZIP_SET16((__p)->z_namlen,(__x)) +#define zzip_file_header_get_extras(__p) ZZIP_GET16((__p)->z_extras) +#define zzip_file_header_set_extras(__p,__x) ZZIP_SET16((__p)->z_extras,(__x)) +#define zzip_file_header_sizeof_tails(__p) (zzip_file_header_get_namlen(__p)+\ + zzip_file_header_get_extras(__p) ) +#define zzip_file_header_check_magic(__p) ZZIP_FILE_HEADER_CHECKMAGIC((__p)) + +/* zzip_file_trailer - data descriptor per file block */ +#define zzip_file_trailer_get_magic(__p) ZZIP_GET32((__p)->z_magic) +#define zzip_file_trailer_set_magic(__p,__x) ZZIP_SET32((__p)->z_magic,(__x)) +#define zzip_file_header_get_crc32(__p) ZZIP_GET32((__p)->z_crc32) +#define zzip_file_trailer_set_crc32(__p,__x) ZZIP_SET32((__p)->z_crc32,(__x)) +#define zzip_file_trailer_get_csize(__p) ZZIP_GET32((__p)->z_csize) +#define zzip_file_trailer_set_csize(__p,__x) ZZIP_SET32((__p)->z_csize,(__x)) +#define zzip_file_trailer_get_usize(__p) ZZIP_GET32((__p)->z_usize) +#define zzip_file_trailer_set_usize(__p,__x) ZZIP_SET32((__p)->z_usize,(__x)) +#define zzip_file_trailer_sizeof_tails(__p) 0 +#define zzip_file_trailer_check_magic(__p) ZZIP_FILE_TRAILER_CHECKMAGIC((__p)) +/* zzip_disk_entry (currently named zzip_root_dirent) */ +#define zzip_disk_entry_get_magic(__p) ZZIP_GET32((__p)->z_magic) +#define zzip_disk_entry_set_magic(__p,__x) ZZIP_SET32((__p)->z_magic,(__x)) +#define zzip_disk_entry_get_flags(__p) ZZIP_GET16((__p)->z_flags) +#define zzip_disk_entry_set_flags(__p,__x) ZZIP_SET16((__p)->z_flags,(__x)) +#define zzip_disk_entry_get_compr(__p) ZZIP_GET16((__p)->z_compr) +#define zzip_disk_entry_set_compr(__p,__x) ZZIP_SET16((__p)->z_compr,(__x)) +#define zzip_disk_entry_get_crc32(__p) ZZIP_GET32((__p)->z_crc32) +#define zzip_disk_entry_set_crc32(__p,__x) ZZIP_SET32((__p)->z_crc32,(__x)) +#define zzip_disk_entry_get_csize(__p) ZZIP_GET32((__p)->z_csize) +#define zzip_disk_entry_set_csize(__p,__x) ZZIP_SET32((__p)->z_csize,(__x)) +#define zzip_disk_entry_get_usize(__p) ZZIP_GET32((__p)->z_usize) +#define zzip_disk_entry_set_usize(__p,__x) ZZIP_SET32((__p)->z_usize,(__x)) +#define zzip_disk_entry_get_namlen(__p) ZZIP_GET16((__p)->z_namlen) +#define zzip_disk_entry_set_namlen(__p,__x) ZZIP_SET16((__p)->z_namlen,(__x)) +#define zzip_disk_entry_get_extras(__p) ZZIP_GET16((__p)->z_extras) +#define zzip_disk_entry_set_extras(__p,__x) ZZIP_SET16((__p)->z_extras,(__x)) +#define zzip_disk_entry_get_comment(__p) ZZIP_GET16((__p)->z_comment) +#define zzip_disk_entry_set_comment(__p,__x) ZZIP_SET16((__p)->z_comment,(__x)) +#define zzip_disk_entry_get_diskstart(__p) ZZIP_GET16((__p)->z_diskstart) +#define zzip_disk_entry_set_diskstart(__p,__x) ZZIP_SET16((__p)->z_diskstart,(__x)) +#define zzip_disk_entry_get_filetype(__p) ZZIP_GET16((__p)->z_filetype) +#define zzip_disk_entry_set_filetype(__p,__x) ZZIP_SET16((__p)->z_filetype,(__x)) +#define zzip_disk_entry_get_filemode(__p) ZZIP_GET32((__p)->z_filemode) +#define zzip_disk_entry_set_filemode(__p,__x) ZZIP_SET32((__p)->z_filemode,(__x)) +#define zzip_disk_entry_get_offset(__p) ZZIP_GET32((__p)->z_offset) +#define zzip_disk_entry_set_offset(__p,__x) ZZIP_SET32((__p)->z_offset,(__x)) +#define zzip_disk_entry_sizeof_tails(__p) (zzip_disk_entry_get_namlen(__p) +\ + zzip_disk_entry_get_extras(__p) +\ + zzip_disk_entry_get_comment(__p) ) +#define zzip_disk_entry_check_magic(__p) ZZIP_DISK_ENTRY_CHECKMAGIC((__p)) + +/* zzip_disk_trailer - the zip archive entry point */ +#define zzip_disk_trailer_get_magic(__p) ZZIP_GET32((__p)->z_magic) +#define zzip_disk_trailer_set_magic(__p,__x) ZZIP_SET32((__p)->z_magic,(__x)) +#define zzip_disk_trailer_get_disk(__p) ZZIP_GET16((__p)->z_disk) +#define zzip_disk_trailer_set_disk(__p,__x) ZZIP_SET16((__p)->z_disk,(__x)) +#define zzip_disk_trailer_get_finaldisk(__p) ZZIP_GET16((__p)->z_finaldisk) +#define zzip_disk_trailer_set_finaldisk(__p,__x) ZZIP_SET16((__p)->z_finaldisk,(__x)) +#define zzip_disk_trailer_get_entries(__p) ZZIP_GET16((__p)->z_entries) +#define zzip_disk_trailer_set_entries(__p,__x) ZZIP_SET16((__p)->z_entries,(__x)) +#define zzip_disk_trailer_get_finalentries(__p) ZZIP_GET16((__p)->z_finalentries) +#define zzip_disk_trailer_set_finalentries(__p,__x) ZZIP_SET16((__p)->z_finalentries,(__x)) +#define zzip_disk_trailer_get_rootsize(__p) ZZIP_GET32((__p)->z_rootsize) +#define zzip_disk_trailer_set_rootsize(__p,__x) ZZIP_SET32((__p)->z_rootsize,(__x)) +#define zzip_disk_trailer_get_rootseek(__p) ZZIP_GET32((__p)->z_rootseek) +#define zzip_disk_trailer_set_rootseek(__p,__x) ZZIP_SET32((__p)->z_rootseek,(__x)) +#define zzip_disk_trailer_get_comment(__p) ZZIP_GET16((__p)->z_comment) +#define zzip_disk_trailer_set_comment(__p,__x) ZZIP_SET16((__p)->z_comment,(__x)) +#define zzip_disk_trailer_sizeof_tails(__p) ( zzip_disk_entry_get_comment(__p)) +#define zzip_disk_trailer_check_magic(__p) ZZIP_DISK_TRAILER_CHECKMAGIC((__p)) + +/* extra field should be type + size + data + type + size + data ... */ +#define zzip_extra_block_get_datatype(__p) ZZIP_GET16((zzip_byte_t*)(__p)) +#define zzip_extra_block_set_datatype(__p,__x) ZZIP_SET16((zzip_byte_t*)(__p),__x) +#define zzip_extra_block_get_datasize(__p) ZZIP_GET16((zzip_byte_t*)(__p)+2) +#define zzip_extra_block_set_datasize(__p,__x) ZZIP_SET16((zzip_byte_t*)(__p)+2,__x) + +/* zzip64_disk_trailer - the zip64 archive entry point */ +#define zzip_disk64_trailer_get_magic(__p) ZZIP_GET32((__p)->z_magic) +#define zzip_disk64_trailer_set_magic(__p,__x) ZZIP_SET32((__p)->z_magic,(__x)) +#define zzip_disk64_trailer_get_size(__p) ZZIP_GET64((__p)->z_size) +#define zzip_disk64_trailer_set_size(__p,__x) ZZIP_SET64((__p)->z_size,(__x)) +#define zzip_disk64_trailer_get_disk(__p) ZZIP_GET32((__p)->z_disk) +#define zzip_disk64_trailer_set_disk(__p,__x) ZZIP_SET32((__p)->z_disk,(__x)) +#define zzip_disk64_trailer_get_finaldisk(__p) ZZIP_GET32((__p)->z_finaldisk) +#define zzip_disk64_trailer_set_finaldisk(__p,__x) ZZIP_SET32((__p)->z_finaldisk,(__x)) +#define zzip_disk64_trailer_get_entries(__p) ZZIP_GET64((__p)->z_entries) +#define zzip_disk64_trailer_set_entries(__p,__x) ZZIP_SET64((__p)->z_entries,(__x)) +#define zzip_disk64_trailer_get_finalentries(__p) ZZIP_GET64((__p)->z_finalentries) +#define zzip_disk64_trailer_set_finalentries(__p,__x) ZZIP_SET64((__p)->z_finalentries,(__x)) +#define zzip_disk64_trailer_get_rootsize(__p) ZZIP_GET64((__p)->z_rootsize) +#define zzip_disk64_trailer_set_rootsize(__p,__x) ZZIP_SET64((__p)->z_rootsize,(__x)) +#define zzip_disk64_trailer_get_rootseek(__p) ZZIP_GET64((__p)->z_rootseek) +#define zzip_disk64_trailer_set_rootseek(__p,__x) ZZIP_SET64((__p)->z_rootseek,(__x)) +#define zzip_disk64_trailer_check_magic(__p) ZZIP_DISK64_TRAILER_CHECKMAGIC((__p)) + +/* .............. some logical typed access wrappers ....................... */ + +/* zzip_file_header - the local file header */ +#define zzip_file_header_csize(__p) ((zzip_size_t) \ + zzip_file_header_get_csize(__p)) +#define zzip_file_header_usize(__p) ((zzip_size_t) \ + zzip_file_header_get_usize(__p)) +#define zzip_file_header_namlen(__p) ((zzip_size_t) \ + zzip_file_header_get_namlen(__p)) +#define zzip_file_header_extras(__p) ((zzip_size_t) \ + zzip_file_header_get_extras(__p)) +#define zzip_file_header_sizeof_tail(__p) ((zzip_size_t) \ + zzip_file_header_sizeof_tails(__p)) +#define zzip_file_header_sizeto_end(__p) ((zzip_size_t) \ + (zzip_file_header_sizeof_tail(__p) + zzip_file_header_headerlength)) +#define zzip_file_header_skipto_end(__p) ((void*) (__p) + \ + (zzip_file_header_sizeof_tail(__p) + zzip_file_header_headerlength)) + +#define zzip_file_header_to_filename(__p) ((char*) \ + ((char*)(__p) + zzip_file_header_headerlength)) +#define zzip_file_header_to_extras(__p) ((char*) \ + (zzip_file_header_to_filename(__p) + zzip_file_header_namlen(__p))) +#define zzip_file_header_to_data(__p) ((zzip_byte_t*) \ + (zzip_file_header_to_extras(__p) + zzip_file_header_extras(__p))) +#define zzip_file_header_to_trailer(__p) ((struct zzip_file_trailer*) \ + (zzip_file_header_to_data(__p) + zzip_file_header_csize(__p))) + +/* zzip_file_trailer - data descriptor per file block */ +#define zzip_file_trailer_csize(__p) ((zzip_size_t) \ + zzip_file_trailer_get_csize(__p)) +#define zzip_file_trailer_usize(__p) ((zzip_size_t) \ + zzip_file_trailer_get_usize(__p)) +#define zzip_file_trailer_sizeof_tail(__p) ((zzip_size_t) \ + zzip_file_trailer_sizeof_tails(__p)) +#define zzip_file_trailer_sizeto_end(__p) ((zzip_size_t) \ + (zzip_file_trailer_sizeof_tail(__p) + zzip_file_trailer_headerlength)) +#define zzip_file_trailer_skipto_end(__p) ((void*) (__p) + \ + (zzip_file_trailer_sizeof_tail(__p) + zzip_file_trailer_headerlength)) + +/* zzip_disk_entry (currently named zzip_root_dirent) */ +#define zzip_disk_entry_csize(__p) ((zzip_size_t) \ + zzip_disk_entry_get_csize(__p)) +#define zzip_disk_entry_usize(__p) ((zzip_size_t) \ + zzip_disk_entry_get_usize(__p)) +#define zzip_disk_entry_namlen(__p) ((zzip_size_t) \ + zzip_disk_entry_get_namlen(__p)) +#define zzip_disk_entry_extras(__p) ((zzip_size_t) \ + zzip_disk_entry_get_extras(__p)) +#define zzip_disk_entry_comment(__p) ((zzip_size_t) \ + zzip_disk_entry_get_comment(__p)) +#define zzip_disk_entry_diskstart(__p) ((int) \ + zzip_disk_entry_get_diskstart(__p)) +#define zzip_disk_entry_filetype(__p) ((int) \ + zzip_disk_entry_get_filetype(__p)) +#define zzip_disk_entry_filemode(__p) ((int) \ + zzip_disk_entry_get_filemode(__p)) +#define zzip_disk_entry_fileoffset(__p) ((zzip_off_t) \ + zzip_disk_entry_get_offset(__p)) +#define zzip_disk_entry_sizeof_tail(__p) ((zzip_size_t) \ + zzip_disk_entry_sizeof_tails(__p)) +#define zzip_disk_entry_sizeto_end(__p) ((zzip_size_t) \ + (zzip_disk_entry_sizeof_tail(__p) + zzip_disk_entry_headerlength)) +#define zzip_disk_entry_skipto_end(__p) ((zzip_byte_t*) (__p) + \ + (zzip_disk_entry_sizeof_tail(__p) + zzip_disk_entry_headerlength)) + +#define zzip_disk_entry_to_filename(__p) ((char*) \ + ((char*)(__p) + zzip_disk_entry_headerlength)) +#define zzip_disk_entry_to_extras(__p) ((char*) \ + (zzip_disk_entry_to_filename(__p) + zzip_disk_entry_namlen(__p))) +#define zzip_disk_entry_to_comment(__p) ((char*) \ + (zzip_disk_entry_to_extras(__p) + zzip_disk_entry_extras(__p))) +#define zzip_disk_entry_to_next_entry(__p) ((struct zzip_disk_entry*) \ + (zzip_disk_entry_to_comment(__p) + zzip_disk_entry_comment(__p))) + +/* zzip_disk_trailer - the zip archive entry point */ +#define zzip_disk_trailer_localdisk(__p) ((int) \ + zzip_disk_trailer_get_disk(__p)) +#define zzip_disk_trailer_finaldisk(__p) ((int) \ + zzip_disk_trailer_get_finaldisk(__p)) +#define zzip_disk_trailer_localentries(__p) ((int) \ + zzip_disk_trailer_get_entries(__p)) +#define zzip_disk_trailer_finalentries(__p) ((int) \ + zzip_disk_trailer_get_finalentries(__p)) +#define zzip_disk_trailer_rootsize(__p) ((zzip_off_t) \ + zzip_disk_trailer_get_rootsize(__p)) +#define zzip_disk_trailer_rootseek(__p) ((zzip_off_t) \ + zzip_disk_trailer_get_rootseek(__p)) +#define zzip_disk_trailer_comment(__p) ((zzip_size_t) \ + zzip_disk_trailer_get_comment(__p)) +#define zzip_disk_trailer_sizeof_tail(__p) ((zzip_size_t) \ + zzip_disk_trailer_sizeof_tails(__p)) +#define zzip_disk_trailer_sizeto_end(__p) ((zzip_size_t) \ + (zzip_disk_trailer_sizeof_tail(__p) + zzip_disk_trailer_headerlength)) +#define zzip_disk_trailer_skipto_end(__p) ((void*) (__p) \ + (zzip_disk_trailer_sizeof_tail(__p) + zzip_disk_trailer_headerlength)) + +#define zzip_disk_trailer_to_comment(__p) ((char*) \ + ((char*)(__p) + zzip_disk_trailer_headerlength)) +#define zzip_disk_trailer_to_endoffile(__p) ((void*) \ + (zzip_disk_trailer_to_comment(__p) + zzip_disk_trailer_comment(__p))) + +/* zzip_disk64_trailer - the zip archive entry point */ +#define zzip_disk64_trailer_localdisk(__p) ((int) \ + zzip_disk64_trailer_get_disk(__p)) +#define zzip_disk64_trailer_finaldisk(__p) ((int) \ + zzip_disk64_trailer_get_finaldisk(__p)) +#define zzip_disk64_trailer_localentries(__p) ((int) \ + zzip_disk64_trailer_get_entries(__p)) +#define zzip_disk64_trailer_finalentries(__p) ((int) \ + zzip_disk64_trailer_get_finalentries(__p)) +#define zzip_disk64_trailer_rootsize(__p) ((zzip_off64_t) \ + zzip_disk64_trailer_get_rootsize(__p)) +#define zzip_disk64_trailer_rootseek(__p) ((zzip_off64_t) \ + zzip_disk64_trailer_get_rootseek(__p)) +#define zzip_disk64_trailer_sizeof_tail(__p) ((zzip_size_t) \ + zzip_disk64_trailer_get_size(__p) - zzip_disk64_trailer_headerlength) +#define zzip_disk64_trailer_sizeto_end(__p) ((zzip_size_t) \ + zzip_disk64_trailer_get_size(__p)) +#define zzip_disk64_trailer_skipto_end(__p) ((void*) \ + ((char*)(__p) + zzip_disk64_sizeto_end(__p))) + +/* extra field should be type + size + data + type + size + data ... */ +#define zzip_extra_block_sizeof_tail(__p) ((zzip_size_t) \ + (zzip_extra_block_get_datasize(__p))) +#define zzip_extra_block_sizeto_end(__p) ((zzip_size_t) \ + (zzip_extra_block_sizeof_tail(__p) + zzip_extra_block_headerlength)) +#define zzip_extra_block_skipto_end(__p) ((void*) (__p) \ + (zzip_extra_block_sizeof_tail(__p) + zzip_extra_block_headerlength)) + +/* ................... and put these to the next level ................ */ + +#define zzip_file_header_data_encrypted(__p) \ + ZZIP_IS_ENCRYPTED( zzip_file_header_get_flags(__p) ) +#define zzip_file_header_data_comprlevel(__p) \ + ZZIP_IS_COMPRLEVEL( zzip_file_header_get_flags(__p) ) +#define zzip_file_header_data_streamed(__p) \ + ZZIP_IS_STREAMED( zzip_file_header_get_flags(__p) ) +#define zzip_file_header_data_stored(__p) \ + ( ZZIP_IS_STORED == zzip_file_header_get_compr(__p) ) +#define zzip_file_header_data_deflated(__p) \ + ( ZZIP_IS_DEFLATED == zzip_file_header_get_compr(__p) ) + +#define zzip_disk_entry_data_encrypted(__p) \ + ZZIP_IS_ENCRYPTED( zzip_disk_entry_get_flags(__p) ) +#define zzip_disk_entry_data_comprlevel(__p) \ + ZZIP_IS_COMPRLEVEL( zzip_disk_entry_get_flags(__p) ) +#define zzip_disk_entry_data_streamed(__p) \ + ZZIP_IS_STREAMED( zzip_disk_entry_get_flags(__p) ) +#define zzip_disk_entry_data_stored(__p) \ + ( ZZIP_IS_STORED == zzip_disk_entry_get_compr(__p) ) +#define zzip_disk_entry_data_deflated(__p) \ + ( ZZIP_IS_DEFLATED == zzip_disk_entry_get_compr(__p) ) +#define zzip_disk_entry_data_ascii(__p) \ + ( zzip_disk_entry_get_filetype(__p) & 1) + +#define zzip_file_header_data_not_deflated(__p) \ + (zzip_file_header_data_stored(__p)) +#define zzip_file_header_data_std_deflated(__p) \ + (zzip_file_header_data_deflated(__p) && \ + zzip_file_header_data_comprlevel(__p) == ZZIP_DEFLATED_STD_COMPR) +#define zzip_file_header_data_max_deflated(__p) \ + (zzip_file_header_data_deflated(__p) && \ + zzip_file_header_data_comprlevel(__p) == ZZIP_DEFLATED_MAX_COMPR) +#define zzip_file_header_data_low_deflated(__p) \ + (zzip_file_header_data_deflated(__p) && \ + zzip_file_header_data_comprlevel(__p) == ZZIP_DEFLATED_LOW_COMPR) +#define zzip_file_header_data_min_deflated(__p) \ + (zzip_file_header_data_deflated(__p) && \ + zzip_file_header_data_comprlevel(__p) == ZZIP_DEFLATED_MIN_COMPR) + +#define zzip_disk_entry_data_not_deflated(__p) \ + (zzip_disk_entry_data_stored(__p)) +#define zzip_disk_entry_data_std_deflated(__p) \ + (zzip_disk_entry_data_deflated(__p) && \ + zzip_disk_entry_data_comprlevel(__p) == ZZIP_DEFLATED_STD_COMPR) +#define zzip_disk_entry_data_max_deflated(__p) \ + (zzip_disk_entry_data_deflated(__p) && \ + zzip_disk_entry_data_comprlevel(__p) == ZZIP_DEFLATED_MAX_COMPR) +#define zzip_disk_entry_data_low_deflated(__p) \ + (zzip_disk_entry_data_deflated(__p) && \ + zzip_disk_entry_data_comprlevel(__p) == ZZIP_DEFLATED_LOW_COMPR) +#define zzip_disk_entry_data_min_deflated(__p) \ + (zzip_disk_entry_data_deflated(__p) && \ + zzip_disk_entry_data_comprlevel(__p) == ZZIP_DEFLATED_MIN_COMPR) + +#endif diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/file.c b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/file.c new file mode 100644 index 00000000000..af3ed07e556 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/file.c @@ -0,0 +1,1032 @@ +/* + * Author: + * Guido Draheim <guidod@gmx.de> + * Tomi Ollila <Tomi.Ollila@iki.fi> + * + * Copyright (c) 1999,2000,2001,2002,2003 Guido Draheim + * All rights reserved, + * use under the restrictions of the + * Lesser GNU General Public License + * or alternatively the restrictions + * of the Mozilla Public License 1.1 + */ + +#include <zzip/lib.h> /* exported...*/ +#include <zzip/file.h> + +#include <string.h> +#ifdef ZZIP_HAVE_STRINGS_H +#include <strings.h> +#endif +#include <sys/stat.h> +#include <errno.h> +#include <stdlib.h> +#include <ctype.h> + +#include <zzip/format.h> +#include <zzip/fetch.h> +#include <zzip/__debug.h> + +#if 0 +# if defined ZZIP_HAVE_IO_H +# include <io.h> /* tell */ +# else +# define tell(fd) lseek(fd,0,SEEK_CUR) +# endif +#else +#define tells(fd) seeks(fd,0,SEEK_CUR) +#endif + +/** + * the direct function of => zzip_close(fp). it will cleanup the + * inflate-portion of => zlib and free the structure given. + * + * it is called quite from the error-cleanup parts + * of the various => _open functions. + * + * the .refcount is decreased and if zero the fp->dir is closed just as well. + */ +int +zzip_file_close(ZZIP_FILE * fp) +{ + auto int self; + ZZIP_DIR * dir = fp->dir; + + if (fp->method) + inflateEnd(&fp->d_stream); /* inflateEnd() can be called many times */ + + if (dir->cache.locked == NULL) + dir->cache.locked = &self; + + if (fp->buf32k) + { + if (dir->cache.locked == &self && + dir->cache.buf32k == NULL) dir->cache.buf32k = fp->buf32k; + else free(fp->buf32k); + } + + if (dir->currentfp == fp) + dir->currentfp = NULL; + + dir->refcount--; + /* ease to notice possible dangling reference errors */ + memset(fp, 0, sizeof(*fp)); + + if (dir->cache.locked == &self && + dir->cache.fp == NULL) dir->cache.fp = fp; + else free(fp); + + if (dir->cache.locked == &self) + dir->cache.locked = NULL; + + if (! dir->refcount) return zzip_dir_close(dir); else return 0; +} + + +static int +zzip_file_saveoffset(ZZIP_FILE * fp) +{ + if (fp) + { + int fd = fp->dir->fd; + zzip_off_t off = fp->io->fd.seeks(fd, 0, SEEK_CUR); + if (off < 0) + return -1; + + fp->offset = off; + } + return 0; +} + +# ifndef ZZIP_CHECK_BACKSLASH_DIRSEPARATOR /* NOTE: also default */ +# define ZZIP_CHECK_BACKSLASH_DIRSEPARATOR 0 /* to "NO" on win32 ! */ +# endif + +# if !defined strcasecmp && !defined ZZIP_HAVE_STRCASECMP +# define ZZIP_CHECK_BACKSLASH_DIRSEPARATOR 1 +# endif + +#if ! ZZIP_CHECK_BACKSLASH_DIRSEPARATOR+0 +#define dirsep_strrchr(N,C) strrchr(N,C) +#define dirsep_casecmp strcasecmp +#else +#define dirsep_strrchr(N,C) _dirsep_strrchr(N) +#define dirsep_casecmp _dirsep_casecmp +static zzip_char_t* +_dirsep_strrchr (zzip_char_t* name) +{ + char* n = strrchr (name, '/'); + char* m = strrchr (name, '\\'); + if (m && n && m > n) n = m; + return n; +} +static int +_dirsep_casecmp (zzip_char_t* s1, zzip_char_t* s2) +{ + /* ASCII tolower - including mapping of backslash in normal slash */ + static const char mapping[] = "@abcdefghijklmnopqrstuvwxyz[/]^_"; + int c1, c2; + while (*s1 && *s2) + { + c1 = (int)(unsigned char) *s1; + c2 = (int)(unsigned char) *s2; + if ((c1&0xE0) == 0x40) c1 = mapping[c1&0x1f]; + if ((c2&0xE0) == 0x40) c2 = mapping[c2&0x1f]; + if (c1 != c2) + return (c1 - c2); + s1++; s2++; + } + + return (((int)(unsigned char) *s1) - ((int)(unsigned char) *s2)); +} +#endif + +static int zzip_inflate_init(ZZIP_FILE *, struct zzip_dir_hdr *); + +/** + * open an => ZZIP_FILE from an already open => ZZIP_DIR handle. Since + * we have a chance to reuse a cached => buf32k and => ZZIP_FILE memchunk + * this is the best choice to unpack multiple files. + * + * Note: the zlib supports 2..15 bit windowsize, hence we provide a 32k + * memchunk here... just to be safe. + */ +ZZIP_FILE * +zzip_file_open(ZZIP_DIR * dir, zzip_char_t* name, int o_mode) +{ + auto int self; + zzip_error_t err = 0; + struct zzip_file * fp = 0; + struct zzip_dir_hdr * hdr = dir->hdr0; + int (*cmp)(zzip_char_t*, zzip_char_t*); + + cmp = (o_mode & ZZIP_CASELESS)? dirsep_casecmp: strcmp; + + if (! dir || !dir->fd || dir->fd == -1 ) return 0; + + if (o_mode & ZZIP_NOPATHS) + { + register zzip_char_t* n = dirsep_strrchr(name, '/'); + if (n) name = n + 1; + } + + if (hdr) + while (1) + { + register zzip_char_t* hdr_name = hdr->d_name; + if (o_mode & ZZIP_NOPATHS) + { + register zzip_char_t* n = dirsep_strrchr(hdr_name, '/'); + if (n) hdr_name = n + 1; + } + + HINT4("name='%s', compr=%d, size=%d\n", + hdr->d_name, hdr->d_compr, hdr->d_usize); + + if (!cmp(hdr_name, name)) + { + switch (hdr->d_compr) + { + case 0: /* store */ + case 8: /* inflate */ + break; + default: + { err = ZZIP_UNSUPP_COMPR; goto error; } + } + + if (dir->cache.locked == NULL) + dir->cache.locked = &self; + + if (dir->cache.locked == &self && + dir->cache.fp) + { + fp = dir->cache.fp; dir->cache.fp = NULL; + /* memset(zfp, 0, sizeof *fp); cleared in zzip_file_close() */ + }else + { + if (! (fp = (ZZIP_FILE *)calloc(1, sizeof(*fp)))) + { err = ZZIP_OUTOFMEM; goto error; } + } + + fp->dir = dir; + fp->io = dir->io; + dir->refcount++; + + if (dir->cache.locked == &self && + dir->cache.buf32k) + { fp->buf32k = dir->cache.buf32k; dir->cache.buf32k = NULL; } + else + { + if (! (fp->buf32k = (char *)malloc(ZZIP_32K))) + { err = ZZIP_OUTOFMEM; goto error; } + } + + if (dir->cache.locked == &self) + dir->cache.locked = NULL; + /* + * In order to support simultaneous open files in one zip archive + * we'll fix the fd offset when opening new file/changing which + * file to read... + */ + + if (zzip_file_saveoffset(dir->currentfp) < 0) + { err = ZZIP_DIR_SEEK; goto error; } + + fp->offset = hdr->d_off; + dir->currentfp = fp; + + if (dir->io->fd.seeks(dir->fd, hdr->d_off, SEEK_SET) < 0) + { err = ZZIP_DIR_SEEK; goto error; } + + { /* skip local header - should test tons of other info, + * but trust that those are correct */ + zzip_ssize_t dataoff; + struct zzip_file_header * p = (void*) fp->buf32k; + + dataoff = dir->io->fd.read(dir->fd, (void*)p, sizeof(*p)); + if (dataoff < (zzip_ssize_t)sizeof(*p)) + { err = ZZIP_DIR_READ; goto error; } + if (! zzip_file_header_check_magic(p)) /* PK\3\4 */ + { err = ZZIP_CORRUPTED; goto error; } + + dataoff = zzip_file_header_sizeof_tail(p); + + if (dir->io->fd.seeks(dir->fd, dataoff, SEEK_CUR) < 0) + { err = ZZIP_DIR_SEEK; goto error; } + + fp->dataoffset = dir->io->fd.tells(dir->fd); + fp->usize = hdr->d_usize; + fp->csize = hdr->d_csize; + } + + err = zzip_inflate_init (fp, hdr); + if (err) { goto error; } + + return fp; + }else + { + if (hdr->d_reclen == 0) + break; + hdr = (struct zzip_dir_hdr *)((char *)hdr + hdr->d_reclen); + }/*cmp name*/ + }/*forever*/ + dir->errcode = ZZIP_ENOENT; zzip_errno(ZZIP_ENOENT); + return NULL; +error: + if (fp) zzip_file_close(fp); + dir->errcode = err; zzip_errno(err); + return NULL; +} + +/** + * call => inflateInit and setup fp's iterator variables, + * used by lowlevel => _open functions. + */ +static int +zzip_inflate_init(ZZIP_FILE * fp, struct zzip_dir_hdr* hdr) +{ + int err; + fp->method = hdr->d_compr; + fp->restlen = hdr->d_usize; + + if (fp->method) + { + memset(&fp->d_stream, 0, sizeof(fp->d_stream)); + + err = inflateInit2(&fp->d_stream, -MAX_WBITS); + if (err != Z_OK) { goto error; } + + fp->crestlen = hdr->d_csize; + } + return 0; +error: + if (fp) zzip_file_close(fp); + return err; +} + +/** + * This function closes the given ZZIP_FILE handle. + * + * If the ZZIP_FILE wraps a normal stat'fd then it is just that int'fd + * that is being closed and the otherwise empty ZZIP_FILE gets freed. + */ +int +zzip_fclose(ZZIP_FILE * fp) +{ + if (! fp) return 0; + if (! fp->dir) + { int r = fp->io->fd.close(fp->fd); free(fp); return r; } /* stat fd */ + else return zzip_file_close(fp); +} + +/** => zzip_fclose + */ +int +zzip_close(ZZIP_FILE* fp) +{ + return zzip_fclose (fp); +} + +/** + * This functions read data from zip-contained file. + * + * It works like => read(2) and will fill the given buffer with bytes from + * the opened file. It will return the number of bytes read, so if the => EOF + * is encountered you will be prompted with the number of bytes actually read. + * + * This is the routines that needs the => buf32k buffer, and it would have + * need for much more polishing but it does already work quite well. + * + * Note: the 32K buffer is rather big. The original inflate-algorithm + * required just that but the latest zlib would work just fine with + * a smaller buffer. + */ +zzip_ssize_t +zzip_file_read(ZZIP_FILE * fp, char * buf, zzip_size_t len) +{ + ZZIP_DIR * dir; + zzip_size_t l; + zzip_ssize_t rv; + + if (! fp || ! fp->dir) return 0; + + dir = fp->dir; + l = fp->restlen > len ? len : fp->restlen; + if (fp->restlen == 0) + return 0; + + /* + * If this is other handle than previous, save current seek pointer + * and read the file position of `this' handle. + */ + if (dir->currentfp != fp) + { + if (zzip_file_saveoffset(dir->currentfp) < 0 + || fp->io->fd.seeks(dir->fd, fp->offset, SEEK_SET) < 0) + { dir->errcode = ZZIP_DIR_SEEK; return -1; } + else + { dir->currentfp = fp; } + } + + /* if more methods is to be supported, change this to `switch ()' */ + if (fp->method) /* method != 0 == 8, inflate */ + { + fp->d_stream.avail_out = l; + fp->d_stream.next_out = (unsigned char *)buf; + + do { + int err; + zzip_size_t startlen; + + if (fp->crestlen > 0 && fp->d_stream.avail_in == 0) + { + zzip_size_t cl = ( fp->crestlen < ZZIP_32K ? + fp->crestlen : ZZIP_32K ); + /* zzip_size_t cl = fp->crestlen > 128 ? 128 : fp->crestlen; */ + + zzip_ssize_t i = fp->io->fd.read(dir->fd, fp->buf32k, cl); + if (i <= 0) + { + dir->errcode = ZZIP_DIR_READ; /* or ZZIP_DIR_READ_EOF ? */ + return -1; + } + fp->crestlen -= i; + fp->d_stream.avail_in = i; + fp->d_stream.next_in = (unsigned char *)fp->buf32k; + } + + startlen = fp->d_stream.total_out; + err = inflate(&fp->d_stream, Z_NO_FLUSH); + + if (err == Z_STREAM_END) + { fp->restlen = 0; } + else + if (err == Z_OK) + { fp->restlen -= (fp->d_stream.total_out - startlen); } + else + { dir->errcode = err; return -1; } + } while (fp->restlen && fp->d_stream.avail_out); + + return l - fp->d_stream.avail_out; + }else + { /* method == 0 -- unstore */ + rv = fp->io->fd.read(dir->fd, buf, l); + if (rv > 0) + { fp->restlen-= rv; } + else + if (rv < 0) + { dir->errcode = ZZIP_DIR_READ; } + return rv; + } +} + +/** + * This function will read(2) data from a real/zipped file. + * + * the replacement for => read(2) will fill the given buffer with bytes from + * the opened file. It will return the number of bytes read, so if the EOF + * is encountered you will be prompted with the number of bytes actually read. + * + * If the file-handle is wrapping a stat'able file then it will actually just + * perform a normal => read(2)-call, otherwise => zzip_file_read is called + * to decompress the data stream and any error is mapped to => errno(3). + */ +zzip_ssize_t +zzip_read(ZZIP_FILE * fp, char * buf, zzip_size_t len) +{ + if (! fp) return 0; + if (! fp->dir) + { return fp->io->fd.read(fp->fd, buf, len); } /* stat fd */ + else + { register zzip_ssize_t v; + v = zzip_file_read(fp, buf, len); + if (v == -1) { errno = zzip_errno(fp->dir->errcode); } + return v; + } +} + +/** => zzip_read + */ +zzip_size_t +zzip_fread(void *ptr, zzip_size_t size, zzip_size_t nmemb, ZZIP_FILE *file) +{ + if (! size) size=1; + return zzip_read (file, ptr, size*nmemb)/size; +} + + +#define ZZIP_WRONLY O_WRONLY +#define ZZIP_EXCL O_EXCL + +#if defined O_SYNC +#define ZZIP_SYNC O_SYNC +#else +#define ZZIP_SYNC 0 +#endif + +#if defined O_NONBLOCK +#define ZZIP_NONBLOCK O_NONBLOCK +#elif defined O_NDELAY +#define ZZIP_NOCTTY O_NDELAY +#else +#define ZZIP_NOCTTY 0 +#endif + +/* ------------------------------------------------------------------- */ + +/** + * This function will => fopen(3) a real/zipped file. + * + * It has some magic functionality builtin - it will first try to open + * the given <em>filename</em> as a normal file. If it does not + * exist, the given path to the filename (if any) is split into + * its directory-part and the file-part. A ".zip" extension is + * then added to the directory-part to create the name of a + * zip-archive. That zip-archive (if it exists) is being searched + * for the file-part, and if found a zzip-handle is returned. + * + * Note that if the file is found in the normal fs-directory the + * returned structure is mostly empty and the => zzip_read call will + * use the libc => read to obtain data. Otherwise a => zzip_file_open + * is performed and any error mapped to => errno(3). + * + * unlike the posix-wrapper => zzip_open the mode-argument is + * a string which allows for more freedom to support the extra + * zzip modes called ZZIP_CASEINSENSITIVE and ZZIP_IGNOREPATH. + * Currently, this => zzip_fopen call will convert the following + * characters in the mode-string into their corrsponding mode-bits: + * <ul><li><code> "r" : O_RDONLY : </code> read-only + * </li><li><code> "b" : O_BINARY : </code> binary (win32 specific) + * </li><li><code> "f" : O_NOCTTY : </code> no char device (unix) + * </li><li><code> "i" : ZZIP_CASELESS : </code> inside zip file + * </li><li><code> "*" : ZZIP_NOPATHS : </code> inside zip file only + * </ul> all other modes will be ignored for zip-contained entries + * but they are transferred for compatibility and portability, + * including these extra sugar bits: + * <ul><li><code> "x" : O_EXCL :</code> fail if file did exist + * </li><li><code> "s" : O_SYNC :</code> synchronized access + * </li><li><code> "n" : O_NONBLOCK :</code> nonblocking access + * </li><li><code> "z#" : compression level :</code> for zlib + * </li><li><code> "g#" : group access :</code> unix access bits + * </li><li><code> "u#" : owner access :</code> unix access bits + * </li><li><code> "o#" : world access :</code> unix access bits + * </ul>... the access bits are in traditional unix bit format + * with 7 = read/write/execute, 6 = read/write, 4 = read-only. + * + * The default access mode is 0664, and the compression level + * is ignored since the lib can not yet write zip files, otherwise + * it would be the initialisation value for the zlib deflateInit + * where 0 = no-compression, 1 = best-speed, 9 = best-compression. + */ +ZZIP_FILE* +zzip_fopen(zzip_char_t* filename, zzip_char_t* mode) +{ + return zzip_freopen (filename, mode, 0); +} + +/** => zzip_fopen + * + * This function receives an additional argument pointing to + * a ZZIP_FILE* being already in use. If this extra argument is + * null then this function is identical with calling => zzip_fopen + * + * Per default, the old file stream is closed and only the internal + * structures associated with it are kept. These internal structures + * may be reused for the return value, and this is a lot quicker when + * the filename matches a zipped file that is incidently in the very + * same zip arch as the old filename wrapped in the stream struct. + * + * That's simply because the zip arch's central directory does not + * need to be read again. As an extension for this function, if the + * mode-string contains a "q" then the old stream is not closed but + * left untouched, instead it is only given as a hint that a new + * file handle may share/copy the zip arch structures of the old file + * handle if that is possible, i.e when they are in the same zip arch. + */ +ZZIP_FILE* +zzip_freopen(zzip_char_t* filename, zzip_char_t* mode, ZZIP_FILE* stream) +{ + int o_flags = 0; + int o_modes = 0664; + if (!mode) mode = "rb"; + +# ifndef O_BINARY +# define O_BINARY 0 +# endif +# ifndef O_NOCTTY +# define O_NOCTTY 0 +# endif +# ifndef O_SYNC +# define O_SYNC 0 +# endif +# ifndef O_NONBLOCK +# define O_NONBLOCK 0 +# endif + + for(; *mode; mode++) + { + switch (*mode) + { + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + continue; /* ignore if not attached to other info */ + case 'r': o_flags |= mode[1] == '+' ? O_RDWR : O_RDONLY; break; + case 'w': o_flags |= mode[1] == '+' ? O_RDWR : O_WRONLY; + o_flags |= O_TRUNC; break; + case 'b': o_flags |= O_BINARY; break; + case 'f': o_flags |= O_NOCTTY; break; + case 'i': o_modes |= ZZIP_CASELESS; break; + case '*': o_modes |= ZZIP_NOPATHS; break; + case 'x': o_flags |= O_EXCL; break; + case 's': o_flags |= O_SYNC; break; + case 'n': o_flags |= O_NONBLOCK; break; + case 'o': o_modes &=~ 07; + o_modes |= ((mode[1] - '0'))&07; continue; + case 'g': o_modes &=~ 070; + o_modes |= ((mode[1] - '0')<<3)&070; continue; + case 'u': o_modes &=~ 0700; + o_modes |= ((mode[1] - '0')<<6)&0700; continue; + case 'q': o_modes |= ZZIP_FACTORY; break; + case 'z': /* compression level */ + continue; /* currently ignored, just for write mode */ + } + } + + { + ZZIP_FILE* fp = + zzip_open_shared_io (stream, filename, o_flags, o_modes, 0, 0); + + if (! o_modes&ZZIP_FACTORY && stream) + zzip_file_close (stream); + + return fp; + } +} + +/** + * This function will => open(2) a real/zipped file + * + * It has some magic functionality builtin - it will first try to open + * the given <em>filename</em> as a normal file. If it does not + * exist, the given path to the filename (if any) is split into + * its directory-part and the file-part. A ".zip" extension is + * then added to the directory-part to create the name of a + * zip-archive. That zip-archive (if it exists) is being searched + * for the file-part, and if found a zzip-handle is returned. + * + * Note that if the file is found in the normal fs-directory the + * returned structure is mostly empty and the => zzip_read call will + * use the libc => read to obtain data. Otherwise a => zzip_file_open + * is performed and any error mapped to => errno(3). + * + * There was a possibility to transfer zziplib-specific openmodes + * through o_flags but you should please not use them anymore and + * look into => zzip_open_ext_io to submit them down. This function + * is shallow in that it just extracts the zzipflags and calls <ul><li><code> + * zzip_open_ext_io(filename, o_flags, zzipflags|0664, 0, 0) </code></li></ul> + * you must stop using this extra functionality (not well known + * anyway) since zzip_open might be later usable to open files + * for writing in which case the _EXTRAFLAGS will get in conflict. + * + * compare with => open(2) and => zzip_fopen + */ +ZZIP_FILE* +zzip_open(zzip_char_t* filename, int o_flags) +{ + /* backward compatibility */ + int o_modes = 0664; + if (o_flags & ZZIP_CASEINSENSITIVE) + { o_flags ^= ZZIP_CASEINSENSITIVE; o_modes |= ZZIP_CASELESS; } + if (o_flags & ZZIP_IGNOREPATH) + { o_flags ^= ZZIP_IGNOREPATH; o_modes |= ZZIP_NOPATHS; } + return zzip_open_ext_io(filename, o_flags, o_modes, 0, 0); +} + +/* ZZIP_ONLYZIP won't work on platforms with sizeof(int) == 16bit */ +#if ZZIP_SIZEOF_INT+0 == 2 +#undef ZZIP_ONLYZIP +#endif + +/** => zzip_open + * + * This function uses explicit ext and io instead of the internal + * defaults, setting them to zero is equivalent to => zzip_open + * + * note that the two flag types have been split into an o_flags + * (for fcntl-like openflags) and o_modes where the latter shall + * carry the zzip_flags and possibly accessmodes for unix filesystems. + * Since this version of zziplib can not write zipfiles, it is not + * yet used for anything else than zzip-specific modeflags. + */ +ZZIP_FILE* +zzip_open_ext_io(zzip_char_t* filename, int o_flags, int o_modes, + zzip_strings_t* ext, zzip_plugin_io_t io) +{ + return zzip_open_shared_io (0, filename, o_flags, o_modes, ext, io); +} + +/** => zzip_open + * + * This function takes an extra stream argument - if a handle has been + * then ext/io can be left null and the new stream handle will pick up + * the ext/io. This should be used only in specific environment however + * since => zzip_file_real does not store any ext-sequence. + * + * The benefit for this function comes in when the old file handle + * was openened from a file within a zip archive. When the new file + * is in the same zip archive then the internal zzip_dir structures + * will be shared. It is even quicker, as no check needs to be done + * anymore trying to guess the zip archive place in the filesystem, + * here we just check whether the zip archive's filepath is a prefix + * part of the filename to be opened. + * + * Note that this function is also used by => zzip_freopen that + * will unshare the old handle, thereby possibly closing the handle. + */ +ZZIP_FILE* +zzip_open_shared_io (ZZIP_FILE* stream, + zzip_char_t* filename, int o_flags, int o_modes, + zzip_strings_t* ext, zzip_plugin_io_t io) +{ + if (stream && stream->dir) + { + if (! ext) ext = stream->dir->fileext; + if (! io) io = stream->dir->io; + } + if (! io) io = zzip_get_default_io (); + + if (o_modes & (ZZIP_PREFERZIP|ZZIP_ONLYZIP)) goto try_zzip; + try_real: + /* prefer an existing real file */ + { + zzip_plugin_io_t os = (o_modes & ZZIP_ALLOWREAL) + ? zzip_get_default_io () : io; + int fd = os->fd.open(filename, o_flags); /* io->fd.open */ + if (fd != -1) + { + ZZIP_FILE* fp = calloc (1, sizeof(ZZIP_FILE)); + if (!fp) { os->fd.close(fd); return 0; } /* io->fd.close */ + + fp->fd = fd; + fp->io = os; + return fp; + } + if (o_modes & ZZIP_PREFERZIP) return 0; + } + try_zzip: + + /* if the user had it in place of a normal xopen, then + * we better defend this lib against illegal usage */ + if (o_flags & (O_CREAT|O_WRONLY)) { errno = EINVAL; return 0; } + if (o_flags & (O_RDWR)) { o_flags ^= O_RDWR; o_flags |= O_RDONLY; } + + /* this is just for backward compatibility -and strictly needed to + * prepare ourselves for more options and more options later on... */ + /*# if (o_modes & ZZIP_CASELESS) { o_flags |= ZZIP_CASEINSENSITIVE; } */ + /*# if (o_modes & ZZIP_NOPATHS) { o_flags |= ZZIP_IGNOREPATH; } */ + + /* see if we can open a file that is a zip file */ + { char basename[PATH_MAX]; + char* p; + strcpy (basename, filename); + + /* see if we can share the same zip directory */ + if (stream && stream->dir && stream->dir->realname) + { + zzip_size_t len = strlen (stream->dir->realname); + if (! memcmp (filename, stream->dir->realname, len) && + filename[len] == '/' && filename[len+1]) + { + ZZIP_FILE* fp = + zzip_file_open (stream->dir, filename+len+1, o_modes); + if (! fp) { errno = zzip_errno (stream->dir->errcode); } + return fp; + } + } + + /* per each slash in filename, check if it there is a zzip around */ + while ((p = strrchr (basename, '/'))) + { + zzip_error_t e = 0; + ZZIP_DIR* dir; + ZZIP_FILE* fp; + int fd; + + *p = '\0'; /* cut at path separator == possible zipfile basename */ + fd = __zzip_try_open (basename, o_flags|O_RDONLY|O_BINARY, ext, io); + if (fd == -1) { continue; } +/* found: */ + /* found zip-file, now try to parse it */ + dir = zzip_dir_fdopen_ext_io(fd, &e, ext, io); + if (e) { errno = zzip_errno(e); io->fd.close(fd); return 0; } + + /* (p - basename) is the lenghtof zzip_dir part of the filename */ + fp = zzip_file_open(dir, filename + (p - basename) +1, o_modes); + if (! fp) { errno = zzip_errno(dir->errcode); } + else { if (! dir->realname) dir->realname = strdup (basename); } + + zzip_dir_close(dir); + /* note: since (fp) is attached that (dir) will survive */ + /* but (dir) is implicitly closed on next zzip_close(fp) */ + + return fp; + } /*again*/ + + if (o_modes & ZZIP_PREFERZIP) goto try_real; + errno = ENOENT; return 0; + } +} + +#if defined ZZIP_LARGEFILE_RENAME && defined EOVERFLOW && defined PIC +#undef zzip_open_shared_io /* zzip_open_shared_io64 */ +#undef zzip_open_ext_io /* zzip_open_ext_io64 */ +#undef zzip_opendir_ext_io /* zzip_opendir_ext_io64 */ + +_zzip_export +ZZIP_FILE * zzip_open_shared_io(ZZIP_FILE* stream, + zzip_char_t* name, int o_flags, int o_modes, + zzip_strings_t* ext, zzip_plugin_io_t io); +_zzip_export +ZZIP_FILE * zzip_open_ext_io(zzip_char_t* name, int o_flags, int o_modes, + zzip_strings_t* ext, zzip_plugin_io_t io); +_zzip_export +ZZIP_DIR * zzip_opendir_ext_io(zzip_char_t* name, int o_modes, + zzip_strings_t* ext, zzip_plugin_io_t io); + +/* DLL compatibility layer - so that 32bit code can link with this lib too */ + +_zzip_export +ZZIP_FILE * zzip_open_shared_io(ZZIP_FILE* stream, + zzip_char_t* name, int o_flags, int o_modes, + zzip_strings_t* ext, zzip_plugin_io_t io) +{ + if (! io) return zzip_open_shared_io64 (stream, name, o_flags, o_modes, + ext, io); + errno = EOVERFLOW; return NULL; +} + +_zzip_export +ZZIP_FILE * zzip_open_ext_io(zzip_char_t* name, int o_flags, int o_modes, + zzip_strings_t* ext, zzip_plugin_io_t io) +{ + if (! io) return zzip_open_ext_io64 (name, o_flags, o_modes, ext, io); + errno = EOVERFLOW; return NULL; +} + +_zzip_export +ZZIP_DIR * zzip_opendir_ext_io(zzip_char_t* name, int o_modes, + zzip_strings_t* ext, zzip_plugin_io_t io) +{ + if (! io) return zzip_opendir_ext_io64 (name, o_modes, ext, io); + errno = EOVERFLOW; return NULL; +} + +#endif /* ZZIP_LARGEFILE_RENAME && EOVERFLOW && PIC */ + +/* ------------------------------------------------------------------- */ + +/** + * This function will rewind a real/zipped file. + * + * It seeks to the beginning of this file's data in the zip, + * or the beginning of the file for a stat'fd. + */ +int +zzip_rewind(ZZIP_FILE *fp) +{ + ZZIP_DIR *dir; + int err; + + if (! fp) + return -1; + + if (! fp->dir) + { /* stat fd */ + fp->io->fd.seeks(fp->fd,0,SEEK_SET); + return 0; + } + + dir = fp->dir; + /* + * If this is other handle than previous, save current seek pointer + */ + if (dir->currentfp != fp) + { + if (zzip_file_saveoffset(dir->currentfp) < 0) + { dir->errcode = ZZIP_DIR_SEEK; return -1; } + else + { dir->currentfp = fp; } + } + + /* seek to beginning of this file */ + if (fp->io->fd.seeks(dir->fd, fp->dataoffset, SEEK_SET) < 0) + return -1; + + /* reset the inflate init stuff */ + fp->restlen = fp->usize; + fp->offset = fp->dataoffset; + + if (fp->method) + { /* method == 8, deflate */ + err = inflateReset(&fp->d_stream); + if (err != Z_OK) { goto error; } + + /* start over at next inflate with a fresh read() */ + fp->d_stream.avail_in = 0; + fp->crestlen = fp->csize; + } + + return 0; + + error: + if (fp) zzip_file_close(fp); + return err; +} + +/** + * This function will perform a => lseek(2) operation on a real/zipped file + * + * It will try to seek to the offset specified by offset, relative to whence, + * which is one of SEEK_SET, SEEK_CUR or SEEK_END. + * + * If the file-handle is wrapping a stat'able file then it will actually just + * perform a normal => lseek(2)-call. Otherwise the relative offset + * is calculated, negative offsets are transformed into positive ones + * by rewinding the file, and then data is read until the offset is + * reached. This can make the function terribly slow, but this is + * how gzio implements it, so I'm not sure there is a better way + * without using the internals of the algorithm. + */ +zzip_off_t +zzip_seek(ZZIP_FILE * fp, zzip_off_t offset, int whence) +{ + zzip_off_t cur_pos, rel_ofs, read_size, ofs; + ZZIP_DIR *dir; + + if (! fp) + return -1; + + if (! fp->dir) + { /* stat fd */ + return fp->io->fd.seeks(fp->fd, offset, whence); + } + + cur_pos = zzip_tell(fp); + + /* calculate relative offset */ + switch (whence) + { + case SEEK_SET: /* from beginning */ + rel_ofs = offset - cur_pos; + break; + case SEEK_CUR: /* from current */ + rel_ofs = offset; + break; + case SEEK_END: /* from end */ + rel_ofs = fp->usize + offset - cur_pos; + break; + default: /* something wrong */ + return -1; + } + + if (rel_ofs == 0) + return cur_pos; /* don't have to move */ + + if (rel_ofs < 0) + { /* convert backward into forward */ + if (zzip_rewind(fp) == -1) + return -1; + + read_size = cur_pos + rel_ofs; + cur_pos = 0; + }else + { /* amount to read is positive relative offset */ + read_size = rel_ofs; + } + + if (read_size < 0) /* bad offset, before beginning of file */ + return -1; + + if (read_size + cur_pos > (zzip_off_t)fp->usize) /* bad offset, past EOF */ + return -1; + + if (read_size == 0) /* nothing to read */ + return cur_pos; + + dir = fp->dir; + /* + * If this is other handle than previous, save current seek pointer + * and read the file position of `this' handle. + */ + if (dir->currentfp != fp) + { + if (zzip_file_saveoffset(dir->currentfp) < 0 + || dir->currentfp->io->fd.seeks(dir->fd, fp->offset, SEEK_SET) < 0) + { dir->errcode = ZZIP_DIR_SEEK; return -1; } + else + { dir->currentfp = fp; } + } + + if (fp->method == 0) + { /* unstore, just lseek relatively */ + ofs = fp->io->fd.tells(dir->fd); + ofs = fp->io->fd.seeks(dir->fd,read_size,SEEK_CUR); + if (ofs > 0) + { /* readjust from beginning of file */ + ofs -= fp->dataoffset; + fp->restlen = fp->usize - ofs; + } + return ofs; + }else + { /* method == 8, inflate */ + char *buf; + /*FIXME: use a static buffer! */ + buf = (char *)malloc(ZZIP_32K); + if (! buf) return -1; + + while (read_size > 0) + { + zzip_off_t size = ZZIP_32K; + if (read_size < size/*32K*/) size = read_size; + + size = zzip_file_read(fp, buf, (zzip_size_t)size); + if (size <= 0) { free(buf); return -1; } + + read_size -= size; + } + + free (buf); + } + + return zzip_tell(fp); +} + +/** + * This function will => tell(2) the current position in a real/zipped file + * + * It will return the current offset within the real/zipped file, + * measured in uncompressed bytes for the zipped-file case. + * + * If the file-handle is wrapping a stat'able file then it will actually just + * perform a normal => tell(2)-call, otherwise the offset is + * calculated from the amount of data left and the total uncompressed + * size; + */ +zzip_off_t +zzip_tell(ZZIP_FILE * fp) +{ + if (! fp) + return -1; + + if (! fp->dir) /* stat fd */ + return fp->io->fd.tells(fp->fd); + + /* current uncompressed offset is uncompressed size - data left */ + return (fp->usize - fp->restlen); +} + +/* + * Local variables: + * c-file-style: "stroustrup" + * End: + */ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/file.h b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/file.h new file mode 100644 index 00000000000..fcff276bb23 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/file.h @@ -0,0 +1,81 @@ +/* + * this is an internal header file - the structure contains two off_t + * atleast making it LARGEFILE_SENSITIVE on linux2 and solaris systems + * whereas about all functions just return a ZZIP_FILE* in zzip/zzip.h + * + * and so, this structure should be handled version-specific and + * subject to change - it had been kept binary-compatible for quite + * a while now so perhaps some program sources have errnously taken + * advantage of this file. + * + * Author: + * Guido Draheim <guidod@gmx.de> + * Tomi Ollila <Tomi.Ollila@tfi.net> + * + * Copyright (c) 1999,2000,2001,2002 Guido Draheim + * All rights reserved, + * use under the restrictions of the + * Lesser GNU General Public License + * or alternatively the restrictions + * of the Mozilla Public License 1.1 + */ + +#ifndef _ZZIP_FILE_H /* zzip-file.h */ +#define _ZZIP_FILE_H 1 + +#ifndef ZZIP_32K +#ifdef __GNUC__ +/* include zzip/lib.h beforehand in order to suppress the following warning */ +#warning zzip/file.h is an internal header, do not use it freely +#endif +#endif + +#include <zzip/lib.h> +#include <zlib.h> + +#ifdef ZZIP_HAVE_UNISTD_H +#include <unistd.h> +#else +#include <stdio.h> +# ifdef ZZIP_HAVE_SYS_TYPES_H +# include <sys/types.h> +# endif +#endif + +#ifdef ZZIP_HAVE_SYS_PARAM_H +#include <sys/param.h> /* PATH_MAX */ +#endif + +#ifndef PATH_MAX +# ifdef MAX_PATH /* windows */ +# define PATH_MAX MAX_PATH +# else +# define PATH_MAX 512 +# endif +#endif +/* + * ZZIP_FILE structure... currently no need to unionize, since structure needed + * for inflate is superset of structure needed for unstore. + * + * Don't make this public. Instead, create methods for needed operations. + */ + +struct zzip_file +{ + struct zzip_dir* dir; + int fd; + int method; + zzip_size_t restlen; + zzip_size_t crestlen; + zzip_size_t usize; + zzip_size_t csize; + /* added dataoffset member - data offset from start of zipfile*/ + zzip_off_t dataoffset; + char* buf32k; + zzip_off_t offset; /* offset from the start of zipfile... */ + z_stream d_stream; + zzip_plugin_io_t io; +}; + +#endif /* _ZZIP_FILE_H */ + diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/format.h b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/format.h new file mode 100644 index 00000000000..fba4000aa76 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/format.h @@ -0,0 +1,233 @@ +/* + * Author: + * Guido Draheim <guidod@gmx.de> + * + * Copyright (c) 2000,2001,2002,2003 Guido Draheim + * All rights reserved + * use under the restrictions of the + * Lesser GNU General Public License + * or alternatively the restrictions + * of the Mozilla Public License 1.1 + * + * The information was taken from appnote-981119-iz.zip + * at http://www.freesoftware.com/pub/infozip/doc/ + * which in turn is based on PKWARE's appnote.txt + * (newer link: ftp://ftp.info-zip.org/pub/infozip/doc/) + */ +#ifndef _ZZIP_FORMAT_H /* zzipformat.h */ +#define _ZZIP_FORMAT_H + +#include <zzip/types.h> +/* we have ICO C 9X types defined */ + +/* + * Overall zipfile format + * [local file header + file data stream + checksum descriptor] ... + * ... [disk central directory] [disk trailer record] + */ + +# ifdef _MSC_VER +# pragma pack(push, 1) +# endif + +struct zzip_version +{ + zzip_byte_t version[1]; + zzip_byte_t ostype[1]; +} __zzip_attribute__((packed)); + +struct zzip_dostime +{ + zzip_byte_t time[2]; + zzip_byte_t date[2]; +} __zzip_attribute__((packed)); + +#ifdef ZZIP_NEED_PACKED +/* if your compiler does interesting things about struct packing... */ +typedef zzip_byte_t zzip_version_t[2]; +typedef zzip_byte_t zzip_dostime_t[4]; +#else +typedef struct zzip_version zzip_version_t; +typedef struct zzip_dostime zzip_dostime_t; +#endif + +#define ZZIP_CHECKMAGIC(__p,__A,__B,__C,__D) \ + ( (((zzip_byte_t*)(__p))[0]==(__A)) && \ + (((zzip_byte_t*)(__p))[1]==(__B)) && \ + (((zzip_byte_t*)(__p))[2]==(__C)) && \ + (((zzip_byte_t*)(__p))[3]==(__D)) ) + +/* A. Local file header */ +struct zzip_file_header +{ +# define ZZIP_FILE_HEADER_MAGIC 0x04034b50 +# define ZZIP_FILE_HEADER_CHECKMAGIC(__p) ZZIP_CHECKMAGIC(__p,'P','K','\3','\4') + zzip_byte_t z_magic[4]; /* local file header signature (0x04034b50) */ + zzip_version_t z_extract; /* version needed to extract */ + zzip_byte_t z_flags[2]; /* general purpose bit flag */ + zzip_byte_t z_compr[2]; /* compression method */ + zzip_dostime_t z_dostime; /* last mod file time (dos format) */ + zzip_byte_t z_crc32[4]; /* crc-32 */ + zzip_byte_t z_csize[4]; /* compressed size */ + zzip_byte_t z_usize[4]; /* uncompressed size */ + zzip_byte_t z_namlen[2]; /* filename length (null if stdin) */ + zzip_byte_t z_extras[2]; /* extra field length */ + /* followed by filename (of variable size) */ + /* followed by extra field (of variable size) */ +} __zzip_attribute__((packed)); +#define zzip_file_header_headerlength (4+2+2+2+4+4+4+4+2+2) + +/* B. data descriptor + * the data descriptor exists only if bit 3 of z_flags is set. It is byte aligned + * and immediately follows the last byte of compressed data. It is only used if + * the output media of the compressor was not seekable, eg. standard output. + */ +struct zzip_file_trailer +{ +# define ZZIP_FILE_TRAILER_MAGIC 0x08074B50 +# define ZZIP_FILE_TRAILER_CHECKMAGIC(__p) ZZIP_CHECKMAGIC(__p,'P','K','\7','\8') + zzip_byte_t z_magic[4]; /* data descriptor signature (0x08074b50) */ + zzip_byte_t z_crc32[4]; /* crc-32 */ + zzip_byte_t z_csize[4]; /* compressed size */ + zzip_byte_t z_usize[4]; /* uncompressed size */ +} __zzip_attribute__((packed)); +#define zzip_file_trailer_headerlength (4+4+4+4) + +/* C. central directory structure: + [file header] . . . end of central dir record +*/ + +/* directory file header + * - a single entry including filename, extras and comment may not exceed 64k. + */ + +struct zzip_disk_entry +{ +# define ZZIP_DISK_ENTRY_MAGIC 0x02014b50 +# define ZZIP_DISK_ENTRY_CHECKMAGIC(__p) ZZIP_CHECKMAGIC(__p,'P','K','\1','\2') + zzip_byte_t z_magic[4]; /* central file header signature (0x02014b50) */ + zzip_version_t z_encoder; /* version made by */ + zzip_version_t z_extract; /* version need to extract */ + zzip_byte_t z_flags[2]; /* general purpose bit flag */ + zzip_byte_t z_compr[2]; /* compression method */ + zzip_dostime_t z_dostime; /* last mod file time&date (dos format) */ + zzip_byte_t z_crc32[4]; /* crc-32 */ + zzip_byte_t z_csize[4]; /* compressed size */ + zzip_byte_t z_usize[4]; /* uncompressed size */ + zzip_byte_t z_namlen[2]; /* filename length (null if stdin) */ + zzip_byte_t z_extras[2]; /* extra field length */ + zzip_byte_t z_comment[2]; /* file comment length */ + zzip_byte_t z_diskstart[2]; /* disk number of start (if spanning zip over multiple disks) */ + zzip_byte_t z_filetype[2]; /* internal file attributes, bit0 = ascii */ + zzip_byte_t z_filemode[4]; /* extrnal file attributes, eg. msdos attrib byte */ + zzip_byte_t z_offset[4]; /* relative offset of local file header, seekval if singledisk */ + /* followed by filename (of variable size) */ + /* followed by extra field (of variable size) */ + /* followed by file comment (of variable size) */ +} __zzip_attribute__((packed)); +#define zzip_disk_entry_headerlength (4+2+2+2+2+4+4+4+4+2+2+2+2+2+4+4) + + +struct zzip_root_dirent +{ /* the old name of the structure above */ +# define ZZIP_ROOT_DIRENT_MAGIC 0x02014b50 +# define ZZIP_ROOT_DIRENT_CHECKMAGIC(__p) ZZIP_DISK_ENTRY_CHECKMAGIC(__p) + zzip_byte_t z_magic[4]; + zzip_version_t z_encoder; + zzip_version_t z_extract; + zzip_byte_t z_flags[2]; + zzip_byte_t z_compr[2]; + zzip_dostime_t z_dostime; + zzip_byte_t z_crc32[4]; + zzip_byte_t z_csize[4]; + zzip_byte_t z_usize[4]; + zzip_byte_t z_namlen[2]; + zzip_byte_t z_extras[2]; + zzip_byte_t z_comment[2]; + zzip_byte_t z_diskstart[2]; + zzip_byte_t z_filetype[2]; + zzip_byte_t z_filemode[4]; + zzip_byte_t z_off[4]; +} __zzip_attribute__((packed)); + + +/* end of central dir record */ +struct zzip_disk_trailer +{ +# define ZZIP_DISK_TRAILER_MAGIC 0x06054b50 +# define ZZIP_DISK_TRAILER_CHECKMAGIC(__p) ZZIP_CHECKMAGIC(__p,'P','K','\5','\6') + zzip_byte_t z_magic[4]; /* end of central dir signature (0x06054b50) */ + zzip_byte_t z_disk[2]; /* number of this disk */ + zzip_byte_t z_finaldisk[2]; /* number of the disk with the start of the central dir */ + zzip_byte_t z_entries[2]; /* total number of entries in the central dir on this disk */ + zzip_byte_t z_finalentries[2]; /* total number of entries in the central dir */ + zzip_byte_t z_rootsize[4]; /* size of the central directory */ + zzip_byte_t z_rootseek[4]; /* offset of start of central directory with respect to * + * the starting disk number */ + zzip_byte_t z_comment[2]; /* zipfile comment length */ + /* followed by zipfile comment (of variable size) */ +} __zzip_attribute__((packed)); +#define zzip_disk_trailer_headerlength (4+2+2+2+2+4+4+2) + +/* extra field should be type + size + data + type + size + data ... */ +struct zzip_extra_block +{ /* fetch.h macros do not need this struct */ + zzip_byte_t z_datatype[2]; /* as input type - a mere <char*> is okay */ + zzip_byte_t z_datasize[2]; /* being returned by xx_to_extras usually */ +} __zzip_attribute__((packed)); +#define zzip_extra_block_headerlength (2+2) + +/* Zip64 end of central dir record */ +struct zzip_disk64_trailer +{ +# define ZZIP_DISK64_TRAILER_MAGIC 0x06064b50 +# define ZZIP_DISK64_TRAILER_CHECKMAGIC(__p) ZZIP_CHECKMAGIC(__p,'P','K','\6','\6') + zzip_byte_t z_magic[4]; /* end of central dir signature (0x06054b50) */ + zzip_byte_t z_size[8]; /* size of this central directory record */ + zzip_version_t z_encoder; /* version made by */ + zzip_version_t z_extract; /* version need to extract */ + zzip_byte_t z_disk[4]; /* number of this disk */ + zzip_byte_t z_finaldisk[4]; /* number of the disk with the start of the central dir */ + zzip_byte_t z_entries[8]; /* total number of entries in the central dir on this disk */ + zzip_byte_t z_finalentries[8]; /* total number of entries in the central dir */ + zzip_byte_t z_rootsize[8]; /* size of the central directory */ + zzip_byte_t z_rootseek[8]; /* offset of start of central directory with respect to * + * the starting disk number */ + /* followed by zip64 extensible data sector (of variable size) */ +} __zzip_attribute__((packed)); +#define zzip_disk64_trailer_headerlength (4+8+2+2+4+4+8+8+8+8) + +/* z_flags */ +#define ZZIP_IS_ENCRYPTED(p) ((*(zzip_byte_t*)p)&1) +#define ZZIP_IS_COMPRLEVEL(p) (((*(zzip_byte_t*)p)>>1)&3) +#define ZZIP_IS_STREAMED(p) (((*(zzip_byte_t*)p)>>3)&1) +#define ZZIP_IS_PATCHED(p) (((*(zzip_byte_t*)p)>>5)&1) + +/* z_compr */ +#define ZZIP_IS_STORED 0 +#define ZZIP_IS_SHRUNK 1 +#define ZZIP_IS_REDUCEDx1 2 +#define ZZIP_IS_REDUCEDx2 3 +#define ZZIP_IS_REDUCEDx3 4 +#define ZZIP_IS_REDUCEDx4 5 +#define ZZIP_IS_IMPLODED 6 +#define ZZIP_IS_TOKENIZED 7 +#define ZZIP_IS_DEFLATED 8 +#define ZZIP_IS_DEFLATED_BETTER 9 +#define ZZIP_IS_IMPLODED_BETTER 10 + +/* deflated comprlevel */ +#define ZZIP_DEFLATED_STD_COMPR 0 +#define ZZIP_DEFLATED_MAX_COMPR 1 +#define ZZIP_DEFLATED_LOW_COMPR 2 +#define ZZIP_DEFLATED_MIN_COMPR 3 + +# ifdef _MSC_VER +# pragma pack(pop) +# endif + +#endif /* _ZZIPFORMAT_H */ + + + + diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/fseeko.c b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/fseeko.c new file mode 100644 index 00000000000..2207f5dc981 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/fseeko.c @@ -0,0 +1,580 @@ +/* + * NOTE: this is part of libzzipfseeko (i.e. it is not libzzip). + * + * These routines are fully independent from the traditional zzip + * implementation. They assume a readonly seekable stdio handle + * representing a complete zip file. The functions show how to + * parse the structure, find files and return a decoded bytestream. + * + * These routines are a bit simple and really here for documenting + * the way to access a zip file. The complexity of zip access comes + * from staggered reading of bytes and reposition of a filepointer in + * a big archive with lots of files and long compressed datastreams. + * Plus varaints of drop-in stdio replacements, obfuscation routines, + * auto fileextensions, drop-in dirent replacements, and so on... + * + * btw, we can _not_ use fgetpos/fsetpos since an fpos_t has no asserted + * relation to a linear seek value as specified in zip info headers. In + * general it is not a problem if your system has no fseeko/ftello pair + * since we can fallback to fseek/ftell which limits the zip disk size + * to 2MiBs but the zip-storable seek values are 32bit limited anyway. + * + * Author: + * Guido Draheim <guidod@gmx.de> + * + * Copyright (c) 2003,2004 Guido Draheim + * All rights reserved, + * use under the restrictions of the + * Lesser GNU General Public License + * or alternatively the restrictions + * of the Mozilla Public License 1.1 + */ + +#define _LARGEFILE_SOURCE 1 +#define _ZZIP_ENTRY_STRUCT 1 + +#include <zzip/types.h> + +#include <assert.h> +#include <stdlib.h> +#include <sys/stat.h> + +#if defined ZZIP_HAVE_STRING_H +#include <string.h> +#elif defined ZZIP_HAVE_STRINGS_H +#include <strings.h> +#endif + +#include <zlib.h> +#include <zzip/format.h> +#include <zzip/fseeko.h> +#include <zzip/fetch.h> +#include <zzip/__mmap.h> +#include <zzip/__fnmatch.h> + +#if __STDC_VERSION__+0 > 199900L +#define ___ +#define ____ +#else +#define ___ { +#define ____ } +#endif + +#ifndef ZZIP_HAVE_FSEEKO +#define fseeko fseek +#define ftello ftello +#endif + +/* note that the struct zzip_entry inherits the zzip_disk_entry values + * and usually carries a copy of its values (in disk format!). To make the + * following code more readable, we use a shorthand notation for the + * upcast needed in C (not needed in C++) as "disk_(entry)". + */ +#ifdef __zzip_entry_extends_zzip_disk_entry +#define disk_(_entry_) _entry_ +#else +#define disk_(_entry_) (& (_entry_)->head) +#endif + +/* we try to round all seeks to the pagesize - since we do not use + * the sys/mmap interface we have to guess a good value here: */ +#define PAGESIZE 8192 + +/* ====================================================================== */ +/* helper functions */ + +/** => zzip_entry_data_offset + * This functions read the correspoding struct zzip_file_header from + * the zip disk of the given "entry". The returned off_t points to the + * end of the file_header where the current fseek pointer has stopped. + * This is used to immediatly parse out any filename/extras block following + * the file_header. The return value is null on error. + */ +static zzip_off_t +zzip_entry_fread_file_header (ZZIP_ENTRY* entry, + struct zzip_file_header* file_header) +{ + if (! entry || ! file_header) return 0; + ___ zzip_off_t offset = zzip_disk_entry_fileoffset (disk_(entry)); + if (0 > offset || offset >= entry->disksize) return 0; + + fseeko (entry->diskfile, offset, SEEK_SET); + return (fread (file_header, sizeof(*file_header), 1, entry->diskfile) + ? offset+sizeof(*file_header) : 0 ); ____; +} + +/** helper functions for (fseeko) zip access api + * + * This functions returns the seekval offset of the data portion of the + * file referenced by the given zzip_entry. It requires an intermediate + * check of the file_header structure (i.e. it reads it from disk). After + * this call, the contained diskfile readposition is already set to the + * data_offset returned here. On error -1 is returned. + */ +zzip_off_t +zzip_entry_data_offset(ZZIP_ENTRY* entry) +{ + struct zzip_file_header file_header; + if (! entry) return -1; + ___ zzip_off_t offset = + zzip_entry_fread_file_header (entry, & file_header); + if (! offset) return -1; + offset += zzip_file_header_sizeof_tails (& file_header); + fseeko (entry->diskfile, offset, SEEK_SET); + return offset; ____; +} + +/** => zzip_entry_data_offset + * This function is a big helper despite its little name: in a zip file the + * encoded filenames are usually NOT zero-terminated but for common usage + * with libc we need it that way. Secondly, the filename SHOULD be present + * in the zip central directory but if not then we fallback to the filename + * given in the file_header of each compressed data portion. + */ +zzip__new__ char* +zzip_entry_strdup_name(ZZIP_ENTRY* entry) +{ + if (! entry) return 0; + + ___ zzip_size_t len; + if ((len = zzip_disk_entry_namlen (disk_(entry)))) { + char* name = malloc (len+1); + if (! name) return 0; + memcpy (name, entry->tail, len); + name[len] = '\0'; + return name; + } + ___ auto struct zzip_file_header header; + if (zzip_entry_fread_file_header (entry, &header) + && ( len = zzip_file_header_namlen(&header) )) { + char* name = malloc (len+1); + if (! name) return 0; + fread (name, 1, len, entry->diskfile); + name[len] = '\0'; + return name; + } + return 0; + ____;____; +} + +static int +prescan_entry(ZZIP_ENTRY* entry) +{ + assert (entry); + ___ zzip_off_t tailsize = zzip_disk_entry_sizeof_tails (disk_(entry)); + if (tailsize+1 > entry->tailalloc) { + char* newtail = realloc (entry->tail, tailsize+1); + if (! newtail) return ENOMEM; + entry->tail = newtail; + entry->tailalloc = tailsize+1; + } + fread (entry->tail, 1, tailsize, entry->diskfile); + /* name + comment + extras */ + return 0; ____; +} + +static void +prescan_clear(ZZIP_ENTRY* entry) +{ + assert (entry); + if (entry->tail) free (entry->tail); + entry->tail = 0; entry->tailalloc = 0; +} + +/* ====================================================================== */ + +/** => zzip_entry_findfile + * + * This function is the first call of all the zip access functions here. + * It contains the code to find the first entry of the zip central directory. + * Here we require the stdio handle to represent a real zip file where the + * disk_trailer is _last_ in the file area, so that its position would be at + * a fixed offset from the end of the file area if not for the comment field + * allowed to be of variable length (which needs us to do a little search + * for the disk_tailer). However, in this simple implementation we disregard + * any disk_trailer info telling about multidisk archives, so we just return + * a pointer to the first entry in the zip central directory of that file. + * + * For an actual means, we are going to search backwards from the end + * of the mmaped block looking for the PK-magic signature of a + * disk_trailer. If we see one then we check the rootseek value to + * find the first disk_entry of the root central directory. If we find + * the correct PK-magic signature of a disk_entry over there then we + * assume we are done and we are going to return a pointer to that label. + * + * The return value is a pointer to the first zzip_disk_entry being checked + * to be within the bounds of the file area specified by the arguments. If + * no disk_trailer was found then null is returned, and likewise we only + * accept a disk_trailer with a seekvalue that points to a disk_entry and + * both parts have valid PK-magic parts. Beyond some sanity check we try to + * catch a common brokeness with zip archives that still allows us to find + * the start of the zip central directory. + */ +zzip__new__ ZZIP_ENTRY* +zzip_entry_findfirst(FILE* disk) +{ + if (! disk) return 0; + fseeko (disk, 0, SEEK_END); + ___ zzip_off_t disksize = ftello (disk); + if (disksize < (zzip_off_t) sizeof(struct zzip_disk_trailer)) return 0; + /* we read out chunks of 8 KiB in the hope to match disk granularity */ + ___ zzip_off_t pagesize = PAGESIZE; /* getpagesize() */ + ___ ZZIP_ENTRY* entry = malloc (sizeof(*entry)); if (! entry) return 0; + ___ unsigned char* buffer = malloc (pagesize); if (! buffer) goto nomem; + + assert (pagesize/2 > (zzip_off_t) sizeof (struct zzip_disk_trailer)); + /* at each step, we will fread a pagesize block which overlaps with the + * previous read by means of pagesize/2 step at the end of the while(1) */ + ___ zzip_off_t mapoffs = disksize &~ (pagesize-1); + ___ zzip_off_t mapsize = disksize - mapoffs; + if (mapoffs && mapsize < pagesize/2) { + mapoffs -= pagesize/2; mapsize += pagesize/2; } + while(1) { + fseeko (disk, mapoffs, SEEK_SET); + fread (buffer, 1, mapsize, disk); + ___ unsigned char* p = + buffer + mapsize - sizeof(struct zzip_disk_trailer); + for (; p >= buffer ; p--) + { + zzip_off_t root; /* (struct zzip_disk_entry*) */ + if (zzip_disk_trailer_check_magic(p)) { + root = zzip_disk_trailer_rootseek ( + (struct zzip_disk_trailer*)p); + if (root > disksize - (long)sizeof(struct zzip_disk_trailer)) { + /* first disk_entry is after the disk_trailer? can't be! */ + zzip_off_t rootsize = zzip_disk_trailer_rootsize ( + (struct zzip_disk_trailer*)p); + if (rootsize > mapoffs) continue; + /* a common brokeness that can be fixed: we just assume the + * central directory was written directly before : */ + root = mapoffs - rootsize; + } + } else if (zzip_disk64_trailer_check_magic(p)) { + if (sizeof(zzip_off_t) < 8) return 0; + root = zzip_disk64_trailer_rootseek ( + (struct zzip_disk64_trailer*)p); + } else continue; + + assert (0 <= root && root < mapsize); + fseeko (disk, root, SEEK_SET); + fread (disk_(entry), 1, sizeof(*disk_(entry)), disk); + if (zzip_disk_entry_check_magic(entry)) { + free (buffer); + entry->headseek = root; + entry->diskfile = disk; + entry->disksize = disksize; + if (prescan_entry(entry)) goto nomem; + return entry; + } + } ____; + if (! mapoffs) break; assert (mapsize >= pagesize/2); + mapoffs -= pagesize/2; /* mapsize += pagesize/2; */ + mapsize = pagesize; /* if (mapsize > pagesize) ... */ + if (disksize - mapoffs > 64*1024) break; + } + free (buffer); + nomem: + free (entry); ____;____;____;____;____;____; + return 0; +} + +/** => zzip_entry_findfile + * + * This function takes an existing "entry" in the central root directory + * (e.g. from zzip_entry_findfirst) and moves it to point to the next entry. + * On error it returns 0, otherwise the old entry. If no further match is + * found then null is returned and the entry already free()d. If you want + * to stop searching for matches before that case then please call + * => zzip_entry_free on the cursor struct ZZIP_ENTRY. + */ +zzip__new__ ZZIP_ENTRY* +zzip_entry_findnext(ZZIP_ENTRY* _zzip_restrict entry) +{ + if (! entry) return entry; + if (! zzip_disk_entry_check_magic (entry)) goto err; + ___ zzip_off_t seek = + entry->headseek + zzip_disk_entry_sizeto_end (disk_(entry)); + if (seek + (zzip_off_t) sizeof(*disk_(entry)) > entry->disksize) goto err; + + fseeko (entry->diskfile, seek, SEEK_SET); + fread (disk_(entry), 1, sizeof(*disk_(entry)), entry->diskfile); + entry->headseek = seek; + if (! zzip_disk_entry_check_magic (entry)) goto err; + if (prescan_entry(entry)) goto err; + return entry; + err: + zzip_entry_free (entry); + return 0; ____; +} + +/** => zzip_entry_findfile + * this function releases the malloc()ed areas needed for zzip_entry, the + * pointer is invalid afterwards. This function has #define synonyms of + * zzip_entry_findlast(), zzip_entry_findlastfile(), zzip_entry_findlastmatch() + */ +int +zzip_entry_free(ZZIP_ENTRY* entry) +{ + if (! entry) return 0; + prescan_clear (entry); + free (entry); + return 1; +} + +/** search for files in the (fseeko) zip central directory + * + * This function is given a filename as an additional argument, to find the + * disk_entry matching a given filename. The compare-function is usually + * strcmp or strcasecmp or perhaps strcoll, if null then strcmp is used. + * - use null as argument for "old"-entry when searching the first + * matching entry, otherwise the last returned value if you look for other + * entries with a special "compare" function (if null then a doubled search + * is rather useless with this variant of _findfile). If no further entry is + * found then null is returned and any "old"-entry gets already free()d. + */ +zzip__new__ ZZIP_ENTRY* +zzip_entry_findfile(FILE* disk, char* filename, + ZZIP_ENTRY* _zzip_restrict entry, + zzip_strcmp_fn_t compare) +{ + if (! filename || ! disk) return 0; + entry = ( ! entry ) ? zzip_entry_findfirst (disk) + : zzip_entry_findnext (entry); + if (! compare) compare = (zzip_strcmp_fn_t)(strcmp); + + for (; entry ; entry = zzip_entry_findnext (entry)) + { /* filenames within zip files are often not null-terminated! */ + char* realname = zzip_entry_strdup_name (entry); + if (! realname) continue; + if (! compare (filename, realname)) { + free (realname); return entry; + } else { + free (realname); continue; + } + } + return 0; +} + +#ifdef ZZIP_HAVE_FNMATCH_H +#define _zzip_fnmatch fnmatch +# ifdef FNM_CASEFOLD +# define _zzip_fnmatch_CASEFOLD FNM_CASEFOLD +# else +# define _zzip_fnmatch_CASEFOLD 0 +# endif +#else +# define _zzip_fnmatch_CASEFOLD 0 +/* if your system does not have fnmatch, we fall back to strcmp: */ +static int _zzip_fnmatch(char* pattern, char* string, int flags) +{ + puts ("<zzip:strcmp>"); + return strcmp (pattern, string); +} +#endif + +/** => zzip_entry_findfile + * + * This function uses a compare-function with an additional argument + * and it is called just like fnmatch(3) from POSIX.2 AD:1993), i.e. + * the argument filespec first and the ziplocal filename second with + * the integer-flags put in as third to the indirect call. If the + * platform has fnmatch available then null-compare will use that one + * and otherwise we fall back to mere strcmp, so if you need fnmatch + * searching then please provide an implementation somewhere else. + * - use null as argument for "after"-entry when searching the first + * matching entry, or the last disk_entry return-value to find the + * next entry matching the given filespec. If no further entry is + * found then null is returned and any "old"-entry gets already free()d. + */ +zzip__new__ ZZIP_ENTRY* +zzip_entry_findmatch(FILE* disk, char* filespec, + ZZIP_ENTRY* _zzip_restrict entry, + zzip_fnmatch_fn_t compare, int flags) +{ + if (! filespec || ! disk) return 0; + entry = ( ! entry ) ? zzip_entry_findfirst (disk) + : zzip_entry_findnext (entry); + if (! compare) compare = (zzip_fnmatch_fn_t) _zzip_fnmatch; + + for (; entry ; entry = zzip_entry_findnext (entry)) + { /* filenames within zip files are often not null-terminated! */ + char* realname = zzip_entry_strdup_name (entry); + if (! realname) continue; + if (! compare (filespec, realname, flags)) { + free (realname); return entry; + } else { + free (realname); continue; + } + } + return 0; +} + +/* ====================================================================== */ + +/** + * typedef struct zzip_disk_file ZZIP_ENTRY_FILE; + */ +struct zzip_entry_file /* : zzip_file_header */ +{ + struct zzip_file_header header; /* fopen detected header */ + ZZIP_ENTRY* entry; /* fopen entry */ + zzip_off_t data; /* for stored blocks */ + zzip_size_t avail; /* memorized for checks on EOF */ + zzip_size_t compressed; /* compressed flag and datasize */ + zzip_size_t dataoff; /* offset from data start */ + z_stream zlib; /* for inflated blocks */ + unsigned char buffer[PAGESIZE]; /* work buffer for inflate algorithm */ +}; + +/** open a file within a zip disk for reading + * + * This function does take an "entry" argument and copies it (or just takes + * it over as owner) to a new ZZIP_ENTRY_FILE handle structure. That + * structure contains also a zlib buffer for decoding. This function does + * seek to the file_header of the given "entry" and validates it for the + * data buffer following it. We do also prefetch some data from the data + * buffer thereby trying to match the disk pagesize for faster access later. + * The => zzip_entry_fread will then read in chunks of pagesizes which is + * the size of the internal readahead buffer. If an error occurs then null + * is returned. + */ +zzip__new__ ZZIP_ENTRY_FILE* +zzip_entry_fopen (ZZIP_ENTRY* entry, int takeover) +{ + if (! entry) return 0; + if (! takeover) { + ZZIP_ENTRY* found = malloc (sizeof(*entry)); + if (! found) return 0; + memcpy (found, entry, sizeof(*entry)); /* prescan_copy */ + found->tail = malloc (found->tailalloc); + if (! found->tail) { free (found); return 0; } + memcpy (found->tail, entry->tail, entry->tailalloc); + entry = found; + } + ___ ZZIP_ENTRY_FILE* file = malloc(sizeof(*file)); + if (! file) goto fail1; + file->entry = entry; + if (! zzip_entry_fread_file_header (entry, &file->header)) + goto fail2; + file->avail = zzip_file_header_usize (&file->header); + file->data = zzip_entry_data_offset (entry); + file->dataoff = 0; + + if (! file->avail || zzip_file_header_data_stored (&file->header)) + { file->compressed = 0; return file; } + + file->compressed = zzip_file_header_csize (&file->header); + file->zlib.opaque = 0; + file->zlib.zalloc = Z_NULL; + file->zlib.zfree = Z_NULL; + + ___ zzip_off_t seek = file->data; + seek += sizeof(file->buffer); seek -= seek & (sizeof(file->buffer)-1); + assert (file->data < seek); /* pre-read to next PAGESIZE boundary... */ + fseeko (file->entry->diskfile, file->data + file->dataoff, SEEK_SET); + file->zlib.next_in = file->buffer; + file->zlib.avail_in = fread (file->buffer, 1, seek - file->data, + file->entry->diskfile); + file->dataoff += file->zlib.avail_in; ____; + + if (! zzip_file_header_data_deflated (&file->header) + || inflateInit2 (& file->zlib, -MAX_WBITS) != Z_OK) goto fail2; + + return file; + fail2: + free (file); + fail1: + zzip_entry_free (entry); + return 0; ____; +} + +/** => zzip_entry_fopen + * + * This function opens a file found by name, so it does a search into + * the zip central directory with => zzip_entry_findfile and whatever + * is found first is given to => zzip_entry_fopen + */ +zzip__new__ ZZIP_ENTRY_FILE* +zzip_entry_ffile (FILE* disk, char* filename) +{ + ZZIP_ENTRY* entry = zzip_entry_findfile (disk, filename, 0, 0); + if (! entry) return 0; + return zzip_entry_fopen (entry, 1); +} + + +/** => zzip_entry_fopen + * + * This function reads more bytes into the output buffer specified as + * arguments. The return value is null on eof or error, the stdio-like + * interface can not distinguish between these so you need to check + * with => zzip_entry_feof for the difference. + */ +zzip_size_t +zzip_entry_fread (void* ptr, zzip_size_t sized, zzip_size_t nmemb, + ZZIP_ENTRY_FILE* file) +{ + if (! file) return 0; + ___ zzip_size_t size = sized*nmemb; + if (! file->compressed) { + if (size > file->avail) size = file->avail; + fread (ptr, 1, size, file->entry->diskfile); + file->dataoff += size; + file->avail -= size; + return size; + } + + file->zlib.avail_out = size; + file->zlib.next_out = ptr; + ___ zzip_size_t total_old = file->zlib.total_out; + while (1) { + if (! file->zlib.avail_in) { + size = file->compressed - file->dataoff; + if (size > sizeof(file->buffer)) size = sizeof(file->buffer); + /* fseek (file->data + file->dataoff, file->entry->diskfile); */ + file->zlib.avail_in = fread (file->buffer, 1, size, + file->entry->diskfile); + file->zlib.next_in = file->buffer; + file->dataoff += file->zlib.avail_in; + } + if (! file->zlib.avail_in) return 0; + + ___ int err = inflate (& file->zlib, Z_NO_FLUSH); + if (err == Z_STREAM_END) + file->avail = 0; + else if (err == Z_OK) + file->avail -= file->zlib.total_out - total_old; + else + return 0; + ____; + if (file->zlib.avail_out && ! file->zlib.avail_in) continue; + return file->zlib.total_out - total_old; + }____;____; +} + +/** => zzip_entry_fopen + * This function releases any zlib decoder info needed for decompression + * and dumps the ZZIP_ENTRY_FILE struct then. + */ +int +zzip_entry_fclose (ZZIP_ENTRY_FILE* file) +{ + if (! file) return 0; + if (file->compressed) + inflateEnd (& file->zlib); + zzip_entry_free (file->entry); + free (file); + return 0; +} + +/** => zzip_entry_fopen + * + * This function allows to distinguish an error from an eof condition. + * Actually, if we found an error but we did already reach eof then we + * just keep on saying that it was an eof, so the app can just continue. + */ +int +zzip_entry_feof (ZZIP_ENTRY_FILE* file) +{ + return ! file || ! file->avail; +} diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/fseeko.h b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/fseeko.h new file mode 100644 index 00000000000..cbe40f7db4a --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/fseeko.h @@ -0,0 +1,116 @@ +#ifndef _ZZIP_FSEEKO_H_ +#define _ZZIP_FSEEKO_H_ +/* + * NOTE: this is part of libzzipfseeko (i.e. it is not libzzip). + * + * simplified zip disk access using fseeko on a stdio FILE handle + * + * Author: + * Guido Draheim <guidod@gmx.de> + * + * Copyright (c) 2003,2004 Guido Draheim + * All rights reserved, + * use under the restrictions of the + * Lesser GNU General Public License + * or alternatively the restrictions + * of the Mozilla Public License 1.1 + */ + + +#include <zzip/types.h> +#include <stdio.h> + +typedef struct zzip_entry ZZIP_ENTRY; +typedef struct zzip_entry_file ZZIP_ENTRY_FILE; + +typedef int (*zzip_strcmp_fn_t)(char*, char*); +typedef int (*zzip_fnmatch_fn_t)(char*, char*, int); + +#ifndef zzip_entry_extern +#define zzip_entry_extern extern +#endif + +zzip_entry_extern zzip_off_t +zzip_entry_data_offset(ZZIP_ENTRY* entry); + +zzip__new__ +zzip_entry_extern ZZIP_ENTRY* +zzip_entry_findfirst(FILE* file); + +zzip__new__ +zzip_entry_extern ZZIP_ENTRY* +zzip_entry_findnext(ZZIP_ENTRY* _zzip_restrict entry); + +#define zzip_entry_findlast zzip_entry_free +#define zzip_entry_findlastfile zzip_entry_free +#define zzip_entry_findlastmatch zzip_entry_free + +zzip_entry_extern int +zzip_entry_free(ZZIP_ENTRY* entry); + +zzip__new__ +zzip_entry_extern char* +zzip_entry_strdup_name(ZZIP_ENTRY* entry); +zzip_entry_extern char* +zzip_entry_to_data(ZZIP_ENTRY* entry); + +zzip__new__ +zzip_entry_extern ZZIP_ENTRY* +zzip_entry_findfile(FILE* disk, char* filename, + ZZIP_ENTRY* _zzip_restrict old, + zzip_strcmp_fn_t compare); +zzip__new__ +zzip_entry_extern ZZIP_ENTRY* +zzip_entry_findmatch(FILE* disk, char* filespec, + ZZIP_ENTRY* _zzip_restrict old, + zzip_fnmatch_fn_t compare, int flags); +zzip__new__ +zzip_entry_extern ZZIP_ENTRY_FILE* +zzip_entry_fopen (ZZIP_ENTRY* entry, int takeover); + +zzip__new__ +zzip_entry_extern ZZIP_ENTRY_FILE* +zzip_entry_ffile (FILE* disk, char* filename); + +zzip_entry_extern _zzip_size_t +zzip_entry_fread (void* ptr, _zzip_size_t size, _zzip_size_t nmemb, + ZZIP_ENTRY_FILE* file); +zzip_entry_extern int +zzip_entry_fclose (ZZIP_ENTRY_FILE* file); +int +zzip_entry_feof (ZZIP_ENTRY_FILE* file); + +# ifdef _ZZIP_ENTRY_STRUCT +# ifdef __cplusplus +# define __zzip_entry_extends_zzip_disk_entry +struct zzip_entry : public struct zzip_disk_entry +{ + char* _zzip_restrict tail; + zzip_off_t tailalloc; /* the allocated size of tail */ + FILE* diskfile; /* a file reference */ + zzip_off_t disksize; /* the size of the file */ + zzip_off_t headseek; /* the offset within the file */ + zzip_off_t zz_usize; + zzip_off_t zz_csize; /* items scanned from header */ + zzip_off_t zz_offset; /* or zip64 extension block */ + int zz_diskstart; +}; +# else +struct zzip_entry /* : struct zzip_disk_entry */ +{ + struct zzip_disk_entry head; + char* _zzip_restrict tail; + zzip_off_t tailalloc; /* the allocated size of tail */ + FILE* diskfile; /* a file reference */ + zzip_off_t disksize; /* the size of the file */ + zzip_off_t headseek; /* the offset within the file */ + zzip_off_t zz_usize; + zzip_off_t zz_csize; /* items scanned from header */ + zzip_off_t zz_offset; /* or zip64 extension block */ + int zz_diskstart; +}; +# endif /* __cplusplus */ +# endif /* _ZZIP_MEM_ENTRY_PRIVATE */ + +#endif + diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/info.c b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/info.c new file mode 100644 index 00000000000..144b163d9e8 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/info.c @@ -0,0 +1,161 @@ +/* + * Author: + * Guido Draheim <guidod@gmx.de> + * + * Copyright (c) 2000,2001,2002,2003 Guido Draheim + * All rights reserved, + * use under the restrictions of the + * Lesser GNU General Public License + * or alternatively the restrictions + * of the Mozilla Public License 1.1 + */ + +#include <zzip/lib.h> /* exported... */ +#include <zzip/file.h> +#include <zzip/format.h> + +#ifdef ZZIP_HAVE_SYS_STAT_H +#include <sys/stat.h> +#else +#include <stdlib.h> +#include <stdio.h> +#endif + +/** + * just returns dir->errcode of the ZZIP_DIR handle + * see: => zzip_dir_open, => zzip_diropen, => zzip_readdir, => zzip_dir_read + */ +int +zzip_error(ZZIP_DIR * dir) +{ + return dir->errcode; +} + +/** => zzip_error + * This function just does dir->errcode = errcode + */ +void +zzip_seterror(ZZIP_DIR * dir, int errcode) +{ dir->errcode = errcode; } + +/** + * This function will just return fp->dir + * + * If a ZZIP_FILE is contained within a zip-file that one will be a valid + * pointer, otherwise a NULL is returned and the ZZIP_FILE wraps a real file. + */ +ZZIP_DIR * +zzip_dirhandle(ZZIP_FILE * fp) +{ + return fp->dir; +} + +/** => zzip_dirhandle + * This function will just return dir->fd + * + * If a ZZIP_DIR does point to a zipfile then the file-descriptor of that + * zipfile is returned, otherwise a NULL is returned and the ZZIP_DIR wraps + * a real directory DIR (if you have dirent on your system). + */ +int +zzip_dirfd(ZZIP_DIR* dir) +{ + return dir->fd; +} + +/** + * return static const string of the known compression methods, + * otherwise just "zipped" is returned + */ +zzip_char_t* +zzip_compr_str(int compr) +{ + switch(compr) + { + case ZZIP_IS_STORED: return "stored"; + case ZZIP_IS_SHRUNK: return "shrunk"; + case ZZIP_IS_REDUCEDx1: + case ZZIP_IS_REDUCEDx2: + case ZZIP_IS_REDUCEDx3: + case ZZIP_IS_REDUCEDx4: return "reduced"; + case ZZIP_IS_IMPLODED: return "imploded"; + case ZZIP_IS_TOKENIZED: return "tokenized"; + case ZZIP_IS_DEFLATED: return "deflated"; + case ZZIP_IS_DEFLATED_BETTER: return "deflatedX"; + case ZZIP_IS_IMPLODED_BETTER: return "implodedX"; + default: + if (0 < compr && compr < 256) return "zipped"; + else + { +# ifdef S_ISDIR + if (S_ISDIR(compr)) return "directory"; +# endif +# ifdef S_ISCHR + if (S_ISCHR(compr)) return "is/chr"; +# endif +# ifdef S_ISBLK + if (S_ISBLK(compr)) return "is/blk"; +# endif +# ifdef S_ISFIFO + if (S_ISFIFO(compr)) return "is/fifo"; +# endif +# ifdef S_ISSOCK + if (S_ISSOCK(compr)) return "is/sock"; +# endif +# ifdef S_ISLNK + if (S_ISLNK(compr)) return "is/lnk"; +# endif + return "special"; + } + }/*switch*/ +} + +/** => zzip_file_real + * This function checks if the ZZIP_DIR-handle is wrapping + * a real directory or a zip-archive. + * Returns 1 for a stat'able directory, and 0 for a handle to zip-archive. + */ +int +zzip_dir_real(ZZIP_DIR* dir) +{ + return dir->realdir != 0; +} + +/** + * This function checks if the ZZIP_FILE-handle is wrapping + * a real file or a zip-contained file. + * Returns 1 for a stat'able file, and 0 for a file inside a zip-archive. + */ +int +zzip_file_real(ZZIP_FILE* fp) +{ + return fp->dir == 0; /* ie. not dependent on a zip-arch-dir */ +} + +/** => zzip_file_real + * This function returns the posix DIR* handle (if one exists). + * Check before with => zzip_dir_real if the + * the ZZIP_DIR points to a real directory. + */ +void* +zzip_realdir(ZZIP_DIR* dir) +{ + return dir->realdir; +} + +/** => zzip_file_real + * This function returns the posix file descriptor (if one exists). + * Check before with => zzip_file_real if the + * the ZZIP_FILE points to a real file. + */ +int +zzip_realfd(ZZIP_FILE* fp) +{ + return fp->fd; +} + +/* + * Local variables: + * c-file-style: "stroustrup" + * End: + */ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/info.h b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/info.h new file mode 100644 index 00000000000..0ab6edab561 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/info.h @@ -0,0 +1,25 @@ +/* + * Author: + * Guido Draheim <guidod@gmx.de> + * + * Copyright (c) 2000,2001,2002,2003 Guido Draheim + * All rights reserved, + * use under the restrictions of the + * Lesser GNU General Public License + * or alternatively the restrictions + * of the Mozilla Public License 1.1 + */ + +#ifdef ZZIP_USE_INTERNAL +/* do not make these public, they are for internal use only */ + +#define ZZIP_error(__dir) __dir->errcode +#define ZZIP_seterror(__dir, __code) __dir->errcode = __code +#define ZZIP_dirhandle(__fp) __fp->dir +#define ZZIP_dirfd(__dir) __dir->fd +#define ZZIP_dir_real(__dir) __dir->realdir != 0 +#define ZZIP_file_real(__fp) __fp->dir == 0 +#define ZZIP_realdir(__dir) __dir->realdir +#define ZZIP_reafd(__fp) __fp->fd + +#endif diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/lib.h b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/lib.h new file mode 100644 index 00000000000..b1ad0690042 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/lib.h @@ -0,0 +1,83 @@ +/* + * Author: + * Guido Draheim <guidod@gmx.de> + * Tomi Ollila <Tomi.Ollila@iki.fi> + * + * Copyright (c) 1999,2000,2001,2002,2003 Guido Draheim + * All rights reserved + * use under the restrictions of the + * Lesser GNU General Public License + * or alternatively the restrictions + * of the Mozilla Public License 1.1 + * + * This is the private header containing definitions that are not + * use by a libzzip user application. Writing an extension lib that + * uses libzzip will still want to include this. The extension + * write should make way to have the ISO C9X integer types defined. + */ +#ifndef _ZZIP_LIB_H /* zzip.h */ +#define _ZZIP_LIB_H + +#include <zzip/zzip.h> +#include <zzip/plugin.h> +#include <zzip/stdint.h> + +/* + * this structure cannot be wildly enlarged... (see zzip-zip.c) + */ +struct zzip_dir_hdr +{ + uint32_t d_usize; /* uncompressed size */ + uint32_t d_csize; /* compressed size */ + uint32_t d_crc32; /* the adler32-checksum */ + uint32_t d_off; /* offset of file in zipfile */ + uint16_t d_reclen; /* next dir_hdr structure offset */ + uint16_t d_namlen; /* explicit namelen of d_name */ + uint8_t d_compr; /* the compression type, 0 = store, 8 = inflate */ + char d_name[1]; /* the actual name of the entry, may contain DIRSEPs */ +}; +#define _ZZIP_DIRENT_HAVE_D_NAMLEN +#define _ZZIP_DIRENT_HAVE_D_OFF +#define _ZZIP_DIRENT_HAVE_D_RECLEN + +/* + * you shall not use this struct anywhere else than in zziplib sources. + */ +struct zzip_dir +{ + int fd; + int errcode; /* zzip_error_t */ + long refcount; + struct { /* reduce a lot of alloc/deallocations by caching these: */ + int * volatile locked; + struct zzip_file * volatile fp; + char * volatile buf32k; + } cache; + struct zzip_dir_hdr * hdr0; /* zfi; */ + struct zzip_dir_hdr * hdr; /* zdp; directory pointer, for dirent stuff */ + struct zzip_file * currentfp; /* last fp used... */ + struct zzip_dirent dirent; + void* realdir; /* e.g. DIR* from posix dirent.h */ + char* realname; + zzip_strings_t* fileext; /* list of fileext to test for */ + zzip_plugin_io_t io; /* vtable for io routines */ +}; + +#define ZZIP_32K 32768 + +/* try to open a zip-basename with default_fileext */ +int __zzip_try_open (zzip_char_t* filename, int filemode, + zzip_strings_t* ext, zzip_plugin_io_t io); + +ZZIP_DIR * +zzip_dir_fdopen(int fd, zzip_error_t * errcode_p); + +ZZIP_DIR* +zzip_dir_fdopen_ext_io(int fd, zzip_error_t * errorcode_p, + zzip_strings_t* ext, const zzip_plugin_io_t io); + +ZZIP_DIR* /*depracated*/ +zzip_dir_alloc_ext_io (zzip_strings_t* ext, const zzip_plugin_io_t io); + +#endif /* _ZZIP_H */ + diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/memdisk.c b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/memdisk.c new file mode 100644 index 00000000000..7d66352add8 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/memdisk.c @@ -0,0 +1,394 @@ +/* + * NOTE: this is part of libzzipmmapped (i.e. it is not libzzip). + * + * The mem_disk cache will parse the central information of a zip archive + * and store it internally. One the one hand it allows to find files + * faster - no disk access is required and endian conversion is not + * needed. If zzip is compiled with zip extensions then it is about + * the only way to build maintainable code around the zip format. + * + * Note that 64bit support is almost entirely living in extension + * blocks as well as different character encodings and file access + * control bits that are mostly platform specific. + * + * Author: + * Guido Draheim <guidod@gmx.de> + * + * Copyright (c) 1999,2000,2001,2002,2003 Guido Draheim + * All rights reserved, + * use under the restrictions of the + * Lesser GNU General Public License + * or alternatively the restrictions + * of the Mozilla Public License 1.1 + */ +#define _ZZIP_DISK_FILE_STRUCT 1 + +#include <zzip/types.h> + +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <time.h> + +#include <zlib.h> +#include <zzip/format.h> +#include <zzip/fetch.h> +#include <zzip/mmapped.h> +#include <zzip/memdisk.h> +#include <zzip/__fnmatch.h> + +#define ___ { +#define ____ } + +static const char* error[] = { + "Ok", +# define _zzip_mem_disk_open_fail 1 + "zzip_mem_disk_open: zzip_disk_open did fail", +# define _zzip_mem_disk_fdopen_fail 2 + "zzip_mem_disk_fdopen: zzip_disk_mmap did fail" +}; + +#define R _zzip_restrict /* a.k.a. allocated */ + + +#define ZZIP_EXTRA_zip64 0x0001 +typedef struct _zzip_extra_zip64 { /* ZIP64 extended information extra field */ + zzip_byte_t z_datatype[2]; /* Tag for this "extra" block type */ + zzip_byte_t z_datasize[2]; /* Size of this "extra" block */ + zzip_byte_t z_usize[8]; /* Original uncompressed file size */ + zzip_byte_t z_csize[8]; /* Size of compressed data */ + zzip_byte_t z_offset[8]; /* Offset of local header record */ + zzip_byte_t z_diskstart[4]; /* Number of the disk for file start*/ +} zzip_extra_zip64; + +/*forward*/ + +zzip__new__ static ZZIP_MEM_ENTRY* +zzip_mem_entry_new(ZZIP_DISK* disk, ZZIP_DISK_ENTRY* entry); +zzip__new__ static void +zzip_mem_entry_free(ZZIP_MEM_ENTRY* _zzip_restrict item); + +zzip__new__ ZZIP_MEM_DISK* +zzip_mem_disk_new(void) +{ + return calloc(1, sizeof(ZZIP_MEM_DISK)); +} + +/** create new diskdir handle. + * wraps underlying zzip_disk_open. */ +zzip__new__ ZZIP_MEM_DISK* +zzip_mem_disk_open(char* filename) +{ + ZZIP_DISK* disk = zzip_disk_open(filename); + if (! disk) { perror(error[_zzip_mem_disk_open_fail]); return 0; } + ___ ZZIP_MEM_DISK* dir = zzip_mem_disk_new(); + zzip_mem_disk_load(dir, disk); + return dir; ____; +} + +/** create new diskdir handle. + * wraps underlying zzip_disk_open. */ +zzip__new__ ZZIP_MEM_DISK* +zzip_mem_disk_fdopen(int fd) +{ + ZZIP_DISK* disk = zzip_disk_mmap(fd); + if (! disk) { perror(error[_zzip_mem_disk_fdopen_fail]); return 0; } + ___ ZZIP_MEM_DISK* dir = zzip_mem_disk_new(); + zzip_mem_disk_load(dir, disk); + return dir; ____; +} + +/** parse central dir. + * creates an internal copy of each entry converted to the local platform. + * returns: number of entries, or -1 on error (setting errno) + */ +long +zzip_mem_disk_load(ZZIP_MEM_DISK* dir, ZZIP_DISK* disk) +{ + if (! dir || ! disk) { errno=EINVAL; return -1; } + if (dir->list) zzip_mem_disk_unload(dir); + ___ long count = 0; + ___ struct zzip_disk_entry* entry = zzip_disk_findfirst(disk); + for (; entry ; entry = zzip_disk_findnext(disk, entry)) { + ZZIP_MEM_ENTRY* item = zzip_mem_entry_new(disk, entry); + if (! item) goto error; + if (dir->last) { dir->last->zz_next = item; } /* chain last */ + else { dir->list = item; }; dir->last = item; /* to earlier */ + count++; + } ____; + dir->disk = disk; + return count; ____; + error: + zzip_mem_disk_unload (dir); + return -1; +} + +/** convert a zip disk entry to internal format. + * creates a new item parsing the information out of the various places + * in the zip archive. This is a good place to extend functionality if + * you have a project with extra requirements as you can push more bits + * right into the diskdir_entry for later usage in higher layers. + * returns: new item, or null on error (setting errno) + */ +zzip__new__ ZZIP_MEM_ENTRY* +zzip_mem_entry_new(ZZIP_DISK* disk, ZZIP_DISK_ENTRY* entry) +{ + if (! disk || ! entry) { errno=EINVAL; return 0; } + ___ ZZIP_MEM_ENTRY* item = calloc(1, sizeof(*item)); + if (! item) return 0; /* errno=ENOMEM; */ + ___ struct zzip_file_header* header = + zzip_disk_entry_to_file_header(disk, entry); + /* there is a number of duplicated information in the file header + * or the disk entry block. Theoretically some part may be missing + * that exists in the other, ... but we will prefer the disk entry. + */ + item->zz_comment = zzip_disk_entry_strdup_comment(disk, entry); + item->zz_name = zzip_disk_entry_strdup_name(disk, entry); + item->zz_data = zzip_file_header_to_data(header); + item->zz_flags = zzip_disk_entry_get_flags(entry); + item->zz_compr = zzip_disk_entry_get_compr(entry); + item->zz_mktime = zzip_disk_entry_get_mktime(entry); + item->zz_crc32 = zzip_disk_entry_get_crc32(entry); + item->zz_csize = zzip_disk_entry_get_csize(entry); + item->zz_usize = zzip_disk_entry_get_usize(entry); + item->zz_diskstart = zzip_disk_entry_get_diskstart(entry); + item->zz_filetype = zzip_disk_entry_get_filetype(entry); + + { /* copy the extra blocks to memory as well */ + int ext1 = zzip_disk_entry_get_extras(entry); + char* R ptr1 = zzip_disk_entry_to_extras(entry); + int ext2 = zzip_file_header_get_extras(header); + char* R ptr2 = zzip_file_header_to_extras(header); + + if (ext1) { + void* mem = malloc (ext1+2); + item->zz_ext[1] = mem; + memcpy (mem, ptr1, ext1); + ((char*)(mem))[ext1+0] = 0; + ((char*)(mem))[ext1+1] = 0; + } + if (ext2) { + void* mem = malloc (ext2+2); + item->zz_ext[2] = mem; + memcpy (mem, ptr2, ext2); + ((char*)(mem))[ext2+0] = 0; + ((char*)(mem))[ext2+1] = 0; + } + } + { /* override sizes/offsets with zip64 values for largefile support */ + zzip_extra_zip64* block = (zzip_extra_zip64*) + zzip_mem_entry_extra_block (item, ZZIP_EXTRA_zip64); + if (block) { + item->zz_usize = __zzip_get64(block->z_usize); + item->zz_csize = __zzip_get64(block->z_csize); + item->zz_offset = __zzip_get64(block->z_offset); + item->zz_diskstart = __zzip_get32(block->z_diskstart); + } + } + /* NOTE: + * All information from the central directory entry is now in memory. + * Effectivly that allows us to modify it and write it back to disk. + */ + return item; ____;____; +} + +/* find an extra block for the given datatype code. + * We assume that the central directory has been preparsed to memory. + */ +ZZIP_EXTRA_BLOCK* +zzip_mem_entry_extra_block (ZZIP_MEM_ENTRY* entry, short datatype) +{ + int i = 2; + while (1) { + ZZIP_EXTRA_BLOCK* ext = entry->zz_ext[i]; + if (ext) { + while (*(short*)(ext->z_datatype)) { + if (datatype == zzip_extra_block_get_datatype (ext)) { + return ext; + } + ___ char* e = (char*) ext; + e += zzip_extra_block_headerlength; + e += zzip_extra_block_get_datasize (ext); + ext = (void*) e; ____; + } + } + if (! i) return 0; + i--; + } +} + +void +zzip_mem_entry_free(ZZIP_MEM_ENTRY* _zzip_restrict item) +{ + if (item) { + if (item->zz_ext[0]) free (item->zz_ext[0]); + if (item->zz_ext[1]) free (item->zz_ext[1]); + if (item->zz_ext[2]) free (item->zz_ext[2]); + if (item->zz_comment) free (item->zz_comment); + if (item->zz_name) free (item->zz_name); + free (item); + } +} + +void +zzip_mem_disk_unload(ZZIP_MEM_DISK* dir) +{ + ZZIP_MEM_ENTRY* item = dir->list; + while (item) { + ZZIP_MEM_ENTRY* next = item->zz_next; + zzip_mem_entry_free(item); item = next; + } + dir->list = dir->last = 0; dir->disk = 0; +} + +void +zzip_mem_disk_close(ZZIP_MEM_DISK* _zzip_restrict dir) +{ + if (dir) { + zzip_mem_disk_unload (dir); + zzip_disk_close(dir->disk); + free (dir); + } +} + +#if 0 +static void foo (short zz_datatype) { + switch (zz_datatype) { + case 0x0001: /* ZIP64 extended information extra field */ + case 0x0007: /* AV Info */ + case 0x0008: /* Reserved for future Unicode file name data (PFS) */ + case 0x0009: /* OS/2 */ + case 0x000a: /* NTFS */ + case 0x000c: /* OpenVMS */ + case 0x000d: /* Unix */ + case 0x000e: /* Reserved for file stream and fork descriptors */ + case 0x000f: /* Patch Descriptor */ + case 0x0014: /* PKCS#7 Store for X.509 Certificates */ + case 0x0015: /* X.509 Certificate ID and Signature for file */ + case 0x0016: /* X.509 Certificate ID for Central Directory */ + case 0x0017: /* Strong Encryption Header */ + case 0x0018: /* Record Management Controls */ + case 0x0019: /* PKCS#7 Encryption Recipient Certificate List */ + case 0x0065: /* IBM S/390, AS/400 attributes - uncompressed */ + case 0x0066: /* Reserved for IBM S/390, AS/400 attr - compressed */ + case 0x07c8: /* Macintosh */ + case 0x2605: /* ZipIt Macintosh */ + case 0x2705: /* ZipIt Macintosh 1.3.5+ */ + case 0x2805: /* ZipIt Macintosh 1.3.5+ */ + case 0x334d: /* Info-ZIP Macintosh */ + case 0x4341: /* Acorn/SparkFS */ + case 0x4453: /* Windows NT security descriptor (binary ACL) */ + case 0x4704: /* VM/CMS */ + case 0x470f: /* MVS */ + case 0x4b46: /* FWKCS MD5 (see below) */ + case 0x4c41: /* OS/2 access control list (text ACL) */ + case 0x4d49: /* Info-ZIP OpenVMS */ + case 0x4f4c: /* Xceed original location extra field */ + case 0x5356: /* AOS/VS (ACL) */ + case 0x5455: /* extended timestamp */ + case 0x554e: /* Xceed unicode extra field */ + case 0x5855: /* Info-ZIP Unix (original, also OS/2, NT, etc) */ + case 0x6542: /* BeOS/BeBox */ + case 0x756e: /* ASi Unix */ + case 0x7855: /* Info-ZIP Unix (new) */ + case 0xfd4a: /* SMS/QDOS */ + } +} +#endif + +ZZIP_MEM_ENTRY* +zzip_mem_disk_findfile(ZZIP_MEM_DISK* dir, + char* filename, ZZIP_MEM_ENTRY* after, + zzip_strcmp_fn_t compare) +{ + ZZIP_MEM_ENTRY* entry = (! after ? dir->list : after->zz_next); + if (! compare) compare = (zzip_strcmp_fn_t) (strcmp); + for (; entry ; entry = entry->zz_next) { + if (! compare (filename, entry->zz_name)) { + return entry; + } + } + return 0; +} + +ZZIP_MEM_ENTRY* +zzip_mem_disk_findmatch(ZZIP_MEM_DISK* dir, + char* filespec, ZZIP_MEM_ENTRY* after, + zzip_fnmatch_fn_t compare, int flags) +{ + ZZIP_MEM_ENTRY* entry = (! after ? dir->list : after->zz_next); + if (! compare) compare = (zzip_fnmatch_fn_t) _zzip_fnmatch; + for (; entry ; entry = entry->zz_next) { + if (! compare (filespec, entry->zz_name, flags)) { + return entry; + } + } + return 0; +} + +zzip__new__ ZZIP_MEM_DISK_FILE* +zzip_mem_entry_fopen (ZZIP_MEM_DISK* dir, ZZIP_MEM_ENTRY* entry) +{ + /* keep this in sync with zzip_disk_entry_fopen */ + ZZIP_DISK_FILE* file = malloc(sizeof(ZZIP_MEM_DISK_FILE)); + if (! file) return file; + file->buffer = dir->disk->buffer; + file->endbuf = dir->disk->endbuf; + file->avail = zzip_mem_entry_usize (entry); + + if (! file->avail || zzip_mem_entry_data_stored (entry)) + { file->stored = zzip_mem_entry_to_data (entry); return file; } + + file->stored = 0; + file->zlib.opaque = 0; + file->zlib.zalloc = Z_NULL; + file->zlib.zfree = Z_NULL; + file->zlib.avail_in = zzip_mem_entry_csize (entry); + file->zlib.next_in = zzip_mem_entry_to_data (entry); + + if (! zzip_mem_entry_data_deflated (entry) || + inflateInit2 (& file->zlib, -MAX_WBITS) != Z_OK) + { free (file); return 0; } + + return file; +} + +zzip__new__ ZZIP_MEM_DISK_FILE* +zzip_mem_disk_fopen (ZZIP_MEM_DISK* dir, char* filename) +{ + ZZIP_MEM_ENTRY* entry = zzip_mem_disk_findfile (dir, filename, 0, 0); + if (! entry) return 0; else return zzip_mem_entry_fopen (dir, entry); +} +_zzip_size_t +zzip_mem_disk_fread (void* ptr, _zzip_size_t size, _zzip_size_t nmemb, + ZZIP_MEM_DISK_FILE* file) +{ + return zzip_disk_fread (ptr, size, nmemb, file); +} + +int +zzip_mem_disk_fclose (ZZIP_MEM_DISK_FILE* file) +{ + return zzip_disk_fclose (file); +} + +int +zzip_mem_disk_feof (ZZIP_MEM_DISK_FILE* file) +{ + return zzip_disk_feof (file); +} + +/* convert dostime of entry to unix time_t */ +long zzip_disk_entry_get_mktime(ZZIP_DISK_ENTRY* entry) +{ + uint16_t dostime = ZZIP_GET16 (entry->z_dostime.time); + uint16_t dosdate = ZZIP_GET16 (entry->z_dostime.date); + struct tm date; + date.tm_sec = (dostime) & 0x1F; /* bits 0..4 */ + date.tm_min = (dostime >> 5) & 0x3F; /* bits 5..10 */ + date.tm_hour = (dostime >> 11); /* bits 11..15 */ + date.tm_mday = (dosdate) & 0x1F; /* bits 16..20 */ + date.tm_mon = (dosdate >> 5) & 0xF; /* bits 21..24 */ + date.tm_year = (dosdate >> 9) + 80; /* bits 25..31 */ + return mktime (&date); /* well, unix has that function... */ +} diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/memdisk.h b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/memdisk.h new file mode 100644 index 00000000000..4403282f730 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/memdisk.h @@ -0,0 +1,162 @@ +#ifndef __ZZIP_MEMDISK_H +#define __ZZIP_MEMDISK_H + +/* NOTE: this is part of libzzipmmapped (i.e. it is not libzzip). */ + +#include <zzip/types.h> +#include <zzip/mmapped.h> + +typedef struct _zzip_mem_disk ZZIP_MEM_DISK; +typedef struct _zzip_mem_entry ZZIP_MEM_ENTRY; + +struct _zzip_mem_disk { + ZZIP_DISK* disk; + ZZIP_MEM_ENTRY* list; + ZZIP_MEM_ENTRY* last; +}; + +#ifndef zzip_mem_disk_extern +#define zzip_mem_disk_extern +#endif + +zzip_mem_disk_extern zzip__new__ ZZIP_MEM_DISK* +zzip_mem_disk_new (void); +zzip_mem_disk_extern zzip__new__ ZZIP_MEM_DISK* +zzip_mem_disk_open (char* filename); +zzip_mem_disk_extern zzip__new__ ZZIP_MEM_DISK* +zzip_mem_disk_fdopen (int fd); +zzip_mem_disk_extern void +zzip_mem_disk_close (ZZIP_MEM_DISK* _zzip_restrict dir); + +zzip_mem_disk_extern long +zzip_mem_disk_load (ZZIP_MEM_DISK* dir, ZZIP_DISK* disk); +zzip_mem_disk_extern void +zzip_mem_disk_unload (ZZIP_MEM_DISK* dir); +ZZIP_EXTRA_BLOCK* +zzip_mem_entry_extra_block (ZZIP_MEM_ENTRY* entry, short datatype); + +#ifdef USE_INLINE +_zzip_inline ZZIP_DISK* zzip_disk (ZZIP_MEM_DISK* dir) { return dir->disk; } +#else +#define zzip_disk(_X_) ((_X_)->disk) +#endif + + +/* these functions are much faster than the orgiinal zzip_disk_ functions */ + +/* zzip_mem_entry <is similar to> zzip_disk_entry */ +struct _zzip_mem_entry { + struct _zzip_mem_entry* zz_next; + char* zz_name; /* zero-terminated (from "filename") */ + zzip_byte_t* zz_data; /* compressed content start (mmap addr) */ + int zz_flags; /* (from "z_flags") */ + int zz_compr; /* (from "z_compr") */ + long zz_mktime; /* (from "z_dostime") */ + long zz_crc32; /* (from "z_crc32") */ + zzip_off_t zz_csize; /* (from "z_csize") overridden by zip64 */ + zzip_off_t zz_usize; /* (from "z_usize") overridden by zip64 */ + zzip_off_t zz_offset; /* (from "z_offset") overridden by zip64 */ + int zz_diskstart; /* (from "z_diskstart") rridden by zip64 */ + int zz_filetype; /* (from "z_filetype") */ + char* zz_comment; /* zero-terminated (from "comment") */ + ZZIP_EXTRA_BLOCK* zz_ext[3]; /* terminated by null in z_datatype */ +}; /* the extra blocks are NOT converted */ + +#define _zzip_mem_disk_findfirst(_d_) ((_d_)->list) +#define _zzip_mem_disk_findnext(_d_,_e_) (!(_e_)?(_d_)->list:(_e_)->zz_next) +#define _zzip_mem_entry_findnext(_e_) ((_e_)->zz_next) + +#ifndef USE_INLINE +#define zzip_mem_disk_findfirst _zzip_mem_disk_findfirst +#define zzip_mem_disk_findnext _zzip_mem_disk_findnext +#define zzip_mem_entry_findnext _zzip_mem_entry_findnext +#else + +_zzip_inline ZZIP_MEM_ENTRY* +zzip_mem_disk_findfirst(ZZIP_MEM_DISK* dir) { + if (! dir) return 0; + return _zzip_mem_disk_findfirst(dir); } +_zzip_inline ZZIP_MEM_ENTRY* +zzip_mem_disk_findnext(ZZIP_MEM_DISK* dir, ZZIP_MEM_ENTRY* entry) { + if (! dir) return 0; + return _zzip_mem_disk_findnext(dir, entry); } +_zzip_inline ZZIP_MEM_ENTRY* +zzip_mem_entry_findnext(ZZIP_MEM_ENTRY* entry) { + if (! entry) return 0; + return _zzip_mem_entry_findnext(entry); } +#endif + +#define _zzip_mem_entry_to_name(_e_) ((_e_)->zz_name) +#define _zzip_mem_entry_to_comment(_e_) ((_e_)->zz_comment) +#define _zzip_mem_entry_strdup_name(_e_) (strdup((_e_)->zz_name)) +#define _zzip_mem_entry_to_data(_e_) ((_e_)->zz_data) + +#ifndef USE_INLINE +#define zzip_mem_entry_to_name _zzip_mem_entry_to_name +#define zzip_mem_entry_to_comment _zzip_mem_entry_to_comment +#define zzip_mem_entry_strdup_name _zzip_mem_entry_strdup_name +#define zzip_mem_entry_to_data _zzip_mem_entry_to_data +#else +_zzip_inline char* +zzip_mem_entry_to_name(ZZIP_MEM_ENTRY* entry) { + if (! entry) return 0; + return _zzip_mem_entry_to_name(entry); } +_zzip_inline char* +zzip_mem_entry_to_comment(ZZIP_MEM_ENTRY* entry) { + if (! entry) return 0; + return _zzip_mem_entry_to_comment(entry); } +zzip__new__ +_zzip_inline char* +zzip_mem_entry_strdup_name(ZZIP_MEM_ENTRY* entry) { + if (! entry) return 0; + return _zzip_mem_entry_strdup_name(entry); } +_zzip_inline zzip_byte_t* +zzip_mem_entry_to_data(ZZIP_MEM_ENTRY* entry) { + if (! entry) return 0; + return _zzip_mem_entry_to_data(entry); } +#endif + +ZZIP_MEM_ENTRY* +zzip_mem_disk_findfile(ZZIP_MEM_DISK* dir, + char* filename, ZZIP_MEM_ENTRY* after, + zzip_strcmp_fn_t compare); + +ZZIP_MEM_ENTRY* +zzip_mem_disk_findmatch(ZZIP_MEM_DISK* dir, + char* filespec, ZZIP_MEM_ENTRY* after, + zzip_fnmatch_fn_t compare, int flags); + +/* named access -------------------------------------------------------- */ +#define zzip_mem_entry_usize(_e_) ((_e_)->zz_usize) +#define zzip_mem_entry_csize(_e_) ((_e_)->zz_csize) +#define zzip_mem_entry_data_encrypted(_e_) ZZIP_IS_ENCRYPTED((_e_)->zz_flags) +#define zzip_mem_entry_data_streamed(_e_) ZZIP_IS_STREAMED((_e_)->zz_flags) +#define zzip_mem_entry_data_comprlevel(_e_) ((_e_)->zz_compr) +#define zzip_mem_entry_data_stored(_e_) ((_e_)->zz_compr == ZZIP_IS_STORED) +#define zzip_mem_entry_data_deflated(_e_) ((_e_)->zz_compr == ZZIP_IS_DEFLATED) + +/* zzip_mem_disk_file -------------------------------------------------- */ + +/* since only the header data is being cached, all the real data + * operations are actually the same as in mmapped.h - just fopen makes + * access to the header data in memory instead of the zip archive. + */ + +typedef ZZIP_DISK_FILE ZZIP_MEM_DISK_FILE; + +zzip__new__ ZZIP_MEM_DISK_FILE* +zzip_mem_entry_fopen (ZZIP_MEM_DISK* dir, ZZIP_MEM_ENTRY* entry); +zzip__new__ ZZIP_MEM_DISK_FILE* +zzip_mem_disk_fopen (ZZIP_MEM_DISK* dir, char* filename); +_zzip_size_t +zzip_mem_disk_fread (void* ptr, _zzip_size_t size, _zzip_size_t nmemb, + ZZIP_MEM_DISK_FILE* file); +int +zzip_mem_disk_fclose (ZZIP_MEM_DISK_FILE* file); +int +zzip_mem_disk_feof (ZZIP_MEM_DISK_FILE* file); + +/* convert dostime of entry to unix time_t */ +long zzip_disk_entry_get_mktime(ZZIP_DISK_ENTRY* entry); + +#endif diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/mmapped.c b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/mmapped.c new file mode 100644 index 00000000000..645c4de6d45 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/mmapped.c @@ -0,0 +1,566 @@ +/* + * NOTE: this is part of libzzipmmapped (i.e. it is not libzzip). + * + * These routines are fully independent from the traditional zzip + * implementation. They assume a readonly mmapped sharedmem block + * representing a complete zip file. The functions show how to + * parse the structure, find files and return a decoded bytestream. + * + * These routines are a bit simple and really here for documenting + * the way to access a zip file. The complexity of zip access comes + * from staggered reading of bytes and reposition of a filepointer in + * a big archive with lots of files and long compressed datastreams. + * Plus varaints of drop-in stdio replacements, obfuscation routines, + * auto fileextensions, drop-in dirent replacements, and so on... + * + * Author: + * Guido Draheim <guidod@gmx.de> + * + * Copyright (c) 2003,2004 Guido Draheim + * All rights reserved, + * use under the restrictions of the + * Lesser GNU General Public License + * or alternatively the restrictions + * of the Mozilla Public License 1.1 + */ + +#ifdef __linux__ +#define _GNU_SOURCE _glibc_developers_are_idiots_to_call_this_gnu_specific_ +#endif + +#define _ZZIP_DISK_FILE_STRUCT 1 + +#include <zzip/types.h> + +#include <stdlib.h> +#include <sys/stat.h> + +#if defined ZZIP_HAVE_UNISTD_H +#include <unistd.h> +#elif defined ZZIP_HAVE_IO_H +#include <io.h> +#endif + +#if defined ZZIP_HAVE_STRING_H +#include <string.h> +#endif +#if defined ZZIP_HAVE_STRINGS_H +#include <strings.h> +#endif + +#include <zlib.h> +#include <zzip/mmapped.h> +#include <zzip/format.h> +#include <zzip/fetch.h> +#include <zzip/__mmap.h> +#include <zzip/__fnmatch.h> + +#if __STDC_VERSION__+0 > 199900L +#define ___ +#define ____ +#else +#define ___ { +#define ____ } +#endif + +/** => zzip_disk_mmap + * This function does primary initialization of a disk-buffer struct. + */ +int +zzip_disk_init(ZZIP_DISK* disk, void* buffer, zzip_size_t buflen) +{ + disk->buffer = (zzip_byte_t*) buffer; + disk->endbuf = (zzip_byte_t*) buffer + buflen; + disk->reserved = 0; + disk->flags = 0; + disk->mapped = 0; + /* do not touch disk->user */ + /* do not touch disk->code */ + return 0; +} + +/** => zzip_disk_mmap + * This function allocates a new disk-buffer with => malloc(3) + */ +zzip__new__ ZZIP_DISK* +zzip_disk_new(void) +{ + ZZIP_DISK* disk = malloc(sizeof(disk)); + if (! disk) return disk; + zzip_disk_init (disk, 0, 0); + return disk; +} + +/** turn a filehandle into a mmapped zip disk archive handle + * + * This function uses the given file-descriptor to detect the length of the + * file and calls the system => mmap(2) to put it in main memory. If it is + * successful then a newly allocated ZZIP_DISK* is returned with + * disk->buffer pointing to the mapview of the zipdisk content. + */ +zzip__new__ ZZIP_DISK* +zzip_disk_mmap(int fd) +{ + struct stat st; + if (fstat (fd, &st) || !st.st_size) return 0; + ___ ZZIP_DISK* disk = zzip_disk_new (); if (! disk) return 0; + disk->buffer = _zzip_mmap (& zzip->mapped, fd, 0, st.st_size); + if (disk->buffer == MAP_FAILED) { free (disk); return 0; } + disk->endbuf = disk->buffer + st.st_size; + return disk; ____; +} + +/** => zzip_disk_mmap + * This function is the inverse of => zzip_disk_mmap and using the system + * munmap(2) on the buffer area and => free(3) on the ZZIP_DISK structure. + */ +int +zzip_disk_munmap(ZZIP_DISK* disk) +{ + if (! disk) return 0; + _zzip_munmap (disk->mapped, disk->buffer, disk->endbuf-disk->buffer); + free (disk); + return 0; +} + +/** => zzip_disk_mmap + * + * This function opens the given archive by name and turn the filehandle + * to => zzip_disk_mmap for bringing it to main memory. If it can not + * be => mmap(2)'ed then we slurp the whole file into a newly => malloc(2)'ed + * memory block. Only if that fails too then we return null. Since handling + * of disk->buffer is ambigous it should not be snatched away please. + */ +ZZIP_DISK* zzip__new__ +zzip_disk_open(char* filename) +{ +# ifndef O_BINARY +# define O_BINARY 0 +# endif + struct stat st; + if (stat (filename, &st) || !st.st_size) return 0; + ___ int fd = open (filename, O_RDONLY|O_BINARY); + if (fd <= 0) return 0; + ___ ZZIP_DISK* disk = zzip_disk_mmap (fd); + if (disk) return disk; + ___ zzip_byte_t* buffer = malloc (st.st_size); + if (! buffer) return 0; + if ((st.st_size == read (fd, buffer, st.st_size)) && + (disk = zzip_disk_new ())) + { + disk->buffer = buffer; + disk->endbuf = buffer+st.st_size; + disk->mapped = -1; + }else free (buffer); + return disk; ____;____;____; +} + +/** => zzip_disk_mmap + * + * This function will release all data needed to access a (mmapped) + * zip archive, including any malloc()ed blocks, sharedmem mappings + * and it dumps the handle struct as well. + */ +int +zzip_disk_close(ZZIP_DISK* disk) +{ + if (! disk) return 0; + if (disk->mapped != -1) return zzip_disk_munmap (disk); + free (disk->buffer); + free (disk); + return 0; +} + +/* ====================================================================== */ +/* helper functions */ + +#ifdef ZZIP_HAVE_STRNDUP +#define _zzip_strndup strndup +#else +/* if your system does not have strndup: */ +zzip__new__ static char* _zzip_strndup(char* p, int maxlen) +{ + if (! p) return 0; + ___ zzip_byte_t* r = malloc (maxlen+1); + if (! r) return r; + strncpy (r, p, maxlen); + r[maxlen] = '\0'; + return r; ____; +} +#endif + +#if defined ZZIP_HAVE_STRCASECMP || defined strcasecmp +#define _zzip_strcasecmp strcasecmp +#else +/* if your system does not have strcasecmp: */ +static int _zzip_strcasecmp(char* __zzip_restrict a, char* _zzip_restrict b) +{ + if (! a) return (b) ? 1 : 0; + if (! b) return -1; + while (1) + { + int v = tolower(*a) - tolower(*b); + if (v) return v; + if (! *a) return 1; + if (! *b) return -1; + a++; b++; + } +} +#endif + +/** helper functions for (mmapped) zip access api + * + * This function augments the other zzip_disk_entry_* helpers: here we move + * a disk_entry pointer (as returned by _find* functions) into a pointer to + * the data block right after the file_header. Only disk->buffer would be + * needed to perform the seek but we check the mmapped range end as well. + */ +zzip_byte_t* +zzip_disk_entry_to_data(ZZIP_DISK* disk, struct zzip_disk_entry* entry) +{ + struct zzip_file_header* file = + zzip_disk_entry_to_file_header(disk, entry); + if (file) return zzip_file_header_to_data (file); + return 0; +} + +/** => zzip_disk_entry_to_data + * This function does half the job of => zzip_disk_entry_to_data where it + * can augment with => zzip_file_header_to_data helper from format/fetch.h + */ +struct zzip_file_header* +zzip_disk_entry_to_file_header(ZZIP_DISK* disk, struct zzip_disk_entry* entry) +{ + zzip_byte_t* file_header = /* (struct zzip_file_header*) */ + (disk->buffer + zzip_disk_entry_fileoffset (entry)); + if (disk->buffer > file_header || file_header >= disk->endbuf) + return 0; + return (struct zzip_file_header*) file_header; +} + +/** => zzip_disk_entry_to_data + * This function is a big helper despite its little name: in a zip file the + * encoded filenames are usually NOT zero-terminated but for common usage + * with libc we need it that way. Secondly, the filename SHOULD be present + * in the zip central directory but if not then we fallback to the filename + * given in the file_header of each compressed data portion. + */ +zzip__new__ char* +zzip_disk_entry_strdup_name(ZZIP_DISK* disk, struct zzip_disk_entry* entry) +{ + if (! disk || ! entry) return 0; + + ___ char* name; zzip_size_t len; + struct zzip_file_header* file; + if ((len = zzip_disk_entry_namlen (entry))) + name = zzip_disk_entry_to_filename (entry); + else if ((file = zzip_disk_entry_to_file_header (disk, entry)) && + (len = zzip_file_header_namlen (file))) + name = zzip_file_header_to_filename (file); + else + return 0; + + if ((zzip_byte_t*) name < disk->buffer || + (zzip_byte_t*) name+len > disk->endbuf) + return 0; + + return _zzip_strndup (name, len); ____; +} + +/** => zzip_disk_entry_to_data + * This function is similar creating a reference to a zero terminated + * string but it can only exist in the zip central directory entry. + */ +zzip__new__ char* +zzip_disk_entry_strdup_comment(ZZIP_DISK* disk, struct zzip_disk_entry* entry) +{ + if (! disk || ! entry) return 0; + + ___ char* text; zzip_size_t len; + if ((len = zzip_disk_entry_comment (entry))) + text = zzip_disk_entry_to_comment (entry); + else + return 0; + + if ((zzip_byte_t*) text < disk->buffer || + (zzip_byte_t*) text+len > disk->endbuf) + return 0; + + return _zzip_strndup (text, len); ____; +} + +/* ====================================================================== */ + +/** => zzip_disk_findfile + * + * This function is the first call of all the zip access functions here. + * It contains the code to find the first entry of the zip central directory. + * Here we require the mmapped block to represent a real zip file where the + * disk_trailer is _last_ in the file area, so that its position would be at + * a fixed offset from the end of the file area if not for the comment field + * allowed to be of variable length (which needs us to do a little search + * for the disk_tailer). However, in this simple implementation we disregard + * any disk_trailer info telling about multidisk archives, so we just return + * a pointer to the zip central directory. + * + * For an actual means, we are going to search backwards from the end + * of the mmaped block looking for the PK-magic signature of a + * disk_trailer. If we see one then we check the rootseek value to + * find the first disk_entry of the root central directory. If we find + * the correct PK-magic signature of a disk_entry over there then we + * assume we are done and we are going to return a pointer to that label. + * + * The return value is a pointer to the first zzip_disk_entry being checked + * to be within the bounds of the file area specified by the arguments. If + * no disk_trailer was found then null is returned, and likewise we only + * accept a disk_trailer with a seekvalue that points to a disk_entry and + * both parts have valid PK-magic parts. Beyond some sanity check we try to + * catch a common brokeness with zip archives that still allows us to find + * the start of the zip central directory. + */ +struct zzip_disk_entry* +zzip_disk_findfirst(ZZIP_DISK* disk) +{ + if (disk->buffer > disk->endbuf-sizeof(struct zzip_disk_trailer)) + return 0; + ___ zzip_byte_t* p = disk->endbuf-sizeof(struct zzip_disk_trailer); + for (; p >= disk->buffer ; p--) + { + zzip_byte_t* root; /* (struct zzip_disk_entry*) */ + if (zzip_disk_trailer_check_magic(p)) { + root = disk->buffer + zzip_disk_trailer_get_rootseek ( + (struct zzip_disk_trailer*)p); + if (root > p) + { /* the first disk_entry is after the disk_trailer? can't be! */ + zzip_size_t rootsize = zzip_disk_trailer_get_rootsize ( + (struct zzip_disk_trailer*)p); + if (disk->buffer+rootsize > p) continue; + /* a common brokeness that can be fixed: we just assume the + * central directory was written directly before the trailer:*/ + root = p - rootsize; + } + } else if (zzip_disk64_trailer_check_magic(p)) { + if (sizeof(void*) < 8) return 0; /* EOVERFLOW */ + root = disk->buffer + zzip_disk64_trailer_get_rootseek ( + (struct zzip_disk64_trailer*)p); + if (root > p) continue; + } else continue; + + if (root < disk->buffer) continue; + if (zzip_disk_entry_check_magic(root)) + return (struct zzip_disk_entry*) root; + }____; + return 0; +} + +/** => zzip_disk_findfile + * + * This function takes an existing disk_entry in the central root directory + * (e.g. from zzip_disk_findfirst) and returns the next entry within in + * the given bounds of the mmapped file area. + */ +struct zzip_disk_entry* +zzip_disk_findnext(ZZIP_DISK* disk, struct zzip_disk_entry* entry) +{ + if ((zzip_byte_t*)entry < disk->buffer || + (zzip_byte_t*)entry > disk->endbuf-sizeof(entry) || + ! zzip_disk_entry_check_magic (entry) || + zzip_disk_entry_sizeto_end (entry) > 64*1024) + return 0; + entry = zzip_disk_entry_to_next_entry (entry); + if ((zzip_byte_t*)entry > disk->endbuf-sizeof(entry) || + ! zzip_disk_entry_check_magic (entry) || + zzip_disk_entry_sizeto_end (entry) > 64*1024 || + zzip_disk_entry_skipto_end (entry) + sizeof(entry) > disk->endbuf) + return 0; + else + return entry; +} + +/** search for files in the (mmapped) zip central directory + * + * This function is given a filename as an additional argument, to find the + * disk_entry matching a given filename. The compare-function is usually + * strcmp or strcasecmp or perhaps strcoll, if null then strcmp is used. + * - use null as argument for "after"-entry when searching the first + * matching entry, otherwise the last returned value if you look for other + * entries with a special "compare" function (if null then a doubled search + * is rather useless with this variant of _findfile). + */ +struct zzip_disk_entry* +zzip_disk_findfile(ZZIP_DISK* disk, char* filename, + struct zzip_disk_entry* after, zzip_strcmp_fn_t compare) +{ + struct zzip_disk_entry* entry = (! after ? zzip_disk_findfirst (disk) + : zzip_disk_findnext (disk, after)); + if (! compare) + compare = (zzip_strcmp_fn_t)( (disk->flags&1) ? + (_zzip_strcasecmp) : (strcmp)); + for (; entry ; entry = zzip_disk_findnext (disk, entry)) + { + /* filenames within zip files are often not null-terminated! */ + char* realname = zzip_disk_entry_strdup_name (disk, entry); + if (realname && ! compare(filename, realname)) + { + free (realname); + return entry; + } + free (realname); + } + return 0; +} + +/** => zzip_disk_findfile + * + * This function uses a compare-function with an additional argument + * and it is called just like fnmatch(3) from POSIX.2 AD:1993), i.e. + * the argument filespec first and the ziplocal filename second with + * the integer-flags put in as third to the indirect call. If the + * platform has fnmatch available then null-compare will use that one + * and otherwise we fall back to mere strcmp, so if you need fnmatch + * searching then please provide an implementation somewhere else. + * - use null as argument for "after"-entry when searching the first + * matching entry, or the last disk_entry return-value to find the + * next entry matching the given filespec. + */ +struct zzip_disk_entry* +zzip_disk_findmatch(ZZIP_DISK* disk, char* filespec, + struct zzip_disk_entry* after, + zzip_fnmatch_fn_t compare, int flags) +{ + struct zzip_disk_entry* entry = (! after ? zzip_disk_findfirst (disk) + : zzip_disk_findnext (disk, after)); + if (! compare) { + compare = (zzip_fnmatch_fn_t) _zzip_fnmatch; + if (disk->flags&1) disk->flags |= _zzip_fnmatch_CASEFOLD; + } + for (; entry ; entry = zzip_disk_findnext (disk, entry)) + { + /* filenames within zip files are often not null-terminated! */ + char* realname = zzip_disk_entry_strdup_name(disk, entry); + if (realname && ! compare(filespec, realname, flags)) + { + free (realname); + return entry; + } + free (realname); + } + return 0; +} + +/* ====================================================================== */ + +/** => zzip_disk_fopen + * + * the ZZIP_DISK_FILE* is rather simple in just encapsulating the + * arguments given to this function plus a zlib deflate buffer. + * Note that the ZZIP_DISK pointer does already contain the full + * mmapped file area of a zip disk, so open()ing a file part within + * that area happens to be a lookup of its bounds and encoding. That + * information is memorized on the ZZIP_DISK_FILE so that subsequent + * _read() operations will be able to get the next data portion or + * return an eof condition for that file part wrapped in the zip archive. + */ +zzip__new__ ZZIP_DISK_FILE* +zzip_disk_entry_fopen (ZZIP_DISK* disk, ZZIP_DISK_ENTRY* entry) +{ + /* keep this in sync with zzip_mem_entry_fopen */ + struct zzip_file_header* header = + zzip_disk_entry_to_file_header (disk, entry); + if (! header) return 0; + ___ ZZIP_DISK_FILE* file = malloc(sizeof(ZZIP_DISK_FILE)); + if (! file) return file; + file->buffer = disk->buffer; + file->endbuf = disk->endbuf; + file->avail = zzip_file_header_usize (header); + + if (! file->avail || zzip_file_header_data_stored (header)) + { file->stored = zzip_file_header_to_data (header); return file; } + + file->stored = 0; + file->zlib.opaque = 0; + file->zlib.zalloc = Z_NULL; + file->zlib.zfree = Z_NULL; + file->zlib.avail_in = zzip_file_header_csize (header); + file->zlib.next_in = zzip_file_header_to_data (header); + + if (! zzip_file_header_data_deflated (header) || + inflateInit2 (& file->zlib, -MAX_WBITS) != Z_OK) + { free (file); return 0; } + + return file; ____; +} + +/** openening a file part wrapped within a (mmapped) zip archive + * + * This function opens a file found by name, so it does a search into + * the zip central directory with => zzip_disk_findfile and whatever + * is found first is given to => zzip_disk_entry_fopen + */ +zzip__new__ ZZIP_DISK_FILE* +zzip_disk_fopen (ZZIP_DISK* disk, char* filename) +{ + ZZIP_DISK_ENTRY* entry = zzip_disk_findfile (disk, filename, 0, 0); + if (! entry) return 0; else return zzip_disk_entry_fopen (disk, entry); +} + + +/** => zzip_disk_fopen + * + * This function reads more bytes into the output buffer specified as + * arguments. The return value is null on eof or error, the stdio-like + * interface can not distinguish between these so you need to check + * with => zzip_disk_feof for the difference. + */ +zzip_size_t +zzip_disk_fread (void* ptr, zzip_size_t sized, zzip_size_t nmemb, + ZZIP_DISK_FILE* file) +{ + zzip_size_t size = sized*nmemb; + if (size > file->avail) size = file->avail; + if (file->stored) + { + memcpy (ptr, file->stored, size); + file->stored += size; + file->avail -= size; + return size; + } + + file->zlib.avail_out = sized*nmemb; + file->zlib.next_out = ptr; + ___ zzip_size_t total_old = file->zlib.total_out; + ___ int err = inflate (& file->zlib, Z_NO_FLUSH); + if (err == Z_STREAM_END) + file->avail = 0; + else if (err == Z_OK) + file->avail -= file->zlib.total_out - total_old; + else + return 0; + return file->zlib.total_out - total_old; + ____;____; +} + +/** => zzip_disk_fopen + * This function releases any zlib decoder info needed for decompression + * and dumps the ZZIP_DISK_FILE* then. + */ +int +zzip_disk_fclose (ZZIP_DISK_FILE* file) +{ + if (! file->stored) + inflateEnd (& file->zlib); + free (file); + return 0; +} + +/** => zzip_disk_fopen + * + * This function allows to distinguish an error from an eof condition. + * Actually, if we found an error but we did already reach eof then we + * just keep on saying that it was an eof, so the app can just continue. + */ +int +zzip_disk_feof (ZZIP_DISK_FILE* file) +{ + return ! file || ! file->avail; +} diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/mmapped.h b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/mmapped.h new file mode 100644 index 00000000000..5f434544800 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/mmapped.h @@ -0,0 +1,120 @@ +#ifndef _ZZIP_MMAPPED_H_ +#define _ZZIP_MMAPPED_H_ +/* + * NOTE: this is part of libzzipmmapped (i.e. it is not libzzip). + * + * simplified zip disk access using a mmapping of the whole archive. + * + * Author: + * Guido Draheim <guidod@gmx.de> + * + * Copyright (c) 2003,2004 Guido Draheim + * All rights reserved, + * use under the restrictions of the + * Lesser GNU General Public License + * or alternatively the restrictions + * of the Mozilla Public License 1.1 + */ + + +#include <zzip/types.h> + +typedef struct zzip_disk_file ZZIP_DISK_FILE; +typedef struct zzip_disk ZZIP_DISK; +/* def struct zzip_disk_entry ZZIP_DISK_ENTRY; */ + +/* we expose this structure so third party applications can augment + * on them. The mmapped zip access usually just needs the two pointers + * specifying the mmapped area, whereever you have that from. + */ +struct zzip_disk +{ + zzip_byte_t* buffer; /* start of mmapped area, the base of all seekvals */ + zzip_byte_t* endbuf; /* end of mmapped area, i.e. buffer + buflen */ + void* reserved; /* - for later extensions (might be renamed) */ + void* user; /* - free for applications (use this!) */ + long flags; /* bit 0: findfile searches case-insensitive */ + long mapped; /* used for mmap() wrappers of zzip/__mmap.h */ + long unused; /* - for later extensions (might be renamed) */ + long code; /* - free for applications (use this!) */ +}; + +typedef int (*zzip_strcmp_fn_t)(char*, char*); +typedef int (*zzip_fnmatch_fn_t)(char*, char*, int); + +#define zzip_disk_extern extern + +zzip_disk_extern int +zzip_disk_init(ZZIP_DISK* disk, void* buffer, zzip_size_t buflen); + +zzip_disk_extern zzip__new__ ZZIP_DISK* +zzip_disk_new(void); + +zzip_disk_extern zzip__new__ ZZIP_DISK* +zzip_disk_mmap(int fd); + +zzip_disk_extern int +zzip_disk_munmap(ZZIP_DISK* disk); + +zzip_disk_extern zzip__new__ ZZIP_DISK* +zzip_disk_open(char* filename); + +zzip_disk_extern int +zzip_disk_close(ZZIP_DISK* disk); + + +zzip_disk_extern ZZIP_DISK_ENTRY* +zzip_disk_findfirst(ZZIP_DISK* disk); + +zzip_disk_extern ZZIP_DISK_ENTRY* +zzip_disk_findnext(ZZIP_DISK* disk, ZZIP_DISK_ENTRY* entry); + +zzip_disk_extern zzip__new__ char* +zzip_disk_entry_strdup_name(ZZIP_DISK* disk, ZZIP_DISK_ENTRY* entry); +zzip_disk_extern zzip__new__ char* +zzip_disk_entry_strdup_comment(ZZIP_DISK* disk, ZZIP_DISK_ENTRY* entry); +zzip_disk_extern struct zzip_file_header* +zzip_disk_entry_to_file_header(ZZIP_DISK* disk, ZZIP_DISK_ENTRY* entry); +zzip_disk_extern zzip_byte_t* +zzip_disk_entry_to_data(ZZIP_DISK* disk, ZZIP_DISK_ENTRY* entry); + +zzip_disk_extern ZZIP_DISK_ENTRY* +zzip_disk_findfile(ZZIP_DISK* disk, + char* filename, ZZIP_DISK_ENTRY* after, + zzip_strcmp_fn_t compare); +zzip_disk_extern ZZIP_DISK_ENTRY* +zzip_disk_findmatch(ZZIP_DISK* disk, + char* filespec, ZZIP_DISK_ENTRY* after, + zzip_fnmatch_fn_t compare, int flags); + + +zzip_disk_extern zzip__new__ ZZIP_DISK_FILE* +zzip_disk_entry_fopen (ZZIP_DISK* disk, ZZIP_DISK_ENTRY* entry); + +zzip_disk_extern zzip__new__ ZZIP_DISK_FILE* +zzip_disk_fopen (ZZIP_DISK* disk, char* filename); + +zzip_disk_extern _zzip_size_t +zzip_disk_fread (void* ptr, _zzip_size_t size, _zzip_size_t nmemb, + ZZIP_DISK_FILE* file); +zzip_disk_extern int +zzip_disk_fclose (ZZIP_DISK_FILE* file); +int +zzip_disk_feof (ZZIP_DISK_FILE* file); + +#ifdef _ZZIP_DISK_FILE_STRUCT +/** + * typedef struct zzip_disk_file ZZIP_DISK_FILE; + */ +struct zzip_disk_file +{ + zzip_byte_t* buffer; /* fopen disk->buffer */ + zzip_byte_t* endbuf; /* fopen disk->endbuf */ + zzip_size_t avail; /* memorized for checks on EOF */ + z_stream zlib; /* for inflated blocks */ + zzip_byte_t* stored; /* for stored blocks */ +}; +#endif + +#endif + diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/plugin.c b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/plugin.c new file mode 100644 index 00000000000..ad17adb6486 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/plugin.c @@ -0,0 +1,84 @@ +/* + * Author: + * Guido Draheim <guidod@gmx.de> + * Mike Nordell <tamlin-@-algonet-se> + * + * Copyright (c) 2002,2003 Guido Draheim + * All rights reserved, + * use under the restrictions of the + * Lesser GNU General Public License + * or alternatively the restrictions + * of the Mozilla Public License 1.1 + */ + +#include <zzip/lib.h> +#include <zzip/plugin.h> + +#include <string.h> +#include <sys/stat.h> +#include <errno.h> +#include <stdlib.h> +#ifdef DEBUG +#include <stdio.h> +#endif + +#include <zzip/file.h> +#include <zzip/format.h> + +zzip_off_t +zzip_filesize(int fd) +{ + struct stat st; + + if (fstat(fd, &st) < 0) + return -1; + +# if defined DEBUG && ! defined _WIN32 + if (! st.st_size && st.st_blocks > 1) /* seen on some darwin 10.1 machines */ + fprintf(stderr, "broken fstat(2) ?? st_size=%ld st_blocks=%ld\n", + (long) st.st_size, (long) st.st_blocks); +# endif + + return st.st_size; +} + +static const struct zzip_plugin_io default_io = +{ + &open, + &close, + &_zzip_read, + &_zzip_lseek, + &zzip_filesize, + 1, 1, + &_zzip_write +}; + +/** => zzip_init_io + * This function returns a zzip_plugin_io_t handle to static defaults + * wrapping the posix io file functions for actual file access. + */ +zzip_plugin_io_t +zzip_get_default_io() +{ + return (zzip_plugin_io_t) &default_io; +} + +/** + * This function initializes the users handler struct to default values + * being the posix io functions in default configured environments. + */ +int zzip_init_io(zzip_plugin_io_handlers_t io, int flags) +{ + if (!io) { + return ZZIP_ERROR; + } + memcpy(io, &default_io, sizeof(default_io)); + io->fd.sys = flags; + return 0; +} + +/* + * Local variables: + * c-file-style: "stroustrup" + * End: + */ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/plugin.h b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/plugin.h new file mode 100644 index 00000000000..b6ccbe8a66f --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/plugin.h @@ -0,0 +1,96 @@ +/* + * Author: + * Guido Draheim <guidod@gmx.de> + * + * Copyright (c) 2002,2003 Guido Draheim + * All rights reserved + * use under the restrictions of the + * Lesser GNU General Public License + * or alternatively the restrictions + * of the Mozilla Public License 1.1 + * + * the interfaces for the plugin_io system + * + * Using the following you can provide your own file I/O functions to + * e.g. read data directly from memory, provide simple + * "encryption"/"decryption" of on-disk .zip-files... + * Note that this currently only provides a subset of the functionality + * in zziplib. It does not attempt to provide any directory functions, + * but if your program 1) only uses ordinary on-disk files and you + * just want this for file obfuscation, or 2) you only access your + * .zip archives using zzip_open & co., this is sufficient. + * + * Currently the default io are the POSIX functions, except + * for 'filesize' that is zziplibs own provided zzip_filesize function, + * using standard POSIX fd's. You are however free to replace this with + * whatever data type you need, so long as you provide implementations + * for all the functions, and the data type fits an int. + * + * all functions receiving ext_io are able to cope with both arguments + * set to zero which will let them default to a ZIP ext and posix io. + */ +#ifndef _ZZIP_PLUGIN_H /* zzip-io.h */ +#define _ZZIP_PLUGIN_H 1 + +#include <zzip/zzip.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* we have renamed zzip_plugin_io.use_mmap to zzip_plugin_io.sys */ +#define ZZIP_PLUGIN_IO_SYS 1 + +struct zzip_plugin_io { /* use "zzip_plugin_io_handlers" in applications !! */ + int (*open)(zzip_char_t* name, int flags, ...); + int (*close)(int fd); + zzip_ssize_t (*read)(int fd, void* buf, zzip_size_t len); + zzip_off_t (*seeks)(int fd, zzip_off_t offset, int whence); + zzip_off_t (*filesize)(int fd); + long sys; + long type; + zzip_ssize_t (*write)(int fd, _zzip_const void* buf, zzip_size_t len); +}; + +typedef union _zzip_plugin_io +{ + struct zzip_plugin_io fd; + struct { void* padding[8]; } ptr; +} zzip_plugin_io_handlers; + +#define _zzip_plugin_io_handlers zzip_plugin_io_handlers +/* for backward compatibility, and the following to your application code: + * #ifndef _zzip_plugin_io_handlers + * #define _zzip_plugin_io_handlers struct zzip_plugin_io + */ +typedef zzip_plugin_io_handlers* zzip_plugin_io_handlers_t; + +#ifdef ZZIP_LARGEFILE_RENAME +#define zzip_filesize zzip_filesize64 +#define zzip_get_default_io zzip_get_default_io64 +#define zzip_init_io zzip_init_io64 +#endif + +_zzip_export zzip_off_t +zzip_filesize(int fd); + +/* get the default file I/O functions */ +_zzip_export zzip_plugin_io_t zzip_get_default_io(void); + +/* + * Initializes a zzip_plugin_io_t to the zziplib default io. + * This is useful if you only want to override e.g. the 'read' function. + * all zzip functions that can receive a zzip_plugin_io_t can + * handle a zero pointer in that place and default to posix io. + */ +_zzip_export +int zzip_init_io(zzip_plugin_io_handlers_t io, int flags); + +/* zzip_init_io flags : */ +# define ZZIP_IO_USE_MMAP 1 + +#ifdef __cplusplus +}; +#endif + +#endif diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/stat.c b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/stat.c new file mode 100644 index 00000000000..95bcf0c4051 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/stat.c @@ -0,0 +1,122 @@ +/* + * Author: + * Guido Draheim <guidod@gmx.de> + * Tomi Ollila <Tomi.Ollila@iki.fi> + * + * Copyright (c) 1999,2000,2001,2002 Guido Draheim + * All rights reserved, + * use under the restrictions of the + * Lesser GNU General Public License + * or alternatively the restrictions + * of the Mozilla Public License 1.1 + * + * Description: + * although this file is defining a function called zzip_stat it + * will not need a real stat(2) exported by the Operating System. + * It will just try to fill the fields of the ZZIP_STAT structure + * of + */ + +#include <zzip/lib.h> /* exported...*/ +#include <zzip/file.h> +#include <string.h> +#ifdef ZZIP_HAVE_STRINGS_H +#include <strings.h> +#endif +#include <sys/stat.h> + +#define ZZIP_USE_INTERNAL +#include <zzip/info.h> + +/** + * obtain information about a filename in an opened zip-archive without + * opening that file first. Mostly used to obtain the uncompressed + * size of a file inside a zip-archive. see => zzip_dir_open. + */ +int +zzip_dir_stat(ZZIP_DIR * dir, zzip_char_t* name, ZZIP_STAT * zs, int flags) +{ + struct zzip_dir_hdr * hdr = dir->hdr0; + int (*cmp)(zzip_char_t*, zzip_char_t*); + + cmp = (flags & ZZIP_CASEINSENSITIVE) ? strcasecmp : strcmp; + + if (flags & ZZIP_IGNOREPATH) + { + char* n = strrchr(name, '/'); + if (n) name = n + 1; + } + + if (hdr) + while (1) + { + register char* hdr_name = hdr->d_name; + if (flags & ZZIP_IGNOREPATH) + { + register char* n = strrchr(hdr_name, '/'); + if (n) hdr_name = n + 1; + } + + if (! cmp(hdr_name, name)) + break; + + if (! hdr->d_reclen) + { + dir->errcode = ZZIP_ENOENT; + return -1; + } + + hdr = (struct zzip_dir_hdr *) ((char *)hdr + hdr->d_reclen); + } + + zs->d_compr = hdr->d_compr; + zs->d_csize = hdr->d_csize; + zs->st_size = hdr->d_usize; + zs->d_name = hdr->d_name; + + return 0; +} + +/** => zzip_dir_stat + * This function will obtain information about a opened file _within_ a + * zip-archive. The file is supposed to be open (otherwise -1 is returned). + * The st_size stat-member contains the uncompressed size. The optional + * d_name is never set here. + */ +int zzip_file_stat (ZZIP_FILE* file, ZZIP_STAT* zs) +{ + if (! file) return -1; + zs->d_compr = file->method; + zs->d_csize = file->csize; + zs->st_size = file->usize; + zs->d_name = 0; + return 0; +} + +/** => zzip_dir_stat + * This function will obtain information about a opened file which may be + * either real/zipped. The file is supposed to be open (otherwise -1 is + * returned). The st_size stat-member contains the uncompressed size. + * The optional d_name is never set here. For a real file, we do set the + * d_csize := st_size and d_compr := 0 for meaningful defaults. + */ +int zzip_fstat (ZZIP_FILE* file, ZZIP_STAT* zs) +{ + if (ZZIP_file_real(file)) + { + struct stat st; + if (fstat (file->fd, &st) < 0) return -1; + zs->st_size = st.st_size; + zs->d_csize = st.st_size; + zs->d_compr = 0; + return 0; + }else{ + return zzip_file_stat (file, zs); + } +} + +/* + * Local variables: + * c-file-style: "stroustrup" + * End: + */ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/stdint.h b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/stdint.h new file mode 100644 index 00000000000..4552c5b04e0 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/stdint.h @@ -0,0 +1,45 @@ +#ifndef _ZZIP__STDINT_H /* zzip-stdint.h */ +#define _ZZIP__STDINT_H 1 +/* this file ensures that we have some kind of typedef declarations for + unsigned C9X typedefs. The ISO C 9X: 7.18 Integer types file is stdint.h + */ + +#include <zzip/conf.h> + +/* enforce use of ifdef'd C9X entries in system headers */ +#define __USE_ANSI 1 +#define __USE_ISOC9X 1 + +#ifdef ZZIP_HAVE_STDINT_H + /* ISO C 9X: 7.18 Integer types <stdint.h> */ +#include <stdint.h> +#elif defined ZZIP_HAVE_SYS_INT_TYPES_H /*solaris*/ +#include <sys/int_types.h> +#elif defined ZZIP_HAVE_INTTYPES_H /*freebsd*/ +#include <inttypes.h> +#else + typedef unsigned char uint8_t; typedef signed char int8_t; + +# if ZZIP_SIZEOF_INT && ZZIP_SIZEOF_INT == 2 + typedef unsigned int uint16_t; typedef signed int int16_t; +# elif ZZIP_SIZEOF_SHORT && ZZIP_SIZEOF_SHORT == 2 + typedef unsigned short uint16_t; typedef signed short int16_t; +# else +# error unable to typedef int16_t from either int or short + typedef unsigned short uint16_t; typedef signed short int16_t; +# endif + +# if defined ZZIP_SIZEOF_INT && ZZIP_SIZEOF_INT == 4 + typedef unsigned int uint32_t; typedef signed int int32_t; +# elif defined ZZIP_SIZEOF_LONG && ZZIP_SIZEOF_LONG == 4 + typedef unsigned long uint32_t; typedef signed long int32_t; +# else +# error unable to typedef int32_t from either int or long + typedef unsigned long uint32_t; typedef signed long int32_t; +# endif + +typedef unsigned _zzip___int64 uint64_t; typedef _zzip___int64 int64_t; +#endif + +#endif /*_ZZIP_STDINT_H*/ + diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/types.h b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/types.h new file mode 100644 index 00000000000..c20f128daa8 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/types.h @@ -0,0 +1,51 @@ +/* + * unlike in <zzip/conf.h> we are allowed to make up typedefs here, + * while over there only #defines are allowed + * + * Author: + * Guido Draheim <guidod@gmx.de> + * + * Copyright (c) 2003,2004 Guido Draheim + * All rights reserved, + * usage allowed under the restrictions of the + * Lesser GNU General Public License + * or alternatively the restrictions + * of the Mozilla Public License 1.1 + * + * if you see "unknown symbol" errors, check first that `-I ..` is part of + * your compiler options - a special hint to VC/IDE users who tend to make up + * their own workspace files. All includes look like #include <zzip|*.h>, so + * you need to add an include path to the dir containing (!!) the ./zzip/ dir + */ + +#ifndef _ZZIP_TYPES_H_ +#define _ZZIP_TYPES_H_ + +#include <zzip/conf.h> +#include <fcntl.h> +#include <stddef.h> /* size_t and friends */ +#ifdef ZZIP_HAVE_SYS_TYPES_H +#include <sys/types.h> /* bsd (mac) has size_t here */ +#endif +/* msvc6 has neither ssize_t (we assume "int") nor off_t (assume "long") */ + +typedef unsigned char zzip_byte_t; // especially zlib decoding data + +typedef _zzip_off64_t zzip_off64_t; +typedef _zzip_off_t zzip_off_t; +typedef _zzip_size_t zzip_size_t; +typedef _zzip_ssize_t zzip_ssize_t; + +/* in <zzip/format.h> */ +typedef struct zzip_disk64_trailer ZZIP_DISK64_TRAILER; +typedef struct zzip_disk_trailer ZZIP_DISK_TRAILER; +typedef struct zzip_file_trailer ZZIP_FILE_TRAILER; +typedef struct zzip_root_dirent ZZIP_ROOT_DIRENT; +typedef struct zzip_file_header ZZIP_FILE_HEADER; +typedef struct zzip_disk_entry ZZIP_DISK_ENTRY; +typedef struct zzip_extra_block ZZIP_EXTRA_BLOCK; + + + +#endif + diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/write.c b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/write.c new file mode 100644 index 00000000000..36637ddbcc9 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/write.c @@ -0,0 +1,461 @@ +/* + * The write-support in zziplib is not a full-flegded interface to the + * internals that zip file-header or zip archive an contain. It's + * primary use goes for savegames or transfer `pack-n-go` archives + * where time-stamps are rather unimportant. Here we can create an + * archive with filenames and their data portions, possibly obfuscated. + * + * Author: + * Guido Draheim <guidod@gmx.de> + * + * Copyright (c) 2003 Guido Draheim + * All rights reserved, + * use under the restrictions of the + * Lesser GNU General Public License + * or alternatively the restrictions + * of the Mozilla Public License 1.1 + */ + +#define _ZZIP_WRITE_SOURCE + +#if defined DDDD || defined DDDDD || defined DDDDDD || defined DDDDDDD +#define _ZZIP_ENABLE_WRITE +#else /* per default, we add support for passthrough to posix write */ +#define _ZZIP_POSIX_WRITE +#endif + +#include <zzip/lib.h> /* exported...*/ +#include <zzip/file.h> + +#include <string.h> +#include <sys/stat.h> +#include <errno.h> +#include <stdlib.h> +#include <ctype.h> + +#ifdef ZZIP_HAVE_DIRECT_H +#include <direct.h> +#endif + +#include <zzip/format.h> +#include <zzip/plugin.h> +#include <zzip/__debug.h> + +#define ___ { +#define ____ } + +#ifndef EROFS +# ifdef ENOSYS +#define EROFS ENOSYS +# else +#define EROFS EPERM +#endif +#endif + +/* try real zlib routines for writing ? very experimental, very very ex... */ +#ifndef _ZZIP_ENABLE_WRITE +#define _ZZIP_TRY 0 +#else +#define _ZZIP_TRY 1 +#endif + +/* btw, is there any system that did define those different ? get away.. */ +# ifndef S_IWGRP +# define S_IWGRP 00020 +# endif +# ifndef S_IRWXO +# define S_IRWXO 00007 +# endif + +# ifdef ZZIP_HAVE_DIRECT_H +# define _mkdir(a,b) mkdir(a) +# else +# define _mkdir mkdir +# endif + +/** create a new zip archive for writing + * + * This function will create a new zip archive. The returned parameter + * is a new "zzip dir" handle that should be saved to a variable so it + * can be used a base argument for => zzip_mkdir and => zzip_creat calls. + * The returned handle represents a zip central directory that must be + * saved to disk using => zzip_closedir. + * + * Returns null on error and sets errno. Remember, according to posix + * the => creat(2) call is equivalent to + open (path, O_WRONLY | O_CREAT | O_TRUNC, o_mode) + * so any previous zip-archive will be overwritten unconditionally and + * EEXIST errors from => mkdir(2) are suppressed. (fixme: delete the + * given subtree? like suggested by O_TRUNC? not done so far!) + */ +ZZIP_DIR* +zzip_dir_creat(zzip_char_t* name, int o_mode) +{ + return zzip_dir_creat_ext_io (name, o_mode, 0, 0); +} + +/** => zzip_dir_creat + * + * If the third argument "ext" has another special meaning here, as it + * is used to ensure that a given zip-file is created with the first entry + * of the ext-list appended as an extension unless the file-path already + * ends with a file-extension registered in the list. Therefore {"",0} + * matches all files and creates them as zip-archives under the given + * nonmodified name. (Some magic here? If the path ends in the path + * separator then make a real directory even in the presence of ext-list?) + * + * This function is not yet implemented, check for #def ZZIP_NO_CREAT + * Write-support will extend => zzip_closedir with semantics to finalize the + * zip-archive by writing the zip-trailer and closing the archive file. + */ +ZZIP_DIR* +zzip_dir_creat_ext_io(zzip_char_t* name, int o_mode, + zzip_strings_t* ext, zzip_plugin_io_t io) +{ + if (! io) io = zzip_get_default_io (); + + if (io != zzip_get_default_io()) + { /* the current io-structure does not contain a "write" entry, + * and therefore this parameter is useless. Anyone to expect + * some behavior should be warned, so here we let the function + * fail bluntly - and leaving the recovery to the application + */ + errno = EINVAL; + return 0; + } + + + if (!_ZZIP_TRY) + { /* not implemented - however, we respect that a null argument to + * zzip_mkdir and zzip_creat works, so we silently still do the mkdir + */ + if (! _mkdir (name, o_mode) || errno == EEXIST) + errno = EROFS; + return 0; + } else { +# define MAX_EXT_LEN 10 + ZZIP_DIR* dir = zzip_dir_alloc (ext); + int name_len = strlen(name); + dir->realname = malloc (name_len+MAX_EXT_LEN); + if (! dir->realname) goto error; + + memcpy (dir->realname, name, name_len+1); + ___ int fd = __zzip_try_open ( + dir->realname, O_EXCL|O_TRUNC|O_WRONLY, ext, io); + if (fd != -1) { dir->fd = fd; return dir; } + + ___ zzip_strings_t* exx = ext; int exx_len; + for (; *exx ; exx++) + { + if ((exx_len = strlen (*exx)+1) <= name_len && + !memcmp (dir->realname+(name_len-exx_len), *exx, exx_len)) + break; /* keep unmodified */ + exx++; if (*exx) continue; + + if (! (exx_len = strlen (*exx)) || exx_len >= MAX_EXT_LEN) break; + memcpy (dir->realname+name_len, exx, exx_len); /* append! */ + }____; + fd = io->fd.open (dir->realname, O_CREAT|O_TRUNC|O_WRONLY, o_mode); + dir->realname[name_len] = '\0'; /* keep ummodified */ + if (fd != -1) { dir->fd = fd; return dir; } + error: + zzip_dir_free (dir); return 0; + ____; + } +} + +/** create a new archive area for writing + * + * This function will create a new archive area. This may either be a + * a new zip archive or a new directory in the filesystem. The returned + * parameter is a new "zzip dir" handle that should be saved to a variable + * so it can be used a base argument for => zzip_file_mkdir and + * => zzip_file_creat calls. The returned handle wraps both possibilities, + * it can be representing a zip central directory that must be + * saved to disk using => zzip_closedir or it is just a handle for the + * name of the real directory that still must be run through + * => zzip_closedir to release the wrapper around the directory name. + * + * The magic is pushed through the o_mode argument. Using a mode that + * has no group-write bit set (S_IWGRP = 0040) then the file is + * created as a zip directory. Note that this is unabridged of any + * umask value in the system where the argument to this function could + * be 0775 but with an umask of 0755 it turns out as 0755 for a real + * directory. Using 0755 directly would not create it as a real directory + * but as a zip archive handle. + * + * This function is not yet implemented, check for #def ZZIP_NO_CREAT + * Write-support will extend => zzip_closedir with semantics to finalize the + * zip-archive by writing the zip-trailer and closing the archive file. + * + * Returns null on error and sets errno. Remember, according to posix + * the => creat(2) call is equivalent to + open (path, O_WRONLY | O_CREAT | O_TRUNC, o_mode) + * so any previous zip-archive will be overwritten unconditionally and + * EEXIST errors from => mkdir(2) are suppressed. (fixme: delete the + * given subtree? like suggested by O_TRUNC? not done so far!) + */ +ZZIP_DIR* +zzip_createdir(zzip_char_t* name, int o_mode) +{ + if (o_mode & S_IWGRP) + { + if (-1 == _mkdir(name, o_mode) && errno != EEXIST) /* fail */ + return 0; + return zzip_opendir (name); + } else + return zzip_dir_creat (name, o_mode); +} + +/** => zzip_file_creat => mkdir(2), creat(2), zzip_dir_creat + * + * This function has an additional primary argument over the posix + * mkdir(2) - if it is null then this function behaves just like + * posix mkdir(2). The zzip_dir argument can be set to the result + * of a => zzip_createdir which allows for some magic that the + * given directory name is created as an entry in the zip archive. + * + * If the given dir name argument is not within the basepath of + * the zip central directory then a real directory is created. + * Any EEXIST errors are not suppressed unlike with => zzip_createdir + * + * Standard usage accepts a global/threaded/modular ZZIP_DIR pointer + * for all zip archive operations like in: + ZZIP_DIR* zip = zzip_createdir (sysconfpath, 0755, zip); + zzip_file_mkdir (zip, filepath[i], 0755); + ZZIP_FILE* file = zzip_file_creat (zip, filename[i], 0644); + zzip_write (file, buf, len); + zzip_close (file); file = 0; + zzip_closedir (zip); zip = 0; + * + * compare with => zzip_mkdir inline macro which allows to + * collapse the examples script to + #define zzip_savefile myproject_saveconfig + #include <zzip/zzip.h> + ZZIP_DIR* zzip_savefile = zzip_createdir (sysconfpath, 0755); + zzip_mkdir (filepath[i], 0755); + ZZIP_FILE* file = zzip_creat(filepath[i], 0644); + zzip_write (file, buf, len); + zzip_close (file); file = 0; + zzip_closedir (zip_savefile); + */ +int +zzip_file_mkdir(ZZIP_DIR* dir, zzip_char_t* name, int o_mode) +{ + if (! dir) + return _mkdir(name, o_mode); + + if (!_ZZIP_TRY) + {/* not implemented */ + errno = EROFS; + return -1; + } else { + errno = EROFS; + return -1; + } +} + +/** start next file entry in a zip archive + * + * This function will create a new file within a zzip archive, the + * one given as the primary argument and additionally to the posix + * creat(2) - just like zzip_mkdir has an additional argument over + * the posix mkdir(2) spec. For this function the primary parameter + * can be null as well thereby creating a real file instead of a new + * one inside the zip-archive otherwise given. If the primary parameter is + * not null but wraps a real directory then all new files are also real. + * + * This function is not yet implemented, check for #def ZZIP_NO_CREAT + * + * Returns NULL on an error setting errno, and opening a file _within_ + * a zip archive using O_RDONLY (and similar stuff) will surely lead to + * an error. + */ +ZZIP_FILE* +zzip_file_creat(ZZIP_DIR* dir, zzip_char_t* name, int o_mode) +{ + if (! dir) + return zzip_open (name, o_mode); + + if (!_ZZIP_TRY) + {/* not implemented */ + errno = EROFS; + return 0; + } else { + errno = EROFS; + return 0; + } +} + +/** write to zzip storage also: write(2), zlib(3) + * + * This function will write data to a file descriptor. If the file + * descriptor represents a real file then it will be forwarded to + * call posix => write(2) directly. If it is a descriptor for a + * file within a zip directory then the data will be "deflated" + * using => zlib(3) and appended to the zip archive file. + */ +zzip_ssize_t +zzip_write(ZZIP_FILE* file, const void* ptr, zzip_size_t len) +{ + if (zzip_file_real(file)) + return write (zzip_realfd (file), ptr, len); + else + return zzip_file_write (file, ptr, len); +} + +/** => zzip_write also: zzip_file_creat + * + * This function will write data to a file descriptor inside a zip + * archive. The data will be "deflated" using => zlib(3) compression + * and appended to the end of the zip archive file. Only one file + * descriptor may be open per zzip_dir archive handle (fifo-like). + * + * This function is not yet implemented, check for #def ZZIP_NO_CREAT + * It returns immediately -1 and sets errno=EROFS for indication. + */ +zzip_ssize_t +zzip_file_write(ZZIP_FILE* file, const void* ptr, zzip_size_t len) +{ + if (!_ZZIP_TRY) + {/* not implemented */ + errno = EROFS; + return -1; + } else { + /* add calls to zlib here... */ + errno = EROFS; + return -1; + } +} + +/** => zzip_write + * This function is the stdc variant for writing and the arguments + * are forwarded to => zzip_write - the return value is floored to + * null as for STDC spec but there is no zzip_ferror call so far + * for the zziplib (later? is it actually needed?). + * + * This function is not yet implemented, check for #def ZZIP_NO_CREAT + * Write-support extends => zzip_close with semantics to write out a + * file-trailer to the zip-archive leaving a name/offset marker in + * the (still-open) ZZIP_DIR handle. + */ +zzip_size_t +zzip_fwrite(const void* ptr, zzip_size_t len, zzip_size_t multiply, + ZZIP_FILE* file) +{ + zzip_ssize_t value = zzip_write (file, ptr, len * multiply); + if (value == -1) + value = 0; + return (zzip_size_t) value; +} + +#if 0 /* pure documentation */ +/** create a zipped file/directory also: zzip_dir_creat, mkdir(2) + * + * This function creates a directory entry in the default zip-archive. + * If you did not specify a "#define zzip_savefile somevar" + * then the default zip-archive is null and all directories are + * created as real directories in the filesystem. This function is + * really a preprocessor macro or preferably an inline function + * around => zzip_file_mkdir, there is no such symbol generated + * into the library. The prototype is modelled after the posix + * => mkdir(2) call. + #ifndef zzip_savefile + #define zzip_savefile 0 + #endif + #define zzip_mkdir(name,mode) \ - + zzip_file_mkdir(zzip_savefile,name,mode) + * + */ +int inline +zzip_mkdir(zzip_char_t* name, int o_mode) +{ + return zzip_file_creat(zzip_savefile, name, mode); +} +#endif + +#if 0 /* pure documentation */ +/** => zzip_mkdir also: creat(2), zzip_start + * + * This function creates a file in the default zip-archive. + * If you did not specify a "#define zzip_savefile somevar" + * then the default zip-archive is null and all files are created + * as real files. This function is really a preprocessor macro + * or preferably an inline function around => zzip_file_creat, + * there is no such symbol generated into the library. The prototype + * is modelled after the posix => creat(2) call. + #ifndef zzip_savefile + #define zzip_savefile 0 + #endif + #define zzip_creat(name,mode) \ - + zzip_file_creat(zzip_savefile,name,mode) + */ +ZZIP_FILE* inline +zzip_creat(zzip_char_t* name, int o_mode) +{ + return zzip_file_creat(zzip_savefile, name, mode); +} +#endif + + +#if 0 /* pure documentation */ +/** start writing to the magic zzip_savefile also: zzip_creat, zzip_write + * + * open a zip archive for writing via the magic zzip_savefile macro + * variable. The name and mode are given to => zzip_createdir and + * the result is stored into => zzip_savefile - if the => zzip_savefile + * did already have a zzip_dir handle then it is automatically + * finalized with => zzip_sync and the handle closed and the + * zzip_savefile variable reused for the new zip archive just started + * with this call. - This function is really a preprocessor macro + * or preferably an inline function around => zzip_dir_create, there + * is no such symbol generated into the library. + #ifndef zzip_savefile + #define zzip_savefile 0 + #endif + #define zzip_start(name,mode,ext) \ - + { if (zzip_savefile) zzip_closedir(zzip_savefile); \ - + zzip_savefile = zzip_createdir(name,mode,ext); } + * This function returns null on error or a zzip_dir handle on + * success. It is perfectly okay to continue with a null in the + * zzip_savefile variable since it makes subsequent calls to + * => zzip_creat and => zzip_mkdir to run as => creat(2) / => mkdir(2) + * on the real filesystem. + */ +void inline +zzip_mkfifo(zzip_char_t* name, int o_mode) +{ + if (zzip_savefile) zzip_closedir (zzip_savefile); + zzip_savefile = zzip_createdir(name, o_mode); +} +#endif + +#if 0 /* pure documentation */ +/** => zzip_mkfifo also: zzip_closedir, sync(2) + * + * finalize a zip archive thereby writing the central directory to + * the end of the file. If it was a real directory then we do just + * nothing - even that the prototype of the call itself is modelled + * to be similar to the posix => sync(2) call. This function is + * really a preprocessor macro or preferably an inline function + * around => zzip_closedir, there is no such symbol generated + * into the library. + #ifndef zzip_savefile + #define zzip_savefile 0 + #endif + #define zzip_sync(name,mode) \ - + { zzip_closedir(zzip_savefile); zzip_savefile = 0; } + * + */ +void inline +zzip_sync(void) +{ + zzip_closedir (zzip_savefile); zzip_savefile = 0; +} +#endif + +/* + * Local variables: + * c-file-style: "stroustrup" + * End: + */ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/zip.c b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/zip.c new file mode 100644 index 00000000000..5133a11613b --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/zip.c @@ -0,0 +1,759 @@ +/* + * Author: + * Guido Draheim <guidod@gmx.de> + * Tomi Ollila <too@iki.fi> + * + * Copyright (c) 1999,2000,2001,2002,2003 Guido Draheim + * All rights reserved, + * use under the restrictions of the + * Lesser GNU General Public License + * or alternatively the restrictions + * of the Mozilla Public License 1.1 + */ + +#include <zzip/lib.h> /* archive handling */ +#include <zzip/file.h> +#include <zzip/format.h> +#include <zzip/fetch.h> + +#include <ctype.h> +#include <errno.h> +#include <stdlib.h> +#include <string.h> +#include <fcntl.h> +#ifdef ZZIP_HAVE_SYS_STAT_H +#include <sys/stat.h> +#endif + +#include <zzip/__mmap.h> +#include <zzip/__debug.h> + +#define __sizeof(X) ((zzip_ssize_t)(sizeof(X))) + +/* per default, we use a little hack to correct bad z_rootseek parts */ +#define ZZIP_CORRECT_ROOTSEEK 1 + +#if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ >= 4) +# ifdef DEBUG +# warning suppress a warning where the compiler should have optimized instead. +# endif +#define _255 254 +#else +#define _255 255 +#endif + +#define ZZIP_DISK64_TRAILER + +#ifdef ZZIP_DISK64_TRAILER +struct _disk_trailer { + void* zz_tail; + void* zz_for_correct_rootseek; // ZZIP_CORRECT_ROOTSEEK + zzip_off64_t zz_entries; + zzip_off64_t zz_finalentries; + zzip_off64_t zz_rootseek; + zzip_off64_t zz_rootsize; +}; +#define _disk_trailer_entries(__p) ((__p)->zz_entries) +#define _disk_trailer_localentries(__p) ((__p)->zz_entries) +#define _disk_trailer_finalentries(__p) ((__p)->zz_entries) +#define _disk_trailer_rootseek(__p) ((__p)->zz_rootseek) +#define _disk_trailer_rootsize(__p) ((__p)->zz_rootsize) +#define _disk_trailer_set_rootseek(__p,__v) ((__p)->rootseek = (__v)) + +#else +#define _disk_trailer zzip_disk_trailer +#define _disk_trailer_entries zzip_disk_trailer_entries +#define _disk_trailer_localentries zzip_disk_trailer_localentries +#define _disk_trailer_finalentries zzip_disk_trailer_finalentries +#define _disk_trailer_rootseek zzip_disk_trailer_rootseek +#define _disk_trailer_rootsize zzip_disk_trailer_rootsize +#define _disk_trailer_set_rootseek zzip_disk_trailer_set_rootseek +#define __zzip_fetch_disk_trailer __zzip_find_disk_trailer +#endif + +/* --------------------------- internals -------------------------------- */ +/* internal functions of zziplib, avoid at all cost, changes w/o warning. + * we do export them for debugging purpose and special external tools + * which know what they do and which can adapt from version to version + */ + +int __zzip_fetch_disk_trailer( int fd, zzip_off_t filesize, + struct _disk_trailer * _zzip_restrict trailer, + zzip_plugin_io_t io); +int __zzip_parse_root_directory( int fd, + struct _disk_trailer * trailer, + struct zzip_dir_hdr ** hdr_return, + zzip_plugin_io_t io); + +_zzip_inline char* __zzip_aligned4(char* p); + +/* ------------------------ harden routines ------------------------------ */ + +#ifdef ZZIP_HARDEN +/* + * check for inconsistent values in trailer and prefer lower seek value + * - we fix values assuming the root directory was written at the end + * and it is just before the zip trailer. Therefore, ... + */ +_zzip_inline static void __fixup_rootseek( + zzip_off_t offset_of_trailer, + struct _disk_trailer* trailer) +{ + if ( _disk_trailer_rootseek (trailer) > + offset_of_trailer - _disk_trailer_rootsize (trailer) && + offset_of_trailer > _disk_trailer_rootsize (trailer)) + { + register zzip_off_t offset; + offset = offset_of_trailer - _disk_trailer_rootsize (trailer); + _disk_trailer_set_rootseek (trailer, offset); + HINT2("new rootseek=%li", (long) _disk_trailer_rootseek (trailer)); + } +} +#define __correct_rootseek(A,B,C) + +#elif defined ZZIP_CORRECT_ROOTSEEK +/* store the seekvalue of the trailer into the "z_magic" field and with + * a 64bit off_t we overwrite z_disk/z_finaldisk as well. If you change + * anything in zziplib or dump the trailer structure then watch out that + * these are still unused, so that this code may still (ab)use those. */ +#define __fixup_rootseek(_offset_of_trailer, _trailer) \ + *(zzip_off_t*)_trailer = _offset_of_trailer; +#define __correct_rootseek( _u_rootseek, _u_rootsize, _trailer) \ + if (_u_rootseek > *(zzip_off_t*)_trailer - _u_rootsize) \ + _u_rootseek = *(zzip_off_t*)_trailer - _u_rootsize; +#else +#define __fixup_rootseek(A,B) +#define __correct_rootseek(A,B,C) +#endif + + +#ifdef DEBUG +_zzip_inline static void __debug_dir_hdr (struct zzip_dir_hdr* hdr) +{ + if (sizeof(struct zzip_dir_hdr) > sizeof(struct zzip_disk_entry)) + { WARN1("internal sizeof-mismatch may break wreakage"); } + /* the internal directory structure is never bigger than the + * external zip central directory space had been beforehand + * (as long as the following assertion holds...) + */ + + if (((zzip_off_t)hdr)&3) + { NOTE1("this machine's malloc(3) returns sth. not u32-aligned"); } + /* we assume that if this machine's malloc has returned a non-aligned + * memory block, then it is actually safe to access misaligned data, and + * since it does only affect the first hdr it should not even bring about + * too much of that cpu's speed penalty + */ +} +#else +#define __debug_dir_hdr(X) +#endif + +/* -------------------------- low-level interface -------------------------- */ + +#if defined BUFSIZ +#if BUFSIZ == 1024 || BUFSIZ == 512 || BUFSIZ == 256 +#define ZZIP_BUFSIZ BUFSIZ +#endif +#endif + +#ifndef ZZIP_BUFSIZ +#define ZZIP_BUFSIZ 512 +/* #define ZZIP_BUFSIZ 64 */ /* for testing */ +#endif + +/** + * This function is used by => zzip_file_open. It tries to find + * the zip's central directory info that is usually a few + * bytes off the end of the file. + */ +int +__zzip_fetch_disk_trailer(int fd, zzip_off_t filesize, + struct _disk_trailer * _zzip_restrict trailer, + zzip_plugin_io_t io) +{ +#ifdef DEBUG +#define return(val) { e=val; HINT2("%s", zzip_strerror(e)); goto cleanup; } +#else +#define return(val) { e=val; goto cleanup; } +#endif + register int e; + +#ifndef _LOWSTK + auto char buffer[2*ZZIP_BUFSIZ]; + char* buf = buffer; +#else + char* buf = malloc(2*ZZIP_BUFSIZ); +#endif + zzip_off_t offset = 0; + zzip_ssize_t maplen = 0; /* mmap(),read(),getpagesize() use size_t !! */ + char* fd_map = 0; + + if (!trailer) + { return(EINVAL); } + + if (filesize < __sizeof(struct zzip_disk_trailer)) + { return(ZZIP_DIR_TOO_SHORT); } + + if (!buf) + { return(ZZIP_OUTOFMEM); } + + offset = filesize; /* a.k.a. old offset */ + while(1) /* outer loop */ + { + register unsigned char* mapped; + + if (offset <= 0) { return(ZZIP_DIR_EDH_MISSING); } + + /* trailer cannot be farther away than 64K from fileend */ + if (filesize-offset > 64*1024) + { return(ZZIP_DIR_EDH_MISSING); } + + /* the new offset shall overlap with the area after the old offset! */ + if (USE_MMAP && io->fd.sys) + { + zzip_off_t mapoff = offset; + { + zzip_ssize_t pagesize = _zzip_getpagesize (io->fd.sys); + if (pagesize < ZZIP_BUFSIZ) goto non_mmap; /* an error? */ + if (mapoff == filesize && filesize > pagesize) + mapoff -= pagesize; + if (mapoff < pagesize) { + maplen = (zzip_ssize_t)mapoff + pagesize; mapoff = 0; + } else { + mapoff -= pagesize; maplen = 2*pagesize; + if ((zzip_ssize_t)mapoff & (pagesize-1)) { /*only 1. run */ + pagesize -= (zzip_ssize_t)mapoff & (pagesize-1); + mapoff += pagesize; + maplen -= pagesize; + } + } + if (mapoff + maplen > filesize) maplen = filesize - mapoff; + } + + fd_map = _zzip_mmap(io->fd.sys, fd, mapoff, (zzip_size_t)maplen); + if (fd_map == MAP_FAILED) goto non_mmap; + mapped = (unsigned char*) fd_map; offset = mapoff; /* success */ + HINT3("mapped *%p len=%li", fd_map, (long) maplen); + } else { + non_mmap: + fd_map = 0; /* have no mmap */ + { + zzip_off_t pagesize = ZZIP_BUFSIZ; + if (offset == filesize && filesize > pagesize) + offset -= pagesize; + if (offset < pagesize) { + maplen = (zzip_ssize_t)offset + pagesize; offset = 0; + } else { + offset -= pagesize; maplen = 2*pagesize; + if ((zzip_ssize_t)offset & (pagesize-1)) { /*on 1st run*/ + pagesize -= (zzip_ssize_t)offset & (pagesize-1); + offset += pagesize; + maplen -= pagesize; + } + } + if (offset + maplen > filesize) maplen = filesize - offset; + } + + if (io->fd.seeks(fd, offset, SEEK_SET) < 0) + { return(ZZIP_DIR_SEEK); } + if (io->fd.read(fd, buf, (zzip_size_t)maplen) < maplen) + { return(ZZIP_DIR_READ); } + mapped = (unsigned char*) buf; /* success */ + HINT5("offs=$%lx len=%li filesize=%li pagesize=%i", + (long)offset, (long)maplen, (long)filesize, ZZIP_BUFSIZ); + } + + {/* now, check for the trailer-magic, hopefully near the end of file */ + register unsigned char* end = mapped + maplen; + register unsigned char* tail; + for (tail = end-1; (tail >= mapped); tail--) + { + if ((*tail == 'P') && /* quick pre-check for trailer magic */ + end-tail >= __sizeof(struct zzip_disk_trailer)-2 && + zzip_disk_trailer_check_magic(tail)) + { +# ifndef ZZIP_DISK64_TRAILER + /* if the file-comment is not present, it happens + that the z_comment field often isn't either */ + if (end-tail >= __sizeof(*trailer)) + { + memcpy (trailer, tail, sizeof(*trailer)); + }else{ + memcpy (trailer, tail, sizeof(*trailer)-2); + trailer->z_comment[0] = 0; + trailer->z_comment[1] = 0; + } +# else + struct zzip_disk_trailer* orig = (struct zzip_disk_trailer*) tail; + trailer->zz_tail = tail; + trailer->zz_entries = zzip_disk_trailer_localentries (orig); + trailer->zz_finalentries = zzip_disk_trailer_finalentries (orig); + trailer->zz_rootseek = zzip_disk_trailer_rootseek (orig); + trailer->zz_rootsize = zzip_disk_trailer_rootsize (orig); +# endif + + __fixup_rootseek (offset + tail-mapped, trailer); + { return(0); } + } else if ((*tail == 'P') && + end-tail >= __sizeof(struct zzip_disk64_trailer)-2 && + zzip_disk64_trailer_check_magic(tail)) + { +# ifndef ZZIP_DISK64_TRAILER + return(ZZIP_DIR_LARGEFILE); +# else + struct zzip_disk64_trailer* orig = (struct zzip_disk64_trailer*) tail; + trailer->zz_tail = tail; + trailer->zz_entries = zzip_disk64_trailer_localentries (orig); + trailer->zz_finalentries = zzip_disk64_trailer_finalentries (orig); + trailer->zz_rootseek = zzip_disk64_trailer_rootseek (orig); + trailer->zz_rootsize = zzip_disk64_trailer_rootsize (orig); + { return(0); } +# endif + } + } + } + + if (USE_MMAP && fd_map) + { + HINT3("unmap *%p len=%li", fd_map, (long) maplen); + _zzip_munmap(io->fd.sys, fd_map, (zzip_size_t)maplen); + fd_map = 0; + } + } /*outer loop*/ + + cleanup: + if (USE_MMAP && fd_map) + { + HINT3("unmap *%p len=%li", fd_map, (long) maplen); + _zzip_munmap(io->fd.sys, fd_map, (zzip_size_t)maplen); + } +# ifdef _LOWSTK + free(buf); +# endif +# undef return + return e; +} + +/* + * making pointer alignments to values that can be handled as structures + * is tricky. We assume here that an align(4) is sufficient even for + * 64 bit machines. Note that binary operations are not usually allowed + * to pointer types but we do need only the lower bits in this implementation, + * so we can just cast the value to a long value. + */ +_zzip_inline char* __zzip_aligned4(char* p) +{ +#define aligned4 __zzip_aligned4 + p += ((long)p)&1; /* warnings about truncation of a "pointer" */ + p += ((long)p)&2; /* to a "long int" may be safely ignored :) */ + return p; +} + +/** + * This function is used by => zzip_file_open, it is usually called after + * => __zzip_find_disk_trailer. It will parse the zip's central directory + * information and create a zziplib private directory table in + * memory. + */ +int +__zzip_parse_root_directory(int fd, + struct _disk_trailer * trailer, + struct zzip_dir_hdr ** hdr_return, + zzip_plugin_io_t io) +{ + auto struct zzip_disk_entry dirent; + struct zzip_dir_hdr * hdr; + struct zzip_dir_hdr * hdr0; + uint16_t * p_reclen = 0; + unsigned long entries; /* 32bit is enough */ + zzip_off64_t zz_offset; /* offset from start of root directory */ + char* fd_map = 0; + zzip_off64_t zz_fd_gap = 0; + zzip_off64_t zz_entries = _disk_trailer_localentries (trailer); + zzip_off64_t zz_rootsize = _disk_trailer_rootsize (trailer); + zzip_off64_t zz_rootseek = _disk_trailer_rootseek (trailer); + __correct_rootseek (zz_rootseek, zz_rootsize, trailer); + + hdr0 = (struct zzip_dir_hdr*) malloc(zz_rootsize); + if (!hdr0) + return ZZIP_DIRSIZE; + hdr = hdr0; __debug_dir_hdr (hdr); + + if (USE_MMAP && io->fd.sys) + { + zz_fd_gap = zz_rootseek & (_zzip_getpagesize(io->fd.sys)-1) ; + HINT4(" fd_gap=%ld, mapseek=0x%lx, maplen=%ld", (long)(zz_fd_gap), + (long)(zz_rootseek-zz_fd_gap), (long)(zz_rootsize+zz_fd_gap)); + fd_map = _zzip_mmap(io->fd.sys, fd, + zz_rootseek-zz_fd_gap, zz_rootsize+zz_fd_gap); + /* if mmap failed we will fallback to seek/read mode */ + if (fd_map == MAP_FAILED) { + NOTE2("map failed: %s",strerror(errno)); + fd_map=0; + }else{ + HINT3("mapped *%p len=%li", fd_map, (long)(zz_rootsize+zz_fd_gap)); + } + } + + for (entries=zz_entries, zz_offset=0; entries; entries--) + { + register struct zzip_disk_entry * d; + uint16_t u_extras, u_comment, u_namlen; + + if (fd_map) + { d = (void*)(fd_map+zz_fd_gap+zz_offset); } /* fd_map+fd_gap==u_rootseek */ + else + { + if (io->fd.seeks(fd, zz_rootseek+zz_offset, SEEK_SET) < 0) + return ZZIP_DIR_SEEK; + if (io->fd.read(fd, &dirent, sizeof(dirent)) < __sizeof(dirent)) + return ZZIP_DIR_READ; + d = &dirent; + } + + if ((zzip_off64_t)(zz_offset+sizeof(*d)) > zz_rootsize || + (zzip_off64_t)(zz_offset+sizeof(*d)) < 0) + { FAIL4("%li's entry stretches beyond root directory (O:%li R:%li)", + (long)entries, (long)(zz_offset), (long)zz_rootsize); break;} + +# if 0 && defined DEBUG + zzip_debug_xbuf ((unsigned char*) d, sizeof(*d) + 8); +# endif + + u_extras = zzip_disk_entry_get_extras (d); + u_comment = zzip_disk_entry_get_comment (d); + u_namlen = zzip_disk_entry_get_namlen (d); + HINT5("offset=0x%lx, size %ld, dirent *%p, hdr %p\n", + (long)(zz_offset+zz_rootseek), (long)zz_rootsize, d, hdr); + + /* writes over the read buffer, Since the structure where data is + copied is smaller than the data in buffer this can be done. + It is important that the order of setting the fields is considered + when filling the structure, so that some data is not trashed in + first structure read. + at the end the whole copied list of structures is copied into + newly allocated buffer */ + hdr->d_crc32 = zzip_disk_entry_get_crc32 (d); + hdr->d_csize = zzip_disk_entry_get_csize (d); + hdr->d_usize = zzip_disk_entry_get_usize (d); + hdr->d_off = zzip_disk_entry_get_offset (d); + hdr->d_compr = zzip_disk_entry_get_compr (d); + if (hdr->d_compr > _255) hdr->d_compr = 255; + + if ((zzip_off64_t)(zz_offset+sizeof(*d) + u_namlen) > zz_rootsize || + (zzip_off64_t)(zz_offset+sizeof(*d) + u_namlen) < 0) + { FAIL4("%li's name stretches beyond root directory (O:%li N:%li)", + (long)entries, (long)(zz_offset), (long)(u_namlen)); break; } + + if (fd_map) + { memcpy(hdr->d_name, fd_map+zz_fd_gap + zz_offset+sizeof(*d), u_namlen); } + else { io->fd.read(fd, hdr->d_name, u_namlen); } + hdr->d_name[u_namlen] = '\0'; + hdr->d_namlen = u_namlen; + + /* update offset by the total length of this entry -> next entry */ + zz_offset += sizeof(*d) + u_namlen + u_extras + u_comment; + + if (zz_offset > zz_rootsize) + { FAIL3("%li's entry stretches beyond root directory (O:%li)", + (long)entries, (long)(zz_offset)); entries--; break; } + + HINT5("file %ld { compr=%d crc32=$%x offset=%d", + (long)entries, hdr->d_compr, hdr->d_crc32, hdr->d_off); + HINT5("csize=%d usize=%d namlen=%d extras=%d", + hdr->d_csize, hdr->d_usize, u_namlen, u_extras); + HINT5("comment=%d name='%s' %s <sizeof %d> } ", + u_comment, hdr->d_name, "",(int) sizeof(*d)); + + p_reclen = &hdr->d_reclen; + + { register char* p = (char*) hdr; + register char* q = aligned4 (p + sizeof(*hdr) + u_namlen + 1); + *p_reclen = (uint16_t)(q - p); + hdr = (struct zzip_dir_hdr*) q; + } + }/*for*/ + + if (USE_MMAP && fd_map) + { + HINT3("unmap *%p len=%li", fd_map, (long)(zz_rootsize+zz_fd_gap)); + _zzip_munmap(io->fd.sys, fd_map, zz_rootsize+zz_fd_gap); + } + + if (p_reclen) + { + *p_reclen = 0; /* mark end of list */ + + if (hdr_return) + *hdr_return = hdr0; + } /* else zero (sane) entries */ + return (entries ? ZZIP_CORRUPTED : 0); +} + +/* ------------------------- high-level interface ------------------------- */ + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +static zzip_strings_t* zzip_get_default_ext(void) +{ + static zzip_strings_t ext [] = + { + ".zip", ".ZIP", /* common extension */ +# ifdef ZZIP_USE_ZIPLIKES + ".pk3", ".PK3", /* ID Software's Quake3 zipfiles */ + ".jar", ".JAR", /* Java zipfiles */ +# endif + 0 + }; + + return ext; +} + +/** + * allocate a new ZZIP_DIR handle and do basic + * initializations before usage by => zzip_dir_fdopen + * => zzip_dir_open => zzip_file_open or through + * => zzip_open + * (ext==null flags uses { ".zip" , ".ZIP" } ) + * (io ==null flags use of posix io defaults) + */ +ZZIP_DIR* +zzip_dir_alloc_ext_io (zzip_strings_t* ext, const zzip_plugin_io_t io) +{ + ZZIP_DIR* dir; + if ((dir = (ZZIP_DIR *)calloc(1, sizeof(*dir))) == NULL) + return 0; + + /* dir->fileext is currently unused - so what, still initialize it */ + dir->fileext = ext ? ext : zzip_get_default_ext(); + dir->io = io ? io : zzip_get_default_io (); + return dir; +} + +/** => zzip_dir_alloc_ext_io + * this function is obsolete - it was generally used for implementation + * and exported to let other code build on it. It is now advised to + * use => zzip_dir_alloc_ext_io now on explicitly, just set that second + * argument to zero to achieve the same functionality as the old style. + */ +ZZIP_DIR* +zzip_dir_alloc (zzip_strings_t* fileext) +{ + return zzip_dir_alloc_ext_io (fileext, 0); +} + +/** + * will free the zzip_dir handle unless there are still + * zzip_files attached (that may use its cache buffer). + * This is the inverse of => zzip_dir_alloc , and both + * are helper functions used implicitly in other zzipcalls + * e.g. => zzip_dir_close = zzip_close + * + * returns zero on sucess + * returns the refcount when files are attached. + */ +int +zzip_dir_free(ZZIP_DIR * dir) +{ + if (dir->refcount) + return (dir->refcount); /* still open files attached */ + + if (dir->fd >= 0) dir->io->fd.close(dir->fd); + if (dir->hdr0) free(dir->hdr0); + if (dir->cache.fp) free(dir->cache.fp); + if (dir->cache.buf32k) free(dir->cache.buf32k); + if (dir->realname) free(dir->realname); + free(dir); + return 0; +} + +/** => zzip_dir_free + * It will also => free(2) the => ZZIP_DIR-handle given. + * the counterpart for => zzip_dir_open + * see also => zzip_dir_free + */ +int +zzip_dir_close(ZZIP_DIR * dir) +{ + dir->refcount &=~ 0x10000000; /* explicit dir close */ + return zzip_dir_free(dir); +} + +/** + * used by the => zzip_dir_open and zzip_opendir(2) call. Opens the + * zip-archive as specified with the fd which points to an + * already openend file. This function then search and parse + * the zip's central directory. + * + * NOTE: refcount is zero, so an _open/_close pair will also delete + * this _dirhandle + */ +ZZIP_DIR * +zzip_dir_fdopen(int fd, zzip_error_t * errcode_p) +{ + return zzip_dir_fdopen_ext_io(fd, errcode_p, 0, 0); +} + +static zzip_error_t __zzip_dir_parse (ZZIP_DIR* dir); /* forward */ + +/** => zzip_dir_fdopen + * this function uses explicit ext and io instead of the internal + * defaults, setting these to zero is equivalent to => zzip_dir_fdopen + */ +ZZIP_DIR * +zzip_dir_fdopen_ext_io(int fd, zzip_error_t * errcode_p, + zzip_strings_t* ext, const zzip_plugin_io_t io) +{ + zzip_error_t rv; + ZZIP_DIR * dir; + + if ((dir = zzip_dir_alloc_ext_io (ext, io)) == NULL) + { rv = ZZIP_OUTOFMEM; goto error; } + + dir->fd = fd; + if ((rv = __zzip_dir_parse (dir))) + goto error; + + dir->hdr = dir->hdr0; + dir->refcount |= 0x10000000; + + if (errcode_p) *errcode_p = rv; + return dir; +error: + if (dir) zzip_dir_free(dir); + if (errcode_p) *errcode_p = rv; + return NULL; +} + +static zzip_error_t +__zzip_dir_parse (ZZIP_DIR* dir) +{ + zzip_error_t rv; + zzip_off_t filesize; + struct _disk_trailer trailer; + /* if (! dir || dir->fd < 0) + * { rv = EINVAL; goto error; } + */ + + HINT2("------------------ fd=%i", (int) dir->fd); + if ((filesize = dir->io->fd.filesize(dir->fd)) < 0) + { rv = ZZIP_DIR_STAT; goto error; } + + HINT2("------------------ filesize=%ld", (long) filesize); + if ((rv = __zzip_fetch_disk_trailer(dir->fd, filesize, &trailer, + dir->io)) != 0) + { goto error; } + + HINT5("directory = { entries= %ld/%ld, size= %ld, seek= %ld } ", + (long) _disk_trailer_localentries (&trailer), + (long) _disk_trailer_finalentries (&trailer), + (long) _disk_trailer_rootsize (&trailer), + (long) _disk_trailer_rootseek (&trailer)); + + if ( (rv = __zzip_parse_root_directory(dir->fd, &trailer, &dir->hdr0, + dir->io)) != 0) + { goto error; } + error: + return rv; +} + +/** + * will attach a .zip extension and tries to open it + * the with => open(2). This is a helper function for + * => zzip_dir_open, => zzip_opendir and => zzip_open. + */ +int +__zzip_try_open(zzip_char_t* filename, int filemode, + zzip_strings_t* ext, zzip_plugin_io_t io) +{ + auto char file[PATH_MAX]; + int fd; + zzip_size_t len = strlen (filename); + + if (len+4 >= PATH_MAX) return -1; + memcpy(file, filename, len+1); + + if (!io) io = zzip_get_default_io(); + if (!ext) ext = zzip_get_default_ext(); + + for ( ; *ext ; ++ext) + { + strcpy (file+len, *ext); + fd = io->fd.open(file, filemode); + if (fd != -1) return fd; + } + return -1; +} + +/** + * Opens the zip-archive (if available). + * the two ext_io arguments will default to use posix io and + * a set of default fileext that can atleast add .zip ext itself. + */ +ZZIP_DIR* +zzip_dir_open(zzip_char_t* filename, zzip_error_t* e) +{ + return zzip_dir_open_ext_io (filename, e, 0, 0); +} + +/** => zzip_dir_open + * this function uses explicit ext and io instead of the internal + * defaults. Setting these to zero is equivalent to => zzip_dir_open + */ +ZZIP_DIR* +zzip_dir_open_ext_io(zzip_char_t* filename, zzip_error_t* e, + zzip_strings_t* ext, zzip_plugin_io_t io) +{ + int fd; + + if (!io) io = zzip_get_default_io(); + if (!ext) ext = zzip_get_default_ext(); + + fd = io->fd.open(filename, O_RDONLY|O_BINARY); + if (fd != -1) + { return zzip_dir_fdopen_ext_io(fd, e, ext, io); } + else + { + fd = __zzip_try_open(filename, O_RDONLY|O_BINARY, ext, io); + if (fd != -1) + { return zzip_dir_fdopen_ext_io(fd, e, ext, io); } + else + { + if (e) { *e = ZZIP_DIR_OPEN; } + return 0; + } + } +} + +/** => zzip_dir_open + * fills the dirent-argument with the values and + * increments the read-pointer of the dir-argument. + * + * returns 0 if there no entry (anymore). + */ +int +zzip_dir_read(ZZIP_DIR * dir, ZZIP_DIRENT * d ) +{ + if (! dir || ! dir->hdr || ! d) return 0; + + d->d_compr = dir->hdr->d_compr; + d->d_csize = dir->hdr->d_csize; + d->st_size = dir->hdr->d_usize; + d->d_name = dir->hdr->d_name; + + if (! dir->hdr->d_reclen) + { dir->hdr = 0; } + else + { dir->hdr = (struct zzip_dir_hdr *)((char *)dir->hdr + dir->hdr->d_reclen); } + + return 1; +} + +/* + * Local variables: + * c-file-style: "stroustrup" + * End: + */ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/zzip.h b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/zzip.h new file mode 100644 index 00000000000..eecc4737af1 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/zzip.h @@ -0,0 +1,323 @@ +/* + * Author: + * Guido Draheim <guidod@gmx.de> + * Tomi Ollila <Tomi.Ollila@iki.fi> + * + * Copyright (c) 1999,2000,2001,2002,2003,2004 Guido Draheim + * All rights reserved, + * usage allowed under the restrictions of the + * Lesser GNU General Public License + * or alternatively the restrictions + * of the Mozilla Public License 1.1 + * + * if you see "unknown symbol" errors, check first that `-I ..` is part of + * your compiler options - a special hint to VC/IDE users who tend to make up + * their own workspace files. All includes look like #include <zzip|*.h>, so + * you need to add an include path to the dir containing (!!) the ./zzip/ dir + */ + +#ifndef _ZZIP_ZZIP_H /* zziplib.h */ +#define _ZZIP_ZZIP_H + +#include <zzip/types.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* the zzip_error_t is also used to pass back ZLIB errors... */ +#define ZZIP_ERROR -4096 + +typedef enum +{ + ZZIP_NO_ERROR = 0, /* no error, may be used if user sets it. */ + ZZIP_OUTOFMEM = ZZIP_ERROR-20, /* out of memory */ + ZZIP_DIR_OPEN = ZZIP_ERROR-21, /* failed to open zipfile, see errno for details */ + ZZIP_DIR_STAT = ZZIP_ERROR-22, /* failed to fstat zipfile, see errno for details */ + ZZIP_DIR_SEEK = ZZIP_ERROR-23, /* failed to lseek zipfile, see errno for details */ + ZZIP_DIR_READ = ZZIP_ERROR-24, /* failed to read zipfile, see errno for details */ + ZZIP_DIR_TOO_SHORT = ZZIP_ERROR-25, + ZZIP_DIR_EDH_MISSING = ZZIP_ERROR-26, + ZZIP_DIRSIZE = ZZIP_ERROR-27, + ZZIP_ENOENT = ZZIP_ERROR-28, + ZZIP_UNSUPP_COMPR = ZZIP_ERROR-29, + ZZIP_CORRUPTED = ZZIP_ERROR-31, + ZZIP_UNDEF = ZZIP_ERROR-32, + ZZIP_DIR_LARGEFILE = ZZIP_ERROR-33 +} zzip_error_t; + +/* + * zzip_open flags. + */ +#define ZZIP_CASEINSENSITIVE O_APPEND /* do not use anymore. use CASLESS */ +#define ZZIP_IGNOREPATH O_TRUNC /* do not use anymore. use NOPATHS */ +#define ZZIP_EXTRAFLAGS (ZZIP_CASEINSENSITIVE|ZZIP_IGNOREPATH) + +/* zzip_open_ext_io o_modes flags : new style. use these from now on! */ +#define ZZIP_CASELESS (1<<12) /* ignore filename case inside zips */ +#define ZZIP_NOPATHS (1<<13) /* ignore subdir paths, just filename*/ +#define ZZIP_PREFERZIP (1<<14) /* try first zipped file, then real*/ +#define ZZIP_ONLYZIP (1<<16) /* try _only_ zipped file, skip real*/ +#define ZZIP_FACTORY (1<<17) /* old file handle is not closed */ +#define ZZIP_ALLOWREAL (1<<18) /* real files use default_io (magic) */ +#define ZZIP_THREADED (1<<19) /* try to be safe for multithreading */ + +/* + * zzip largefile renames + */ +#ifdef ZZIP_LARGEFILE_RENAME +#define zzip_telldir zzip_telldir64 +#define zzip_seekdir zzip_seekdir64 +#endif + +/* + * zzip typedefs + */ +/* zzip_strings_t ext[] = { ".zip", ".jar", ".pk3", 0 } */ +typedef char _zzip_const * _zzip_const zzip_strings_t; +typedef char _zzip_const zzip_char_t; +typedef struct zzip_dir ZZIP_DIR; +typedef struct zzip_file ZZIP_FILE; +typedef struct zzip_dirent ZZIP_DIRENT; +typedef struct zzip_dirent ZZIP_STAT; + +struct zzip_dirent +{ + int d_compr; /* compression method */ + int d_csize; /* compressed size */ + int st_size; /* file size / decompressed size */ + char * d_name; /* file name / strdupped name */ +}; + +/* + * Getting error strings + * zzip/err.c + */ +_zzip_export /* error in _opendir : */ +zzip_char_t* zzip_strerror(int errcode); +_zzip_export /* error in other functions : */ +zzip_char_t* zzip_strerror_of(ZZIP_DIR * dir); +_zzip_export /* error mapped to errno.h defines : */ +int zzip_errno(int errcode); + + +/* + * Functions to grab information from ZZIP_DIR/ZZIP_FILE structure + * (if ever needed) + * zzip/info.c + */ +_zzip_export +int zzip_error(ZZIP_DIR * dir); +_zzip_export +void zzip_seterror(ZZIP_DIR * dir, int errcode); +_zzip_export +zzip_char_t* zzip_compr_str(int compr); + +_zzip_export +ZZIP_DIR * zzip_dirhandle(ZZIP_FILE * fp); +_zzip_export +int zzip_dirfd(ZZIP_DIR * dir); +_zzip_export +int zzip_dir_real(ZZIP_DIR * dir); +_zzip_export +int zzip_file_real(ZZIP_FILE * fp); +_zzip_export +void* zzip_realdir(ZZIP_DIR * dir); +_zzip_export +int zzip_realfd(ZZIP_FILE * fp); + +/* + * zip handle management + * zzip/zip.c + */ +_zzip_export +ZZIP_DIR * zzip_dir_alloc(zzip_strings_t* fileext); +_zzip_export +int zzip_dir_free(ZZIP_DIR *); + +/* + * Opening/closing a zip archive + * zzip-zip.c + */ +_zzip_export +ZZIP_DIR * zzip_dir_fdopen(int fd, zzip_error_t * errcode_p); +_zzip_export +ZZIP_DIR * zzip_dir_open(zzip_char_t* filename, zzip_error_t * errcode_p); +_zzip_export +int zzip_dir_close(ZZIP_DIR * dir); +_zzip_export +int zzip_dir_read(ZZIP_DIR * dir, ZZIP_DIRENT * dirent); + + +/* + * Scanning files in zip archive + * zzip/dir.c + * zzip/zip.c + */ +_zzip_export +ZZIP_DIR * zzip_opendir(zzip_char_t* filename); +_zzip_export +int zzip_closedir(ZZIP_DIR * dir); +_zzip_export +ZZIP_DIRENT * zzip_readdir(ZZIP_DIR * dir); +_zzip_export +void zzip_rewinddir(ZZIP_DIR * dir); +_zzip_export +zzip_off_t zzip_telldir(ZZIP_DIR * dir); +_zzip_export +void zzip_seekdir(ZZIP_DIR * dir, zzip_off_t offset); + +/* + * 'opening', 'closing' and reading invidual files in zip archive. + * zzip/file.c + */ +_zzip_export +ZZIP_FILE * zzip_file_open(ZZIP_DIR * dir, zzip_char_t* name, int flags); +_zzip_export +int zzip_file_close(ZZIP_FILE * fp); +_zzip_export +zzip_ssize_t zzip_file_read(ZZIP_FILE * fp, char* buf, zzip_size_t len); + +_zzip_export +ZZIP_FILE * zzip_open(zzip_char_t* name, int flags); +_zzip_export +int zzip_close(ZZIP_FILE * fp); +_zzip_export +zzip_ssize_t zzip_read(ZZIP_FILE * fp, char * buf, zzip_size_t len); + +/* + * the stdc variant to open/read/close files. - Take note of the freopen() + * call as it may reuse an existing preparsed copy of a zip central directory + */ +_zzip_export +ZZIP_FILE* zzip_freopen(zzip_char_t* name, zzip_char_t* mode, ZZIP_FILE*); +_zzip_export +ZZIP_FILE* zzip_fopen(zzip_char_t* name, zzip_char_t* mode); +_zzip_export +zzip_size_t zzip_fread(void *ptr, zzip_size_t size, zzip_size_t nmemb, + ZZIP_FILE * file); +_zzip_export +int zzip_fclose(ZZIP_FILE * fp); + +/* + * seek and tell functions + */ +_zzip_export +int zzip_rewind(ZZIP_FILE *fp); +_zzip_export +zzip_off_t zzip_seek(ZZIP_FILE * fp, zzip_off_t offset, int whence); +_zzip_export +zzip_off_t zzip_tell(ZZIP_FILE * fp); + +/* + * reading info of a single file + * zzip/stat.c + */ +_zzip_export +int zzip_dir_stat(ZZIP_DIR * dir, zzip_char_t* name, + ZZIP_STAT * zs, int flags); +_zzip_export +int zzip_file_stat(ZZIP_FILE * fp, ZZIP_STAT * zs); +_zzip_export +int zzip_fstat(ZZIP_FILE * fp, ZZIP_STAT * zs); + +#ifdef ZZIP_LARGEFILE_RENAME +#define zzip_open_shared_io zzip_open_shared_io64 +#define zzip_open_ext_io zzip_open_ext_io64 +#define zzip_opendir_ext_io zzip_opendir_ext_io64 +#define zzip_dir_open_ext_io zzip_dir_open_ext_io64 +#define zzip_plugin_io_t zzip_plugin_io64_t +#endif + +/* + * all ext_io functions can be called with a default of ext/io == zero/zero + * which will default to a ".zip" extension and posix io of the system. + */ +typedef union _zzip_plugin_io _zzip_const * zzip_plugin_io_t; + +_zzip_export +ZZIP_FILE * zzip_open_shared_io(ZZIP_FILE* stream, + zzip_char_t* name, int o_flags, int o_modes, + zzip_strings_t* ext, zzip_plugin_io_t io); + +_zzip_export +ZZIP_FILE * zzip_open_ext_io(zzip_char_t* name, int o_flags, int o_modes, + zzip_strings_t* ext, zzip_plugin_io_t io); + +_zzip_export +ZZIP_DIR * zzip_opendir_ext_io(zzip_char_t* name, int o_modes, + zzip_strings_t* ext, zzip_plugin_io_t io); + +_zzip_export +ZZIP_DIR * zzip_dir_open_ext_io(zzip_char_t* filename, + zzip_error_t* errcode_p, + zzip_strings_t* ext, zzip_plugin_io_t io); + +/* zzip_file_open_ext_io => zzip_dir_open_ext_io + zzip_file_open */ + +#if defined _ZZIP_WRITE_SOURCE +/* ........................................................................ + * write support is not yet implemented + * zzip/write.c + */ +#define ZZIP_NO_CREAT 1 + +ZZIP_DIR* zzip_dir_creat_ext_io(zzip_char_t* name, int o_mode, + zzip_strings_t* ext, zzip_plugin_io_t io); +ZZIP_DIR* zzip_dir_creat(zzip_char_t* name, int o_mode); +int zzip_file_mkdir(ZZIP_DIR* dir, zzip_char_t* name, int o_mode); +ZZIP_FILE* zzip_file_creat(ZZIP_DIR* dir, zzip_char_t* name, int o_mode); +zzip_ssize_t zzip_file_write(ZZIP_FILE* file, + const void* ptr, zzip_size_t len); + +ZZIP_DIR* zzip_createdir(zzip_char_t* name, int o_mode); +zzip_ssize_t zzip_write(ZZIP_FILE* file, const void* ptr, zzip_size_t len); +zzip_size_t zzip_fwrite(const void* ptr, zzip_size_t len, + zzip_size_t multiply, ZZIP_FILE* file); +#ifndef zzip_savefile +#define zzip_savefile 0 +#define zzip_savefile_is_null +#endif + +#ifdef _ZZIP_NO_INLINE +#define zzip_mkdir(_name_,_mode_) \ + zzip_file_mkdir((zzip_savefile),(_name_),(_mode_)) +#define zzip_creat(_name_,_mode_) \ + zzip_file_creat((zzip_savefile),(_name_),(_mode_)) +#define zzip_sync() \ + { zzip_closedir((zzip_savefile)); (zzip_savefile) = 0; } +#define zzip_start(_name_,_mode_,_ext_) \ + { if ((zzip_savefile)) zzip_closedir((zzip_savefile)); + zzip_savefile = zzip_dir_creat(_name_, _mode_,_ext_); } + +#else + +_zzip_inline static int zzip_mkdir(zzip_char_t* name, int o_mode) +{ return zzip_file_mkdir(zzip_savefile, name, o_mode); } +_zzip_inline static ZZIP_FILE* zzip_creat(zzip_char_t* name, int o_mode) +{ return zzip_file_creat(zzip_savefile, name, o_mode); } + +#ifndef zzip_savefile_is_null +_zzip_inline static void zzip_sync(void) +{ zzip_closedir(zzip_savefile); zzip_savefile = 0; } +_zzip_inline static void zzip_mkfifo(zzip_char_t* name, int o_mode) +{ if ((zzip_savefile)) zzip_closedir (zzip_savefile); + zzip_savefile = zzip_createdir(_name_,_mode_); } +#else +_zzip_inline static void zzip_sync(void) {} +_zzip_inline static void zzip_mkfifo(zzip_char_t* name, int o_mode) {} +#endif +#endif /* _ZZIP_NO_INLINE */ +#endif /* _ZZIP_WRITE_SOURCE */ + +#ifdef __cplusplus +}; +#endif + +#endif /* _ZZIPLIB_H */ + +/* + * Local variables: + * c-file-style: "stroustrup" + * End: + */ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzip/zziplib.wpj b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/zziplib.wpj new file mode 100755 index 00000000000..e371b9b38bb --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzip/zziplib.wpj @@ -0,0 +1,103 @@ +40
+projectIdent
+0
+VpeMain
+1
+WRect
+0
+0
+7680
+10240
+2
+MProject
+3
+MCommand
+0
+4
+MCommand
+0
+4
+5
+WFileName
+11
+zziplib.tgt
+6
+WFileName
+9
+zzcat.tgt
+7
+WFileName
+9
+zzdir.tgt
+8
+WFileName
+12
+zziptest.tgt
+9
+WVList
+4
+10
+VComponent
+11
+WRect
+0
+0
+5670
+4215
+0
+0
+12
+WFileName
+11
+zziplib.tgt
+0
+0
+13
+VComponent
+14
+WRect
+678
+665
+5670
+4215
+0
+0
+15
+WFileName
+9
+zzcat.tgt
+0
+0
+16
+VComponent
+17
+WRect
+1868
+1467
+5670
+4215
+0
+0
+18
+WFileName
+9
+zzdir.tgt
+0
+0
+19
+VComponent
+20
+WRect
+1356
+1348
+5670
+4215
+0
+0
+21
+WFileName
+12
+zziptest.tgt
+0
+0
+19
diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzipback.sed b/Build/source/libs/zziplib/zziplib-0.13.58/zzipback.sed new file mode 100644 index 00000000000..b3e5e768525 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzipback.sed @@ -0,0 +1,19 @@ +s:<zzip/_config.h>:<zzip-config.h>: +s:<zzip/_msvc.h>:<zzip-msvc.h>: +s:<zzip/conf.h>:<zzip-conf.h>: +s:<zzip/dir.h>:<zzip-dir.h>: +s:<zzip/err.h>:<zzip-err.h>: +s:<zzip/file.h>:<zzip-file.h>: +s:<zzip/format.h>:<zzipformat.h>: +s:<zzip/info.h>:<zzip-info.h>: +s:<zzip/lib.h>:<zzip.h>: +s:<zzip/zzip.h>:<zziplib.h>: +s:<zzip/plugin.h>:<zzip-io.h>: +s:<zzip/stat.h>:<zzip-stat.h>: +s:<zzip/stdint.h>:<zzip-stdint.h>: +s:<zzip/__debug.h>:"__debug.h": +s:<zzip/__dirent.h>:"__dirent.h": +s:<zzip/__hints.h>:"__hints.h": +s:<zzip/__mmap.h>:"__mmap.h": +s:<zzip/wrap.h>:"zzipwrap.h": +/#inc/s:"wrap.h":"zzipwrap.h": diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zziplib.spec b/Build/source/libs/zziplib/zziplib-0.13.58/zziplib.spec new file mode 100644 index 00000000000..55e92649cd1 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zziplib.spec @@ -0,0 +1,157 @@ +%define lib lib010 +Summary: ZZipLib - libZ-based ZIP-access Library +Name: zziplib +Version: 0.13.47 +Release: 1.suse100 +Serial: 1 +Copyright: LGPL +Group: Development/Libraries +URL: http://zziplib.sf.net +Vendor: Guido Draheim <guidod@gmx.de> +Source0: http://prdownloads.sf.net/%{name}/%{name}-%{version}.tar.bz2 +BuildRoot: /var/tmp/%{name}-%{version}-%{release} + +Distribution: Original +Packager: Guido Draheim <guidod@gmx.de> +Requires: zlib +BuildRequires: zlib-devel +BuildRequires: SDL-devel + +#Begin3 +# Author1: too@iki.fi (Tomi Ollila) +# Author2: guidod@gmx.de (Guido Draheim) +# Maintained-by: guidod@gmx.de (Guido Draheim) +# Primary-Site: zziplib.sf.net +# Keywords: zip zlib inflate archive gamedata +# Platforms: zlib posix +# Copying-Policy: Lesser GPL Version 2 +#End + +%package %lib +Summary: ZZipLib - Documentation Files +Group: Development/Libraries +Provides: zziplib +Provides: libzzip0 +Provides: libzzip-0.so.10 + +%package doc +Summary: ZZipLib - Documentation Files +Group: Development/Libraries + +%package devel +Summary: ZZipLib - Development Files +Group: Development/Libraries +Requires: zziplib-%lib = %version +# Requires: pkgconfig (not yet) + +%description + : zziplib provides read access to zipped files in a zip-archive, + : using compression based solely on free algorithms provided by zlib. + +%description %lib + : zziplib provides read access to zipped files in a zip-archive, + : using compression based solely on free algorithms provided by zlib. + zziplib provides an additional API to transparently access files + being either real files or zipped files with the same filepath argument. + This is handy to package many files being shared data into a single + zip file - as it is sometimes used with gamedata or script repositories. + The library itself is fully multithreaded, and it is namespace clean + using the zzip_ prefix for its exports and declarations. + +%description doc + : zziplib provides read access to zipped files in a zip-archive, + : using compression based solely on free algorithms provided by zlib. + these are the (html) docs, mostly generated actually. + +%description devel + : zziplib provides read access to zipped files in a zip-archive, + : using compression based solely on free algorithms provided by zlib. + these are the header files needed to develop programs using zziplib. + there are test binaries to hint usage of the library in user programs. + +%prep +#' +%setup +# fixing relink problems during install too +LDFLAGS="-L%buildroot%_libdir" \ +CFLAGS="$RPM_OPT_FLAGS" \ +sh configure --prefix=%{_prefix} --enable-sdl --disable-builddir \ + --with-docdir=%{_docdir} --mandir=%{_mandir} TIMEOUT=9 +cp -a zzip zzip64 + +%build +%define _FILE_OFFSET64 -D_ZZIP_LARGEFILE -D_FILE_OFFSET_BITS=64 +%define _RELEASEINFO64 "RELEASE_INFO=-release 0-64" +%define _CFLAGS_OFFSET64 "AM_CFLAGS=%_FILE_OFFSET64" +make +(cd zzip64 && make %_CFLAGS_OFFSET64 %_RELEASEINFO64) +make doc + +%install +rm -rf %{buildroot} +(cd zzip64 && make install %_RELEASEINFO64 DESTDIR=%{buildroot}) +(cd %buildroot/%_libdir && mv libzzip.so libzzip64.so) +(cd %buildroot/%_libdir && mv libzzip.a libzzip64.a) +(cd %buildroot/%_libdir && \ +sed -e 's/zzip.so/zzip64.so/' -e 's/zzip.a/zzip64.a/' libzzip.la >libzzip64.la) +(cd %buildroot/%_libdir/pkgconfig && \ +sed -e 's/largefile=/largefile= %_FILE_OFFSET64/' \ + -e 's/-lzzip/-lzzip64/' -e 's/zziplib/zziplib64/' zziplib.pc >zziplib64.pc) + +make install DESTDIR=%{buildroot} +(cd %buildroot/%_libdir && mv libzzip.so libzzip32.so) +(cd %buildroot/%_libdir && mv libzzip.a libzzip32.a) +(cd %buildroot/%_libdir && ln -s libzzip32.so libzzip.so) +(cd %buildroot/%_libdir && ln -s libzzip32.a libzzip.a) +(cd %buildroot/%_libdir && \ +sed -e 's/zzip.so/zzip32.so/' -e 's/zzip.a/zzip32.a/' libzzip.la >libzzip32.la) +(cd %buildroot/%_libdir/pkgconfig && \ +sed -e 's/-lzzip/-lzzip32/' -e 's/zziplib/zziplib32/' zziplib.pc >zziplib32.pc) + +# the 12.8x and 11.8x and 10.8x packages are all the same actually +(cd %buildroot/%_libdir && \ +(for i in libzzip*.so.1? ; do : \ +; v10=`echo $i | sed -e "s/.so.../.so.10/"` \ +; v11=`echo $i | sed -e "s/.so.../.so.11/"` \ +; v12=`echo $i | sed -e "s/.so.../.so.12/"` \ +; test ! -e $v10 && test -e $v12 && ln -s $v12 $v10 \ +; test ! -e $v12 && test -e $v10 && ln -s $v10 $v12 \ +; ln -s $v10 $v11 || true; done)) + +make install-doc DESTDIR=%{buildroot} +make install-man3 DESTDIR=%{buildroot} + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%clean +rm -rf %{buildroot} + +%files %lib + %defattr(-,root,root) + %{_libdir}/lib*.so.* + +%files doc + %defattr(-,root,root) + %{_datadir}/groups/* +%dir %{_datadir}/omf/%{name} + %{_datadir}/omf/%{name}/* +%post doc +test ! -f %_bindir/scrollkeeper-update || %_bindir/scrollkeeper-update +%postun doc +test ! -f %_bindir/scrollkeeper-update || %_bindir/scrollkeeper-update + +%files devel + %defattr(-,root,root) + %{_bindir}/* +%dir %{_includedir}/zzip + %{_includedir}/zzip/* + %{_includedir}/*.h + %{_libdir}/lib*.so + %{_libdir}/lib*.a + %{_libdir}/lib*.la + %{_libdir}/pkgconfig/* +%dir %{_datadir}/%{name} + %{_datadir}/%{name}/* + %{_datadir}/aclocal/%{name}*.m4 + %{_mandir}/man3/* diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzipwrap/Makefile.am b/Build/source/libs/zziplib/zziplib-0.13.58/zzipwrap/Makefile.am new file mode 100644 index 00000000000..2c5b4719841 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzipwrap/Makefile.am @@ -0,0 +1,51 @@ +AUTOMAKE_OPTIONS = 1.4 foreign +AUTOTOOL_VERSION=autoconf-2.52 automake-1.5 libtool-1.4.2 +DEFAULT_INCLUDES = # nothing - no default of -I. -I$(srcdir) +DEFS = @DEFS@ -I$(top_builddir) -I$(top_srcdir) # also for automake 1.4 + +noinst_PROGRAMS = zzipwrap +lib_LTLIBRARIES = libzzipwrap.la +zzipdir = ${includedir}/zzip +zzip_HEADERS = $(libzzipwrap_la_headers) +# +VERSION_INFO=@VERSION_INFO@ +RELEASE_INFO=@RELEASE_INFO@ +THREAD_SAFE=@THREAD_SAFE@ +# + +libzzipwrap_la_SOURCES = \ + wrap.c +libzzipwrap_la_headers = \ + wrap.h + +libzzipwrap_la_LDFLAGS= @ZZIPLIB_LDFLAGS@ $(RELEASE_INFO) $(VERSION_INFO) \ + $(THREAD_SAFE) +libzzipwrap_la_LIBADD= ../zzip/libzzip.la @RESOLVES@ -lz + +../zzip/libzzip.la : @top_srcdir@/zzip/*.c + (cd ../zzip && $(MAKE) `basename $@`) + + +WCC10_CLEAN = *.obj *.lk1 *.mk1 *.mk *.sym *.tgt + +EXTRA_DIST = +CLEANFILES = $(WCC10_CLEAN) *.pc *.omf + +zzipwrap_LDFLAGS = @ZZIPLIB_LDFLAGS@ +zzipwrap_LDADD = libzzipwrap.la @RESOLVES@ ../zzip/libzzip.la -lz + +# ---------------------------------------------------------------------- +pkgconfigdir=$(libdir)/pkgconfig +pkgconfig_HEADERS= zzipwrap.pc + +zzipwrap.pc : Makefile + @ echo "prefix=$(prefix)" >$@ + @ echo "libdir=$(libdir)" >>$@ + @ echo "includedir=$(includedir)" >>$@ + @ echo " " >>$@ + @ echo "Name: zzipwrap" >>$@ + @ echo "Version: $(VERSION)" >>$@ + @ echo "Description: Callback Wrappers for ZZipLib" >>$@ + echo 'Requires: zziplib' >>$@ + echo 'Libs: -L$${libdir} -lzzipwrap' >>$@ + echo 'Cflags: -I$${includedir}' >>$@ diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzipwrap/Makefile.in b/Build/source/libs/zziplib/zziplib-0.13.58/zzipwrap/Makefile.in new file mode 100644 index 00000000000..92d06fb1e84 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzipwrap/Makefile.in @@ -0,0 +1,606 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 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@ + + + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +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@ +target_triplet = @target@ +noinst_PROGRAMS = zzipwrap$(EXEEXT) +subdir = zzipwrap +DIST_COMMON = $(pkgconfig_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(zzip_HEADERS) +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_compile_check_sizeof.m4 \ + $(top_srcdir)/m4/ac_set_default_paths_system.m4 \ + $(top_srcdir)/m4/ac_sys_largefile_sensitive.m4 \ + $(top_srcdir)/m4/acx_restrict.m4 \ + $(top_srcdir)/m4/ax_cflags_gcc_option.m4 \ + $(top_srcdir)/m4/ax_cflags_no_writable_strings.m4 \ + $(top_srcdir)/m4/ax_cflags_strict_prototypes.m4 \ + $(top_srcdir)/m4/ax_cflags_warn_all.m4 \ + $(top_srcdir)/m4/ax_create_pkgconfig_info.m4 \ + $(top_srcdir)/m4/ax_enable_builddir_uname.m4 \ + $(top_srcdir)/m4/ax_expand_prefix.m4 \ + $(top_srcdir)/m4/ax_maintainer_mode_auto_silent.m4 \ + $(top_srcdir)/m4/ax_not_enable_frame_pointer.m4 \ + $(top_srcdir)/m4/ax_prefix_config_h.m4 \ + $(top_srcdir)/m4/ax_set_version_info.m4 \ + $(top_srcdir)/m4/ax_spec_file.m4 \ + $(top_srcdir)/m4/ax_spec_package_version.m4 \ + $(top_srcdir)/m4/ax_warning_default_aclocaldir.m4 \ + $(top_srcdir)/m4/ax_warning_default_pkgconfig.m4 \ + $(top_srcdir)/m4/patch_libtool_on_darwin_zsh_overquoting.m4 \ + $(top_srcdir)/m4/patch_libtool_sys_lib_search_path_spec.m4 \ + $(top_srcdir)/m4/patch_libtool_to_add_host_cc.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/uses/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_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 = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \ + "$(DESTDIR)$(zzipdir)" +libLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(lib_LTLIBRARIES) +libzzipwrap_la_DEPENDENCIES = ../zzip/libzzip.la +am_libzzipwrap_la_OBJECTS = wrap.lo +libzzipwrap_la_OBJECTS = $(am_libzzipwrap_la_OBJECTS) +PROGRAMS = $(noinst_PROGRAMS) +zzipwrap_SOURCES = zzipwrap.c +zzipwrap_OBJECTS = zzipwrap.$(OBJEXT) +zzipwrap_DEPENDENCIES = libzzipwrap.la ../zzip/libzzip.la +depcomp = $(SHELL) $(top_srcdir)/uses/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(libzzipwrap_la_SOURCES) zzipwrap.c +DIST_SOURCES = $(libzzipwrap_la_SOURCES) zzipwrap.c +pkgconfigHEADERS_INSTALL = $(INSTALL_HEADER) +zzipHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(pkgconfig_HEADERS) $(zzip_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CONFIG_FILES = @CONFIG_FILES@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ -I$(top_builddir) -I$(top_srcdir) # also for automake 1.4 +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LARGEFILE_CFLAGS = @LARGEFILE_CFLAGS@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +MKZIP = @MKZIP@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PKG_CONFIG = @PKG_CONFIG@ +PYTHON = @PYTHON@ +RANLIB = @RANLIB@ +RELEASE_INFO = @RELEASE_INFO@ +RESOLVES = @RESOLVES@ +SDL = @SDL@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +THREAD_SAFE = @THREAD_SAFE@ +VERSION = @VERSION@ +# +VERSION_INFO = @VERSION_INFO@ +XMLTO = @XMLTO@ +ZIPTESTS = @ZIPTESTS@ +ZLIB_INCL = @ZLIB_INCL@ +ZLIB_LDIR = @ZLIB_LDIR@ +ZLIB_VERSION = @ZLIB_VERSION@ +ZZIPLIB_LDFLAGS = @ZZIPLIB_LDFLAGS@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_AS = @ac_ct_AS@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +aclocaldir = @aclocaldir@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +ax_enable_builddir_sed = @ax_enable_builddir_sed@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +docdir = @docdir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pkgconfig_libdir = @pkgconfig_libdir@ +pkgconfig_libfile = @pkgconfig_libfile@ + +# ---------------------------------------------------------------------- +pkgconfigdir = $(libdir)/pkgconfig +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +AUTOMAKE_OPTIONS = 1.4 foreign +AUTOTOOL_VERSION = autoconf-2.52 automake-1.5 libtool-1.4.2 +DEFAULT_INCLUDES = # nothing - no default of -I. -I$(srcdir) +lib_LTLIBRARIES = libzzipwrap.la +zzipdir = ${includedir}/zzip +zzip_HEADERS = $(libzzipwrap_la_headers) +# +libzzipwrap_la_SOURCES = \ + wrap.c + +libzzipwrap_la_headers = \ + wrap.h + +libzzipwrap_la_LDFLAGS = @ZZIPLIB_LDFLAGS@ $(RELEASE_INFO) $(VERSION_INFO) \ + $(THREAD_SAFE) + +libzzipwrap_la_LIBADD = ../zzip/libzzip.la @RESOLVES@ -lz +WCC10_CLEAN = *.obj *.lk1 *.mk1 *.mk *.sym *.tgt +EXTRA_DIST = +CLEANFILES = $(WCC10_CLEAN) *.pc *.omf +zzipwrap_LDFLAGS = @ZZIPLIB_LDFLAGS@ +zzipwrap_LDADD = libzzipwrap.la @RESOLVES@ ../zzip/libzzip.la -lz +pkgconfig_HEADERS = zzipwrap.pc +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 \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign zzipwrap/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign zzipwrap/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 +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + else :; fi; \ + done + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libzzipwrap.la: $(libzzipwrap_la_OBJECTS) $(libzzipwrap_la_DEPENDENCIES) + $(LINK) -rpath $(libdir) $(libzzipwrap_la_LDFLAGS) $(libzzipwrap_la_OBJECTS) $(libzzipwrap_la_LIBADD) $(LIBS) + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +zzipwrap$(EXEEXT): $(zzipwrap_OBJECTS) $(zzipwrap_DEPENDENCIES) + @rm -f zzipwrap$(EXEEXT) + $(LINK) $(zzipwrap_LDFLAGS) $(zzipwrap_OBJECTS) $(zzipwrap_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wrap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zzipwrap.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +install-pkgconfigHEADERS: $(pkgconfig_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)" + @list='$(pkgconfig_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgconfigHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + $(pkgconfigHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done + +uninstall-pkgconfigHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done +install-zzipHEADERS: $(zzip_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(zzipdir)" || $(mkdir_p) "$(DESTDIR)$(zzipdir)" + @list='$(zzip_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(zzipHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(zzipdir)/$$f'"; \ + $(zzipHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(zzipdir)/$$f"; \ + done + +uninstall-zzipHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(zzip_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(zzipdir)/$$f'"; \ + rm -f "$(DESTDIR)$(zzipdir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +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)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$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) $(PROGRAMS) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(zzipdir)"; 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: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-noinstPROGRAMS mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-pkgconfigHEADERS install-zzipHEADERS + +install-exec-am: install-libLTLIBRARIES + +install-info: install-info-am + +install-man: + +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-info-am uninstall-libLTLIBRARIES \ + uninstall-pkgconfigHEADERS uninstall-zzipHEADERS + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS ctags \ + 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-exec install-exec-am install-info \ + install-info-am install-libLTLIBRARIES install-man \ + install-pkgconfigHEADERS install-strip install-zzipHEADERS \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-info-am \ + uninstall-libLTLIBRARIES uninstall-pkgconfigHEADERS \ + uninstall-zzipHEADERS + + +../zzip/libzzip.la : @top_srcdir@/zzip/*.c + (cd ../zzip && $(MAKE) `basename $@`) + +zzipwrap.pc : Makefile + @ echo "prefix=$(prefix)" >$@ + @ echo "libdir=$(libdir)" >>$@ + @ echo "includedir=$(includedir)" >>$@ + @ echo " " >>$@ + @ echo "Name: zzipwrap" >>$@ + @ echo "Version: $(VERSION)" >>$@ + @ echo "Description: Callback Wrappers for ZZipLib" >>$@ + echo 'Requires: zziplib' >>$@ + echo 'Libs: -L$${libdir} -lzzipwrap' >>$@ + echo 'Cflags: -I$${includedir}' >>$@ +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzipwrap/wrap.c b/Build/source/libs/zziplib/zziplib-0.13.58/zzipwrap/wrap.c new file mode 100644 index 00000000000..2bea0c39e5b --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzipwrap/wrap.c @@ -0,0 +1,223 @@ + +/* Wrapper interface for zziplib's file IO functions. + * + * -- In memory-access IO function -- + * Provides default fileio functions open/read/lseek/close and functions + * that enable blocked, memory buffered IO. + * + * (c) A. Schiffler, aschiffler@home.com + * Released under same license as zziplib (LGPL), Oct 2001 + * + * modified 2002 to use new plugin_io interface by Guido Draheim + */ + +#include <zzip/conf.h> +#include <zzip/plugin.h> +/* #incl <zzip/wrap.h> */ +#include "wrap.h" + +#include <stdlib.h> +#include <stdio.h> +#include <string.h> + +#ifdef ZZIP_HAVE_UNISTD_H +#include <unistd.h> +#endif +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> + +/* Some globals that we use for operation */ + +static int zzip_memory_blocksize=0; +static zzipwrap_pfn_t zzip_memory_callback=NULL; +static void *zzip_memory_callbackdata=NULL; +static char *zzip_memory_buffer=NULL; +static int zzip_memory_bufferblock=0; +static int zzip_memory_fd=-1; +static int zzip_memory_pos=0; +static int zzip_memory_size=0; + +/* at the moment, we do not export the five handlers of zzip_memry plugin_io */ +#define ZZIP_memory static + +ZZIP_memory void zzip_memory_reset(void) +{ + zzip_memory_buffer=NULL; + zzip_memory_bufferblock=0; + zzip_memory_pos=0; + zzip_memory_size=0; + zzip_memory_fd=-1; +} + +ZZIP_memory int zzip_memory_read(int fd, char *buf, size_t count) +{ + int requested_block; + int transfer_start; + int transfer_bytes; + int bytes_read; + int bytes_to_write; + int bytes_written; + + /* Check file descriptor */ + if (fd!=zzip_memory_fd) { + return(-1); + } + + if ((int)count<0) + return -1; + + /* Work out how many bytes we have to read based */ + /* on filepos and requested buffersize. */ + bytes_to_write=zzip_memory_size-zzip_memory_pos; + if (bytes_to_write>=(int)count) { + bytes_to_write=(int)count; + } + + /* Read/transfer loop */ + bytes_written=0; + while (bytes_to_write>0) { + /* Check which block we are reading from */ + requested_block=zzip_memory_pos/zzip_memory_blocksize; + /* Check if we have this block available */ + if (zzip_memory_bufferblock!=requested_block) { + /* Read this block */ + lseek(fd,requested_block*zzip_memory_blocksize,SEEK_SET); + bytes_read=read(fd,zzip_memory_buffer,zzip_memory_blocksize); + /* Clear unused bytes */ + if ((bytes_read>=0) && (bytes_read<zzip_memory_blocksize)) { + memset(&zzip_memory_buffer[bytes_read],0,zzip_memory_blocksize-bytes_read); + } + /* Set current block pos */ + zzip_memory_bufferblock=requested_block; + /* Process buffer if callback is set */ + if (zzip_memory_callback) { + zzip_memory_callback(zzip_memory_buffer,zzip_memory_blocksize,zzip_memory_callbackdata); + } + } else { + bytes_read=zzip_memory_blocksize; + } + /* Check if we have read any data */ + if (bytes_read > 0) { + /* Copy data to output buffer */ + transfer_start=zzip_memory_pos-zzip_memory_bufferblock*zzip_memory_blocksize; + transfer_bytes=zzip_memory_blocksize-transfer_start; + if (transfer_bytes>bytes_to_write) { + transfer_bytes=bytes_to_write; + } + memcpy (&buf[bytes_written], &zzip_memory_buffer[transfer_start],transfer_bytes); + zzip_memory_pos += transfer_bytes; + bytes_written += transfer_bytes; + bytes_to_write -= transfer_bytes; + } else { + /* Exit on error during read */ + bytes_to_write=0; + } + } + return(bytes_written); +} + +ZZIP_memory int zzip_memory_open(const char *pathname, int flags) +{ + int fd; + struct stat stat_buffer; + + /* Deallocate any memory buffer laying around */ + if (zzip_memory_buffer) { + free(zzip_memory_buffer); + } + /* Reset variables */ + zzip_memory_reset(); + /* Open file */ + fd=open(pathname, flags); + if (fd<0) { + return(-1); + } else { + /* Get filesize */ + if (fstat(fd, &stat_buffer)<0) { + return(-1); + } + if (stat_buffer.st_size<1) { + return(-1); + } + /* Store filesize */ + zzip_memory_size = stat_buffer.st_size; + /* Allocate readbuffer */ + zzip_memory_buffer = malloc(zzip_memory_blocksize); + /* Invalidate buffer block */ + zzip_memory_bufferblock = -1; + /* Store file descriptor */ + zzip_memory_fd=fd; + /* Return file descriptor */ + return(fd); + } +} + +ZZIP_memory int zzip_memory_close(int fd) +{ + /* Check file descriptor */ + if (fd!=zzip_memory_fd) { + return(-1); + } + /* Clear any memory buffer that might be laying around */ + if (zzip_memory_buffer) { + free(zzip_memory_buffer); + } + /* Reset variables */ + zzip_memory_reset(); + /* Close file */ + return(close(fd)); +} + +ZZIP_memory off_t zzip_memory_lseek(int fildes, off_t offset, int whence) +{ + /* Check file descriptor */ + if (fildes!=zzip_memory_fd) { + return(-1); + } + /* Change position pointer */ + switch (whence) { + case SEEK_SET: + zzip_memory_pos=offset; + break; + case SEEK_CUR: + zzip_memory_pos += offset; + break; + case SEEK_END: + zzip_memory_pos = zzip_memory_size-1; + break; + } + /* Limit position to the last byte of the file */ + if (zzip_memory_pos>(zzip_memory_size-1)) { + zzip_memory_pos=zzip_memory_size-1; + } + /* Return current position */ + return(zzip_memory_pos); +} + +/* -------- Control wrapper usage */ + + +zzip_plugin_io_t +zzipwrap_use_memory_io(int blocksize, + zzipwrap_pfn_t callback, void *callbackdata) +{ + static const struct zzip_plugin_io zzip_memory_io = + { + (void *) zzip_memory_open, + (void *) zzip_memory_close, + (void *) zzip_memory_read, + (void *) zzip_memory_lseek, + (void *) zzip_filesize, + 0 + }; + + /* Store blocksize and block-processing callback data */ + + zzip_memory_blocksize = blocksize; + zzip_memory_callback = callback; + zzip_memory_callbackdata = callbackdata; + + return (zzip_plugin_io_t) &zzip_memory_io; +} + diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzipwrap/wrap.h b/Build/source/libs/zziplib/zziplib-0.13.58/zzipwrap/wrap.h new file mode 100644 index 00000000000..e4f4f5b7efc --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzipwrap/wrap.h @@ -0,0 +1,36 @@ +/* + * Author: + * Andreas Schiffler <aschiffler@appwares.com> + * + * Copyright (c) 2001 Andreas Schiffler + * All rights reserved, + * usage allowed under the restrictions of the + * Lesser GNU General Public License + */ + +#ifndef _ZZIPWRAP_H +#define _ZZIPWRAP_H + +#include <zzip/zzip.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * toggle alternate read routine and set callback and callback data + * return: a plugin_io pointer to be used + * with => zzip_opendir_ext_io or => zzip_open_ext_io and cousins + */ +typedef void (*zzipwrap_pfn_t)(void* mem, int blocksize, void* privatedata); +_zzip_export +zzip_plugin_io_t +zzipwrap_use_memory_io(int blocksize, zzipwrap_pfn_t callback, void *callbackdata); + + +#ifdef __cplusplus +}; +#endif + +#endif /* _ZZIPWRAP_H */ + diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzipwrap/zzipwrap.c b/Build/source/libs/zziplib/zziplib-0.13.58/zzipwrap/zzipwrap.c new file mode 100644 index 00000000000..447ce23f5b4 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzipwrap/zzipwrap.c @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2000,2001 Guido Draheim <guidod@gmx.de> + * Use freely under the restrictions of the ZLIB license. + * + * Modified by Andreas Schiffler, 2001, for the zzipwrap feature + * Modified by Guido Draheim in 2002 for the plugin_io feature + */ + +#include <stdio.h> +#include <string.h> +#include <stdlib.h> /* exit */ + +#include <zzip/zzip.h> +/* #incl <zzip/wrap.h> */ +#include "wrap.h" + +#ifndef O_BINARY +#define O_BINARY 0 +#endif + +static const char usage[] = +{ + "zzipwrap <dir>.. \n" + " - prints a content table to stdout, but the dir can also be a zip-arch." + "\n" + " To show the contents of a zip-archive named 'test.zip', you may write \n" + " zzipwrap test \n" +}; + +/* This is a demo block callback routine that has access to the buffer */ +/* that was just read BEFORE it is used by zziplib. */ +static void demo_block_callback (void *buffer, int buffersize, void *data) +{ + fprintf (stderr, + "demo_block_callback( buffer-pointer=%p" + " buffer-size=%i data='%s' )\n", + buffer,buffersize,(char*)data); +} + +int +main (int argc, char ** argv) +{ + zzip_plugin_io_t io; + int argn; + + if (argc <= 1) + { + printf (usage); + exit(0); + } + + /* Enable blocked (32 bytes) memory buffered IO routines with a */ + /* demo callback routine. */ + io = zzipwrap_use_memory_io(32, demo_block_callback, + (void*) "Some callback data"); + if (! io) + { + fprintf(stderr, "could not initialize memory-io"); + return 1; + } + + for (argn=1; argn < argc; argn++) + { + ZZIP_DIR * dir; + ZZIP_DIRENT * d; + + dir = zzip_opendir_ext_io(argv[argn], 0, 0, io); + if (! dir) + { + fprintf (stderr, "did not open %s:", argv[argn]); + perror(argv[argn]); + continue; + } + + if (argc > 2) printf ("%s:\n", argv[argn]); + + /* read each dir entry and show one line of info per file */ + while ((d = zzip_readdir (dir))) + { + /* orignalsize / compression-type / compression-ratio / filename */ + if (d->st_size > 999999) + { + printf ("%5dK %-9s %2d%% %s\n", + d->st_size>>10, + zzip_compr_str(d->d_compr), + 100 - (d->d_csize|1)/((d->st_size/100)|1), + d->d_name); + }else{ + printf ("%6d %-9s %2d%% %s\n", + d->st_size, + zzip_compr_str(d->d_compr), + 100 - (d->d_csize|1)*100/(d->st_size|1), + d->d_name); + } + } + + zzip_closedir(dir); + } + + return 0; +} + diff --git a/Build/source/libs/zziplib/zziplib-0.13.58/zzipwrap/zzipwrap.pc b/Build/source/libs/zziplib/zziplib-0.13.58/zzipwrap/zzipwrap.pc new file mode 100644 index 00000000000..a22620f8aa4 --- /dev/null +++ b/Build/source/libs/zziplib/zziplib-0.13.58/zzipwrap/zzipwrap.pc @@ -0,0 +1,10 @@ +prefix=/usr/local +libdir=/usr/local/lib +includedir=/usr/local/include + +Name: zzipwrap +Version: 2006.0807 +Description: Callback Wrappers for ZZipLib +Requires: zziplib +Libs: -L${libdir} -lzzipwrap +Cflags: -I${includedir} diff --git a/Build/source/m4/kpse-cxx-hack.m4 b/Build/source/m4/kpse-cxx-hack.m4 index 9beec894270..17ec949b63b 100644 --- a/Build/source/m4/kpse-cxx-hack.m4 +++ b/Build/source/m4/kpse-cxx-hack.m4 @@ -1,6 +1,6 @@ # Public macros for the TeX Live (TL) tree. # Copyright (C) 2002 Olaf Weber <olaf@infovore.xs4all.nl> -# Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org> +# Copyright (C) 2009, 2010 Peter Breitenlohner <tex-live@tug.org> # # This file is free software; the copyright holders # give unlimited permission to copy and/or distribute it, @@ -20,8 +20,7 @@ AC_DEFUN([KPSE_ENABLE_CXX_HACK], # KPSE_CXX_HACK() # --------------- -# Try statically linking C++ runtime library (g++ only) -# and define CXX_HACK_LIBS with required flags. +# Try statically linking C++ runtime library (g++ only). # Since Libtool reshuffles the argument list, we define CXXLD # as wrapper script appending these flags to g++ as invoked # by Libtool when linking progams (but not shared libraries). @@ -35,22 +34,18 @@ if test "x$GXX:$enable_cxx_runtime_hack" = xyes:yes; then fi if test "x$kpse_cv_cxx_hack" = xok; then CXXLD='$(top_builddir)/CXXLD.sh' - CXX_HACK_DEPS=$CXXLD - CXX_HACK_LIBS=$kpse_cv_cxx_flags cxxld_sh="#! ${CONFIG_SHELL-/bin/sh} # CXXLD.sh. Generated by configure. -set -- $CXX \"\$[]@\" $CXX_HACK_LIBS +set -- $CXX \"\$[]@\" $kpse_cv_cxx_flags echo \"\$[]0:\" \"\$[]@\" exec \"\$[]@\"" - AC_CONFIG_FILES([CXXLD.sh:README], - [echo "$cxxld_sh" >CXXLD.sh; chmod +x CXXLD.sh], - [cxxld_sh='$cxxld_sh']) + AC_CONFIG_COMMANDS([CXXLD.sh], + [echo "$cxxld_sh" >CXXLD.sh; chmod +x CXXLD.sh], + [cxxld_sh='$cxxld_sh']) else CXXLD='$(CXX)' fi AC_SUBST([CXXLD]) -AC_SUBST([CXX_HACK_DEPS]) -AC_SUBST([CXX_HACK_LIBS]) ]) # KPSE_CXX_HACK # _KPSE_CXX_HACK() diff --git a/Build/source/m4/kpse-freetype2-flags.m4 b/Build/source/m4/kpse-freetype2-flags.m4 index 0216f7bcdfe..40d4e2a6fb0 100644 --- a/Build/source/m4/kpse-freetype2-flags.m4 +++ b/Build/source/m4/kpse-freetype2-flags.m4 @@ -40,7 +40,7 @@ AC_DEFUN([KPSE_FREETYPE2_SYSTEM_FLAGS], if $FT2_CONFIG --ftversion >/dev/null 2>&1; then FREETYPE2_INCLUDES=`$FT2_CONFIG --cflags` FREETYPE2_LIBS=`$FT2_CONFIG --libs` -elif test "x$need_freetype2:$with_system_freetype2" = 'xyes:yes'; then +elif test "x$need_freetype2:$with_system_freetype2" = xyes:yes; then AC_MSG_ERROR([did not find freetype-config required for system freetype2 library]) fi ]) # KPSE_FREETYPE2_SYSTEM_FLAGS diff --git a/Build/source/m4/kpse-graphite-flags.m4 b/Build/source/m4/kpse-graphite-flags.m4 index cb012ccf265..cf532b0b03d 100644 --- a/Build/source/m4/kpse-graphite-flags.m4 +++ b/Build/source/m4/kpse-graphite-flags.m4 @@ -1,5 +1,5 @@ # Public macros for the TeX Live (TL) tree. -# Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org> +# Copyright (C) 2009, 2010 Peter Breitenlohner <tex-live@tug.org> # # This file is free software; the copyright holder # gives unlimited permission to copy and/or distribute it, @@ -37,7 +37,7 @@ AC_DEFUN([KPSE_GRAPHITE_SYSTEM_FLAGS], if $PKG_CONFIG silgraphite --atleast-version=2.3; then GRAPHITE_INCLUDES="`$PKG_CONFIG silgraphite --cflags`" GRAPHITE_LIBS=`$PKG_CONFIG silgraphite --libs` -elif test "x$need_graphite:$with_system_graphite" = 'xyes:yes'; then +elif test "x$need_graphite:$with_system_graphite" = xyes:yes; then AC_MSG_ERROR([did not find silgraphite 2.3 or better]) fi ]) # KPSE_GRAPHITE_SYSTEM_FLAGS diff --git a/Build/source/m4/kpse-icu-flags.m4 b/Build/source/m4/kpse-icu-flags.m4 index 6b966d4468c..4bbee4f6fbd 100644 --- a/Build/source/m4/kpse-icu-flags.m4 +++ b/Build/source/m4/kpse-icu-flags.m4 @@ -1,5 +1,5 @@ # Public macros for the TeX Live (TL) tree. -# Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org> +# Copyright (C) 2009, 2010 Peter Breitenlohner <tex-live@tug.org> # # This file is free software; the copyright holder # gives unlimited permission to copy and/or distribute it, @@ -62,7 +62,7 @@ if $ICU_CONFIG --version >/dev/null 2>&1; then ICU_INCLUDES=`$ICU_CONFIG --cppflags` ICU_LIBS=`$ICU_CONFIG --ldflags-searchpath m4_ifset([kpse_icu_config_args], [kpse_icu_config_args] )--ldflags-libsonly --ldflags-system` -elif test "x$need_icu:$with_system_icu" = 'xyes:yes'; then +elif test "x$need_icu:$with_system_icu" = xyes:yes; then AC_MSG_ERROR([did not find icu-config required for system icu libraries]) fi ]) # KPSE_ICU_SYSTEM_FLAGS diff --git a/Build/source/m4/kpse-xpdf-flags.m4 b/Build/source/m4/kpse-xpdf-flags.m4 index 680c41baad8..993bd792f16 100644 --- a/Build/source/m4/kpse-xpdf-flags.m4 +++ b/Build/source/m4/kpse-xpdf-flags.m4 @@ -1,5 +1,5 @@ # Public macros for the TeX Live (TL) tree. -# Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org> +# Copyright (C) 2009, 2010 Peter Breitenlohner <tex-live@tug.org> # # This file is free software; the copyright holder # gives unlimited permission to copy and/or distribute it, @@ -38,7 +38,7 @@ if $PKG_CONFIG poppler --atleast-version=0.10; then POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"' XPDF_INCLUDES="$POPPLER_VERSION `$PKG_CONFIG poppler --cflags`" XPDF_LIBS=`$PKG_CONFIG poppler --libs` -elif test "x$need_xpdf:$with_system_xpdf" = 'xyes:yes'; then +elif test "x$need_xpdf:$with_system_xpdf" = xyes:yes; then AC_MSG_ERROR([did not find poppler-0.10 or better]) fi ]) # KPSE_XPDF_SYSTEM_FLAGS diff --git a/Build/source/m4/kpse-zziplib-flags.m4 b/Build/source/m4/kpse-zziplib-flags.m4 new file mode 100644 index 00000000000..064908f19f9 --- /dev/null +++ b/Build/source/m4/kpse-zziplib-flags.m4 @@ -0,0 +1,44 @@ +# Public macros for the TeX Live (TL) tree. +# Copyright (C) 2010 Peter Breitenlohner <tex-live@tug.org> +# +# This file is free software; the copyright holder +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 0 + +# KPSE_ZZIPLIB_FLAGS +# ----------------- +# Provide the configure options '--with-system-zziplib' (if in the TL tree), +# '--with-zziplib-includes', and '--with-zziplib-libdir'. +# +# Set the make variables ZZIPLIB_INCLUDES and ZZIPLIB_LIBS to the CPPFLAGS and +# LIBS required for the `-lpng' library in libs/zziplib/ of the TL tree. +AC_DEFUN([KPSE_ZZIPLIB_FLAGS], +[AC_REQUIRE([KPSE_ZLIB_FLAGS])[]dnl +_KPSE_LIB_FLAGS([zziplib], [zzip], [], + [-IBLD/libs/zziplib/include], [BLD/libs/zziplib/libzzip.a], [], + [], [${top_builddir}/../../libs/zziplib/include/zzip/zzip.h])[]dnl +]) # KPSE_ZZIPLIB_FLAGS + +# KPSE_ZZIPLIB_OPTIONS([WITH-SYSTEM]) +# ---------------------------------- +AC_DEFUN([KPSE_ZZIPLIB_OPTIONS], +[m4_ifval([$1], + [AC_ARG_WITH([system-zziplib], + AS_HELP_STRING([--with-system-zziplib], + [use installed zziplib headers and library + (requires pkg-config)]))])[]dnl +]) # KPSE_ZZIPLIB_OPTIONS + +# KPSE_ZZIPLIB_SYSTEM_FLAGS +# ------------------------ +AC_DEFUN([KPSE_ZZIPLIB_SYSTEM_FLAGS], +[AC_REQUIRE([_KPSE_CHECK_PKG_CONFIG])[]dnl +if $PKG_CONFIG zziplib --atleast-version=0.12; then + ZZIPLIB_INCLUDES=`$PKG_CONFIG zziplib --cflags` + ZZIPLIB_LIBS=`$PKG_CONFIG zziplib --libs` +elif test "x$need_zziplib:$with_system_zziplib" = xyes:yes; then + AC_MSG_ERROR([did not find zziplib-0.12 or better]) +fi +]) # KPSE_ZZIPLIB_SYSTEM_FLAGS diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog index 2ad48d50603..7cd4fb9254e 100644 --- a/Build/source/texk/kpathsea/ChangeLog +++ b/Build/source/texk/kpathsea/ChangeLog @@ -1,3 +1,7 @@ +2010-02-01 Peter Breitenlohner <peb@mppmu.mpg.de> + + * Makefile.am (kpseinclude_HEADERS): Add win32lib.h. + 2010-02-01 Karl Berry <karl@tug.org> * strstr.c, diff --git a/Build/source/texk/kpathsea/Makefile.am b/Build/source/texk/kpathsea/Makefile.am index 29bc038e9bf..e1184d7e646 100644 --- a/Build/source/texk/kpathsea/Makefile.am +++ b/Build/source/texk/kpathsea/Makefile.am @@ -1,6 +1,6 @@ ## Makefile.am for the TeX Live subdirectory texk/kpathsea/ ## -## Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org> +## Copyright (C) 2009, 2010 Peter Breitenlohner <tex-live@tug.org> ## You may freely use, modify and/or distribute this file. ## ACLOCAL_AMFLAGS = -I ../../m4 @@ -153,6 +153,7 @@ kpseinclude_HEADERS = \ types.h \ variable.h \ version.h \ + win32lib.h \ xopendir.h \ xstat.h diff --git a/Build/source/texk/kpathsea/Makefile.in b/Build/source/texk/kpathsea/Makefile.in index a3ba0117cc4..b96c3190746 100644 --- a/Build/source/texk/kpathsea/Makefile.in +++ b/Build/source/texk/kpathsea/Makefile.in @@ -424,6 +424,7 @@ kpseinclude_HEADERS = \ types.h \ variable.h \ version.h \ + win32lib.h \ xopendir.h \ xstat.h diff --git a/Build/source/texk/web2c/luatexdir/am/libzzip.am b/Build/source/texk/web2c/luatexdir/am/libzzip.am index eacdac63e58..c2c80399b2b 100644 --- a/Build/source/texk/web2c/luatexdir/am/libzzip.am +++ b/Build/source/texk/web2c/luatexdir/am/libzzip.am @@ -1,6 +1,6 @@ ## texk/web2c/luatexdir/am/libzzip.am: Makefile fragment for libzzip. ## -## Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org> +## Copyright (C) 2009, 2010 Peter Breitenlohner <tex-live@tug.org> ## You may freely use, modify and/or distribute this file. ## zziplib @@ -30,10 +30,6 @@ libzzip_a_SOURCES = \ luatexdir/zziplib/zzip/info.c \ luatexdir/zziplib/zzip/info.h \ luatexdir/zziplib/zzip/lib.h \ - luatexdir/zziplib/zzip/memdisk.c \ - luatexdir/zziplib/zzip/memdisk.h \ - luatexdir/zziplib/zzip/mmapped.c \ - luatexdir/zziplib/zzip/mmapped.h \ luatexdir/zziplib/zzip/plugin.c \ luatexdir/zziplib/zzip/plugin.h \ luatexdir/zziplib/zzip/stdint.h \ @@ -76,6 +72,10 @@ EXTRA_DIST += \ luatexdir/zziplib/zzip/autoconf.h \ luatexdir/zziplib/zzip/fseeko.c \ luatexdir/zziplib/zzip/fseeko.h \ + luatexdir/zziplib/zzip/memdisk.c \ + luatexdir/zziplib/zzip/memdisk.h \ + luatexdir/zziplib/zzip/mmapped.c \ + luatexdir/zziplib/zzip/mmapped.h \ luatexdir/zziplib/zzip/zziplib.wpj \ luatexdir/zziplib/zzipback.sed \ luatexdir/zziplib/zzipwrap |